Lines Matching defs:tfp
364 FILE *tfp;
367 if ((tfp = fopen(tfname, "w")) == NULL)
370 rval = ht_enumerate(attrtab, locators_print, tfp);
372 fflush(tfp);
373 if (ferror(tfp))
375 if (fclose(tfp) == EOF)
390 FILE *tfp;
395 if ((tfp = fopen(tfname, "w")) == NULL)
398 fputs("\n/* pseudo-devices */\n", tfp);
400 fprintf(tfp, "void %sattach(int);\n",
404 fputs("\n/* driver structs */\n", tfp);
408 fprintf(tfp, "extern struct cfdriver %s_cd;\n", d->d_name);
411 fflush(tfp);
412 if (ferror(tfp))
413 return herr("writ", tfname, tfp);
415 if (fclose(tfp) == EOF)
475 FILE *tfp, *nfp;
477 if ((tfp = fopen(tfname, "r")) == NULL)
483 while (fgets(tbuf, sizeof(tbuf), tfp) != NULL) {
506 (void) fclose(tfp);
517 if (tfp)
518 (void) fclose(tfp);