1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-04 18:34:14 +00:00

Remove extra semicolons, convert #define x() {...} to do {...} while (0) style (#444)

* Remove extra semicolons, convert #define x() {...} to do {...} while (0) style

* Fix missing brace in INIT-specific definition of init_kbd_startup
This commit is contained in:
Nick Briggs
2022-10-05 09:07:17 -07:00
committed by GitHub
parent f5b17b0e63
commit cdffa541ef
57 changed files with 413 additions and 400 deletions

View File

@@ -69,7 +69,7 @@ extern int Dummy_errno;
*/
#define SetupMatch(tname, pname, text, pext, tver) \
{ \
do { \
char *pp; \
\
separate_version(tname, tver, 0); \
@@ -87,10 +87,10 @@ extern int Dummy_errno;
*pp = '\0'; \
strcpy(pext, pp + 1); \
} \
}
} while (0)
#define MatchP(target, name, ver, matchtag, unmatchtag) \
{ \
do { \
char tname[MAXNAMLEN], text[MAXNAMLEN], tver[VERSIONLEN]; \
char pname[MAXNAMLEN], pext[MAXNAMLEN]; \
\
@@ -105,10 +105,10 @@ extern int Dummy_errno;
goto matchtag; /* NOLINT(bugprone-macro-parentheses) */ \
else \
goto unmatchtag; /* NOLINT(bugprone-macro-parentheses) */ \
}
} while (0)
#define MatchP_Case(target, name, ver, matchtag, unmatchtag) \
{ \
do { \
char tname[MAXNAMLEN], text[MAXNAMLEN], tver[VERSIONLEN]; \
char pname[MAXNAMLEN], pext[MAXNAMLEN]; \
\
@@ -121,7 +121,7 @@ extern int Dummy_errno;
goto matchtag; /* NOLINT(bugprone-macro-parentheses) */ \
else \
goto unmatchtag; /* NOLINT(bugprone-macro-parentheses) */ \
}
} while (0)
/*
* Name: match_pattern
@@ -232,7 +232,7 @@ int MAXFINFO;
#define FINFOARRAYRSIZE 16
#define AllocFinfo(fp) \
{ \
do { \
if (FreeFinfoList != (FINFO *)NULL) { \
(fp) = FreeFinfoList; \
FreeFinfoList = (fp)->next; \
@@ -242,15 +242,15 @@ int MAXFINFO;
free(fp); \
(fp) = (FINFO *)NULL; \
} \
}
} while (0)
#define FreeFinfo(fp) \
{ \
do { \
FINFO *lastp; \
for (lastp = fp; lastp->next != (FINFO *)NULL; lastp = lastp->next) {} \
lastp->next = FreeFinfoList; \
FreeFinfoList = fp; \
}
} while (0)
/*