Changeset 156 in Main for trunk/Server/module.c
- Timestamp:
- Sep 25, 2024, 9:28:10 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/module.c
r25 r156 10 10 #include <cm_log.h> 11 11 12 #include <string.h> 12 13 #include <unistd.h> 13 14 #include <stdlib.h> … … 56 57 } 57 58 59 void tw_add_define(const char* string) { 60 int i; 61 for(i = 0; config.defined[i] != NULL; i++) 62 ; 63 config.defined[i] = cm_strdup(string); 64 config.defined[i + 1] = NULL; 65 } 66 67 void tw_delete_define(const char* string) { 68 int i; 69 for(i = 0; config.defined[i] != NULL; i++) { 70 if(strcmp(config.defined[i], string) == 0) { 71 free(config.defined[i]); 72 for(; config.defined[i] != NULL; i++) { 73 config.defined[i] = config.defined[i + 1]; 74 } 75 } 76 } 77 } 78 58 79 void tw_init_tools(struct tw_tool* tools) { 59 80 tools->log = cm_log; 60 81 tools->add_version = tw_add_version; 82 tools->add_define = tw_add_define; 61 83 } 62 84
Note:
See TracChangeset
for help on using the changeset viewer.