aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /scripts/basic
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
Diffstat (limited to 'scripts/basic')
-rw-r--r--scripts/basic/fixdep.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 811d48b78..6d61044c4 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -225,32 +225,36 @@ void use_config(char *m, int slen)
225void parse_config_file(char *map, size_t len) 225void parse_config_file(char *map, size_t len)
226{ 226{
227 /* modified for bbox */ 227 /* modified for bbox */
228 char *end_4 = map + len - 4; /* 4 == length of "USE_" */ 228 char *end_3 = map + len - 3; /* 3 == length of "IF_" */
229 char *end_7 = map + len - 7; 229 char *end_7 = map + len - 7;
230 char *p = map; 230 char *p = map;
231 char *q; 231 char *q;
232 int off; 232 int off;
233 233
234 for (; p < end_4; p++) { 234 for (; p <= end_3; p++) {
235 /* Find next identifier's beginning */
236 if (!(isalnum(*p) || *p == '_'))
237 continue;
238
239 /* Check it */
235 if (p < end_7 && p[6] == '_') { 240 if (p < end_7 && p[6] == '_') {
236 if (!memcmp(p, "CONFIG", 6)) goto conf7; 241 if (!memcmp(p, "CONFIG", 6)) goto conf7;
237 if (!memcmp(p, "ENABLE", 6)) goto conf7; 242 if (!memcmp(p, "ENABLE", 6)) goto conf7;
243 if (!memcmp(p, "IF_NOT", 6)) goto conf7;
238 } 244 }
239 /* We have at least 5 chars: for() has 245 /* we have at least 3 chars because of p <= end_3 */
240 * "p < end-4", not "p <= end-4" 246 /*if (!memcmp(p, "IF_", 3)) goto conf3;*/
241 * therefore we don't need to check p <= end-5 here */ 247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') goto conf3;
242 if (p[4] == '_') 248
243 if (!memcmp(p, "SKIP", 4)) goto conf5; 249 /* This identifier is not interesting, skip it */
244 /* Ehhh, gcc is too stupid to just compare it as 32bit int */ 250 while (p <= end_3 && (isalnum(*p) || *p == '_'))
245 if (p[0] == 'U') 251 p++;
246 if (!memcmp(p, "USE_", 4)) goto conf4;
247 continue; 252 continue;
248 253
249 conf4: off = 4; 254 conf3: off = 3;
250 conf5: off = 5;
251 conf7: off = 7; 255 conf7: off = 7;
252 p += off; 256 p += off;
253 for (q = p; q < end_4+4; q++) { 257 for (q = p; q < end_3+3; q++) {
254 if (!(isalnum(*q) || *q == '_')) 258 if (!(isalnum(*q) || *q == '_'))
255 break; 259 break;
256 } 260 }