Changeset 168 for trunk/src/makedep/main.c
- Timestamp:
- Oct 13, 2004, 4:06:32 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/makedep/main.c
r164 r168 158 158 char **undeflist = NULL; 159 159 int numundefs = 0, i; 160 register char offset; /* mozilla */ 160 161 161 162 ProgramName = argv[0]; … … 232 233 break; 233 234 case 'D': 235 offset = 2; /* mozilla */ 236 Imaginary Buffer Line 234 237 if (argv[0][2] == '\0') { 235 238 argv++; 236 239 argc--; 237 } 238 for (p=argv[0] + 2; *p ; p++) 240 offset = 0; 241 } 242 /* offset +1 here since first def letter 243 * cannot be `=` 244 */ 245 for (p = argv[0] + offset + 1; *p; p++) /* mozilla */ 239 246 if (*p == '=') { 240 247 *p = ' '; 241 248 break; 242 249 } 243 define(argv[0] + 2, &maininclist);250 define(argv[0] + offset, &maininclist); /* mozilla */ 244 251 break; 245 252 case 'I': … … 260 267 undeflist = realloc(undeflist, 261 268 numundefs * sizeof(char *)); 269 offset = 2; /* mozilla */ 262 270 if (argv[0][2] == '\0') { 263 271 argv++; 264 272 argc--; 265 } 266 undeflist[numundefs - 1] = argv[0] + 2; 273 offset = 0; /* mozilla */ 274 } 275 undeflist[numundefs - 1] = argv[0] + offset; /* mozilla */ 267 276 break; 268 277 case 'Y': … … 510 519 * eliminate \r chars from file 511 520 */ 512 static int 521 static int 513 522 elim_cr(char *buf, int sz) 514 523 { … … 634 643 whitespace = TRUE; 635 644 } 636 645 637 646 if (*p == '/' && (p+1) < eof && *(p+1) == '*') { 638 647 /* Consume C comments */ … … 662 671 } 663 672 else if (*p == '?' && (p+3) < eof && 664 *(p+1) == '?' && 673 *(p+1) == '?' && 665 674 *(p+2) == '/' && 666 675 *(p+3) == '\n') { … … 698 707 *(p++) = '\0'; 699 708 /* punt lines with just # (yacc generated) */ 700 for (cp = bol+1; 709 for (cp = bol+1; 701 710 *cp && (*cp == ' ' || *cp == '\t'); cp++); 702 711 if (*cp) goto done;
Note:
See TracChangeset
for help on using the changeset viewer.