ports/94990: cleanup/update x11toolkits/xview
Pedro F. Giffuni
giffunip at asme.org
Mon Mar 27 01:10:15 UTC 2006
>Number: 94990
>Category: ports
>Synopsis: cleanup/update x11toolkits/xview
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 27 01:10:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Pedro F. Giffuni
>Release: 6.0R (amd64)
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.0-RELEASE FreeBSD 6.0-RELEASE #12: Sat Feb 11 13:45:47 COT 2006 root at etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION amd64
>Description:
xview and it's applications coredump on my Pentium D. The problem might be with my optimization flags but I did an unsuccessful attempt to solve the problem by checking out some patches from Debian-linux that seem to work well on !i386 cases too.
We now use search.h since we have it. I also merged the errno cleanups from pkgsrc.
All in all the changes are mostly cosmetical but should help the build on platforms different than i386.
>How-To-Repeat:
>Fix:
diff -ruN xview.orig/files/lib+libxview+panel+p_list.c xview/files/lib+libxview+panel+p_list.c
--- xview.orig/files/lib+libxview+panel+p_list.c Wed Dec 31 19:00:00 1969
+++ xview/files/lib+libxview+panel+p_list.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,103 @@
+--- lib/libxview/panel/p_list.c.orig Sat Mar 25 23:52:08 2006
++++ lib/libxview/panel/p_list.c Sun Mar 26 00:10:19 2006
+@@ -24,8 +24,9 @@
+ #include <xview/screen.h>
+ #include <xview/openmenu.h>
+ #include <xview/win_notify.h>
+-#ifdef SVR4
++#if defined(BSD4_4) || defined(SVR4)
+ #include <stdlib.h>
++#include <stdarg.h>
+ #endif
+
+ #define PANEL_LIST_PRIVATE(item) \
+@@ -1239,7 +1240,7 @@
+ return ((Xv_opaque) dp->choose_one);
+
+ case PANEL_ITEM_NTH_WINDOW:
+- if (*(int *) valist == 0)
++ if (va_arg(valist, int) == 0)
+ return (Xv_opaque) dp->list_sb;
+ else
+ return (Xv_opaque) NULL;
+@@ -1266,7 +1267,7 @@
+ return (Xv_opaque) dp->list_sb;
+
+ case PANEL_LIST_SELECTED:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->f.selected : (Xv_opaque) XV_ERROR);
+
+@@ -1278,7 +1279,7 @@
+ return -1; /* no rows selected */
+
+ case PANEL_LIST_NEXT_SELECTED:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ if (!node)
+ return -1; /* specified row doesn't exist */
+@@ -1289,7 +1290,7 @@
+ return -1; /* no subsequent row selected */
+
+ case PANEL_LIST_CLIENT_DATA:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->client_data : (Xv_opaque) XV_ERROR);
+
+@@ -1297,7 +1298,7 @@
+ #ifdef OW_I18N
+ case PANEL_LIST_STRING_WCS:
+ #endif
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ #ifdef OW_I18N
+ if (node != NULL)
+@@ -1312,7 +1313,7 @@
+ #endif
+
+ case PANEL_LIST_GLYPH:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->glyph : (Xv_opaque) XV_ERROR);
+
+@@ -1328,7 +1329,7 @@
+ #endif
+
+ case PANEL_LIST_FONT:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->font : (Xv_opaque) XV_ERROR);
+
+@@ -1352,7 +1353,7 @@
+
+
+ case PANEL_LIST_INACTIVE:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->f.row_inactive : (Xv_opaque) XV_ERROR);
+
+@@ -1407,7 +1408,7 @@
+ }
+
+ case PANEL_LIST_EXTENSION_DATA:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->exten_data : (Xv_opaque) XV_ERROR);
+
+@@ -3789,7 +3790,7 @@
+
+ /* weigh timeval's against multiclick-timeout resource */
+ is_multiclick = panel_is_multiclick(ip->panel,
+- dp->last_click_row->click_time,
++ &dp->last_click_row->click_time,
+ &event_time(event)
+ );
+
diff -ruN xview.orig/files/patch+lib+libxview+panel+p_mlinetxt.c xview/files/patch+lib+libxview+panel+p_mlinetxt.c
--- xview.orig/files/patch+lib+libxview+panel+p_mlinetxt.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch+lib+libxview+panel+p_mlinetxt.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,19 @@
+--- lib/libxview/panel/p_mlinetxt.c.orig Sat Mar 25 23:52:08 2006
++++ lib/libxview/panel/p_mlinetxt.c Sun Mar 26 00:22:01 2006
+@@ -14,6 +14,7 @@
+ * Multi-line Text Field Panel Item
+ */
+ #include <string.h>
++#include <stdarg.h>
+ #include <xview_private/panel_impl.h>
+ #include <xview_private/draw_impl.h>
+ #include <xview/defaults.h>
+@@ -449,7 +450,7 @@
+ return (Xv_opaque) dp->rows_displayed;
+
+ case PANEL_ITEM_NTH_WINDOW:
+- switch (*(int *) valist) {
++ switch (va_arg(valist, int)) {
+ case 0:
+ return dp->view;
+ case 1:
diff -ruN xview.orig/files/patch+lib+libxview+panel+panel.c xview/files/patch+lib+libxview+panel+panel.c
--- xview.orig/files/patch+lib+libxview+panel+panel.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch+lib+libxview+panel+panel.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/panel/panel.c.orig Sat Mar 25 23:52:08 2006
++++ lib/libxview/panel/panel.c Sun Mar 26 00:19:28 2006
+@@ -27,6 +27,7 @@
+ Pkg_private int panel_destroy();
+
+ static int panel_layout();
++static int panel_unregister_view(Panel_info *panel, Xv_Window view);
+
+ Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
+
diff -ruN xview.orig/files/patch-clients+clock+clock.c xview/files/patch-clients+clock+clock.c
--- xview.orig/files/patch-clients+clock+clock.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+clock+clock.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,131 @@
+--- clients/clock/clock.c.orig Tue Jun 29 00:11:39 1993
++++ clients/clock/clock.c Sun Mar 26 16:29:50 2006
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <pwd.h>
+ #include <math.h>
++#include <time.h>
+ #include <xview/xview.h>
+ #include <xview/panel.h>
+ #include <xview/canvas.h>
+@@ -146,6 +147,10 @@
+ static Notify_value analog_timer_expired();
+ static Notify_value icon_timer_expired();
+ static Notify_value dig_timer_expired();
++static int min (int a, int b);
++static int seconds_on();
++static int date_on();
++static int armwidth();
+
+ typedef enum {digital, analog} Face;
+
+@@ -488,7 +493,7 @@
+ init_images (c, w, h)
+ Clock c; int w, h;
+ {
+- int now;
++ time_t now;
+ struct tm *tm;
+
+ /* resize the remote images */
+@@ -866,7 +871,7 @@
+ paint_date (c)
+ Clock c;
+ {
+- int now;
++ time_t now;
+ struct tm *tm;
+ char buf[25];
+ Frame f;
+@@ -910,7 +915,8 @@
+ paint_second_hand (c)
+ Clock c;
+ {
+- int x, y, diameter, radius, now, fromrim, angle, height, width;
++ int x, y, diameter, radius, fromrim, angle, height, width;
++ time_t now;
+ struct tm *tm;
+ ClockDisplay d;
+ Pixwin *pw;
+@@ -993,7 +999,8 @@
+ Pixwin * pw;
+ Rectlist *area;
+ {
+- int w, h, x, y, prw, prh, now;
++ int w, h, x, y, prw, prh;
++ time_t now;
+ struct tm *tm;
+ Clock c;
+
+@@ -1020,7 +1027,7 @@
+ Pixwin *pw;
+ Rectlist *area;
+ {
+- int now;
++ time_t now;
+ Font_string_dims size;
+ struct tm *tm;
+ Clock c;
+@@ -1048,7 +1055,8 @@
+ icon_timer_expired (me, which)
+ {
+ static int mins, hours;
+- int now, w, h;
++ time_t now;
++ int w, h;
+ struct tm *tm;
+ Font_string_dims size;
+ Clock c;
+@@ -1077,11 +1085,12 @@
+
+ static Notify_value
+ analog_timer_expired (me, which)
+- Notify_value me;
++ Frame me;
+ int which;
+ {
+ static int mins, hours;
+- int now, x, y, w, h, prw, prh;
++ time_t now;
++ int x, y, w, h, prw, prh;
+ struct tm *tm;
+ Clock c;
+
+@@ -1154,7 +1163,8 @@
+ Pixwin * pw;
+ Rectlist *area;
+ {
+- int i, now, y_coord, fontHeight, fontWidth;
++ int i, y_coord, fontHeight, fontWidth;
++ time_t now;
+ struct tm *tm;
+ Clock c;
+ ClockDisplay d;
+@@ -1211,7 +1221,7 @@
+ int which, invalidate;
+ {
+ static int mins, hours;
+- int now;
++ time_t now;
+ struct tm *tm;
+ Clock c;
+
+@@ -1273,7 +1283,8 @@
+ Panel_item item;
+ Event *event;
+ {
+- int w, h, now;
++ int w, h;
++ time_t now;
+ struct tm *tm;
+ Clock c = (Clock) xv_get (item, XV_KEY_DATA, key, 0);
+ ClockDisplay d = c-> display;
+@@ -1662,7 +1673,7 @@
+ init_clck (argc, argv)
+ int argc; char **argv;
+ {
+- int now;
++ time_t now;
+ struct tm *tm;
+ Menu_item tmp_item;
+ char **argscanner = argv;
diff -ruN xview.orig/files/patch-clients+olwm+screen.c xview/files/patch-clients+olwm+screen.c
--- xview.orig/files/patch-clients+olwm+screen.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-clients+olwm+screen.c Sun Mar 26 19:26:54 2006
@@ -21,15 +21,6 @@
return True;
/*NOTREACHED*/
break;
-@@ -460,7 +467,7 @@
- * Construct bitmap search path as follows:
- * $OPENWINHOME/etc/workspace/patterns
- * $OPENWINHOME/include/X11/include/bitmaps
-- * /usr/X11/include/X11/include/bitmaps
-+ * /usr/X11R6/include/X11/include/bitmaps
- *
- * REMIND: this should be cleaned up so that it doesn't use a fixed-size
- * array.
@@ -483,7 +490,7 @@
(void)sprintf(bmPath, "%s/include/X11/bitmaps",owHome);
bitmapSearchPath[i++] = MemNewString(bmPath);
diff -ruN xview.orig/files/patch-clients+olwm+st.c xview/files/patch-clients+olwm+st.c
--- xview.orig/files/patch-clients+olwm+st.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+olwm+st.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- clients/olwm/st.c.orig Sat Mar 25 22:22:56 2006
++++ clients/olwm/st.c Sat Mar 25 22:23:59 2006
+@@ -34,6 +34,8 @@
+ (table->hash == ST_NUMHASH) ? ((int) (key) % table->num_bins) :\
+ (*table->hash)((key), table->num_bins))
+
++static rehash(st_table *table);
++
+ st_table *st_init_table_with_params(compare, hash, size, density, grow_factor,
+ reorder_flag)
+ int (*compare)();
diff -ruN xview.orig/files/patch-clients+olwm+winicon.c xview/files/patch-clients+olwm+winicon.c
--- xview.orig/files/patch-clients+olwm+winicon.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-clients+olwm+winicon.c Sun Mar 26 19:26:54 2006
@@ -1,12 +1,12 @@
---- ./clients/olwm/winicon.c.orig Tue Jun 29 07:12:04 1993
-+++ ./clients/olwm/winicon.c Sat Apr 1 18:26:06 2000
+--- clients/olwm/winicon.c.orig Sat Mar 25 21:22:48 2006
++++ clients/olwm/winicon.c Sat Mar 25 22:25:54 2006
@@ -32,6 +32,10 @@
extern Bool PropGetWMName();
extern Bool PropGetWMIconName();
-+static int heightTopIcon();
-+static int heightBottomIcon();
-+static int widthBothIcon();
++static int heightTopIcon(WinIconFrame *win);
++static int heightBottomIcon(WinIconFrame *win);
++static int widthBothIcon(WinIconFrame *win);
+
/***************************************************************************
* private data
diff -ruN xview.orig/files/patch-clients+olwmslave+helprecv.c xview/files/patch-clients+olwmslave+helprecv.c
--- xview.orig/files/patch-clients+olwmslave+helprecv.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+olwmslave+helprecv.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- clients/olwmslave/helprecv.c.orig Sat Mar 25 22:29:53 2006
++++ clients/olwmslave/helprecv.c Sat Mar 25 22:30:46 2006
+@@ -15,7 +15,7 @@
+ #include "helpcmd.h"
+
+ extern int ShowHelpWindow();
+- void ReceiveHelpCmd();
++static void ReceiveHelpCmd();
+
+ /* ----------------------------------------------------------------------
+ * RegisterHelpWindow
diff -ruN xview.orig/files/patch-clients+olwmslave+helpwin.c xview/files/patch-clients+olwmslave+helpwin.c
--- xview.orig/files/patch-clients+olwmslave+helpwin.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-clients+olwmslave+helpwin.c Sun Mar 26 19:26:54 2006
@@ -1,9 +1,25 @@
---- clients/olwmslave/helpwin.c.orig Fri Oct 17 18:23:54 2003
-+++ clients/olwmslave/helpwin.c Fri Oct 17 19:01:59 2003
-@@ -136,6 +136,7 @@
- Bool ImageHelpWindow();
- void MoreHelp();
- void ErrorNotice();
+--- clients/olwmslave/helpwin.c.orig Sat Mar 25 21:22:48 2006
++++ clients/olwmslave/helpwin.c Sat Mar 25 22:33:07 2006
+@@ -128,14 +128,15 @@
+ * Local Forward Functions
+ * ---------------------------------------------------------------------*/
+ int ShowHelpWindow();
+-void InitHelpWindow();
+-Bool CreateHelpWindow();
+-Notify_value DestroyHelpWindow();
+-void ResetHelpWindow();
+-Bool TextHelpWindow();
+-Bool ImageHelpWindow();
+-void MoreHelp();
+-void ErrorNotice();
++static void InitHelpWindow();
++static Bool CreateHelpWindow();
++static Notify_value DestroyHelpWindow();
++static void ResetHelpWindow();
++static Bool TextHelpWindow();
++static Bool ImageHelpWindow();
++static void MoreHelp();
++static void ErrorNotice();
+static int ConstrainMousePos();
/* ----------------------------------------------------------------------
diff -ruN xview.orig/files/patch-clients+olwmslave+olwmslave.c xview/files/patch-clients+olwmslave+olwmslave.c
--- xview.orig/files/patch-clients+olwmslave+olwmslave.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+olwmslave+olwmslave.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,15 @@
+--- clients/olwmslave/olwmslave.c.orig Sat Mar 25 22:35:19 2006
++++ clients/olwmslave/olwmslave.c Sat Mar 25 22:36:52 2006
+@@ -44,9 +44,9 @@
+ /* ----------------------------------------------------------------------
+ * Forward Definitions
+ * ----------------------------------------------------------------------*/
+-void InitScreenInfo();
+-void ParseScreenArgs();
+-Notify_value InputReader();
++static void InitScreenInfo();
++static void ParseScreenArgs();
++static Notify_value InputReader();
+
+ /* ----------------------------------------------------------------------
+ * main
diff -ruN xview.orig/files/patch-clients+olwmslave+propsrecv.c xview/files/patch-clients+olwmslave+propsrecv.c
--- xview.orig/files/patch-clients+olwmslave+propsrecv.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+olwmslave+propsrecv.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- clients/olwmslave/propsrecv.c.orig Sat Mar 25 22:42:20 2006
++++ clients/olwmslave/propsrecv.c Sat Mar 25 22:43:01 2006
+@@ -15,7 +15,7 @@
+ #include "propscmd.h"
+
+ extern int ShowWindowProps();
+- void ReceivePropsCmd();
++static void ReceivePropsCmd();
+
+ /* ----------------------------------------------------------------------
+ * RegisterPropsWindow
diff -ruN xview.orig/files/patch-clients+olwmslave+propswin.c xview/files/patch-clients+olwmslave+propswin.c
--- xview.orig/files/patch-clients+olwmslave+propswin.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-clients+olwmslave+propswin.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,15 @@
+--- clients/olwmslave/propswin.c.orig Sat Mar 25 22:43:32 2006
++++ clients/olwmslave/propswin.c Sat Mar 25 22:44:16 2006
+@@ -38,9 +38,9 @@
+ * Local Forward Declarations
+ * ----------------------------------------------------------------------*/
+ int ShowWindowProps();
+-void InitWindowProps();
+-Bool CreateWindowProps();
+-Notify_value DestroyWindowProps();
++static void InitWindowProps();
++static Bool CreateWindowProps();
++static Notify_value DestroyWindowProps();
+ void ApplyProps();
+ void ResetProps();
+
diff -ruN xview.orig/files/patch-lib+libxview+color+cms_pblc.c xview/files/patch-lib+libxview+color+cms_pblc.c
--- xview.orig/files/patch-lib+libxview+color+cms_pblc.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+color+cms_pblc.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,14 @@
---- lib/libxview/color/cms_pblc.c.orig Mon Sep 29 00:02:28 2003
-+++ lib/libxview/color/cms_pblc.c Mon Sep 29 00:02:28 2003
-@@ -316,9 +316,10 @@
+--- lib/libxview/color/cms_pblc.c.orig Tue Jun 29 00:15:53 1993
++++ lib/libxview/color/cms_pblc.c Sat Mar 25 23:35:01 2006
+@@ -4,6 +4,7 @@
+ #endif
+ #endif
+
++#include <stdarg.h>
+ #include <xview/cms.h>
+ #include <xview/notify.h>
+ #ifdef OW_I18N
+@@ -316,14 +317,15 @@
{
Cms_info *cms = CMS_PRIVATE(cms_public);
Xv_opaque value;
@@ -12,3 +20,62 @@
switch (attr) {
case CMS_PIXEL: {
unsigned long index;
+
+- index = (unsigned long)avlist[0];
++ index = va_arg(args, unsigned long);
+ if (index >= cms->size) {
+ index = cms->size - 1;
+ } else if (index < 0) {
+@@ -398,29 +400,37 @@
+ break;
+
+ case CMS_COLORS:
+- if (cms_get_colors(cms, (unsigned long)0, cms->size,
+- (Xv_singlecolor *)avlist[0], (XColor *)NULL,
+- (unsigned char *)NULL, (unsigned char *)NULL,
+- (unsigned char *)NULL) == XV_OK) {
+- value = (Xv_opaque)avlist[0];
+- } else {
+- value = NULL;
++ {
++ Xv_singlecolor *v = va_arg(args, Xv_singlecolor *);
++
++ if (cms_get_colors(cms, (unsigned long)0, cms->size,
++ v, (XColor *)NULL,
++ (unsigned char *)NULL, (unsigned char *)NULL,
++ (unsigned char *)NULL) == XV_OK) {
++ value = (Xv_opaque)v;
++ } else {
++ value = NULL;
++ }
+ }
+ break;
+
+ case CMS_X_COLORS:
+- if (cms_get_colors(cms, (unsigned long)0, cms->size,
+- (Xv_singlecolor *)NULL, (XColor *)avlist[0],
+- (unsigned char *)NULL, (unsigned char *)NULL,
+- (unsigned char *)NULL) == XV_OK) {
+- value = (Xv_opaque)avlist[0];
+- } else {
+- value = NULL;
++ {
++ XColor *v = va_arg(args, XColor *);
++
++ if (cms_get_colors(cms, (unsigned long)0, cms->size,
++ (Xv_singlecolor *)NULL, v,
++ (unsigned char *)NULL, (unsigned char *)NULL,
++ (unsigned char *)NULL) == XV_OK) {
++ value = (Xv_opaque)v;
++ } else {
++ value = NULL;
++ }
+ }
+ break;
+
+ case CMS_CMS_DATA: {
+- Xv_cmsdata *cms_data = (Xv_cmsdata *)avlist[0];
++ Xv_cmsdata *cms_data = va_arg(args, Xv_cmsdata *);
+
+ cms_data->type = cms->type;
+ cms_data->size = cms->size;
diff -ruN xview.orig/files/patch-lib+libxview+font+font_get.c xview/files/patch-lib+libxview+font+font_get.c
--- xview.orig/files/patch-lib+libxview+font+font_get.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+font+font_get.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,14 @@
---- lib/libxview/font/font_get.c.orig Tue Jun 29 14:15:00 1993
-+++ lib/libxview/font/font_get.c Sat Jan 9 23:35:51 1999
-@@ -43,7 +43,9 @@
+--- lib/libxview/font/font_get.c.orig Sat Mar 25 21:22:49 2006
++++ lib/libxview/font/font_get.c Sat Mar 25 23:10:35 2006
+@@ -11,6 +11,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdarg.h>
+ #include <X11/Xlib.h>
+ #include <xview/attr.h>
+ #include <xview_private/font_impl.h>
+@@ -43,7 +44,9 @@
XFontStruct *x_font_info = (XFontStruct *)font->x_font_info;
Xv_opaque v;
int attr_is_char_width = 0;
@@ -11,3 +19,25 @@
#ifdef OW_I18N
if (font->type == FONT_TYPE_TEXT) {
+@@ -138,8 +141,8 @@
+ }
+
+ case FONT_STRING_DIMS:{
+- char *string = (char *) avlist[0];
+- Font_string_dims *size = (Font_string_dims *) avlist[1];
++ char *string = (char *) va_arg(args, char *);
++ Font_string_dims *size = (Font_string_dims *) va_arg(args, Font_string_dims *);
+ struct pr_size my_pf_size;
+ if (string) {
+ my_pf_size = xv_pf_textwidth(strlen(string), font_public, string);
+@@ -264,8 +267,8 @@
+
+ #ifdef OW_I18N
+ case FONT_STRING_DIMS_WC:{
+- wchar_t *ws = (wchar_t *) avlist[0];
+- Font_string_dims *size = (Font_string_dims *) avlist[1];
++ wchar_t *ws = (wchar_t *) va_arg(args, wchar_t *);
++ Font_string_dims *size = (Font_string_dims *) va_arg(args, Font_string_dims *);
+ struct pr_size my_pf_size;
+
+ if (ws) {
diff -ruN xview.orig/files/patch-lib+libxview+frame+fm_get.c xview/files/patch-lib+libxview+frame+fm_get.c
--- xview.orig/files/patch-lib+libxview+frame+fm_get.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+frame+fm_get.c Sun Mar 26 19:26:54 2006
@@ -1,10 +1,21 @@
---- ./lib/libxview/frame/fm_get.c.orig Tue Jun 29 07:16:10 1993
-+++ ./lib/libxview/frame/fm_get.c Sat Apr 1 18:25:24 2000
-@@ -10,6 +10,7 @@ static char sccsid[] = "@(#)fm_get.c
+--- lib/libxview/frame/fm_get.c.orig Tue Jun 29 00:16:10 1993
++++ lib/libxview/frame/fm_get.c Sat Mar 25 23:50:29 2006
+@@ -10,6 +10,7 @@
* file for terms of the license.
*/
-+#include <ctype.h>
++#include <stdarg.h>
#include <xview_private/fm_impl.h>
#include <xview_private/draw_impl.h>
#include <xview/server.h>
+@@ -369,8 +370,8 @@
+ return((Xv_opaque)status_get(frame, compose_led));
+
+ case FRAME_MIN_SIZE: {
+- int *width = (int *)va_arg(valist, int),
+- *height = (int *)va_arg(valist, int),
++ int *width = (int *)va_arg(valist, int *),
++ *height = (int *)va_arg(valist, int *),
+ footer_height = 0;
+
+ if (status_get(frame, show_footer) && frame->footer &&
diff -ruN xview.orig/files/patch-lib+libxview+frame+fm_input.c xview/files/patch-lib+libxview+frame+fm_input.c
--- xview.orig/files/patch-lib+libxview+frame+fm_input.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+frame+fm_input.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/frame/fm_input.c.orig Sat Mar 25 23:39:23 2006
++++ lib/libxview/frame/fm_input.c Sat Mar 25 23:42:06 2006
+@@ -359,6 +359,7 @@
+ */
+ Xv_private void
+ frame_set_accept_default_focus(frame_public, flag)
++ Frame frame_public;
+ {
+ Frame_class_info *frame = FRAME_CLASS_PRIVATE(frame_public);
+
diff -ruN xview.orig/files/patch-lib+libxview+io_stream+input.c xview/files/patch-lib+libxview+io_stream+input.c
--- xview.orig/files/patch-lib+libxview+io_stream+input.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+io_stream+input.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- lib/libxview/io_stream/input.c.orig Sat Mar 25 23:13:46 2006
++++ lib/libxview/io_stream/input.c Sat Mar 25 23:14:17 2006
+@@ -22,7 +22,7 @@
+ XV_MSG("input stream not of type input"), 0); \
+ ops = in->ops.input_ops
+
+-char *stream_getstring();
++static char *stream_getstring();
+
+ /* GENERIC INPUT FUNCTIONS */
+
diff -ruN xview.orig/files/patch-lib+libxview+misc+gettext.c xview/files/patch-lib+libxview+misc+gettext.c
--- xview.orig/files/patch-lib+libxview+misc+gettext.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+misc+gettext.c Sun Mar 26 19:26:54 2006
@@ -1,16 +1,23 @@
---- lib/libxview/misc/gettext.c.orig Sat Aug 6 21:47:27 2005
-+++ lib/libxview/misc/gettext.c Sat Aug 6 21:51:07 2005
-@@ -10,10 +10,12 @@
- #include <xview_private/gettext.h>
+--- lib/libxview/misc/gettext.c.orig 1993-06-29 05:16:30.000000000 +0000
++++ lib/libxview/misc/gettext.c
+@@ -8,12 +8,14 @@ static char sccsid[] = "@(#)gettext.
+ #endif
- char *strdup();
+ #include <xview_private/gettext.h>
+-
+-char *strdup();
-char * dgettext(), *bindtextdomain();
-+char * dgettext(char* domain_nane, char* msg_id), *bindtextdomain();
- char *_gettext();
- char *fgets(), *getenv();
-+#ifndef OS_HAS_MMAP
- caddr_t mmap();
-+#endif
+-char *_gettext();
+-char *fgets(), *getenv();
+-caddr_t mmap();
++#include <string.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/mman.h>
++
++char *bindtextdomain(char *, unsigned char *);
++char *dgettext(char *, char*);
++static char *_gettext();
static struct domain_binding *firstbind=0, *lastbind=0;
diff -ruN xview.orig/files/patch-lib+libxview+notice+notice_set.c xview/files/patch-lib+libxview+notice+notice_set.c
--- xview.orig/files/patch-lib+libxview+notice+notice_set.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+notice+notice_set.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/notice/notice_set.c.orig Sun Mar 26 00:02:43 2006
++++ lib/libxview/notice/notice_set.c Sun Mar 26 00:04:18 2006
+@@ -22,7 +22,6 @@
+ #include <xview/win_input.h>
+ #include <xview/cms.h>
+
+-extern char *strchr();
+ Pkg_private Xv_opaque notice_generic_set();
+ #ifdef OW_I18N
+ static CHAR **notice_string_set();
diff -ruN xview.orig/files/patch-lib+libxview+notify+ndet_auto.c xview/files/patch-lib+libxview+notify+ndet_auto.c
--- xview.orig/files/patch-lib+libxview+notify+ndet_auto.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+notify+ndet_auto.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,6 @@
---- lib/libxview/notify/ndet_auto.c.orig Sun Oct 12 19:37:15 2003
-+++ lib/libxview/notify/ndet_auto.c Sun Oct 12 19:39:34 2003
-@@ -21,7 +21,8 @@
+--- lib/libxview/notify/ndet_auto.c.orig Tue Jun 29 00:18:19 1993
++++ lib/libxview/notify/ndet_auto.c Sun Mar 26 16:32:53 2006
+@@ -21,11 +21,11 @@
#include <xview_private/ndis.h> /* For ndis_enqueue */
#include <errno.h>
#include <signal.h>
@@ -10,3 +10,7 @@
#include <stdlib.h>
#endif SVR4
+-extern errno;
+
+ pkg_private_data sigset_t ndet_sigs_auto;
+ pkg_private_data Notify_client ndet_auto_nclient =
diff -ruN xview.orig/files/patch-lib+libxview+notify+ndet_loop.c xview/files/patch-lib+libxview+notify+ndet_loop.c
--- xview.orig/files/patch-lib+libxview+notify+ndet_loop.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+notify+ndet_loop.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,6 @@
--- lib/libxview/notify/ndet_loop.c.orig Tue Jun 29 07:18:19 1993
-+++ lib/libxview/notify/ndet_loop.c Sun Apr 2 03:32:17 2000
-@@ -14,13 +14,14 @@ static char sccsid[] = "@(#)ndet_loo
++++ lib/libxview/notify/ndet_loop.c Thu Dec 20 10:09:16 2001
+@@ -14,13 +14,18 @@ static char sccsid[] = "@(#)ndet_loo
* Ndet_loop.c - Notification loop.
*/
@@ -11,12 +11,24 @@
#include <xview_private/nint.h>
#include <xview_private/ndis.h> /* For ndis_dispatch */
#ifndef SVR4
--#include <syscall.h>
++#if !defined(__FreeBSD__)
+ #include <syscall.h>
++#else
+#include <sys/syscall.h>
++#endif
#else SVR4
#include <sys/syscall.h>
#include <sys/poll.h>
-@@ -224,7 +225,8 @@ notify_start()
+@@ -35,8 +40,6 @@ static char sccsid[] = "@(#)ndet_loo
+ #include <stdio.h> /* For temp debugging */
+ #include <rpc/rpc.h>
+
+-extern int errno;
+-
+ pkg_private_data u_int ndet_flags = 0;
+ pkg_private_data NTFY_CLIENT *ndet_clients = 0;
+ pkg_private_data NTFY_CLIENT *ndet_client_latest = 0;
+@@ -224,7 +227,8 @@ notify_start()
* will return with an EINTR when a signal arrives while IN
* select, not ON THE WAY into select).
*/
diff -ruN xview.orig/files/patch-lib+libxview+notify+ndet_wait.c xview/files/patch-lib+libxview+notify+ndet_wait.c
--- xview.orig/files/patch-lib+libxview+notify+ndet_wait.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+notify+ndet_wait.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- lib/libxview/notify/ndet_wait.c.orig 2006-01-04 11:52:12.000000000 +0000
++++ lib/libxview/notify/ndet_wait.c
+@@ -18,8 +18,6 @@ static char sccsid[] = "@(#)ndet_wai
+ #include <xview_private/ndet.h>
+ #include <errno.h>
+
+-extern errno;
+-
+ pkg_private int
+ ndet_check_pid(pid)
+ int pid;
diff -ruN xview.orig/files/patch-lib+libxview+notify+ndetselect.c xview/files/patch-lib+libxview+notify+ndetselect.c
--- xview.orig/files/patch-lib+libxview+notify+ndetselect.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+notify+ndetselect.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/notify/ndetselect.c.orig 2006-01-04 11:53:02.000000000 +0000
++++ lib/libxview/notify/ndetselect.c
+@@ -28,7 +28,6 @@ static int ndet_select_nfds, ndet_s
+
+ static Notify_client ndet_select_nclient = (Notify_client) & ndet_select_ibits;
+
+-extern errno;
+ extern int notify_exclude_fd;
+
+ extern int
diff -ruN xview.orig/files/patch-lib+libxview+notify+ntfyclient.c xview/files/patch-lib+libxview+notify+ntfyclient.c
--- xview.orig/files/patch-lib+libxview+notify+ntfyclient.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+notify+ntfyclient.c Sun Mar 26 19:55:58 2006
@@ -1,58 +1,51 @@
---- ./lib/libxview/notify/ntfyclient.c.orig Tue Jun 29 07:18:11 1993
-+++ ./lib/libxview/notify/ntfyclient.c Sat Apr 1 18:25:26 2000
-@@ -18,7 +18,9 @@ static char sccsid[] = "@(#)ntfyclie
- #include <xview_private/ntfy.h>
- #include <xview_private/ndis.h> /* For ndis_default_prioritizer */
- #include <xview_private/ndet.h>
-+#ifndef __FreeBSD__
- #include <search.h>
-+#endif
- #include <xview_private/portable.h>
+--- lib/libxview/notify/ntfyclient.c.orig Tue Jun 29 00:18:11 1993
++++ lib/libxview/notify/ntfyclient.c Sun Mar 26 19:54:38 2006
+@@ -43,7 +43,20 @@
+ tmp = key2a >> 16;
+ tmp1 = key2a << 21;
+ key2a = tmp1 | ((key2a << 5) & 0x001f0000) | tmp;
+- return key1a - key2a;
++/* return key1a - key2a; */
++ /* OUCH, trying to store the result of the subtraction of two unsigned
++ * ints (which potentially can use the whole range of an unsigned int, due
++ * to the bit-shifting above) in a signed int is not a very clever idea.
++ * But we only have to return *any* positive value if key1a is greater than
++ * key2a, 0 if they're equal or *any* negatve value if key1a is less than
++ * key2a; the actual difference doesn't matter. So let's use a simple
++ * comparison.
++ * <mbuck at debian.org>
++ */
++ return (key1a < key2a) ? -1 :
++ ((key1a > key2a) ? 1 :
++ 0);
++
+ }
- /* Variables used in paranoid enumerator (see ntfy_condition) */
-@@ -60,6 +62,7 @@ ntfy_find_nclient(client_list, nclient,
+ pkg_private NTFY_CLIENT *
+@@ -60,6 +73,7 @@
if (*client_latest && (*client_latest)->nclient == nclient)
return (*client_latest);
-+#ifndef __FreeBSD__
++#ifdef _SEARCH_H_
if(( client_list == ndet_clients ) && ndet_clients ) {
dummy_client.nclient = nclient;
/* Find client */
-@@ -73,7 +76,9 @@ ntfy_find_nclient(client_list, nclient,
+@@ -73,7 +87,9 @@
return (client);
}
}
-
+#else
-+ if(0);
++ if(0);
+#endif
else
/* Search entire list */
for (client = client_list; client; client = next) {
-@@ -100,6 +105,7 @@ ntfy_new_nclient(client_list, nclient, c
- register NTFY_CLIENT *client;
- static NTFY_CLIENT *new_client;
-
-+#ifndef __FreeBSD__
- if( client_list == &ndet_clients ) {
- if( new_client == NTFY_CLIENT_NULL ) {
- if ((new_client = ntfy_alloc_client()) == NTFY_CLIENT_NULL)
-@@ -119,7 +125,9 @@ ntfy_new_nclient(client_list, nclient, c
- else
- return client;
- }
--
-+#else
-+ if(0);
-+#endif
- else if ((client = ntfy_find_nclient(*client_list, nclient,
- client_latest)) != NTFY_CLIENT_NULL)
- return client;
-@@ -163,8 +171,10 @@ ntfy_remove_client(client_list, client,
+@@ -163,8 +179,10 @@
ntfy_remove_condition(client, condition, who);
}
/* Remove & free client from client_list */
-+#ifndef __FreeBSD__
++#ifdef _SEARCH_H_
if( client_list == &ndet_clients )
tdelete( client, ndet_root, ndet_compar );
+#endif
diff -ruN xview.orig/files/patch-lib+libxview+notify+sys_select.c xview/files/patch-lib+libxview+notify+sys_select.c
--- xview.orig/files/patch-lib+libxview+notify+sys_select.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+notify+sys_select.c Sun Mar 26 19:26:54 2006
@@ -1,16 +1,23 @@
-*** lib/libxview/notify/sys_select.c~ Mon Jun 28 22:18:11 1993
---- lib/libxview/notify/sys_select.c Tue Nov 22 08:20:27 1994
-***************
-*** 15,21 ****
---- 15,25 ----
- */
-
- #ifndef SVR4
-+ #ifndef __FreeBSD__
- #include <syscall.h>
-+ #else
-+ #include <sys/syscall.h>
-+ #endif
- #else SVR4
- #include <values.h>
- #include <sys/time.h>
+--- lib/libxview/notify/sys_select.c.orig Tue Jun 29 07:18:11 1993
++++ lib/libxview/notify/sys_select.c Thu Dec 20 10:09:16 2001
+@@ -15,7 +15,11 @@ static char sccsid[] = "@(#)sys_sele
+ */
+
+ #ifndef SVR4
++#if !defined(__FreeBSD__)
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #else SVR4
+ #include <values.h>
+ #include <sys/time.h>
+@@ -28,8 +32,6 @@ static char sccsid[] = "@(#)sys_sele
+ #include <errno.h> /* For debugging */
+ #include <stdio.h> /* For debugging */
+
+-extern errno;
+-
+ #ifndef NULL
+ #define NULL 0
+ #endif
diff -ruN xview.orig/files/patch-lib+libxview+rect+rect_util.c xview/files/patch-lib+libxview+rect+rect_util.c
--- xview.orig/files/patch-lib+libxview+rect+rect_util.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+rect+rect_util.c Sun Mar 26 19:26:54 2006
@@ -1,10 +1,10 @@
---- ./lib/libxview/rect/rect_util.c.orig Tue Jun 29 07:15:17 1993
-+++ ./lib/libxview/rect/rect_util.c Sat Apr 1 18:25:27 2000
-@@ -16,6 +16,8 @@ static char sccsid[] = "@(#)rect_uti
+--- lib/libxview/rect/rect_util.c.orig Sat Mar 25 21:22:49 2006
++++ lib/libxview/rect/rect_util.c Sat Mar 25 23:18:00 2006
+@@ -16,6 +16,8 @@
#include <xview/rect.h>
-+static int rect_nearest_edge();
++static int rect_nearest_edge(int minimum, int delta, int val);
+
/*
* Compute the distance from rect to (x, y). If (x, y) is in rect, zero is
diff -ruN xview.orig/files/patch-lib+libxview+screen+scrn_get.c xview/files/patch-lib+libxview+screen+scrn_get.c
--- xview.orig/files/patch-lib+libxview+screen+scrn_get.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+screen+scrn_get.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/screen/scrn_get.c.orig Sat Mar 25 23:20:12 2006
++++ lib/libxview/screen/scrn_get.c Sat Mar 25 23:20:44 2006
+@@ -20,6 +20,7 @@
+ #include <xview/base.h>
+ #include <xview/font.h>
+ #include <xview/server.h>
++#include <X11/Xlibint.h>
+
+ /* Bitmap used for the inactive GC */
+ static unsigned short screen_gray50_bitmap[16] = { /* 50% gray pattern */
diff -ruN xview.orig/files/patch-lib+libxview+sel+seln.c xview/files/patch-lib+libxview+sel+seln.c
--- xview.orig/files/patch-lib+libxview+sel+seln.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+sel+seln.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/sel/seln.c.orig 2006-01-04 10:33:29.000000000 +0000
++++ lib/libxview/sel/seln.c
+@@ -69,7 +69,6 @@ selection_get(sel_read, window)
+ FILE *file;
+ int c;
+ int n;
+- extern errno;
+
+ *sel = selnull;
+ (void) win_lockdata(window);
diff -ruN xview.orig/files/patch-lib+libxview+sel+seln_impl.h xview/files/patch-lib+libxview+sel+seln_impl.h
--- xview.orig/files/patch-lib+libxview+sel+seln_impl.h Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+sel+seln_impl.h Sun Mar 26 19:26:54 2006
@@ -1,5 +1,5 @@
---- ./lib/libxview/sel/seln_impl.h.orig Tue Jun 29 07:15:25 1993
-+++ ./lib/libxview/sel/seln_impl.h Sat Apr 1 18:25:27 2000
+--- lib/libxview/sel/seln_impl.h.orig Tue Jun 29 07:15:25 1993
++++ lib/libxview/sel/seln_impl.h Thu Dec 20 10:09:17 2001
@@ -9,12 +9,17 @@
* file for terms of the license.
*/
@@ -19,3 +19,14 @@
#endif FILE
#include <sys/time.h>
#include <sys/types.h>
+@@ -27,10 +32,6 @@
+ #include <xview/sel_attrs.h>
+ #include <X11/Xlib.h>
+
+-extern int errno;
+-
+-
+-
+ /*
+ * Procedure IDs for client-module procedures
+ */
diff -ruN xview.orig/files/patch-lib+libxview+selection+sel_util.c xview/files/patch-lib+libxview+selection+sel_util.c
--- xview.orig/files/patch-lib+libxview+selection+sel_util.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+selection+sel_util.c Sun Mar 26 19:26:54 2006
@@ -1,5 +1,5 @@
---- ./lib/libxview/selection/sel_util.c.orig Tue Jun 29 07:16:03 1993
-+++ ./lib/libxview/selection/sel_util.c Sat Apr 1 18:25:28 2000
+--- lib/libxview/selection/sel_util.c.orig Tue Jun 29 07:16:03 1993
++++ lib/libxview/selection/sel_util.c Thu Dec 20 10:09:17 2001
@@ -23,6 +23,7 @@ static void tvdiff();
static void FreeMultiProp();
static int SelMatchReply();
@@ -8,7 +8,15 @@
Pkg_private struct timeval *
xv_sel_cvt_xtime_to_timeval( XTime )
-@@ -601,7 +602,7 @@ Sel_reply_info *reply;
+@@ -510,7 +511,6 @@ char *arg;
+ int result;
+ struct timeval timeout;
+ struct timeval starttime, curtime, diff1, diff2;
+- extern int errno;
+
+ timeout.tv_sec = seconds;
+ timeout.tv_usec = 0;
+@@ -601,7 +601,7 @@ Sel_reply_info *reply;
reqTbl->reply = reply;
reqTbl->next = NULL;
(void)XSaveContext( dpy, DefaultRootWindow(dpy),replyCtx,
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_e_menu.c xview/files/patch-lib+libxview+textsw+txt_e_menu.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_e_menu.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_e_menu.c Sun Mar 26 19:26:54 2006
@@ -1,22 +1,66 @@
-*** lib/libxview/textsw/txt_e_menu.c.org Sun Jan 21 16:01:52 2001
---- lib/libxview/textsw/txt_e_menu.c Sun Jan 21 16:03:27 2001
-***************
-*** 144,153 ****
---- 144,160 ----
-
- #ifdef __FreeBSD__
- /* Gee, still?... We will try the old fashioned way */
-+ /* If it is never defined, EXTRASMENU is set to text_extras_menu
-+ see top of this file ... */
- (void) sprintf(tmp, "%s/lib/.%s",
- filename, EXTRASMENU);
- if ((result = check_filename_locale(NULL, tmp, 1)) != NULL)
- goto found;
-+ /* EXTRASMENU is absolute specified as normally done
-+ during compile time option -DEXTRASMENU="\"$(TEXT_EXTRAS_MENU)\" */
-+ (void) sprintf(tmp, "%s", EXTRASMENU);
-+ if ((result = check_filename_locale(NULL, tmp, 1)) != NULL)
-+ goto found;
- #endif
- }
-
+--- lib/libxview/textsw/txt_e_menu.c.orig Tue Jun 29 00:17:42 1993
++++ lib/libxview/textsw/txt_e_menu.c Sun Mar 26 17:27:17 2006
+@@ -19,7 +19,7 @@
+ * 3. $(HOME)/.text_extras_menu{.<locale>} (home dir),
+ * 4. locale sensitive system default
+ * ("$OPENWINHOME/lib/locale/<locale>/XView/.text_extras_menu")
+- * 4. fall back to SunView1 ("/usr/lib/.text_extras_menu")
++ * 4. fall back to SunView1 ("/usr/X11R6/lib/.text_extras_menu")
+ *
+ * Always try locale specific name first, if not there, try without
+ * locale name. In the #4, we will fall back to the "C" locale.
+@@ -45,13 +45,16 @@
+ * Declare errno. Some BSD systems do not have errno declared in
+ * <errno.h>
+ */
+-extern int errno;
+
+ #define ERROR -1
+
+ #define MAX_FILES 40
++#ifndef MAXPATHLEN
+ #define MAXPATHLEN 1024
++#endif
++#ifndef EXTRASMENU
+ #define EXTRASMENU "text_extras_menu"
++#endif
+ #define MAXSTRLEN 256
+ #define MAXARGS 20
+
+@@ -75,9 +78,12 @@
+ static int free_argv();
+ static int Nargs;
+ static char *check_filename_locale();
++static any_shell_meta(char *s);
+
+ extern int EXTRASMENU_FILENAME_KEY;
+
++static any_shell_meta();
++
+ Pkg_private char *
+ textsw_get_extras_filename(mi)
+ Menu_item mi;
+@@ -138,15 +144,22 @@
+
+ #ifdef notdef
+ /* Gee, still?... We will try the old fashioned way */
++ /* If it is never defined, EXTRASMENU is set to text_extras_menu
++ see top of this file ... */
+ (void) sprintf(tmp, "%s/lib/.%s",
+ filename, EXTRASMENU);
+ if ((result = check_filename_locale(NULL, tmp, 1)) != NULL)
+ goto found;
++ /* EXTRASMENU is absolute specified as normally done
++ during compile time option -DEXTRASMENU="\"$(TEXT_EXTRAS_MENU)\" */
++ (void) sprintf(tmp, "%s", EXTRASMENU);
++ if ((result = check_filename_locale(NULL, tmp, 1)) != NULL)
++ goto found;
+ #endif
+ }
+
+ /* Giving up, try with ancient way (SunView1) */
+- (void) sprintf(tmp, "/usr/lib/.%s", EXTRASMENU);
++ (void) sprintf(tmp, "/usr/X11R6/lib/.%s", EXTRASMENU);
+ result = xv_strsave(tmp);
+
+ found:
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_event.c xview/files/patch-lib+libxview+textsw+txt_event.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_event.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+textsw+txt_event.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/textsw/txt_event.c.orig 2006-01-04 11:15:27.000000000 +0000
++++ lib/libxview/textsw/txt_event.c
+@@ -22,7 +22,6 @@ static char sccsid[] = "@(#)txt_even
+ #include <xview_private/win_keymap.h>
+
+
+-extern int errno;
+ Pkg_private Notify_error win_post_event();
+ Pkg_private void ev_blink_caret();
+
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_field.c xview/files/patch-lib+libxview+textsw+txt_field.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_field.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+textsw+txt_field.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,20 @@
+--- lib/libxview/textsw/txt_field.c.orig Sun Mar 26 01:09:21 2006
++++ lib/libxview/textsw/txt_field.c Sun Mar 26 01:10:42 2006
+@@ -121,8 +121,6 @@
+ CHAR marker2[3];
+ int marker2_len;
+ unsigned direction;
+- static void textsw_get_match_symbol();
+-
+ buf = buf + (buf_len - marker1_len);
+ (void) textsw_get_match_symbol(marker1, marker1_len,
+ marker2, &marker2_len, &direction);
+@@ -152,8 +150,6 @@
+ CHAR marker2[3];
+ int marker2_len;
+ unsigned direction;
+- static void textsw_get_match_symbol();
+-
+ (void) textsw_get_match_symbol(marker1, marker1_len,
+ marker2, &marker2_len, &direction);
+ if (STRNCMP(buf, marker2, marker2_len) == 0) {
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_file.c xview/files/patch-lib+libxview+textsw+txt_file.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_file.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_file.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,6 @@
--- lib/libxview/textsw/txt_file.c.orig Tue Jun 29 00:17:48 1993
-+++ lib/libxview/textsw/txt_file.c Sun Oct 5 17:00:24 2003
-@@ -18,10 +18,14 @@
++++ lib/libxview/textsw/txt_file.c Sun Mar 26 17:23:07 2006
+@@ -18,10 +18,15 @@
#include <xview_private/txt_impl.h>
#include <xview_private/ev_impl.h>
#include <xview_private/txt_18impl.h>
@@ -12,11 +12,12 @@
#include <unistd.h>
+#ifdef BSD4_4
+#include <sys/file.h>
++#include <errno.h>
+#endif
#else
#include <sys/dir.h>
#include <sys/file.h>
-@@ -33,7 +37,6 @@
+@@ -33,7 +38,6 @@
*/
#undef MIN
#undef MAX
@@ -24,7 +25,7 @@
#include <xview/notice.h>
#include <xview/frame.h>
#include <errno.h>
-@@ -45,13 +48,16 @@
+@@ -45,13 +49,16 @@
extern CHAR *STRCAT();
extern CHAR *STRNCAT();
@@ -36,15 +37,15 @@
#endif /* SVR4 */
-extern int errno, sys_nerr;
-extern char *sys_errlist[];
++#if !(defined(BSD) && (BSD >= 199306))
+extern int errno;
+extern const int sys_nerr;
-+#if (defined(BSD) && (BSD >= 199306))
+extern const char *const sys_errlist[];
+#endif /* BSD */
Pkg_private int textsw_change_directory();
Pkg_private void textsw_display(), textsw_display_view_margins();
-@@ -354,7 +360,7 @@
+@@ -354,7 +361,7 @@
}
#ifdef OW_I18N
@@ -53,7 +54,7 @@
if (getcwd(pathname_mb, MAXPATHLEN) == 0)
#else
if (getwd(pathname_mb) == 0)
-@@ -364,7 +370,7 @@
+@@ -364,7 +371,7 @@
#else /* OW_I18N */
@@ -62,7 +63,7 @@
if (getcwd(pathname, MAXPATHLEN) == 0)
#else
if (getwd(pathname) == 0)
-@@ -1538,7 +1544,7 @@
+@@ -1538,7 +1545,7 @@
int cmd_is_undo_all_edit; /* This is for doing an "Undo
* All edit" */
{
@@ -71,7 +72,7 @@
pkg_private Es_status textsw_checkpoint_internal();
#else /* SVR4 */
static Es_status textsw_checkpoint_internal();
-@@ -2386,7 +2392,7 @@
+@@ -2386,7 +2393,7 @@
return (result);
}
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_filter.c xview/files/patch-lib+libxview+textsw+txt_filter.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_filter.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_filter.c Sun Mar 26 19:26:54 2006
@@ -1,7 +1,7 @@
---- lib/libxview/textsw/txt_filter.c.orig Sun Oct 5 14:57:49 2003
-+++ lib/libxview/textsw/txt_filter.c Sun Oct 5 15:20:32 2003
+--- lib/libxview/textsw/txt_filter.c.orig Tue Jun 29 00:17:39 1993
++++ lib/libxview/textsw/txt_filter.c Sun Mar 26 16:56:26 2006
@@ -17,7 +17,8 @@
- #include "types.h"
+ #include <sys/types.h>
#include <sys/file.h>
#include <unistd.h>
-#ifdef SVR4
@@ -19,13 +19,22 @@
#include <unistd.h>
#else
#include <vfork.h>
-@@ -54,6 +57,9 @@
- #define REPLY_ERROR -1
+@@ -55,6 +56,7 @@
#define REPLY_OKAY 0
#define REPLY_SEND 1
+
+
+ /* performance: global cache of getdtablesize() */
+ extern int dtablesize_cache;
+
+@@ -66,8 +68,8 @@
+ (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
+ #endif /* SVR4 */
+
+-
+-extern int errno;
+static int talk_to_filter();
+static int start_filter();
- /* performance: global cache of getdtablesize() */
- extern int dtablesize_cache;
+ Xv_public char *xv_getlogindir();
+ Pkg_private Es_index textsw_do_input();
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_getkey.c xview/files/patch-lib+libxview+textsw+txt_getkey.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_getkey.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+textsw+txt_getkey.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- lib/libxview/textsw/txt_getkey.c.orig 2006-01-04 11:41:31.000000000 +0000
++++ lib/libxview/textsw/txt_getkey.c
+@@ -21,8 +21,6 @@ static char sccsid[] = "@(#)txt_getk
+ #include <xview_private/ev_impl.h> /* For declaration of ev_add_finder */
+ #include <errno.h>
+
+-extern int errno;
+-
+ static void textsw_do_get();
+ Pkg_private Es_index textsw_find_mark_internal();
+ Pkg_private Es_index textsw_insert_pieces();
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_input.c xview/files/patch-lib+libxview+textsw+txt_input.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_input.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_input.c Sun Mar 26 19:26:54 2006
@@ -1,6 +1,15 @@
---- ./lib/libxview/textsw/txt_input.c.orig Tue Jun 29 07:17:42 1993
-+++ ./lib/libxview/textsw/txt_input.c Sat Apr 1 18:25:29 2000
-@@ -57,6 +57,8 @@ static void textsw_do_undo();
+--- lib/libxview/textsw/txt_input.c.orig Tue Jun 29 00:17:42 1993
++++ lib/libxview/textsw/txt_input.c Sun Mar 26 17:07:11 2006
+@@ -40,8 +40,6 @@
+ #include <stdlib.h>
+ #endif /* SVR4 */
+
+-extern int errno;
+-
+ Pkg_private Xv_Cursor move_cursor, dup_cursor; /* laf */
+ Pkg_private void termsw_menu_set();
+ Pkg_private Key_map_handle textsw_do_filter();
+@@ -57,6 +55,8 @@
Pkg_private void textsw_implicit_commit_doit();
#endif
@@ -9,3 +18,44 @@
#define SPACE_CHAR 0x20
Pkg_private int
+@@ -192,6 +192,15 @@
+
+ #endif
+
++static int textsw_scroll_event();
++static int textsw_function_key_event();
++static int textsw_mouse_event();
++static int textsw_edit_function_key_event();
++static int textsw_caret_motion_event();
++static int textsw_field_event();
++static int textsw_file_operation();
++static int textsw_erase_action();
++
+
+ Pkg_private int
+ textsw_process_event(view_public, ie, arg)
+@@ -200,15 +209,6 @@
+ Notify_arg arg;
+ {
+ Pkg_private void textsw_update_scrollbars();
+- static int textsw_scroll_event();
+- static int textsw_function_key_event();
+- static int textsw_mouse_event();
+- static int textsw_edit_function_key_event();
+- static int textsw_caret_motion_event();
+- static int textsw_field_event();
+- static int textsw_file_operation();
+- static int textsw_erase_action();
+-
+ int caret_was_up;
+ int result = TEXTSW_PE_USED;
+ register Textsw_view_handle view = VIEW_PRIVATE(view_public);
+@@ -592,7 +592,7 @@
+ #ifdef OW_I18N
+ Pkg_private int
+ #else
+-static int
++int
+ #endif
+ textsw_do_newline(view, action)
+ register Textsw_view_handle view;
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_menu.c xview/files/patch-lib+libxview+textsw+txt_menu.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_menu.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+textsw+txt_menu.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,20 @@
+--- lib/libxview/textsw/txt_menu.c.orig Sun Mar 26 01:01:17 2006
++++ lib/libxview/textsw/txt_menu.c Sun Mar 26 01:02:52 2006
+@@ -129,6 +129,8 @@
+
+
+ /* VARARGS0 */
++static int textsw_edit_do_menu_action(), textsw_view_do_menu_action(),
++ textsw_find_do_menu_action();
+ static void
+ textsw_new_menu(folio)
+ Textsw_folio folio;
+@@ -140,8 +142,6 @@
+ Frame frame = xv_get(textsw, WIN_FRAME);
+ Menu_item break_mode_item, undo_cmds_item, find_sel_cmds_item,
+ select_field_cmds_item;
+- static int textsw_edit_do_menu_action(), textsw_view_do_menu_action(),
+- textsw_find_do_menu_action();
+ int index;
+ Pkg_private char *textsw_get_extras_filename();
+ Pkg_private int textsw_build_extras_menu_items();
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_once.c xview/files/patch-lib+libxview+textsw+txt_once.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_once.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_once.c Sun Mar 26 19:26:54 2006
@@ -1,5 +1,5 @@
---- lib/libxview/textsw/txt_once.c.orig Sun Oct 5 12:27:25 2003
-+++ lib/libxview/textsw/txt_once.c Sun Oct 5 13:37:04 2003
+--- lib/libxview/textsw/txt_once.c.orig Tue Jun 29 00:17:48 1993
++++ lib/libxview/textsw/txt_once.c Sun Mar 26 01:07:58 2006
@@ -44,7 +44,9 @@
#ifdef OW_I18N
#include <xview_private/draw_impl.h>
@@ -23,7 +23,7 @@
xv_destroy(view->drop_site);
textsw_view_cleanup(view);
-+ VIEW_PRIVATE(view_public) = NULL; /* WG Mar '95 */
++ ((Xv_textsw_view*)view_public)->private_data = NULL; /* WG Mar '95 */
break;
default: /* Conservative in face of new cases. */
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_putkey.c xview/files/patch-lib+libxview+textsw+txt_putkey.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_putkey.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_putkey.c Sun Mar 26 19:26:54 2006
@@ -1,11 +1,11 @@
---- ./lib/libxview/textsw/txt_putkey.c.orig Tue Jun 29 07:17:41 1993
-+++ ./lib/libxview/textsw/txt_putkey.c Sat Apr 1 18:25:29 2000
-@@ -21,6 +21,8 @@ static char sccsid[] = "@(#)txt_putk
+--- lib/libxview/textsw/txt_putkey.c.orig Tue Jun 29 00:17:41 1993
++++ lib/libxview/textsw/txt_putkey.c Sun Mar 26 17:03:38 2006
+@@ -19,7 +19,7 @@
+ #include <xview_private/ev_impl.h>
+ #include <errno.h>
- extern int errno;
+-extern int errno;
++static int textsw_do_put(Textsw_view_handle view, int local_operands);
-+static int textsw_do_put();
-+
Pkg_private Ev_finger_handle ev_add_finger();
Pkg_private int ev_get_selection();
- Pkg_private Es_handle textsw_esh_for_span();
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_search.c xview/files/patch-lib+libxview+textsw+txt_search.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_search.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+textsw+txt_search.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,11 @@
+--- lib/libxview/textsw/txt_search.c.orig Sun Mar 26 01:12:40 2006
++++ lib/libxview/textsw/txt_search.c Sun Mar 26 01:13:17 2006
+@@ -79,7 +79,7 @@
+ if (direction == EV_FIND_DEFAULT)
+ first = last_plus_one;
+
+- STRNCPY(buf, (CHAR *) panel_get(search_panel_items[(int) FIND_STRING_ITEM],
++ (STRNCPY) (buf, (CHAR *) panel_get(search_panel_items[(int) FIND_STRING_ITEM],
+ #ifdef OW_I18N
+ PANEL_VALUE_WCS, NULL),
+ #else
diff -ruN xview.orig/files/patch-lib+libxview+textsw+txt_selsvc.c xview/files/patch-lib+libxview+textsw+txt_selsvc.c
--- xview.orig/files/patch-lib+libxview+textsw+txt_selsvc.c Sun Mar 26 19:26:38 2006
+++ xview/files/patch-lib+libxview+textsw+txt_selsvc.c Sun Mar 26 19:26:54 2006
@@ -1,11 +1,11 @@
---- ./lib/libxview/textsw/txt_selsvc.c.orig Sun Jun 26 03:05:23 1994
-+++ ./lib/libxview/textsw/txt_selsvc.c Sat Apr 1 18:25:29 2000
-@@ -24,6 +24,8 @@ static char sccsid[] = "@(#)txt_sels
+--- lib/libxview/textsw/txt_selsvc.c.orig Sat Jun 25 20:05:23 1994
++++ lib/libxview/textsw/txt_selsvc.c Sun Mar 26 17:01:09 2006
+@@ -24,7 +24,7 @@
#include <stdlib.h>
#endif /* SVR4 */
+-extern int errno;
+static int textsw_should_ask_seln_svc();
-+
- extern int errno;
Pkg_private Es_status es_copy();
+ static Seln_result textsw_seln_yield();
diff -ruN xview.orig/files/patch-lib+libxview+ttysw+tty_newtxt.c xview/files/patch-lib+libxview+ttysw+tty_newtxt.c
--- xview.orig/files/patch-lib+libxview+ttysw+tty_newtxt.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+ttysw+tty_newtxt.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/ttysw/tty_newtxt.c.orig Sun Mar 26 00:27:19 2006
++++ lib/libxview/ttysw/tty_newtxt.c Sun Mar 26 00:27:49 2006
+@@ -34,6 +34,7 @@
+ */
+
+
++#include <X11/Xlibint.h>
+ #include <xview/window.h>
+ #include <xview_private/pw_impl.h>
+ #include <pixrect/pixrect.h>
diff -ruN xview.orig/files/patch-lib+libxview+win+win_cntral.c xview/files/patch-lib+libxview+win+win_cntral.c
--- xview.orig/files/patch-lib+libxview+win+win_cntral.c Wed Dec 31 19:00:00 1969
+++ xview/files/patch-lib+libxview+win+win_cntral.c Sun Mar 26 19:26:54 2006
@@ -0,0 +1,10 @@
+--- lib/libxview/win/win_cntral.c.orig 2006-01-04 10:38:51.000000000 +0000
++++ lib/libxview/win/win_cntral.c
+@@ -25,7 +25,6 @@ static char sccsid[] = "@(#)win_cntr
+
+ static Notify_error win_send();
+
+-extern int errno;
+ extern Event xv_last_event;
+
+ void notify_perror();
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list