aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/docproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/docproc.c')
-rw-r--r--scripts/docproc.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/scripts/docproc.c b/scripts/docproc.c
index 2b69eaf5b646..e267e621431a 100644
--- a/scripts/docproc.c
+++ b/scripts/docproc.c
@@ -154,7 +154,7 @@ int symfilecnt = 0;
154static void add_new_symbol(struct symfile *sym, char * symname) 154static void add_new_symbol(struct symfile *sym, char * symname)
155{ 155{
156 sym->symbollist = 156 sym->symbollist =
157 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 157 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
158 sym->symbollist[sym->symbolcnt++].name = strdup(symname); 158 sym->symbollist[sym->symbolcnt++].name = strdup(symname);
159} 159}
160 160
@@ -215,7 +215,7 @@ static void find_export_symbols(char * filename)
215 char *p; 215 char *p;
216 char *e; 216 char *e;
217 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || 217 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) ||
218 ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { 218 ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) {
219 /* Skip EXPORT_SYMBOL{_GPL} */ 219 /* Skip EXPORT_SYMBOL{_GPL} */
220 while (isalnum(*p) || *p == '_') 220 while (isalnum(*p) || *p == '_')
221 p++; 221 p++;
@@ -291,28 +291,28 @@ static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
291static void singfunc(char * filename, char * line) 291static void singfunc(char * filename, char * line)
292{ 292{
293 char *vec[200]; /* Enough for specific functions */ 293 char *vec[200]; /* Enough for specific functions */
294 int i, idx = 0; 294 int i, idx = 0;
295 int startofsym = 1; 295 int startofsym = 1;
296 vec[idx++] = KERNELDOC; 296 vec[idx++] = KERNELDOC;
297 vec[idx++] = DOCBOOK; 297 vec[idx++] = DOCBOOK;
298 vec[idx++] = SHOWNOTFOUND; 298 vec[idx++] = SHOWNOTFOUND;
299 299
300 /* Split line up in individual parameters preceded by FUNCTION */ 300 /* Split line up in individual parameters preceded by FUNCTION */
301 for (i=0; line[i]; i++) { 301 for (i=0; line[i]; i++) {
302 if (isspace(line[i])) { 302 if (isspace(line[i])) {
303 line[i] = '\0'; 303 line[i] = '\0';
304 startofsym = 1; 304 startofsym = 1;
305 continue; 305 continue;
306 } 306 }
307 if (startofsym) { 307 if (startofsym) {
308 startofsym = 0; 308 startofsym = 0;
309 vec[idx++] = FUNCTION; 309 vec[idx++] = FUNCTION;
310 vec[idx++] = &line[i]; 310 vec[idx++] = &line[i];
311 } 311 }
312 } 312 }
313 for (i = 0; i < idx; i++) { 313 for (i = 0; i < idx; i++) {
314 if (strcmp(vec[i], FUNCTION)) 314 if (strcmp(vec[i], FUNCTION))
315 continue; 315 continue;
316 consume_symbol(vec[i + 1]); 316 consume_symbol(vec[i + 1]);
317 } 317 }
318 vec[idx++] = filename; 318 vec[idx++] = filename;
@@ -460,14 +460,14 @@ static void parse_file(FILE *infile)
460 break; 460 break;
461 case 'D': 461 case 'D':
462 while (*s && !isspace(*s)) s++; 462 while (*s && !isspace(*s)) s++;
463 *s = '\0'; 463 *s = '\0';
464 symbolsonly(line+2); 464 symbolsonly(line+2);
465 break; 465 break;
466 case 'F': 466 case 'F':
467 /* filename */ 467 /* filename */
468 while (*s && !isspace(*s)) s++; 468 while (*s && !isspace(*s)) s++;
469 *s++ = '\0'; 469 *s++ = '\0';
470 /* function names */ 470 /* function names */
471 while (isspace(*s)) 471 while (isspace(*s))
472 s++; 472 s++;
473 singlefunctions(line +2, s); 473 singlefunctions(line +2, s);
@@ -515,11 +515,11 @@ int main(int argc, char *argv[])
515 } 515 }
516 /* Open file, exit on error */ 516 /* Open file, exit on error */
517 infile = fopen(argv[2], "r"); 517 infile = fopen(argv[2], "r");
518 if (infile == NULL) { 518 if (infile == NULL) {
519 fprintf(stderr, "docproc: "); 519 fprintf(stderr, "docproc: ");
520 perror(argv[2]); 520 perror(argv[2]);
521 exit(2); 521 exit(2);
522 } 522 }
523 523
524 if (strcmp("doc", argv[1]) == 0) { 524 if (strcmp("doc", argv[1]) == 0) {
525 /* Need to do this in two passes. 525 /* Need to do this in two passes.