aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/patch.c4
-rw-r--r--editors/sed.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/editors/patch.c b/editors/patch.c
index 6f42b835c..1c9e97005 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -85,7 +85,7 @@ int patch_main(int argc ATTRIBUTE_UNUSED, char **argv)
85 patch_file = xfopen_stdin(i); 85 patch_file = xfopen_stdin(i);
86 } 86 }
87 87
88 patch_line = xmalloc_getline(patch_file); 88 patch_line = xmalloc_fgetline(patch_file);
89 while (patch_line) { 89 while (patch_line) {
90 FILE *src_stream; 90 FILE *src_stream;
91 FILE *dst_stream; 91 FILE *dst_stream;
@@ -106,7 +106,7 @@ int patch_main(int argc ATTRIBUTE_UNUSED, char **argv)
106 /* Extract the filename used before the patch was generated */ 106 /* Extract the filename used before the patch was generated */
107 new_filename = extract_filename(patch_line, patch_level, "--- "); 107 new_filename = extract_filename(patch_line, patch_level, "--- ");
108 // was old_filename above 108 // was old_filename above
109 patch_line = xmalloc_getline(patch_file); 109 patch_line = xmalloc_fgetline(patch_file);
110 if (!patch_line) goto quit; 110 if (!patch_line) goto quit;
111 } while (!new_filename); 111 } while (!new_filename);
112 free(new_filename); // "source" filename is irrelevant 112 free(new_filename); // "source" filename is irrelevant
diff --git a/editors/sed.c b/editors/sed.c
index 32911f8f9..f85884534 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1028,7 +1028,7 @@ static void process_files(void)
1028 if (rfile) { 1028 if (rfile) {
1029 char *line; 1029 char *line;
1030 1030
1031 while ((line = xmalloc_getline(rfile)) 1031 while ((line = xmalloc_fgetline(rfile))
1032 != NULL) 1032 != NULL)
1033 append(line); 1033 append(line);
1034 xprint_and_close_file(rfile); 1034 xprint_and_close_file(rfile);
@@ -1273,7 +1273,7 @@ int sed_main(int argc ATTRIBUTE_UNUSED, char **argv)
1273 char *line; 1273 char *line;
1274 FILE *cmdfile; 1274 FILE *cmdfile;
1275 cmdfile = xfopen(opt_f->data, "r"); 1275 cmdfile = xfopen(opt_f->data, "r");
1276 while ((line = xmalloc_getline(cmdfile)) != NULL) { 1276 while ((line = xmalloc_fgetline(cmdfile)) != NULL) {
1277 add_cmd(line); 1277 add_cmd(line);
1278 free(line); 1278 free(line);
1279 } 1279 }