osprey-gcc-4.2.0/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   void *
#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 (void)
int _obstack_begin (struct obstack *h, int size, int alignment, POINTER(*chunkfun)(long), void(*freefun)(void *))
int _obstack_begin_1 (struct obstack *h, int size, int alignment, POINTER(*chunkfun)(POINTER, long), void(*freefun)(POINTER, POINTER), 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 )(void) = print_and_abort
int obstack_exit_failure = EXIT_FAILURE
struct obstack_obstack


Define Documentation

#define _ ( Str   )     (Str)

Definition at line 412 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 117 of file obstack.c.

#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 122 of file obstack.c.

#define COPYING_UNIT   int

Definition at line 72 of file obstack.c.

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

Definition at line 59 of file obstack.c.

#define DEFAULT_ROUNDING   (sizeof (union fooround))

Definition at line 65 of file obstack.c.

#define EXIT_FAILURE   1

Definition at line 88 of file obstack.c.

#define OBSTACK_INTERFACE_VERSION   1

Definition at line 32 of file obstack.c.

#define POINTER   void *

Definition at line 55 of file obstack.c.


Function Documentation

int _obstack_allocated_p ( struct obstack h,
POINTER  obj 
)

Definition at line 345 of file obstack.c.

References _obstack_chunk::limit, and _obstack_chunk::prev.

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

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

void _obstack_free ( struct obstack h,
POINTER  obj 
)

int _obstack_memory_used ( struct obstack h  ) 

Definition at line 392 of file obstack.c.

References obstack::chunk, _obstack_chunk::limit, and _obstack_chunk::prev.

void _obstack_newchunk ( struct obstack h,
int  length 
)

void obstack_free ( struct obstack h,
POINTER  obj 
)

static void print_and_abort ( void   )  [static]

Definition at line 417 of file obstack.c.

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


Variable Documentation

Definition at line 95 of file obstack.c.

void(* obstack_alloc_failed_handler)(void) = print_and_abort

int obstack_exit_failure = EXIT_FAILURE

Definition at line 90 of file obstack.c.

Referenced by print_and_abort().


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