Lines Matching refs:fp
173 FILE *fp; in readfile() local
177 fp = ckfopen(fname, "r"); in readfile()
181 while (fgets(line, sizeof line, fp) != NULL) { in readfile()
185 doevent(ep, fp, fname); in readfile()
192 dodecl(line, fp); in readfile()
210 fclose(fp); in readfile()
254 doevent(struct event *ep, FILE *fp, char *fname) in doevent() argument
265 if (fgets(line, sizeof line, fp) == NULL) in doevent()
315 dodecl(char *line1, FILE *fp) in dodecl() argument
324 if (fgets(line, sizeof line, fp) == NULL) in dodecl()
362 FILE *fp; in output() local
366 fp = ckfopen(OUTTEMP, "w"); in output()
367 fputs(writer, fp); in output()
369 fprintf(fp, "#include %s\n", *pp); in output()
370 fputs("\n\n\n", fp); in output()
371 writetext(&defines, fp); in output()
372 fputs("\n\n", fp); in output()
373 writetext(&decls, fp); in output()
375 fputs("\n\n\n", fp); in output()
376 fputs(ep->comment, fp); in output()
377 fprintf(fp, "\nvoid\n%s() {\n", ep->routine); in output()
378 writetext(&ep->code, fp); in output()
379 fprintf(fp, "}\n"); in output()
381 fclose(fp); in output()
425 writetext(struct text *text, FILE *fp) in writetext() argument
431 if ((fwrite(bp->text, sizeof (char), BLOCKSIZE, fp)) != BLOCKSIZE) in writetext()
434 if ((fwrite(bp->text, sizeof (char), BLOCKSIZE - text->nleft, fp)) != (BLOCKSIZE - text->nleft)) in writetext()
442 FILE *fp; in ckfopen() local
444 if ((fp = fopen(file, mode)) == NULL) { in ckfopen()
448 return fp; in ckfopen()