From d4e485cf4a55d0b079d8e2607a98aef7959130a0 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Thu, 29 Apr 2010 22:08:26 +0200 Subject: patch --- editors/patch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/editors/patch.c b/editors/patch.c index 08f250e8b..507112377 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -25,7 +25,7 @@ static unsigned copy_lines(FILE *src_stream, FILE *dst_stream, unsigned lines_co { while (src_stream && lines_count) { char *line; - line = xmalloc_getline(src_stream); + line = xmalloc_fgetline(src_stream); if (line == NULL) { break; } @@ -142,7 +142,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) /* Extract the filename used before the patch was generated */ new_filename = extract_filename(patch_line, patch_level, "--- "); // was old_filename above - patch_line = xmalloc_getline(patch_file); + patch_line = xmalloc_fgetline(patch_file); if (!patch_line) goto quit; } while (!new_filename); free(new_filename); // "source" filename is irrelevant @@ -180,7 +180,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) printf("patching file %s\n", new_filename); /* Handle all hunks for this file */ - patch_line = xmalloc_getline(patch_file); + patch_line = xmalloc_fgetline(patch_file); while (patch_line) { unsigned count; unsigned src_beg_line; @@ -221,7 +221,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) while (1) { free(patch_line); - patch_line = xmalloc_getline(patch_file); + patch_line = xmalloc_fgetline(patch_file); if (patch_line == NULL) break; /* EOF */ if (!*patch_line) { @@ -239,7 +239,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) if (src_cur_line == src_last_line) break; if (src_stream) { - src_line = xmalloc_getline(src_stream); + src_line = xmalloc_fgetline(src_stream); if (src_line) { int diff = strcmp(src_line, patch_line + 1); src_cur_line++; -- cgit v1.2.3-55-g6feb