11 #ifndef INCLUDED_Z_VIRT_H
12 #define INCLUDED_Z_VIRT_H
51 ((huge)((N)*(sizeof(T))))
59 #define C_DIFF(P1,P2,N,T) \
60 (memcmp((char*)(P1),(char*)(P2),C_SIZE(N,T)))
63 #define DIFF(P1,P2,T) \
64 (memcmp((char*)(P1),(char*)(P2),SIZE(T)))
68 #define C_BSET(P,V,N,T) \
69 (T*)(memset((char*)(P),(V),C_SIZE(N,T)))
73 (T*)(memset((char*)(P),(V),SIZE(T)))
77 #define C_WIPE(P,N,T) \
78 (T*)(memset((char*)(P),0,C_SIZE(N,T)))
82 (T*)(memset((char*)(P),0,SIZE(T)))
86 #define C_COPY(P1,P2,N,T) \
87 (T*)(memcpy((char*)(P1),(char*)(P2),C_SIZE(N,T)))
90 #define COPY(P1,P2,T) \
91 (T*)(memcpy((char*)(P1),(char*)(P2),SIZE(T)))
95 #define C_FREE(P,N,T) \
96 (T*)(rnfree(P,C_SIZE(N,T)))
100 (T*)(rnfree(P,SIZE(T)))
104 #define C_RNEW(N,T) \
105 ((T*)(ralloc(C_SIZE(N,T))))
109 ((T*)(ralloc(SIZE(T))))
113 #define C_ZNEW(N,T) \
114 ((T*)(C_WIPE(C_RNEW(N,T),N,T)))
118 ((T*)(WIPE(RNEW(T),T)))
122 #define C_MAKE(P,N,T) \
131 #define C_KILL(P,N,T) \
const char * cptr
文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings)
Definition: h-type.h:46
void * vptr
void型ポインタ定義 / A standard pointer (to "void" because ANSI C says so)
Definition: h-type.h:45
errr string_free(cptr str)
Definition: z-virt.c:170
変愚時追加された基本事項のヘッダーファイル / The most basic "include" file.
unsigned long huge
Definition: h-type.h:85
int errr
エラーコードの定義 / Error codes for function return values
Definition: h-type.h:56
vptr rnfree(vptr p, huge len)
Definition: z-virt.c:36
vptr(* ralloc_aux)(huge)
Definition: z-virt.c:95
cptr string_make(cptr str)
Definition: z-virt.c:143
vptr(* rpanic_aux)(huge)
Definition: z-virt.c:71
vptr ralloc(huge len)
Definition: z-virt.c:101
int len
Definition: files.c:1540
vptr rpanic(huge len)
Definition: z-virt.c:79
vptr(* rnfree_aux)(vptr, huge)
Definition: z-virt.c:31