summaryrefslogtreecommitdiff
path: root/term/munge.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-12 15:10:30 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-12 15:10:30 +0000
commit4b4fc640461f0f6e152204deda38a4e9272fe9e1 (patch)
tree90987f57b1ce297ed33393520f6bd1270000e1f1 /term/munge.c
parent0ca5a446a7d11fabb437697da5c642e47f9e779f (diff)
*** empty log message ***
Diffstat (limited to 'term/munge.c')
-rw-r--r--term/munge.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/term/munge.c b/term/munge.c
index 03ea9106..653d32ba 100644
--- a/term/munge.c
+++ b/term/munge.c
@@ -49,7 +49,11 @@ poutput (int c)
else if (c == '\r')
output_psize = 0;
else if (c == '\t')
- output_psize += (output_psize + 8) % 8;
+ {
+ output_psize++;
+ while (output_psize % 8)
+ output_psize++;
+ }
else if (c == '\b')
output_psize--;
@@ -131,7 +135,7 @@ output_width (int c, int loc)
int n = loc + 1;
while (n % 8)
n++;
- return n;
+ return n;
}
if ((c >= ' ') && (c < '\177'))
return 1;
@@ -229,7 +233,7 @@ echo_char (char c, int hderase, int quoted)
if (echo_double (c, quoted))
{
output_character ('^');
- output_character (c + ('A' - CHAR_SOH));
+ output_character (c ^ CTRL_BIT);
}
else
output_character (c);