ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.476 by sf-exg, Fri Feb 11 01:24:46 2011 UTC vs.
Revision 1.479 by root, Fri Feb 25 07:07:41 2011 UTC

25 * - extensive modifications 25 * - extensive modifications
26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> 26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
27 * Copyright (c) 2001 Marius Gedminas 27 * Copyright (c) 2001 Marius Gedminas
28 * - Ctrl/Mod4+Tab works like Meta+Tab (options) 28 * - Ctrl/Mod4+Tab works like Meta+Tab (options)
29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> 29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
30 * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com> 30 * Copyright (c) 2003-2011 Marc Lehmann <schmorp@schmorp.de>
31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it> 31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it>
32 * 32 *
33 * This program is free software; you can redistribute it and/or modify 33 * This program is free software; you can redistribute it and/or modify
34 * it under the terms of the GNU General Public License as published by 34 * it under the terms of the GNU General Public License as published by
35 * the Free Software Foundation; either version 2 of the License, or 35 * the Free Software Foundation; either version 2 of the License, or
1158rxvt_term::pty_fill () 1158rxvt_term::pty_fill ()
1159{ 1159{
1160 ssize_t n = cmdbuf_endp - cmdbuf_ptr; 1160 ssize_t n = cmdbuf_endp - cmdbuf_ptr;
1161 1161
1162 if (CBUFSIZ == n) 1162 if (CBUFSIZ == n)
1163 { 1163 n = 0; // normally this indicates a "too long" command sequence - just drop the data we have
1164 rxvt_warn ("PLEASE REPORT: pty_fill on full buffer, draining input, continuing.\n");
1165 n = 0;
1166 }
1167 1164
1168 memmove (cmdbuf_base, cmdbuf_ptr, n); 1165 memmove (cmdbuf_base, cmdbuf_ptr, n);
1169 cmdbuf_ptr = cmdbuf_base; 1166 cmdbuf_ptr = cmdbuf_base;
1170 cmdbuf_endp = cmdbuf_ptr + n; 1167 cmdbuf_endp = cmdbuf_ptr + n;
1171 1168
2691 } 2688 }
2692 break; 2689 break;
2693 2690
2694 /* kidnapped escape sequence: Should be 8.3.48 */ 2691 /* kidnapped escape sequence: Should be 8.3.48 */
2695 case C1_ESA: /* ESC G */ 2692 case C1_ESA: /* ESC G */
2696 process_graphics (); 2693 // used by original rxvt for rob nations own graphics mode
2694 if (cmd_getc () == 'Q')
2695 tt_printf ("\033G0\012"); /* query graphics - no graphics */
2697 break; 2696 break;
2698 2697
2699 /* 8.3.63: CHARACTER TABULATION SET */ 2698 /* 8.3.63: CHARACTER TABULATION SET */
2700 case C1_HTS: /* ESC H */ 2699 case C1_HTS: /* ESC H */
2701 scr_set_tab (1); 2700 scr_set_tab (1);
3972 } 3971 }
3973 } 3972 }
3974} 3973}
3975/*}}} */ 3974/*}}} */
3976 3975
3977/*{{{ (do not) process Rob Nation's own graphics mode sequences */
3978void
3979rxvt_term::process_graphics ()
3980{
3981 unicode_t ch, cmd = cmd_getc ();
3982
3983 if (cmd == 'Q')
3984 {
3985 /* query graphics */
3986 tt_printf ("\033G0\012"); /* no graphics */
3987 return;
3988 }
3989 /* swallow other graphics sequences until terminating ':' */
3990 do
3991 ch = cmd_getc ();
3992 while (ch != ':');
3993}
3994/*}}} */
3995
3996/* ------------------------------------------------------------------------- */ 3976/* ------------------------------------------------------------------------- */
3997 3977
3998/* 3978/*
3999 * Send printf () formatted output to the command. 3979 * Send printf () formatted output to the command.
4000 * Only use for small amounts of data. 3980 * Only use for small amounts of data.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines