home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3168 / jargon.src < prev    next >
Encoding:
Text File  |  1991-04-08  |  1.3 KB  |  42 lines

  1. ############################################################################
  2. #
  3. #    Name:     1.4
  4. #
  5. #    Title:     look up words in hacker's jargon database
  6. #
  7. #    Author:     Richard L. Goerwitz
  8. #
  9. #    Version: jargon.icn
  10. #
  11. ############################################################################
  12. #
  13. #  Defines hacker's jargon.  Usage is simply "jargon word," where word
  14. #  is some bit of hacker's slang for which a definition is desired.
  15. #  Aborts with an exit code of 1 on no-arg invocation.  If a "word"
  16. #  arg is given, but no definition is found, jargon exits with status
  17. #  2.  Otherwise the appropriate entry for "word" is displayed.
  18. #
  19. #  Database is based on the jargon file, version 2.7.1, posted to alt.
  20. #  sources on March 1, 1991.  Might work on other versions, though I
  21. #  have not tested it out.
  22. #
  23. ############################################################################
  24. #
  25. #  Links:  gettext.icn, adjuncts.icn
  26. #
  27. ############################################################################
  28.  
  29. procedure main(a)
  30.  
  31.     local database, usage, no, yes
  32.  
  33.     # Change this, if you use a different location.
  34.     database := "/usr/local/lib/jargon/jargon.wrd"
  35.  
  36.     no := &ucase || "-/"; yes := &lcase || "  "
  37.     usage := "usage:  jargon word"
  38.     *a = 1 | stop(usage)
  39.     write(gettext(trim(map(a[1], no, yes)), database)) | exit(2)
  40.  
  41. end 
  42.