X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fobstack_win%2Fobstack.c;h=ae6e2a581cbdf5a3de8ee5f0ef323f8e897db6df;hb=d4aa5f46b4bd5d72b928b921b8e6775c6ef72576;hp=2c82bf86bea20f550f70e31d6dd8ec4b35e2ad2c;hpb=be2960bc9ccda691eba3a031ec3a37d480c07f01;p=libfirm diff --git a/ir/obstack_win/obstack.c b/ir/obstack_win/obstack.c index 2c82bf86b..ae6e2a581 100644 --- a/ir/obstack_win/obstack.c +++ b/ir/obstack_win/obstack.c @@ -39,7 +39,8 @@ program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ -#include /* Random thing to get __GNU_LIBRARY__. */ +/* Random thing to get __GNU_LIBRARY__. */ +#include #if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 #include #if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION @@ -146,8 +147,7 @@ struct obstack *_obstack; To recover from an out of memory error, free up some memory, then call this again. */ -int -_obstack_begin (h, size, alignment, chunkfun, freefun) +int _obstack_begin(h, size, alignment, chunkfun, freefun) struct obstack *h; int size; int alignment; @@ -204,8 +204,7 @@ _obstack_begin (h, size, alignment, chunkfun, freefun) return 1; } -int -_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg) +int _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg) struct obstack *h; int size; int alignment; @@ -270,14 +269,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg) Copies any partial object from the end of the old chunk to the beginning of the new one. */ -void -_obstack_newchunk (h, length) +void _obstack_newchunk (h, length) struct obstack *h; int length; { register struct _obstack_chunk *old_chunk = h->chunk; register struct _obstack_chunk *new_chunk; - register long new_size; + register long new_size; register long obj_size = h->next_free - h->object_base; register long i; long already; @@ -340,13 +338,12 @@ _obstack_newchunk (h, length) int _obstack_allocated_p (struct obstack *h, POINTER obj); #endif -int -_obstack_allocated_p (h, obj) +int _obstack_allocated_p (h, obj) struct obstack *h; POINTER obj; { - register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ - register struct _obstack_chunk *plp; /* point to previous chunk if any */ + register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ + register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = (h)->chunk; /* We use >= rather than > since the object cannot be exactly at @@ -368,13 +365,12 @@ _obstack_allocated_p (h, obj) /* This function has two names with identical definitions. This is the first one, called from non-ANSI code. */ -void -_obstack_free (h, obj) +void _obstack_free (h, obj) struct obstack *h; POINTER obj; { - register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ - register struct _obstack_chunk *plp; /* point to previous chunk if any */ + register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ + register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = h->chunk; /* We use >= because there cannot be an object at the beginning of a chunk. @@ -402,13 +398,12 @@ _obstack_free (h, obj) /* This function is used from ANSI code. */ -void -obstack_free (h, obj) +void obstack_free (h, obj) struct obstack *h; POINTER obj; { - register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ - register struct _obstack_chunk *plp; /* point to previous chunk if any */ + register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ + register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = h->chunk; /* We use >= because there cannot be an object at the beginning of a chunk. @@ -434,8 +429,7 @@ obstack_free (h, obj) abort (); } -int -_obstack_memory_used (h) +int _obstack_memory_used (h) struct obstack *h; { register struct _obstack_chunk* lp; @@ -460,8 +454,7 @@ _obstack_memory_used (h) # endif #endif -static void -print_and_abort () +static void print_and_abort(void) { fputs (_("memory exhausted\n"), stderr); exit (obstack_exit_failure); @@ -589,4 +582,4 @@ POINTER (obstack_copy0) (obstack, pointer, length) #endif /* 0 */ -#endif /* !ELIDE_CODE */ +#endif /* !ELIDE_CODE */