public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] elkscmd: fix literal controls (replaces Tommy's #8, #12)
@ 2004-05-29 10:53 claudio
  2004-05-29 18:47 ` Tommy McCabe
  2004-05-31 19:50 ` Miguel Bolanos
  0 siblings, 2 replies; 4+ messages in thread
From: claudio @ 2004-05-29 10:53 UTC (permalink / raw)
  To: linux-8086

[-- Attachment #1: Type: TEXT/PLAIN, Size: 321 bytes --]


This patches replaces literal control characters in levee source files
with their hexadecimal equivalents. Some extra care is required when
applying this patch if the email client tries to do something strange
with the literal controls, so I'll send it as an attachment.

This patch replaces Tommy's patches #8 and #12.

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1845 bytes --]

Only in elkscmd/file_utils: cat
Only in elkscmd/file_utils: chgrp
Only in elkscmd/file_utils: chmod
Only in elkscmd/file_utils: chown
Only in elkscmd/file_utils: cmp
Only in elkscmd/file_utils: cp
Only in elkscmd/file_utils: dd
Only in elkscmd/file_utils: grep
Only in elkscmd/file_utils: l
Only in elkscmd/file_utils: ln
Only in elkscmd/file_utils: ls
Only in elkscmd.orig/file_utils: ls.o
Only in elkscmd/file_utils: mkdir
Only in elkscmd/file_utils: mkfifo
Only in elkscmd/file_utils: mknod
Only in elkscmd/file_utils: more
Only in elkscmd/file_utils: mv
Only in elkscmd/file_utils: rm
Only in elkscmd/file_utils: rmdir
Only in elkscmd/file_utils: sync
Only in elkscmd/file_utils: touch
diff -rud elkscmd.orig/levee/insert.c elkscmd/levee/insert.c
--- elkscmd.orig/levee/insert.c	2004-05-27 21:07:57.000000000 -0300
+++ elkscmd/levee/insert.c	2004-05-29 07:26:08.000000000 -0300
@@ -85,8 +85,8 @@
 	Dflag = (cp==0 || core[cp-1]==EOL);
 	do {
 	    if (Dflag)
-		while ((cmd=peekc()) == '\x14' || cmd == '\x04') {
-		    if (readchar() == '\x14')
+		while ((cmd=peekc()) == 0x14 || cmd == 0x04) {	/* handle ^T, ^D */
+		    if (readchar() == 0x14)
 			currDLE = min(COLS,currDLE+shiftwidth);
 		    else
 			currDLE = max(0,currDLE-shiftwidth);
diff -rud elkscmd.orig/levee/misc.c elkscmd/levee/misc.c
--- elkscmd.orig/levee/misc.c	2004-05-27 21:07:54.000000000 -0300
+++ elkscmd/levee/misc.c	2004-05-29 07:49:00.000000000 -0300
@@ -392,10 +392,10 @@
 	    *size = (ip-start);
             return (c==ESC) ? ESC : EOL;
 	}
-	else if ((!beautify) || c == TAB || c == '\x16'
+	else if ((!beautify) || c == TAB || c == 0x16		/* ^V */
 			     || (c >= ' ' && c <= '~')) {
 	    if (ip < endd) {
-		if (c == '\x16')
+		if (c == 0x16)
 		    c = readchar();
 		switch (cclass(c)) {
 		    case 0 : ixp++; break;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-31 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-29 10:53 [PATCH] elkscmd: fix literal controls (replaces Tommy's #8, #12) claudio
2004-05-29 18:47 ` Tommy McCabe
2004-05-29 22:08   ` claudio
2004-05-31 19:50 ` Miguel Bolanos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox