Lines Matching refs:fp
247 FILE *fp;
259 if ((fp = fopen(TTYDEFS, "r")) != NULL) {
265 if (find_label(fp,ttydef->g_id)) {
266 (void)fclose(fp);
272 (void)fclose(fp);
277 if ((fp = fopen(TTYDEFS, "a+")) == NULL) {
284 (void)fprintf(fp,"# VERSION=%d\n", TTYDEFS_VERS);
306 (void)fprintf(fp,"%s:%s:%s:A:%s\n", ttydef->g_id, ttydef->g_iflags,
310 (void)fprintf(fp,"%s:%s:%s::%s\n", ttydef->g_id, ttydef->g_iflags,
313 (void)fclose(fp);
323 FILE *fp; /* scratch file pointer */
330 fp = fopen(TTYDEFS, "r");
331 if (fp == NULL) {
341 if ((line = find_label(fp, ttylabel)) == 0) {
348 if (copy_file(fp, tfp, 1, line - 1)) {
352 if (copy_file(fp, tfp, line + 1, -1)) {
356 (void)fclose(fp);
381 FILE *fp; /* fp associated with tname */
398 fp = fopen(tname, "w");
399 if (fp == NULL) {
403 return(fp);
410 * args: fp - source file's file pointer
418 copy_file(fp, tfp, start, finish)
419 FILE *fp;
431 rewind(fp);
439 if (!fgets(dummy, BUFSIZ, fp))
449 if (!fgets(dummy, BUFSIZ, fp))
457 if (fgets(dummy, BUFSIZ, fp) == NULL) {
458 if (feof(fp))