Lines Matching defs:fp
73 FILE *fp;
197 static int read_tok(FILE *fp, off_t *off, int tok)
204 t = fgetc(fp);
269 fseek(file[i].fp, 0, SEEK_SET);
272 tok = read_tok(file[i].fp, &off, tok);
349 fseek(file[0].fp, TT.offset[0][i - 1], SEEK_SET);
350 fseek(file[1].fp, TT.offset[1][J[i] - 1], SEEK_SET);
356 tok0 = read_tok(file[0].fp, NULL, tok0);
357 tok1 = read_tok(file[1].fp, NULL, tok1);
376 if (IS_STDIN(files[i])) file[i].fp = read_stdin();
377 else file[i].fp = fopen(files[i], "r");
379 if (!file[i].fp){
390 fseek(file[0].fp, 0, SEEK_SET);
391 fseek(file[1].fp, 0, SEEK_SET);
396 i = fread(bufi, 1, s, file[0].fp);
397 j = fread(bufj, 1, s, file[1].fp);
416 static void print_diff(int a, int b, char c, int *off_set, FILE *fp)
421 fseek(fp, off_set[i - 1], SEEK_SET);
425 cc = fgetc(fp);
619 if (t== ptr1) print_diff(t->suff, t->a-1, ' ', TT.offset[0], file[0].fp);
620 fp);
621 print_diff(t->c, t->d, '+', TT.offset[1], file[1].fp);
623 print_diff(t->b+1, (t)->prev, ' ', TT.offset[0], file[0].fp);
624 else print_diff(t->b+1, (t+1)->a-1, ' ', TT.offset[0], file[0].fp);
697 if (file[0].fp) fclose(file[0].fp);
698 if (file[1].fp) fclose(file[1].fp);
833 if (file[0].fp) fclose(file[0].fp);
834 if (file[1].fp) fclose(file[1].fp);