obstack.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /* obstack.h - object stack macros
  2. Copyright (C) 1988-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. /* Summary:
  16. All the apparent functions defined here are macros. The idea
  17. is that you would use these pre-tested macros to solve a
  18. very specific set of problems, and they would run fast.
  19. Caution: no side-effects in arguments please!! They may be
  20. evaluated MANY times!!
  21. These macros operate a stack of objects. Each object starts life
  22. small, and may grow to maturity. (Consider building a word syllable
  23. by syllable.) An object can move while it is growing. Once it has
  24. been "finished" it never changes address again. So the "top of the
  25. stack" is typically an immature growing object, while the rest of the
  26. stack is of mature, fixed size and fixed address objects.
  27. These routines grab large chunks of memory, using a function you
  28. supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
  29. by calling 'obstack_chunk_free'. You must define them and declare
  30. them before using any obstack macros.
  31. Each independent stack is represented by a 'struct obstack'.
  32. Each of the obstack macros expects a pointer to such a structure
  33. as the first argument.
  34. One motivation for this package is the problem of growing char strings
  35. in symbol tables. Unless you are "fascist pig with a read-only mind"
  36. --Gosper's immortal quote from HAKMEM item 154, out of context--you
  37. would not like to put any arbitrary upper limit on the length of your
  38. symbols.
  39. In practice this often means you will build many short symbols and a
  40. few long symbols. At the time you are reading a symbol you don't know
  41. how long it is. One traditional method is to read a symbol into a
  42. buffer, realloc()ating the buffer every time you try to read a symbol
  43. that is longer than the buffer. This is beaut, but you still will
  44. want to copy the symbol from the buffer to a more permanent
  45. symbol-table entry say about half the time.
  46. With obstacks, you can work differently. Use one obstack for all symbol
  47. names. As you read a symbol, grow the name in the obstack gradually.
  48. When the name is complete, finalize it. Then, if the symbol exists already,
  49. free the newly read name.
  50. The way we do this is to take a large chunk, allocating memory from
  51. low addresses. When you want to build a symbol in the chunk you just
  52. add chars above the current "high water mark" in the chunk. When you
  53. have finished adding chars, because you got to the end of the symbol,
  54. you know how long the chars are, and you can create a new object.
  55. Mostly the chars will not burst over the highest address of the chunk,
  56. because you would typically expect a chunk to be (say) 100 times as
  57. long as an average object.
  58. In case that isn't clear, when we have enough chars to make up
  59. the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
  60. so we just point to it where it lies. No moving of chars is
  61. needed and this is the second win: potentially long strings need
  62. never be explicitly shuffled. Once an object is formed, it does not
  63. change its address during its lifetime.
  64. When the chars burst over a chunk boundary, we allocate a larger
  65. chunk, and then copy the partly formed object from the end of the old
  66. chunk to the beginning of the new larger chunk. We then carry on
  67. accreting characters to the end of the object as we normally would.
  68. A special macro is provided to add a single char at a time to a
  69. growing object. This allows the use of register variables, which
  70. break the ordinary 'growth' macro.
  71. Summary:
  72. We allocate large chunks.
  73. We carve out one object at a time from the current chunk.
  74. Once carved, an object never moves.
  75. We are free to append data of any size to the currently
  76. growing object.
  77. Exactly one object is growing in an obstack at any one time.
  78. You can run one obstack per control block.
  79. You may have as many control blocks as you dare.
  80. Because of the way we do it, you can "unwind" an obstack
  81. back to a previous state. (You may remove objects much
  82. as you would with a stack.)
  83. */
  84. /* Don't do the contents of this file more than once. */
  85. #ifndef _OBSTACK_H
  86. #define _OBSTACK_H 1
  87. #ifndef _OBSTACK_INTERFACE_VERSION
  88. # define _OBSTACK_INTERFACE_VERSION 2
  89. #endif
  90. #include <stddef.h> /* For size_t and ptrdiff_t. */
  91. #include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
  92. #if _OBSTACK_INTERFACE_VERSION == 1
  93. /* For binary compatibility with obstack version 1, which used "int"
  94. and "long" for these two types. */
  95. # define _OBSTACK_SIZE_T unsigned int
  96. # define _CHUNK_SIZE_T unsigned long
  97. # define _OBSTACK_CAST(type, expr) ((type) (expr))
  98. #else
  99. /* Version 2 with sane types, especially for 64-bit hosts. */
  100. # define _OBSTACK_SIZE_T size_t
  101. # define _CHUNK_SIZE_T size_t
  102. # define _OBSTACK_CAST(type, expr) (expr)
  103. #endif
  104. /* If B is the base of an object addressed by P, return the result of
  105. aligning P to the next multiple of A + 1. B and P must be of type
  106. char *. A + 1 must be a power of 2. */
  107. #define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
  108. /* Similar to __BPTR_ALIGN (B, P, A), except optimize the common case
  109. where pointers can be converted to integers, aligned as integers,
  110. and converted back again. If ptrdiff_t is narrower than a
  111. pointer (e.g., the AS/400), play it safe and compute the alignment
  112. relative to B. Otherwise, use the faster strategy of computing the
  113. alignment relative to 0. */
  114. #define __PTR_ALIGN(B, P, A) \
  115. __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \
  116. P, A)
  117. #ifndef __attribute_pure__
  118. # if defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2096
  119. # define __attribute_pure__ __attribute__ ((__pure__))
  120. # else
  121. # define __attribute_pure__
  122. # endif
  123. #endif
  124. #ifdef __cplusplus
  125. extern "C" {
  126. #endif
  127. struct _obstack_chunk /* Lives at front of each chunk. */
  128. {
  129. char *limit; /* 1 past end of this chunk */
  130. struct _obstack_chunk *prev; /* address of prior chunk or NULL */
  131. char contents[4]; /* objects begin here */
  132. };
  133. struct obstack /* control current object in current chunk */
  134. {
  135. _CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
  136. struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
  137. char *object_base; /* address of object we are building */
  138. char *next_free; /* where to add next char to current object */
  139. char *chunk_limit; /* address of char after current chunk */
  140. union
  141. {
  142. _OBSTACK_SIZE_T i;
  143. void *p;
  144. } temp; /* Temporary for some macros. */
  145. _OBSTACK_SIZE_T alignment_mask; /* Mask of alignment for each object. */
  146. /* These prototypes vary based on 'use_extra_arg'. */
  147. union
  148. {
  149. void *(*plain) (size_t);
  150. void *(*extra) (void *, size_t);
  151. } chunkfun;
  152. union
  153. {
  154. void (*plain) (void *);
  155. void (*extra) (void *, void *);
  156. } freefun;
  157. void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
  158. unsigned use_extra_arg : 1; /* chunk alloc/dealloc funcs take extra arg */
  159. unsigned maybe_empty_object : 1; /* There is a possibility that the current
  160. chunk contains a zero-length object. This
  161. prevents freeing the chunk if we allocate
  162. a bigger chunk to replace it. */
  163. unsigned alloc_failed : 1; /* No longer used, as we now call the failed
  164. handler on error, but retained for binary
  165. compatibility. */
  166. };
  167. /* Declare the external functions we use; they are in obstack.c. */
  168. extern void _obstack_newchunk (struct obstack *, _OBSTACK_SIZE_T);
  169. extern void _obstack_free (struct obstack *, void *);
  170. extern int _obstack_begin (struct obstack *,
  171. _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
  172. void *(*) (size_t), void (*) (void *));
  173. extern int _obstack_begin_1 (struct obstack *,
  174. _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
  175. void *(*) (void *, size_t),
  176. void (*) (void *, void *), void *);
  177. extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
  178. __attribute_pure__;
  179. /* Error handler called when 'obstack_chunk_alloc' failed to allocate
  180. more memory. This can be set to a user defined function which
  181. should either abort gracefully or use longjump - but shouldn't
  182. return. The default action is to print a message and abort. */
  183. extern void (*obstack_alloc_failed_handler) (void);
  184. /* Exit value used when 'print_and_abort' is used. */
  185. extern int obstack_exit_failure;
  186. /* Pointer to beginning of object being allocated or to be allocated next.
  187. Note that this might not be the final address of the object
  188. because a new chunk might be needed to hold the final size. */
  189. #define obstack_base(h) ((void *) (h)->object_base)
  190. /* Size for allocating ordinary chunks. */
  191. #define obstack_chunk_size(h) ((h)->chunk_size)
  192. /* Pointer to next byte not yet allocated in current chunk. */
  193. #define obstack_next_free(h) ((void *) (h)->next_free)
  194. /* Mask specifying low bits that should be clear in address of an object. */
  195. #define obstack_alignment_mask(h) ((h)->alignment_mask)
  196. /* To prevent prototype warnings provide complete argument list. */
  197. #define obstack_init(h) \
  198. _obstack_begin ((h), 0, 0, \
  199. _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
  200. _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
  201. #define obstack_begin(h, size) \
  202. _obstack_begin ((h), (size), 0, \
  203. _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
  204. _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
  205. #define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
  206. _obstack_begin ((h), (size), (alignment), \
  207. _OBSTACK_CAST (void *(*) (size_t), chunkfun), \
  208. _OBSTACK_CAST (void (*) (void *), freefun))
  209. #define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
  210. _obstack_begin_1 ((h), (size), (alignment), \
  211. _OBSTACK_CAST (void *(*) (void *, size_t), chunkfun), \
  212. _OBSTACK_CAST (void (*) (void *, void *), freefun), arg)
  213. #define obstack_chunkfun(h, newchunkfun) \
  214. ((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun)))
  215. #define obstack_freefun(h, newfreefun) \
  216. ((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun)))
  217. #define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))
  218. #define obstack_blank_fast(h, n) ((void) ((h)->next_free += (n)))
  219. #define obstack_memory_used(h) _obstack_memory_used (h)
  220. #if defined __GNUC__
  221. # if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
  222. # define __extension__
  223. # endif
  224. /* For GNU C, if not -traditional,
  225. we can define these macros to compute all args only once
  226. without using a global variable.
  227. Also, we can avoid using the 'temp' slot, to make faster code. */
  228. # define obstack_object_size(OBSTACK) \
  229. __extension__ \
  230. ({ struct obstack const *__o = (OBSTACK); \
  231. (_OBSTACK_SIZE_T) (__o->next_free - __o->object_base); })
  232. /* The local variable is named __o1 to avoid a shadowed variable
  233. warning when invoked from other obstack macros. */
  234. # define obstack_room(OBSTACK) \
  235. __extension__ \
  236. ({ struct obstack const *__o1 = (OBSTACK); \
  237. (_OBSTACK_SIZE_T) (__o1->chunk_limit - __o1->next_free); })
  238. # define obstack_make_room(OBSTACK, length) \
  239. __extension__ \
  240. ({ struct obstack *__o = (OBSTACK); \
  241. _OBSTACK_SIZE_T __len = (length); \
  242. if (obstack_room (__o) < __len) \
  243. _obstack_newchunk (__o, __len); \
  244. (void) 0; })
  245. # define obstack_empty_p(OBSTACK) \
  246. __extension__ \
  247. ({ struct obstack const *__o = (OBSTACK); \
  248. (__o->chunk->prev == 0 \
  249. && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
  250. __o->chunk->contents, \
  251. __o->alignment_mask)); })
  252. # define obstack_grow(OBSTACK, where, length) \
  253. __extension__ \
  254. ({ struct obstack *__o = (OBSTACK); \
  255. _OBSTACK_SIZE_T __len = (length); \
  256. if (obstack_room (__o) < __len) \
  257. _obstack_newchunk (__o, __len); \
  258. memcpy (__o->next_free, where, __len); \
  259. __o->next_free += __len; \
  260. (void) 0; })
  261. # define obstack_grow0(OBSTACK, where, length) \
  262. __extension__ \
  263. ({ struct obstack *__o = (OBSTACK); \
  264. _OBSTACK_SIZE_T __len = (length); \
  265. if (obstack_room (__o) < __len + 1) \
  266. _obstack_newchunk (__o, __len + 1); \
  267. memcpy (__o->next_free, where, __len); \
  268. __o->next_free += __len; \
  269. *(__o->next_free)++ = 0; \
  270. (void) 0; })
  271. # define obstack_1grow(OBSTACK, datum) \
  272. __extension__ \
  273. ({ struct obstack *__o = (OBSTACK); \
  274. if (obstack_room (__o) < 1) \
  275. _obstack_newchunk (__o, 1); \
  276. obstack_1grow_fast (__o, datum); })
  277. /* These assume that the obstack alignment is good enough for pointers
  278. or ints, and that the data added so far to the current object
  279. shares that much alignment. */
  280. # define obstack_ptr_grow(OBSTACK, datum) \
  281. __extension__ \
  282. ({ struct obstack *__o = (OBSTACK); \
  283. if (obstack_room (__o) < sizeof (void *)) \
  284. _obstack_newchunk (__o, sizeof (void *)); \
  285. obstack_ptr_grow_fast (__o, datum); })
  286. # define obstack_int_grow(OBSTACK, datum) \
  287. __extension__ \
  288. ({ struct obstack *__o = (OBSTACK); \
  289. if (obstack_room (__o) < sizeof (int)) \
  290. _obstack_newchunk (__o, sizeof (int)); \
  291. obstack_int_grow_fast (__o, datum); })
  292. # define obstack_ptr_grow_fast(OBSTACK, aptr) \
  293. __extension__ \
  294. ({ struct obstack *__o1 = (OBSTACK); \
  295. void *__p1 = __o1->next_free; \
  296. *(const void **) __p1 = (aptr); \
  297. __o1->next_free += sizeof (const void *); \
  298. (void) 0; })
  299. # define obstack_int_grow_fast(OBSTACK, aint) \
  300. __extension__ \
  301. ({ struct obstack *__o1 = (OBSTACK); \
  302. void *__p1 = __o1->next_free; \
  303. *(int *) __p1 = (aint); \
  304. __o1->next_free += sizeof (int); \
  305. (void) 0; })
  306. # define obstack_blank(OBSTACK, length) \
  307. __extension__ \
  308. ({ struct obstack *__o = (OBSTACK); \
  309. _OBSTACK_SIZE_T __len = (length); \
  310. if (obstack_room (__o) < __len) \
  311. _obstack_newchunk (__o, __len); \
  312. obstack_blank_fast (__o, __len); })
  313. # define obstack_alloc(OBSTACK, length) \
  314. __extension__ \
  315. ({ struct obstack *__h = (OBSTACK); \
  316. obstack_blank (__h, (length)); \
  317. obstack_finish (__h); })
  318. # define obstack_copy(OBSTACK, where, length) \
  319. __extension__ \
  320. ({ struct obstack *__h = (OBSTACK); \
  321. obstack_grow (__h, (where), (length)); \
  322. obstack_finish (__h); })
  323. # define obstack_copy0(OBSTACK, where, length) \
  324. __extension__ \
  325. ({ struct obstack *__h = (OBSTACK); \
  326. obstack_grow0 (__h, (where), (length)); \
  327. obstack_finish (__h); })
  328. /* The local variable is named __o1 to avoid a shadowed variable
  329. warning when invoked from other obstack macros, typically obstack_free. */
  330. # define obstack_finish(OBSTACK) \
  331. __extension__ \
  332. ({ struct obstack *__o1 = (OBSTACK); \
  333. void *__value = (void *) __o1->object_base; \
  334. if (__o1->next_free == __value) \
  335. __o1->maybe_empty_object = 1; \
  336. __o1->next_free \
  337. = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
  338. __o1->alignment_mask); \
  339. if ((size_t) (__o1->next_free - (char *) __o1->chunk) \
  340. > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) \
  341. __o1->next_free = __o1->chunk_limit; \
  342. __o1->object_base = __o1->next_free; \
  343. __value; })
  344. # define obstack_free(OBSTACK, OBJ) \
  345. __extension__ \
  346. ({ struct obstack *__o = (OBSTACK); \
  347. void *__obj = (void *) (OBJ); \
  348. if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) \
  349. __o->next_free = __o->object_base = (char *) __obj; \
  350. else \
  351. _obstack_free (__o, __obj); })
  352. #else /* not __GNUC__ */
  353. # define obstack_object_size(h) \
  354. ((_OBSTACK_SIZE_T) ((h)->next_free - (h)->object_base))
  355. # define obstack_room(h) \
  356. ((_OBSTACK_SIZE_T) ((h)->chunk_limit - (h)->next_free))
  357. # define obstack_empty_p(h) \
  358. ((h)->chunk->prev == 0 \
  359. && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
  360. (h)->chunk->contents, \
  361. (h)->alignment_mask))
  362. /* Note that the call to _obstack_newchunk is enclosed in (..., 0)
  363. so that we can avoid having void expressions
  364. in the arms of the conditional expression.
  365. Casting the third operand to void was tried before,
  366. but some compilers won't accept it. */
  367. # define obstack_make_room(h, length) \
  368. ((h)->temp.i = (length), \
  369. ((obstack_room (h) < (h)->temp.i) \
  370. ? (_obstack_newchunk (h, (h)->temp.i), 0) : 0), \
  371. (void) 0)
  372. # define obstack_grow(h, where, length) \
  373. ((h)->temp.i = (length), \
  374. ((obstack_room (h) < (h)->temp.i) \
  375. ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
  376. memcpy ((h)->next_free, where, (h)->temp.i), \
  377. (h)->next_free += (h)->temp.i, \
  378. (void) 0)
  379. # define obstack_grow0(h, where, length) \
  380. ((h)->temp.i = (length), \
  381. ((obstack_room (h) < (h)->temp.i + 1) \
  382. ? (_obstack_newchunk ((h), (h)->temp.i + 1), 0) : 0), \
  383. memcpy ((h)->next_free, where, (h)->temp.i), \
  384. (h)->next_free += (h)->temp.i, \
  385. *((h)->next_free)++ = 0, \
  386. (void) 0)
  387. # define obstack_1grow(h, datum) \
  388. (((obstack_room (h) < 1) \
  389. ? (_obstack_newchunk ((h), 1), 0) : 0), \
  390. obstack_1grow_fast (h, datum))
  391. # define obstack_ptr_grow(h, datum) \
  392. (((obstack_room (h) < sizeof (char *)) \
  393. ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
  394. obstack_ptr_grow_fast (h, datum))
  395. # define obstack_int_grow(h, datum) \
  396. (((obstack_room (h) < sizeof (int)) \
  397. ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
  398. obstack_int_grow_fast (h, datum))
  399. # define obstack_ptr_grow_fast(h, aptr) \
  400. (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr), \
  401. (void) 0)
  402. # define obstack_int_grow_fast(h, aint) \
  403. (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint), \
  404. (void) 0)
  405. # define obstack_blank(h, length) \
  406. ((h)->temp.i = (length), \
  407. ((obstack_room (h) < (h)->temp.i) \
  408. ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
  409. obstack_blank_fast (h, (h)->temp.i))
  410. # define obstack_alloc(h, length) \
  411. (obstack_blank ((h), (length)), obstack_finish ((h)))
  412. # define obstack_copy(h, where, length) \
  413. (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
  414. # define obstack_copy0(h, where, length) \
  415. (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
  416. # define obstack_finish(h) \
  417. (((h)->next_free == (h)->object_base \
  418. ? (((h)->maybe_empty_object = 1), 0) \
  419. : 0), \
  420. (h)->temp.p = (h)->object_base, \
  421. (h)->next_free \
  422. = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
  423. (h)->alignment_mask), \
  424. (((size_t) ((h)->next_free - (char *) (h)->chunk) \
  425. > (size_t) ((h)->chunk_limit - (char *) (h)->chunk)) \
  426. ? ((h)->next_free = (h)->chunk_limit) : 0), \
  427. (h)->object_base = (h)->next_free, \
  428. (h)->temp.p)
  429. # define obstack_free(h, obj) \
  430. ((h)->temp.p = (void *) (obj), \
  431. (((h)->temp.p > (void *) (h)->chunk \
  432. && (h)->temp.p < (void *) (h)->chunk_limit) \
  433. ? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \
  434. : _obstack_free ((h), (h)->temp.p)))
  435. #endif /* not __GNUC__ */
  436. #ifdef __cplusplus
  437. } /* C++ */
  438. #endif
  439. #endif /* _OBSTACK_H */