home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17419 < prev    next >
Encoding:
Text File  |  1992-11-20  |  7.7 KB  |  289 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!eff!world!jrs
  3. From: jrs@world.std.com (Rick Sladkey)
  4. Subject: working patch for olvwm-3.2 (was: xview and olwm)
  5. In-Reply-To: lee@Hawaii.Edu's message of Fri, 20 Nov 1992 10:02:08 GMT
  6. Message-ID: <JRS.92Nov21004232@lepton.world.std.com>
  7. Sender: jrs@world.std.com (Rick Sladkey)
  8. Organization: The Internet
  9. References: <92Nov14.150858ast.60@ug.cs.dal.ca>
  10.     <1992Nov20.100208.19569@news.Hawaii.Edu>
  11. Date: Sat, 21 Nov 1992 05:42:32 GMT
  12. Lines: 275
  13.  
  14. >>>>> On Fri, 20 Nov 1992 10:02:08 GMT, lee@Hawaii.Edu (Greg Lee) said:
  15.  
  16. Greg> If someone gets the DIRMENU and WINMENU functions working for olvwm
  17. Greg> v. 3.2, I hope they let us know how.  I've tried, but so far no go.
  18.  
  19. OK.  Here is a patch that makes everything work.  To use it you must
  20. have something like:
  21.  
  22. $ export IMAKECPP=/usr/bin/imakecpp
  23. $ cat /usr/bin/imakecpp
  24. #! /bin/sh
  25. exec /lib/cpp -imake "$@"
  26.  
  27. Also, you must have Kenneth Osterberg's xview3 installed in order to
  28. get the olgx header files and library.
  29. -----
  30. diff -rc orig/olvwm-3.2/Imakefile olvwm-3.2/Imakefile
  31. *** orig/olvwm-3.2/Imakefile    Fri Nov 20 23:33:22 1992
  32. --- olvwm-3.2/Imakefile    Sat Nov 21 00:36:17 1992
  33. ***************
  34. *** 16,30 ****
  35.   
  36.   /**/# No more changes needed
  37.   
  38. ! #include <XView.tmpl>
  39.   
  40.   /**/#########################################################################
  41.   /**/# @(#)Imakefile    1.5 10/4/91 SMI
  42.   /**/# Imakefile for olwm release 3.0.
  43.   
  44. ! DEFINES =  -DOW_I18N_L3 -DSUNDAE -DSHAPE
  45. ! INCLUDES = -I$(HEADER_DEST) -I$(TOP)
  46. ! SYS_LIBRARIES = -ll
  47.   DEPLIBS = 
  48.   LOCAL_LIBRARIES = $(OLGXLIB) $(XLIB)
  49.   
  50. --- 16,31 ----
  51.   
  52.   /**/# No more changes needed
  53.   
  54. ! /* #include <XView.tmpl> */
  55. ! OLGXLIB = -L/usr/openwin/lib -lolgx
  56.   
  57.   /**/#########################################################################
  58.   /**/# @(#)Imakefile    1.5 10/4/91 SMI
  59.   /**/# Imakefile for olwm release 3.0.
  60.   
  61. ! DEFINES = -DMAXPID=65535 -DMAXNAMLEN=NAME_MAX -DSYSV -DSHAPE
  62. ! INCLUDES = -I$(HEADER_DEST) -I$(TOP) -I/usr/openwin/include
  63. ! SYS_LIBRARIES =
  64.   DEPLIBS = 
  65.   LOCAL_LIBRARIES = $(OLGXLIB) $(XLIB)
  66.   
  67. ***************
  68. *** 59,71 ****
  69.   OBJS =     \
  70.         Debug.o Error.o Notice.o Select.o WinInfo.o atom.o \
  71.             client.o cmdstream.o cursors.o defaults.o environ.o evbind.o \
  72. !           events.o gettext.o group.o helpsend.o images.o kbdfuncs.o \ 
  73.             list.o mem.o menu.o moveresize.o ol_button.o olwm.o olvwmrc.o \
  74. !       properties.o resources.o screen.o services.o slave.o slots.o \ 
  75.             st.o states.o usermenu.o usleep.o virtual.o win.o \
  76. !       winbusy.o winbutton.o wincolor.o winframe.o wingframe.o \ 
  77. !           winicon.o winipane.o winmenu.o winnofoc.o \ 
  78. !           winpane.o winpinmenu.o winpush.o winresize.o \ 
  79.             winroot.o ${VERSION}
  80.   
  81.   
  82. --- 60,72 ----
  83.   OBJS =     \
  84.         Debug.o Error.o Notice.o Select.o WinInfo.o atom.o \
  85.             client.o cmdstream.o cursors.o defaults.o environ.o evbind.o \
  86. !           events.o gettext.o group.o helpsend.o images.o kbdfuncs.o \
  87.             list.o mem.o menu.o moveresize.o ol_button.o olwm.o olvwmrc.o \
  88. !       properties.o resources.o screen.o services.o slave.o slots.o \
  89.             st.o states.o usermenu.o usleep.o virtual.o win.o \
  90. !       winbusy.o winbutton.o wincolor.o winframe.o wingframe.o \
  91. !           winicon.o winipane.o winmenu.o winnofoc.o \
  92. !           winpane.o winpinmenu.o winpush.o winresize.o \
  93.             winroot.o ${VERSION}
  94.   
  95.   
  96. ***************
  97. *** 80,101 ****
  98.   #endif
  99.   
  100.   parse.c: parse.l
  101. !     lex -t parse.l > parse.c
  102.   
  103.   olvwmrc.c: olvwmrc.y
  104. !     yacc olvwmrc.y
  105.       mv y.tab.c olvwmrc.c
  106.   
  107.   olvwmrc.o: parse.c olvwmrc.c
  108.   
  109. ! version.c:: ${SRCS} ${HEADERS}
  110.       @/bin/sh -c 'echo -n "#ident \"@(#)olvwm version compiled "' > version.c
  111.       @/bin/sh -c 'echo `date` \"' >> version.c
  112.   
  113. ! clean::
  114.       /bin/rm -f parse.c olvwmrc.c version.c
  115.   
  116. ! install.man:: $(MANPAGES)
  117.       @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  118.       else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  119.       @for i in $(MANPAGES) ;\
  120. --- 81,105 ----
  121.   #endif
  122.   
  123.   parse.c: parse.l
  124. !     flex -t parse.l > parse.c
  125.   
  126.   olvwmrc.c: olvwmrc.y
  127. !     bison -y olvwmrc.y
  128.       mv y.tab.c olvwmrc.c
  129.   
  130.   olvwmrc.o: parse.c olvwmrc.c
  131.   
  132. ! version.c: ${SRCS} ${HEADERS}
  133.       @/bin/sh -c 'echo -n "#ident \"@(#)olvwm version compiled "' > version.c
  134.       @/bin/sh -c 'echo `date` \"' >> version.c
  135.   
  136. ! usleep.o: usleep.c
  137. !     $(CC) -c usleep.c -o usleep.o
  138. !     
  139. ! clean:
  140.       /bin/rm -f parse.c olvwmrc.c version.c
  141.   
  142. ! install.man: $(MANPAGES)
  143.       @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  144.       else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  145.       @for i in $(MANPAGES) ;\
  146. ***************
  147. *** 104,107 ****
  148.       $(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \
  149.       done
  150.   
  151. ! #include <XView.prog>
  152. --- 108,111 ----
  153.       $(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \
  154.       done
  155.   
  156. ! /* #include <XView.prog> */
  157. Only in olvwm-3.2: make.out
  158. diff -rc orig/olvwm-3.2/mem.c olvwm-3.2/mem.c
  159. *** orig/olvwm-3.2/mem.c    Fri Jan  3 18:50:58 1992
  160. --- olvwm-3.2/mem.c    Thu Oct  8 21:47:55 1992
  161. ***************
  162. *** 16,21 ****
  163. --- 16,25 ----
  164.   #include <stdio.h>
  165.   #include <sys/types.h>
  166.   
  167. + #ifdef __STDC__
  168. + #include <stdlib.h>
  169. + #endif
  170.   #include "i18n.h"
  171.   
  172.   #ifdef MEMDEBUG
  173. diff -rc orig/olvwm-3.2/parse.l olvwm-3.2/parse.l
  174. *** orig/olvwm-3.2/parse.l    Fri Nov 20 23:33:27 1992
  175. --- olvwm-3.2/parse.l    Thu Oct  8 21:49:08 1992
  176. ***************
  177. *** 47,52 ****
  178. --- 47,56 ----
  179.   \}    { return CLOSEBRACE; }
  180.   
  181.   \"[^"]*\"    {
  182. + #ifdef FLEX_SCANNER
  183. + #undef yymore()
  184. + #define yymore() (yy_more_flag = 1)
  185. + #endif
  186.           if (yytext[yyleng - 1] == '\\')
  187.           yymore();
  188.           else {
  189. Only in orig/olvwm-3.2: patch1.out
  190. Only in orig/olvwm-3.2: patch2.out
  191. diff -rc orig/olvwm-3.2/slave.c olvwm-3.2/slave.c
  192. *** orig/olvwm-3.2/slave.c    Fri Nov 20 23:32:27 1992
  193. --- olvwm-3.2/slave.c    Thu Oct  8 21:47:57 1992
  194. ***************
  195. *** 79,88 ****
  196. --- 79,92 ----
  197.       case 0:                /* Slave */
  198.           dup2(input[0],0);
  199.           dup2(output[1],1);
  200. + #ifdef RLIMIT_NOFILE
  201.           if (getrlimit(RLIMIT_NOFILE,&rlimit) == -1)
  202. + #endif
  203.               maxfd = 0;
  204. + #ifdef RLIMIT_NOFILE
  205.           else
  206.               maxfd = rlimit.rlim_cur;    
  207. + #endif
  208.           for (fd=3; fd<maxfd ; fd++) {
  209.               (void)close(fd);
  210.           }
  211. diff -rc orig/olvwm-3.2/virtual.c olvwm-3.2/virtual.c
  212. *** orig/olvwm-3.2/virtual.c    Fri Nov 20 23:33:30 1992
  213. --- olvwm-3.2/virtual.c    Thu Oct  8 22:36:41 1992
  214. ***************
  215. *** 1895,1900 ****
  216. --- 1895,1954 ----
  217.                   MenuInfoCreate(cache, winInfo, menu, depth);
  218.   }
  219.   
  220. + #ifdef _GNU_SOURCE
  221. + #include <regex.h>
  222. + static struct re_pattern_buffer expbuf;
  223. + static
  224. + rexMatch(string)
  225. +     char *string;
  226. + {
  227. +     return (re_match(&expbuf, string, strlen(string), 0, 0) != -1);
  228. + }
  229. + static
  230. + rexInit(pattern)
  231. +     char *pattern;
  232. + {
  233. + int i, j, n;
  234. + char newPattern[256],tmp[256];
  235. + char *s;
  236. +     n = strlen(pattern);
  237. +     newPattern[0] = '^';
  238. +     for(i = 0, j = 1; i < n; i++) {
  239. +     switch(pattern[i]) {
  240. +         case '?':
  241. +         newPattern[j++] = '.';
  242. +         break;
  243. +         case '*':
  244. +         newPattern[j++] = '.';
  245. +         newPattern[j++] = '*';
  246. +         break;
  247. +         case '.':
  248. +         newPattern[j++] = '\\';
  249. +         newPattern[j++] = '.';
  250. +         break;
  251. +         default:
  252. +         newPattern[j++] = pattern[i];
  253. +     }
  254. +     }
  255. +     newPattern[j++] = '$';
  256. +     if (expbuf.allocated == 0) {
  257. +     expbuf.buffer = MemAlloc(256);
  258. +     expbuf.allocated = 256;
  259. +     }
  260. +     expbuf.translate = 0;
  261. +     s = re_compile_pattern(newPattern, strlen(newPattern), &expbuf);
  262. +     if (s) {
  263. +     sprintf(tmp, "DIRMENU: %s", s);
  264. +     ErrorWarning(s);
  265. +     }
  266. + }
  267. + #else
  268.   #define INIT   register char *sp = instring;
  269.   #define GETC() (*sp++)
  270.   #define PEEKC()     (*sp)
  271. ***************
  272. *** 1992,1994 ****
  273. --- 2046,2050 ----
  274.       newPattern[j++] = '$';
  275.       compile(newPattern, expbuf, &expbuf[256], '\0');
  276.   }
  277. + #endif
  278. --
  279. Rick Sladkey
  280. jrs@world.std.com
  281.