osprey/cygnus/libiberty/obstack.c File Reference

#include "obstack.h"
#include <stdio.h>

Include dependency graph for obstack.c:

Go to the source code of this file.

Data Types

type  fooalign
union  fooround

Defines

#define OBSTACK_INTERFACE_VERSION   1
#define POINTER   char *
#define DEFAULT_ALIGNMENT   ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
#define DEFAULT_ROUNDING   (sizeof (union fooround))
#define COPYING_UNIT   int
#define EXIT_FAILURE   1
#define CALL_CHUNKFUN(h, size)
#define CALL_FREEFUN(h, old_chunk)
#define _(Str)   (Str)

Functions/Subroutines

static void print_and_abort ()
int _obstack_begin (struct obstack *h, int size, int alignment, POINTER(*)() chunkfun, void(*)() freefun)
int _obstack_begin_1 (struct obstack *h, int size, int alignment, POINTER(*)() chunkfun, void(*)() freefun, POINTER arg)
void _obstack_newchunk (struct obstack *h, int length)
int _obstack_allocated_p (struct obstack *h, POINTER obj)
void _obstack_free (struct obstack *h, POINTER obj)
void obstack_free (struct obstack *h, POINTER obj)
int _obstack_memory_used (struct obstack *h)

Variables

void(* obstack_alloc_failed_handler )() = print_and_abort
int obstack_exit_failure = EXIT_FAILURE
struct obstack_obstack


Define Documentation

#define _ ( Str   )     (Str)

Definition at line 460 of file obstack.c.

#define CALL_CHUNKFUN ( h,
size   ) 

Value:

(((h) -> use_extra_arg) \
   ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
   : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))

Definition at line 126 of file obstack.c.

Referenced by _obstack_begin(), _obstack_begin_1(), and _obstack_newchunk().

#define CALL_FREEFUN ( h,
old_chunk   ) 

Value:

do { \
    if ((h) -> use_extra_arg) \
      (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
    else \
      (*(void (*) ()) (h)->freefun) ((old_chunk)); \
  } while (0)

Definition at line 131 of file obstack.c.

Referenced by _obstack_free(), _obstack_newchunk(), and obstack_free().

#define COPYING_UNIT   int

Definition at line 76 of file obstack.c.

Referenced by _obstack_newchunk().

#define DEFAULT_ALIGNMENT   ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))

Definition at line 63 of file obstack.c.

Referenced by _obstack_begin(), _obstack_begin_1(), and _obstack_newchunk().

#define DEFAULT_ROUNDING   (sizeof (union fooround))

Definition at line 69 of file obstack.c.

Referenced by _obstack_begin(), and _obstack_begin_1().

#define EXIT_FAILURE   1

Definition at line 97 of file obstack.c.

#define OBSTACK_INTERFACE_VERSION   1

Definition at line 32 of file obstack.c.

#define POINTER   char *


Function Documentation

int _obstack_allocated_p ( struct obstack h,
POINTER  obj 
)

Definition at line 345 of file obstack.c.

int _obstack_begin ( struct obstack h,
int  size,
int  alignment,
POINTER (*) ()  chunkfun,
void (*) ()  freefun 
)

int _obstack_begin_1 ( struct obstack h,
int  size,
int  alignment,
POINTER (*) ()  chunkfun,
void (*) ()  freefun,
POINTER  arg 
)

void _obstack_free ( struct obstack h,
POINTER  obj 
)

Definition at line 373 of file obstack.c.

int _obstack_memory_used ( struct obstack h  ) 

Definition at line 439 of file obstack.c.

void _obstack_newchunk ( struct obstack h,
int  length 
)

Definition at line 275 of file obstack.c.

void obstack_free ( struct obstack h,
POINTER  obj 
)

Definition at line 407 of file obstack.c.

static void print_and_abort ( void   )  [static]

Definition at line 465 of file obstack.c.

References _, exit(), fputs(), and obstack_exit_failure.


Variable Documentation

Definition at line 104 of file obstack.c.

void(* obstack_alloc_failed_handler)() = print_and_abort

int obstack_exit_failure = EXIT_FAILURE

Definition at line 99 of file obstack.c.


Generated on Wed Apr 8 15:03:16 2009 for Open64 by  doxygen 1.5.6