home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Edit a defined text in a kind
- ;
- (VMON)
- (defun hj01()
- (setvar "cmdecho" 0)
- (menucmd "s=hyhz")
- (setq fn (getstring "\n╩Σ╚δ┤╩╫Θ└α╨═: "))
- (while (/= fn "")
- (setq fn (strcat "txt\\hhj" fn ".tat"))
- (setq p (open fn "r"))
- (if (= p nil)
- (princ "\n╕├└α╨═┤╩╫Θ╬─╝■╓╨╧╓╬▐┤╩╫Θ┤µ╘┌")
- (progn (read-line p)
- (princ "\n╕├└α╨═┤╩╫Θ╥╤┤µ╘┌")
- (command "textscr")
- (setq l (read-line p) k 1 m nil)
- (while l
- (terpri)
- (princ (strcat " ╡┌<" (itoa k) ">╫Θ "))
- (princ l)
- (setq m (cons l m))
- (setq l (read-line p))
- (cond ((= k 24) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 48) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 72) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 96) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 120) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 144) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- ((= k 168) (getstring "\n╝ⁿ<Enter>╝╠╨°:"))
- (T 1)
- )
- (setq k (1+ k))
- )
- (close p)
- (setq m (reverse m))
- (initget "a c s")
- (setq s (getstring "\n╟δ╤í╘±,╨▐╕─╔╛│²┤╩╫Θ<C>,╝╠╨°╘÷╝╙┤╩╫Θ<A>,▓Θ╤»╗≥┤≥╙í┤╩╫Θ<S>"))
- (cond ((= s "c") (hj02))
- ((= s "a") (hj03))
- (T (initget "s p")
- (setq h (getkword "\n▓Θ╤»<S>,┤≥╙í<P>"))
- (setq fn (strcat "hj1\\hj11 " fn))
- (if (= h "p") (command "shell" fn))
- )
- )
- ))
- (setq fn (getstring "\n╩Σ╚δ┤╩╫Θ└α╨═,╗≥<Enter>╜ß╩°: "))
- )
- (menucmd "s=hz") (setq fn hil)
- (print "END!")
- )
- ;
- (Defun hj02 ()
- (setq s 1)
- (while (/= s "")
- (setq a (1- (getint "\n╩Σ╚δ╥¬╨▐╕─╡─┤╩╫Θ╨≥║┼")))
- (princ "\n------------------")
- (princ (strcat "\n╡┌<" (itoa (1+ a)) ">║┼ ")) (princ (setq js (nth a m)))
- (princ "\n------------------")
- (setq c (getstring "\n╙├<Enter>╚╖╚╧╬¬╕├┤╩╫Θ,╗≥╞Σ╦ⁿ╝ⁿ╓╪╩Σ┤╩╫Θ╨≥║┼"))
- (if (= c "")
- (progn
- (setq h (getstring "\n<C>╨▐╕─┤╩╫Θ─┌╚▌╗≥<Enter>╔╛│²╕├┤╩╫Θ:"))
- (if (/= h "")
- (progn
- (setq b (getint "\n╩Σ╚δ╫╓┤«╓╨╜½╨▐╕─╡─╞≡╩╝╫╓╬╗╩²:"))
- (setq c (getstring t "\n╩Σ╚δ╥¬╨▐╕─╡─╫╓┤«,╗≥<D>╔╛╫╓,╗≥<I>▓σ╫╓:"))
- (setq g (substr js 1 (* (1- b) 2)))
- (setq b1 (strlen c))
- (cond ((or (= c "d") (= c "D"))
- (setq b2 (getint "\n╔╛╚Ñ╡─╫╓╩²<1>"))
- (if (= b2 nil) (setq b2 1))
- (setq g1 (substr js (+ (* 2 (+ (1- b) b2)) 1)))
- (setq l (strcat g g1)))
- ((or (= c "I") (= c "i"))
- (setq c (getstring T "\n╩Σ▓σ╚δ╡─╫╓╖√┤«:"))
- (setq g1 (substr js (+ (* 2 (1- b)) 1)))
- (setq l (strcat g c g1)))
- (T (setq g1 (substr js (+ b1 (* 2 (1- b)) 1)))
- (setq l (strcat g c g1)))
- )
- ))
- (setq i 0 dm nil)
- (mapcar '(lambda (x) (if (= i a)
- (progn (if (/= h "") (setq dm (cons l dm))))
- (setq dm (cons x dm)))
- (setq i (1+ i))
- ) m)
- (setq m (reverse dm))
- (command "textscr")
- (setq n (length m) k 0 dm nil)
- (princ "\n----- ╨┬╢¿╥σ╡─┤╩╫Θ -----")
- (terpri)
- (while (< k n)
- (setq l (nth k m))
- (terpri)
- (princ (strcat " ╡┌<" (itoa (1+ k)) ">╫Θ ")) (princ l)
- (setq k (1+ k))
- )
- (princ "\n-----------------------")
- (setq s (getstring "\n╙├<Enter>╜ß╩°╕├└α┤╩╫Θ╨▐╕─,╗≥╞Σ╦ⁿ╝ⁿ╘┘╕─:"))
- ))
- )
- (setq p (open fn "w"))
- (setq n (length m) k 0)
- (while (< k n)
- (princ (chr 10) p)
- (princ (nth k m) p)
- (setq k (1+ k))
- )
- (close p)
- (setq b1 nil b2 nil)
- )
- ;
- (defun hj03 ()
- (command "textscr")
- (setq m nil s 1)
- (while (/= s "")
- (setq l (getstring t (strcat "\n╩Σ╚δ╡┌<" (itoa k) ">╫Θ┤╩╫Θ:")))
- (while (/= l "")
- (setq m (cons l m))
- (setq l (getstring t (strcat "\n╩Σ╚δ╡┌<" (itoa (1+ k)) ">╫Θ┤╩╫Θ,╗≥<Enter>╜ß╩°:")))
- (setq k (1+ k))
- )
- (menucmd "s=HYHZ")
- (setq m (reverse m))
- (command "textscr")
- (setq n (length m))
- (setq k 0)
- (princ "\n----- ╨┬╢¿╥σ╡─┤╩╫Θ -----")
- (terpri)
- (while (< k n)
- (setq l (nth k m))
- (terpri)
- (princ (strcat " <" (itoa (1+ k)) "> ")) (princ l)
- (setq k (1+ k))
- )
- (princ "\n-----------------------")
- (setq s (getstring "\n╙├<Enter>╚╖╚╧╥╘╔╧╨▐╕─,╗≥╞Σ╦ⁿ╝ⁿ╓╪╫≈:"))
- )
- (setq p (open fn "a"))
- (setq n (length m) k 0)
- (while (< k n)
- (princ (chr 10) p)
- (princ (nth k m) p)
- (setq k (1+ k))
- )
- (close p)
- )
- (princ "│╠╨≥╫░╚δ┴╦..")
- (princ)