OSDN Git Service

ナミマソソホソィエヨー网、、ホス、タオ。」
[hengband/hengband.git] / src / z-util.h
1 /* File z-util.h */
2
3 #ifndef INCLUDED_Z_UTIL_H
4 #define INCLUDED_Z_UTIL_H
5
6 #include "h-basic.h"
7
8
9 /*
10  * Extremely basic stuff, like global temp and constant variables.
11  * Also, some very useful low level functions, such as "streq()".
12  * All variables and functions in this file are "addressable".
13  */
14
15
16 /**** Available variables ****/
17
18 /* Temporary Vars */
19 extern char char_tmp;
20 extern byte byte_tmp;
21 extern sint sint_tmp;
22 extern uint uint_tmp;
23 extern long long_tmp;
24 extern huge huge_tmp;
25 extern errr errr_tmp;
26
27 /* Temporary Pointers */
28 extern cptr cptr_tmp;
29 extern vptr vptr_tmp;
30
31
32 /* Constant pointers (NULL) */
33 extern cptr cptr_null;
34 extern vptr vptr_null;
35
36
37 /* A bizarre vptr that always points at itself */
38 extern vptr vptr_self;
39
40
41 /* A cptr to the name of the program */
42 extern cptr argv0;
43
44
45 /* Aux functions */
46 extern void (*plog_aux)(cptr);
47 extern void (*quit_aux)(cptr);
48 extern void (*core_aux)(cptr);
49
50
51 /**** Available Functions ****/
52
53 /* Function that does nothing */
54 extern void func_nothing(void);
55
56 /* Functions that return basic "errr" codes */
57 extern errr func_success(void);
58 extern errr func_problem(void);
59 extern errr func_failure(void);
60
61 /* Functions that return bools */
62 extern bool func_true(void);
63 extern bool func_false(void);
64
65
66 /* Test equality, prefix, suffix */
67 extern bool streq(cptr s, cptr t);
68 extern bool prefix(cptr s, cptr t);
69 extern bool suffix(cptr s, cptr t);
70
71
72 /* Print an error message */
73 extern void plog(cptr str);
74
75 /* Exit, with optional message */
76 extern void quit(cptr str);
77
78 /* Dump core, with optional message */
79 extern void core(cptr str);
80
81
82
83 #endif
84