Skip to content
This repository has been archived by the owner on Dec 29, 2017. It is now read-only.

Commit

Permalink
docproc: reduce unnecessary indentation
Browse files Browse the repository at this point in the history
Improves clarity. No functional changes.

Signed-off-by: Jani Nikula <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
jnikula authored and Jonathan Corbet committed May 14, 2016
1 parent 568fb2d commit 868fb19
Showing 1 changed file with 47 additions and 46 deletions.
93 changes: 47 additions & 46 deletions scripts/docproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,52 +445,53 @@ static void parse_file(FILE *infile)
char line[MAXLINESZ];
char * s;
while (fgets(line, MAXLINESZ, infile)) {
if (line[0] == '!') {
s = line + 2;
switch (line[1]) {
case 'E':
while (*s && !isspace(*s)) s++;
*s = '\0';
externalfunctions(line+2);
break;
case 'I':
while (*s && !isspace(*s)) s++;
*s = '\0';
internalfunctions(line+2);
break;
case 'D':
while (*s && !isspace(*s)) s++;
*s = '\0';
symbolsonly(line+2);
break;
case 'F':
/* filename */
while (*s && !isspace(*s)) s++;
*s++ = '\0';
/* function names */
while (isspace(*s))
s++;
singlefunctions(line +2, s);
break;
case 'P':
/* filename */
while (*s && !isspace(*s)) s++;
*s++ = '\0';
/* DOC: section name */
while (isspace(*s))
s++;
docsection(line + 2, s);
break;
case 'C':
while (*s && !isspace(*s)) s++;
*s = '\0';
if (findall)
findall(line+2);
break;
default:
defaultline(line);
}
} else {
if (line[0] != '!') {
defaultline(line);
continue;
}

s = line + 2;
switch (line[1]) {
case 'E':
while (*s && !isspace(*s)) s++;
*s = '\0';
externalfunctions(line+2);
break;
case 'I':
while (*s && !isspace(*s)) s++;
*s = '\0';
internalfunctions(line+2);
break;
case 'D':
while (*s && !isspace(*s)) s++;
*s = '\0';
symbolsonly(line+2);
break;
case 'F':
/* filename */
while (*s && !isspace(*s)) s++;
*s++ = '\0';
/* function names */
while (isspace(*s))
s++;
singlefunctions(line +2, s);
break;
case 'P':
/* filename */
while (*s && !isspace(*s)) s++;
*s++ = '\0';
/* DOC: section name */
while (isspace(*s))
s++;
docsection(line + 2, s);
break;
case 'C':
while (*s && !isspace(*s)) s++;
*s = '\0';
if (findall)
findall(line+2);
break;
default:
defaultline(line);
}
}
Expand Down

0 comments on commit 868fb19

Please sign in to comment.