summaryrefslogtreecommitdiff
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
parent0ca5a446a7d11fabb437697da5c642e47f9e779f (diff)
*** empty log message ***
-rw-r--r--term/ChangeLog12
-rw-r--r--term/munge.c10
-rw-r--r--term/term.h4
3 files changed, 22 insertions, 4 deletions
diff --git a/term/ChangeLog b/term/ChangeLog
index a4831628..aceb513b 100644
--- a/term/ChangeLog
+++ b/term/ChangeLog
@@ -1,3 +1,15 @@
+Mon Aug 12 11:04:28 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * munge.c (poutput): Compute tab width using the same loop
+ strategy as output_character and output_width.
+
+Thu Aug 8 17:16:06 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * munge.c (echo_char): Compute non-ctrl version of control
+ character correctly.
+ * term.h (CHAR_SOH): Delete macro.
+ (CTRL_BIT): New macro.
+
Mon Jul 29 02:46:12 1996 Roland McGrath <roland@baalperazim.frob.com>
* munge.c (input_character): In LAST_LNEXT case, jump to `alldone'
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);
diff --git a/term/term.h b/term/term.h
index 954fb73c..44a5e248 100644
--- a/term/term.h
+++ b/term/term.h
@@ -33,13 +33,15 @@
#undef NOFLSH
#include <termios.h>
-#define CHAR_SOH '\001' /* C-a */
#define CHAR_EOT '\004' /* C-d */
#define CHAR_DC1 '\021' /* C-q */
#define CHAR_DC2 '\022' /* C-r */
#define CHAR_DC3 '\023' /* C-s */
#define CHAR_USER_QUOTE '\377' /* break quoting, etc. */
+/* This bit specifies control */
+#define CTRL_BIT 0x20
+
/* XXX These belong in <termios.h> */
#define ILCASE (1 << 14)
#define OLCASE (1 << 9)