Watcom: blank()'s cell assigned, not initialised; build every file before stopping

Open Watcom's C takes only constants in an aggregate's initialiser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTPinTtLUajudobBC
This commit is contained in:
Claude committed 2026-11-06 17:24:43 +00:00
1 parent db26d85be0
commit 08fb43aea1
2 files changed
+12 -3

No files matched your search

+7 -1
View File
@@ -61,7 +61,13 @@ struct dmc_vt {
static struct cell blank(const dmc_vt *t)
{
struct cell c = { ' ', -1, t ? t->bg : -1, 0 };
/* (assigned: C89 compilers, Watcom's, take constants only in an
initialiser) */
struct cell c;
c.ch = ' ';
c.fg = -1;
c.bg = t ? t->bg : -1;
c.attr = 0;
return c;
}
+5 -2
View File
@@ -18,17 +18,20 @@ inc="-i=$WATCOM/h -i=$WATCOM/h/nt -i=$root/core/include -i=$root/core/src"
copts="-q -bt=nt -bm -3r -ox -w4 -zq -za99 $inc"
cppopts="-q -bt=nt -bm -3r -ox -w4 -zq -xs $inc -i=$here/src"
# every file compiled, so that one run shows all the errors
objs=""
failed=0
for f in "$root"/core/src/*.c; do
o=$(basename "$f" .c).obj
wcc386 $copts -fo="$o" "$f"
wcc386 $copts -fo="$o" "$f" || failed=1
objs="$objs $o"
done
for f in "$here"/src/*.cpp; do
o=$(basename "$f" .cpp).obj
wpp386 $cppopts -fo="$o" "$f"
wpp386 $cppopts -fo="$o" "$f" || failed=1
objs="$objs $o"
done
[ $failed = 0 ] || exit 1
wrc -q -r -bt=nt -i="$WATCOM/h/nt" -i="$here/src" -i="$here/res" \
-fo=app.res "$here/res/app.rc"