[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: gnet-allegro.scm
User: pcjc2
Date: 07/02/23 18:32:07
Modified: . Tag: noscreen gnet-allegro.scm gnet-spice-sdb.scm
Log:
sync with trunk
Revision Changes Path
No revision
No revision
1.11.6.1 +34 -1 eda/geda/gaf/gnetlist/scheme/gnet-allegro.scm
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gnet-allegro.scm
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/gnet-allegro.scm,v
retrieving revision 1.11
retrieving revision 1.11.6.1
diff -u -b -r1.11 -r1.11.6.1
--- gnet-allegro.scm 3 Feb 2005 12:49:36 -0000 1.11
+++ gnet-allegro.scm 23 Feb 2007 23:32:06 -0000 1.11.6.1
@@ -1,4 +1,4 @@
-;;; $Id: gnet-allegro.scm,v 1.11 2005/02/03 12:49:36 danmc Exp $
+;;; $Id: gnet-allegro.scm,v 1.11.6.1 2007/02/23 23:32:06 pcjc2 Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
;;; gnetlist - GNU Netlist
@@ -34,6 +34,39 @@
(define allegro:write-device
(lambda (device package)
+
+ ;; Check if the 'devfiles' directory exist.
+ (if (not (access? "devfiles" F_OK))
+ (if (access? "." W_OK)
+ ;; If the 'devfiles' directory doesn't exist, and
+ ;; we have write access to the current directory, then create it.
+ (mkdir "devfiles")
+ ;; If we don't have write access to the current directory,
+ ;; end with an error message.
+ (begin
+ (error (string-append
+ "the device files are expected to be in the 'devfiles' directory.\n"
+ " However, can't create it!.\n"
+ " Check write permissions of the current directory.\n"))))
+ ;; If 'devfiles' exist, check if it is a directory.
+ (if (not (eq? (stat:type (stat "devfiles")) 'directory))
+ (begin
+ ;; 'devfiles' exists, but it is not a directory.
+ ;; End with an error message.
+ (error (string-append
+ "the device files are expected to be in the 'devfiles' directory.\n"
+ " However, 'devfiles' exists and it is not a directory!.\n"))
+ )))
+ ;; 'devfiles' should exist now. Check if we have write access.
+ (if (not (access? "devfiles" W_OK))
+ ;; We don't have write access to 'devfiles'.
+ ;; End with an error message
+ (error (string-append
+ "the device files are expected to be in the 'devfiles' directory.\n"
+ " However, can't access it for writing!.\n"
+ " Check write permissions of the 'devfiles' directory.\n")))
+
+
(let ((p (open-output-file (string-downcase! (string-append "devfiles/" (string-append device ".txt"))))))
(display "(Device File generated by gEDA Allegro Netlister)\n" p)
(display "PACKAGE " p)
1.19.6.2 +4 -4 eda/geda/gaf/gnetlist/scheme/gnet-spice-sdb.scm
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gnet-spice-sdb.scm
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/gnet-spice-sdb.scm,v
retrieving revision 1.19.6.1
retrieving revision 1.19.6.2
diff -u -b -r1.19.6.1 -r1.19.6.2
--- gnet-spice-sdb.scm 11 Feb 2007 23:58:25 -0000 1.19.6.1
+++ gnet-spice-sdb.scm 23 Feb 2007 23:32:06 -0000 1.19.6.2
@@ -1,4 +1,4 @@
-;;; $Id: gnet-spice-sdb.scm,v 1.19.6.1 2007/02/11 23:58:25 pcjc2 Exp $
+;;; $Id: gnet-spice-sdb.scm,v 1.19.6.2 2007/02/23 23:32:06 pcjc2 Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
;;; gnetlist - GNU Netlist
@@ -382,13 +382,13 @@
((string=? (string (string-ref file-line 0)) ".")
(begin
- ;; (display "In get-file-type, first-char = .\n") ;; DEBUG stuff
+ (display "In get-file-type, first-char = .\n") ;; DEBUG stuff
(cond
- ((string-ci=? (gnetlist:safe-string-head file-line 7) ".subckt") ;; found .subckt as first line.
+ ((string-ci=? (safe-string-head file-line 7) ".subckt") ;; found .subckt as first line.
".SUBCKT" )
- ((string-ci=? (gnetlist:safe-string-head file-line 6) ".model") ;; found .model as first line.
+ ((string-ci=? (safe-string-head file-line 6) ".model") ;; found .model as first line.
".MODEL" )
(else "OTHER") ;; first . spice card is neither .model nor .subckt
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs