Home | History | Annotate | Download | only in lib

Lines Matching refs:obstack

1 /*	$NetBSD: obstack.h,v 1.1.1.1 2016/01/10 21:36:18 christos Exp $	*/
3 /* obstack.h - object stack macros
42 them before using any obstack macros.
44 Each independent stack is represented by a `struct obstack'.
45 Each of the obstack macros expects a pointer to such a structure
62 With obstacks, you can work differently. Use one obstack for all symbol
63 names. As you read a symbol, grow the name in the obstack gradually.
98 Exactly one object is growing in an obstack at any one time.
99 You can run one obstack per control block.
101 Because of the way we do it, you can `unwind' an obstack
164 struct obstack /* control current object in current chunk */
195 /* Declare the external functions we use; they are in obstack.c. */
198 extern void _obstack_newchunk (struct obstack *, int);
199 extern void _obstack_free (struct obstack *, void *);
200 extern int _obstack_begin (struct obstack *, int, int,
202 extern int _obstack_begin_1 (struct obstack *, int, int,
205 extern int _obstack_memory_used (struct obstack *);
220 void obstack_init (struct obstack *obstack);
222 void * obstack_alloc (struct obstack *obstack, int size);
224 void * obstack_copy (struct obstack *obstack, void *address, int size);
225 void * obstack_copy0 (struct obstack *obstack, void *address, int size);
227 void obstack_free (struct obstack *obstack, void *block);
229 void obstack_blank (struct obstack *obstack, int size);
231 void obstack_grow (struct obstack *obstack, void *data, int size);
232 void obstack_grow0 (struct obstack *obstack, void *data, int size);
234 void obstack_1grow (struct obstack *obstack, int data_char);
235 void obstack_ptr_grow (struct obstack *obstack, void *data);
236 void obstack_int_grow (struct obstack *obstack, int data);
238 void * obstack_finish (struct obstack *obstack);
240 int obstack_object_size (struct obstack *obstack);
242 int obstack_room (struct obstack *obstack);
243 void obstack_make_room (struct obstack *obstack, int size);
244 void obstack_1grow_fast (struct obstack *obstack, int data_char);
245 void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
246 void obstack_int_grow_fast (struct obstack *obstack, int data);
247 void obstack_blank_fast (struct obstack *obstack, int size);
249 void * obstack_base (struct obstack *obstack);
250 void * obstack_next_free (struct obstack *obstack);
251 int obstack_alignment_mask (struct obstack *obstack);
252 int obstack_chunk_size (struct obstack *obstack);
253 int obstack_memory_used (struct obstack *obstack);
365 # define obstack_object_size(OBSTACK) \
367 ({ struct obstack *__o = (OBSTACK); \
370 # define obstack_room(OBSTACK) \
372 ({ struct obstack *__o = (OBSTACK); \
375 # define obstack_make_room(OBSTACK,length) \
377 ({ struct obstack *__o = (OBSTACK); \
383 # define obstack_empty_p(OBSTACK) \
385 ({ struct obstack *__o = (OBSTACK); \
388 # define obstack_grow(OBSTACK,where,length) \
390 ({ struct obstack *__o = (OBSTACK); \
398 # define obstack_grow0(OBSTACK,where,length) \
400 ({ struct obstack *__o = (OBSTACK); \
409 # define obstack_1grow(OBSTACK,datum) \
411 ({ struct obstack *__o = (OBSTACK); \
417 /* These assume that the obstack alignment is good enough for pointers or ints,
421 # define obstack_ptr_grow(OBSTACK,datum) \
423 ({ struct obstack *__o = (OBSTACK); \
429 # define obstack_int_grow(OBSTACK,datum) \
431 ({ struct obstack *__o = (OBSTACK); \
440 # define obstack_blank(OBSTACK,length) \
442 ({ struct obstack *__o = (OBSTACK); \
449 # define obstack_alloc(OBSTACK,length) \
451 ({ struct obstack *__h = (OBSTACK); \
455 # define obstack_copy(OBSTACK,where,length) \
457 ({ struct obstack *__h = (OBSTACK); \
461 # define obstack_copy0(OBSTACK,where,length) \
463 ({ struct obstack *__h = (OBSTACK); \
469 # define obstack_finish(OBSTACK) \
471 ({ struct obstack *__o1 = (OBSTACK); \
485 # define obstack_free(OBSTACK, OBJ) \
487 ({ struct obstack *__o = (OBSTACK); \
600 #endif /* obstack.h */