From 903cd7174d933d47f84b873af6ef3869ee8b2098 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Feb 2005 08:09:23 +0000 Subject: [PATCH] *** empty log message *** --- MANIFEST | 5 --- Makefile.in | 4 +- autoconf/configure.in | 1 - configure | 3 +- src/Makefile.in | 3 +- src/graphics/.cvsignore | 5 --- src/init.C | 3 +- src/test/.cvsignore | 1 - src/test/Makefile.in | 96 ---------------------------------------------- src/test/gettty.c | 85 ---------------------------------------- src/test/strings-memmove.c | 49 ----------------------- 11 files changed, 6 insertions(+), 249 deletions(-) delete mode 100644 src/graphics/.cvsignore delete mode 100644 src/test/.cvsignore delete mode 100644 src/test/Makefile.in delete mode 100644 src/test/gettty.c delete mode 100644 src/test/strings-memmove.c diff --git a/MANIFEST b/MANIFEST index 7c03787..cb73742 100644 --- a/MANIFEST +++ b/MANIFEST @@ -104,11 +104,6 @@ src/version.h src/xdefaults.C src/xpm.C -src/test/.cvsignore -src/test/Makefile.in -src/test/gettty.c -src/test/strings-memmove.c - src/gentables src/gencompose src/genlinedraw diff --git a/Makefile.in b/Makefile.in index 293b9b3..1dd51d9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # ./Makefile.in -*- Makefile -*- -# $Id: Makefile.in,v 1.9 2005-01-17 01:55:12 root Exp $ +# $Id: Makefile.in,v 1.10 2005-02-02 08:09:23 root Exp $ @MCOMMON@ srcdir = @srcdir@ @@ -9,7 +9,7 @@ VPATH = @srcdir@ first_rule: all dummy: -subdirs = src doc src/test +subdirs = src doc allsubdirs = $(subdirs) DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog diff --git a/autoconf/configure.in b/autoconf/configure.in index e1b4c6e..4082c74 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -1363,7 +1363,6 @@ AC_CONFIG_FILES([autoconf/Make.common \ Makefile \ doc/Makefile \ src/Makefile \ -src/test/Makefile \ src/rxvtlib.h \ ]) AC_OUTPUT diff --git a/configure b/configure index 94bcf56..b1be943 100755 --- a/configure +++ b/configure @@ -16302,7 +16302,7 @@ else include_time_h="/* #include */" fi - ac_config_files="$ac_config_files autoconf/Make.common Makefile doc/Makefile src/Makefile src/test/Makefile src/rxvtlib.h" + ac_config_files="$ac_config_files autoconf/Make.common Makefile doc/Makefile src/Makefile src/rxvtlib.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16833,7 +16833,6 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;; "src/rxvtlib.h" ) CONFIG_FILES="$CONFIG_FILES src/rxvtlib.h" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:autoconf/config.h.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 diff --git a/src/Makefile.in b/src/Makefile.in index 8bc7fcc..a00ef35 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.23 2005-01-16 18:05:37 root Exp $ +# $Id: Makefile.in,v 1.24 2005-02-02 08:09:23 root Exp $ @MCOMMON@ LINT = lint -DNARROWPROTO=1 $(XINC) -chapbxz @@ -119,7 +119,6 @@ realclean: clean cleandir: realclean distclean: realclean - if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile) install: allbin alldoc diff --git a/src/graphics/.cvsignore b/src/graphics/.cvsignore deleted file mode 100644 index 1a1b17a..0000000 --- a/src/graphics/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -*.lo -*.org -.libs -qplot diff --git a/src/init.C b/src/init.C index ffb7fbf..1b45ec7 100644 --- a/src/init.C +++ b/src/init.C @@ -208,6 +208,7 @@ bool rxvt_term::init_vars () { sw_term.start (SIGTERM); + sw_int.start (SIGINT); pix_colors_focused = new rxvt_color [TOTAL_COLORS]; #ifdef OFF_FOCUS_FADING @@ -254,7 +255,7 @@ rxvt_term::init_vars () #ifdef MENUBAR menu_readonly = 1; # if ! (MENUBAR_MAX > 1) - CurrentBar = & (BarList); + CurrentBar = &BarList; # endif /* (MENUBAR_MAX > 1) */ #endif diff --git a/src/test/.cvsignore b/src/test/.cvsignore deleted file mode 100644 index f3c7a7c..0000000 --- a/src/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/src/test/Makefile.in b/src/test/Makefile.in deleted file mode 100644 index f65e937..0000000 --- a/src/test/Makefile.in +++ /dev/null @@ -1,96 +0,0 @@ -#make src/test/Makefile.in -*- Makefile -*- -@MCOMMON@ - -srcdir = @srcdir@ -VPATH = @srcdir@ -.PATH: @srcdir@ - -basedir = ../.. -thisdir = src/test - -first_rule: -dummy: - -SRCS = gettty.c strings-memmove.c -OBJS = gettty.o strings-memmove.o -HDRS = - -# -# Distribution variables -# -DEBUG= -DDEBUG_TTY - -DIST = $(HDRS) $(SRCS) Makefile.in - -# inference rules -.c.o: - $(CC) -c $(CPPFLAGS) $(XINC) -I. -I$(basedir) -I$(srcdir) $(DEFS) $(CFLAGS) $< -#------------------------------------------------------------------------- -all: - -tests: - @(cd $(srcdir)/..; ${MAKE} .protos) - @${MAKE} tests-bin run-tests - -tests-bin: gettty gettty-debug strings-memmove - -run-tests: - @echo "" - @echo "RUNNING TESTS ----" - @echo "Testing open of (pty/tty) pseudo-tty pairs" - @./gettty concise || ./gettty-debug - @echo "Testing possible replacement for memmove() with --enable-strings" - @./strings-memmove - -gettty: gettty.o ptytty.o - $(CC) $(LDFLAGS) -o $@ gettty.o ptytty.o $(LIBS) - -gettty-debug: gettty.o ptytty-debug.o - $(CC) $(LDFLAGS) -o $@ gettty.o ptytty-debug.o $(LIBS) - -ptytty.o: $(srcdir)/../ptytty.c - $(CC) -o ptytty.o $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/../ptytty.c - -ptytty-debug.o: $(srcdir)/../ptytty.c - $(CC) -o ptytty-debug.o $(CPPFLAGS) $(CFLAGS) $(DEBUG) -c $(srcdir)/../ptytty.c - -strings-memmove: strings-memmove.o - $(CC) $(LDFLAGS) -o $@ strings-memmove.o $(LIBS) - -$(srcdir)/../strings.intpro: $(srcdir)/../strings.c - (cd $(srcdir)/..; ${MAKE} strings.intpro) - -tags: $(SRCS) - ctags $(SRCS) - -allbin: - -alldoc: - -clean: - $(RMF) gettty strings-memmove core a.out *.o *.bak *~ - -realclean: clean - $(RMF) tags - -cleandir: realclean - -distclean: - (cd $(srcdir); $(RMF) strings-memmove *~ *.o core a.out) - if test $(srcdir) = .; then $(MAKE) realclean; fi - (cd $(srcdir); $(RMF) Makefile) - -install: - -uninstall: - -distdirs: - mkdir $(basedir)/../$(VERNAME)/$(thisdir) - -distcopy: - $(CP) -p $(DIST) $(basedir)/../$(VERNAME)/$(thisdir) - -# ----------------------------------------------------------------------- -# DO NOT DELETE: ugly dependency list follows - -strings-memmove.o: strings-memmove.c $(srcdir)/../strings.c $(srcdir)/../strings.intpro diff --git a/src/test/gettty.c b/src/test/gettty.c deleted file mode 100644 index 1666f79..0000000 --- a/src/test/gettty.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "../../config.h" - -#include -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif -#include - -int verb = 1; - -int -main(int argc) -{ - int i, pid; - int fd_pty, fd_tty; - const char *ttydev; - - if (argc != 1) - verb = 0; - fd_pty = fd_tty = -1; - ttydev = NULL; - fd_pty = rxvt_get_pty(&fd_tty, &ttydev); - if (fd_pty < 0) { - fprintf(stderr, "rxvt_get_pty() failed\n"); - exit(1); - } - if (verb) - fprintf(stderr, "rxvt_get_pty() OK. Found %s (opened pty fd: %d)\n", ttydev, fd_pty); - - if (fd_tty < 0) { -# ifdef HAVE_REVOKE - revoke(ttydev); -# endif - if ((fd_tty = rxvt_get_tty(ttydev)) < 0) { - fprintf(stderr, "rxvt_get_tty() failed on %s", ttydev); - exit(1); - } - if (verb) - fprintf(stderr, "rxvt_get_tty() OK. (opened tty fd: %d)\n", fd_tty); - } else if (verb) - fprintf(stderr, "Didn't call: rxvt_get_tty() (already have fd)\n"); - - for (i = 0; i < 255; i++) - if (i != fd_pty && i != 2 && i != fd_tty) - close(i); - pid = fork(); - if (pid) { - int exitst = 1; - int j = 0; - - close(fd_tty); - for ( ; ++j < 5; ) { - if (waitpid(-1, &i, WNOHANG) != 0) - break; - sleep(1); - } - if (j == 5) - kill(pid, 2); - if (WIFEXITED(i)) { - exitst = WEXITSTATUS(i); - if (exitst == 0) - fprintf(stderr, "OK\n"); - else - fprintf(stderr, "Failed. Child exit status: %d\n", WEXITSTATUS(i)); - } else - fprintf(stderr, "Interrupted\n"); - exit(exitst); - } - close(fd_pty); - if (verb) - fprintf(stderr, "Calling: rxvt_control_tty\n"); - i = rxvt_control_tty(fd_tty, ttydev); - if (i < 0) { - fprintf(stderr, "could not obtain control of tty\n"); - exit(1); - } - exit(0); - /* NOTREACHED */ -} diff --git a/src/test/strings-memmove.c b/src/test/strings-memmove.c deleted file mode 100644 index 03267fd..0000000 --- a/src/test/strings-memmove.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "../../config.h" -#include "../rxvt.h" - -# /* hack! */ define memset rmemset -# /* hack! */ define memmove rmemmove -void *memset __PROTO((void *p, int c1, size_t len)); -void *memmove __PROTO((void *d, const void *s, size_t len)); -# /* hack! */ include "../strings.c" -# /* hack! */ undef memmove -# /* hack! */ undef memset - -#define OFF 16 -#define BUFSZ 300 - -unsigned char buf1[BUFSZ], buf2[BUFSZ], buf3[BUFSZ]; - -int -main() -{ - int i, j, k, a; - int res; - - res = 0; - for (i = 0; i < OFF; i++) - for (j = 0; j < OFF; j++) - for (k = 0; k < OFF; k++) { - - memset(buf2, 127, BUFSZ); - memset(buf3, 127, BUFSZ); - for (a = 1; a < 256; a++) - buf1[OFF + i + a - 1] = a; - rmemmove(buf2 + OFF + k, buf1 + OFF + i, 256 - OFF + j); - memmove(buf3 + OFF + k, buf1 + OFF + i, 256 - OFF + j); - for (a = 0; a < (int)sizeof buf2; a++) - if (buf2[a] != buf3[a]) { - res = 1; - printf("Test BAD, Start = +%d, Size = +%d, Dest =+ %d: ", - i, j, k); - printf(" -1=%02x, 0=%02x, %d=%02x, %d=%02x\n", - buf2[OFF + k - 1], buf2[OFF + k], - 255 - OFF + j, buf2[k + 255 + j], - 256 - OFF + j, buf2[k + 256 + j]); - break; - } - } - if (res == 0) - printf("OK\n"); - exit(res); -} -- 1.9.1