home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3167 < prev    next >
Encoding:
Internet Message Format  |  1991-04-08  |  4.6 KB

  1. From: goer@ellis.uchicago.edu (Richard L. Goerwitz)
  2. Newsgroups: alt.sources
  3. Subject: jargon lookup, part 02 of 02
  4. Message-ID: <1991Apr4.160232.23299@midway.uchicago.edu>
  5. Date: 4 Apr 91 16:02:32 GMT
  6.  
  7.  
  8. ---- Cut Here and feed the following to sh ----
  9. #!/bin/sh
  10. # this is jargon.02 (part 2 of a multipart archive)
  11. # do not concatenate these parts, unpack them in order with /bin/sh
  12. # file README continued
  13. #
  14. if test ! -r _shar_seq_.tmp; then
  15.     echo 'Please unpack part 1 first!'
  16.     exit 1
  17. fi
  18. (read Scheck
  19.  if test "$Scheck" != 2; then
  20.     echo Please unpack part "$Scheck" next!
  21.     exit 1
  22.  else
  23.     exit 0
  24.  fi
  25. ) < _shar_seq_.tmp || exit 1
  26. if test ! -f _shar_wnt_.tmp; then
  27.     echo 'x - still skipping README'
  28. else
  29. echo 'x - continuing file README'
  30. sed 's/^X//' << 'SHAR_EOF' >> 'README' &&
  31. Xdatabase file in a different directory than the current one, then you
  32. Xshould copy the jargon.wrd file to that directory, and then type
  33. X
  34. X    (ficonx) idxtext DATABASE
  35. X
  36. Xwhere DATABASE gives the full path of your jargon.wrd file.  Running
  37. Xthis command may take a minute, so be patient.
  38. X
  39. XNote that I have not tried installing jargon on anything but a Unix
  40. Xsystem, so I have no idea how it will work.  In particular, there
  41. Xmight be difficulties on systems for which newline translation is
  42. Xnecessary.
  43. X
  44. X-------
  45. X
  46. XAdmission:
  47. X
  48. XJargon is really just a cheap trick I use to get people to test a
  49. Xsmall text retrieval package.  This package is fully documented in the
  50. Xfiles
  51. X
  52. X    gettext.icn
  53. X    adjuncts.icn
  54. X    idxtext.icn
  55. X
  56. XIcon programmers will find gettext a nice, easy way to access
  57. Xkey/value combinations from a file (rather than from a hash table in
  58. Xmemory).  Often the practicalities of memory usage lead one to avoid
  59. Xhuge in-core hash tables.  The gettext package provides a small-scale,
  60. Xbut fairly efficient, alternative.
  61. X
  62. X-------
  63. X
  64. XProblems:
  65. X
  66. XThis program works fine on a Xenix/386 box.  Your mileage may vary.
  67. XIf there are problems, I'd like to hear about them.  Send mail to:
  68. X
  69. XRichard Goerwitz (goer@sophist.uchicago.edu)
  70. X
  71. SHAR_EOF
  72. echo 'File README is complete' &&
  73. true || echo 'restore of README failed'
  74. rm -f _shar_wnt_.tmp
  75. fi
  76. # ============= Makefile.dist ==============
  77. if test -f 'Makefile.dist' -a X"$1" != X"-c"; then
  78.     echo 'x - skipping Makefile.dist (File already exists)'
  79.     rm -f _shar_wnt_.tmp
  80. else
  81. > _shar_wnt_.tmp
  82. echo 'x - extracting Makefile.dist (Text)'
  83. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.dist' &&
  84. X# Don't change this unless you're absolutely sure of what you're doing.
  85. XPROGNAME = jargon
  86. X
  87. X# You may need to change these.
  88. XICONC = /usr/icon/v8/bin/icont
  89. XJARGONFILE = ./jargon2.8.2
  90. X
  91. X# Please edit these to reflect your local file structure & conventions.
  92. XDESTDIR = /usr/local/bin
  93. XLIBDIR = /usr/local/lib/$(PROGNAME)
  94. XOWNER = bin
  95. XGROUP = bin
  96. X
  97. X# I hope you won't have to use this.
  98. XDEBUGFLAG = #-t
  99. X
  100. XSHELL = /bin/sh
  101. X# Source files for $(PROGNAME).
  102. XSRC1 = $(PROGNAME).icn gettext.icn adjuncts.icn
  103. X
  104. Xall: jargon.wrd $(PROGNAME)
  105. X    @echo "\nEverything seems OK.  Go ahead & install.\n"
  106. X
  107. Xjargon.wrd: jarg2get idxtext
  108. X    test -f $(JARGONFILE)
  109. X    ./jarg2get < $(JARGONFILE) > jargon.wrd
  110. X    @echo "\nThis may take a few minutes:\n"
  111. X    ./idxtext jargon.wrd
  112. X
  113. X$(PROGNAME): $(SRC1)
  114. X    $(ICONC) $(DEBUGFLAG) -o $@ $?
  115. X
  116. Xidxtext: idxtext.icn adjuncts.icn
  117. X    $(ICONC) $(DEBUGFLAG) -o $@ $?
  118. X
  119. Xjarg2get: jarg2get.icn
  120. X    $(ICONC) $(DEBUGFLAG) -o $@ $?
  121. X
  122. X
  123. X# Set pathnames to their correct values for this system.
  124. X$(PROGNAME).icn:
  125. X    sed "s|/usr/local/lib/$(PROGNAME)/jargon.wrd|$(LIBDIR)/jargon.wrd|g" < jargon.src > jargon.icn
  126. X
  127. X# Pessimistic assumptions regarding the environment (in particular,
  128. X# I don't assume you have the BSD "install" shell script).
  129. Xinstall: all
  130. X    test -d $(DESTDIR) || (mkdir $(DESTDIR) && chmod 755 $(DESTDIR))
  131. X    cp $(PROGNAME) $(DESTDIR)/
  132. X    chgrp $(GROUP) $(DESTDIR)/$(PROGNAME)
  133. X    chown $(OWNER) $(DESTDIR)/$(PROGNAME)
  134. X    test -d $(LIBDIR) || (mkdir $(LIBDIR) && chmod 755 $(LIBDIR))
  135. X    cp jargon.wrd $(LIBDIR)/
  136. X    chgrp $(GROUP) $(LIBDIR)/jargon.wrd
  137. X    chown $(OWNER) $(LIBDIR)/jargon.wrd
  138. X    @echo "\nThis may take a few minutes:\n"
  139. X    ./idxtext $(LIBDIR)/jargon.wrd
  140. X    chgrp $(GROUP) $(LIBDIR)/*IDX
  141. X    chown $(OWNER) $(LIBDIR)/*IDX
  142. X    ./$(PROGNAME) zork
  143. X    @echo "\nEverything checks out OK.  Installation done.\n"
  144. X
  145. Xclean:
  146. X    -rm -f core *~ .u? *.IDX $(PROGNAME)
  147. X
  148. Xclobber: clean
  149. X    echo "Be careful in answering the following rm queries!"
  150. X    -rm -i $(PROGNAME).icn jargon.wrd
  151. X
  152. SHAR_EOF
  153. true || echo 'restore of Makefile.dist failed'
  154. rm -f _shar_wnt_.tmp
  155. fi
  156. rm -f _shar_seq_.tmp
  157. echo You have unpacked the last part
  158. exit 0
  159. -- 
  160.  
  161.    -Richard L. Goerwitz              goer%sophist@uchicago.bitnet
  162.    goer@sophist.uchicago.edu         rutgers!oddjob!gide!sophist!goer
  163.