-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmisc.h
77 lines (75 loc) · 2.63 KB
/
misc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <stdio.h>
#include <stdbool.h>
/* b is not needed for POSIX but harmless */
#define READ_MODE "rb"
#define WRITE_MODE "wb"
extern void fSPEAK(long);
#define SPEAK(N) fSPEAK(N)
extern void fPSPEAK(long,long);
#define PSPEAK(MSG,SKIP) fPSPEAK(MSG,SKIP)
extern void fRSPEAK(long);
#define RSPEAK(I) fRSPEAK(I)
extern void fSETPRM(long,long,long);
#define SETPRM(FIRST,P1,P2) fSETPRM(FIRST,P1,P2)
extern bool fGETIN(FILE *,long*,long*,long*,long*);
#define GETIN(input,WORD1,WORD1X,WORD2,WORD2X) fGETIN(input,&WORD1,&WORD1X,&WORD2,&WORD2X)
extern long fYES(FILE *,long,long,long);
#define YES(input,X,Y,Z) fYES(input,X,Y,Z)
extern long fGETNUM(FILE *);
#define GETNUM(K) fGETNUM(K)
extern long fGETTXT(long,long,long);
#define GETTXT(SKIP,ONEWRD,UPPER) fGETTXT(SKIP,ONEWRD,UPPER)
extern long fMAKEWD(long);
#define MAKEWD(LETTRS) fMAKEWD(LETTRS)
extern void fPUTTXT(long,long*,long);
#define PUTTXT(WORD,STATE,CASE) fPUTTXT(WORD,&STATE,CASE)
extern void fSHFTXT(long,long);
#define SHFTXT(FROM,DELTA) fSHFTXT(FROM,DELTA)
extern void fTYPE0();
#define TYPE0() fTYPE0()
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)
extern void fSAVARR(long*,long);
#define SAVARR(ARR,N) fSAVARR(ARR,N)
extern void fSAVWRD(long,long*);
#define SAVWRD(OP,WORD) fSAVWRD(OP,&WORD)
extern long fVOCAB(long,long);
#define VOCAB(ID,INIT) fVOCAB(ID,INIT)
extern void fDSTROY(long);
#define DSTROY(OBJECT) fDSTROY(OBJECT)
extern void fJUGGLE(long);
#define JUGGLE(OBJECT) fJUGGLE(OBJECT)
extern void fMOVE(long,long);
#define MOVE(OBJECT,WHERE) fMOVE(OBJECT,WHERE)
extern long fPUT(long,long,long);
#define PUT(OBJECT,WHERE,PVAL) fPUT(OBJECT,WHERE,PVAL)
extern void fCARRY(long,long);
#define CARRY(OBJECT,WHERE) fCARRY(OBJECT,WHERE)
extern void fDROP(long,long);
#define DROP(OBJECT,WHERE) fDROP(OBJECT,WHERE)
extern long fATDWRF(long);
#define ATDWRF(WHERE) fATDWRF(WHERE)
extern long fSETBIT(long);
#define SETBIT(BIT) fSETBIT(BIT)
extern long fTSTBIT(long,long);
#define TSTBIT(MASK,BIT) fTSTBIT(MASK,BIT)
extern long fRNDVOC(long,long);
#define RNDVOC(CHAR,FORCE) fRNDVOC(CHAR,FORCE)
extern void fBUG(long);
#define BUG(NUM) fBUG(NUM)
extern void fMAPLIN(FILE *);
#define MAPLIN(FIL) fMAPLIN(FIL)
extern void fTYPE();
#define TYPE() fTYPE()
extern void fMPINIT();
#define MPINIT() fMPINIT()
extern void fSAVEIO(long,long,long*);
#define SAVEIO(OP,IN,ARR) fSAVEIO(OP,IN,ARR)
extern void DATIME(long*, long*);
extern long fIABS(long);
#define IABS(N) fIABS(N)
extern long fMOD(long,long);
#define MOD(N,M) fMOD(N,M)
extern void set_seed(long);
extern unsigned long get_next_lcg_value(void);
extern long randrange(long);