Lines Matching defs:file
86 FILE *file;
99 /* Edit empty file. */
140 /* Create temp file. */
152 warn("error writing to temp file");
161 /* Edit temp file. */
167 /* Open temporary file. */
168 if (!(file = fopen(filename, "r"))) {
169 warn("could not open edited file: %s", filename);
173 /* Copy temporary file contents to output file. */
177 nread = fread(buf, sizeof(*buf), sizeof(buf), file);
178 /* Test for error or end of file. */
180 (ferror(file) || !feof(file))) {
181 warnx("error reading edited file: %s", filename);
195 warnx("error writing to output file");
200 /* We've reached the end of the temporary file, so remove it. */
203 fclose(file);