home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / text_dtp / editor / turbotext / rexx / stripman.ttx < prev    next >
Text File  |  1995-07-10  |  1KB  |  55 lines

  1.  
  2. /** $VER: StripMan.ttx 2.0 (13.3.94)
  3.  **
  4.  ** Strip character sequences generated by the UNIX "man" program.
  5.  **/
  6.  
  7.  
  8. OPTIONS RESULTS
  9. OPTIONS FAILAT 11
  10.  
  11.  
  12. SetDisplayLock ON
  13. 'SetStatusBar temporary "Working..."'
  14.  
  15. call SaveState
  16.  
  17. MoveSOF; 'FindChange ALL FIND "' || '_'||'08'x      || '" CHANGE ""'  /* remove overstruck '_' */
  18. MoveSOF; 'FindChange ALL FIND "' || 'o'||'08'x||'+' || '" CHANGE *'   /* replace overstruck bullets w/ splats */
  19.  
  20. call RestoreState
  21.  
  22. SetDisplayLock OFF
  23.  
  24. return
  25.  
  26.  
  27. /* -------------------- State management */
  28.  
  29. SaveState: procedure expose state.
  30.     SetBookmark 0
  31.  
  32.     GetPrefs FreeForm;          state.form   = RESULT
  33.     GetPrefs FindBackward;      state.dir    = RESULT
  34.     GetPrefs FindWholeWords;    state.whole  = RESULT
  35.     GetPrefs FindString;        state.find   = RESULT
  36.     GetPrefs ChangeString;      state.change = RESULT
  37.  
  38.     SetPrefs FreeForm           OFF
  39.     SetPrefs FindBackward       OFF
  40.     SetPrefs FindWholeWords     OFF
  41.  
  42.     return
  43.  
  44. RestoreState: procedure expose state.
  45.     SetPrefs FreeForm           state.form
  46.     SetPrefs FindBackward       state.dir
  47.     SetPrefs FindWholeWords     state.whole
  48.     'SetPrefs FindString "' ||  state.find || '"'
  49.     'SetPrefs ChangeString "' || state.change || '"'
  50.  
  51.     MoveBookmark 0
  52.     ClearBookmark 0
  53.  
  54.     return
  55.