diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
commit | f05428e4cd63dde97bac14b84dd146a5c00455e3 (patch) | |
tree | e1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libncurses | |
parent | 6de57e42c294763c78d77b0a9a7c5a08008a378a (diff) | |
download | FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'lib/libncurses')
40 files changed, 244 insertions, 244 deletions
diff --git a/lib/libncurses/TESTS/Makefile b/lib/libncurses/TESTS/Makefile index 4136d74..d120982 100644 --- a/lib/libncurses/TESTS/Makefile +++ b/lib/libncurses/TESTS/Makefile @@ -6,9 +6,9 @@ CLEANFILES += $(TESTS) LIBS += -lncurses -lmytinfo -all: $(TESTS) +all: $(TESTS) -$(TESTS): +$(TESTS): $(CC) $(CFLAGS) $(LDFLAGS) ${.CURDIR}/$@.c -o $@ $(LIBS) test: test.c diff --git a/lib/libncurses/TESTS/battle.c b/lib/libncurses/TESTS/battle.c index e7785fc..5b5a961 100644 --- a/lib/libncurses/TESTS/battle.c +++ b/lib/libncurses/TESTS/battle.c @@ -1,4 +1,4 @@ -/* +/* * battle.c - original author: Bruce Holloway * mods by: Chuck A DeGaul */ @@ -91,21 +91,21 @@ main(int argc, char **argv) while(awinna() == -1) { if (!blitz) { if (!salvo) { - if (turn) - cputurn(); + if (turn) + cputurn(); else plyturn(); } else { register int i; i = scount(turn); while (i--) { - if (turn) - if (cputurn()) - if (awinna() != -1) + if (turn) + if (cputurn()) + if (awinna() != -1) i = 0; - else - if(plyturn()) - if (awinna() != -1) + else + if(plyturn()) + if (awinna() != -1) i = 0; } } @@ -141,8 +141,8 @@ char *tmpname; initscr(); savetty(); - nonl(); - cbreak(); + nonl(); + cbreak(); noecho(); clear(); mvaddstr(4,29,"Welcome to Battleship!"); @@ -187,9 +187,9 @@ int i; } for(turn=0; turn<2; ++turn){ for(i=0; i<5; ++i) - if (!turn) + if (!turn) plyplace(&plyship[i]); - else + else cpuplace(&cpuship[i]); } turn = rnd(2); @@ -220,11 +220,11 @@ int c, d; placeship(ss,c,d); } -int +int getdir() { - prompt(); + prompt(); addstr("What direction (0=right, 1=down) ? "); return(sgetc("01")-'0'); } @@ -296,7 +296,7 @@ void error(s) char *s; { - prompt(); + prompt(); beep(); printw("%s -- hit any key to continue --",s); refresh(); @@ -305,7 +305,7 @@ char *s; void prompt(){ - move(22,0); + move(22,0); clrtoeol(); } @@ -319,12 +319,12 @@ redo: do { ch = getch(); if (ch == 0x7F || ch == 8) { - addstr("\b \b"); + addstr("\b \b"); refresh(); goto redo; } } while(ch < '0' || ch > '9'); - addch(x = ch); + addch(x = ch); refresh(); return((y-'A')*10+x-'0'); } @@ -336,7 +336,7 @@ struct _ships *ss; int c, d; do{ - c = rnd(100); + c = rnd(100); d = rnd(2); } while(!checkplace(ss,c,d)); placeship(ss,c,d); @@ -383,8 +383,8 @@ char *m; m = "Have some mercy for my %s!"; break; } - move(23,0); - clrtoeol(); + move(23,0); + clrtoeol(); beep(); printw(m,cpuship[c-1].name); refresh(); return(awinna() == -1); @@ -407,16 +407,16 @@ int sym, i, j; if (!(sym = board[OTHER][c])) return(0); for (i = 0; i < 5; ++i, ++ss) if (ss->symbol == sym) { - j = ss->hits; - ++j; + j = ss->hits; + ++j; ss->hits = j; - if (j == ss->length) + if (j == ss->length) return(i+1); return(0); } } -int +int cputurn() { int c, res, x, y, i, d; @@ -479,8 +479,8 @@ fndir: for(i=0, d=rnd(4); i++ < 4; d = (d+1) % 4){ case 2: --x; break; case 3: --y; break; } - if(x<0 || x>9 || y<0 || y>9){ cstart = -1; - goto redo; + if(x<0 || x>9 || y<0 || y>9){ cstart = -1; + goto redo; } if(!hits[turn][y*10+x]) break; } @@ -517,7 +517,7 @@ fndir: for(i=0, d=rnd(4); i++ < 4; d = (d+1) % 4){ sleep(1); } } - else { + else { if (seemiss) { mvaddch(7+(c/10),3+3*(c%10),' '); } else { @@ -590,18 +590,18 @@ int ch; ch = toupper(getch()); for (s1 = s; *s1 && ch != *s1; ++s1); if (*s1) { - addch(ch); + addch(ch); refresh(); return(ch); } } } -/* +/* * I should use getopts() from libc.a, but I'm leary that other UNIX * systems might not have it, although I'd love to use it. */ - + int do_options(c,op) int c; @@ -654,23 +654,23 @@ register int i; } } fprintf(stdout, "Playing optional game ("); - if (salvo) + if (salvo) fprintf(stdout, "salvo, noblitz, "); else if (blitz) fprintf(stdout, "blitz, nosalvo, "); - else + else fprintf(stdout, "noblitz, nosalvo, "); - if (ask) + if (ask) fprintf(stdout, "ask, "); - else + else fprintf(stdout, "noask, "); - if (seemiss) + if (seemiss) fprintf(stdout, "seemiss)\n"); - else + else fprintf(stdout, "noseemiss)\n"); - } + } else fprintf(stdout, "Playing standard game (no blitz, no slavo, no ask, no seemiss)\n"); diff --git a/lib/libncurses/TESTS/copy.c b/lib/libncurses/TESTS/copy.c index 6ded258..013f9db 100644 --- a/lib/libncurses/TESTS/copy.c +++ b/lib/libncurses/TESTS/copy.c @@ -25,7 +25,7 @@ int h, i; getch(); /* now, remove window 2 and restore the contents of window 1 */ - i = copywin(win1, win2, 5, 10, 0, 0, 14, 39, 0); + i = copywin(win1, win2, 5, 10, 0, 0, 14, 39, 0); wnoutrefresh(win1); wnoutrefresh(win2); printw("copywin returns %d\n", i); diff --git a/lib/libncurses/TESTS/ensor.c b/lib/libncurses/TESTS/ensor.c index 7ace038..4eca9cb 100644 --- a/lib/libncurses/TESTS/ensor.c +++ b/lib/libncurses/TESTS/ensor.c @@ -12,7 +12,7 @@ main() scrollok(stdscr, TRUE); - for (i=0; i<25; i++) + for (i=0; i<25; i++) printw("This is in the background, this should be left alone!\n"); refresh(); diff --git a/lib/libncurses/TESTS/hanoi.c b/lib/libncurses/TESTS/hanoi.c index e7da51d..bf44cc4 100644 --- a/lib/libncurses/TESTS/hanoi.c +++ b/lib/libncurses/TESTS/hanoi.c @@ -153,10 +153,10 @@ void InitTiles(int NTiles) { int Size, SlotNo; - + for(Size=NTiles*2+1, SlotNo=0; Size>=3; Size-=2) Pegs[0].Length[SlotNo++] = Size; - + Pegs[0].Count = NTiles; Pegs[1].Count = 0; Pegs[2].Count = 0; diff --git a/lib/libncurses/TESTS/knight.c b/lib/libncurses/TESTS/knight.c index cea9183..73f7b42 100644 --- a/lib/libncurses/TESTS/knight.c +++ b/lib/libncurses/TESTS/knight.c @@ -28,7 +28,7 @@ int xpos[]={0,1,2,1,0,5,4,3,2,4,6,7,8,8,9,10,10,11,12,13,14,15,15,16, 13,23,25,27,27,2,3,4,5,6,7,4,3,2,1,0,1,2,5,4,5,6,6,7,8,9,8,9,10, 11,11,12,13,14,14,15}; -static char *instructions[] = +static char *instructions[] = { " Knight's Tour is a board game for one player. It is played on", "an eight by eight board and is based on the allowable moves that a knight", @@ -59,7 +59,7 @@ void init(void); int play(void); void drawboard(void); void dosquares(void); -void getfirst(void); +void getfirst(void); void getrc(void); void putstars(void); int evalmove(void); @@ -73,7 +73,7 @@ int main () { init (); - for (;;) + for (;;) if (!play ()) { endwin (); exit (0); @@ -91,12 +91,12 @@ init () title (1,23); mvaddstr (23, 25, "Would you like instructions? "); refresh(); - if ((toupper(getch())) == 'Y') + if ((toupper(getch())) == 'Y') instruct(); clear (); } -int +int play () { drawboard (); /* clear screen and drawboard */ @@ -106,7 +106,7 @@ play () getrc(); if (evalmove()) { putstars (); - if (!chkmoves()) + if (!chkmoves()) return (endgame ()); } else beep(); @@ -164,7 +164,7 @@ getfirst () /* get first square */ putstars (); move (23, 0); clrtobot(); -} +} void getrc () /* get row and column */ diff --git a/lib/libncurses/TESTS/ncurses.c b/lib/libncurses/TESTS/ncurses.c index 14630a8..9151236 100644 --- a/lib/libncurses/TESTS/ncurses.c +++ b/lib/libncurses/TESTS/ncurses.c @@ -42,20 +42,20 @@ char buf[BUFSIZ]; unsigned int c; int incount = 0, firsttime = 0; bool blocking = TRUE; - + refresh(); - + (void) printw("Delay in 10ths of a second (<CR> for blocking input)? "); echo(); getstr(buf); noecho(); - + if (isdigit(buf[0])) { timeout(atoi(buf) * 100); blocking = FALSE; } - + c = '?'; for (;;) { @@ -162,7 +162,7 @@ static void attr_test(void) static char *colors[] = { - "black", + "black", "red", "green", "yellow", @@ -238,7 +238,7 @@ static void color_edit(void) for (i = 0; i < COLORS; i++) { mvprintw(2 + i, 0, "%c %-8s:", - (i == current ? '>' : ' '), + (i == current ? '>' : ' '), (i < sizeof(colors)/sizeof(colors[0]) ? colors[i] : "")); attrset(COLOR_PAIR(i)); addstr(" "); @@ -321,7 +321,7 @@ static void color_edit(void) goto changeit; case '=': - usebase = 0; + usebase = 0; changeit: color_content(current, &red, &green, &blue); if (field == 0) @@ -339,7 +339,7 @@ static void color_edit(void) P(""); P("You are in the RGB value editor. Use the arrow keys to select one of"); P("the fields in one of the RGB triples of the current colors; the one"); - P("currently selected will be reverse-video highlighted."); + P("currently selected will be reverse-video highlighted."); P(""); P("To change a field, enter the digits of the new value; they won't be"); P("echoed. Finish by typing `='; the change will take effect instantly."); @@ -510,7 +510,7 @@ static void acs_display() mvaddstr(ACSY + 10,40, "ACS_LANTERN: "); addch(ACS_LANTERN); mvaddstr(ACSY + 11,40, "ACS_BLOCK: "); addch(ACS_BLOCK); -#define HYBASE (ACSY + 13) +#define HYBASE (ACSY + 13) mvprintw(HYBASE + 1, 0, "High-half characters via echochar:\n"); for (i = 0; i < 4; i++) { @@ -796,7 +796,7 @@ static void panner(WINDOW *pad, int iy, int ix, int (*pgetc)(void)) basey, basex, 0, 0, porty - (hscroll != (WINDOW *)NULL) - 1, - portx - (vscroll != (WINDOW *)NULL) - 1); + portx - (vscroll != (WINDOW *)NULL) - 1); if (vscroll) { int lowend, i, highend; diff --git a/lib/libncurses/TESTS/newdemo.c b/lib/libncurses/TESTS/newdemo.c index 97c368d..5573557 100644 --- a/lib/libncurses/TESTS/newdemo.c +++ b/lib/libncurses/TESTS/newdemo.c @@ -1,4 +1,4 @@ -/* $Header: c:/curses/demos/RCS/newdemo.c%v 2.0 1992/11/15 03:32:03 MH Rel $ +/* $Header: /home/ncvs/src/lib/libncurses/TESTS/newdemo.c,v 1.1.1.1 1994/10/07 08:58:56 ache Exp $ * * newdemo.c - A demo program using PDCurses. The program illustrate * the use of colours for text output. @@ -9,7 +9,7 @@ #include <time.h> #include <ncurses.h> -#define delay_output(x) +#define delay_output(x) /* * The Australian map diff --git a/lib/libncurses/TESTS/over.c b/lib/libncurses/TESTS/over.c index 530e48d..1f336d4 100644 --- a/lib/libncurses/TESTS/over.c +++ b/lib/libncurses/TESTS/over.c @@ -13,7 +13,7 @@ * keypress, then removes the top window. With ncurses, * * nothing changes on the display. * *********************************************************************/ - + # include <ncurses.h> /* ncurses include lives here */ main() @@ -54,7 +54,7 @@ main() wnoutrefresh(win1); wnoutrefresh(win2); doupdate(); - + /**************************************************************** * Await a keypress to show what we've done so far. * ****************************************************************/ diff --git a/lib/libncurses/TESTS/rain.c b/lib/libncurses/TESTS/rain.c index 83951ae..9779d02 100644 --- a/lib/libncurses/TESTS/rain.c +++ b/lib/libncurses/TESTS/rain.c @@ -58,7 +58,7 @@ float c; addstr("\\ /"); cursor(xpos[j],ypos[j]+2); addch('-'); - + if (j==0) j=4; else --j; cursor(xpos[j],ypos[j]-2); addch(' '); diff --git a/lib/libncurses/TESTS/scroll2.c b/lib/libncurses/TESTS/scroll2.c index 53abaa3..e7b2e30 100644 --- a/lib/libncurses/TESTS/scroll2.c +++ b/lib/libncurses/TESTS/scroll2.c @@ -6,7 +6,7 @@ main() { int i; WINDOW * w; - + initscr(); cbreak(); @@ -21,7 +21,7 @@ main() mvaddstr (0, 0, "With the original wscrl"); #endif refresh(); - + for (i=0; i<ROWS-1; i++) { @@ -41,7 +41,7 @@ main() } getch(); wclear (w); - + for (i=0; i<ROWS-1; i++) { @@ -49,10 +49,10 @@ main() } mvwaddstr (w, ROWS-1, 0, "Moving two line at a time"); #ifndef LELE - mvaddstr (0, 30, "** THIS FAILS ON MY MACHINE WITH A BUS ERROR + mvaddstr (0, 30, "** THIS FAILS ON MY MACHINE WITH A BUS ERROR **"); #endif - + wrefresh(w); for (i = 0; i < 4; i++) { @@ -84,7 +84,7 @@ main() wrefresh(w); } getch(); - + endwin(); } diff --git a/lib/libncurses/TESTS/scroll3.c b/lib/libncurses/TESTS/scroll3.c index 1d63c46..b2a10c3 100644 --- a/lib/libncurses/TESTS/scroll3.c +++ b/lib/libncurses/TESTS/scroll3.c @@ -3,7 +3,7 @@ main(int argc, char **argv) { WINDOW *w, *x; - + initscr(); w = newwin(0, 0, 0, 0); if (argc > 2) diff --git a/lib/libncurses/TESTS/test.c b/lib/libncurses/TESTS/test.c index 1fc3e6e..f77f3a1 100644 --- a/lib/libncurses/TESTS/test.c +++ b/lib/libncurses/TESTS/test.c @@ -1,14 +1,14 @@ #include <ncurses.h> - + main() { int x, y; initscr(); cbreak(); - nodelay(stdscr, TRUE); - + nodelay(stdscr, TRUE); + for (y = 0; y < 43; y++) for (x =0; x < 132; x++) { move(y,x); diff --git a/lib/libncurses/curses.h b/lib/libncurses/curses.h index 692c1a6..5aa5f64 100644 --- a/lib/libncurses/curses.h +++ b/lib/libncurses/curses.h @@ -22,7 +22,7 @@ #define CURSES 1 #define CURSES_H 1 -#include <stdio.h> +#include <stdio.h> #include <stdarg.h> #ifndef NOTERMIOS #include <termios.h> @@ -53,7 +53,7 @@ typedef unsigned long chtype; #define A_PROTECT 0x01000000 #define A_CHARTEXT 0x000000ff #define A_COLOR 0x0000ff00 -#define COLOR_PAIR(n) (n << 8) +#define COLOR_PAIR(n) (n << 8) #define PAIR_NUMBER(a) ((a & A_COLOR) >> 8) /* colors */ @@ -321,7 +321,7 @@ extern int slk_touch(void); #define saveterm() def_prog_mode() #define crmode() cbreak() #define nocrmode() nocbreak() -#define gettmode() +#define gettmode() #define getyx(win,y,x) (y = (win)->_cury, x = (win)->_curx) #define getbegyx(win,y,x) (y = (win)->_begy, x = (win)->_begx) @@ -527,4 +527,4 @@ extern int slk_touch(void); #define KEY_UNDO 0630 /* undo key */ #define KEY_MAX 0777 /* Maximum curses key */ -#endif +#endif diff --git a/lib/libncurses/curses.priv.h b/lib/libncurses/curses.priv.h index ed747ea..42952ce 100644 --- a/lib/libncurses/curses.priv.h +++ b/lib/libncurses/curses.priv.h @@ -37,11 +37,11 @@ typedef struct sigaction sigaction_t; extern WINDOW *newscr; #ifdef TRACE -#define T(a) if (_tracing & TRACE_ORDINARY) _tracef a -#define TR(n, a) if (_tracing & (n)) _tracef a +#define T(a) if (_tracing & TRACE_ORDINARY) _tracef a +#define TR(n, a) if (_tracing & (n)) _tracef a extern int _tracing; extern char *visbuf(const char *); -#else +#else #define T(a) #define TR(n, a) #endif @@ -58,11 +58,11 @@ struct try { unsigned char ch; /* character at this node */ unsigned short value; /* code of string so far. 0 if none. */ }; - + /* * Structure for soft labels. */ - + typedef struct { char dirty; /* all labels have changed */ char hidden; /* soft lables are hidden */ @@ -92,7 +92,7 @@ struct screen { WINDOW *_stdscr; struct try *_keytry; /* "Try" for use with keypad mode */ unsigned int _fifo[FIFO_SIZE]; /* Buffer for pushed back characters */ - signed char _fifohead, + signed char _fifohead, _fifotail, _fifopeek; bool _endwin; diff --git a/lib/libncurses/lib_acs.c b/lib/libncurses/lib_acs.c index 640ab89..2b6d25b 100644 --- a/lib/libncurses/lib_acs.c +++ b/lib/libncurses/lib_acs.c @@ -30,23 +30,23 @@ void init_acs() ACS_PLUS (acs_map['n']) ACS_S1 (acs_map['o']) scan line 1 ACS_S9 (acs_map['s']) scan line 9 - ACS_DIAMOND (acs_map['`']) diamond - ACS_CKBOARD (acs_map['a']) checker board (stipple) - ACS_DEGREE (acs_map['f']) degree symbol + ACS_DIAMOND (acs_map['`']) diamond + ACS_CKBOARD (acs_map['a']) checker board (stipple) + ACS_DEGREE (acs_map['f']) degree symbol ACS_PLMINUS (acs_map['g']) plus/minus ACS_BULLET (acs_map['~']) bullet ACS_LARROW (acs_map[',']) arrow pointing left ACS_RARROW (acs_map['+']) arrow pointing right ACS_DARROW (acs_map['.']) arrow pointing down - ACS_UARROW (acs_map['-']) arrow pointing up - ACS_BOARD (acs_map['h']) board of squares - ACS_LANTERN (acs_map['I']) lantern symbol + ACS_UARROW (acs_map['-']) arrow pointing up + ACS_BOARD (acs_map['h']) board of squares + ACS_LANTERN (acs_map['I']) lantern symbol ACS_BLOCK (acs_map['0']) solid square block */ T(("initializing ACS map")); - acs_map['l'] = acs_map['m'] = acs_map['k'] = acs_map['j'] = + acs_map['l'] = acs_map['m'] = acs_map['k'] = acs_map['j'] = acs_map['u'] = acs_map['t'] = acs_map['v'] = acs_map['w'] = (chtype)'+' & A_CHARTEXT; acs_map['q'] = (chtype)'-' & A_CHARTEXT; acs_map['x'] = (chtype)'|' & A_CHARTEXT; @@ -72,8 +72,8 @@ void init_acs() if (acs_chars != NULL) { int i = 0; int length = strlen(acs_chars); - - while (i < length) + + while (i < length) switch (acs_chars[i]) { case 'l':case 'm':case 'k':case 'j': case 'u':case 't':case 'v':case 'w': @@ -81,8 +81,8 @@ void init_acs() case 's':case '`':case 'a':case 'f': case 'g':case '~':case ',':case '+': case '.':case '-':case 'h':case 'I': - case '0': - acs_map[(unsigned int)(unsigned char)acs_chars[i]] = + case '0': + acs_map[(unsigned int)(unsigned char)acs_chars[i]] = (acs_chars[++i] & A_CHARTEXT) | A_ALTCHARSET; default: i++; diff --git a/lib/libncurses/lib_bkgd.c b/lib/libncurses/lib_bkgd.c index 0210995..a74c56e 100644 --- a/lib/libncurses/lib_bkgd.c +++ b/lib/libncurses/lib_bkgd.c @@ -26,7 +26,7 @@ int x, y; T(("wbkgd(%x, %x) called", win, ch)); for (y = 0; y < win->_maxy; y++) - for (x = 0; x < win->_maxx; x++) + for (x = 0; x < win->_maxx; x++) if (win->_line[y][x]&A_CHARTEXT == ' ') win->_line[y][x] |= ch; else diff --git a/lib/libncurses/lib_box.c b/lib/libncurses/lib_box.c index ca4e032..a0ffd12 100644 --- a/lib/libncurses/lib_box.c +++ b/lib/libncurses/lib_box.c @@ -47,8 +47,8 @@ int endx, endy; endy = win->_maxy; for (i = 0; i <= endx; i++) { - win->_line[0][i] = ts; - win->_line[endy][i] = bs; + win->_line[0][i] = ts; + win->_line[endy][i] = bs; } win->_firstchar[endy] = win->_firstchar[0] = 0; win->_lastchar[endy] = win->_lastchar[0] = endx; @@ -83,12 +83,12 @@ int end; line = win->_cury; start = win->_curx; end = start + n - 1; - if (end > win->_maxx) + if (end > win->_maxx) end = win->_maxx; - if (win->_firstchar[line] == _NOCHANGE || win->_firstchar[line] > start) + if (win->_firstchar[line] == _NOCHANGE || win->_firstchar[line] > start) win->_firstchar[line] = start; - if (win->_lastchar[line] == _NOCHANGE || win->_lastchar[line] < start) + if (win->_lastchar[line] == _NOCHANGE || win->_lastchar[line] < start) win->_lastchar[line] = end; if (ch == 0) @@ -111,7 +111,7 @@ int end; row = win->_cury; col = win->_curx; end = row + n - 1; - if (end > win->_maxy) + if (end > win->_maxy) end = win->_maxy; if (ch == 0) @@ -119,13 +119,13 @@ int end; while(end >= row) { win->_line[end][col] = ch | win->_attrs; - if (win->_firstchar[end] == _NOCHANGE || win->_firstchar[end] > col) + if (win->_firstchar[end] == _NOCHANGE || win->_firstchar[end] > col) win->_firstchar[end] = col; - if (win->_lastchar[end] == _NOCHANGE || win->_lastchar[end] < col) + if (win->_lastchar[end] == _NOCHANGE || win->_lastchar[end] < col) win->_lastchar[end] = col; end--; } return OK; } - + diff --git a/lib/libncurses/lib_color.c b/lib/libncurses/lib_color.c index 17aaede..3d40a69 100644 --- a/lib/libncurses/lib_color.c +++ b/lib/libncurses/lib_color.c @@ -2,8 +2,8 @@ * details. If they are missing then this copy is in violation of * * the copyright conditions. */ -/* lib_color.c - * +/* lib_color.c + * * Handles color emulation of SYS V curses * */ @@ -63,15 +63,15 @@ int init_color(short color, short r, short g, short b) return ERR; if (hue_lightness_saturation == TRUE) if (r < 0 || r > 360 || g < 0 || g > 100 || b < 0 || b > 100) - return ERR; + return ERR; if (hue_lightness_saturation == FALSE) if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000) return ERR; - + putp(tparm(initialize_color, color, r, g, b)); return OK; } - + return ERR; } @@ -83,7 +83,7 @@ bool can_change_color() int has_colors() { return ((orig_pair != NULL) && (max_colors != -1) && (max_pairs != -1) - && + && (((set_foreground != NULL) && (set_background != NULL)) || ((set_a_foreground != NULL) && (set_a_background != NULL))) ); diff --git a/lib/libncurses/lib_doupdate.c b/lib/libncurses/lib_doupdate.c index fcab8e5..2dba944 100644 --- a/lib/libncurses/lib_doupdate.c +++ b/lib/libncurses/lib_doupdate.c @@ -10,7 +10,7 @@ * The routine doupdate() and its dependents * *-----------------------------------------------------------------*/ - + #include <stdlib.h> #include <sys/time.h> #ifdef SYS_SELECT @@ -77,22 +77,22 @@ static inline void PutChar(chtype ch) return; } PutAttrChar(ch); - SP->_curscol++; + SP->_curscol++; if (SP->_curscol >= columns) { - if (auto_right_margin) { - SP->_curscol = 0; - SP->_cursrow++; + if (auto_right_margin) { + SP->_curscol = 0; + SP->_cursrow++; } else { SP->_curscol--; } } -} +} static inline void GoTo(int row, int col) { - mvcur(SP->_cursrow, SP->_curscol, row, col); - SP->_cursrow = row; - SP->_curscol = col; + mvcur(SP->_cursrow, SP->_curscol, row, col); + SP->_cursrow = row; + SP->_curscol = col; } int _outch(int ch) @@ -108,7 +108,7 @@ int doupdate(void) { int i; sigaction_t act, oact; - + T(("doupdate() called")); act.sa_handler = SIG_IGN; @@ -121,7 +121,7 @@ sigaction_t act, oact; reset_prog_mode(); /* is this necessary? */ if (enter_alt_charset_mode) - init_acs(); + init_acs(); newscr->_clear = TRUE; SP->_endwin = FALSE; } @@ -168,7 +168,7 @@ sigaction_t act, oact; curscr->_cury = newscr->_cury; GoTo(curscr->_cury, curscr->_curx); - + /* perhaps we should turn attributes off here */ if (curscr->_attrs != A_NORMAL) @@ -201,7 +201,7 @@ static void ClrUpdate(WINDOW *scr) { int i = 0, j = 0; int lastNonBlank; - + T(("ClrUpdate(%x) called", scr)); if (back_color_erase && curscr->_attrs != A_NORMAL) { T(("back_color_erase, turning attributes off")); @@ -217,7 +217,7 @@ int lastNonBlank; T(("updating screen from scratch")); for (i = 0; i < lines; i++) { lastNonBlank = columns - 1; - + while (lastNonBlank >= 0 && scr->_line[i][lastNonBlank] == BLANK) lastNonBlank--; @@ -310,7 +310,7 @@ chtype *newLine = newscr->_line[lineno]; chtype *oldLine = curscr->_line[lineno]; int k; int attrchanged = 0; - + T(("NoIDcTransformLine(%d) called", lineno)); firstChar = 0; @@ -318,7 +318,7 @@ int attrchanged = 0; if(ceol_standout_glitch) { if((newLine[firstChar] & (chtype)A_ATTRIBUTES) != (oldLine[firstChar] & (chtype)A_ATTRIBUTES)) attrchanged = 1; - } + } firstChar++; } @@ -342,7 +342,7 @@ int attrchanged = 0; while (lastChar > firstChar && newLine[lastChar] == oldLine[lastChar]) lastChar--; GoTo(lineno, firstChar); - } + } /* check if we are at the lr corner */ if (lineno == lines-1) @@ -385,7 +385,7 @@ chtype *newLine = newscr->_line[lineno]; chtype *oldLine = curscr->_line[lineno]; int k, n; int attrchanged = 0; - + T(("IDcTransformLine(%d) called", lineno)); if(ceol_standout_glitch && clr_eol) { @@ -393,12 +393,12 @@ int attrchanged = 0; while(firstChar < columns) { if((newLine[firstChar] & (chtype)A_ATTRIBUTES) != (oldLine[firstChar] & (chtype)A_ATTRIBUTES)) attrchanged = 1; - firstChar++; + firstChar++; } } - + firstChar = 0; - + if (attrchanged) { GoTo(lineno, firstChar); if (back_color_erase && curscr->_attrs != A_NORMAL) { @@ -421,14 +421,14 @@ int attrchanged = 0; while (firstChar < columns && newLine[firstChar] == oldLine[firstChar]) firstChar++; - + if (firstChar >= columns) return; oLastChar = columns - 1; while (oLastChar > firstChar && oldLine[oLastChar] == BLANK) oLastChar--; - + nLastChar = columns - 1; while (nLastChar > firstChar && newLine[nLastChar] == BLANK) nLastChar--; @@ -473,11 +473,11 @@ int attrchanged = 0; nLastChar--; oLastChar--; } - + n = min(oLastChar, nLastChar); GoTo(lineno, firstChar); - + /* check if we are at the lr corner */ if (lineno == lines-1) if ((auto_right_margin) && !(eat_newline_glitch) && diff --git a/lib/libncurses/lib_endwin.c b/lib/libncurses/lib_endwin.c index 6d61ea4..4e07e8f 100644 --- a/lib/libncurses/lib_endwin.c +++ b/lib/libncurses/lib_endwin.c @@ -38,7 +38,7 @@ endwin() if (SP->_coloron == TRUE) putp(orig_pair); - if (curscr && (curscr->_attrs != A_NORMAL)) + if (curscr && (curscr->_attrs != A_NORMAL)) vidattr(curscr->_attrs = A_NORMAL); if (SP->_cursor != 1) diff --git a/lib/libncurses/lib_erase.c b/lib/libncurses/lib_erase.c index 3e3703c..f7b79c1 100644 --- a/lib/libncurses/lib_erase.c +++ b/lib/libncurses/lib_erase.c @@ -27,7 +27,7 @@ int minx; minx = _NOCHANGE; start = win->_line[y]; end = &start[win->_maxx]; - + maxx = start; for (sp = start; sp <= end; sp++) { maxx = sp; diff --git a/lib/libncurses/lib_getch.c b/lib/libncurses/lib_getch.c index 458cdec..c30f7f2 100644 --- a/lib/libncurses/lib_getch.c +++ b/lib/libncurses/lib_getch.c @@ -62,7 +62,7 @@ int ungetch(int ch) t_inc() } else h_dec(); - + SP->_fifo[head] = ch; T(("ungetch ok")); fifo_dump(); @@ -75,7 +75,7 @@ int n; unsigned char ch; if (tail == -1) return ERR; -again: +again: n = read(fileno(SP->_ifp), &ch, 1); if (n == -1 && errno == EINTR) goto again; @@ -102,7 +102,7 @@ int wgetch(WINDOW *win) { bool setHere = FALSE; /* cbreak mode was set here */ -int ch; +int ch; T(("wgetch(%x) called", win)); @@ -195,9 +195,9 @@ int timeleft = 1000; peek = 0; while (ptr != NULL) { T(("ch = %d", ch)); - while ((ptr != NULL) && (ptr->ch != (unsigned char)ch)) + while ((ptr != NULL) && (ptr->ch != (unsigned char)ch)) ptr = ptr->sibling; - + if (ptr != NULL) if (ptr->value != 0) { /* sequence terminated */ T(("end of sequence")); @@ -219,6 +219,6 @@ int timeleft = 1000; ch = fifo_peek(); } } - } + } return(fifo_pull()); } diff --git a/lib/libncurses/lib_getstr.c b/lib/libncurses/lib_getstr.c index eb82bf2..0eda9b9 100644 --- a/lib/libncurses/lib_getstr.c +++ b/lib/libncurses/lib_getstr.c @@ -20,7 +20,7 @@ inline void backspace(WINDOW *win) waddstr(win, "\b \b"); fputs("\b \b", SP->_ofp); fflush(SP->_ofp); - SP->_curscol--; + SP->_curscol--; } int wgetnstr(WINDOW *win, char *str, int maxlen) @@ -30,7 +30,7 @@ char erasec; char killc; char *oldstr; int ch; - + T(("wgetnstr(%x,%x, %d) called", win, str, maxlen)); oldnl = SP->_nl; diff --git a/lib/libncurses/lib_insdel.c b/lib/libncurses/lib_insdel.c index da26a2a..aca7cc3 100644 --- a/lib/libncurses/lib_insdel.c +++ b/lib/libncurses/lib_insdel.c @@ -8,7 +8,7 @@ ** ** The routine winsdel(win, n). ** positive n insert n lines above current line -** negative n delete n lines starting from current line +** negative n delete n lines starting from current line ** */ diff --git a/lib/libncurses/lib_kernel.c b/lib/libncurses/lib_kernel.c index 5fa1879..e373935 100644 --- a/lib/libncurses/lib_kernel.c +++ b/lib/libncurses/lib_kernel.c @@ -66,7 +66,7 @@ int reset_prog_mode() stty(cur_term->Filedes, &cur_term->Nttyb); #endif - return OK; + return OK; } @@ -80,7 +80,7 @@ int reset_shell_mode() stty(cur_term->Filedes, &cur_term->Ottyb); #endif - return OK; + return OK; } #endif @@ -132,7 +132,7 @@ int speed; return OK; } - + /* * erasechar() * @@ -191,7 +191,7 @@ int flushinp() tcflush(cur_term->Filedes, TCIFLUSH); #else ioctl(cur_term->Filedes, TIOCFLUSH, 0); -#endif +#endif if (SP) { SP->_fifohead = -1; SP->_fifotail = 0; diff --git a/lib/libncurses/lib_mvcur.c b/lib/libncurses/lib_mvcur.c index a0f3bd5..388c680 100644 --- a/lib/libncurses/lib_mvcur.c +++ b/lib/libncurses/lib_mvcur.c @@ -13,7 +13,7 @@ * -hm hpux lint'ing .. * *---------------------------------------------------------------------------*/ - + /* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for * * details. If they are missing then this copy is in violation of * * the copyright conditions. */ @@ -47,7 +47,7 @@ int mvcur(int oldrow, int oldcol, int newrow, int newcol) if (cursor_address) putp(tparm(cursor_address, newrow, newcol)); return OK; - + } #else @@ -132,7 +132,7 @@ static int op_info[NUM_OPS] = { /* ** Make_seq_best(best, try) -** +** ** Make_seq_best() copies try to best if try->cost < best->cost ** ** fixed the old version, now it really runs .. (-hm/08.04.93) @@ -180,7 +180,7 @@ bool nlstat = SP->_nl; /* nl-output-mapping in effect ?*/ if ((oldrow == newrow) && (oldcol == newcol)) return OK; - + if (oldcol == columns-1 && eat_newline_glitch && auto_right_margin) { putp(tparm(cursor_address, newrow, newcol)); return OK; @@ -199,7 +199,7 @@ bool nlstat = SP->_nl; /* nl-output-mapping in effect ?*/ oldrow %= lines; /* mod values into range */ oldcol %= columns; } - + newrow %= lines; newcol %= columns; @@ -393,10 +393,10 @@ int oc, int nc) /* old column, new column */ struct Sequence seqA, seqB, tabseq, *best, *try; int mytab, tabs, onepast, - one_step, opp_step; + one_step, opp_step; onepast = -1; - + if (oc == nc) return; @@ -456,7 +456,7 @@ int mytab, tabs, onepast, zero_seq(try); add_op(try, one_step, abs(nc - oc)); Make_seq_best(best, try); - + if (tabseq.cost < INFINITY) add_seq(outseq, &tabseq); add_seq(outseq, best); @@ -541,7 +541,7 @@ update_ops() T(("update_ops()")); if (SP) { /* SP structure exists */ - int op; + int op; if (! SP->_costinit) { /* this term not yet assigned costs */ loc_init = FALSE; /* if !SP in the future, new term */ @@ -551,7 +551,7 @@ update_ops() for (op = 0; op < NUM_NPARM; op++) op_info[op] = SP->_costs[op]; /* set up op_info */ - + /* check for newline that might be mapped... */ if (SP->_nlmapping && index(sequence(CURS_DOWN), '\n')) @@ -606,7 +606,7 @@ static int countc(char ch) ** add_op(seq, op, p0, p1, ... , p8) ** ** add_op() adds the operator op and the appropriate -** number of paramaters to seq. It also increases the +** number of paramaters to seq. It also increases the ** cost appropriately. ** if op has no parameters, p0 is taken to be a count. */ @@ -615,11 +615,11 @@ static void add_op(struct Sequence *seq, int op, ...) { va_list argp; int num_ps, p; - + T(("adding op %d to sequence", op)); va_start(argp, op); - + num_ps = - op_info[op]; /* get parms or -cost */ *(seq->end++) = op; @@ -632,12 +632,12 @@ int num_ps, p; *(seq->end++) = i; } else { int prm[9]; - + for (p = 0; p < num_ps; p++) *(seq->end++) = prm[p] = va_arg(argp, int); c_count = 0; - + tputs(tparm(sequence(op), prm[0], prm[1], prm[2], prm[3], prm[4], prm[5], prm[6], prm[7], prm[8]), 1, countc); diff --git a/lib/libncurses/lib_newterm.c b/lib/libncurses/lib_newterm.c index c1f8694..79e5b4e 100644 --- a/lib/libncurses/lib_newterm.c +++ b/lib/libncurses/lib_newterm.c @@ -94,7 +94,7 @@ char *use_it = _ncurses_copyright; if (enter_ca_mode) putp(enter_ca_mode); - init_acs(); + init_acs(); T(("creating newscr")); if ((newscr = newwin(lines, columns, 0, 0)) == (WINDOW *)NULL) @@ -140,7 +140,7 @@ char *use_it = _ncurses_copyright; def_shell_mode(); def_prog_mode(); - + T(("newterm returns %x", SP)); return(SP); diff --git a/lib/libncurses/lib_newwin.c b/lib/libncurses/lib_newwin.c index a4db5f1..793d06e 100644 --- a/lib/libncurses/lib_newwin.c +++ b/lib/libncurses/lib_newwin.c @@ -66,7 +66,7 @@ int i; /* ** make sure window fits inside the original one */ - if ( begy < 0 || begx < 0) + if ( begy < 0 || begx < 0) return NULL; if ( begy + num_lines > orig->_maxy + 1 || begx + num_columns > orig->_maxx + 1) @@ -103,7 +103,7 @@ WINDOW *subwin(WINDOW *w, int l, int c, int y, int x) T(("subwin(%x, %d, %d, %d, %d) called", w, l, c, y, x)); T(("parent has begy = %d, begx = %d", w->_begy, w->_begx)); - return derwin(w, l, c, y - w->_begy, x - w->_begx); + return derwin(w, l, c, y - w->_begy, x - w->_begx); } WINDOW * @@ -115,24 +115,24 @@ WINDOW *win; T(("makenew(%d,%d,%d,%d)", num_lines, num_columns, begy, begx)); if ((win = (WINDOW *) malloc(sizeof(WINDOW))) == NULL) - return NULL; + return NULL; if ((win->_line = (chtype **) calloc(num_lines, sizeof (chtype *))) == NULL) { free(win); - return NULL; + return NULL; } if ((win->_firstchar = calloc(num_lines, sizeof(short))) == NULL) { free(win); free(win->_line); - return NULL; + return NULL; } if ((win->_lastchar = calloc(num_lines, sizeof(short))) == NULL) { free(win); free(win->_line); free(win->_firstchar); - return NULL; + return NULL; } win->_curx = 0; @@ -158,7 +158,7 @@ WINDOW *win; #else win->_use_meta = FALSE; #endif - win->_delay = -1; + win->_delay = -1; win->_immed = FALSE; win->_sync = 0; win->_parx = 0; diff --git a/lib/libncurses/lib_options.c b/lib/libncurses/lib_options.c index e22bcb7..7aefe96 100644 --- a/lib/libncurses/lib_options.c +++ b/lib/libncurses/lib_options.c @@ -26,7 +26,7 @@ int idlok(WINDOW *win, int flag) if ((insert_line || parm_insert_line) && (delete_line || parm_delete_line)) { win->_idlok = TRUE; } - return OK; + return OK; } @@ -38,7 +38,7 @@ int clearok(WINDOW *win, int flag) newscr->_clear = flag; else win->_clear = flag; - return OK; + return OK; } @@ -51,7 +51,7 @@ int leaveok(WINDOW *win, int flag) curs_set(0); else curs_set(1); - return OK; + return OK; } @@ -60,7 +60,7 @@ int scrollok(WINDOW *win, int flag) T(("scrollok(%x,%d) called", win, flag)); win->_scroll = flag; - return OK; + return OK; } int halfdelay(int t) @@ -114,10 +114,10 @@ int keypad(WINDOW *win, int flag) putp(keypad_xmit); else if (! flag && keypad_local) putp(keypad_local); - + if (SP->_keytry == UNINITIALISED) init_keytry(); - return OK; + return OK; } @@ -132,7 +132,7 @@ int meta(WINDOW *win, int flag) putp(meta_on); else if (! flag && meta_off) putp(meta_off); - return OK; + return OK; } /* @@ -148,7 +148,7 @@ static struct try *newtry; static void init_keytry() { newtry = NULL; - + #include "keys.tries" SP->_keytry = newtry; @@ -162,15 +162,15 @@ struct try *ptr, *savedptr; if (! str || out_of_memory) return; - + if (newtry != NULL) { ptr = savedptr = newtry; - + for (;;) { while (ptr->ch != (unsigned char) *str && ptr->sibling != NULL) ptr = ptr->sibling; - + if (ptr->ch == (unsigned char) *str) { if (*(++str)) { if (ptr->child != NULL) @@ -186,53 +186,53 @@ struct try *ptr, *savedptr; out_of_memory = TRUE; return; } - + savedptr = ptr = ptr->sibling; ptr->child = ptr->sibling = NULL; ptr->ch = *str++; ptr->value = (short) NULL; - + break; } - } /* end for (;;) */ + } /* end for (;;) */ } else { /* newtry == NULL :: First sequence to be added */ savedptr = ptr = newtry = (struct try *) malloc(sizeof *ptr); - + if (ptr == NULL) { out_of_memory = TRUE; return; } - + ptr->child = ptr->sibling = NULL; ptr->ch = *(str++); ptr->value = (short) NULL; } - + /* at this point, we are adding to the try. ptr->child == NULL */ - + while (*str) { ptr->child = (struct try *) malloc(sizeof *ptr); - + ptr = ptr->child; - + if (ptr == NULL) { out_of_memory = TRUE; - + ptr = savedptr; while (ptr != NULL) { savedptr = ptr->child; free(ptr); ptr = savedptr; } - + return; } - + ptr->child = ptr->sibling = NULL; ptr->ch = *(str++); ptr->value = (short) NULL; } - + ptr->value = code; return; } diff --git a/lib/libncurses/lib_overlay.c b/lib/libncurses/lib_overlay.c index 62bb2f1..19e58f3 100644 --- a/lib/libncurses/lib_overlay.c +++ b/lib/libncurses/lib_overlay.c @@ -13,11 +13,11 @@ #include "curses.priv.h" static void overlap(WINDOW *s, WINDOW *d, int flag) -{ +{ int sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol; T(("overlap : sby %d, sbx %d, smy %d, smx %d, dby %d, dbx %d, dmy %d, dmx %d", - s->_begy, s->_begx, s->_maxy, s->_maxx, + s->_begy, s->_begx, s->_maxy, s->_maxx, d->_begy, d->_begx, d->_maxy, d->_maxx)); sminrow = max(s->_begy, d->_begy) - s->_begy; smincol = max(s->_begx, d->_begx) - s->_begx; @@ -61,16 +61,16 @@ int overwrite(WINDOW *win1, WINDOW *win2) return OK; } -int copywin(WINDOW *src, WINDOW *dst, +int copywin(WINDOW *src, WINDOW *dst, int sminrow, int smincol, - int dminrow, int dmincol, int dmaxrow, int dmaxcol, + int dminrow, int dmincol, int dmaxrow, int dmaxcol, int over) { int sx, sy, dx, dy; T(("copywin(%x, %x, %d, %d, %d, %d, %d, %d, %d)", src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over)); - + /* make sure rectangle exists in source */ if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) || (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) { @@ -91,13 +91,13 @@ int sx, sy, dx, dy; dst->_lastchar[dy] = dmincol; for (dx = dmincol, sx = smincol; dx <= dmaxcol; sx++, dx++) { if (over == TRUE ) { - if (((src->_line[sy][sx] & A_CHARTEXT) != ' ') && (dst->_line[dy][dx] != src->_line[sy][sx])) { + if (((src->_line[sy][sx] & A_CHARTEXT) != ' ') && (dst->_line[dy][dx] != src->_line[sy][sx])) { dst->_line[dy][dx] = src->_line[sy][sx]; dst->_lastchar[dy] = dx; } else dst->_firstchar[dy]++; } else { - if (dst->_line[dy][dx] != src->_line[sy][sx]) { + if (dst->_line[dy][dx] != src->_line[sy][sx]) { dst->_line[dy][dx] = src->_line[sy][sx]; dst->_lastchar[dy] = dx; } else diff --git a/lib/libncurses/lib_pad.c b/lib/libncurses/lib_pad.c index 11a0054..5b4aa99 100644 --- a/lib/libncurses/lib_pad.c +++ b/lib/libncurses/lib_pad.c @@ -57,7 +57,7 @@ int prefresh(WINDOW *win, int pminrow, int pmincol, if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol) != ERR) return (doupdate()); else - return ERR; + return ERR; } @@ -67,7 +67,7 @@ int pnoutrefresh(WINDOW *win, int pminrow, int pmincol, int i, j; int m, n; - T(("pnoutrefresh(%x, %d, %d, %d, %d, %d, %d) called", + T(("pnoutrefresh(%x, %d, %d, %d, %d, %d, %d) called", win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)); if (!(win->_flags & _ISPAD)) diff --git a/lib/libncurses/lib_raw.c b/lib/libncurses/lib_raw.c index 5635cae..336f689 100644 --- a/lib/libncurses/lib_raw.c +++ b/lib/libncurses/lib_raw.c @@ -53,7 +53,7 @@ int cbreak() SP->_cbreak = 1; #ifdef TERMIOS - cur_term->Nttyb.c_lflag &= ~ICANON; + cur_term->Nttyb.c_lflag &= ~ICANON; cur_term->Nttyb.c_lflag |= ISIG; cur_term->Nttyb.c_cc[VMIN] = 1; cur_term->Nttyb.c_cc[VTIME] = 0; @@ -73,7 +73,7 @@ int echo() T(("echo() called")); SP->_echo = TRUE; - + #ifdef TERMIOS cur_term->Nttyb.c_lflag |= ECHO; if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1) @@ -140,14 +140,14 @@ int nocbreak() T(("nocbreak() called")); SP->_cbreak = 0; - + #ifdef TERMIOS cur_term->Nttyb.c_lflag |= ICANON; if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1) return ERR; else return OK; -#else +#else cur_term->Nttyb.sg_flags &= ~CBREAK; stty(cur_term->Filedes, &cur_term->Nttyb); return OK; @@ -159,7 +159,7 @@ int noecho() T(("noecho() called")); SP->_echo = FALSE; - + #ifdef TERMIOS cur_term->Nttyb.c_lflag &= ~(ECHO); if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1) @@ -179,7 +179,7 @@ int nonl() T(("nonl() called")); SP->_nl = SP->_nlmapping = FALSE; - + #ifdef TERMIOS cur_term->Nttyb.c_iflag &= ~ICRNL; cur_term->Nttyb.c_oflag &= ~ONLCR; diff --git a/lib/libncurses/lib_scanw.c b/lib/libncurses/lib_scanw.c index d9a6a3c..69b5a33 100644 --- a/lib/libncurses/lib_scanw.c +++ b/lib/libncurses/lib_scanw.c @@ -19,7 +19,7 @@ char buf[BUFSIZ]; if (wgetstr(win, buf) == ERR) return(ERR); - + return(vsscanf(buf, fmt, argp)); } diff --git a/lib/libncurses/lib_screen.c b/lib/libncurses/lib_screen.c index 0c0ab8a..382411b 100644 --- a/lib/libncurses/lib_screen.c +++ b/lib/libncurses/lib_screen.c @@ -10,7 +10,7 @@ int putwin(WINDOW *win, char *file) int fd, i; fd = open(file, O_WRONLY); - if (fd < -1) + if (fd < -1) return ERR; for (i = 0; i < lines; i++) write(fd, win->_line[i], sizeof(chtype)*columns); diff --git a/lib/libncurses/lib_scroll.c b/lib/libncurses/lib_scroll.c index 77bb886..1721a3f 100644 --- a/lib/libncurses/lib_scroll.c +++ b/lib/libncurses/lib_scroll.c @@ -27,12 +27,12 @@ chtype blank = ' '; if (n < 0) { /* save overwritten lines */ - + for (i = 0; i < -n; i++) saved[i] = win->_line[regbottom-i]; /* shift n lines */ - + for (line = regbottom; line >= regtop-n; line--) win->_line[line] = win->_line[line+n]; @@ -46,12 +46,12 @@ chtype blank = ' '; } } else { /* save overwritten lines */ - + for (i = 0; i < n; i++) saved[i] = win->_line[regtop+i]; /* shift n lines */ - + for (line = regtop; line <= regbottom-n; line++) win->_line[line] = win->_line[line+n]; @@ -64,7 +64,7 @@ chtype blank = ' '; *ptr = blank; } } - + free(saved); } @@ -194,7 +194,7 @@ int i; } mvcur(-1, -1, win->_begy+win->_cury, win->_begx+win->_curx); - } else + } else touchline(win, win->_regtop, win->_regbottom - win->_regtop + 1); return OK; diff --git a/lib/libncurses/lib_slk.c b/lib/libncurses/lib_slk.c index 850556f..5d59c69 100644 --- a/lib/libncurses/lib_slk.c +++ b/lib/libncurses/lib_slk.c @@ -68,7 +68,7 @@ slk_noutrefresh(void) SLK *slk = SP->_slk; T(("slk_noutrefresh()")); - + if (slk == NULL) return ERR; if (slk->hidden) @@ -87,7 +87,7 @@ slk_refresh(void) SLK *slk = SP->_slk; T(("slk_refresh()")); - + if (slk == NULL) return ERR; if (slk->hidden) @@ -106,7 +106,7 @@ slk_restore(void) SLK *slk = SP->_slk; T(("slk_restore()")); - + if (slk == NULL) return ERR; slk->hidden = FALSE; @@ -159,7 +159,7 @@ slk_touch(void) { SLK *slk = SP->_slk; T(("slk_touch()")); - + if (slk == NULL) return ERR; slk->dirty = TRUE; @@ -176,7 +176,7 @@ slk_clear(void) SLK *slk = SP->_slk; T(("slk_clear()")); - + if (slk == NULL) return ERR; slk->hidden = TRUE; diff --git a/lib/libncurses/lib_trace.c b/lib/libncurses/lib_trace.c index 6474322..3a66467 100644 --- a/lib/libncurses/lib_trace.c +++ b/lib/libncurses/lib_trace.c @@ -19,7 +19,7 @@ extern int errno; #endif -int _tracing = 0; +int _tracing = 0; static int tracefd; @@ -56,15 +56,15 @@ struct {unsigned int val; char *name;} names[] = { {A_STANDOUT, "A_STANDOUT, ",}, - {A_UNDERLINE, "A_UNDERLINE, ",}, + {A_UNDERLINE, "A_UNDERLINE, ",}, {A_REVERSE, "A_REVERSE, ",}, {A_BLINK, "A_BLINK, ",}, {A_DIM, "A_DIM, ",}, - {A_BOLD, "A_BOLD, ",}, - {A_ALTCHARSET, "A_ALTCHARSET, ",}, + {A_BOLD, "A_BOLD, ",}, + {A_ALTCHARSET, "A_ALTCHARSET, ",}, {A_INVIS, "A_INVIS, ",}, {A_PROTECT, "A_PROTECT, ",}, - {A_CHARTEXT, "A_CHARTEXT, ",}, + {A_CHARTEXT, "A_CHARTEXT, ",}, {A_NORMAL, "A_NORMAL, ",}, }, colors[] = @@ -150,7 +150,7 @@ char *visbuf(const char *buf) char *_tracechar(const unsigned char ch) { static char crep[20]; - /* + /* * We can show the actual character if it's either an ordinary printable * or one of the high-half characters. */ diff --git a/lib/libncurses/lib_vidattr.c b/lib/libncurses/lib_vidattr.c index b2fee87..eb796f4 100644 --- a/lib/libncurses/lib_vidattr.c +++ b/lib/libncurses/lib_vidattr.c @@ -84,9 +84,9 @@ chtype turn_on = (newmode & ~previous_attr) & ~A_COLOR; tputs(exit_alt_charset_mode, 1, outc); previous_attr &= ~A_ALTCHARSET; } - if (previous_attr) + if (previous_attr) tputs(exit_attribute_mode, 1, outc); - + } else if (set_attributes) { if (turn_on || turn_off) { tputs(tparm(set_attributes, @@ -103,7 +103,7 @@ chtype turn_on = (newmode & ~previous_attr) & ~A_COLOR; } else { T(("turning %x off", _traceattr(turn_off))); - + if ((turn_off & A_ALTCHARSET) && exit_alt_charset_mode) { tputs(exit_alt_charset_mode, 1, outc); turn_off &= ~A_ALTCHARSET; @@ -126,7 +126,7 @@ chtype turn_on = (newmode & ~previous_attr) & ~A_COLOR; T(("turning %x on", _traceattr(turn_on))); - if ((turn_on & A_ALTCHARSET) && enter_alt_charset_mode) + if ((turn_on & A_ALTCHARSET) && enter_alt_charset_mode) tputs(enter_alt_charset_mode, 1, outc); if ((turn_on & A_BLINK) && enter_blink_mode) diff --git a/lib/libncurses/lib_window.c b/lib/libncurses/lib_window.c index c2686b9..699863c 100644 --- a/lib/libncurses/lib_window.c +++ b/lib/libncurses/lib_window.c @@ -50,15 +50,15 @@ int linesize, i; nwin->_curx = win->_curx; nwin->_cury = win->_cury; nwin->_maxy = win->_maxy; - nwin->_maxx = win->_maxx; + nwin->_maxx = win->_maxx; nwin->_begy = win->_begy; nwin->_begx = win->_begx; nwin->_flags = win->_flags; nwin->_attrs = win->_attrs; - nwin->_bkgd = win->_bkgd; + nwin->_bkgd = win->_bkgd; - nwin->_clear = win->_clear; + nwin->_clear = win->_clear; nwin->_scroll = win->_scroll; nwin->_leave = win->_leave; nwin->_use_keypad = win->_use_keypad; @@ -68,7 +68,7 @@ int linesize, i; nwin->_sync = win->_sync; nwin->_parx = win->_parx; nwin->_pary = win->_pary; - nwin->_parent = win->_parent; + nwin->_parent = win->_parent; nwin->_regtop = win->_regtop; nwin->_regbottom = win->_regbottom; |