aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/docproc.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-30 00:29:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-30 00:29:55 +0000
commit4b924f3a5c9c549c75deed8bdda2cbd82fd7f64b (patch)
tree7dfc507c1a7d14fb61d4fd0c68481e01b4a36ba1 /scripts/basic/docproc.c
parent4ef7d3a2de3df27dde80a64987202f10aebfe925 (diff)
downloadbusybox-w32-4b924f3a5c9c549c75deed8bdda2cbd82fd7f64b.tar.gz
busybox-w32-4b924f3a5c9c549c75deed8bdda2cbd82fd7f64b.tar.bz2
busybox-w32-4b924f3a5c9c549c75deed8bdda2cbd82fd7f64b.zip
whitespace fixes
Diffstat (limited to 'scripts/basic/docproc.c')
-rw-r--r--scripts/basic/docproc.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index a1b761bbd..e178d72d2 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -123,7 +123,7 @@ int symfilecnt = 0;
123void add_new_symbol(struct symfile *sym, char * symname) 123void add_new_symbol(struct symfile *sym, char * symname)
124{ 124{
125 sym->symbollist = 125 sym->symbollist =
126 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 126 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
127 sym->symbollist[sym->symbolcnt++].name = strdup(symname); 127 sym->symbollist[sym->symbolcnt++].name = strdup(symname);
128} 128}
129 129
@@ -182,7 +182,7 @@ void find_export_symbols(char * filename)
182 char *p; 182 char *p;
183 char *e; 183 char *e;
184 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || 184 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) ||
185 ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { 185 ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) {
186 /* Skip EXPORT_SYMBOL{_GPL} */ 186 /* Skip EXPORT_SYMBOL{_GPL} */
187 while (isalnum(*p) || *p == '_') 187 while (isalnum(*p) || *p == '_')
188 p++; 188 p++;
@@ -256,24 +256,24 @@ void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
256void singfunc(char * filename, char * line) 256void singfunc(char * filename, char * line)
257{ 257{
258 char *vec[200]; /* Enough for specific functions */ 258 char *vec[200]; /* Enough for specific functions */
259 int i, idx = 0; 259 int i, idx = 0;
260 int startofsym = 1; 260 int startofsym = 1;
261 vec[idx++] = KERNELDOC; 261 vec[idx++] = KERNELDOC;
262 vec[idx++] = DOCBOOK; 262 vec[idx++] = DOCBOOK;
263 263
264 /* Split line up in individual parameters preceeded by FUNCTION */ 264 /* Split line up in individual parameters preceeded by FUNCTION */
265 for (i=0; line[i]; i++) { 265 for (i=0; line[i]; i++) {
266 if (isspace(line[i])) { 266 if (isspace(line[i])) {
267 line[i] = '\0'; 267 line[i] = '\0';
268 startofsym = 1; 268 startofsym = 1;
269 continue; 269 continue;
270 } 270 }
271 if (startofsym) { 271 if (startofsym) {
272 startofsym = 0; 272 startofsym = 0;
273 vec[idx++] = FUNCTION; 273 vec[idx++] = FUNCTION;
274 vec[idx++] = &line[i]; 274 vec[idx++] = &line[i];
275 } 275 }
276 } 276 }
277 vec[idx++] = filename; 277 vec[idx++] = filename;
278 vec[idx] = NULL; 278 vec[idx] = NULL;
279 exec_kernel_doc(vec); 279 exec_kernel_doc(vec);
@@ -307,14 +307,14 @@ void parse_file(FILE *infile)
307 break; 307 break;
308 case 'D': 308 case 'D':
309 while (*s && !isspace(*s)) s++; 309 while (*s && !isspace(*s)) s++;
310 *s = '\0'; 310 *s = '\0';
311 symbolsonly(line+2); 311 symbolsonly(line+2);
312 break; 312 break;
313 case 'F': 313 case 'F':
314 /* filename */ 314 /* filename */
315 while (*s && !isspace(*s)) s++; 315 while (*s && !isspace(*s)) s++;
316 *s++ = '\0'; 316 *s++ = '\0';
317 /* function names */ 317 /* function names */
318 while (isspace(*s)) 318 while (isspace(*s))
319 s++; 319 s++;
320 singlefunctions(line +2, s); 320 singlefunctions(line +2, s);
@@ -340,11 +340,11 @@ int main(int argc, char **argv)
340 } 340 }
341 /* Open file, exit on error */ 341 /* Open file, exit on error */
342 infile = fopen(argv[2], "r"); 342 infile = fopen(argv[2], "r");
343 if (infile == NULL) { 343 if (infile == NULL) {
344 fprintf(stderr, "docproc: "); 344 fprintf(stderr, "docproc: ");
345 perror(argv[2]); 345 perror(argv[2]);
346 exit(2); 346 exit(2);
347 } 347 }
348 348
349 if (strcmp("doc", argv[1]) == 0) 349 if (strcmp("doc", argv[1]) == 0)
350 { 350 {