From: Eric S. Raymond Date: Tue, 6 Jun 2017 22:22:24 +0000 (-0400) Subject: Semantic types. X-Git-Tag: 1.1~598 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4e1ab63322b96238c5e5f7e7ef79305268aae4c0;p=open-adventure.git Semantic types. --- diff --git a/advent.h b/advent.h index 9dc6202..13ad1e7 100644 --- a/advent.h +++ b/advent.h @@ -36,11 +36,11 @@ extern long YES(FILE *,vocab_t,vocab_t,vocab_t); extern long GETTXT(bool,bool,bool); extern token_t MAKEWD(long); -extern void fPUTTXT(long,long*,long); +extern void fPUTTXT(token_t,long*,long); #define PUTTXT(WORD,STATE,CASE) fPUTTXT(WORD,&STATE,CASE) extern void SHFTXT(long,long); -extern void TYPE0(); +extern void TYPE0(void); extern void fSAVWDS(long*,long*,long*,long*,long*,long*,long*); #define SAVWDS(W1,W2,W3,W4,W5,W6,W7) fSAVWDS(&W1,&W2,&W3,&W4,&W5,&W6,&W7) @@ -62,8 +62,8 @@ extern bool TSTBIT(long,int); extern long RNDVOC(long,long); extern void BUG(long); extern void MAPLIN(FILE *); -extern void TYPE(); -extern void MPINIT(); +extern void TYPE(void); +extern void MPINIT(void); extern void fSAVEIO(long,long,long*); #define SAVEIO(OP,IN,ARR) fSAVEIO(OP,IN,ARR) diff --git a/misc.c b/misc.c index 7bf07df..86d4626 100644 --- a/misc.c +++ b/misc.c @@ -272,7 +272,7 @@ long GETTXT(bool SKIP,bool ONEWRD, bool UPPER) { return(TEXT); } -long MAKEWD(long LETTRS) { +token_t MAKEWD(long LETTRS) { long I, L, WORD; /* Combine five uppercase letters (represented by pairs of decimal digits @@ -296,7 +296,7 @@ long I, L, WORD; #define STATE (*sTATE) -void fPUTTXT(long WORD, long *sTATE, long CASE) { +void fPUTTXT(token_t WORD, long *sTATE, long CASE) { long ALPH1, ALPH2, BYTE, DIV, I, W; /* Unpack the 30-bit value in word to obtain up to 5 integer-encoded chars,