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

traitRefNodeList.c File Reference

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

Go to the source code of this file.

Functions

traitRefNodeList traitRefNodeList_new ()
traitRefNodeList traitRefNodeList_add (traitRefNodeList s, traitRefNode el)
cstring traitRefNodeList_unparse (traitRefNodeList s)
void traitRefNodeList_free (traitRefNodeList s)


Function Documentation

traitRefNodeList traitRefNodeList_add ( traitRefNodeList s,
traitRefNode el )
 

Definition at line 68 of file traitRefNodeList.c.

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

void traitRefNodeList_free ( traitRefNodeList s )
 

Definition at line 101 of file traitRefNodeList.c.

Referenced by interfaceNode_free().

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

traitRefNodeList traitRefNodeList_new ( )
 

Definition at line 36 of file traitRefNodeList.c.

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

cstring traitRefNodeList_unparse ( traitRefNodeList s )
 

Definition at line 81 of file traitRefNodeList.c.

00082 {
00083   cstring st = cstring_undefined;
00084 
00085   traitRefNodeList_elements (s, current)
00086   {
00087     st = message ("%quses (%q)", st, printLeaves2 (current->traitid));
00088 
00089     if (current->rename != 0)
00090       {
00091         st = message ("%q (%q)", st, renamingNode_unparse (current->rename));
00092       }
00093 
00094     st = message ("%q\n", st);
00095   } end_traitRefNodeList_elements;
00096 
00097   return (st);
00098 }


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