Subversion Repositories Tewi

Rev

Rev 156 | Rev 182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 159
Line 1... Line 1...
1
/* $Id: module.c 156 2024-09-25 12:28:10Z nishi $ */
1
/* $Id: module.c 159 2024-09-25 12:56:45Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "tw_module.h"
5
#include "tw_module.h"
6
 
6
 
Line 56... Line 56...
56
	}
56
	}
57
}
57
}
58
 
58
 
59
void tw_add_define(const char* string) {
59
void tw_add_define(const char* string) {
60
	int i;
60
	int i;
-
 
61
	for(i = 0; config.defined[i] != NULL; i++) {
-
 
62
		if(strcmp(config.defined[i], string) == 0) {
-
 
63
			return;
-
 
64
		}
-
 
65
	}
61
	for(i = 0; config.defined[i] != NULL; i++)
66
	for(i = 0; config.defined[i] != NULL; i++)
62
		;
67
		;
63
	config.defined[i] = cm_strdup(string);
68
	config.defined[i] = cm_strdup(string);
64
	config.defined[i + 1] = NULL;
69
	config.defined[i + 1] = NULL;
65
}
70
}
Line 70... Line 75...
70
		if(strcmp(config.defined[i], string) == 0) {
75
		if(strcmp(config.defined[i], string) == 0) {
71
			free(config.defined[i]);
76
			free(config.defined[i]);
72
			for(; config.defined[i] != NULL; i++) {
77
			for(; config.defined[i] != NULL; i++) {
73
				config.defined[i] = config.defined[i + 1];
78
				config.defined[i] = config.defined[i + 1];
74
			}
79
			}
-
 
80
			break;
75
		}
81
		}
76
	}
82
	}
77
}
83
}
78
 
84
 
79
void tw_init_tools(struct tw_tool* tools) {
85
void tw_init_tools(struct tw_tool* tools) {