+2002-05-21 nalin
+ * autogen.sh, src/termcap.c, src/utf8echo.c, src/vte.c: Patch from
+ Hidetoshi Tajima to fix building on Solaris systems, remove use of
+ syntax that might be specific to gcc, and fix an overrun in
+ vte_termcap_generate(). (#82433)
+
2002-05-18 andersca
* src/vte.c: Don't queue a background update if the background isn't
transparent.
+
2002-05-16 nalin
* src/vte.c: Snip trailing whitespace off of copied lines, insert
an end-of-line only when the copied line doesn't go to the right edge,
don't overrun right edge, even in insert mode. Fix displaying of
underlined text. Finish implementing matching.
+
2002-05-15 nalin
* src/vte.c: Send kI on insert key. Don't send drag events when the
child has only asked for click events. Fix crashbugs in selection.
of performing a history scroll if the child wants mouse events. Start
adding match support, merging how selection views the buffer with how
matching views the buffer, though matching doesn't work yet.
+
2002-05-14 nalin
* src/vte.c: Don't try to draw nul characters, most fonts can't. Don't
send motion-tracking events to the child unless we're dragging. Fix
implemented (ff, fs, i1, i3, is, iP, LF, LO, MC, mh, ML, mm, mo, nw, pf,
pk, pl, pf, po, pO, ps, px, r1, r2, r3, RA, RF, rp, rs, RX, SA, SX, wi,
several more from the XTerm set).
+- Currently doesn't handle children exiting quite right (if the child spawned
+ a background process which keeps its stdio open, we don't close because we
+ don't get an EOF).
+- Small dingus bug -- if the string is at the end of the buffer, too much
+ is hilited.
+- Sequence matching is greedy, so that C=AB matches C and not A and then B.
+- Bold doesn't work right if the default foreground color isn't gray. Need
+ to move to 20-color palette to fix this right.
- I'm not sure the widget implementation itself is correct. There are many
changes in going from GTK+ 1.2 to 2.0, and examples of the proper way to do
things is currently scarce, so some of it's guesswork.
-#!/bin/bash -e
-CFLAGS="${CFLAGS:--g3 -O -Wall}" ; export CFLAGS
-set -x
-libtoolize -f -c
-autoheader-2.13 || autoheader
-aclocal-1.5 || aclocal
-automake-1.5 -a || automake -a
-autoconf-2.13 || autoconf
-if test -f config.cache ; then
- rm -f config.cache
-fi
-./configure $@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+PROJECT=GLib
+TEST_TYPE=-f
+
+DIE=0
+
+have_libtool=false
+if libtool --version < /dev/null > /dev/null 2>&1 ; then
+ libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
+ case $libtool_version in
+ 1.4*)
+ have_libtool=true
+ ;;
+ esac
+fi
+if $have_libtool ; then : ; else
+ echo
+ echo "You must have libtool 1.4 installed to compile $PROJECT."
+ echo "Install the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+fi
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile $PROJECT."
+ echo "libtool the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+have_automake=false
+if automake --version < /dev/null > /dev/null 2>&1 ; then
+ automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
+ case $automake_version in
+ 1.2*|1.3*|1.4)
+ ;;
+ *)
+ have_automake=true
+ ;;
+ esac
+fi
+if $have_automake ; then : ; else
+ echo
+ echo "You must have automake 1.4-p1 installed to compile $PROJECT."
+ echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+fi
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+ if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+ echo "to pass any to it, please specify them on the $0 command line."
+ fi
+fi
+
+case $CC in
+*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
+esac
+
+aclocal $ACLOCAL_FLAGS
+
+# optionally feature autoheader
+(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
+
+automake -a $am_opt
+autoconf
+cd $ORIGDIR
+
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+ $srcdir/configure --enable-maintainer-mode --enable-gtk-doc "$@"
+
+ echo
+ echo "Now type 'make' to compile $PROJECT."
+fi
if test x$USE_MAINTAINER_MODE != x ; then
if test x$USE_MAINTAINER_MODE != xno ; then
- if test x$GCC != xno ; then
+ if test x$GCC = xyes ; then
CFLAGS="${CFLAGS} -Wunused"
CFLAGS="${CFLAGS} -Wuninitialized"
CFLAGS="${CFLAGS} -Wimplicit"
utf8echo_SOURCES = \
utf8echo.c
+utf8echo_LDADD = @GLIB_LIBS@
ring_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -DRING_MAIN
ring_SOURCES = \
ssize_t size;
char *ret = NULL;
struct vte_termcap_entry *entry;
- size = strlen(termcap->comment ?: "");
+ size = strlen(termcap->comment ? termcap->comment: "");
for (entry = termcap->entries; entry != NULL; entry = entry->next) {
- size += strlen(entry->comment ?: "");
- size += (strlen(entry->string ?: "") + 1);
+ size += (entry->comment ? strlen(entry->comment) : 0);
+ size += (entry->string ? strlen(entry->string) : 0) + 1;
}
ret = g_malloc(size + 1);
if (ret == NULL) {
#ident "$Id$"
#include "../config.h"
-#include <iconv.h>
+#include <glib/gconvert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
main(int argc, char **argv)
{
int i;
- iconv_t conv;
+ GIConv conv;
char buf[LINE_MAX];
wchar_t w;
char *inbuf, *outbuf;
return 1;
}
- conv = iconv_open("UTF-8", "WCHAR_T");
+ conv = g_iconv_open("UTF-8", "WCHAR_T");
if (conv == NULL) {
return 1;
}
printf(ESC "%%G");
for (i = 1; i < argc; i++) {
- w = (wint_t)atol(argv[i]);
+ w = (wchar_t)atol(argv[i]);
inbuf = (char*)&w;
insize = sizeof(w);
memset(buf, 0, sizeof(buf));
outbuf = buf;
outsize = sizeof(buf);
- if (iconv(conv, &inbuf, &insize, &outbuf, &outsize) != -1) {
+ if (g_iconv(conv, &inbuf, &insize, &outbuf, &outsize) != -1) {
printf("%*s", outbuf - buf, buf);
}
}
printf(ESC "%%@\n");
- iconv_close(conv);
+ g_iconv_close(conv);
return 0;
}
XFontSet fontset;
#ifdef HAVE_XFT
XftFont *ftfont;
- gboolean use_xft;
#endif
+ gboolean use_xft;
PangoFontDescription *fontdesc;
PangoLayout *layout;
gboolean use_pango;
screen = terminal->pvt->screen;
columns = 1;
cell = vte_terminal_find_charcell(terminal,
- screen->cursor_current.col,
- screen->cursor_current.row);
+ screen->cursor_current.col,
+ screen->cursor_current.row);
if (cell != NULL) {
columns = cell->columns;
}
{
g_return_if_fail(VTE_IS_TERMINAL(terminal));
g_warning("Got unexpected (key?) sequence `%s'.\n",
- match ?: "???");
+ match ? match : "???");
}
/* The table of handlers. Primarily used at initialization time. */
}
#endif
env_add[2] = NULL;
+ if (command == NULL) {
+ command = terminal->pvt->shell;
+ }
terminal->pvt->pty_master = vte_pty_open(&pid,
env_add,
- command ?:
- terminal->pvt->shell,
+ command,
argv);
g_free(term);
g_free(colorterm);
for (i = 0; i < count; i++) {
fprintf(stderr, "Wrote %c%c\n",
terminal->pvt->outgoing[i] > 32 ?
- ' ' : '^',
+ ' ' : '^',
terminal->pvt->outgoing[i] > 32 ?
terminal->pvt->outgoing[i] :
terminal->pvt->outgoing[i] + 64);
/* Encode the parameters and send them to the app. */
vte_terminal_send_mouse_button_int(terminal,
- (event->type == GDK_BUTTON_PRESS) ?
+ (event->type == GDK_BUTTON_PRESS) ?
event->button : 0,
event->x,
event->y,
}
}
+#ifdef HAVE_XFT
static int
xft_weight_from_pango_weight (int weight)
{
return XFT_SLANT_ROMAN;
}
-#ifdef HAVE_XFT
/* Create an Xft pattern from a Pango font description. */
static XftPattern *
xft_pattern_from_pango_font_description(const PangoFontDescription *font_desc)
const char *code, *value;
char *stripped;
size_t stripped_length;
+ int columns, rows;
GQuark quark;
char *tmp;
int i;
"ul");
/* Resize to the given default. */
+ columns = vte_termcap_find_numeric(terminal->pvt->termcap,
+ terminal->pvt->terminal,
+ "co");
+ rows = vte_termcap_find_numeric(terminal->pvt->termcap,
+ terminal->pvt->terminal,
+ "li");
vte_terminal_set_size(terminal,
- vte_termcap_find_numeric(terminal->pvt->termcap,
- terminal->pvt->terminal,
- "co") ?: 80,
- vte_termcap_find_numeric(terminal->pvt->termcap,
- terminal->pvt->terminal,
- "li") ?: 24);
+ columns ? columns : 80,
+ rows ? rows : 24);
}
/* Set the path to the termcap file we read, and read it in. */
if (path == NULL) {
snprintf(path_default, sizeof(path_default),
DATADIR "/" PACKAGE "/termcap/%s",
- terminal->pvt->terminal ?: VTE_DEFAULT_EMULATION);
+ terminal->pvt->terminal ?
+ terminal->pvt->terminal : VTE_DEFAULT_EMULATION);
if (stat(path_default, &st) == 0) {
path = path_default;
} else {
pvt->cursor_blinks = FALSE;
pvt->cursor_blink_tag = g_timeout_add(0,
- vte_invalidate_cursor_periodic,
+ vte_invalidate_cursor_periodic,
terminal);
pvt->last_keypress_time = 0;
}
}
+ pvt->use_xft = FALSE;
#ifdef HAVE_XFT
/* Try to use Xft if the user requests it. Provide both the original
* variable we consulted (which we should stop consulting at some
* point) and the one GTK itself uses. */
pvt->ftfont = NULL;
- pvt->use_xft = FALSE;
if (getenv("VTE_USE_XFT") != NULL) {
if (atol(getenv("VTE_USE_XFT")) != 0) {
pvt->use_xft = TRUE;
}
}
+#if HAVE_XFT
/* Try to map some common characters which are frequently missing from fonts
* to others which look the same and may be there. */
static XftChar32
return orig;
}
}
+#endif
+
/* Draw a particular character on the screen. */
static void
vte_terminal_draw_char(VteTerminal *terminal,