obstack.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. /* obstack.c - subroutines used implicitly by object stack macros
  2. Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library. Its master source is NOT part of
  4. the C library, however. The master source lives in /gd/gnu/lib.
  5. The GNU C Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library; if not, write to the Free
  15. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  16. 02111-1307 USA. */
  17. /* Make uClibc lie about being glibc. */
  18. #define __FORCE_GLIBC 1
  19. #include <locale.h>
  20. #ifdef HAVE_CONFIG_H
  21. # include <config.h>
  22. #endif
  23. #include <obstack.h>
  24. /* NOTE BEFORE MODIFYING THIS FILE: This version number must be
  25. incremented whenever callers compiled using an old obstack.h can no
  26. longer properly call the functions in this obstack.c. */
  27. #define OBSTACK_INTERFACE_VERSION 1
  28. /* Comment out all this code if we are using the GNU C Library, and are not
  29. actually compiling the library itself, and the installed library
  30. supports the same library interface we do. This code is part of the GNU
  31. C Library, but also included in many other GNU distributions. Compiling
  32. and linking in this code is a waste when using the GNU C library
  33. (especially if it is a shared library). Rather than having every GNU
  34. program understand `configure --with-gnu-libc' and omit the object
  35. files, it is simpler to just do this in the source for each such file. */
  36. #include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
  37. #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
  38. # include <gnu-versions.h>
  39. # if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
  40. # define ELIDE_CODE
  41. # endif
  42. #endif
  43. #if (defined _LIBC && defined USE_IN_LIBIO) || defined __UCLIBC_HAS_WCHAR__
  44. # include <wchar.h>
  45. #endif
  46. #ifndef ELIDE_CODE
  47. # if defined __STDC__ && __STDC__
  48. # define POINTER void *
  49. # else
  50. # define POINTER char *
  51. # endif
  52. /* Determine default alignment. */
  53. struct fooalign {char x; double d;};
  54. # define DEFAULT_ALIGNMENT \
  55. ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
  56. /* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
  57. But in fact it might be less smart and round addresses to as much as
  58. DEFAULT_ROUNDING. So we prepare for it to do that. */
  59. union fooround {long x; double d;};
  60. # define DEFAULT_ROUNDING (sizeof (union fooround))
  61. /* When we copy a long block of data, this is the unit to do it with.
  62. On some machines, copying successive ints does not work;
  63. in such a case, redefine COPYING_UNIT to `long' (if that works)
  64. or `char' as a last resort. */
  65. # ifndef COPYING_UNIT
  66. # define COPYING_UNIT int
  67. # endif
  68. /* The functions allocating more room by calling `obstack_chunk_alloc'
  69. jump to the handler pointed to by `obstack_alloc_failed_handler'.
  70. This can be set to a user defined function which should either
  71. abort gracefully or use longjump - but shouldn't return. This
  72. variable by default points to the internal function
  73. `print_and_abort'. */
  74. libc_hidden_proto(obstack_alloc_failed_handler)
  75. # if defined __STDC__ && __STDC__
  76. static void print_and_abort (void);
  77. void (*obstack_alloc_failed_handler) (void) = print_and_abort;
  78. # else
  79. static void print_and_abort ();
  80. void (*obstack_alloc_failed_handler) () = print_and_abort;
  81. # endif
  82. libc_hidden_def(obstack_alloc_failed_handler)
  83. /* Exit value used when `print_and_abort' is used. */
  84. # if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
  85. # include <stdlib.h>
  86. # endif
  87. # ifndef EXIT_FAILURE
  88. # define EXIT_FAILURE 1
  89. # endif
  90. libc_hidden_proto(fprintf)
  91. libc_hidden_proto(abort)
  92. libc_hidden_proto(exit)
  93. libc_hidden_proto(stderr)
  94. #ifdef __UCLIBC_HAS_WCHAR__
  95. libc_hidden_proto(fwprintf)
  96. #endif
  97. libc_hidden_proto(obstack_exit_failure)
  98. int obstack_exit_failure = EXIT_FAILURE;
  99. libc_hidden_def(obstack_exit_failure)
  100. /* The non-GNU-C macros copy the obstack into this global variable
  101. to avoid multiple evaluation. */
  102. struct obstack *_obstack;
  103. /* Define a macro that either calls functions with the traditional malloc/free
  104. calling interface, or calls functions with the mmalloc/mfree interface
  105. (that adds an extra first argument), based on the state of use_extra_arg.
  106. For free, do not use ?:, since some compilers, like the MIPS compilers,
  107. do not allow (expr) ? void : void. */
  108. # if defined __STDC__ && __STDC__
  109. # define CALL_CHUNKFUN(h, size) \
  110. (((h) -> use_extra_arg) \
  111. ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
  112. : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
  113. # define CALL_FREEFUN(h, old_chunk) \
  114. do { \
  115. if ((h) -> use_extra_arg) \
  116. (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
  117. else \
  118. (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
  119. } while (0)
  120. # else
  121. # define CALL_CHUNKFUN(h, size) \
  122. (((h) -> use_extra_arg) \
  123. ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
  124. : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
  125. # define CALL_FREEFUN(h, old_chunk) \
  126. do { \
  127. if ((h) -> use_extra_arg) \
  128. (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
  129. else \
  130. (*(void (*) ()) (h)->freefun) ((old_chunk)); \
  131. } while (0)
  132. # endif
  133. /* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
  134. Objects start on multiples of ALIGNMENT (0 means use default).
  135. CHUNKFUN is the function to use to allocate chunks,
  136. and FREEFUN the function to free them.
  137. Return nonzero if successful, calls obstack_alloc_failed_handler if
  138. allocation fails. */
  139. int
  140. _obstack_begin (h, size, alignment, chunkfun, freefun)
  141. struct obstack *h;
  142. int size;
  143. int alignment;
  144. # if defined __STDC__ && __STDC__
  145. POINTER (*chunkfun) (long);
  146. void (*freefun) (void *);
  147. # else
  148. POINTER (*chunkfun) ();
  149. void (*freefun) ();
  150. # endif
  151. {
  152. register struct _obstack_chunk *chunk; /* points to new chunk */
  153. if (alignment == 0)
  154. alignment = (int) DEFAULT_ALIGNMENT;
  155. if (size == 0)
  156. /* Default size is what GNU malloc can fit in a 4096-byte block. */
  157. {
  158. /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
  159. Use the values for range checking, because if range checking is off,
  160. the extra bytes won't be missed terribly, but if range checking is on
  161. and we used a larger request, a whole extra 4096 bytes would be
  162. allocated.
  163. These number are irrelevant to the new GNU malloc. I suspect it is
  164. less sensitive to the size of the request. */
  165. int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
  166. + 4 + DEFAULT_ROUNDING - 1)
  167. & ~(DEFAULT_ROUNDING - 1));
  168. size = 4096 - extra;
  169. }
  170. # if defined __STDC__ && __STDC__
  171. h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
  172. h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
  173. # else
  174. h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
  175. h->freefun = freefun;
  176. # endif
  177. h->chunk_size = size;
  178. h->alignment_mask = alignment - 1;
  179. h->use_extra_arg = 0;
  180. chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
  181. if (!chunk)
  182. (*obstack_alloc_failed_handler) ();
  183. h->next_free = h->object_base = chunk->contents;
  184. h->chunk_limit = chunk->limit
  185. = (char *) chunk + h->chunk_size;
  186. chunk->prev = 0;
  187. /* The initial chunk now contains no empty object. */
  188. h->maybe_empty_object = 0;
  189. h->alloc_failed = 0;
  190. return 1;
  191. }
  192. int
  193. _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
  194. struct obstack *h;
  195. int size;
  196. int alignment;
  197. # if defined __STDC__ && __STDC__
  198. POINTER (*chunkfun) (POINTER, long);
  199. void (*freefun) (POINTER, POINTER);
  200. # else
  201. POINTER (*chunkfun) ();
  202. void (*freefun) ();
  203. # endif
  204. POINTER arg;
  205. {
  206. register struct _obstack_chunk *chunk; /* points to new chunk */
  207. if (alignment == 0)
  208. alignment = (int) DEFAULT_ALIGNMENT;
  209. if (size == 0)
  210. /* Default size is what GNU malloc can fit in a 4096-byte block. */
  211. {
  212. /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
  213. Use the values for range checking, because if range checking is off,
  214. the extra bytes won't be missed terribly, but if range checking is on
  215. and we used a larger request, a whole extra 4096 bytes would be
  216. allocated.
  217. These number are irrelevant to the new GNU malloc. I suspect it is
  218. less sensitive to the size of the request. */
  219. int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
  220. + 4 + DEFAULT_ROUNDING - 1)
  221. & ~(DEFAULT_ROUNDING - 1));
  222. size = 4096 - extra;
  223. }
  224. # if defined __STDC__ && __STDC__
  225. h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
  226. h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
  227. # else
  228. h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
  229. h->freefun = freefun;
  230. # endif
  231. h->chunk_size = size;
  232. h->alignment_mask = alignment - 1;
  233. h->extra_arg = arg;
  234. h->use_extra_arg = 1;
  235. chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
  236. if (!chunk)
  237. (*obstack_alloc_failed_handler) ();
  238. h->next_free = h->object_base = chunk->contents;
  239. h->chunk_limit = chunk->limit
  240. = (char *) chunk + h->chunk_size;
  241. chunk->prev = 0;
  242. /* The initial chunk now contains no empty object. */
  243. h->maybe_empty_object = 0;
  244. h->alloc_failed = 0;
  245. return 1;
  246. }
  247. /* Allocate a new current chunk for the obstack *H
  248. on the assumption that LENGTH bytes need to be added
  249. to the current object, or a new object of length LENGTH allocated.
  250. Copies any partial object from the end of the old chunk
  251. to the beginning of the new one. */
  252. void
  253. _obstack_newchunk (h, length)
  254. struct obstack *h;
  255. int length;
  256. {
  257. register struct _obstack_chunk *old_chunk = h->chunk;
  258. register struct _obstack_chunk *new_chunk;
  259. register long new_size;
  260. register long obj_size = h->next_free - h->object_base;
  261. register long i;
  262. long already;
  263. char *object_base;
  264. /* Compute size for new chunk. */
  265. new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
  266. if (new_size < h->chunk_size)
  267. new_size = h->chunk_size;
  268. /* Allocate and initialize the new chunk. */
  269. new_chunk = CALL_CHUNKFUN (h, new_size);
  270. if (!new_chunk)
  271. (*obstack_alloc_failed_handler) ();
  272. h->chunk = new_chunk;
  273. new_chunk->prev = old_chunk;
  274. new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
  275. /* Compute an aligned object_base in the new chunk */
  276. object_base =
  277. __INT_TO_PTR ((__PTR_TO_INT (new_chunk->contents) + h->alignment_mask)
  278. & ~ (h->alignment_mask));
  279. /* Move the existing object to the new chunk.
  280. Word at a time is fast and is safe if the object
  281. is sufficiently aligned. */
  282. if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
  283. {
  284. for (i = obj_size / sizeof (COPYING_UNIT) - 1;
  285. i >= 0; i--)
  286. ((COPYING_UNIT *)object_base)[i]
  287. = ((COPYING_UNIT *)h->object_base)[i];
  288. /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
  289. but that can cross a page boundary on a machine
  290. which does not do strict alignment for COPYING_UNITS. */
  291. already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
  292. }
  293. else
  294. already = 0;
  295. /* Copy remaining bytes one by one. */
  296. for (i = already; i < obj_size; i++)
  297. object_base[i] = h->object_base[i];
  298. /* If the object just copied was the only data in OLD_CHUNK,
  299. free that chunk and remove it from the chain.
  300. But not if that chunk might contain an empty object. */
  301. if (h->object_base == old_chunk->contents && ! h->maybe_empty_object)
  302. {
  303. new_chunk->prev = old_chunk->prev;
  304. CALL_FREEFUN (h, old_chunk);
  305. }
  306. h->object_base = object_base;
  307. h->next_free = h->object_base + obj_size;
  308. /* The new chunk certainly contains no empty object yet. */
  309. h->maybe_empty_object = 0;
  310. }
  311. /* Return nonzero if object OBJ has been allocated from obstack H.
  312. This is here for debugging.
  313. If you use it in a program, you are probably losing. */
  314. # if defined __STDC__ && __STDC__
  315. /* Suppress -Wmissing-prototypes warning. We don't want to declare this in
  316. obstack.h because it is just for debugging. */
  317. int _obstack_allocated_p (struct obstack *h, POINTER obj);
  318. # endif
  319. int
  320. _obstack_allocated_p (h, obj)
  321. struct obstack *h;
  322. POINTER obj;
  323. {
  324. register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
  325. register struct _obstack_chunk *plp; /* point to previous chunk if any */
  326. lp = (h)->chunk;
  327. /* We use >= rather than > since the object cannot be exactly at
  328. the beginning of the chunk but might be an empty object exactly
  329. at the end of an adjacent chunk. */
  330. while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
  331. {
  332. plp = lp->prev;
  333. lp = plp;
  334. }
  335. return lp != 0;
  336. }
  337. /* Free objects in obstack H, including OBJ and everything allocate
  338. more recently than OBJ. If OBJ is zero, free everything in H. */
  339. # undef obstack_free
  340. /* This function has two names with identical definitions.
  341. This is the first one, called from non-ANSI code. */
  342. void
  343. _obstack_free (h, obj)
  344. struct obstack *h;
  345. POINTER obj;
  346. {
  347. register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
  348. register struct _obstack_chunk *plp; /* point to previous chunk if any */
  349. lp = h->chunk;
  350. /* We use >= because there cannot be an object at the beginning of a chunk.
  351. But there can be an empty object at that address
  352. at the end of another chunk. */
  353. while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
  354. {
  355. plp = lp->prev;
  356. CALL_FREEFUN (h, lp);
  357. lp = plp;
  358. /* If we switch chunks, we can't tell whether the new current
  359. chunk contains an empty object, so assume that it may. */
  360. h->maybe_empty_object = 1;
  361. }
  362. if (lp)
  363. {
  364. h->object_base = h->next_free = (char *) (obj);
  365. h->chunk_limit = lp->limit;
  366. h->chunk = lp;
  367. }
  368. else if (obj != 0)
  369. /* obj is not in any of the chunks! */
  370. abort ();
  371. }
  372. /* This function is used from ANSI code. */
  373. void
  374. obstack_free (h, obj)
  375. struct obstack *h;
  376. POINTER obj;
  377. {
  378. register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
  379. register struct _obstack_chunk *plp; /* point to previous chunk if any */
  380. lp = h->chunk;
  381. /* We use >= because there cannot be an object at the beginning of a chunk.
  382. But there can be an empty object at that address
  383. at the end of another chunk. */
  384. while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
  385. {
  386. plp = lp->prev;
  387. CALL_FREEFUN (h, lp);
  388. lp = plp;
  389. /* If we switch chunks, we can't tell whether the new current
  390. chunk contains an empty object, so assume that it may. */
  391. h->maybe_empty_object = 1;
  392. }
  393. if (lp)
  394. {
  395. h->object_base = h->next_free = (char *) (obj);
  396. h->chunk_limit = lp->limit;
  397. h->chunk = lp;
  398. }
  399. else if (obj != 0)
  400. /* obj is not in any of the chunks! */
  401. abort ();
  402. }
  403. int
  404. _obstack_memory_used (h)
  405. struct obstack *h;
  406. {
  407. register struct _obstack_chunk* lp;
  408. register int nbytes = 0;
  409. for (lp = h->chunk; lp != 0; lp = lp->prev)
  410. {
  411. nbytes += lp->limit - (char *) lp;
  412. }
  413. return nbytes;
  414. }
  415. /* Define the error handler. */
  416. # ifndef _
  417. /* # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC */
  418. # ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  419. # include <libintl.h>
  420. # ifndef _
  421. # define _(Str) __dcgettext (NULL, Str, LC_MESSAGES)
  422. # endif
  423. # else
  424. # define _(Str) (Str)
  425. # endif
  426. # endif
  427. # if defined _LIBC && defined USE_IN_LIBIO
  428. # include <libio/iolibio.h>
  429. # define fputs(s, f) _IO_fputs (s, f)
  430. # endif
  431. static void
  432. attribute_noreturn
  433. print_and_abort ()
  434. {
  435. /* Don't change any of these strings. Yes, it would be possible to add
  436. the newline to the string and use fputs or so. But this must not
  437. happen because the "memory exhausted" message appears in other places
  438. like this and the translation should be reused instead of creating
  439. a very similar string which requires a separate translation. */
  440. # if defined _LIBC && defined USE_IN_LIBIO
  441. if (_IO_fwide (stderr, 0) > 0)
  442. fwprintf (stderr, L"%s\n", _("memory exhausted"));
  443. else
  444. # endif
  445. fprintf (stderr, "%s\n", _("memory exhausted"));
  446. exit (obstack_exit_failure);
  447. }
  448. # if 0
  449. /* These are now turned off because the applications do not use it
  450. and it uses bcopy via obstack_grow, which causes trouble on sysV. */
  451. /* Now define the functional versions of the obstack macros.
  452. Define them to simply use the corresponding macros to do the job. */
  453. # if defined __STDC__ && __STDC__
  454. /* These function definitions do not work with non-ANSI preprocessors;
  455. they won't pass through the macro names in parentheses. */
  456. /* The function names appear in parentheses in order to prevent
  457. the macro-definitions of the names from being expanded there. */
  458. POINTER (obstack_base) (obstack)
  459. struct obstack *obstack;
  460. {
  461. return obstack_base (obstack);
  462. }
  463. POINTER (obstack_next_free) (obstack)
  464. struct obstack *obstack;
  465. {
  466. return obstack_next_free (obstack);
  467. }
  468. int (obstack_object_size) (obstack)
  469. struct obstack *obstack;
  470. {
  471. return obstack_object_size (obstack);
  472. }
  473. int (obstack_room) (obstack)
  474. struct obstack *obstack;
  475. {
  476. return obstack_room (obstack);
  477. }
  478. int (obstack_make_room) (obstack, length)
  479. struct obstack *obstack;
  480. int length;
  481. {
  482. return obstack_make_room (obstack, length);
  483. }
  484. void (obstack_grow) (obstack, data, length)
  485. struct obstack *obstack;
  486. const POINTER data;
  487. int length;
  488. {
  489. obstack_grow (obstack, data, length);
  490. }
  491. void (obstack_grow0) (obstack, data, length)
  492. struct obstack *obstack;
  493. const POINTER data;
  494. int length;
  495. {
  496. obstack_grow0 (obstack, data, length);
  497. }
  498. void (obstack_1grow) (obstack, character)
  499. struct obstack *obstack;
  500. int character;
  501. {
  502. obstack_1grow (obstack, character);
  503. }
  504. void (obstack_blank) (obstack, length)
  505. struct obstack *obstack;
  506. int length;
  507. {
  508. obstack_blank (obstack, length);
  509. }
  510. void (obstack_1grow_fast) (obstack, character)
  511. struct obstack *obstack;
  512. int character;
  513. {
  514. obstack_1grow_fast (obstack, character);
  515. }
  516. void (obstack_blank_fast) (obstack, length)
  517. struct obstack *obstack;
  518. int length;
  519. {
  520. obstack_blank_fast (obstack, length);
  521. }
  522. POINTER (obstack_finish) (obstack)
  523. struct obstack *obstack;
  524. {
  525. return obstack_finish (obstack);
  526. }
  527. POINTER (obstack_alloc) (obstack, length)
  528. struct obstack *obstack;
  529. int length;
  530. {
  531. return obstack_alloc (obstack, length);
  532. }
  533. POINTER (obstack_copy) (obstack, address, length)
  534. struct obstack *obstack;
  535. const POINTER address;
  536. int length;
  537. {
  538. return obstack_copy (obstack, address, length);
  539. }
  540. POINTER (obstack_copy0) (obstack, address, length)
  541. struct obstack *obstack;
  542. const POINTER address;
  543. int length;
  544. {
  545. return obstack_copy0 (obstack, address, length);
  546. }
  547. # endif /* __STDC__ */
  548. # endif /* 0 */
  549. #endif /* !ELIDE_CODE */