-# Makefile for librote
-#
-# Copyright (c) 2004 Bruno T. C. de Oliveira
+# Makefile for libmadtty
#
# LICENSE INFORMATION:
# This program is free software; you can redistribute it and/or
# You should have received a copy of the GNU 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 (c) 2002 Bruno T. C. de Oliveira
+#
+# Copyright © 2002-2004 Bruno T. C. de Oliveira
+# Copyright © 2006 Pierre Habouzit
SOURCES=$(wildcard *.c)
HEADERS=$(wildcard *.h)
install: all
mkdir -p $(DESTDIR)$(includedir)/madtty
rm -f $(DESTDIR)$(includedir)/madtty/*.h
- cp rote.h $(DESTDIR)$(includedir)/madtty
+ cp madtty.h $(DESTDIR)$(includedir)/madtty
mkdir -p $(DESTDIR)$(libdir)
cp libmadtty.so.$(MADTTY_VERSION) $(DESTDIR)$(libdir)
cd $(DESTDIR)$(libdir) && ln -sf libmadtty.so.$(MADTTY_VERSION) libmadtty.so
#include <ncurses.h>
#include <stdio.h>
-#include <rote/rote.h>
#include <signal.h>
+#include <madtty/madtty.h>
+
static unsigned char getout = 0;
void sigchld(int signo) { getout = 1; }
int my_custom_handler(RoteTerm *rt, const char *es);
/*
-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.
+ 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.
+ 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.
+ 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
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
+ Copyright © 2004 Bruno T. C. de Oliveira
+ Copyright © 2006 Pierre Habouzit
+ */
+#include <string.h>
+#include <stdio.h>
-#include "rote.h"
+#include "madtty.h"
#include "roteprivate.h"
#include "inject_csi.h"
-#include <string.h>
-#include <stdio.h>
static void cursor_line_down(RoteTerm *rt) {
int i;
/*
-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.
+ 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.
+ 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.
+ 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
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
+ Copyright © 2004 Bruno T. C. de Oliveira
+ Copyright © 2006 Pierre Habouzit
+ */
-
-#include "inject_csi.h"
-#include "roteprivate.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include "inject_csi.h"
+#include "roteprivate.h"
+
#define MAX_CSI_ES_PARAMS 32
/* interprets a 'set attribute' (SGR) CSI escape sequence */
/*
-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.
+ 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.
+ 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.
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
+ 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 "rote.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
-/* ROTE - Our Own Terminal Emulation library
- * Copyright (c) 2004 Bruno T. C. de Oliveira
- * All rights reserved
- *
- * 2004-08-25
- */
-
/*
-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.
+ 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.
-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.
+ Please refer to the COPYING file for more information.
-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
+ 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.
-Copyright (c) 2004 Bruno T. C. de Oliveira
-*/
+ 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_rote_h
-#define btco_ROTE_rote_h
+#ifndef MADTTY_MADTTY_H
+#define MADTTY_MADTTY_H
#ifdef USE_NCURSES
#include <ncurses.h>
* that it will even if more characters
* are added to it. */
-#endif
-
+#endif /* MADTTY_MADTTY_H */
/*
-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.
+ 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.
+ 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.
+ 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
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
+ Copyright © 2004 Bruno T. C. de Oliveira
+ Copyright © 2006 Pierre Habouzit
+ */
-
-#include "rote.h"
-#include "roteprivate.h"
#include <stdlib.h>
#ifdef USE_PTY
#include <pty.h>
#include <stdio.h>
#include <string.h>
+#include "madtty.h"
+#include "roteprivate.h"
+
#define ROTE_VT_UPDATE_ITERATIONS 5
RoteTerm *rote_vt_create(int rows, int cols) {
/*
-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.
+ 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.
+ 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.
+ 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
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
-
-
-#include "rote.h"
+ Copyright © 2004 Bruno T. C. de Oliveira
+ Copyright © 2006 Pierre Habouzit
+ */
#include <ncurses.h>
#include <stdlib.h>
#include <string.h>
+#include "madtty.h"
+
static const char *keytable[KEY_MAX+1];
static int initialized = 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.
+ 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.
+ 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.
+ 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 (c) 2004 Bruno T. C. de Oliveira
-*/
+ 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_vtstate_h
#define btco_ROTE_vtstate_h