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

declaratorInvNodeList.c File Reference

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

Go to the source code of this file.

Functions

declaratorInvNodeList declaratorInvNodeList_new ()
declaratorInvNodeList declaratorInvNodeList_add (declaratorInvNodeList s, declaratorInvNode el)
cstring declaratorInvNodeList_unparse (declaratorInvNodeList s)
void declaratorInvNodeList_free (declaratorInvNodeList s)


Function Documentation

declaratorInvNodeList declaratorInvNodeList_add ( declaratorInvNodeList s,
declaratorInvNode el )
 

Definition at line 75 of file declaratorInvNodeList.c.

00076 {
00077   if (s->nspace <= 0)
00078     {
00079       declaratorInvNodeList_grow (s);
00080     }
00081 
00082   s->nspace--;
00083   s->elements[s->nelements] = el;
00084   s->nelements++;
00085 
00086   return s;
00087 }

void declaratorInvNodeList_free ( declaratorInvNodeList s )
 

Definition at line 104 of file declaratorInvNodeList.c.

00105 {
00106   int i;
00107   for (i = 0; i < s->nelements; i++)
00108     {
00109       declaratorInvNode_free (s->elements[i]);
00110     }
00111   
00112   sfree (s->elements); 
00113   sfree (s);
00114 }

declaratorInvNodeList declaratorInvNodeList_new ( )
 

Definition at line 36 of file declaratorInvNodeList.c.

00037 {
00038   declaratorInvNodeList s = (declaratorInvNodeList) dmalloc (sizeof (*s));
00039 
00040   s->nelements = 0;
00041 
00042   s->nspace = declaratorInvNodeListBASESIZE;
00043   s->elements = (declaratorInvNode *) 
00044     dmalloc (sizeof (*s->elements) * declaratorInvNodeListBASESIZE);
00045 
00046   return (s);
00047 }

cstring declaratorInvNodeList_unparse ( declaratorInvNodeList s )
 

Definition at line 90 of file declaratorInvNodeList.c.

Referenced by exposedNode_unparse().

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


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