From 021309e2e5b708d776da13eb16973e9a06304798 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 Jan 2006 08:33:34 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 +- MANIFEST | 2 +- genac => autogen.sh | 0 config.h.in | 3 -- configure | 91 ++--------------------------------------------------- configure.ac | 4 --- doc/Makefile.in | 20 +----------- src/Makefile.in | 14 +-------- src/main.C | 1 - src/rxvtperl.xs | 8 ++++- src/urxvt.pm | 13 +++++--- 11 files changed, 21 insertions(+), 137 deletions(-) rename genac => autogen.sh (100%) mode change 100644 => 100755 diff --git a/Changes b/Changes index ad0121c..eebdb78 100644 --- a/Changes +++ b/Changes @@ -13,8 +13,8 @@ WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts 9.0 -TODO: remove ||1 in main.C TODO: on_seelction_popup hook or so. +TODO: echo * at bottom => borked line lengths - new script: perl/selection-pastebin - improved security of setuid/setgid operation, which is now encouraged, by moving privileged operations into a separate diff --git a/MANIFEST b/MANIFEST index 5518d5b..be7f266 100644 --- a/MANIFEST +++ b/MANIFEST @@ -7,8 +7,8 @@ Makefile.in README.configure README.FAQ configure +autogen.sh reconf -genac doc/embed doc/embed-tk diff --git a/genac b/autogen.sh old mode 100644 new mode 100755 similarity index 100% rename from genac rename to autogen.sh diff --git a/config.h.in b/config.h.in index 223f709..a624b26 100644 --- a/config.h.in +++ b/config.h.in @@ -301,9 +301,6 @@ /* Define to use a 24 bit visual if the screen has 24 bit mode */ #undef PREFER_24BIT -/* Define if you need function prototypes */ -#undef PROTOTYPES - /* Define for first char in devptyXX */ #undef PTYCHAR1 diff --git a/configure b/configure index a2406ec..cbc5bd0 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VERSION DATE LSMDATE LIBVERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK LINKER CXXCPP EGREP INSTALL_LIBRXVT RXVTNAME MV RM CP LN SED ECHO CMP TBL TIC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XPM_CPPFLAGS XPM_CFLAGS XPM_LIBS rxvt_int16_typedef rxvt_uint16_typedef rxvt_int32_typedef rxvt_uint32_typedef rxvt_intp_define rxvt_u_intp_define PERL PERLLIB PERLFLAGS PERLPRIVLIBEXP IF_PERL PERL_O DEBUG DINCLUDE DLIB include_stdint_h include_stdarg_h include_stdlib_h include_unistd_h include_string_h include_fcntl_h include_util_h include_assert_h include_sys_ioctl_h include_sys_select_h include_sys_strredir_h include_sys_time_h include_time_h LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VERSION DATE LSMDATE LIBVERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINKER CXXCPP EGREP INSTALL_LIBRXVT RXVTNAME MV RM CP LN SED ECHO CMP TIC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XPM_CPPFLAGS XPM_CFLAGS XPM_LIBS rxvt_int16_typedef rxvt_uint16_typedef rxvt_int32_typedef rxvt_uint32_typedef rxvt_intp_define rxvt_u_intp_define PERL PERLLIB PERLFLAGS PERLPRIVLIBEXP IF_PERL PERL_O DEBUG DINCLUDE DLIB include_stdint_h include_stdarg_h include_stdlib_h include_unistd_h include_string_h include_fcntl_h include_util_h include_assert_h include_sys_ioctl_h include_sys_select_h include_sys_strredir_h include_sys_time_h include_time_h LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3052,46 +3052,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$AWK" && break -done - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4832,12 +4792,6 @@ _ACEOF fi; - -cat >>confdefs.h <<\_ACEOF -#define PROTOTYPES 1 -_ACEOF - - # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -5118,45 +5072,6 @@ else echo "${ECHO_T}no" >&6 fi -# Extract the first word of "tbl", so it can be a program name with args. -set dummy tbl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_TBL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $TBL in - [\\/]* | ?:[\\/]*) - ac_cv_path_TBL="$TBL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TBL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -TBL=$ac_cv_path_TBL - -if test -n "$TBL"; then - echo "$as_me:$LINENO: result: $TBL" >&5 -echo "${ECHO_T}$TBL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - # Extract the first word of "tic", so it can be a program name with args. set dummy tic; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -10154,7 +10069,7 @@ for ac_func in \ unsetenv \ setutent \ seteuid \ - setresuid \ + setresuid \ setreuid \ _getpty \ getpt \ @@ -13634,7 +13549,6 @@ s,@CPP@,$CPP,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@AWK@,$AWK,;t t s,@LINKER@,$LINKER,;t t s,@CXXCPP@,$CXXCPP,;t t s,@EGREP@,$EGREP,;t t @@ -13647,7 +13561,6 @@ s,@LN@,$LN,;t t s,@SED@,$SED,;t t s,@ECHO@,$ECHO,;t t s,@CMP@,$CMP,;t t -s,@TBL@,$TBL,;t t s,@TIC@,$TIC,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t diff --git a/configure.ac b/configure.ac index 44c89a8..ce394e9 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,6 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_CPP AC_PROG_INSTALL -AC_PROG_AWK AC_LANG(C) @@ -480,8 +479,6 @@ AC_ARG_WITH(terminfo, dnl# -------------------------------------------------------------------------- -AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) - AC_PATH_PROG(MV, mv, mv) AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(CP, cp, cp) @@ -489,7 +486,6 @@ AC_PATH_PROG(LN, ln, ln) AC_PATH_PROG(SED, sed, sed) AC_PATH_PROG(ECHO, echo, echo) AC_PATH_PROG(CMP, cmp, cmp) -AC_PATH_PROG(TBL, tbl) AC_PATH_PROG(TIC, tic) dnl# need a neat way to detect SVR4 or its features diff --git a/doc/Makefile.in b/doc/Makefile.in index eb5d538..ece19f8 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -15,34 +15,16 @@ man3dir = @mandir@/man3 man3ext = 3 man7dir = @mandir@/man7 man7ext = 7 -CC = @CC@ -CXX = @CXX@ -CPP = @CPP@ -MV = @MV@ RM = @RM@ RMF = @RM@ -f CP = @CP@ LN = @LN@ SED = @SED@ -AWK = @AWK@ ECHO = @ECHO@ -CMP = @CMP@ -TBL = @TBL@ PERL = @PERL@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL@ -m 755 INSTALL_DATA = @INSTALL@ -m 644 -CXXFLAGS = @CXXFLAGS@ -CPPFLAGS = @CPPFLAGS@ @XPM_CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -LIBS = @LIBS@ -DINCLUDE = @DINCLUDE@ -DLIB = @DLIB@ -XINC = @X_CFLAGS@ @XPM_CFLAGS@ -XLIB = @X_LIBS@ @XPM_LIBS@ -lX11 @X_EXTRA_LIBS@ -COMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I. -LINK = @LINKER@ $(LDFLAGS) srcdir = @srcdir@ VPATH = @srcdir@ @@ -64,7 +46,7 @@ SEDREPLACE = -e 's%@@RXVT_VERSION@@%$(VERSION)%g;' \ -e 's%@@RXVT_LIBDIR@@%$(libdir)%g;' rxvtperl.3.pod: ../src/urxvt.pm - cp $< $@ + $(CP) $< $@ %.tbl: %.pod ./podtbl <$< >$@ diff --git a/src/Makefile.in b/src/Makefile.in index bce760c..af39840 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,3 @@ - DATE=@DATE@ VERSION=@VERSION@ RXVTNAME=@RXVTNAME@ @@ -8,12 +7,6 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ -man1dir = @mandir@/man1 -man1ext = 1 -man3dir = @mandir@/man3 -man3ext = 3 -man7dir = @mandir@/man7 -man7ext = 7 CC = @CC@ CXX = @CXX@ CPP = @CPP@ @@ -23,10 +16,7 @@ RMF = @RM@ -f CP = @CP@ LN = @LN@ SED = @SED@ -AWK = @AWK@ ECHO = @ECHO@ -CMP = @CMP@ -TBL = @TBL@ PERL = @PERL@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL@ -m 755 @@ -43,8 +33,6 @@ XLIB = @X_LIBS@ @XPM_LIBS@ -lX11 @X_EXTRA_LIBS@ COMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I. LINK = @LINKER@ $(LDFLAGS) -LINT = lint -DNARROWPROTO=1 $(XINC) -chapbxz - srcdir = @srcdir@ VPATH = @srcdir@ .PATH: @srcdir@ @@ -56,7 +44,7 @@ thisdir = src # for developers: the following debug options may be used # -DDEBUG_CMD -DDEBUG_MAIN -DDEBUG_RESOURCES # -DDEBUG_SEARCH_PATH -DDEBUG_SIZE -DDEBUG_TTY -DDEBUG_TTYMODE -# -DDEBUG_KEYBOARD +# -DDEBUG_KEYBOARD -DDEBUG_STRICT DEBUG=-DDEBUG_STRICT @DEBUG@ first_rule: all diff --git a/src/main.C b/src/main.C index c58b094..e08736b 100644 --- a/src/main.C +++ b/src/main.C @@ -576,7 +576,6 @@ rxvt_init () // before doing anything else, check for setuid/setgid operation, // start the helper process and drop privileges if (uid != geteuid () - || 1 //D || gid != getegid ()) { #if PTYTTY_HELPER diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 975a5eb..a3768a6 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -404,7 +404,13 @@ rxvt_perl_interp::init (rxvt_term *term) char *argv[] = { "", - "-edo '" LIBDIR "/urxvt.pm' or ($@ and die $@) or exit 1", + "-e" + "BEGIN {" + " urxvt->bootstrap;" + " unshift @INC, '" LIBDIR "';" + "}" + "" + "use urxvt;" }; perl = perl_alloc (); diff --git a/src/urxvt.pm b/src/urxvt.pm index 5810562..0a32ee5 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -597,8 +597,6 @@ Change the custom value. =cut BEGIN { - urxvt->bootstrap; - # overwrite perl's warn *CORE::GLOBAL::warn = sub { my $msg = join "", @_; @@ -621,24 +619,29 @@ sub verbose { warn "$msg\n" if $level <= $verbosity; } -my $extension_pkg = "extension0000"; my %extension_pkg; # load a single script into its own package, once only sub extension_package($) { my ($path) = @_; + no strict 'refs'; + $extension_pkg{$path} ||= do { - my $pkg = "urxvt::" . ($extension_pkg++); + $path =~ /([^\/\\]+)$/; + my $pkg = $1; + $pkg =~ s/[^[:word:]]/_/g; + $pkg = "urxvt::ext::$pkg"; verbose 3, "loading extension '$path' into package '$pkg'"; open my $fh, "<:raw", $path or die "$path: $!"; + @{"$pkg\::ISA"} = urxvt::term::extension::; + my $source = "package $pkg; use strict; use utf8;\n" - . "use base urxvt::term::extension::;\n" . "#line 1 \"$path\"\n{\n" . (do { local $/; <$fh> }) . "\n};\n1"; -- 1.9.1