home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / AP / JED / JED097-1.TAR / jed / lib / man.sl < prev    next >
Encoding:
Text File  |  1994-12-12  |  1.0 KB  |  44 lines

  1. %%
  2. %%  execute man then remove backspaces
  3. %%
  4.  
  5. . ( [clean buf cmd subj ctrl_h] "*manual-entry*" =buf
  6. .   "Cleaning man page..." =clean
  7.   
  8. .   "man" Null_String Null_String read_mini =subj
  9. .   subj strlen {return} !if
  10.   
  11. #ifdef OS2
  12. .   "man " subj strcat " 2> nul" strcat =cmd
  13. #else
  14. .   "man " subj strcat " 2> /dev/null" strcat =cmd
  15. #endif
  16. .   buf pop2buf
  17. .   0 set_readonly
  18. .   erase_buffer
  19. .   "Getting man page..." flush
  20. .   cmd shell_cmd
  21. .   clean flush
  22. .   8 char =ctrl_h
  23. .   bob "_" ctrl_h strcat Null_String replace     %% remove _^H combinations
  24. .   bob  {ctrl_h fsearch} {del del} while  %% remove remaining overstrikes
  25.   %%
  26.   %%  remove multiple blank lines--- should make this standalone
  27.   %%
  28. .   bob {eolp eobp not and}{del} while
  29. .   {1 down} {
  30. .     eol bolp 
  31. .       { 1 down {break} !if
  32. .         {{eol bolp}{eobp not} andelse} {del} while
  33. .       } if
  34. .   } while
  35. .   bob
  36.   %%
  37.   %%  set buffer no modified
  38.   %%
  39. .   getbuf_info pop 0 setbuf_info
  40. .   clean "done" strcat flush
  41. .   most_mode
  42. .   1 set_readonly
  43. . ) unix_man
  44.