summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:03 +0100
committerKarel Zak2006-12-07 00:26:03 +0100
commit24f4bbff7f0a9b01f5a9fb0a4c1eff5b05b15f6f (patch)
tree8c970e39173e4c5cfb5863b8a4ef1b4e914cf64c /text-utils/more.c
parentImported from util-linux-2.11v tarball. (diff)
downloadkernel-qcow2-util-linux-24f4bbff7f0a9b01f5a9fb0a4c1eff5b05b15f6f.tar.gz
kernel-qcow2-util-linux-24f4bbff7f0a9b01f5a9fb0a4c1eff5b05b15f6f.tar.xz
kernel-qcow2-util-linux-24f4bbff7f0a9b01f5a9fb0a4c1eff5b05b15f6f.zip
Imported from util-linux-2.11w tarball.
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 452e4ff89..364c747b6 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -1915,7 +1915,7 @@ int readch () {
static char *BS = "\b";
static char *BSB = "\b \b";
static char *CARAT = "^";
-#define ERACEONECOLUMN \
+#define ERASEONECOLUMN \
if (docrterase) \
errwrite(BSB); \
else \
@@ -1926,7 +1926,6 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
int c;
int slash = 0;
int maxlen;
- int cbuf;
sp = buf;
maxlen = 0;
@@ -1964,14 +1963,14 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
}
if (mblength == 1) {
- ERACEONECOLUMN
+ ERASEONECOLUMN
}
else {
int wc_width;
wc_width = wcwidth (wc);
wc_width = (wc_width < 1) ? 1 : wc_width;
while (wc_width--) {
- ERACEONECOLUMN
+ ERASEONECOLUMN
}
}
@@ -1984,13 +1983,13 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
#endif
{
--promptlen;
- ERACEONECOLUMN
+ ERASEONECOLUMN
--sp;
}
if ((*sp < ' ' && *sp != '\n') || *sp == RUBOUT) {
--promptlen;
- ERACEONECOLUMN
+ ERASEONECOLUMN
}
continue;
}
@@ -2021,7 +2020,7 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
}
if (slash && ((cc_t) c == otty.c_cc[VKILL]
|| (cc_t) c == otty.c_cc[VERASE])) {
- ERACEONECOLUMN
+ ERASEONECOLUMN
--sp;
}
if (c != '\\')
@@ -2032,9 +2031,9 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
errwrite(CARAT);
promptlen++;
}
- cbuf = c;
if (c != '\n' && c != ESC) {
- errwrite1((char *)(&cbuf));
+ char cbuf = c;
+ errwrite1(&cbuf);
promptlen++;
}
else