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

programNodeList.c File Reference

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

Go to the source code of this file.

Functions

programNodeList programNodeList_new ()
void programNodeList_addh (programNodeList s, programNode el)
cstring programNodeList_unparse (programNodeList s)
void programNodeList_free (programNodeList s)


Function Documentation

void programNodeList_addh ( programNodeList s,
programNode el )
 

Definition at line 68 of file programNodeList.c.

00069 {
00070   if (s->nspace <= 0)
00071     programNodeList_grow (s);
00072 
00073   s->nspace--;
00074   s->elements[s->nelements] = el;
00075   s->nelements++;
00076 }

void programNodeList_free ( programNodeList s )
 

Definition at line 101 of file programNodeList.c.

Referenced by programNode_free().

00102 {
00103   int i;
00104   for (i = 0; i < s->nelements; i++)
00105     {
00106       programNode_free (s->elements[i]); 
00107     }
00108 
00109   sfree (s->elements); 
00110   sfree (s);
00111 }

programNodeList programNodeList_new ( )
 

Definition at line 36 of file programNodeList.c.

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

cstring programNodeList_unparse ( programNodeList s )
 

Definition at line 79 of file programNodeList.c.

Referenced by programNode_unparse().

00080 {
00081   bool first = TRUE;
00082   cstring st = cstring_undefined;
00083 
00084   programNodeList_elements (s, current)
00085   {
00086     if (first)
00087       {
00088         st = programNode_unparse (current);
00089         first = FALSE;
00090       }
00091     else
00092       {
00093         st = message ("%q; %q", st, programNode_unparse (current));
00094       }
00095   } end_programNodeList_elements;
00096 
00097   return st;
00098 }


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