;;读取 DCL 中的每一行并写入 LSP
(while (setq str (read-line dcl))
;; 用反斜杠作为所有反斜杠的前缀
(setq n 1)
(while (<= n (strlen str))
(if (= (substr str n 1) "\\")
(progn
(if (= n 1)
(setq str (strcat "\\" str))
(setq
str (strcat (substr str 1 (- n 1)) "\\" (substr str n))
)
) ;_ end of if
(setq n (+ n 2))
) ;_ end of progn
(setq n (1+ n))
) ;_ end of if
) ;_ end of while
;;在所有双引号前加上反斜杠
(setq n 1)
(while (<= n (strlen str))
(if (= (substr str n 1) "\"")
(progn
(if (= n 1)
(setq str (strcat "\\" str))
(setq
str (strcat (substr str 1 (- n 1)) "\\" (substr str n))
)
) ;_ end of if
(setq n (+ n 2))
) ;_ end of progn
(setq n (1+ n))
) ;_ end of if
) ;_ end of while