Mercurial > hg > toybox
comparison www/code.html @ 213:db91356e3c43
More random unfinished code documentation.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 20 Dec 2007 06:29:59 -0600 |
parents | a71c502a028c |
children | ca48a878255d |
comparison
equal
deleted
inserted
replaced
212:6e06d46e9e53 | 213:db91356e3c43 |
---|---|
177 have config symbols they're options (symbols with an underscore and suffix) | 177 have config symbols they're options (symbols with an underscore and suffix) |
178 to the NEWTOY() name. (See toys/toylist.h)</p> | 178 to the NEWTOY() name. (See toys/toylist.h)</p> |
179 | 179 |
180 <h3>toys/toylist.h</h3> | 180 <h3>toys/toylist.h</h3> |
181 <p>The first half of this file prototypes all the structures to hold | 181 <p>The first half of this file prototypes all the structures to hold |
182 global variables for each command, and puts them in toy_union.</p> | 182 global variables for each command, and puts them in toy_union. These |
183 | 183 prototypes are only included if the macro NEWTOY isn't defined (in which |
184 <p>The second half of this file lists all the commands (in alphabetical | 184 case NEWTOY is defined to a default value that produces function |
185 order), along with their command line arguments and install location. This | 185 prototypes).</p> |
186 | |
187 <p>The second half of this file lists all the commands in alphabetical | |
188 order, along with their command line arguments and install location. | |
189 Each command has an appropriate configuration guard so only the commands that | |
190 are enabled wind up in the list.</p> | |
191 | |
192 <p>The first time this header is #included, it defines structures and | |
193 produces function prototypes for the commands in the toys directory.</p> | |
194 | |
195 | |
196 <p>The first time it's included, it defines structures and produces function | |
197 prototypes. | |
198 This | |
186 is used to initialize toy_list in main.c, and later in that file to initialize | 199 is used to initialize toy_list in main.c, and later in that file to initialize |
187 NEED_OPTIONS (to figure out whether the command like parsing logic is needed), | 200 NEED_OPTIONS (to figure out whether the command like parsing logic is needed), |
188 and to put the help entries in the right order in toys/help.c.</p> | 201 and to put the help entries in the right order in toys/help.c.</p> |
189 | 202 |
190 <h3>toys/help.h</h3> | 203 <h3>toys/help.h</h3> |