home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 11 / AUCD11B.iso / LANGUAGES / WraithSet / AwkStuff / Awkify / ReadMe < prev    next >
Text File  |  1999-12-15  |  5KB  |  131 lines

  1. ****** Awkify v.2 16/9/99 ****** 
  2.  
  3. Awk is a classic text manipulating utility. This package
  4. Awkify augments StrongED (versions >= 4.54) with all the
  5. power of awk, using StrongED's unexploited "Process"
  6. command. It uses GNU Awk v.3.0.4. I am indebted to
  7. John Kortink for help in compiling the gawk binary.
  8. Three extra functions have been built in specifically
  9. for use under Risc OS. See the file "Riscos" for details.
  10. You can either consider this an enhancement of StrongED
  11. or as the provision of a windowing user interface for
  12. programming in Awk.
  13.  
  14. It is presumed that you have a copy of !StrongED with version
  15. number >= 4.54.
  16.  
  17. Installation
  18. ------------
  19.  
  20. If you are nervous make a backup copy of !StrongED first.
  21.   Only the files
  22.      !StrongED.!Boot
  23.      !StrongED.Resources.!Sprites
  24.      !StrongED.Resources.!Sprites22
  25.      !StrongED.Resources.Sprites
  26.      !StrongED.Resources.Sprites22 
  27.      !StrongED.Defaults.Modes.BaseMode
  28.      !StrongED.Defaults.ModeWhen
  29.   get modified.      
  30.  
  31. 1. Copy the file "gawk" into !Boot.Library or to some place
  32.    in your Run$Path list.
  33.  
  34. 2. Modify !StrongED as follows:
  35.   1) Double click on the spritefile AwkSprite and copy
  36.      the sprite "file_0a0" into !StrongED.Resources.!Sprites
  37.      and !StrongED.Resources.!Sprites22. This gives an
  38.      icon for the "awk" filetype.
  39.   2) Double click on the spritefile ResSprite and copy
  40.      the sprites "see" and "runawk" into !StrongED.Resources.Sprites
  41.      and !StrongED.Resources.Sprites22. This gives two new
  42.      toolbar icons.
  43.   3) Append the contents of !Boot+ to !StrongED.!Boot.
  44.   4) Open the textfiles BaseM+ and !StrongED.Defaults.Modes.BaseMode.
  45.      Copy from BaseM+ the line
  46.              CR          &0d
  47.      into the section "clicklist related entries" in BaseMode.
  48.      Copy the remaining uncommented lines of BaseM+ into the
  49.      section "Toolbar and mode-menu functions" in BaseMode.
  50.   5) Append the contents of ModeW+ to !StrongED.Defaults.ModeWhen.              
  51.   6) Copy the directory Modes over !StrongED.Defaults.Modes.
  52.      This will add another mode called "awk".
  53.   7) Copy the directory Tools over !StrongED.Tools.     
  54.      This will add four files: "blank" (a default awk program
  55.      that does nothing), and three obey files "awkapply",
  56.      "awkrun" and "setawk".
  57.   8) If StrongEd is already running, choose quit from the iconbar
  58.      icon and restart it.    
  59.  
  60. What this will do
  61. -----------------
  62.  
  63.   Booting StrongED will create a new filetype (0x187) called
  64.   "awk". You will find that StrongED has a new mode "awk" for awk
  65.   files, and every mode has two new functions "See" and "Runawk".
  66.   As usual these can be operated either from the Menu button
  67.   or by clicking smarticons on the toolbar.
  68.  
  69.   Clicking on the "see" icon will display the current awk program.
  70.   
  71.   Clicking on the "runawk" icon will apply the current awk program
  72.   to the text in the window. Use Select to send the output to a new
  73.   file, called "out", in the same directory as the input file, and
  74.   to open a StrongEd window containing it. Use Adjust to replace
  75.   the contents of the window with the output (this is slightly
  76.   more dangerous because if you click Save the input file will
  77.   be overwritten by the output).
  78.  
  79.   When StrongED starts, the current awk program is held in the
  80.   file !StrongED.Tools.blank. It consists of the single line
  81.  
  82.   1
  83.  
  84.   (the shortest program in the world?) and its effect is to
  85.   leave text alone. If you create an awk program in a StrongED
  86.   window in awk mode, save it somewhere and click the "Run"
  87.   toolbar icon, then it becomes the current awk program.
  88.  
  89.   Doubleclicking on any file of type "awk" makes it the current
  90.   awk program. Three short example awk programs are in the
  91.   directory Examples.
  92.  
  93. Manifest
  94. -------
  95.   gawk -- gawk binary, a port of GNU awk 3.0.4
  96.   AwkSprite -- sprite for awk filetype
  97.   ResSprite -- contains two new smarticons, 'see' and 'runawk'
  98.   !Boot+  -- extra lines for !Boot
  99.   BaseM+  -- extra lines for BaseMode
  100.   ModeW+  -- extra lines for ModeWhen
  101.   ReadMe  -- this file
  102.   Riscos  -- details of extra built in functions
  103.   Modes
  104.     awk   -- awk mode
  105.   Tools
  106.     blank  -- default current awk program
  107.     awkapply --  obey file for applying current awk program with Select
  108.     awkrun -- obey file for applying current awk program with Adjust
  109.     setawk -- obey file for setting current awk program
  110.   Examples     
  111.     nodup  -- remove duplicate lines of text.
  112.     number -- number the non-blank lines of text.
  113.     words -- list all the separate words in the text in the
  114.              order in which they first occur.
  115.     
  116. Information about awk
  117. ---------------------
  118.  
  119.  The FAQ list for comp.lang.awk can be found on the Internet:
  120.   <ftp://rtfm.mit.edu/pub/usenet/comp.lang.awk/faq>
  121.   <http://www.faqs.org/faqs/computer-lang/awk/faq/>
  122.        
  123.  The sources can be found in
  124.  ftp://prep.ai.mit.edu/pub/gnu/gawk-3.0.4.tar.gz
  125.  
  126.  An introductory text can be found at
  127.  http://www.ssc.com/lj/issue25/1156.html
  128.  
  129. -- G.C.Wraith
  130. mailto:gavin@wraith.u-net.com
  131.