Lines Matching defs:cfile
217 FILE *cfile;
228 if ((cfile = fopen("nodes.c", "w")) == NULL)
257 fputs(writer, cfile);
261 outsizes(cfile);
263 outfunc(cfile, 1);
265 outfunc(cfile, 0);
267 fputs(line, cfile);
274 outsizes(FILE *cfile)
278 fprintf(cfile, "static const short nodesize[%d] = {\n", ntypes);
280 fprintf(cfile, " ALIGN(sizeof (struct %s)),\n", nodestr[i]->tag);
282 fprintf(cfile, "};\n");
287 outfunc(FILE *cfile, int calcsize)
293 fputs(" if (n == NULL)\n", cfile);
295 fputs(" return;\n", cfile);
297 fputs(" return NULL;\n", cfile);
299 fputs(" funcblocksize += nodesize[n->type];\n", cfile);
301 fputs(" new = funcblock;\n", cfile);
302 fputs(" funcblock = (char *)funcblock + nodesize[n->type];\n", cfile);
304 fputs(" switch (n->type) {\n", cfile);
308 fprintf(cfile, " case %s:\n", nodename[i]);
315 indent(12, cfile);
316 fprintf(cfile, "calcsize(n->%s.%s);\n",
319 indent(12, cfile);
320 fprintf(cfile, "new->%s.%s = copynode(n->%s.%s);\n",
326 indent(12, cfile);
327 fprintf(cfile, "sizenodelist(n->%s.%s);\n",
330 indent(12, cfile);
331 fprintf(cfile, "new->%s.%s = copynodelist(n->%s.%s);\n",
337 indent(12, cfile);
338 fprintf(cfile, "funcstringsize += strlen(n->%s.%s) + 1;\n",
341 indent(12, cfile);
342 fprintf(cfile, "new->%s.%s = nodesavestr(n->%s.%s);\n",
349 indent(12, cfile);
350 fprintf(cfile, "new->%s.%s = n->%s.%s;\n",
356 indent(12, cfile);
357 fputs("break;\n", cfile);
359 fputs(" };\n", cfile);
361 fputs(" new->type = n->type;\n", cfile);