From 43b5d9ae832e2442891663e9ae8460d572c14044 Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 10 Nov 2005 18:25:42 +0000 Subject: Depend on errno.h for errno. Don't depend on stdio and stdout to be static values, move the initialisation to run time. --- misc/splitvt/patches/patch-aa | 13 +++++++++++++ misc/splitvt/patches/patch-ab | 45 +++++++++++++++++++++++++++++++++++++++++++ misc/splitvt/patches/patch-ac | 13 +++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 misc/splitvt/patches/patch-aa create mode 100644 misc/splitvt/patches/patch-ab create mode 100644 misc/splitvt/patches/patch-ac (limited to 'misc/splitvt/patches') diff --git a/misc/splitvt/patches/patch-aa b/misc/splitvt/patches/patch-aa new file mode 100644 index 00000000000..2049b5e1151 --- /dev/null +++ b/misc/splitvt/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1 2005/11/10 18:25:42 joerg Exp $ + +--- splitvt.c.orig 2005-11-10 18:17:36.000000000 +0000 ++++ splitvt.c +@@ -102,7 +102,7 @@ main(argc, argv) + int argc; + char *argv[]; + { +- extern int errno, optind; ++ extern int optind; + extern char *optarg; + + int i, len, maxfds, numready; diff --git a/misc/splitvt/patches/patch-ab b/misc/splitvt/patches/patch-ab new file mode 100644 index 00000000000..7ab12f69d44 --- /dev/null +++ b/misc/splitvt/patches/patch-ab @@ -0,0 +1,45 @@ +$NetBSD: patch-ab,v 1.1 2005/11/10 18:25:42 joerg Exp $ + +--- vtmouse.c.orig 2005-11-10 18:18:59.000000000 +0000 ++++ vtmouse.c +@@ -81,7 +81,7 @@ int main(int argc, char *argv[]) + #endif + + /* I/O streams default to stdin and stdout. */ +-FILE *xt_input=stdin, *xt_output=stdout; ++FILE *xt_input = NULL, *xt_output = NULL; + static int have_xterm=0; + static int set_title=0; + static char *old_title=NULL; +@@ -118,6 +118,9 @@ static char *get_xtitle() + static void set_xtitle(titlebar) + char *titlebar; + { ++ if (xt_output == NULL) ++ xt_output = stdout; ++ + fprintf(xt_output, "\033]0;%s\07", titlebar); + fflush(xt_output); + } +@@ -166,6 +169,11 @@ struct event *X_event; + window *thiswin; + #endif + ++ if (xt_input == NULL) ++ xt_input = stdin; ++ if (xt_output == NULL) ++ xt_output = stdout; ++ + X_event->happening=0; + + if ( have_xterm ) { +@@ -277,6 +285,9 @@ struct event *X_event; + + void event_quit() + { ++ if (xt_output == NULL) ++ xt_output = stdout; ++ + if ( have_xterm ) { + #ifdef REPORT_SELECTION + fprintf(xt_output, "\033[?1001l"); diff --git a/misc/splitvt/patches/patch-ac b/misc/splitvt/patches/patch-ac new file mode 100644 index 00000000000..02b50755b19 --- /dev/null +++ b/misc/splitvt/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1 2005/11/10 18:25:42 joerg Exp $ + +--- parserc.c.orig 2005-11-10 18:22:31.000000000 +0000 ++++ parserc.c +@@ -154,8 +154,6 @@ char *args[]; + static int safe_chdir(directory) + char *directory; + { +- extern int errno; +- + char *subdir=NULL; + struct stat sb; + int nslashes=0, chdir_ret; -- cgit v1.2.3