summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-29 19:12:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-29 19:12:03 +0000
commit06f866c1bd96deef2b54270631540a8455f9dc15 (patch)
tree67ef314c1f45a8d96d92e4192531f7b0ad60a724
parent94e309182c047d28ed68f51549842b029b644ddf (diff)
correct cursor movement
-rw-r--r--sys/arch/pica/pica/swapgeneric.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/pica/pica/swapgeneric.c b/sys/arch/pica/pica/swapgeneric.c
index 29fc7a8eb90..303b5e5f542 100644
--- a/sys/arch/pica/pica/swapgeneric.c
+++ b/sys/arch/pica/pica/swapgeneric.c
@@ -160,30 +160,34 @@ gets(cp)
lp = cp;
for (;;) {
- printf("%c", c = cngetc()&0177);
+ c = cngetc() & 0177;
switch (c) {
case '\n':
case '\r':
+ cnputc(c);
*lp++ = '\0';
return;
case '\b':
case '\177':
if (lp > cp) {
- printf(" \b");
+ printf("\b \b");
lp--;
}
continue;
case '#':
+ cnputc(c);
lp--;
if (lp < cp)
lp = cp;
continue;
case '@':
case 'u'&037:
+ cnputc(c);
+ cnputc('\n');
lp = cp;
- printf("%c", '\n');
continue;
default:
+ cnputc(c);
*lp++ = c;
}
}