diff options
author | smace <smace@FreeBSD.org> | 1998-10-20 12:09:23 +0800 |
---|---|---|
committer | smace <smace@FreeBSD.org> | 1998-10-20 12:09:23 +0800 |
commit | 9cce390a323732b72c7249a356e7c1ec8321371b (patch) | |
tree | 2d8467ab246cc33f0aa4cb3278792d7d8b788087 | |
parent | 333116d660a7c8543e183dff1aae38bd987e51cb (diff) | |
download | freebsd-ports-gnome-9cce390a323732b72c7249a356e7c1ec8321371b.tar.gz freebsd-ports-gnome-9cce390a323732b72c7249a356e7c1ec8321371b.tar.zst freebsd-ports-gnome-9cce390a323732b72c7249a356e7c1ec8321371b.zip |
Cleanup of olvwm.
clear depend errors
Use XPM support
clear compiler warnings
properly handle BSDisms
-rw-r--r-- | x11-wm/olvwm/files/patch-aa | 658 |
1 files changed, 258 insertions, 400 deletions
diff --git a/x11-wm/olvwm/files/patch-aa b/x11-wm/olvwm/files/patch-aa index d9759da9930f..b73cca0ec657 100644 --- a/x11-wm/olvwm/files/patch-aa +++ b/x11-wm/olvwm/files/patch-aa @@ -1,400 +1,258 @@ -*** defaults.c.orig Thu Jan 13 14:36:03 1994 ---- defaults.c Thu Oct 20 21:17:55 1994 -*************** -*** 90,96 **** ---- 90,100 ---- - #ifdef SVR4 - if (sysinfo(SI_HOSTNAME, hostname, sizeof(hostname)) != -1) { - #else -+ #ifndef __FreeBSD__ - if (0 == gethostname(hostname, sizeof(hostname), &namelen)) { -+ #else -+ if (0 == gethostname(hostname, sizeof(hostname))) { -+ #endif - #endif - (void) strcat(filename, hostname); - fileDB = XrmGetFileDatabase(filename); -*** error.c.orig Thu Jan 13 14:36:04 1994 ---- error.c Sat Oct 22 16:44:32 1994 -*************** -*** 13,19 **** ---- 13,23 ---- - - #include <stdio.h> - #include <stdlib.h> -+ #ifdef __FreeBSD__ -+ #include <X11/Xlibint.h> -+ #else - #include <X11/Xlib.h> -+ #endif - #include <X11/Xproto.h> - - #include "i18n.h" -*** gettext.h.orig Thu Jan 13 14:40:00 1994 ---- gettext.h Thu Oct 20 22:01:55 1994 -*************** -*** 14,19 **** ---- 14,23 ---- - #ifndef _OLWM_GETTEXT_H - #define _OLWM_GETTEXT_H - -+ #ifndef LC_MESSAGES -+ #define LC_MESSAGES 0 -+ #endif -+ - #define DEFAULT_DOMAIN "default" - #define DEFAULT_BINDING "/usr/lib/locale\n" - #define COOKIE 0xFF -*** gif.c.orig Thu Jan 13 14:36:06 1994 ---- gif.c Thu Oct 20 23:58:42 1994 -*************** -*** 56,61 **** ---- 56,65 ---- - int disposal; - } Gif89 = { -1, -1, -1, 0 }; - -+ static ReadColorMap(); -+ static DoExtension(); -+ static GetDataBlock(); -+ - extern XImage* ReadImage(); - - XImage *ReadGIF(dpy, fd, pNcolors, pColors) -*************** -*** 456,462 **** - return code; - } - -! static XImage* - ReadImage(dpy, fd, len, height, cmap, interlace, ignore) - Display *dpy; - FILE *fd; ---- 460,466 ---- - return code; - } - -! extern XImage* - ReadImage(dpy, fd, len, height, cmap, interlace, ignore) - Display *dpy; - FILE *fd; -*** i18n.h.orig Thu Jan 13 14:40:01 1994 ---- i18n.h Thu Oct 20 22:00:16 1994 -*************** -*** 14,19 **** ---- 14,23 ---- - #ifndef _OLWM_I18N_H - #define _OLWM_I18N_H - -+ #ifndef LC_MESSAGES -+ #define LC_MESSAGES 0 -+ #endif -+ - #include <string.h> - #include <ctype.h> - -*** mem.c.orig Thu Jan 13 14:36:08 1994 ---- mem.c Sat Oct 22 16:46:18 1994 -*************** -*** 18,24 **** ---- 18,28 ---- - - - #include <sys/types.h> -+ #ifndef __FreeBSD__ - #include <malloc.h> -+ #else -+ #include <stdlib.h> -+ #endif - #include <memory.h> - #include <stdio.h> - -*************** -*** 139,145 **** - { - void *p; - -! if ((p = malloc(sz)) == NULL) - ErrorGeneral(gettext("Memory allocation failure.")); - - #ifdef MEMDEBUG ---- 143,149 ---- - { - void *p; - -! if ((p = (int *)malloc(sz)) == NULL) - ErrorGeneral(gettext("Memory allocation failure.")); - - #ifdef MEMDEBUG -*************** -*** 164,170 **** - { - void *p; - -! if ((p = malloc(sz)) == NULL) - ErrorGeneral(GetString("Memory allocation failure.")); - - memset((char *) p, 0, (int) sz); ---- 168,174 ---- - { - void *p; - -! if ((p = (int *)malloc(sz)) == NULL) - ErrorGeneral(GetString("Memory allocation failure.")); - - memset((char *) p, 0, (int) sz); -*************** -*** 191,197 **** - { - void *p; - -! if ((p = calloc(num, sz)) == NULL) - ErrorGeneral(GetString("Memory array allocation failure.")); - - memset((char *) p, 0, (int) sz * (int) num); ---- 195,201 ---- - { - void *p; - -! if ((p = (int *)calloc(num, sz)) == NULL) - ErrorGeneral(GetString("Memory array allocation failure.")); - - memset((char *) p, 0, (int) sz * (int) num); -*************** -*** 210,216 **** - { - void *t; - -! if ((t = realloc(p, sz)) == NULL) - ErrorGeneral(GetString("Memory array allocation failure.")); - - #ifdef MEMDEBUG ---- 214,220 ---- - { - void *t; - -! if ((t = (int *)realloc(p, sz)) == NULL) - ErrorGeneral(GetString("Memory array allocation failure.")); - - #ifdef MEMDEBUG -*** olvwmrc.y.orig Thu Jan 13 14:46:53 1994 ---- olvwmrc.y Thu Oct 20 23:48:29 1994 -*************** -*** 526,532 **** ---- 526,534 ---- - } - %% - /* Programs */ -+ #ifndef YYDEBUG - #define YYDEBUG 1 -+ #endif - #include "parse.c" - - extern List *ActiveClientList; -*************** -*** 577,583 **** - return(True); - } - -! static char * - strexpand(s) - char *s; - { ---- 579,585 ---- - return(True); - } - -! extern char * - strexpand(s) - char *s; - { -*** olwm.c.orig Thu Jan 13 14:36:12 1994 ---- olwm.c Thu Oct 20 23:49:57 1994 -*************** -*** 56,61 **** ---- 56,64 ---- - - typedef void (*VoidFunc)(); - -+ #ifdef __FreeBSD__ -+ #define MAXPID 30000 -+ #endif - - /* - * Globals -*************** -*** 679,685 **** ---- 682,692 ---- - #else - int oldmask; - int pid; -+ #ifndef __FreeBSD__ - union wait status; -+ #else -+ int status; -+ #endif - #endif - - if (!deadChildren) -*** screen.c.orig Fri Oct 21 23:45:51 1994 ---- screen.c Fri Oct 21 00:01:13 1994 -*************** -*** 66,71 **** ---- 66,78 ---- - *-------------------------------------------------------------------------*/ - List *ScreenInfoList; /* List of managed screens */ - extern Bool BoolString(); -+ static updateScreenWorkspaceColor(); -+ static updateScreenWindowColor(); -+ static updateScreenForegroundColor(); -+ static updateScreenBackgroundColor(); -+ static updateScreenBorderColor(); -+ static updateScreenInputFocusColor(); -+ static updateScreenGlyphFont(); - - /*------------------------------------------------------------------------- - * Local Data -*************** -*** 281,286 **** ---- 281,287 ---- - case StaticColor: - case PseudoColor: - case GrayScale: -+ case TrueColor: - case DirectColor: - return True; - /*NOTREACHED*/ -*** st.c.orig Thu Jan 13 14:36:18 1994 ---- st.c Thu Oct 20 23:53:07 1994 -*************** -*** 208,214 **** - } - } - -! static rehash(table) - register st_table *table; - { - register st_table_entry *ptr, *next, **old_bins = table->bins; ---- 208,214 ---- - } - } - -! extern rehash(table) - register st_table *table; - { - register st_table_entry *ptr, *next, **old_bins = table->bins; -*** virtual.c.orig Thu Jan 13 14:36:22 1994 ---- virtual.c Thu Oct 20 23:55:54 1994 -*************** -*** 48,53 **** ---- 48,56 ---- - #ident "@(#)virtual.c 1.6 olvwm version 07 Jan 1994" - #endif - -+ static rexMatch(); -+ static rexInit(); -+ - /* Class Function Vector; a virtual pane is the VDM window in which all - * the little virtual windows appear (and to which said windows are - * parented) -*************** -*** 2108,2114 **** ---- 2111,2119 ---- - } - } - -+ #ifndef __FreeBSD__ - static char expbuf[256]; -+ #endif - - static - rexMatch(string) -*** winframe.c.orig Thu Jan 13 14:36:25 1994 ---- winframe.c Fri Oct 21 00:02:34 1994 -*************** -*** 52,57 **** ---- 52,59 ---- - - extern Time TimeFresh(); - -+ static headerHeight(); -+ - /*************************************************************************** - * private data - ***************************************************************************/ -*** winicon.c.orig Thu Jan 13 14:36:26 1994 ---- winicon.c Fri Oct 21 00:03:55 1994 -*************** -*** 37,42 **** ---- 37,46 ---- - extern Bool PropGetWMName(); - extern Bool PropGetWMIconName(); - -+ static heightTopIcon(); -+ static heightBottomIcon(); -+ static widthBothIcon(); -+ - /*************************************************************************** - * private data - ***************************************************************************/ -*** Imakefile.orig Fri Aug 14 22:47:36 1998 ---- Imakefile Fri Aug 14 22:54:24 1998 -*************** -*** 48,55 **** - /**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT - - /**/# For a generic Solaris 2.x system, I'd suggest -! MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4 -! - /**/# - /**/# Set MORELDFLAGS to any link options you want. Be sure to add -lxpm if you - /**/# want to include XPM support. For a generic Solaris 1.x ---- 48,55 ---- - /**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT - - /**/# For a generic Solaris 2.x system, I'd suggest -! #MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4 -! MORECCFLAGS= -DOW_I18N_L3 -DSHAPE -DREGEXP - /**/# - /**/# Set MORELDFLAGS to any link options you want. Be sure to add -lxpm if you - /**/# want to include XPM support. For a generic Solaris 1.x -*************** -*** 57,64 **** - /**/#MORELDFLAGS=-L${OPENWINHOME}/lib - /**/# - /**/# For Solaris 2.x, I'd suggest -! MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl -! - - /**/# No more changes needed - ---- 57,64 ---- - /**/#MORELDFLAGS=-L${OPENWINHOME}/lib - /**/# - /**/# For Solaris 2.x, I'd suggest -! #MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl -! MORELDFLAGS=-L${OPENWINHOME}/lib - - /**/# No more changes needed - -*************** -*** 72,77 **** ---- 72,78 ---- - SYS_LIBRARIES = -ll -lm - INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR) - DEPLIBS = -+ EXTENSIONLIB = -lXext - LOCAL_LIBRARIES = $(MORELDFLAGS) $(OLGXLIB) $(XLIB) - - HEADERS = cmdstream.h cursors.h debug.h defaults.h dsdm.h environ.h error.h \ -*************** -*** 142,148 **** ---- 143,151 ---- - @for i in $(MANPAGES) ;\ - do \ - echo "installing $$i"; \ -+ $(RM) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX)* ; \ - $(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \ -+ $(COMPRESSMANCMD) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \ - done - - #include <XView.prog> +--- Imakefile.orig Mon Oct 19 14:21:31 1998 ++++ Imakefile Mon Oct 19 14:20:23 1998 +@@ -48,8 +48,10 @@ + /**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT + + /**/# For a generic Solaris 2.x system, I'd suggest +-MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4 ++/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4 + ++/**/# For FreeBSD ++MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DMAXPID=30000 -DREGEXP -DXPM + /**/# + /**/# Set MORELDFLAGS to any link options you want. Be sure to add -lxpm if you + /**/# want to include XPM support. For a generic Solaris 1.x +@@ -57,8 +59,11 @@ + /**/#MORELDFLAGS=-L${OPENWINHOME}/lib + /**/# + /**/# For Solaris 2.x, I'd suggest +-MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl ++/**/#MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl + ++/**/# For FreeBSD ++MORELDFLAGS=-L$(USRLIBDIR) -lXpm ++XPMINCDIR=-I$(INCROOT)/X11 + + /**/# No more changes needed + +@@ -72,6 +77,7 @@ + SYS_LIBRARIES = -ll -lm + INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR) + DEPLIBS = ++EXTENSIONLIB = -lXext + LOCAL_LIBRARIES = $(MORELDFLAGS) $(OLGXLIB) $(XLIB) + + HEADERS = cmdstream.h cursors.h debug.h defaults.h dsdm.h environ.h error.h \ +@@ -115,26 +121,29 @@ + ${HEADERS} ${BITMAPS} ${SRCS} \ + ${MISC} ${INFOFILES} ${MANPAGES} ${SCRIPTS} + +-ComplexProgramTarget(olvwm) +- +-#if NeedMenuFile +-InstallNonExecList($(MISC),$(LIBRARY_DEST)) +-#endif ++depend:: olvwmrc.c + + parse.c: parse.l +- lex -t parse.l > parse.c ++ $(LEX) $(LFALGS) parse.l ++ $(MV) lex.yy.c parse.c + +-olvwmrc.c: olvwmrc.y +- yacc olvwmrc.y +- mv y.tab.c olvwmrc.c ++olvwmrc.c: parse.c olvwmrc.y ++ $(YACC) olvwmrc.y ++ $(MV) y.tab.c olvwmrc.c + + olvwmrc.o: parse.c olvwmrc.c + ++ComplexProgramTarget(olvwm) ++ ++#if NeedMenuFile ++InstallNonExecList($(MISC),$(LIBRARY_DEST)) ++#endif ++ + version.c: ${SRCS} ${HEADERS} + @echo '#ident "@(#)olvwm version compiled '`date`'"' > version.c + + clean:: +- /bin/rm -f parse.c olvwmrc.c version.c ++ /bin/rm -f parse.c olvwmrc.c version.c .depend + + install.man:: $(MANPAGES) + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ +@@ -142,7 +151,9 @@ + @for i in $(MANPAGES) ;\ + do \ + echo "installing $$i"; \ ++ $(RM) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX)* ; \ + $(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \ ++ $(COMPRESSMANCMD) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \ + done + +-#include <XView.prog> ++depend:: olvwmrc.c +--- defaults.c.orig Thu Jan 13 15:36:03 1994 ++++ defaults.c Mon Oct 19 12:52:39 1998 +@@ -30,9 +30,7 @@ + #include <X11/Xutil.h> + #include <X11/Xatom.h> + #include <X11/Xresource.h> +-#ifdef OW_I18N_L4 + #include <sys/param.h> +-#endif + + #include "i18n.h" + #include "ollocale.h" +@@ -90,7 +88,11 @@ + #ifdef SVR4 + if (sysinfo(SI_HOSTNAME, hostname, sizeof(hostname)) != -1) { + #else ++#ifdef BSD ++ if (0 == gethostname(hostname, sizeof(hostname))) { ++#else + if (0 == gethostname(hostname, sizeof(hostname), &namelen)) { ++#endif + #endif + (void) strcat(filename, hostname); + fileDB = XrmGetFileDatabase(filename); +--- gif.c.orig Thu Jan 13 15:36:06 1994 ++++ gif.c Mon Oct 19 13:46:15 1998 +@@ -56,6 +56,10 @@ + int disposal; + } Gif89 = { -1, -1, -1, 0 }; + ++static ReadColorMap(); ++static DoExtension(); ++static GetDataBlock(); ++ + extern XImage* ReadImage(); + + XImage *ReadGIF(dpy, fd, pNcolors, pColors) +@@ -456,7 +460,7 @@ + return code; + } + +-static XImage* ++extern XImage* + ReadImage(dpy, fd, len, height, cmap, interlace, ignore) + Display *dpy; + FILE *fd; +--- mem.c.orig Thu Jan 13 15:36:08 1994 ++++ mem.c Mon Oct 19 13:47:49 1998 +@@ -18,7 +18,12 @@ + + + #include <sys/types.h> ++#include <sys/param.h> ++#if !(defined(BSD) && (BSD >= 199306)) + #include <malloc.h> ++#else ++#include <stdlib.h> ++#endif + #include <memory.h> + #include <stdio.h> + +--- olvwmrc.y.orig Mon Oct 19 14:21:34 1998 ++++ olvwmrc.y Mon Oct 19 14:04:33 1998 +@@ -37,7 +37,7 @@ + char *LookupToken(); + char *FindOlvwmRC(); + void resetKeys(); +-char *strexpand(); ++static char *strexpand(); + + typedef struct progscreen { + char *target; +@@ -527,7 +527,9 @@ + } + %% + /* Programs */ ++#ifndef YYDEBUG + #define YYDEBUG 1 ++#endif + #include "parse.c" + + extern List *ActiveClientList; +--- olwm.c.orig Thu Jan 13 15:36:12 1994 ++++ olwm.c Mon Oct 19 14:08:54 1998 +@@ -677,9 +677,15 @@ + pid_t pid; + int status; + #else ++#ifdef BSD ++ int oldmask; ++ int pid; ++ int status; ++#else + int oldmask; + int pid; + union wait status; ++#endif + #endif + + if (!deadChildren) +--- screen.c.orig Mon Oct 19 14:21:32 1998 ++++ screen.c Mon Oct 19 14:11:14 1998 +@@ -66,6 +66,13 @@ + *-------------------------------------------------------------------------*/ + List *ScreenInfoList; /* List of managed screens */ + extern Bool BoolString(); ++static updateScreenWorkspaceColor(); ++static updateScreenWindowColor(); ++static updateScreenForegroundColor(); ++static updateScreenBackgroundColor(); ++static updateScreenBorderColor(); ++static updateScreenInputFocusColor(); ++static updateScreenGlyphFont(); + + /*------------------------------------------------------------------------- + * Local Data +--- st.c.orig Thu Jan 13 15:36:18 1994 ++++ st.c Mon Oct 19 14:12:31 1998 +@@ -14,6 +14,7 @@ + #include "st.h" + #include "mem.h" + ++static rehash(); + + #define max(a,b) ((a) > (b) ? (a) : (b)) + #define nil(type) ((type *) 0) +--- virtual.c.orig Thu Jan 13 15:36:22 1994 ++++ virtual.c Mon Oct 19 14:13:27 1998 +@@ -48,6 +48,9 @@ + #ident "@(#)virtual.c 1.6 olvwm version 07 Jan 1994" + #endif + ++static rexMatch(); ++static rexInit(); ++ + /* Class Function Vector; a virtual pane is the VDM window in which all + * the little virtual windows appear (and to which said windows are + * parented) +@@ -2108,7 +2111,9 @@ + } + } + ++#ifndef REGEXP + static char expbuf[256]; ++#endif + + static + rexMatch(string) +--- winframe.c.orig Thu Jan 13 15:36:25 1994 ++++ winframe.c Mon Oct 19 14:14:26 1998 +@@ -52,6 +52,8 @@ + + extern Time TimeFresh(); + ++static headerHeight(); ++ + /*************************************************************************** + * private data + ***************************************************************************/ +--- winicon.c.orig Thu Jan 13 15:36:26 1994 ++++ winicon.c Mon Oct 19 14:15:05 1998 +@@ -37,6 +37,10 @@ + extern Bool PropGetWMName(); + extern Bool PropGetWMIconName(); + ++static heightTopIcon(); ++static heightBottomIcon(); ++static widthBothIcon(); ++ + /*************************************************************************** + * private data + ***************************************************************************/ |