home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p190 / 3.ddi / LSP / HJ94.LSP < prev    next >
Encoding:
Text File  |  1990-07-21  |  4.2 KB  |  153 lines

  1. ;
  2. ;   Edit a defined text in a kind
  3. ;
  4. (VMON)
  5. (defun hj01()
  6.  (setvar "cmdecho" 0)
  7.  (menucmd "s=hyhz")
  8.  (setq fn (getstring "\n╩Σ╚δ┤╩╫Θ└α╨═: "))
  9.  (while (/= fn "")
  10.   (setq fn (strcat "txt\\hhj" fn ".tat"))
  11.   (setq p (open fn "r"))
  12.   (if (= p nil)
  13.   (princ "\n╕├└α╨═┤╩╫Θ╬─╝■╓╨╧╓╬▐┤╩╫Θ┤µ╘┌")
  14.   (progn (read-line p)
  15.   (princ "\n╕├└α╨═┤╩╫Θ╥╤┤µ╘┌")
  16.   (command "textscr")
  17.   (setq l (read-line p) k 1 m nil)
  18.   (while l
  19.     (terpri)
  20.     (princ (strcat " ╡┌<" (itoa k) ">╫Θ   "))
  21.     (princ l)
  22.     (setq m (cons l m))
  23.     (setq l (read-line p))
  24.     (cond ((= k 24) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  25.           ((= k 48) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  26.           ((= k 72) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  27.           ((= k 96) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  28.          ((= k 120) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  29.          ((= k 144) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  30.          ((= k 168) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
  31.          (T 1)
  32.     )
  33.     (setq k (1+ k))
  34.   )
  35.   (close p)
  36.   (setq m (reverse m))
  37.   (initget "a c s")
  38.   (setq s (getstring "\n╟δ╤í╘±,╨▐╕─╔╛│²┤╩╫Θ<C>,╝╠╨°╘÷╝╙┤╩╫Θ<A>,▓Θ╤»╗≥┤≥╙í┤╩╫Θ<S>"))
  39.   (cond ((= s "c") (hj02))
  40.         ((= s "a") (hj03))
  41.         (T (initget "s p")
  42.            (setq h (getkword "\n▓Θ╤»<S>,┤≥╙í<P>"))
  43.            (setq fn (strcat "hj1\\hj11 " fn))
  44.            (if (= h "p") (command "shell" fn))
  45.         )
  46.   )
  47.   ))
  48.   (setq fn (getstring "\n╩Σ╚δ┤╩╫Θ└α╨═,╗≥<Enter>╜ß╩°: "))
  49.  )
  50.  (menucmd "s=hz") (setq fn hil)
  51.  (print "END!")
  52. )
  53. ;
  54. (Defun hj02 ()
  55.   (setq s 1)
  56.   (while (/= s "")
  57.   (setq a (1- (getint "\n╩Σ╚δ╥¬╨▐╕─╡─┤╩╫Θ╨≥║┼")))
  58.   (princ "\n------------------")
  59.   (princ (strcat "\n╡┌<" (itoa (1+ a)) ">║┼  ")) (princ (setq js (nth a m)))
  60.   (princ "\n------------------")
  61.   (setq c (getstring "\n╙├<Enter>╚╖╚╧╬¬╕├┤╩╫Θ,╗≥╞Σ╦ⁿ╝ⁿ╓╪╩Σ┤╩╫Θ╨≥║┼"))
  62.   (if (= c "")
  63.   (progn
  64.   (setq h (getstring "\n<C>╨▐╕─┤╩╫Θ─┌╚▌╗≥<Enter>╔╛│²╕├┤╩╫Θ:"))
  65.   (if (/= h "")
  66.   (progn
  67.   (setq b (getint "\n╩Σ╚δ╫╓┤«╓╨╜½╨▐╕─╡─╞≡╩╝╫╓╬╗╩²:"))
  68.   (setq c (getstring t "\n╩Σ╚δ╥¬╨▐╕─╡─╫╓┤«,╗≥<D>╔╛╫╓,╗≥<I>▓σ╫╓:"))
  69.   (setq g (substr js 1 (* (1- b) 2)))
  70.   (setq b1 (strlen c))
  71.   (cond ((or (= c "d") (= c "D"))
  72.         (setq b2 (getint "\n╔╛╚Ñ╡─╫╓╩²<1>"))
  73.         (if (= b2 nil) (setq b2 1))
  74.         (setq g1 (substr js (+ (* 2 (+ (1- b) b2)) 1)))
  75.         (setq l (strcat g g1)))
  76.         ((or (= c "I") (= c "i"))
  77.          (setq c (getstring T "\n╩Σ▓σ╚δ╡─╫╓╖√┤«:"))
  78.          (setq g1 (substr js (+ (* 2 (1- b)) 1)))
  79.          (setq l (strcat g c g1)))
  80.          (T (setq g1 (substr js (+ b1 (* 2 (1- b)) 1)))
  81.           (setq l (strcat g c g1)))
  82.   )
  83.   ))
  84.   (setq i 0 dm nil)
  85.   (mapcar '(lambda (x) (if (= i a)
  86.                         (progn (if (/= h "") (setq dm (cons l dm))))
  87.                          (setq dm (cons x dm)))
  88.                          (setq i (1+ i))
  89.            ) m)
  90.   (setq m (reverse dm))
  91.   (command "textscr")
  92.   (setq n (length m) k 0 dm nil)
  93.   (princ "\n----- ╨┬╢¿╥σ╡─┤╩╫Θ -----")
  94.   (terpri)
  95.   (while (< k n)
  96.     (setq l (nth k m))
  97.     (terpri)
  98.     (princ (strcat " ╡┌<" (itoa (1+ k)) ">╫Θ   ")) (princ l)
  99.     (setq k (1+ k))
  100.   )
  101.  (princ "\n-----------------------")
  102.   (setq s (getstring "\n╙├<Enter>╜ß╩°╕├└α┤╩╫Θ╨▐╕─,╗≥╞Σ╦ⁿ╝ⁿ╘┘╕─:"))
  103.   ))
  104.   )
  105.   (setq p (open fn "w"))
  106.   (setq n (length m) k 0)
  107.   (while (< k n)
  108.    (princ (chr 10) p)
  109.    (princ (nth k m) p)
  110.    (setq k (1+ k))
  111.   )
  112.   (close p)
  113. (setq b1 nil b2 nil)
  114. )
  115. ;
  116. (defun hj03 ()
  117.   (command "textscr")
  118.   (setq m nil s 1)
  119.   (while (/= s "")
  120.   (setq l (getstring t (strcat "\n╩Σ╚δ╡┌<" (itoa k) ">╫Θ┤╩╫Θ:")))
  121.   (while (/= l "")
  122.    (setq m (cons l m))
  123.    (setq l (getstring t (strcat "\n╩Σ╚δ╡┌<" (itoa (1+ k)) ">╫Θ┤╩╫Θ,╗≥<Enter>╜ß╩°:")))
  124.    (setq k (1+ k))
  125.   )
  126.   (menucmd "s=HYHZ")
  127.   (setq m (reverse m))
  128.   (command "textscr")
  129.   (setq n (length m))
  130.   (setq k 0)
  131.   (princ "\n----- ╨┬╢¿╥σ╡─┤╩╫Θ -----")
  132.   (terpri)
  133.   (while (< k n)
  134.     (setq l (nth k m))
  135.     (terpri)
  136.     (princ (strcat "   <" (itoa (1+ k)) ">     ")) (princ l)
  137.     (setq k (1+ k))
  138.   )
  139.  (princ "\n-----------------------")
  140.   (setq s (getstring "\n╙├<Enter>╚╖╚╧╥╘╔╧╨▐╕─,╗≥╞Σ╦ⁿ╝ⁿ╓╪╫≈:"))
  141.   )
  142.   (setq p (open fn "a"))
  143.   (setq n (length m) k 0)
  144.   (while (< k n)
  145.    (princ (chr 10) p)
  146.    (princ (nth k m) p)
  147.    (setq k (1+ k))
  148.   )
  149.   (close p)
  150. )
  151. (princ "│╠╨≥╫░╚δ┴╦..")
  152. (princ)
  153.