diff options
| author | Thien-Thi Nguyen | 2005-05-24 14:30:11 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2005-05-24 14:30:11 +0000 |
| commit | fe8ada6bbbba939c91db978078684aa06c671821 (patch) | |
| tree | da8aee9871bbc2681450cb08e8db67d91b8626e2 | |
| parent | a76842fe8f6e4c0416be8af86e45ee0b0437e00f (diff) | |
| download | emacs-fe8ada6bbbba939c91db978078684aa06c671821.tar.gz emacs-fe8ada6bbbba939c91db978078684aa06c671821.zip | |
(scan_c_file): Comment and auto var name munging; nfc.
| -rw-r--r-- | lib-src/make-docfile.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index d8395ac9a9c..f5311e42416 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -348,27 +348,21 @@ scan_c_file (filename, mode) | |||
| 348 | register int defvarperbufferflag; | 348 | register int defvarperbufferflag; |
| 349 | register int defvarflag; | 349 | register int defvarflag; |
| 350 | int minargs, maxargs; | 350 | int minargs, maxargs; |
| 351 | char *extpos; | 351 | char *extension; |
| 352 | char extension; | 352 | char saved_extension; |
| 353 | 353 | ||
| 354 | #ifdef VMS /* It could be that make-docfile is invoked with comma-separated | 354 | #ifdef VMS /* It could be that make-docfile is invoked by MMS from a |
| 355 | args (that include the comma for crying out loud!), so we | 355 | DESCRIP.MMS file, with comma-separated args. To accomodate, we |
| 356 | munge object file names a bit to accomodate. Insert rant on | 356 | also munge object file names a bit here. Insert rant about |
| 357 | DCL lossage here. NOTE: This cruft should be strictly | 357 | gratuitous MMS incompatibity here. Actually, MMS use of commas |
| 358 | confined to the ttn-vms-21-2-stash branch; build methodology | 358 | is probably directly attributable to DCL limitations. If |
| 359 | for other branches should be improved so that this is not | 359 | anything deserves a rant, that would be DCL. --ttn */ |
| 360 | required. --ttn */ | ||
| 361 | 360 | ||
| 362 | /* Ignore trailing comma. */ | 361 | /* Ignore trailing comma. */ |
| 363 | if (',' == filename[strlen (filename) - 1]) | 362 | if (',' == filename[strlen (filename) - 1]) |
| 364 | filename[strlen (filename) - 1] = '\0'; | 363 | filename[strlen (filename) - 1] = '\0'; |
| 365 | 364 | ||
| 366 | /* Ignore trailing "bj" so that ".obj" is considered as ".o" below. To | 365 | /* Ignore trailing "bj" so that ".obj" is considered as ".o" below. */ |
| 367 | avoid this kludge we would have to convince MMS (make(1)-like tool | ||
| 368 | under VMS) to support VPATH so that a user-specified .c.o rule would | ||
| 369 | work correctly. But MMS is proprietary software so any such convincing | ||
| 370 | involves uncountable layers of bureacracy and suit-swimming, just to | ||
| 371 | talk to programmers who may or may not DTRT in the end. Blech. */ | ||
| 372 | if ('b' == filename[strlen (filename) - 2] && | 366 | if ('b' == filename[strlen (filename) - 2] && |
| 373 | 'j' == filename[strlen (filename) - 1]) | 367 | 'j' == filename[strlen (filename) - 1]) |
| 374 | filename[strlen (filename) - 2] = '\0'; | 368 | filename[strlen (filename) - 2] = '\0'; |
| @@ -379,11 +373,11 @@ scan_c_file (filename, mode) | |||
| 379 | 373 | ||
| 380 | #endif /* VMS */ | 374 | #endif /* VMS */ |
| 381 | 375 | ||
| 382 | extpos = filename + strlen (filename) - 1; | 376 | extension = filename + strlen (filename) - 1; |
| 383 | extension = *extpos; | 377 | saved_extension = *extension; |
| 384 | 378 | ||
| 385 | if (extension == 'o') | 379 | if (*extension == 'o') |
| 386 | *extpos = 'c'; | 380 | *extension = 'c'; |
| 387 | 381 | ||
| 388 | infile = fopen (filename, mode); | 382 | infile = fopen (filename, mode); |
| 389 | 383 | ||
| @@ -395,7 +389,7 @@ scan_c_file (filename, mode) | |||
| 395 | } | 389 | } |
| 396 | 390 | ||
| 397 | /* Reset extension to be able to detect duplicate files. */ | 391 | /* Reset extension to be able to detect duplicate files. */ |
| 398 | *extpos = extension; | 392 | filename[strlen (filename) - 1] = saved_extension; |
| 399 | 393 | ||
| 400 | c = '\n'; | 394 | c = '\n'; |
| 401 | while (!feof (infile)) | 395 | while (!feof (infile)) |