X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=7a86b9f2a1682d104d64819d9e62dd899b51b953;hb=da883d53c09875635a9be1730371bebdaf9ef262;hp=6ca1f876ac21a2b9e2acfaecbc09c8222acf6117;hpb=4993be4c086b2a81dbf5af5a2c687cf2f0c93d21;p=open-adventure.git diff --git a/misc.c b/misc.c index 6ca1f87..7a86b9f 100644 --- a/misc.c +++ b/misc.c @@ -196,7 +196,7 @@ bool GETIN(FILE *input, (junk > 0); if (GETTXT(true,true,true) <= 0) return true; - RSPEAK(53); + RSPEAK(ARB_53); } } @@ -217,7 +217,7 @@ long YES(FILE *input, vocab_t x, vocab_t y, vocab_t z) RSPEAK(z); return false; } - RSPEAK(185); + RSPEAK(ARB_185); } } @@ -541,7 +541,6 @@ void BUG(long num) bool MAPLIN(FILE *fp) { - long i, val; bool eof; /* Read a line of input, from the specified input source. @@ -577,7 +576,7 @@ bool MAPLIN(FILE *fp) if (!eof) { strncpy(rawbuf, cp, sizeof(rawbuf)-1); linenoiseHistoryAdd(rawbuf); - strncat(rawbuf, "\n", sizeof(rawbuf)-1); + strncat(rawbuf, "\n", sizeof(rawbuf) - strlen(rawbuf) - 1); linenoiseFree(cp); } } @@ -624,8 +623,8 @@ bool MAPLIN(FILE *fp) * and is not changed thereafter unless the routines on this page choose * to do so. */ LNLENG=0; - for (i=1; i<=(long)sizeof(INLINE) && INLINE[i]!=0; i++) { - val=INLINE[i]; + for (long i=1; i<=(long)sizeof(INLINE) && INLINE[i]!=0; i++) { + long val=INLINE[i]; INLINE[i]=ascii_to_advent[val]; if (INLINE[i] != 0) LNLENG=i;