angustia
10-02-2004, 10:26 PM
hi, sombody knows why i got :
..... // all files uncompressed ok
"ok"*** Unbound variable:0Aä
(You're accessing an undefined variable or function 0Aä')
when i run this rep script with some args:
#!/bin/sh
exec rep "$0" "$@"
!#
(defun descomprime-archivos (archs)
; function uncompress-files
; for each filename in archs: check if it exists, if it's regular and if it's tgz o
; tbz2, those that fail, are put in a list of not-found non-regular
; non-compressed
(let ((no-encontrados nil) (no-comprimidos nil) (no-archivos nil))
(do ((i 0 (1+ i))) ((= i (length archs)) (if (or no-encontrados no-comprimidos no-archivos) (list no-encontrados no-comprimidos no-archivos) nil))
(let ((archivo (nth i archs)))
(if (file-exists-p archivo)
(if (file-regular-p archivo)
(let ((nombre (file-name-nondirectory archivo)))
(cond
((or (string-match "\S?.tar.gz" nombre) (string-match "\S?.tgz" nombre))
(system (concat "tar -xvzf " archivo)))
((or (string-match "\S?.tar.bz2" nombre) (string-match "\S?.tbz2" nombre))
(system (concat "tar -xvjf " archivo)))
(t (setq no-comprimidos (append no-comprimidos (list archivo))))))
(setq no-archivos (append no-archivos (list archivo))))
(setq no-encontrados (append no-encontrados (list archivo))))))))
(defun ppal ()
(let ((malos (descomprime-archivos command-line-args)))
(if malos
malos ; in the future it display a dialog reporting errors
(print "ok"))))
(ppal)
************************************************** ****
all works but after the last function on debug:
------> "ok"
-----> "ok"
----> "ok"
---> "ok"
--> "ok"
#7 #undefined
\\\
"ok"rep-db>
#10 #undefined
(validate-byte-code 11 0)
rep-db>
thanks in advance, i would post on the project forum, but it's full of garbage
..... // all files uncompressed ok
"ok"*** Unbound variable:0Aä
(You're accessing an undefined variable or function 0Aä')
when i run this rep script with some args:
#!/bin/sh
exec rep "$0" "$@"
!#
(defun descomprime-archivos (archs)
; function uncompress-files
; for each filename in archs: check if it exists, if it's regular and if it's tgz o
; tbz2, those that fail, are put in a list of not-found non-regular
; non-compressed
(let ((no-encontrados nil) (no-comprimidos nil) (no-archivos nil))
(do ((i 0 (1+ i))) ((= i (length archs)) (if (or no-encontrados no-comprimidos no-archivos) (list no-encontrados no-comprimidos no-archivos) nil))
(let ((archivo (nth i archs)))
(if (file-exists-p archivo)
(if (file-regular-p archivo)
(let ((nombre (file-name-nondirectory archivo)))
(cond
((or (string-match "\S?.tar.gz" nombre) (string-match "\S?.tgz" nombre))
(system (concat "tar -xvzf " archivo)))
((or (string-match "\S?.tar.bz2" nombre) (string-match "\S?.tbz2" nombre))
(system (concat "tar -xvjf " archivo)))
(t (setq no-comprimidos (append no-comprimidos (list archivo))))))
(setq no-archivos (append no-archivos (list archivo))))
(setq no-encontrados (append no-encontrados (list archivo))))))))
(defun ppal ()
(let ((malos (descomprime-archivos command-line-args)))
(if malos
malos ; in the future it display a dialog reporting errors
(print "ok"))))
(ppal)
************************************************** ****
all works but after the last function on debug:
------> "ok"
-----> "ok"
----> "ok"
---> "ok"
--> "ok"
#7 #undefined
\\\
"ok"rep-db>
#10 #undefined
(validate-byte-code 11 0)
rep-db>
thanks in advance, i would post on the project forum, but it's full of garbage