home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9822 < prev    next >
Encoding:
Text File  |  1992-09-03  |  16.1 KB  |  546 lines

  1. Path: sparky!uunet!cs.utexas.edu!rutgers!netnews.upenn.edu!netnews.cc.lehigh.edu!ns1.cc.lehigh.edu!dlj0
  2. From: dlj0@ns1.cc.lehigh.edu (DAVID L. JOHNSON)
  3. Newsgroups: comp.os.linux
  4. Subject: Patch for aXe-3.0.1
  5. Message-ID: <1992Sep4.042833.259149@ns1.cc.lehigh.edu>
  6. Date: 4 Sep 92 04:28:33 GMT
  7. Organization: Lehigh University
  8. Lines: 536
  9.  
  10. After several attempts, and with much help, I got aXe up and running, but had
  11. to sweep up core dumps all the time.  A shame, 'cause it's a nice, quick, 
  12. easy editor.  
  13.  
  14. I took my problem to the source, who provided a fix:  I don't understand why
  15. it works, but the core dumps are gone, and it seems stable!  Here it is, in his
  16. own words:
  17.  
  18. Subject: Re: aXe-3.0.1
  19. Reply-To: J.K.Wight@newcastle.ac.uk
  20.  
  21. > If you can come up with a fix for linux, I'd love to hear about it.
  22.  
  23. This is just an empirical shot in the dark, but it might be worth a try.
  24.  
  25. In Destroy in FileNom.c try moving the line
  26.  
  27.     XtDestroyWidget(Child(fnw,filename));
  28.  
  29. to the top of the list of similar calls.
  30.  
  31. Aside from this rather mystical fix, you will need to find scandir.c and
  32. alphasort.c.  Here are the versions I used:
  33.  
  34. -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<
  35.  
  36. scandir.c:
  37.  
  38. /*
  39. **  SCANDIR
  40. **  Scan a directory, collecting all (selected) items into a an array.
  41. */
  42. #ifndef MAXHOSTNAMELEN
  43. #define MAXHOSTNAMELEN 64
  44. #endif
  45. #include <sys/types.h>
  46. #include <dirent.h>
  47.  
  48.  
  49. /* Initial guess at directory size. */
  50. #define INITIAL_SIZE    20
  51.  
  52. extern char             *malloc();
  53. extern char             *realloc();
  54. extern char             *strcpy();
  55.  
  56. int
  57. scandir(name, list, selector, sorter)
  58.     char                  *name;
  59.     struct dirent               ***list;
  60.     int                  (*selector)();
  61.     int                  (*sorter)();
  62. {
  63.     register struct dirent        **names;
  64.     register struct dirent        *entp;
  65.     register DIR          *dirp;
  66.     register int           i;
  67.     register int           size;
  68.  
  69.     /* Get initial list space and open directory. */
  70.     size = INITIAL_SIZE;
  71.     names = (struct dirent **)malloc(size * sizeof names[0]);
  72.     if (names == NULL)
  73.         return -1;
  74.     dirp = opendir(name);
  75.     if (dirp == NULL)
  76.         return -1;
  77.  
  78.     /* Read entries in the directory. */
  79.     for (i = 0; entp = readdir(dirp); )
  80.         if (selector == NULL || (*selector)(entp)) {
  81.             /* User wants them all, or he wants this one. */
  82.             if (++i >= size) {
  83.                 size <<= 1;
  84.                 names = (struct dirent **)
  85.                     realloc((char *)names, size * sizeof names[0]);
  86.                 if (names == NULL) {
  87.                     closedir(dirp);
  88.                     return -1;
  89.                 }
  90.             }
  91.  
  92.             /* Copy the entry. */
  93. #ifdef DIRSIZ
  94.             names[i - 1] = (struct dirent *)malloc(DIRSIZ(entp));
  95. #else
  96.             names[i - 1] = (struct dirent *)malloc(sizeof(struct dirent)
  97.                                                 + strlen(entp->d_name)+1);
  98. #endif
  99.             if (names[i - 1] == NULL) {
  100.                 closedir(dirp);
  101.                 return -1;
  102.             }
  103.             names[i - 1]->d_ino = entp->d_ino;
  104.             names[i - 1]->d_reclen = entp->d_reclen;
  105.             (void)strcpy(names[i - 1]->d_name, entp->d_name);
  106.         }
  107.  
  108.     /* Close things off. */
  109.     names[i] = NULL;
  110.     *list = names;
  111.     closedir(dirp);
  112.  
  113.     /* Sort? */
  114.     if (i && sorter)
  115.         qsort((char *)names, i, sizeof names[0], sorter);
  116.  
  117.     return i;
  118. }
  119. -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<
  120.  
  121. alphasort.c
  122.  
  123. /*
  124. **  ALPHASORT
  125. **  Trivial sorting predicate for scandir; puts entries in alphabetical order.
  126. */
  127.  
  128. #include <sys/types.h>
  129. #include <dirent.h>
  130.  
  131. int
  132. alphasort(d1, d2)
  133.     struct diret **d1;
  134.     struct dirent **d2;
  135. {
  136.     return strcmp(d1[0]->d_name, d2[0]->d_name);
  137. }
  138.  
  139. -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<
  140.  
  141.  
  142. You might also get some help from my Makefile:
  143.  
  144.  
  145. # Makefile generated by imake - do not edit!
  146. # $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
  147.  
  148. # -------------------------------------------------------------------------
  149. # Makefile generated from "Imake.tmpl" and <Imakefile>
  150. # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  151. #
  152. # Platform-specific parameters may be set in the appropriate <vendor>.cf
  153. # configuration files.  Site-specific parametes should be set in the file
  154. # site.def.  Full rebuilds are recommended if any parameters are changed.
  155. #
  156. # If your C preprocessor does not define any unique symbols, you will need
  157. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  158. # "make World" the first time).
  159. #
  160.  
  161. # -------------------------------------------------------------------------
  162. # site-specific configuration parameters that need to come before
  163. # the platform-specific parameters - edit site.def to change
  164.  
  165. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  166.  
  167. # -------------------------------------------------------------------------
  168. # platform-specific configuration parameters - edit linux.cf to change
  169.  
  170. # platform:  $XConsortium: linux.cf,v 1.16 91/08/26 11:23:34 rws Exp $
  171.  
  172. # operating system:             Linux
  173.  
  174. # -------------------------------------------------------------------------
  175. # site-specific configuration parameters that go after
  176. # the platform-specific parameters - edit site.def to change
  177.  
  178. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  179.  
  180.             SHELL =     /bin/sh
  181.  
  182.               TOP = .
  183.       CURRENT_DIR = .
  184.  
  185.                AR = ar clq
  186.   BOOTSTRAPCFLAGS =
  187.                CC =                   gcc -m486 -DUSG -Dcfree=free
  188.                AS = as
  189.  
  190.                FC = f77
  191.       FDEBUGFLAGS =
  192.           FCFLAGS =  $(FDEBUGFLAGS)
  193.  
  194.          COMPRESS = compress
  195.               CPP =                  /lib/cpp $(STD_CPP_DEFINES)
  196.     PREPROCESSCMD =                   gcc -m486 -DUSG -Dcfree=free -E $(STD_CPP_DEFINES)
  197.           INSTALL =     install
  198.                LD = ld
  199.              LINT = lint
  200.       LINTLIBFLAG =     0
  201.          LINTOPTS = -axz
  202.                LN = ln -s
  203.              MAKE = make
  204.                MV = mv
  205.                CP = cp
  206.  
  207.            RANLIB = ranlib
  208.   RANLIBINSTFLAGS =
  209.  
  210.                RM = rm -f
  211.             TROFF = psroff
  212.          MSMACROS = -ms
  213.               TBL = tbl
  214.               EQN = eqn
  215.      STD_INCLUDES = </usr/include/stdlib.h>
  216.   STD_CPP_DEFINES =
  217.       STD_DEFINES =
  218.  EXTRA_LOAD_FLAGS =
  219.   EXTRA_LIBRARIES =
  220.              TAGS = ctags
  221.  
  222.     PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO
  223.  
  224.      INSTPGMFLAGS = -s
  225.  
  226.      INSTBINFLAGS = -m 0755
  227.      INSTUIDFLAGS = -m 4755
  228.      INSTLIBFLAGS = -m 0644
  229.      INSTINCFLAGS = -m 0444
  230.      INSTMANFLAGS = -m 0444
  231.      INSTDATFLAGS = -m 0444
  232.     INSTKMEMFLAGS = -m 4755
  233.  
  234.  
  235.       CDEBUGFLAGS =
  236.         CCOPTIONS =
  237.  
  238.       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  239.        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  240.            CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  241.         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  242.  
  243.            LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  244.  
  245.         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS)
  246.  
  247.    LDCOMBINEFLAGS = -X -r
  248.       DEPENDFLAGS =
  249.  
  250.         MACROFILE = linux.cf
  251.            RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  252.  
  253.     IMAKE_DEFINES =
  254.     IMAKE_DEFINES =
  255.  
  256.          IRULESRC = $(CONFIGDIR)
  257.         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  258.  
  259.      ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules             $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def             $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  260.  
  261. # -------------------------------------------------------------------------
  262. # X Window System Build Parameters
  263. # $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $
  264.  
  265. # -------------------------------------------------------------------------
  266. # X Window System make variables; this need to be coordinated with rules
  267.  
  268.           PATHSEP = /
  269.         USRLIBDIR = /usr/lib
  270.            BINDIR = /usr/bin/X11
  271.           INCROOT = /usr/include
  272.      BUILDINCROOT = $(TOP)
  273.       BUILDINCDIR = $(BUILDINCROO)/X11
  274.       BUILDINCTOP = ..
  275.            INCDIR = $(INCROOT)/X11
  276.            ADMDIR = /usr/adm
  277.            LIBDIR = $(USRLIBDIR)/X11
  278.         CONFIGDIR = $(LIBDIR)/config
  279.        LINTLIBDIR = $(USRLIBDIR)/lint
  280.  
  281.           FONTDIR = $(LIBDIR)/fonts
  282.          XINITDIR = $(LIBDIR)/xinit
  283.            XDMDIR = $(LIBDIR)/xdm
  284.            TWMDIR = $(LIBDIR)/twm
  285.           MANPATH = /usr/man
  286.     MANSOURCEPATH = $(MANPATH)/man
  287.         MANSUFFIX = n
  288.      LIBMANSUFFIX = 3
  289.            MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  290.         LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  291.            NLSDIR = $(LIBDIR)/nls
  292.         PEXAPIDIR = $(LIBDIR)/PEX
  293.       XAPPLOADDIR = $(LIBDIR)/app-defaults
  294.        FONTCFLAGS = -t
  295.  
  296.  
  297.      INSTAPPFLAGS = $(INSTDATFLAGS)
  298.  
  299.             IMAKE = imake
  300.            DEPEND = makedepend
  301.               RGB = rgb
  302.  
  303.             FONTC = bdftopcf
  304.  
  305.         MKFONTDIR = mkfontdir
  306.         MKDIRHIER =     /bin/sh $(BINDIR)/mkdirhier
  307.  
  308.         CONFIGSRC = $(TOP)/config
  309.        DOCUTILSRC = $(TOP)/doc/util
  310.         CLIENTSRC = $(TOP)/clients
  311.           DEMOSRC = $(TOP)/demos
  312.            LIBSRC = $(TOP)/lib
  313.           FONTSRC = $(TOP)/fonts
  314.        INCLUDESRC = $(TOP)/X11
  315.         SERVERSRC = $(OP)/server
  316.           UTILSRC = $(TOP)/util
  317.         SCRIPTSRC = $(UTILSRC)/scripts
  318.        EXAMPLESRC = $(TOP)/examples
  319.        CONTRIBSRC = $(TOP)/../contrib
  320.            DOCSRC = $(TOP)/doc
  321.            RGBSRC = $(TOP)/rgb
  322.         DEPENDSRC = $(UTILSRC)/makedepend
  323.          IMAKESRC = $(CONFIGSRC)
  324.          XAUTHSRC = $(LIBSRC)/Xau
  325.           XLIBSRC = $(LIBSRC)/X
  326.            XMUSRC = $(LIBSRC)/Xmu
  327.        TOOLKITSRC = $(LIBSRC)/Xt
  328.        AWIDGETSRC = $(LIBSRC)/Xaw
  329.        OLDXLIBSRC = $(LIBSRC)/oldX
  330.       XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  331.       BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  332.       BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  333.       BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  334.      MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  335.          FSLIBSRC = $(FONTSRC)/lib/fs
  336.     FONTSERVERSRC = $(FONTSRC)/server
  337.      EXTENSIONSRC = $(TOP)/extensions
  338.          XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  339.       PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  340.  
  341.  
  342.   DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  343.      EXTENSIONLIB =              -lXext
  344.  
  345.           DEPXLIB = $(DEPEXTENSIONLIB) $(USRLIBDIR)/libX11.a
  346.              XLIB = $(EXTENSIONLIB)              -lX11
  347.  
  348.       DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  349.          XAUTHLIB =              -lXau
  350.       DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  351.          XDMCPLIB =              -lXdmcp
  352.  
  353.         DEPXMULIB = $(USRLIBDIR)/libXmu.a
  354.            XMULIB =              -lXmu
  355.  
  356.        DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
  357.           OLDXLIB =              -loldX
  358.  
  359.       DEPXTOOLLIB = $(USRLIBDIR)/libXt.a
  360.          XTOOLLIB =              -lXt
  361.  
  362.         DEPXAWLIB = $(USRLIBDIR)/libXaw.a
  363.            XAWLIB =              -lXaw
  364.  
  365.         DEPXILIB = $(USRLIBDIR)/libXi.a
  366.            XILIB =              -lXi
  367.  
  368.         DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  369.            PHIGSLIB =              -lphigs
  370.  
  371.        DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  372.           XBSDLIB =              -lXbsd
  373.  
  374.  LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  375.          LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  376.           LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  377.         LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  378.           LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  379.            LINTXI = $(LINTLIBDIR)/llib-lXi.n
  380.         LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  381.  
  382.           DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  383.  
  384.          DEPLIBS1 = $(DEPLIBS)
  385.          DEPLIBS2 = $(DEPLIBS)
  386.          DEPLIBS3 = $(DEPLIBS)
  387.  
  388. # -------------------------------------------------------------------------
  389. # Imake rules for building libraries, programs, scripts, and data files
  390. # rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  391.  
  392. # ------------------------------------------------------------------------
  393. # start of Imakefile
  394.  
  395. Bindir = /usr/local/bin
  396.  
  397. Appdir = /usr/lib/X11/app-defaults
  398.  
  399. Mandir = /usr/man/man1
  400.  
  401. Helpdir = /usr/lib/X11
  402.  
  403. R5ONLY_SRCS = Viewlist.c
  404. R5ONLY_OBJS = Viewlist.o
  405.  
  406. TABLE_SRCS = Table.c TableVec.c TableLoc.c
  407. TABLE_OBJS = Table.o TableVec.o TableLoc.o
  408.  
  409.  
  410. SRCS = ${TABLE_SRCS}        AxeWindow.c AxeEditor.c AxeMenuBtn.c AxeSimMenu.c        AxeSmeBSB.c AxeCommand.c AxeTextDeck.c AxeText.c        AxeiiText.c        FileNomWin.c FileNom.c alphasort.c scandir.c ${R5ONLY_SRCS} ${R4ONLY_SRCS} ScrollText.c        NumericPad.c CtrlCodeSel.c Preference.c Confirmer.c        insertfile.c match.c axe.c
  411.  
  412. OBJS = ${TABLE_OBJS}        AxeWindow.o AxeEditor.o AxeMenuBtn.o AxeSimMenu.o        AxeSmeBSB.o AxeTextDeck.o AxeCommand.o AxeText.o        AxeiiText.o        FileNomWin.o FileNom.o alphasort.o scandir.o ${R5ONLY_OBJS} ${R4ONLY_OBJS} ScrollText.o        NumericPad.o CtrlCodeSel.o Preference.o Confirmer.o        insertfile.o match.o axe.o
  413.  
  414.  EXTRA_INCLUDES = -I.
  415. LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  416.  
  417.         DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  418.  
  419.  PROGRAM = axe
  420.  
  421. all::
  422.     @echo Making in .
  423.  
  424. all:: axe
  425.  
  426. axe: $(OBJS) $(DEPLIBS)
  427.     $(RM) $@
  428.     $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  429.  
  430. \
  431. install::
  432.     @if [ -d $(DESTDIR)${Bindir} ]; then set +x; \
  433.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Bindir}); fi
  434.     @if [ -d $(DESTDIR)${Appdir} ]; then set +x; \
  435.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Appdir}); fi
  436.     @if [ -d $(DESTDIR)${Mandir} ]; then set +x; \
  437.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Mandir}); fi
  438.     @if [ -d $(DESTDIR)${Helpdir} ]; then set +x; \
  439.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Helpdir}); fi
  440.  
  441. install:: axe
  442.     @if [ -d $(DESTDIR)${Bindir} ]; then set +x; \
  443.     else (set -x; $(MKDIRHIR) $(DESTDIR)${Bindir}); fi
  444.     $(INSTALL) -c $(INSTPGMFLAGS)  axe $(DESTDIR)${Bindir}
  445.  
  446. install.man:: axe.man
  447.     @if [ -d $(DESTDIR)${Mandir} ]; then set +x; \
  448.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Mandir}); fi
  449.     $(INSTALL) -c $(INSTMANFLAGS) axe.man $(DESTDIR)${Mandir}/axe.$(MANSUFFIX)
  450.  
  451. depend::
  452.     $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  453.  
  454. lint:
  455.     $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  456. lint1:
  457.     $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  458.  
  459. clean::
  460.     $(RM) $(PROGRAM)
  461.  
  462. install:: Axe.ad
  463.     @if [ -d $(DESTDIR)${Appdir} ]; then set +x; \
  464.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Appdir}); fi
  465.     $(INSTALL) -c $(INSTAPPFLAGS) Axe.ad $(DESTDIR)${Appdir}/Axe
  466.  
  467. install:: axe.help.gnrl axe.help.bind axe.help.cust axe.help.pops axe.help.chng
  468.     @if [ -d $(DESTDIR)${Helpdir} ]; then set +x; \
  469.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Helpdir}); fi
  470.     @case '${MFLAGS}' in *[i]*) set +e;; esac; \
  471.     for i in axe.help.gnrl axe.help.bind axe.help.cust axe.help.pops axe.help.chng; do \
  472.     (set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(DESTDIR)${Helpdir}); \
  473.     done
  474.  
  475. AxeEditor.o:
  476.     $(RM) $@
  477.     $(CC) -c $(CFLAGS) -DHELPDIR=\"${Helpdir}\" $*.c
  478.  
  479. all:: coaxe
  480.  
  481. coaxe: coaxe.o
  482.     $(RM) $@
  483.     $(CC) -o $@ coaxe.o $(LDOPTIONS) -lX11 $(LDLIBS)  $(EXTRA_LOAD_FLAGS)
  484.  
  485.  
  486. clean::
  487.     $(RM) coaxe
  488.  
  489. install:: coaxe
  490.     @if [ -d $(DESTDIR)${Bindir} ]; then set +x; \
  491.     else (set -x; $(MKDIRHIER) $(DESTDIR)${Bindir}); fi
  492.     $(INSTALL) -c $(INSTPGMFLAGS)  coaxe $(DESTDIR)${Bindir}
  493. install::
  494.     if [ -f ${Bindir}/faxe ]; then set +x; \
  495.     else (set -x; ln ${Bindir}/coaxe ${Bindir}/faxe); fi
  496.     if [ -f ${Bindir}/poleaxe ]; then set +x; \
  497.     else (set -x; ln ${Bindir}/coaxe ${Bindir}/poleaxe); fi
  498.  
  499. # -------------------------------------------------------------------------
  500. # common rules for all Makefiles - do not edit
  501.  
  502. emptyrule::
  503.  
  504. clean::
  505.     $(RM_CMD) "#"*
  506.  
  507. Makefile::
  508.     -@if [ -f Makefile ]; then set -x; \
  509.     $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  510.     else exit 0; fi
  511.     $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  512.  
  513. tags::
  514.     $(TAGS) -w *.[ch]
  515.     $(TAGS) -xw *.[ch] > TAGS
  516.  
  517. # -------------------------------------------------------------------------
  518. # empty rules for directories that do not have SUBDIRS - do not edit
  519.  
  520. install::
  521.     @echo "install in $(CURRENT_DIR) done"
  522.  
  523. install.man::
  524.     @echo "install.man in $(CURRENT_DIR) done"
  525.  
  526. Makefiles::
  527.  
  528. includes::
  529.  
  530. # -------------------------------------------------------------------------
  531. # dependencies generated by makedepend
  532.  
  533.  
  534.  
  535. Just use the Makefile as a template; it was cut-and-pasted in.  Run xmkmf
  536. and then make any of these changes you feel might be needed.  Obviously
  537. the additions of scandir and alphasort are needed.
  538. -- 
  539. Sincerely,
  540.  
  541. David L. Johnson                    ID:  dlj0@ns1.cc.lehigh.edu
  542. Christmas-Saucon Hall #14, rm 211        
  543. Department of Mathematics
  544.  
  545. Lehigh University                   Telephone: 215-758-3759 (office)
  546.