1 /* identifier.h: 2 * 3 **************************************************************** 4 * Copyright (C) 2004 Tom Lord 5 * 6 * See the file "COPYING" for further information about 7 * the copyright and warranty status of this work. 8 */ 9 10 #ifndef INCLUDE__LIBAWIKI__IDENTIFIER_H 11 #define INCLUDE__LIBAWIKI__IDENTIFIER_H 12 13 14 #include "hackerlab/machine/types.h" 15 #include "hackerlab/bugs/panic.h" 16 17 #define Identifier_decl(C_STEM, STRING) \ 18 static const t_uchar * \ 19 Identifier_ ## C_STEM (void) \ 20 { \ 21 static const t_uchar * it = 0; \ 22 if (!it) it = intern_identifier (STRING); \ 23 return it; \ 24 } extern int __identifier_unused_rubbish_ ## C_STEM 25 26 #define Identifier_safe_decl(C_STEM, STRING) \ 27 static const t_uchar * \ 28 Identifier_ ## C_STEM (void) \ 29 { \ 30 static const t_uchar * it = 0; \ 31 if (!it) it = intern_identifier (STRING); \ 32 invariant (!!it); \ 33 return it; \ 34 } extern int __identifier_unused_rubbish_ ## C_STEM 35 36 37 #define Identifier(STEM) (Identifier_ ## STEM ()) 38 39 40 41 /* automatically generated __STDC__ prototypes */ 42 extern const t_uchar * intern_identifier (const t_uchar * const name); 43 #endif /* INCLUDE__LIBAWIKI__IDENTIFIER_H */ 44 45 46 /* tag: Tom Lord Wed Oct 27 23:05:11 2004 (identifier.h) 47 */ 48