From cdbe31fc6a378ec073268118efde30049a56f831 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 30 Apr 2011 13:06:20 +0200 Subject: [PATCH] ul.c: convert definition to function Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- text-utils/ul.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) 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