From 5d298e89a71974335dadfd1485a500aec747173f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Oct 18 2004 21:31:43 +0000 Subject: - Prevent compiler warning in coreutils-i18n.patch (bug #136090). --- diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 370d7bb..86cdece 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -2945,8 +2945,8 @@ if (have_read_stdin && fclose (stdin) == EOF) error (EXIT_FAILURE, errno, "-"); ---- coreutils-5.1.3/src/fold.c.i18n 2004-01-21 22:27:02.000000000 +0000 -+++ coreutils-5.1.3/src/fold.c 2004-02-16 15:36:40.000000000 +0000 +--- coreutils-5.1.3/src/fold.c 2004-02-16 15:36:40.000000000 +0000 ++++ coreutils-5.2.1/src/fold.c 2004-10-18 22:28:41.114883456 +0100 @@ -23,31 +23,74 @@ #include #include @@ -3050,8 +3050,9 @@ - to stdout, with maximum line length WIDTH. - Return 0 if successful, 1 if an error occurs. */ - - static void +-static int -fold_file (char *filename, int width) ++static void +fold_text (FILE *istream, int width, int *saved_errno) { - FILE *istream; @@ -3100,10 +3101,10 @@ - saved_errno = errno; + *saved_errno = errno; - - if (offset_out) - fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); - ++ ++ if (offset_out) ++ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); ++ + free(line_out); +} + @@ -3278,10 +3279,10 @@ + } + + *saved_errno = errno; -+ -+ if (offset_out) -+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -+ + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); + + free(line_out); +} +#endif