Commit 03b492bb authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

remove comma from end of enum declaration (#111925). don't use

* src/iso2022.c, src/keymap.c, src/mev.c, src/vtebg.h, src/vteglyph.h: remove
	comma from end of enum declaration (#111925).
* src/vtetc.c: don't use parameter-as-array-size compiler extension (#111925).
* src/ssfe.c: don't assume that the compiler interprets \e correctly, use %c
	with value of 27 instead (#111925).
* doc/reference/Makefile.am: obey CPPFLAGS and LDFLAGS (#111925).
* gnome-pty-helper/gnome-utmp.c: only include <utmp.h> if HAVE_UTMP_H was
	defined (#111925).
* src/keymap.c, src/ssfe.c: unconditionally include <term.h> if we defined
	HAVE_CURSES or HAVE_NCURSES, as having the header is a precondition
	for defining either (#111925).
* src/iso2022.c: make each array have at least one element (#111925).
* src/pty.c, src/gnome-login-support.c: try to open /dev/ptc if opening
	/dev/ptmx fails due to ENOENT (#111925).
parent 7253cf3d
2003-05-19 nalin
* src/iso2022.c, src/keymap.c, src/mev.c, src/vtebg.h, src/vteglyph.h:
remove comma from end of enum declaration (#111925).
* src/vtetc.c: don't use parameter-as-array-size compiler
extension (#111925).
* src/ssfe.c: don't assume that the compiler interprets \e correctly,
use %c with value of 27 instead (#111925).
* doc/reference/Makefile.am: obey CPPFLAGS and LDFLAGS (#111925).
* gnome-pty-helper/gnome-utmp.c: only include <utmp.h> if HAVE_UTMP_H
was defined (#111925).
* src/keymap.c, src/ssfe.c: unconditionally include <term.h> if we
defined HAVE_CURSES or HAVE_NCURSES, as having the header is a
precondition for defining either (#111925).
* src/iso2022.c: make each array have at least one element (#111925).
* src/pty.c, src/gnome-login-support.c: try to open /dev/ptc if opening
/dev/ptmx fails due to ENOENT (#111925).
2003-05-19 nalin
* src/vteapp.c: don't exit on eof, just child-exited.
* src/vte.c(vte_terminal_eof): don't disconnect from SIGCHLD on eof,
......
......@@ -47,8 +47,8 @@ extra_files =
# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
# contains GtkObjects/GObjects and you want to document signals and properties.
GTKDOC_CFLAGS = @VTE_CFLAGS@ -I$(srcdir)/../../src
GTKDOC_LIBS = @VTE_LIBS@ ../../src/libvte.la
GTKDOC_CFLAGS = @CPPFLAGS@ @VTE_CFLAGS@ -I$(srcdir)/../../src
GTKDOC_LIBS = @LDFLAGS@ @VTE_LIBS@ ../../src/libvte.la
GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
......
......@@ -191,6 +191,11 @@ pty_open_master (char *pty_name, int *used_bsd)
pty_master = open (pty_name, O_RDWR);
if ((pty_master == -1) && (errno == ENOENT)) {
strcpy (pty_name, "/dev/ptc"); /* AIX */
pty_master = open (pty_name, O_RDWR);
}
/*
* Try BSD open, this is needed for Linux which
* might have Unix98 devices but no kernel support
......
......@@ -33,8 +33,6 @@
# endif
#endif
#include <utmp.h>
#if defined(HAVE_LASTLOG_H)
# include <lastlog.h>
#endif
......@@ -43,6 +41,10 @@
# include <paths.h>
#endif
#if defined(HAVE_UTMP_H)
# include <utmp.h>
#endif
#if defined(HAVE_UTMPX_H)
# include <utmpx.h>
#endif
......
......@@ -66,7 +66,7 @@ struct _vte_iso2022_block {
enum {
_vte_iso2022_cdata,
_vte_iso2022_preserve,
_vte_iso2022_control,
_vte_iso2022_control
} type;
gulong start, end;
};
......@@ -123,6 +123,7 @@ static const struct _vte_iso2022_map _vte_iso2022_map_A[] = {
};
/* US-ASCII (no conversions). VT100 and higher (per XTerm docs). */
static const struct _vte_iso2022_map _vte_iso2022_map_B[] = {
{0, 0},
};
/* Dutch. VT220 and higher (per XTerm docs). */
static const struct _vte_iso2022_map _vte_iso2022_map_4[] = {
......
......@@ -30,16 +30,12 @@
#include "vtetc.h"
#ifdef HAVE_NCURSES
#include <ncurses.h>
#ifdef HAVE_TERM_H
#include <term.h>
#endif
#define HAVE_CURSES
#else
#ifdef HAVE_CURSES
#include <curses.h>
#ifdef HAVE_TERM_H
#include <term.h>
#endif
#else
#ifdef HAVE_TERMCAP
#include <termcap.h>
......@@ -62,7 +58,7 @@ _vte_keysym_name(guint keyval)
enum _vte_cursor_mode {
cursor_default = 1 << 0,
cursor_app = 1 << 1,
cursor_app = 1 << 1
};
enum _vte_keypad_mode {
......@@ -75,7 +71,7 @@ enum _vte_fkey_mode {
fkey_sun = 1 << 1,
fkey_hp = 1 << 2,
fkey_legacy = 1 << 3,
fkey_vt220 = 1 << 4,
fkey_vt220 = 1 << 4
};
#define cursor_all (cursor_default | cursor_app)
......
......@@ -38,7 +38,7 @@ static enum {
tracking_mouse = 1000,
tracking_hilite = 1001,
tracking_cell_motion = 1002,
tracking_all_motion = 1003,
tracking_all_motion = 1003
} tracking_mode = 0;
static void
......
......@@ -710,6 +710,9 @@ _vte_pty_getpt(void)
#else
/* Try to allocate a pty by accessing the pty master multiplex. */
fd = open("/dev/ptmx", O_RDWR | O_NOCTTY);
if ((fd == -1) && (errno == ENOENT)) {
fd = open("/dev/ptc", O_RDWR | O_NOCTTY); /* AIX */
}
#endif
/* Set it to blocking. */
flags = fcntl(fd, F_GETFL);
......
......@@ -38,15 +38,12 @@
#ifdef HAVE_NCURSES
#include <ncurses.h>
#ifdef HAVE_TERM_H
#include <term.h>
#endif
#define HAVE_CURSES
#else
#ifdef HAVE_CURSES
#include <curses.h>
#ifdef HAVE_TERM_H
#include <term.h>
#endif
#else
#ifdef HAVE_TERMCAP
#include <termcap.h>
......@@ -141,7 +138,7 @@ static void putcap(unsigned char *s) {
static int do_cs(int y1, int y2) {
static char temp[16];
if (ansi_cs) {
sprintf(temp, "\e[%d;%dr", y1, y2);
sprintf(temp, "%c[%d;%dr", 27, y1, y2);
write(1, temp, strlen(temp));
} else putcap((char *)tgoto(t_cs, y2-1, y1-1));
return 0;
......
......@@ -56,7 +56,7 @@ enum VteBgSourceType {
VTE_BG_SOURCE_NONE,
VTE_BG_SOURCE_ROOT,
VTE_BG_SOURCE_PIXBUF,
VTE_BG_SOURCE_FILE,
VTE_BG_SOURCE_FILE
};
GdkPixmap *vte_bg_get_pixmap(VteBg *bg, enum VteBgSourceType source_type,
......
......@@ -36,7 +36,7 @@ enum vte_glyph_flags {
vte_glyph_underline = 1 << 2,
vte_glyph_underline2 = 1 << 3,
vte_glyph_strikethrough = 1 << 4,
vte_glyph_boxed = 1 << 5,
vte_glyph_boxed = 1 << 5
};
#define vte_glyph_double_underline \
......
......@@ -431,7 +431,7 @@ _vte_termcap_find_l(struct _vte_termcap *termcap, const char *tname, gssize len,
{
const char *ret;
struct _vte_termcap_alias *alias;
char ttname[len + 1];
char *ttname;
gssize clen;
g_return_val_if_fail(termcap != NULL, "");
......@@ -441,10 +441,10 @@ _vte_termcap_find_l(struct _vte_termcap *termcap, const char *tname, gssize len,
g_return_val_if_fail(strlen(cap) > 0, "");
/* Find the entry by this name. */
memcpy(ttname, tname, len);
ttname[len] = '\0';
ttname = g_strndup(tname, len);
alias = g_tree_lookup(termcap->nametree,
GINT_TO_POINTER(g_quark_from_string(ttname)));
g_free(ttname);
/* If we found the entry, poke around in it. */
if (alias != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment