From: Sami Kerola Date: Sat, 30 Apr 2011 11:06:20 +0000 (+0200) Subject: ul.c: convert definition to function X-Git-Tag: v2.20-rc1~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdbe31fc6a378ec073268118efde30049a56f831;p=thirdparty%2Futil-linux.git ul.c: convert definition to function Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- diff --git a/text-utils/ul.c b/text-utils/ul.c index dc0550cc01..1c4bd7f0b3 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -80,6 +80,7 @@ void setmode(int newmode); static void setcol(int newcol); static void needcol(int col); static void sig_handler(int signo); +static void print_out(char *line); #define IESC '\033' #define SO '\016' @@ -115,8 +116,6 @@ int halfpos; int upln; int iflag; -#define PRINT(s) if (s == NULL) /* void */; else putwp(s) - int main(int argc, char **argv) { int c, ret; @@ -327,7 +326,7 @@ void flushln(void) } if (obuf[i].c_char == '\0') { if (upln) { - PRINT(CURS_RIGHT); + print_out(CURS_RIGHT); } else outc(' ', 1); } else @@ -452,8 +451,8 @@ void reverse(void) { upln++; fwd(); - PRINT(CURS_UP); - PRINT(CURS_UP); + print_out(CURS_UP); + print_out(CURS_UP); upln++; } @@ -510,9 +509,9 @@ outc(wint_t c, int width) { putwchar(c); if (must_use_uc && (curmode&UNDERL)) { for (i=0; i