summaryrefslogtreecommitdiff
path: root/command_line/CmdLine/Src/Envir/CLIO.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-11 23:26:04 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-11 23:26:04 +0000
commit54bb1363a26b6a52cf1a8ecf1f16f76e9920956f (patch)
tree53644f3d0a9b24a10275ba723f6e7e43aee00ec9 /command_line/CmdLine/Src/Envir/CLIO.c
parent0bec4f557a96e1a40437cf5af20cc78a5eec8a63 (diff)
downloadMWCC-54bb1363a26b6a52cf1a8ecf1f16f76e9920956f.tar.gz
MWCC-54bb1363a26b6a52cf1a8ecf1f16f76e9920956f.zip
get it to compile with clang
Diffstat (limited to 'command_line/CmdLine/Src/Envir/CLIO.c')
-rw-r--r--command_line/CmdLine/Src/Envir/CLIO.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/command_line/CmdLine/Src/Envir/CLIO.c b/command_line/CmdLine/Src/Envir/CLIO.c
index 0c07eaf..1d6eaad 100644
--- a/command_line/CmdLine/Src/Envir/CLIO.c
+++ b/command_line/CmdLine/Src/Envir/CLIO.c
@@ -258,7 +258,7 @@ typedef struct {
} UnkCLIOStruct;
// unknown names for these inlines
-inline void appendText(UnkCLIOStruct *f, const char *str) {
+CW_INLINE void appendText(UnkCLIOStruct *f, const char *str) {
int len = strlen(str);
if (f->pos + len >= f->maxlen) {
@@ -278,7 +278,7 @@ inline void appendText(UnkCLIOStruct *f, const char *str) {
f->pos += len;
f->col += len;
}
-inline void appendChar(UnkCLIOStruct *f, char c) {
+CW_INLINE void appendChar(UnkCLIOStruct *f, char c) {
if (f->pos >= f->maxlen) {
f->maxlen *= 2;
if (f->original) {
@@ -301,7 +301,7 @@ static void StartLine(UnkCLIOStruct *f) {
appendText(f, f->newline);
}
-inline void newLine(UnkCLIOStruct *f) {
+CW_INLINE void newLine(UnkCLIOStruct *f) {
if (f->newline)
appendChar(f, '\n');
else
@@ -424,14 +424,12 @@ void CLPrintDispatch(int unk, SInt16 msgtype, const char *message) {
const char *ptr;
const char *nptr;
- if (optsCmdLine.stderr2stdout == 1 || msgtype == Msg_Note || msgtype == Msg_Status) {
+ if (optsCmdLine.stderr2stdout == 1 || msgtype == Msg_Note || msgtype == Msg_Status)
out = stdout;
- } else if (msgtype == Msg_Warning || msgtype == Msg_Error || msgtype == Msg_Alert) {
+ else if (msgtype == Msg_Warning || msgtype == Msg_Error || msgtype == Msg_Alert)
out = stderr;
- } else {
-#line 847
- OPTION_ASSERT(0);
- }
+ else
+ OS_ASSERT(847, 0);
if (!printedAnything && !ioPiping) {
printedAnything = 1;