summaryrefslogtreecommitdiffstats
path: root/lib/libcurses
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:51:47 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:51:47 +0000
commitf05428e4cd63dde97bac14b84dd146a5c00455e3 (patch)
treee1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libcurses
parent6de57e42c294763c78d77b0a9a7c5a08008a378a (diff)
downloadFreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip
FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/EXAMPLES/ex1.c10
-rw-r--r--lib/libcurses/PSD.doc/ex1.c10
-rw-r--r--lib/libcurses/PSD.doc/ex2.c4
-rw-r--r--lib/libcurses/PSD.doc/life.c2
-rw-r--r--lib/libcurses/addbytes.c6
-rw-r--r--lib/libcurses/clrtoeol.c2
-rw-r--r--lib/libcurses/cr_put.c8
-rw-r--r--lib/libcurses/curses.c6
-rw-r--r--lib/libcurses/curses.h4
-rw-r--r--lib/libcurses/deleteln.c4
-rw-r--r--lib/libcurses/erase.c2
-rw-r--r--lib/libcurses/id_subwins.c2
-rw-r--r--lib/libcurses/initscr.c2
-rw-r--r--lib/libcurses/insch.c2
-rw-r--r--lib/libcurses/insertln.c4
-rw-r--r--lib/libcurses/newwin.c8
-rw-r--r--lib/libcurses/overlay.c2
-rw-r--r--lib/libcurses/overwrite.c2
-rw-r--r--lib/libcurses/refresh.c120
-rw-r--r--lib/libcurses/scanw.c2
-rw-r--r--lib/libcurses/setterm.c6
-rw-r--r--lib/libcurses/tstp.c2
-rw-r--r--lib/libcurses/tty.c8
-rw-r--r--lib/libcurses/unctrl.c2
24 files changed, 110 insertions, 110 deletions
diff --git a/lib/libcurses/EXAMPLES/ex1.c b/lib/libcurses/EXAMPLES/ex1.c
index 76da41b..e8a4e0f 100644
--- a/lib/libcurses/EXAMPLES/ex1.c
+++ b/lib/libcurses/EXAMPLES/ex1.c
@@ -47,7 +47,7 @@ static char sccsid[] = "@(#)ex1.c 8.1 (Berkeley) 6/4/93";
#include <signal.h>
-#define YSIZE 10
+#define YSIZE 10
#define XSIZE 20
int quit();
@@ -65,7 +65,7 @@ main()
crmode(); /* We want cbreak mode */
noecho(); /* We want to have control of chars */
delwin(stdscr); /* Create our own stdscr */
- stdscr = newwin(YSIZE, XSIZE, 10, 35);
+ stdscr = newwin(YSIZE, XSIZE, 10, 35);
flushok(stdscr, TRUE); /* Enable flushing of stdout */
scrollok(stdscr, TRUE); /* Enable scrolling */
erase(); /* Initially, clear the screen */
@@ -107,6 +107,6 @@ quit()
exit(0);
}
-
-
-
+
+
+
diff --git a/lib/libcurses/PSD.doc/ex1.c b/lib/libcurses/PSD.doc/ex1.c
index 02ed9b9..97d8432 100644
--- a/lib/libcurses/PSD.doc/ex1.c
+++ b/lib/libcurses/PSD.doc/ex1.c
@@ -37,7 +37,7 @@
#include <signal.h>
-#define YSIZE 10
+#define YSIZE 10
#define XSIZE 20
int quit();
@@ -55,7 +55,7 @@ main()
crmode(); /* We want cbreak mode */
noecho(); /* We want to have control of chars */
delwin(stdscr); /* Create our own stdscr */
- stdscr = newwin(YSIZE, XSIZE, 10, 35);
+ stdscr = newwin(YSIZE, XSIZE, 10, 35);
flushok(stdscr, TRUE); /* Enable flushing of stdout */
scrollok(stdscr, TRUE); /* Enable scrolling */
erase(); /* Initially, clear the screen */
@@ -97,6 +97,6 @@ quit()
exit(0);
}
-
-
-
+
+
+
diff --git a/lib/libcurses/PSD.doc/ex2.c b/lib/libcurses/PSD.doc/ex2.c
index 13e8f29..7b23b61 100644
--- a/lib/libcurses/PSD.doc/ex2.c
+++ b/lib/libcurses/PSD.doc/ex2.c
@@ -52,7 +52,7 @@ main()
char id[100];
int hh = 0;
int curx, cury, base, arg;
-
+
initscr();
signal(SIGINT, quit);
crmode();
@@ -181,7 +181,7 @@ main()
insertln();
sprintf(id, "%d: ", base);
addstr(id);
- for (j = 0; j < XSIZE - strlen(id) - 2; j++)
+ for (j = 0; j < XSIZE - strlen(id) - 2; j++)
addch('0' + (base % 10));
cury++;
} else if (cury >= YSIZE) {
diff --git a/lib/libcurses/PSD.doc/life.c b/lib/libcurses/PSD.doc/life.c
index 72febba..5ecd07f 100644
--- a/lib/libcurses/PSD.doc/life.c
+++ b/lib/libcurses/PSD.doc/life.c
@@ -128,7 +128,7 @@ getstart()
if (Head != NULL) /* start new list */
dellist(Head);
- Head = malloc(sizeof (LIST));
+ Head = malloc(sizeof (LIST));
/*
* loop through the screen looking for 'x's, and add a list
diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
index 6dd8bf9..39124a0 100644
--- a/lib/libcurses/addbytes.c
+++ b/lib/libcurses/addbytes.c
@@ -75,7 +75,7 @@ __waddbytes(win, bytes, count, so)
#ifdef DEBUG
__CTRACE("ADDBYTES(%0.2o, %d, %d)\n", win, y, x);
#endif
-
+
lp = win->lines[y];
if (lp->flags & __ISPASTEOL) {
lp->flags &= ~__ISPASTEOL;
@@ -96,7 +96,7 @@ newline: if (y == win->maxy - 1) {
if (c == '\n')
break;
}
-
+
stand = '\0';
if (win->flags & __WSTANDOUT || so)
stand |= __STANDOUT;
@@ -104,7 +104,7 @@ newline: if (y == win->maxy - 1) {
__CTRACE("ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp);
#endif
- if (lp->line[x].ch != c ||
+ if (lp->line[x].ch != c ||
!(lp->line[x].attr & stand)) {
newx = x + win->ch_off;
if (!(lp->flags & __ISDIRTY)) {
diff --git a/lib/libcurses/clrtoeol.c b/lib/libcurses/clrtoeol.c
index 44fc190..1f10c41 100644
--- a/lib/libcurses/clrtoeol.c
+++ b/lib/libcurses/clrtoeol.c
@@ -70,7 +70,7 @@ wclrtoeol(win)
}
#ifdef DEBUG
__CTRACE("CLRTOEOL: minx = %d, maxx = %d, firstch = %d, lastch = %d\n",
- minx, maxx - win->lines[y]->line, *win->lines[y]->firstchp,
+ minx, maxx - win->lines[y]->line, *win->lines[y]->firstchp,
*win->lines[y]->lastchp);
#endif
/* Update firstch and lastch for the line. */
diff --git a/lib/libcurses/cr_put.c b/lib/libcurses/cr_put.c
index 36b39fc..b69b01a 100644
--- a/lib/libcurses/cr_put.c
+++ b/lib/libcurses/cr_put.c
@@ -82,8 +82,8 @@ __mvcur(ly, lx, y, x, in_refresh)
if (destline != outline || destcol != outcol)
fgoto(in_refresh);
return (OK);
-}
-
+}
+
static void
fgoto(in_refresh)
int in_refresh;
@@ -137,7 +137,7 @@ fgoto(in_refresh)
* list this won't work. We should probably have an
* sc capability but sf will generally take the place
* if it works.
- *
+ *
* Superbee glitch: in the middle of the screen have
* to use esc B (down) because linefeed screws up in
* "Efficient Paging" (what a joke) mode (which is
@@ -167,7 +167,7 @@ fgoto(in_refresh)
*/
if (outcol != COLS - 1 && plod(strlen(cgp), in_refresh) > 0)
plod(0, in_refresh);
- else
+ else
tputs(cgp, 1, __cputchar);
} else
plod(0, in_refresh);
diff --git a/lib/libcurses/curses.c b/lib/libcurses/curses.c
index 13ee80e..d78d284 100644
--- a/lib/libcurses/curses.c
+++ b/lib/libcurses/curses.c
@@ -41,9 +41,9 @@ static char sccsid[] = "@(#)curses.c 8.3 (Berkeley) 5/4/94";
int __echoit = 1; /* If stty indicates ECHO. */
int __pfast;
int __rawmode = 0; /* If stty indicates RAW mode. */
-int __noqch = 0; /*
- * If terminal doesn't have
- * insert/delete line capabilities
+int __noqch = 0; /*
+ * If terminal doesn't have
+ * insert/delete line capabilities
* or change scroll capabilities
* for quick change on refresh.
*/
diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h
index 8b699fa..1142ca5 100644
--- a/lib/libcurses/curses.h
+++ b/lib/libcurses/curses.h
@@ -145,7 +145,7 @@ extern char __unctrllen[256]; /* Control strings length. */
* A line is an array of __LDATA structures pointed to by the 'line' pointer.
*
* IMPORTANT: the __LDATA structure must NOT induce any padding, so if new
- * fields are added -- padding fields with *constant values* should ensure
+ * fields are added -- padding fields with *constant values* should ensure
* that the compiler will not generate any padding when storing an array of
* __LDATA structures. This is to enable consistent use of memcmp, and memcpy
* for comparing and copying arrays.
@@ -188,7 +188,7 @@ typedef struct __window { /* Window structure. */
#define __SCROLLOK 0x020 /* Scrolling ok. */
#define __CLEAROK 0x040 /* Clear on next refresh. */
#define __WSTANDOUT 0x080 /* Standout window */
-#define __LEAVEOK 0x100 /* If curser left */
+#define __LEAVEOK 0x100 /* If curser left */
#define __FULLLINE 0x200 /* Line width = terminal width. */
u_int flags;
} WINDOW;
diff --git a/lib/libcurses/deleteln.c b/lib/libcurses/deleteln.c
index 4cb08ea..afe6b93 100644
--- a/lib/libcurses/deleteln.c
+++ b/lib/libcurses/deleteln.c
@@ -60,8 +60,8 @@ wdeleteln(win)
if (win->orig == NULL)
win->lines[y] = win->lines[y + 1];
else
- (void) memcpy(win->lines[y]->line,
- win->lines[y + 1]->line,
+ (void) memcpy(win->lines[y]->line,
+ win->lines[y + 1]->line,
win->maxx * __LDATASIZE);
__touchline(win, y, 0, win->maxx - 1, 0);
}
diff --git a/lib/libcurses/erase.c b/lib/libcurses/erase.c
index 42ca68a..c2e3e48 100644
--- a/lib/libcurses/erase.c
+++ b/lib/libcurses/erase.c
@@ -58,7 +58,7 @@ werase(win)
end = &start[win->maxx];
for (sp = start; sp < end; sp++)
if (sp->ch != ' ' || sp->attr != 0) {
- maxx = sp;
+ maxx = sp;
if (minx == -1)
minx = sp - start;
sp->ch = ' ';
diff --git a/lib/libcurses/id_subwins.c b/lib/libcurses/id_subwins.c
index 3528348..0ceef2d 100644
--- a/lib/libcurses/id_subwins.c
+++ b/lib/libcurses/id_subwins.c
@@ -59,7 +59,7 @@ __id_subwins(orig)
oy = orig->cury;
for (y = realy - win->begy; y < win->maxy; y++, oy++)
- win->lines[y]->line =
+ win->lines[y]->line =
&orig->lines[oy]->line[win->ch_off];
}
}
diff --git a/lib/libcurses/initscr.c b/lib/libcurses/initscr.c
index 1af8b6f..ac39669 100644
--- a/lib/libcurses/initscr.c
+++ b/lib/libcurses/initscr.c
@@ -68,7 +68,7 @@ initscr()
return (NULL);
/* Need either homing or cursor motion for refreshes */
- if (!HO && !CM)
+ if (!HO && !CM)
return (NULL);
if (curscr != NULL)
diff --git a/lib/libcurses/insch.c b/lib/libcurses/insch.c
index 36cc0de..aa48bcb 100644
--- a/lib/libcurses/insch.c
+++ b/lib/libcurses/insch.c
@@ -61,7 +61,7 @@ winsch(win, ch)
temp1->ch = ch;
temp1->attr &= ~__STANDOUT;
__touchline(win, win->cury, win->curx, win->maxx - 1, 0);
- if (win->cury == LINES - 1 &&
+ if (win->cury == LINES - 1 &&
(win->lines[LINES - 1]->line[COLS - 1].ch != ' ' ||
win->lines[LINES -1]->line[COLS - 1].attr != 0))
if (win->flags & __SCROLLOK) {
diff --git a/lib/libcurses/insertln.c b/lib/libcurses/insertln.c
index 4de367e..ce713ca 100644
--- a/lib/libcurses/insertln.c
+++ b/lib/libcurses/insertln.c
@@ -62,8 +62,8 @@ winsertln(win)
if (win->orig == NULL)
win->lines[y] = win->lines[y - 1];
else
- (void)memcpy(win->lines[y]->line,
- win->lines[y - 1]->line,
+ (void)memcpy(win->lines[y]->line,
+ win->lines[y - 1]->line,
win->maxx * __LDATASIZE);
__touchline(win, y, 0, win->maxx - 1, 0);
}
diff --git a/lib/libcurses/newwin.c b/lib/libcurses/newwin.c
index afc90cf..3273817 100644
--- a/lib/libcurses/newwin.c
+++ b/lib/libcurses/newwin.c
@@ -158,7 +158,7 @@ __makenew(nl, nc, by, bx, sub)
register WINDOW *win;
register __LINE *lp;
int i;
-
+
#ifdef DEBUG
__CTRACE("makenew: (%d, %d, %d, %d)\n", nl, nc, by, bx);
@@ -169,7 +169,7 @@ __makenew(nl, nc, by, bx, sub)
__CTRACE("makenew: nl = %d\n", nl);
#endif
- /*
+ /*
* Set up line pointer array and line space.
*/
if ((win->lines = malloc (nl * sizeof(__LINE *))) == NULL) {
@@ -187,14 +187,14 @@ __makenew(nl, nc, by, bx, sub)
/*
* Allocate window space in one chunk.
*/
- if ((win->wspace =
+ if ((win->wspace =
malloc(nc * nl * sizeof(__LDATA))) == NULL) {
free(win->lines);
free(win->lspace);
free(win);
return NULL;
}
-
+
/*
* Point line pointers to line space, and lines themselves into
* window space.
diff --git a/lib/libcurses/overlay.c b/lib/libcurses/overlay.c
index 9f35c79..22c3433 100644
--- a/lib/libcurses/overlay.c
+++ b/lib/libcurses/overlay.c
@@ -69,7 +69,7 @@ overlay(win1, win2)
for (y = starty; y < endy; y++, y1++, y2++) {
end = &win1->lines[y1]->line[endx - win1->begx];
x = startx - win2->begx;
- for (sp = &win1->lines[y1]->line[startx - win1->begx];
+ for (sp = &win1->lines[y1]->line[startx - win1->begx];
sp < end; sp++) {
if (!isspace(sp->ch)) {
wmove(win2, y2, x);
diff --git a/lib/libcurses/overwrite.c b/lib/libcurses/overwrite.c
index e2d91bd..162c731 100644
--- a/lib/libcurses/overwrite.c
+++ b/lib/libcurses/overwrite.c
@@ -66,7 +66,7 @@ overwrite(win1, win2)
x = endx - startx;
for (y = starty; y < endy; y++) {
(void)memcpy(
- &win2->lines[y - win2->begy]->line[startx - win2->begx],
+ &win2->lines[y - win2->begy]->line[startx - win2->begx],
&win1->lines[y - win1->begy]->line[startx - win1->begx],
x * __LDATASIZE);
__touchline(win2, y, startx - win2->begx, endx - win2->begx,
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c
index 5b091f9..6350f1f 100644
--- a/lib/libcurses/refresh.c
+++ b/lib/libcurses/refresh.c
@@ -44,7 +44,7 @@ static short ly, lx;
static void domvcur __P((int, int, int, int));
static int makech __P((WINDOW *, int));
-static void quickch __P((WINDOW *));
+static void quickch __P((WINDOW *));
static void scrolln __P((int, int, int, int, int));
/*
@@ -60,7 +60,7 @@ wrefresh(win)
register int retval;
register short wy;
int dnum;
-
+
/* Initialize loop parameters. */
ly = curscr->cury;
lx = curscr->curx;
@@ -71,7 +71,7 @@ wrefresh(win)
for (wy = 0; wy < win->maxy; wy++) {
wlp = win->lines[wy];
if (wlp->flags & __ISDIRTY)
- wlp->hash =
+ wlp->hash =
__hash((char *) wlp->line, win->maxx * __LDATASIZE);
}
@@ -126,12 +126,12 @@ wrefresh(win)
for (i = 0; i < curscr->maxy; i++) {
__CTRACE("C: %d:", i);
__CTRACE(" 0x%x \n", curscr->lines[i]->hash);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
+ for (j = 0; j < curscr->maxx; j++)
+ __CTRACE("%c",
curscr->lines[i]->line[j].ch);
__CTRACE("\n");
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%x",
+ for (j = 0; j < curscr->maxx; j++)
+ __CTRACE("%x",
curscr->lines[i]->line[j].attr);
__CTRACE("\n");
if (i < win->begy || i > win->begy + win->maxy - 1)
@@ -139,12 +139,12 @@ wrefresh(win)
__CTRACE("W: %d:", i - win->begy);
__CTRACE(" 0x%x \n", win->lines[i - win->begy]->hash);
__CTRACE(" 0x%x ", win->lines[i - win->begy]->flags);
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%c",
+ for (j = 0; j < win->maxx; j++)
+ __CTRACE("%c",
win->lines[i - win->begy]->line[j].ch);
__CTRACE("\n");
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%x",
+ for (j = 0; j < win->maxx; j++)
+ __CTRACE("%x",
win->lines[i - win->begy]->line[j].attr);
__CTRACE("\n");
}
@@ -168,7 +168,7 @@ wrefresh(win)
if (*win->lines[wy]->lastchp < win->maxx +
win->ch_off)
*win->lines[wy]->lastchp = win->ch_off;
- if (*win->lines[wy]->lastchp <
+ if (*win->lines[wy]->lastchp <
*win->lines[wy]->firstchp) {
#ifdef DEBUG
__CTRACE("wrefresh: line %d notdirty \n", wy);
@@ -179,11 +179,11 @@ wrefresh(win)
}
#ifdef DEBUG
- __CTRACE("\t%d\t%d\n", *win->lines[wy]->firstchp,
+ __CTRACE("\t%d\t%d\n", *win->lines[wy]->firstchp,
*win->lines[wy]->lastchp);
#endif
}
-
+
#ifdef DEBUG
__CTRACE("refresh: ly=%d, lx=%d\n", ly, lx);
#endif
@@ -258,7 +258,7 @@ makech(win, wy)
force = win->lines[wy]->flags & __FORCEPAINT;
win->lines[wy]->flags &= ~__FORCEPAINT;
if (CE && !curwin) {
- for (cp = &win->lines[wy]->line[win->maxx - 1];
+ for (cp = &win->lines[wy]->line[win->maxx - 1];
cp->ch == ' ' && cp->attr == 0; cp--)
if (cp <= win->lines[wy]->line)
break;
@@ -294,15 +294,15 @@ makech(win, wy)
domvcur(ly, lx, y, wx + win->begx);
#ifdef DEBUG
- __CTRACE("makech: 1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d\n",
+ __CTRACE("makech: 1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d\n",
wx, ly, lx, y, wx + win->begx, force);
#endif
ly = y;
lx = wx + win->begx;
- while ((force || memcmp(nsp, csp, sizeof(__LDATA)) != 0)
+ while ((force || memcmp(nsp, csp, sizeof(__LDATA)) != 0)
&& wx <= lch) {
- if (ce != NULL && win->maxx + win->begx ==
+ if (ce != NULL && win->maxx + win->begx ==
curscr->maxx && wx >= nlsp && nsp->ch == ' ' && nsp->attr == 0) {
/* Check for clear to end-of-line. */
cep = &curscr->lines[win->begy + wy]->line[win->begx + win->maxx - 1];
@@ -314,7 +314,7 @@ makech(win, wy)
#ifdef DEBUG
__CTRACE("makech: clsp = %d, nlsp = %d\n", clsp, nlsp);
#endif
- if ((clsp - nlsp >= strlen(CE)
+ if ((clsp - nlsp >= strlen(CE)
&& clsp < win->maxx) ||
wy == win->maxy - 1) {
#ifdef DEBUG
@@ -369,21 +369,21 @@ makech(win, wy)
putchar(nsp->ch);
}
if (wx + win->begx < curscr->maxx) {
- domvcur(ly, wx + win->begx,
+ domvcur(ly, wx + win->begx,
win->begy + win->maxy - 1,
win->begx + win->maxx - 1);
}
ly = win->begy + win->maxy - 1;
lx = win->begx + win->maxx - 1;
return (OK);
- }
- if (wx < win->maxx || wy < win->maxy - 1 ||
+ }
+ if (wx < win->maxx || wy < win->maxy - 1 ||
!(win->flags & __SCROLLWIN)) {
if (!curwin) {
csp->attr = nsp->attr;
putchar(csp->ch = nsp->ch);
csp++;
- } else
+ } else
putchar(nsp->ch);
}
#ifdef DEBUG
@@ -433,7 +433,7 @@ domvcur(oy, ox, ny, nx)
/*
* Quickch() attempts to detect a pattern in the change of the window
- * in order to optimize the change, e.g., scroll n lines as opposed to
+ * in order to optimize the change, e.g., scroll n lines as opposed to
* repainting the screen line by line.
*/
@@ -449,26 +449,26 @@ quickch(win)
__LDATA buf[1024];
u_int blank_hash;
- /*
+ /*
* Find how many lines from the top of the screen are unchanged.
*/
for (top = win->begy; top < win->begy + win->maxy; top++)
if (win->lines[top - win->begy]->flags & __FORCEPAINT ||
win->lines[top - win->begy]->hash != curscr->lines[top]->hash
|| memcmp(win->lines[top - win->begy]->line,
- curscr->lines[top]->line,
+ curscr->lines[top]->line,
win->maxx * __LDATASIZE) != 0)
break;
else
win->lines[top - win->begy]->flags &= ~__ISDIRTY;
/*
- * Find how many lines from bottom of screen are unchanged.
+ * Find how many lines from bottom of screen are unchanged.
*/
for (bot = win->begy + win->maxy - 1; bot >= (int) win->begy; bot--)
if (win->lines[bot - win->begy]->flags & __FORCEPAINT ||
win->lines[bot - win->begy]->hash != curscr->lines[bot]->hash
|| memcmp(win->lines[bot - win->begy]->line,
- curscr->lines[bot]->line,
+ curscr->lines[bot]->line,
win->maxx * __LDATASIZE) != 0)
break;
else
@@ -489,7 +489,7 @@ quickch(win)
* Search for the largest block of text not changed.
* Invariants of the loop:
* - Startw is the index of the beginning of the examined block in win.
- * - Starts is the index of the beginning of the examined block in
+ * - Starts is the index of the beginning of the examined block in
* curscr.
* - Curw is the index of one past the end of the exmined block in win.
* - Curs is the index of one past the end of the exmined block in
@@ -498,7 +498,7 @@ quickch(win)
*/
for (bsize = bot - top; bsize >= THRESH; bsize--) {
for (startw = top; startw <= bot - bsize; startw++)
- for (starts = top; starts <= bot - bsize;
+ for (starts = top; starts <= bot - bsize;
starts++) {
for (curw = startw, curs = starts;
curs < starts + bsize; curw++, curs++)
@@ -507,7 +507,7 @@ quickch(win)
(win->lines[curw - win->begy]->hash !=
curscr->lines[curs]->hash ||
memcmp(win->lines[curw - win->begy]->line,
- curscr->lines[curs]->line,
+ curscr->lines[curs]->line,
win->maxx * __LDATASIZE) != 0))
break;
if (curs == starts + bsize)
@@ -516,16 +516,16 @@ quickch(win)
}
done:
/* Did not find anything */
- if (bsize < THRESH)
+ if (bsize < THRESH)
return;
#ifdef DEBUG
- __CTRACE("quickch:bsize=%d,starts=%d,startw=%d,curw=%d,curs=%d,top=%d,bot=%d\n",
+ __CTRACE("quickch:bsize=%d,starts=%d,startw=%d,curw=%d,curs=%d,top=%d,bot=%d\n",
bsize, starts, startw, curw, curs, top, bot);
#endif
- /*
- * Make sure that there is no overlap between the bottom and top
+ /*
+ * Make sure that there is no overlap between the bottom and top
* regions and the middle scrolled block.
*/
if (bot < curs)
@@ -540,12 +540,12 @@ quickch(win)
for (i = 0; i < curscr->maxy; i++) {
__CTRACE("C: %d:", i);
__CTRACE(" 0x%x \n", curscr->lines[i]->hash);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
+ for (j = 0; j < curscr->maxx; j++)
+ __CTRACE("%c",
curscr->lines[i]->line[j].ch);
__CTRACE("\n");
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%x",
+ for (j = 0; j < curscr->maxx; j++)
+ __CTRACE("%x",
curscr->lines[i]->line[j].attr);
__CTRACE("\n");
if (i < win->begy || i > win->begy + win->maxy - 1)
@@ -553,17 +553,17 @@ quickch(win)
__CTRACE("W: %d:", i - win->begy);
__CTRACE(" 0x%x \n", win->lines[i - win->begy]->hash);
__CTRACE(" 0x%x ", win->lines[i - win->begy]->flags);
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%c",
+ for (j = 0; j < win->maxx; j++)
+ __CTRACE("%c",
win->lines[i - win->begy]->line[j].ch);
__CTRACE("\n");
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%x",
+ for (j = 0; j < win->maxx; j++)
+ __CTRACE("%x",
win->lines[i - win->begy]->line[j].attr);
__CTRACE("\n");
}
-#endif
-
+#endif
+
/* So we don't have to call __hash() each time */
for (i = 0; i < win->maxx; i++) {
buf[i].ch = ' ';
@@ -579,27 +579,27 @@ quickch(win)
* - Target is the index of the target of line i.
* - Tmp1 points to current line (i).
* - Tmp2 and points to target line (target);
- * - Cur_period is the index of the end of the current period.
+ * - Cur_period is the index of the end of the current period.
* (see below).
*
* There are 2 major issues here that make this rotation non-trivial:
* 1. Scrolling in a scrolling region bounded by the top
* and bottom regions determined (whose size is sc_region).
- * 2. As a result of the use of the mod function, there may be a
+ * 2. As a result of the use of the mod function, there may be a
* period introduced, i.e., 2 maps to 4, 4 to 6, n-2 to 0, and
* 0 to 2, which then causes all odd lines not to be rotated.
- * To remedy this, an index of the end ( = beginning) of the
- * current 'period' is kept, cur_period, and when it is reached,
- * the next period is started from cur_period + 1 which is
+ * To remedy this, an index of the end ( = beginning) of the
+ * current 'period' is kept, cur_period, and when it is reached,
+ * the next period is started from cur_period + 1 which is
* guaranteed not to have been reached since that would mean that
* all records would have been reached. (think about it...).
- *
+ *
* Lines in the rotation can have 3 attributes which are marked on the
* line so that curscr is consistent with the visual screen.
* 1. Not dirty -- lines inside the scrolled block, top region or
* bottom region.
- * 2. Blank lines -- lines in the differential of the scrolling
- * region adjacent to top and bot regions
+ * 2. Blank lines -- lines in the differential of the scrolling
+ * region adjacent to top and bot regions
* depending on scrolling direction.
* 3. Dirty line -- all other lines are marked dirty.
*/
@@ -617,7 +617,7 @@ quickch(win)
__CTRACE("quickch: n=%d startw=%d curw=%d i = %d target=%d ",
n, startw, curw, i, target);
#endif
- if ((target >= startw && target < curw) || target < top
+ if ((target >= startw && target < curw) || target < top
|| target > bot) {
#ifdef DEBUG
__CTRACE("-- notdirty");
@@ -625,7 +625,7 @@ quickch(win)
win->lines[target - win->begy]->flags &= ~__ISDIRTY;
} else if ((n > 0 && target >= top && target < top + n) ||
(n < 0 && target <= bot && target > bot + n)) {
- if (clp->hash != blank_hash || memcmp(clp->line,
+ if (clp->hash != blank_hash || memcmp(clp->line,
buf, win->maxx * __LDATASIZE) !=0) {
(void)memcpy(clp->line, buf,
win->maxx * __LDATASIZE);
@@ -662,14 +662,14 @@ quickch(win)
__CTRACE("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
for (i = 0; i < curscr->maxy; i++) {
__CTRACE("C: %d:", i);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
+ for (j = 0; j < curscr->maxx; j++)
+ __CTRACE("%c",
curscr->lines[i]->line[j].ch);
__CTRACE("\n");
if (i < win->begy || i > win->begy + win->maxy - 1)
continue;
__CTRACE("W: %d:", i - win->begy);
- for (j = 0; j < win->maxx; j++)
+ for (j = 0; j < win->maxx; j++)
__CTRACE("%c",
win->lines[i - win->begy]->line[j].ch);
__CTRACE("\n");
@@ -680,7 +680,7 @@ quickch(win)
scrolln(starts, startw, curs, bot, top);
/*
* Need to repoint any subwindow lines to the rotated
- * line structured.
+ * line structured.
*/
for (wp = win->nextp; wp != win; wp = wp->nextp)
__set_subwin(win, wp);
@@ -846,5 +846,5 @@ scrolln(starts, startw, curs, bot, top)
else
abort();
__mvcur(top, 0, oy, ox, 1);
- }
+ }
}
diff --git a/lib/libcurses/scanw.c b/lib/libcurses/scanw.c
index d8d79fd..221384f 100644
--- a/lib/libcurses/scanw.c
+++ b/lib/libcurses/scanw.c
@@ -101,7 +101,7 @@ wscanw(win, fmt, va_alist)
}
/*
- * mvscanw, mvwscanw --
+ * mvscanw, mvwscanw --
* Implement the mvscanw commands. Due to the variable number of
* arguments, they cannot be macros. Another sigh....
*/
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
index 2c2e36e..ac85708 100644
--- a/lib/libcurses/setterm.c
+++ b/lib/libcurses/setterm.c
@@ -71,9 +71,9 @@ static char *_PC,
/* so SR ta te ti uc ue up us */
&SO, &SR, &TA, &TE, &TI, &UC, &UE, &UP, &US,
/* vb vs ve al dl sf sr AL */
- &VB, &VS, &VE, &al, &dl, &sf, &sr, &AL_PARM,
+ &VB, &VS, &VE, &al, &dl, &sf, &sr, &AL_PARM,
/* DL UP DO LE */
- &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM,
+ &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM,
/* RI */
&RIGHT_PARM,
};
@@ -224,7 +224,7 @@ zap()
__CTRACE("2.2s = %s\n", namp, *fp[-1] ? "TRUE" : "FALSE");
#endif
namp += 2;
-
+
} while (*namp);
namp = "ALbcbtcdceclcmcrcsdcDLdmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullmandnlpcrcscseSFsoSRtatetiucueupusvbvsvealdlsfsrALDLUPDOLERI";
sp = sstrs;
diff --git a/lib/libcurses/tstp.c b/lib/libcurses/tstp.c
index f16a46c..069dbd8 100644
--- a/lib/libcurses/tstp.c
+++ b/lib/libcurses/tstp.c
@@ -65,7 +65,7 @@ __stop_signal_handler(signo)
(void)sigaddset(&set, SIGALRM);
(void)sigaddset(&set, SIGWINCH);
(void)sigprocmask(SIG_BLOCK, &set, &oset);
-
+
/*
* End the window, which also resets the terminal state to the
* original modes.
diff --git a/lib/libcurses/tty.c b/lib/libcurses/tty.c
index f3db2aa..8265881 100644
--- a/lib/libcurses/tty.c
+++ b/lib/libcurses/tty.c
@@ -75,7 +75,7 @@ int
gettmode()
{
useraw = 0;
-
+
if (tcgetattr(__tty_fileno = STDIN_FILENO, &__orig_termios))
if (tcgetattr(__tty_fileno = STDOUT_FILENO, &__orig_termios))
__noterm = 1;
@@ -160,14 +160,14 @@ nocbreak()
return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
}
-
+
int
echo()
{
rawt.c_lflag |= ECHO;
cbreakt.c_lflag |= ECHO;
__baset.c_lflag |= ECHO;
-
+
__echoit = 1;
return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
@@ -179,7 +179,7 @@ noecho()
rawt.c_lflag &= ~ECHO;
cbreakt.c_lflag &= ~ECHO;
__baset.c_lflag &= ~ECHO;
-
+
__echoit = 0;
return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
diff --git a/lib/libcurses/unctrl.c b/lib/libcurses/unctrl.c
index ff52230..530dcc2 100644
--- a/lib/libcurses/unctrl.c
+++ b/lib/libcurses/unctrl.c
@@ -87,7 +87,7 @@ char __unctrllen[256] = {
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 2,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
OpenPOWER on IntegriCloud