]> granicus.if.org Git - procps-ng/commitdiff
watch compiles with 8bit enabled
authorCraig Small <csmall@enc.com.au>
Sun, 20 May 2012 07:08:29 +0000 (17:08 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 20 May 2012 07:08:29 +0000 (17:08 +1000)
watch wouldn't compile with --enable-watch8bit as some variables were
missing.  This changes fixes it.

watch.c

diff --git a/watch.c b/watch.c
index 4465268391f9cbc6bc2c8ec6b249630d5730a6c7..4649844723ab9b26fdd9b292d46c25df43fefed7 100644 (file)
--- a/watch.c
+++ b/watch.c
@@ -296,7 +296,11 @@ wint_t my_getwc(FILE * s)
 }
 #endif /* WITH_WATCH8BIT */
 
+#ifdef WITH_WATCH8BIT
+void output_header(wchar_t *restrict wcommand, int wcommand_columns, int wcommand_characters, double interval)
+#else
 void output_header(char *restrict command, double interval)
+#endif /* WITH_WATCH8BIT */
 {
        time_t t = time(NULL);
        char *ts = ctime(&t);
@@ -718,7 +722,11 @@ int main(int argc, char *argv[])
                }
 
                if (show_title)
+#ifdef WITH_WATCH8BIT
+                       output_header(wcommand, wcommand_columns, wcommand_characters, interval);
+#else
                        output_header(command, interval);
+#endif /* WITH_WATCH8BIT */
 
                if (run_command(command, command_argv))
                        break;