home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / word / text / 019 / mkdoc.sl < prev    next >
Text File  |  1993-01-19  |  2KB  |  52 lines

  1. ;; make a doc file for jed intrinsics
  2. (
  3.   [filein fileout] =fileout =filein
  4.   [cbuf dbuf fbuf] whatbuf =cbuf
  5.   [sstr] "add_intrinsic(" =sstr
  6.   [sname cname type nparms]
  7.   [comma commas] "," =comma ",\t " =commas
  8.   [err_msg] "Corrupt file?" =err_msg
  9.   
  10.   filein find_file { "File not found."  error } !if whatbuf =fbuf
  11.   fileout find_file pop whatbuf =dbuf
  12.   erase_buffer
  13.   
  14.   fbuf setbuf bob
  15.   {sstr fsearch}{
  16.      bol skip_white sstr looking_at {continue} !if
  17.      15 right pop  ;; at name
  18.      
  19.      push_mark "\"" ffind { err_msg  error } !if bufsubstr =sname
  20.      
  21.      ")" ffind { err_msg error } !if
  22.      ")\t " skip_chars  push_mark comma ffind {err_msg error} !if 
  23.      bufsubstr =cname
  24.      
  25.      commas skip_chars  push_mark comma ffind {err_msg error} !if
  26.      bufsubstr =type
  27.      
  28.      commas skip_chars  push_mark "0-9" skip_chars  bufsubstr =nparms
  29.      
  30.      dbuf setbuf
  31.      "@" insert sname insert 30 goto_column "C function: " insert cname insert
  32.      "\n;; takes " insert nparms insert " parameter(s) returning " insert 
  33.      type insert "\n" insert
  34.      fbuf setbuf
  35.      1 down pop bol skip_white 
  36.      "/*;;" looking_at {
  37.         bol push_mark
  38.     "*/" fsearch {err_msg error} !if
  39.     dbuf copy_region
  40.     dbuf setbuf "/*" bsearch pop bol trim del del
  41.     {1 down} {bol trim} while
  42.     eolp {eol "\n" insert} !if
  43.     fbuf setbuf
  44.      } if
  45.   } while
  46. ) mkdoc
  47.  
  48. "ledit.c" "jed_funs.hlp" mkdoc
  49. "jed_funs.hlp" setbuf 
  50. "jed_funs.hlp" write_buffer pop
  51. exit_jed
  52.