Auto-format with clang-format

This commit is contained in:
Val Snyder 2025-03-26 19:39:55 -04:00
parent 8d485b9bfd
commit 272e84eaa8
No known key found for this signature in database
GPG key ID: 3449E631914956D0
4 changed files with 10 additions and 6 deletions

View file

@ -1054,7 +1054,8 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
break;
buff = buffer;
for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++);
for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++)
;
buff += i;
line++;
if (strlen(buff) <= 2 || buff[0] == '#')
@ -1075,9 +1076,11 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
}
name = buff;
*pt++ = 0;
for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++);
for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++)
;
pt += i;
for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--);
for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--)
;
if (!i) {
if (verbose)
fprintf(stderr, "ERROR: Missing argument for option at %s:%d\n", cfgfile, line);

View file

@ -394,7 +394,8 @@ struct cl_cvd *cl_cvdhead(const char *file)
if ((pt = strpbrk(head, "\n\r")))
*pt = 0;
for (i = bread - 1; i > 0 && (head[i] == ' ' || head[i] == '\n' || head[i] == '\r'); head[i] = 0, i--);
for (i = bread - 1; i > 0 && (head[i] == ' ' || head[i] == '\n' || head[i] == '\r'); head[i] = 0, i--)
;
return cl_cvdparse(head);
}