head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.50 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.48 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.46 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.44 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.42 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.40 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.38 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.36 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.34 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.32 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.30 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.28 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.26 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.24 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.22 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.20 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.18 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.16 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.14 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.12 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.10 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.8 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.6 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.4 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.2 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.1.0.12 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1; locks; strict; comment @# @; 1.2 date 2004.06.01.21.53.00; author kristerw; state dead; branches; next 1.1; 1.1 date 2000.02.06.03.49.49; author fredb; state Exp; branches; next ; desc @@ 1.2 log @Remove obsolete packages, per discussion on tech-pkg. @ text @$NetBSD: patch-ag,v 1.1 2000/02/06 03:49:49 fredb Exp $ --- Arena/Source/main.c.orig Sun Mar 8 11:22:20 1998 +++ Arena/Source/main.c Sat Oct 30 09:42:10 1999 @@@@ -80,7 +80,31 @@@@ static int FlyByStoredX = -2; static int FlyByStoredY = -2; static int FlyByShowing = 0; +#if defined(HAVE_SETITIMER) +/* + * Actual time to activate the "fly by" roll-overs is at least twice the value + * set in TIMER_ON, i.e. 2*180000uS = 0.36 seconds. SET_TIMER and DISABLE_TIMER + * are fashioned as macros to make it easier to add code to allow for + * implementation differences. + * + * Enabling this completely disables the misbegotten FlyByTimerIncrement. + * It would not be difficult to fix it, and it could even benefit from + * the smaller timeval/timespec increments, but to me, it's just not worth + * the trouble. + * + * October 30, 1999 -- Frederick Bruckman + */ +#if defined(SETITIMER_USES_TIMEVAL) +const struct itimerval TIMER_ON = {{0, 0}, {0, 180000}}; +#else /* assume timespec */ +const struct itimerval TIMER_ON = {{0, 0}, {0, 180000000}}; +#endif /* SETITIMER_USES_TIMEVAL */ +const struct itimerval TIMER_OFF = {{0, 0}, {0, 0}}; +#define SET_TIMER setitimer(ITIMER_REAL, &TIMER_ON, 0); +#define DISABLE_TIMER setitimer(ITIMER_REAL, &TIMER_OFF, 0); +#else static int FlyByAlarm = 0; +#endif /* HAVE_SETITIMER */ static Window FlyByWindow; static GC FlyByGC; static XFontStruct *FlyByFont = NULL; @@@@ -702,8 +726,12 @@@@ static int Lx, Ly; +#if defined(HAVE_SETITIMER) + DISABLE_TIMER +#else FlyByAlarm = 0; alarm(FlyByAlarm); +#endif signal(SIGALRM, SIG_DFL); if (FlyByHints == ARENA_FLYBY_NONE) return; @@@@ -720,7 +748,9 @@@@ char *text = ToolBarFlyByText(i); FlyByCreate(FlyByStoredX, FlyByStoredY+20, text ? text :"(null)"); FlyByShowing = i; +#if !defined(HAVE_SETITIMER) FlyByData[i-1].displayed_times += FlyByTimerIncrement; +#endif } else { @@@@ -728,12 +758,16 @@@@ * and it's the same, we'll diplay it then! Use "last" timer * delay... but NOT zero! */ - FlyByAlarm = 1; signal(SIGALRM, ArenaSIGALRMHandler); +#if defined(HAVE_SETITIMER) + SET_TIMER +#else + FlyByAlarm = 1; if (FlyByData[i-1].displayed_times == 0) FlyByData[i-1].displayed_times = 1; alarm(FlyByData[i-1].displayed_times); +#endif } } } @@@@ -820,8 +854,8 @@@@ h = SPACING(FlyByFont) * nline; /* decide whether x and y are ok or need to be modified */ - x = (x + w > display_width ? display_width - w - 1 : x); - y = (y + h > display_height ? display_height - h - 1 : y); + x = (x + w > win_width ? win_width - w - 20 : x); + y = (y + h > win_height ? win_height - h - 20 : y); /* create window */ FlyByWindow = XCreateSimpleWindow(display, win, x, y, w, h, 1, @@@@ -879,6 +913,11 @@@@ */ void FlyByDestroy(void) { +#if defined(HAVE_SETITIMER) + DISABLE_TIMER + signal(SIGALRM, SIG_DFL); + FlyByStoredX = FlyByStoredY = -1; +#else if (FlyByAlarm != 0) { FlyByAlarm = 0; @@@@ -886,6 +926,7 @@@@ FlyByStoredX = FlyByStoredY = -1; signal(SIGALRM, SIG_DFL); } +#endif if (FlyByShowing) { @@@@ -1286,9 +1326,13 @@@@ int i = ToolBarWhichButton(FlyByStoredX, FlyByStoredY); if (i > 0) { - FlyByAlarm = 1; signal(SIGALRM, ArenaSIGALRMHandler); +#if defined(HAVE_SETITIMER) + SET_TIMER +#else + FlyByAlarm = 1; alarm(FlyByAlarm); +#endif } } } @ 1.1 log @- -Install only example "arenarc" into ${PREFIX}/share/Arena, with working global "arenarc" copied to ${LOCALBASE}/etc, unless it exists already. - -Fix "fly-by"'s, otherwise known as pop-up help, or "tool-tips". In particular, disable the the insane heuristic that caused the delay to increase by one second with each use on systems where setitimer() has 1s resolution (NetBSD). Prior, it appeared to me that the fly-by's only worked once or twice, but then never again. - -Clean up package Makefile. - -Work all patches to configure into configure.in, and regenerate configure with "autoconf". cvs: ---------------------------------------------------------------------- @ text @d1 1 a1 1 $NetBSD$ @