pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/cscope When Vim receives a SIGWINCH when its win...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3f0253878da2
branches:  trunk
changeset: 551553:3f0253878da2
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Wed Dec 17 17:01:15 2008 +0000

description:
When Vim receives a SIGWINCH when its window is resized, it passes the signal
on to cscope when it's running (whether this is correct or not is a different
discussion).  The signal handler in cscope tries to ungetch() which crashes if
cscope is running in line mode (as under Vim) as opposed to under ncurses.

>From Philip Paeps <philip%freebsd.org@localhost>.  Bump PKGREVISION.

diffstat:

 devel/cscope/Makefile         |   4 ++--
 devel/cscope/distinfo         |   3 ++-
 devel/cscope/patches/patch-ap |  42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 3 deletions(-)

diffs (73 lines):

diff -r 579def554c4d -r 3f0253878da2 devel/cscope/Makefile
--- a/devel/cscope/Makefile     Wed Dec 17 17:00:08 2008 +0000
+++ b/devel/cscope/Makefile     Wed Dec 17 17:01:15 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2008/06/07 00:36:57 joerg Exp $
+# $NetBSD: Makefile,v 1.49 2008/12/17 17:01:15 ghen Exp $
 
 DISTNAME=      cscope-15.6
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cscope/}
 
diff -r 579def554c4d -r 3f0253878da2 devel/cscope/distinfo
--- a/devel/cscope/distinfo     Wed Dec 17 17:00:08 2008 +0000
+++ b/devel/cscope/distinfo     Wed Dec 17 17:01:15 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2007/01/20 23:39:44 wiz Exp $
+$NetBSD: distinfo,v 1.18 2008/12/17 17:01:15 ghen Exp $
 
 SHA1 (cscope-15.6.tar.gz) = f5f73dca1f223cf6905c09a7f0e8eb993fa5fd93
 RMD160 (cscope-15.6.tar.gz) = b93238d3c91782d032e028abcfde3c2a7491a9c9
@@ -17,3 +17,4 @@
 SHA1 (patch-am) = 2c08e2ccf22b3a3852c52d5177c7a08d206c1cdf
 SHA1 (patch-an) = cef8d1d31a417125c516df403dce228ac92a307c
 SHA1 (patch-ao) = 05ae43171f04320dc1a213510b0906d3387cf35f
+SHA1 (patch-ap) = 6266006b14ac6f0a8063439e9f4521443948665a
diff -r 579def554c4d -r 3f0253878da2 devel/cscope/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cscope/patches/patch-ap     Wed Dec 17 17:01:15 2008 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-ap,v 1.3 2008/12/17 17:01:15 ghen Exp $
+
+--- src/main.c.orig    2008-12-17 11:50:30.000000000 +0100
++++ src/main.c 2008-12-17 11:50:45.000000000 +0100
+@@ -128,7 +128,8 @@
+     (void) sig;
+     (void) info;
+     (void) unused;
+-    ungetch(KEY_RESIZE);
++    if (incurses == YES)
++        ungetch(KEY_RESIZE);
+ }
+ #endif
+ 
+@@ -153,12 +154,7 @@
+     yyout = stdout;
+     /* save the command name for messages */
+     argv0 = argv[0];
+-#if defined(KEY_RESIZE) && !defined(__DJGPP__)
+-    winch_action.sa_sigaction = sigwinch_handler;
+-    sigemptyset(&winch_action.sa_mask);
+-    winch_action.sa_flags = SA_SIGINFO;
+-    sigaction(SIGWINCH,&winch_action,NULL);
+-#endif
++
+     /* set the options */
+     while (--argc > 0 && (*++argv)[0] == '-') {
+       /* HBB 20030814: add GNU-style --help and --version options */
+@@ -403,6 +399,13 @@
+       signal(SIGINT, SIG_IGN);        /* ignore interrupts */
+       signal(SIGPIPE, SIG_IGN);/* | command can cause pipe signal */
+ 
++#if defined(KEY_RESIZE) && !defined(__DJGPP__)
++        winch_action.sa_sigaction = sigwinch_handler;
++        sigemptyset(&winch_action.sa_mask);
++        winch_action.sa_flags = SA_SIGINFO;
++        sigaction(SIGWINCH,&winch_action,NULL);
++#endif
++
+       /* initialize the curses display package */
+       initscr();      /* initialize the screen */
+       entercurses();



Home | Main Index | Thread Index | Old Index