#include "lclintMacros.nf"#include "llbasic.h"Go to the source code of this file.
Functions | |
| stDeclNodeList | stDeclNodeList_new () |
| stDeclNodeList | stDeclNodeList_add (stDeclNodeList s, stDeclNode el) |
| stDeclNodeList | stDeclNodeList_copy (stDeclNodeList s) |
| cstring | stDeclNodeList_unparse (stDeclNodeList s) |
| void | stDeclNodeList_free (stDeclNodeList s) |
|
|
Definition at line 69 of file stDeclNodeList.c. Referenced by stDeclNodeList_copy(). 00070 {
00071 if (s->nspace <= 0)
00072 stDeclNodeList_grow (s);
00073
00074 s->nspace--;
00075 s->elements[s->nelements] = el;
00076 s->nelements++;
00077
00078 return s;
00079 }
|
|
|
Definition at line 82 of file stDeclNodeList.c. Referenced by makestrOrUnionNode(). 00083 {
00084 stDeclNodeList r = stDeclNodeList_new ();
00085
00086 stDeclNodeList_elements (s, x)
00087 {
00088 r = stDeclNodeList_add (r, stDeclNode_copy (x));
00089 } end_stDeclNodeList_elements;
00090
00091 return r;
00092 }
|
|
|
Definition at line 119 of file stDeclNodeList.c. 00120 {
00121 int i;
00122 for (i = 0; i < s->nelements; i++)
00123 {
00124 stDeclNode_free (s->elements[i]);
00125 }
00126
00127 sfree (s->elements);
00128 sfree (s);
00129 }
|
|
|
Definition at line 36 of file stDeclNodeList.c. Referenced by checkAndEnterTag(), makeForwardstrOrUnionNode(), and stDeclNodeList_copy(). 00037 {
00038 stDeclNodeList s = (stDeclNodeList) dmalloc (sizeof (*s));
00039
00040 s->nelements = 0;
00041 s->nspace = stDeclNodeListBASESIZE;
00042 s->elements = (stDeclNode *)
00043 dmalloc (sizeof (*s->elements) * stDeclNodeListBASESIZE);
00044
00045 return (s);
00046 }
|
|
|
Definition at line 95 of file stDeclNodeList.c. 00096 {
00097 bool first = TRUE;
00098 cstring st = cstring_undefined;
00099
00100 stDeclNodeList_elements (s, current)
00101 {
00102 if (first)
00103 {
00104 st = message ("%q %q;", lclTypeSpecNode_unparse (current->lcltypespec),
00105 declaratorNodeList_unparse (current->declarators));
00106 first = FALSE;
00107 }
00108 else
00109 {
00110 st = message ("%q %q %q;", st, lclTypeSpecNode_unparse (current->lcltypespec),
00111 declaratorNodeList_unparse (current->declarators));
00112 }
00113 } end_stDeclNodeList_elements;
00114
00115 return st;
00116 }
|
1.2.3 written by Dimitri van Heesch,
© 1997-2000