Format source code.

This commit is contained in:
Jordan Bancino 2023-04-27 20:05:08 +00:00
parent a00ded6d06
commit 71fa96d10d
2 changed files with 8 additions and 3 deletions

View file

@ -566,11 +566,13 @@ HeaderParse(Stream * stream, HeaderExpr * expr)
} }
else if (c == '[') else if (c == '[')
{ {
/* Looks like we have an array. Slurp all the dimensions */ /* Looks like we have an array. Slurp all the
* dimensions */
int block = 1; int block = 1;
int i = wordLen; int i = wordLen;
expr->data.global.name[i] = '['; expr->data.global.name[i] = '[';
i++; i++;
while (1) while (1)
@ -596,11 +598,13 @@ HeaderParse(Stream * stream, HeaderExpr * expr)
if (c == ';') if (c == ';')
{ {
expr->data.global.name[i] = '\0'; expr->data.global.name[i] = '\0';
break; break;
} }
else else
{ {
expr->data.global.name[i] = c; expr->data.global.name[i] = c;
i++; i++;
} }
} }

View file

@ -309,6 +309,7 @@ main(int argc, char **argv)
{ {
global = Malloc(sizeof(DocGlobal)); global = Malloc(sizeof(DocGlobal));
global->global = expr.data.global; global->global = expr.data.global;
strncpy(global->docs, comment, sizeof(global->docs)); strncpy(global->docs, comment, sizeof(global->docs));
ArrayAdd(globals, global); ArrayAdd(globals, global);
isDocumented = 0; isDocumented = 0;