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

lslOpList.c File Reference

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

Go to the source code of this file.

Functions

lslOpList lslOpList_new ()
void lslOpList_add (lslOpList s, lslOp el)
cstring lslOpList_unparse (lslOpList s)
void lslOpList_free (lslOpList s)


Function Documentation

void lslOpList_add ( lslOpList s,
lslOp el )
 

Definition at line 74 of file lslOpList.c.

00075 {
00076   llassert (lslOpListBASESIZE != 0);
00077 
00078   if (s->nspace <= 0)
00079     {
00080       lslOpList_grow (s);
00081     }
00082 
00083   s->nspace--;
00084   s->elements[s->nelements] = el;
00085   s->nelements++;
00086 }

void lslOpList_free ( lslOpList s )
 

Definition at line 103 of file lslOpList.c.

00104 {
00105   sfree (s->elements);  
00106   sfree (s);
00107 }

lslOpList lslOpList_new ( )
 

Definition at line 36 of file lslOpList.c.

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

cstring lslOpList_unparse ( lslOpList s )
 

Definition at line 89 of file lslOpList.c.

00090 {
00091   int i;
00092   cstring st = cstring_undefined;
00093 
00094   for (i = 0; i < s->nelements; i++)
00095     {
00096       st = message ("%q%q\n", st, lslOp_unparse (s->elements[i]));
00097     }
00098 
00099   return st;
00100 }


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