| | @@ -143,14 +143,14 @@ |
| 143 | 143 | change most frequently. |
| 144 | 144 | This means that the entire program must be recompiled frequently, |
| 145 | 145 | leading to a lengthy modify-compile-test cycle and a corresponding |
| 146 | 146 | decrease in programmer productivity. |
| 147 | 147 | <p><li> |
| 148 | | -The C programming language requires that declarations depending upon |
| 148 | +The C programming language requires that declarations depending upon |
| 149 | 149 | each other must occur in a particular order. |
| 150 | 150 | In a program with complex, interwoven data structures, the correct |
| 151 | | -declaration order can become very difficult to determine manually, |
| 151 | +declaration order can become very difficult to determine manually, |
| 152 | 152 | especially when the declarations involved are spread out over several |
| 153 | 153 | files. |
| 154 | 154 | </ol> |
| 155 | 155 | </p> |
| 156 | 156 | |
| | @@ -158,11 +158,11 @@ |
| 158 | 158 | <h3>1.2 The Makeheaders Solution</h3> |
| 159 | 159 | |
| 160 | 160 | <p> |
| 161 | 161 | The makeheaders program is designed to ameliorate the problems associated |
| 162 | 162 | with the traditional C programming model by automatically generating |
| 163 | | -the interface information in the .h files from |
| 163 | +the interface information in the .h files from |
| 164 | 164 | interface information contained in other .h files and |
| 165 | 165 | from implementation information in the .c files. |
| 166 | 166 | When the makeheaders program is run, it scans the source |
| 167 | 167 | files for a project, |
| 168 | 168 | then generates a series of new .h files, one for each .c file. |
| | @@ -195,11 +195,11 @@ |
| 195 | 195 | <p><li> |
| 196 | 196 | The generated .h file contains the minimal set of declarations needed |
| 197 | 197 | by the .c file. |
| 198 | 198 | This means that when something changes, a minimal amount of recompilation |
| 199 | 199 | is required to produce an updated executable. |
| 200 | | -Experience has shown that this gives a dramatic improvement |
| 200 | +Experience has shown that this gives a dramatic improvement |
| 201 | 201 | in programmer productivity by facilitating a rapid modify-compile-test |
| 202 | 202 | cycle during development. |
| 203 | 203 | <p><li> |
| 204 | 204 | The makeheaders program automatically sorts declarations into the |
| 205 | 205 | correct order, completely eliminating the wearisome and error-prone |
| | @@ -237,11 +237,11 @@ |
| 237 | 237 | the declarations will be copied into the generated .h files as |
| 238 | 238 | appropriate. |
| 239 | 239 | But if makeheaders sees that the .h file that it has generated is no |
| 240 | 240 | different from the .h file it generated last time, it doesn't update |
| 241 | 241 | the file. |
| 242 | | -This prevents the corresponding .c files from having to |
| 242 | +This prevents the corresponding .c files from having to |
| 243 | 243 | be needlessly recompiled. |
| 244 | 244 | </p> |
| 245 | 245 | |
| 246 | 246 | <p> |
| 247 | 247 | There are several options to the makeheaders program that can |
| | @@ -299,11 +299,11 @@ |
| 299 | 299 | ``beta.c'' and |
| 300 | 300 | ``gamma.c'' |
| 301 | 301 | but because of the colon on the end of third filename |
| 302 | 302 | it will only generate headers for the first two files. |
| 303 | 303 | Unfortunately, |
| 304 | | -it is not possible to get makeheaders to process any file whose |
| 304 | +it is not possible to get makeheaders to process any file whose |
| 305 | 305 | name contains a colon. |
| 306 | 306 | </p> |
| 307 | 307 | |
| 308 | 308 | <p> |
| 309 | 309 | In a large project, the length of the command line for makeheaders |
| | @@ -337,11 +337,11 @@ |
| 337 | 337 | |
| 338 | 338 | <p> |
| 339 | 339 | Finally, makeheaders also includes a ``-doc'' option. |
| 340 | 340 | This command line option prevents makeheaders from generating any |
| 341 | 341 | headers at all. |
| 342 | | -Instead, makeheaders will write to standard output |
| 342 | +Instead, makeheaders will write to standard output |
| 343 | 343 | information about every definition and declaration that it encounters |
| 344 | 344 | in its scan of source files. |
| 345 | 345 | The information output includes the type of the definition or |
| 346 | 346 | declaration and any comment that preceeds the definition or |
| 347 | 347 | declaration. |
| | @@ -382,11 +382,11 @@ |
| 382 | 382 | |
| 383 | 383 | <p> |
| 384 | 384 | The simpliest way to use makeheaders is to put all definitions in |
| 385 | 385 | one or more .c files and all structure and type declarations in |
| 386 | 386 | separate .h files. |
| 387 | | -The only restriction is that you should take care to chose basenames |
| 387 | +The only restriction is that you should take care to chose basenames |
| 388 | 388 | for your .h files that are different from the basenames for you |
| 389 | 389 | .c files. |
| 390 | 390 | Recall that if your .c file is named (for example) ``alpha.c'' |
| 391 | 391 | makeheaders will attempt to generate a corresponding header file |
| 392 | 392 | named ``alpha.h''. |
| | @@ -459,22 +459,22 @@ |
| 459 | 459 | makeheaders *.[ch] |
| 460 | 460 | </pre> |
| 461 | 461 | |
| 462 | 462 | The makeheaders program will scan all of the .c files and all of the |
| 463 | 463 | manually written .h files and then automatically generate .h files |
| 464 | | -corresponding to all .c files. |
| 464 | +corresponding to all .c files. |
| 465 | 465 | </p> |
| 466 | 466 | |
| 467 | 467 | <p> |
| 468 | 468 | Note that |
| 469 | | -the wildcard expression used in the above example, |
| 469 | +the wildcard expression used in the above example, |
| 470 | 470 | ``<code>*.[ch]</code>'', |
| 471 | 471 | will expand to include all .h files in the current directory, both |
| 472 | 472 | those entered manually be the programmer and others generated automatically |
| 473 | 473 | by a prior run of makeheaders. |
| 474 | 474 | But that is not a problem. |
| 475 | | -The makeheaders program will recognize and ignore any files it |
| 475 | +The makeheaders program will recognize and ignore any files it |
| 476 | 476 | has previously generated that show up on its input list. |
| 477 | 477 | </p> |
| 478 | 478 | |
| 479 | 479 | <a name="H0008"></a> |
| 480 | 480 | <h3>3.2 What Declarations Get Copied</h3> |
| | @@ -530,11 +530,11 @@ |
| 530 | 530 | </p> |
| 531 | 531 | |
| 532 | 532 | <p><li> |
| 533 | 533 | When a structure, union or enumeration declaration or a |
| 534 | 534 | function prototype or a C++ class declaration appears in a |
| 535 | | -manually produced .h file, that declaration is copied into the |
| 535 | +manually produced .h file, that declaration is copied into the |
| 536 | 536 | automatically generated |
| 537 | 537 | .h files of all .c files that use the structure, union, enumeration, |
| 538 | 538 | function or class. |
| 539 | 539 | But declarations that appear in a |
| 540 | 540 | .c file are considered private to that .c file and are not copied into |
| | @@ -610,13 +610,13 @@ |
| 610 | 610 | it were a .h file by enclosing that part of the .c file within: |
| 611 | 611 | <pre> |
| 612 | 612 | #if INTERFACE |
| 613 | 613 | #endif |
| 614 | 614 | </pre> |
| 615 | | -Thus any structure definitions that appear after the |
| 616 | | -``#if INTERFACE'' but before the corresponding |
| 617 | | -``#endif'' are eligable to be copied into the |
| 615 | +Thus any structure definitions that appear after the |
| 616 | +``#if INTERFACE'' but before the corresponding |
| 617 | +``#endif'' are eligable to be copied into the |
| 618 | 618 | automatically generated |
| 619 | 619 | .h files of other .c files. |
| 620 | 620 | </p> |
| 621 | 621 | |
| 622 | 622 | <p> |
| | @@ -728,11 +728,11 @@ |
| 728 | 728 | #endif |
| 729 | 729 | </pre> |
| 730 | 730 | will become part of the exported interface. |
| 731 | 731 | The ``#if EXPORT_INTERFACE'' mechanism can be used in either |
| 732 | 732 | .c or .h files. |
| 733 | | -(The ``#if INTERFACE'' can also be used in both .h and .c files, |
| 733 | +(The ``#if INTERFACE'' can also be used in both .h and .c files, |
| 734 | 734 | but since it's use in a .h file would be redundant, we haven't mentioned |
| 735 | 735 | it before.) |
| 736 | 736 | </p> |
| 737 | 737 | |
| 738 | 738 | <a name="H0011"></a> |
| | @@ -751,11 +751,11 @@ |
| 751 | 751 | Sometimes it is convenient to have makeheaders sort a sequence |
| 752 | 752 | of private declarations into the correct order for us automatically. |
| 753 | 753 | Or, we could have static functions and procedures for which we would like |
| 754 | 754 | makeheaders to generate prototypes, but the arguments to these |
| 755 | 755 | functions and procedures uses private declarations. |
| 756 | | -In both of these cases, we want makeheaders to be aware of the |
| 756 | +In both of these cases, we want makeheaders to be aware of the |
| 757 | 757 | private declarations and copy them into the local header file, |
| 758 | 758 | but we don't want makeheaders to propagate the |
| 759 | 759 | declarations outside of the file in which they are declared. |
| 760 | 760 | </p> |
| 761 | 761 | |
| | @@ -815,11 +815,11 @@ |
| 815 | 815 | </p> |
| 816 | 816 | |
| 817 | 817 | <p> |
| 818 | 818 | Makeheaders augments class definitions by inserting prototypes to |
| 819 | 819 | methods were appropriate. If a method definition begins with one |
| 820 | | -of the special keywords <b>PUBLIC</b>, <b>PROTECTED</b>, or |
| 820 | +of the special keywords <b>PUBLIC</b>, <b>PROTECTED</b>, or |
| 821 | 821 | <b>PRIVATE</b> (in upper-case to distinguish them from the regular |
| 822 | 822 | C++ keywords with the same meaning) then a prototype for that |
| 823 | 823 | method will be inserted into the class definition. If none of |
| 824 | 824 | these keywords appear, then the prototype is not inserted. For |
| 825 | 825 | example, in the following code, the constructor is not explicitly |
| | @@ -874,11 +874,11 @@ |
| 874 | 874 | |
| 875 | 875 | <a name="H0013"></a> |
| 876 | 876 | <h3>3.7 Conditional Compilation</h3> |
| 877 | 877 | |
| 878 | 878 | <p> |
| 879 | | -The makeheaders program understands and tracks the conditional |
| 879 | +The makeheaders program understands and tracks the conditional |
| 880 | 880 | compilation constructs in the source code files it scans. |
| 881 | 881 | Hence, if the following code appears in a source file |
| 882 | 882 | <pre> |
| 883 | 883 | #ifdef UNIX |
| 884 | 884 | # define WORKS_WELL 1 |
| | @@ -1054,11 +1054,11 @@ |
| 1054 | 1054 | |
| 1055 | 1055 | <a name="H0017"></a> |
| 1056 | 1056 | <h2>6.0 Summary And Conclusion</h2> |
| 1057 | 1057 | |
| 1058 | 1058 | <p> |
| 1059 | | -The makeheaders program will automatically generate a minimal header file |
| 1059 | +The makeheaders program will automatically generate a minimal header file |
| 1060 | 1060 | for each of a set of C source and header files, and will |
| 1061 | 1061 | generate a composite header file for the entire source file suite, |
| 1062 | 1062 | for either internal or external use. |
| 1063 | 1063 | It can also be used as the parser in an automated program |
| 1064 | 1064 | documentation system. |
| 1065 | 1065 | |