X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=madtty%2Finject_csi.h;fp=madtty%2Finject_csi.h;h=0000000000000000000000000000000000000000;hb=5b8c62d790da08fe9b6e32b6b9dda5ae25d5b2d8;hp=5c47efb1f822cb627e129ed7c3f3bd9ab036169e;hpb=8ead06c97e16165208fd9d02ada73d63aeca11f2;p=apps%2Fmadtty.git diff --git a/madtty/inject_csi.h b/madtty/inject_csi.h deleted file mode 100644 index 5c47efb..0000000 --- a/madtty/inject_csi.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - LICENSE INFORMATION: - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License (LGPL) as published by the Free Software Foundation. - - Please refer to the COPYING file for more information. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Copyright © 2004 Bruno T. C. de Oliveira - Copyright © 2006 Pierre Habouzit - */ - -#ifndef btco_ROTE_inject_csi_h -#define btco_ROTE_inject_csi_h - -#include "madtty.h" - -/* Interprets a CSI escape sequence stored in rt->pd->esbuf, - * changing rt to reflect the effect of the sequence. This function - * will not change rt->pd->esbuf, rt->pd->escaped or other escape-sequence - * related fields in it */ -void rote_es_interpret_csi(RoteTerm *rt); - -static inline void clamp_cursor_to_bounds(RoteTerm *rt) -{ - if (rt->crow < 0) rt->curpos_dirty = true, rt->crow = 0; - if (rt->ccol < 0) rt->curpos_dirty = true, rt->ccol = 0; - - if (rt->crow >= rt->rows) - rt->curpos_dirty = true, rt->crow = rt->rows - 1; - - if (rt->ccol >= rt->cols) - rt->curpos_dirty = true, rt->ccol = rt->cols - 1; -} -#endif -