Enlightenment CVS committal
Author : mej
Project : eterm
Module : Eterm
Dir : eterm/Eterm/src
Modified Files:
term.c
Log Message:
Wed Feb 11 14:06:20 2004 Michael Jennings (mej)
Fixed handling of escape sequences while printing. Pointed out by
Tom A. Cox <[EMAIL PROTECTED]>.
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/term.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- term.c 20 Jan 2004 02:04:04 -0000 1.101
+++ term.c 11 Feb 2004 19:03:37 -0000 1.102
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: term.c,v 1.101 2004/01/20 02:04:04 mej Exp $";
+static const char cvs_ident[] = "$Id: term.c,v 1.102 2004/02/11 19:03:37 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -850,7 +850,6 @@
process_print_pipe(void)
{
const char *const escape_seq = "\033[4i";
- const char *const rev_escape_seq = "i4[\033";
int index;
FILE *fd;
@@ -858,14 +857,18 @@
for (index = 0; index < 4; /* nil */ ) {
unsigned char ch = cmd_getc();
- if (ch == escape_seq[index])
+ if (ch == escape_seq[index]) {
index++;
- else if (index)
- for ( /*nil */ ; index > 0; index--)
- fputc(rev_escape_seq[index - 1], fd);
+ } else if (index) {
+ int i;
- if (index == 0)
+ for (i = 0; index > 0; i++, index--) {
+ fputc(escape_seq[i], fd);
+ }
+ }
+ if (index == 0) {
fputc(ch, fd);
+ }
}
pclose_printer(fd);
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs