Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

lsymbolList.c File Reference

#include "lclintMacros.nf"
#include "llbasic.h"

Go to the source code of this file.

Functions

lsymbolList lsymbolList_new ()
void lsymbolList_addh (lsymbolList s, lsymbol el)
void lsymbolList_free (lsymbolList s)


Function Documentation

void lsymbolList_addh ( lsymbolList s,
lsymbol el )
 

Definition at line 73 of file lsymbolList.c.

00074 {
00075   if (s->nspace <= 0)
00076     lsymbolList_grow (s);
00077 
00078   s->nspace--;
00079   s->elements[s->nelements] = el;
00080   s->nelements++;
00081 }

void lsymbolList_free ( lsymbolList s )
 

Definition at line 84 of file lsymbolList.c.

Referenced by sort_import().

00085 {
00086   int i;
00087   for (i = 0; i < s->nelements; i++)
00088     {
00089      /*      lsymbol_free (s->elements[i]); */
00090     }
00091 
00092   sfree (s->elements);       
00093   sfree (s);
00094 }

lsymbolList lsymbolList_new ( )
 

Definition at line 36 of file lsymbolList.c.

Referenced by sort_import().

00037 {
00038   lsymbolList s = (lsymbolList) dmalloc (sizeof (*s));
00039   
00040   s->nelements = 0;
00041 
00042   s->nspace = lsymbolListBASESIZE;
00043   s->elements = (lsymbol *) dmalloc (sizeof (*s->elements) * lsymbolListBASESIZE);
00044 
00045   return (s);
00046 }


Generated at Fri Nov 3 18:58:03 2000 for LCLint by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000