projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More boolification.
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index 626bd40d926b8f5b3a0716a366539b80332f6500..e7608301c6086e6c847217fb214e5d55f6d4fd4f 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-4,9
+4,6
@@
#include "misc.h"
#include "funcs.h"
#include "misc.h"
#include "funcs.h"
-#define TRUE (0==0)
-#define FALSE (0!=0)
-
/* hack to ignore GCC Unused Result */
#define IGNORE(r) do{if(r){}}while(0)
/* hack to ignore GCC Unused Result */
#define IGNORE(r) do{if(r){}}while(0)
@@
-106,7
+103,7
@@
L380: SHFTXT(LNPOSN+2,-2);
goto L32;
L40: if(BLANK)TYPE0();
goto L32;
L40: if(BLANK)TYPE0();
- BLANK=
FALSE
;
+ BLANK=
false
;
TYPE();
K=L+1;
if(LINES[K] >= 0) goto L10;
TYPE();
K=L+1;
if(LINES[K] >= 0) goto L10;
@@
-185,17
+182,17
@@
long JUNK;
L10: if(BLKLIN)TYPE0();
L10: if(BLKLIN)TYPE0();
- MAPLIN(
FALSE
);
- WORD1=GETTXT(
TRUE,TRUE,TRUE
,0);
+ MAPLIN(
false
);
+ WORD1=GETTXT(
true,true,true
,0);
if(BLKLIN && WORD1 < 0) goto L10;
if(BLKLIN && WORD1 < 0) goto L10;
- WORD1X=GETTXT(
FALSE,TRUE,TRUE
,0);
-L12: JUNK=GETTXT(
FALSE,TRUE,TRUE
,0);
+ WORD1X=GETTXT(
false,true,true
,0);
+L12: JUNK=GETTXT(
false,true,true
,0);
if(JUNK > 0) goto L12;
if(JUNK > 0) goto L12;
- WORD2=GETTXT(
TRUE,TRUE,TRUE
,0);
- WORD2X=GETTXT(
FALSE,TRUE,TRUE
,0);
-L22: JUNK=GETTXT(
FALSE,TRUE,TRUE
,0);
+ WORD2=GETTXT(
true,true,true
,0);
+ WORD2X=GETTXT(
false,true,true
,0);
+L22: JUNK=GETTXT(
false,true,true
,0);
if(JUNK > 0) goto L22;
if(JUNK > 0) goto L22;
- if(GETTXT(
TRUE,TRUE,TRUE
,0) <= 0)return;
+ if(GETTXT(
true,true,true
,0) <= 0)return;
RSPEAK(53);
goto L10;
}
RSPEAK(53);
goto L10;
}
@@
-221,10
+218,10
@@
L1: RSPEAK(X);
if(REPLY == MAKEWD(1415) || REPLY == MAKEWD(14)) goto L20;
RSPEAK(185);
goto L1;
if(REPLY == MAKEWD(1415) || REPLY == MAKEWD(14)) goto L20;
RSPEAK(185);
goto L1;
-L10: YES=
TRUE
;
+L10: YES=
true
;
RSPEAK(Y);
return(YES);
RSPEAK(Y);
return(YES);
-L20: YES=
FALSE
;
+L20: YES=
false
;
RSPEAK(Z);
return(YES);
}
RSPEAK(Z);
return(YES);
}
@@
-520,7
+517,7
@@
L10: STATE=OP;
L13: CKSUM=BUF[0];
return;
L13: CKSUM=BUF[0];
return;
-L15: SAVEIO(1,
TRUE
,BUF);
+L15: SAVEIO(1,
true
,BUF);
HASH=MOD(1234L*5678L-BUF[0],1048576L);
goto L13;
HASH=MOD(1234L*5678L-BUF[0],1048576L);
goto L13;
@@
-528,7
+525,7
@@
L30: if(N == 250)SAVEIO(1,STATE > 0,BUF);
N=MOD(N,250)+1;
if(STATE > 0) goto L32;
N--; BUF[N]=CKSUM; N++;
N=MOD(N,250)+1;
if(STATE > 0) goto L32;
N--; BUF[N]=CKSUM; N++;
- SAVEIO(1,
FALSE
,BUF);
+ SAVEIO(1,
false
,BUF);
L32: N--; WORD=BUF[N]-CKSUM; N++;
SAVEIO(-1,STATE > 0,BUF);
STATE=0;
L32: N--; WORD=BUF[N]-CKSUM; N++;
SAVEIO(-1,STATE > 0,BUF);
STATE=0;
@@
-846,7
+843,7
@@
void fBUG(NUM)long NUM; {
printf("Fatal error %ld. See source code for interpretation.\n",
NUM);
printf("Fatal error %ld. See source code for interpretation.\n",
NUM);
- exit(
FALSE
);
+ exit(
0
);
}
}
@@
-898,12
+895,8
@@
long I, VAL; static FILE *OPENED = NULL;
goto L20;
L15: if(!OPENED){
goto L20;
L15: if(!OPENED){
-#ifdef AMIGA
- OPENED=fopen("ram:adventure.text","r" /* NOT binary */);
- if(!OPENED)
-#endif
OPENED=fopen("adventure.text","r" /* NOT binary */);
OPENED=fopen("adventure.text","r" /* NOT binary */);
- if(!OPENED){printf("Can't read adventure.text!\n"); exit(
FALSE
);}
+ if(!OPENED){printf("Can't read adventure.text!\n"); exit(
0
);}
}
IGNORE(fgets(INLINE+1,100,OPENED));
}
IGNORE(fgets(INLINE+1,100,OPENED));