热度 8|||
;;(gxl-slb2sldnames SLBFileName) 返回幻灯片库文件中幻灯片名称列表 (defun gxl-slb2sldnames (PATH / Names N ID A HEADLIST I LOOP NAME B C D PTR) (if (setq id (open path "r")) (progn (repeat 31 (if (and (setq a (read-char id)) (/= a 0) ) (setq headlist (cons a headlist)) ) ) (setq n 31) (setq i 0) (setq headlist (strcase (VL-LIST->STRING (reverse headlist)))) (if (VL-STRING-SEARCH "SLIDE" headlist) (progn (setq loop t) (while loop (setq name nil) (repeat 32 (if (and (setq a (read-char id)) (/= a 0) ) (setq name (cons a name)) ) (setq n (1+ n)) ) (if name (progn (setq Names (cons (VL-LIST->STRING (reverse name)) Names))
(if (= i 0) (progn (if (and (setq a (READ-CHAR id)) (setq b (READ-CHAR id)) (setq c (READ-CHAR id)) (setq d (READ-CHAR id)) ) (setq ptr (+ a (lsh b 8) (lsh c 16) (lsh d 24))) ) (setq n (+ n 4)) ) (repeat 4 (READ-CHAR id) (setq n (1+ n)) ) ) (setq i (1+ i)) (if (= (+ 37 n) ptr)
(setq loop nil) ) ) (setq loop nil) ) ) ) ) (close id) (reverse Names)
) ) )