133965Sjdp/* obstack.c - subroutines used implicitly by object stack macros 260484Sobrien Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. 333965Sjdp 433965Sjdp 577298Sobrien NOTE: This source is derived from an old version taken from the GNU C 677298Sobrien Library (glibc). 733965Sjdp 860484Sobrien This program is free software; you can redistribute it and/or modify it 960484Sobrien under the terms of the GNU General Public License as published by the 1060484Sobrien Free Software Foundation; either version 2, or (at your option) any 1160484Sobrien later version. 1233965Sjdp 1360484Sobrien This program is distributed in the hope that it will be useful, 1460484Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1560484Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1660484Sobrien GNU General Public License for more details. 1760484Sobrien 1860484Sobrien You should have received a copy of the GNU General Public License 1960484Sobrien along with this program; if not, write to the Free Software 20218822Sdim Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 2160484Sobrien USA. */ 2260484Sobrien 2360484Sobrien#ifdef HAVE_CONFIG_H 2460484Sobrien#include <config.h> 2560484Sobrien#endif 2660484Sobrien 2733965Sjdp#include "obstack.h" 2833965Sjdp 2933965Sjdp/* NOTE BEFORE MODIFYING THIS FILE: This version number must be 3033965Sjdp incremented whenever callers compiled using an old obstack.h can no 3133965Sjdp longer properly call the functions in this obstack.c. */ 3233965Sjdp#define OBSTACK_INTERFACE_VERSION 1 3333965Sjdp 3433965Sjdp/* Comment out all this code if we are using the GNU C Library, and are not 3533965Sjdp actually compiling the library itself, and the installed library 3633965Sjdp supports the same library interface we do. This code is part of the GNU 3733965Sjdp C Library, but also included in many other GNU distributions. Compiling 3833965Sjdp and linking in this code is a waste when using the GNU C library 3933965Sjdp (especially if it is a shared library). Rather than having every GNU 4033965Sjdp program understand `configure --with-gnu-libc' and omit the object 4133965Sjdp files, it is simpler to just do this in the source for each such file. */ 4233965Sjdp 4333965Sjdp#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */ 4433965Sjdp#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 4533965Sjdp#include <gnu-versions.h> 4633965Sjdp#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION 4733965Sjdp#define ELIDE_CODE 4833965Sjdp#endif 4933965Sjdp#endif 5033965Sjdp 5133965Sjdp 5233965Sjdp#ifndef ELIDE_CODE 5333965Sjdp 5433965Sjdp 5533965Sjdp#define POINTER void * 5633965Sjdp 5733965Sjdp/* Determine default alignment. */ 5833965Sjdpstruct fooalign {char x; double d;}; 5933965Sjdp#define DEFAULT_ALIGNMENT \ 6033965Sjdp ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0)) 6133965Sjdp/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT. 6233965Sjdp But in fact it might be less smart and round addresses to as much as 6333965Sjdp DEFAULT_ROUNDING. So we prepare for it to do that. */ 6433965Sjdpunion fooround {long x; double d;}; 6533965Sjdp#define DEFAULT_ROUNDING (sizeof (union fooround)) 6633965Sjdp 6733965Sjdp/* When we copy a long block of data, this is the unit to do it with. 6833965Sjdp On some machines, copying successive ints does not work; 6933965Sjdp in such a case, redefine COPYING_UNIT to `long' (if that works) 7033965Sjdp or `char' as a last resort. */ 7133965Sjdp#ifndef COPYING_UNIT 7233965Sjdp#define COPYING_UNIT int 7333965Sjdp#endif 7433965Sjdp 7560484Sobrien 7660484Sobrien/* The functions allocating more room by calling `obstack_chunk_alloc' 7760484Sobrien jump to the handler pointed to by `obstack_alloc_failed_handler'. 7860484Sobrien This variable by default points to the internal function 7960484Sobrien `print_and_abort'. */ 8060484Sobrienstatic void print_and_abort (void); 8160484Sobrienvoid (*obstack_alloc_failed_handler) (void) = print_and_abort; 8260484Sobrien 8360484Sobrien/* Exit value used when `print_and_abort' is used. */ 8460484Sobrien#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H 8560484Sobrien#include <stdlib.h> 8660484Sobrien#endif 8760484Sobrien#ifndef EXIT_FAILURE 8860484Sobrien#define EXIT_FAILURE 1 8960484Sobrien#endif 9060484Sobrienint obstack_exit_failure = EXIT_FAILURE; 9160484Sobrien 9233965Sjdp/* The non-GNU-C macros copy the obstack into this global variable 9333965Sjdp to avoid multiple evaluation. */ 9433965Sjdp 9533965Sjdpstruct obstack *_obstack; 9633965Sjdp 9733965Sjdp/* Define a macro that either calls functions with the traditional malloc/free 9833965Sjdp calling interface, or calls functions with the mmalloc/mfree interface 9933965Sjdp (that adds an extra first argument), based on the state of use_extra_arg. 10033965Sjdp For free, do not use ?:, since some compilers, like the MIPS compilers, 10133965Sjdp do not allow (expr) ? void : void. */ 10233965Sjdp 10360484Sobrien#if defined (__STDC__) && __STDC__ 10433965Sjdp#define CALL_CHUNKFUN(h, size) \ 10533965Sjdp (((h) -> use_extra_arg) \ 10633965Sjdp ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ 10760484Sobrien : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size))) 10860484Sobrien 10960484Sobrien#define CALL_FREEFUN(h, old_chunk) \ 11060484Sobrien do { \ 11160484Sobrien if ((h) -> use_extra_arg) \ 11260484Sobrien (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ 11360484Sobrien else \ 11460484Sobrien (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \ 11560484Sobrien } while (0) 11660484Sobrien#else 11760484Sobrien#define CALL_CHUNKFUN(h, size) \ 11860484Sobrien (((h) -> use_extra_arg) \ 11960484Sobrien ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ 12033965Sjdp : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size))) 12133965Sjdp 12233965Sjdp#define CALL_FREEFUN(h, old_chunk) \ 12333965Sjdp do { \ 12433965Sjdp if ((h) -> use_extra_arg) \ 12533965Sjdp (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ 12633965Sjdp else \ 12733965Sjdp (*(void (*) ()) (h)->freefun) ((old_chunk)); \ 12833965Sjdp } while (0) 12960484Sobrien#endif 13033965Sjdp 13133965Sjdp 13233965Sjdp/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). 13333965Sjdp Objects start on multiples of ALIGNMENT (0 means use default). 13433965Sjdp CHUNKFUN is the function to use to allocate chunks, 13533965Sjdp and FREEFUN the function to free them. 13633965Sjdp 13733965Sjdp Return nonzero if successful, zero if out of memory. 13833965Sjdp To recover from an out of memory error, 13933965Sjdp free up some memory, then call this again. */ 14033965Sjdp 14133965Sjdpint 142218822Sdim_obstack_begin (struct obstack *h, int size, int alignment, 143218822Sdim POINTER (*chunkfun) (long), void (*freefun) (void *)) 14433965Sjdp{ 14533965Sjdp register struct _obstack_chunk *chunk; /* points to new chunk */ 14633965Sjdp 14733965Sjdp if (alignment == 0) 14860484Sobrien alignment = (int) DEFAULT_ALIGNMENT; 14933965Sjdp if (size == 0) 15033965Sjdp /* Default size is what GNU malloc can fit in a 4096-byte block. */ 15133965Sjdp { 15233965Sjdp /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. 15333965Sjdp Use the values for range checking, because if range checking is off, 15433965Sjdp the extra bytes won't be missed terribly, but if range checking is on 15533965Sjdp and we used a larger request, a whole extra 4096 bytes would be 15633965Sjdp allocated. 15733965Sjdp 15833965Sjdp These number are irrelevant to the new GNU malloc. I suspect it is 15933965Sjdp less sensitive to the size of the request. */ 16033965Sjdp int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) 16133965Sjdp + 4 + DEFAULT_ROUNDING - 1) 16233965Sjdp & ~(DEFAULT_ROUNDING - 1)); 16333965Sjdp size = 4096 - extra; 16433965Sjdp } 16533965Sjdp 16660484Sobrien h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; 16760484Sobrien h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; 16833965Sjdp h->chunk_size = size; 16933965Sjdp h->alignment_mask = alignment - 1; 17033965Sjdp h->use_extra_arg = 0; 17133965Sjdp 17233965Sjdp chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); 17333965Sjdp if (!chunk) 17460484Sobrien (*obstack_alloc_failed_handler) (); 17533965Sjdp h->next_free = h->object_base = chunk->contents; 17633965Sjdp h->chunk_limit = chunk->limit 17733965Sjdp = (char *) chunk + h->chunk_size; 17833965Sjdp chunk->prev = 0; 17933965Sjdp /* The initial chunk now contains no empty object. */ 18033965Sjdp h->maybe_empty_object = 0; 18160484Sobrien h->alloc_failed = 0; 18233965Sjdp return 1; 18333965Sjdp} 18433965Sjdp 18533965Sjdpint 186218822Sdim_obstack_begin_1 (struct obstack *h, int size, int alignment, 187218822Sdim POINTER (*chunkfun) (POINTER, long), 188218822Sdim void (*freefun) (POINTER, POINTER), POINTER arg) 18933965Sjdp{ 19033965Sjdp register struct _obstack_chunk *chunk; /* points to new chunk */ 19133965Sjdp 19233965Sjdp if (alignment == 0) 19360484Sobrien alignment = (int) DEFAULT_ALIGNMENT; 19433965Sjdp if (size == 0) 19533965Sjdp /* Default size is what GNU malloc can fit in a 4096-byte block. */ 19633965Sjdp { 19733965Sjdp /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. 19833965Sjdp Use the values for range checking, because if range checking is off, 19933965Sjdp the extra bytes won't be missed terribly, but if range checking is on 20033965Sjdp and we used a larger request, a whole extra 4096 bytes would be 20133965Sjdp allocated. 20233965Sjdp 20333965Sjdp These number are irrelevant to the new GNU malloc. I suspect it is 20433965Sjdp less sensitive to the size of the request. */ 20533965Sjdp int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) 20633965Sjdp + 4 + DEFAULT_ROUNDING - 1) 20733965Sjdp & ~(DEFAULT_ROUNDING - 1)); 20833965Sjdp size = 4096 - extra; 20933965Sjdp } 21033965Sjdp 21160484Sobrien h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; 21260484Sobrien h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; 21333965Sjdp h->chunk_size = size; 21433965Sjdp h->alignment_mask = alignment - 1; 21533965Sjdp h->extra_arg = arg; 21633965Sjdp h->use_extra_arg = 1; 21733965Sjdp 21833965Sjdp chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); 21933965Sjdp if (!chunk) 22060484Sobrien (*obstack_alloc_failed_handler) (); 22133965Sjdp h->next_free = h->object_base = chunk->contents; 22233965Sjdp h->chunk_limit = chunk->limit 22333965Sjdp = (char *) chunk + h->chunk_size; 22433965Sjdp chunk->prev = 0; 22533965Sjdp /* The initial chunk now contains no empty object. */ 22633965Sjdp h->maybe_empty_object = 0; 22760484Sobrien h->alloc_failed = 0; 22833965Sjdp return 1; 22933965Sjdp} 23033965Sjdp 23133965Sjdp/* Allocate a new current chunk for the obstack *H 23233965Sjdp on the assumption that LENGTH bytes need to be added 23333965Sjdp to the current object, or a new object of length LENGTH allocated. 23433965Sjdp Copies any partial object from the end of the old chunk 23533965Sjdp to the beginning of the new one. */ 23633965Sjdp 23733965Sjdpvoid 238218822Sdim_obstack_newchunk (struct obstack *h, int length) 23933965Sjdp{ 24033965Sjdp register struct _obstack_chunk *old_chunk = h->chunk; 24133965Sjdp register struct _obstack_chunk *new_chunk; 24233965Sjdp register long new_size; 24360484Sobrien register long obj_size = h->next_free - h->object_base; 24460484Sobrien register long i; 24560484Sobrien long already; 24633965Sjdp 24733965Sjdp /* Compute size for new chunk. */ 24833965Sjdp new_size = (obj_size + length) + (obj_size >> 3) + 100; 24933965Sjdp if (new_size < h->chunk_size) 25033965Sjdp new_size = h->chunk_size; 25133965Sjdp 25233965Sjdp /* Allocate and initialize the new chunk. */ 25333965Sjdp new_chunk = CALL_CHUNKFUN (h, new_size); 25433965Sjdp if (!new_chunk) 25560484Sobrien (*obstack_alloc_failed_handler) (); 25633965Sjdp h->chunk = new_chunk; 25733965Sjdp new_chunk->prev = old_chunk; 25833965Sjdp new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; 25933965Sjdp 26033965Sjdp /* Move the existing object to the new chunk. 26133965Sjdp Word at a time is fast and is safe if the object 26233965Sjdp is sufficiently aligned. */ 26333965Sjdp if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT) 26433965Sjdp { 26533965Sjdp for (i = obj_size / sizeof (COPYING_UNIT) - 1; 26633965Sjdp i >= 0; i--) 26733965Sjdp ((COPYING_UNIT *)new_chunk->contents)[i] 26833965Sjdp = ((COPYING_UNIT *)h->object_base)[i]; 26933965Sjdp /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT, 27033965Sjdp but that can cross a page boundary on a machine 27133965Sjdp which does not do strict alignment for COPYING_UNITS. */ 27233965Sjdp already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT); 27333965Sjdp } 27433965Sjdp else 27533965Sjdp already = 0; 27633965Sjdp /* Copy remaining bytes one by one. */ 27733965Sjdp for (i = already; i < obj_size; i++) 27833965Sjdp new_chunk->contents[i] = h->object_base[i]; 27933965Sjdp 28033965Sjdp /* If the object just copied was the only data in OLD_CHUNK, 28133965Sjdp free that chunk and remove it from the chain. 28233965Sjdp But not if that chunk might contain an empty object. */ 28333965Sjdp if (h->object_base == old_chunk->contents && ! h->maybe_empty_object) 28433965Sjdp { 28533965Sjdp new_chunk->prev = old_chunk->prev; 28633965Sjdp CALL_FREEFUN (h, old_chunk); 28733965Sjdp } 28833965Sjdp 28933965Sjdp h->object_base = new_chunk->contents; 29033965Sjdp h->next_free = h->object_base + obj_size; 29133965Sjdp /* The new chunk certainly contains no empty object yet. */ 29233965Sjdp h->maybe_empty_object = 0; 29333965Sjdp} 29433965Sjdp 29533965Sjdp/* Return nonzero if object OBJ has been allocated from obstack H. 29633965Sjdp This is here for debugging. 29733965Sjdp If you use it in a program, you are probably losing. */ 29833965Sjdp 29933965Sjdp/* Suppress -Wmissing-prototypes warning. We don't want to declare this in 30033965Sjdp obstack.h because it is just for debugging. */ 30133965Sjdpint _obstack_allocated_p (struct obstack *h, POINTER obj); 30233965Sjdp 30333965Sjdpint 304218822Sdim_obstack_allocated_p (struct obstack *h, POINTER obj) 30533965Sjdp{ 30633965Sjdp register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ 30733965Sjdp register struct _obstack_chunk *plp; /* point to previous chunk if any */ 30833965Sjdp 30933965Sjdp lp = (h)->chunk; 31033965Sjdp /* We use >= rather than > since the object cannot be exactly at 31133965Sjdp the beginning of the chunk but might be an empty object exactly 31233965Sjdp at the end of an adjacent chunk. */ 31333965Sjdp while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) 31433965Sjdp { 31533965Sjdp plp = lp->prev; 31633965Sjdp lp = plp; 31733965Sjdp } 31833965Sjdp return lp != 0; 31933965Sjdp} 32033965Sjdp 32133965Sjdp/* Free objects in obstack H, including OBJ and everything allocate 32233965Sjdp more recently than OBJ. If OBJ is zero, free everything in H. */ 32333965Sjdp 32433965Sjdp#undef obstack_free 32533965Sjdp 32633965Sjdp/* This function has two names with identical definitions. 32733965Sjdp This is the first one, called from non-ANSI code. */ 32833965Sjdp 32933965Sjdpvoid 330218822Sdim_obstack_free (struct obstack *h, POINTER obj) 33133965Sjdp{ 33233965Sjdp register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ 33333965Sjdp register struct _obstack_chunk *plp; /* point to previous chunk if any */ 33433965Sjdp 33533965Sjdp lp = h->chunk; 33633965Sjdp /* We use >= because there cannot be an object at the beginning of a chunk. 33733965Sjdp But there can be an empty object at that address 33833965Sjdp at the end of another chunk. */ 33933965Sjdp while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) 34033965Sjdp { 34133965Sjdp plp = lp->prev; 34233965Sjdp CALL_FREEFUN (h, lp); 34333965Sjdp lp = plp; 34433965Sjdp /* If we switch chunks, we can't tell whether the new current 34533965Sjdp chunk contains an empty object, so assume that it may. */ 34633965Sjdp h->maybe_empty_object = 1; 34733965Sjdp } 34833965Sjdp if (lp) 34933965Sjdp { 35033965Sjdp h->object_base = h->next_free = (char *) (obj); 35133965Sjdp h->chunk_limit = lp->limit; 35233965Sjdp h->chunk = lp; 35333965Sjdp } 35433965Sjdp else if (obj != 0) 35533965Sjdp /* obj is not in any of the chunks! */ 35633965Sjdp abort (); 35733965Sjdp} 35833965Sjdp 35933965Sjdp/* This function is used from ANSI code. */ 36033965Sjdp 36133965Sjdpvoid 362218822Sdimobstack_free (struct obstack *h, POINTER obj) 36333965Sjdp{ 36433965Sjdp register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ 36533965Sjdp register struct _obstack_chunk *plp; /* point to previous chunk if any */ 36633965Sjdp 36733965Sjdp lp = h->chunk; 36833965Sjdp /* We use >= because there cannot be an object at the beginning of a chunk. 36933965Sjdp But there can be an empty object at that address 37033965Sjdp at the end of another chunk. */ 37133965Sjdp while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) 37233965Sjdp { 37333965Sjdp plp = lp->prev; 37433965Sjdp CALL_FREEFUN (h, lp); 37533965Sjdp lp = plp; 37633965Sjdp /* If we switch chunks, we can't tell whether the new current 37733965Sjdp chunk contains an empty object, so assume that it may. */ 37833965Sjdp h->maybe_empty_object = 1; 37933965Sjdp } 38033965Sjdp if (lp) 38133965Sjdp { 38233965Sjdp h->object_base = h->next_free = (char *) (obj); 38333965Sjdp h->chunk_limit = lp->limit; 38433965Sjdp h->chunk = lp; 38533965Sjdp } 38633965Sjdp else if (obj != 0) 38733965Sjdp /* obj is not in any of the chunks! */ 38833965Sjdp abort (); 38933965Sjdp} 39033965Sjdp 39160484Sobrienint 392218822Sdim_obstack_memory_used (struct obstack *h) 39360484Sobrien{ 39460484Sobrien register struct _obstack_chunk* lp; 39560484Sobrien register int nbytes = 0; 39660484Sobrien 39760484Sobrien for (lp = h->chunk; lp != 0; lp = lp->prev) 39860484Sobrien { 39960484Sobrien nbytes += lp->limit - (char *) lp; 40060484Sobrien } 40160484Sobrien return nbytes; 40260484Sobrien} 40360484Sobrien 40460484Sobrien/* Define the error handler. */ 40560484Sobrien#ifndef _ 40689857Sobrien# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC 40760484Sobrien# include <libintl.h> 40860484Sobrien# ifndef _ 40960484Sobrien# define _(Str) gettext (Str) 41060484Sobrien# endif 41160484Sobrien# else 41260484Sobrien# define _(Str) (Str) 41360484Sobrien# endif 41460484Sobrien#endif 41560484Sobrien 41660484Sobrienstatic void 417218822Sdimprint_and_abort (void) 41860484Sobrien{ 41960484Sobrien fputs (_("memory exhausted\n"), stderr); 42060484Sobrien exit (obstack_exit_failure); 42160484Sobrien} 42260484Sobrien 42333965Sjdp#if 0 42433965Sjdp/* These are now turned off because the applications do not use it 42533965Sjdp and it uses bcopy via obstack_grow, which causes trouble on sysV. */ 42633965Sjdp 42733965Sjdp/* Now define the functional versions of the obstack macros. 42833965Sjdp Define them to simply use the corresponding macros to do the job. */ 42933965Sjdp 43033965Sjdp/* The function names appear in parentheses in order to prevent 43133965Sjdp the macro-definitions of the names from being expanded there. */ 43233965Sjdp 433218822SdimPOINTER (obstack_base) (struct obstack *obstack) 43433965Sjdp{ 43533965Sjdp return obstack_base (obstack); 43633965Sjdp} 43733965Sjdp 438218822SdimPOINTER (obstack_next_free) (struct obstack *obstack) 43933965Sjdp{ 44033965Sjdp return obstack_next_free (obstack); 44133965Sjdp} 44233965Sjdp 443218822Sdimint (obstack_object_size) (struct obstack *obstack) 44433965Sjdp{ 44533965Sjdp return obstack_object_size (obstack); 44633965Sjdp} 44733965Sjdp 448218822Sdimint (obstack_room) (struct obstack *obstack) 44933965Sjdp{ 45033965Sjdp return obstack_room (obstack); 45133965Sjdp} 45233965Sjdp 453218822Sdimint (obstack_make_room) (struct obstack *obstack, int length) 45460484Sobrien{ 45560484Sobrien return obstack_make_room (obstack, length); 45660484Sobrien} 45760484Sobrien 458218822Sdimvoid (obstack_grow) (struct obstack *obstack, POINTER pointer, int length) 45933965Sjdp{ 46033965Sjdp obstack_grow (obstack, pointer, length); 46133965Sjdp} 46233965Sjdp 463218822Sdimvoid (obstack_grow0) (struct obstack *obstack, POINTER pointer, int length) 46433965Sjdp{ 46533965Sjdp obstack_grow0 (obstack, pointer, length); 46633965Sjdp} 46733965Sjdp 468218822Sdimvoid (obstack_1grow) (struct obstack *obstack, int character) 46933965Sjdp{ 47033965Sjdp obstack_1grow (obstack, character); 47133965Sjdp} 47233965Sjdp 473218822Sdimvoid (obstack_blank) (struct obstack *obstack, int length) 47433965Sjdp{ 47533965Sjdp obstack_blank (obstack, length); 47633965Sjdp} 47733965Sjdp 478218822Sdimvoid (obstack_1grow_fast) (struct obstack *obstack, int character) 47933965Sjdp{ 48033965Sjdp obstack_1grow_fast (obstack, character); 48133965Sjdp} 48233965Sjdp 483218822Sdimvoid (obstack_blank_fast) (struct obstack *obstack, int length) 48433965Sjdp{ 48533965Sjdp obstack_blank_fast (obstack, length); 48633965Sjdp} 48733965Sjdp 488218822SdimPOINTER (obstack_finish) (struct obstack *obstack) 48933965Sjdp{ 49033965Sjdp return obstack_finish (obstack); 49133965Sjdp} 49233965Sjdp 493218822SdimPOINTER (obstack_alloc) (struct obstack *obstack, int length) 49433965Sjdp{ 49533965Sjdp return obstack_alloc (obstack, length); 49633965Sjdp} 49733965Sjdp 498218822SdimPOINTER (obstack_copy) (struct obstack *obstack, POINTER pointer, int length) 49933965Sjdp{ 50033965Sjdp return obstack_copy (obstack, pointer, length); 50133965Sjdp} 50233965Sjdp 503218822SdimPOINTER (obstack_copy0) (struct obstack *obstack, POINTER pointer, int length) 50433965Sjdp{ 50533965Sjdp return obstack_copy0 (obstack, pointer, length); 50633965Sjdp} 50733965Sjdp 50833965Sjdp#endif /* 0 */ 50933965Sjdp 51033965Sjdp#endif /* !ELIDE_CODE */ 511