Main Page | Alphabetical List | Class List | File List | Class Members | File Members

alloc.c File Reference

#include "bary.h"
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for alloc.c:

Include dependency graph

Go to the source code of this file.

Defines

#define NULL   0

Functions

DLLIST dllist_alloc (GNODE node, DLLIST pred)
void dllist_free (DLLIST x)
void dllist_free_all (DLLIST x)
void * myalloc (unsigned size)
GNLIST tmpnodelist_alloc (void)

Variables

DLLIST dllist_freelist = NULL
GNLIST ncons_freelist = NULL
GNLIST tmpnconslist = NULL


Define Documentation

#define NULL   0
 

Definition at line 1 of file alloc.c.

Referenced by dllist_alloc(), and tmpnodelist_alloc().


Function Documentation

DLLIST dllist_alloc GNODE  node,
DLLIST  pred
 

Definition at line 38 of file alloc.c.

References debugmessage(), DLLIST, dllist_freelist, DNODE, DPRED, DSUCC, GNODE, myalloc(), and NULL.

Referenced by gs_ide1500(), and gs_ide1501().

00042 {
00043         DLLIST  h;
00044 
00045         debugmessage("dllist_alloc","");
00046         if (dllist_freelist) {
00047                 h = dllist_freelist;
00048                 dllist_freelist = DSUCC(dllist_freelist);
00049         }
00050         else    h = (DLLIST)myalloc(sizeof(struct dllist));
00051         DNODE(h) = node;
00052         DPRED(h) = pred;
00053         DSUCC(h) = NULL;
00054         return(h);
00055 }

void dllist_free DLLIST  x  ) 
 

Definition at line 68 of file alloc.c.

References debugmessage(), DLLIST, dllist_freelist, and DSUCC.

Referenced by gs_ide1513(), and gs_ide1514().

00071 {
00072         debugmessage("dllist_free","");
00073         DSUCC(x) = dllist_freelist;
00074         dllist_freelist = x;
00075 }

void dllist_free_all DLLIST  x  ) 
 

Definition at line 85 of file alloc.c.

References debugmessage(), DLLIST, dllist_freelist, and DSUCC.

00088 {
00089         DLLIST h;
00090 
00091         debugmessage("dllist_free","");
00092         if (x) {
00093                 h = x;
00094                 while (DSUCC(h)) h = DSUCC(h);
00095                 DSUCC(h) = dllist_freelist;
00096                 dllist_freelist = x;
00097         }
00098 }

void* myalloc unsigned  size  ) 
 

Definition at line 102 of file alloc.c.

Referenced by dllist_alloc(), and tmpnodelist_alloc().

00103 {
00104     return malloc(size);
00105 }

GNLIST tmpnodelist_alloc void   ) 
 

Definition at line 119 of file alloc.c.

References debugmessage(), GNINTERN, GNLIST, GNNEXT, GNNODE, myalloc(), ncons_freelist, NULL, and tmpnconslist.

Referenced by copy_layers().

00120 {
00121         GNLIST  h;
00122 
00123         debugmessage("tmpnodelist_alloc","");
00124         if (ncons_freelist) {
00125                 h = ncons_freelist;
00126                 ncons_freelist = GNINTERN(ncons_freelist);
00127         }
00128         else    h = (GNLIST)myalloc(sizeof(struct gnlist));
00129         GNINTERN(h) = tmpnconslist;
00130         GNNODE(h)   = NULL;
00131         GNNEXT(h)   = NULL;
00132         tmpnconslist = h;
00133         return(h);
00134 }


Variable Documentation

DLLIST dllist_freelist = NULL [static]
 

Definition at line 23 of file alloc.c.

Referenced by dllist_alloc(), dllist_free(), and dllist_free_all().

GNLIST ncons_freelist = NULL [static]
 

Definition at line 116 of file alloc.c.

Referenced by tmpnodelist_alloc().

GNLIST tmpnconslist = NULL [static]
 

Definition at line 117 of file alloc.c.

Referenced by tmpnodelist_alloc().


Generated on Sat Aug 6 11:49:19 2005 for VCGIntrospector by doxygen 1.3.6