Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses KNF



details:   https://anonhg.NetBSD.org/src/rev/c47c741a0c53
branches:  trunk
changeset: 350156:c47c741a0c53
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Jan 06 14:25:41 2017 +0000

description:
KNF

diffstat:

 lib/libcurses/addbytes.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (97 lines):

diff -r a217d6e4ba54 -r c47c741a0c53 lib/libcurses/addbytes.c
--- a/lib/libcurses/addbytes.c  Fri Jan 06 14:06:00 2017 +0000
+++ b/lib/libcurses/addbytes.c  Fri Jan 06 14:25:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addbytes.c,v 1.46 2017/01/06 14:06:45 roy Exp $        */
+/*     $NetBSD: addbytes.c,v 1.47 2017/01/06 14:25:41 roy Exp $        */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.46 2017/01/06 14:06:45 roy Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.47 2017/01/06 14:25:41 roy Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -179,7 +179,7 @@
 #ifdef DEBUG
        __CTRACE(__CTRACE_INPUT,
                 "ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n",
-                (unsigned) wc, unctrl((unsigned) wc), attr, y, x, n);
+                (unsigned)wc, unctrl((unsigned)wc), attr, y, x, n);
 #endif
                cc.vals[0] = wc;
                cc.elements = 1;
@@ -225,11 +225,11 @@
                        newx = tabsize - (*x % tabsize);
                        for (i = 0; i < newx; i++) {
                                if (waddbytes(win, blank, 1) == ERR)
-                                       return (ERR);
+                                       return ERR;
                                (*x)++;
                        }
                        PSYNCH_IN;
-                       return (OK);
+                       return OK;
 
                case '\n':
                        PSYNCH_OUT;
@@ -241,13 +241,13 @@
                case '\r':
                        *x = 0;
                        win->curx = *x;
-                       return (OK);
+                       return OK;
 
                case '\b':
                        if (--(*x) < 0)
                                *x = 0;
                        win->curx = *x;
-                       return (OK);
+                       return OK;
                }
        }
 
@@ -274,7 +274,7 @@
                }
                *lp = win->alines[*y];
                if (c == '\n')
-                       return (OK);
+                       return OK;
        }
 
 #ifdef DEBUG
@@ -334,7 +334,7 @@
                 *win->alines[*y]->lastchp);
 #endif
        __sync(win);
-       return (OK);
+       return OK;
 }
 
 /*
@@ -347,7 +347,7 @@
                  const cchar_t *wch, int char_interp)
 {
 #ifndef HAVE_WCHAR
-       return (ERR);
+       return ERR;
 #else
        int sx = 0, ex = 0, cw = 0, i = 0, newx = 0, tabsize;
        __LDATA *lp = &win->alines[*y]->line[*x], *tp = NULL;
@@ -593,9 +593,9 @@
                        while (ex < win->maxx && WCOL(*tp) < 0) {
 #ifdef DEBUG
                                __CTRACE(__CTRACE_INPUT,
-                                       "_cursesi_addwchar: clear "
-                                       "remaining of current char (%d,%d)nn",
-                                       *y, ex);
+                                   "_cursesi_addwchar: clear "
+                                   "remaining of current char (%d,%d)nn",
+                                   *y, ex);
 #endif /* DEBUG */
                                tp->ch = (wchar_t) btowc((int) win->bch);
                                if (_cursesi_copy_nsp(win->bnsp, tp) == ERR)



Home | Main Index | Thread Index | Old Index