[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: gnet-spice-sdb.scm
User: sdb
Date: 07/02/11 16:53:27
Modified: . gnet-spice-sdb.scm gnetlist.scm
Log:
Changed string-pad-right to safe-string-head. Added safe-string-head to
gnetlist.scm.
Revision Changes Path
1.25 +3 -3 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.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- gnet-spice-sdb.scm 11 Feb 2007 14:23:46 -0000 1.24
+++ gnet-spice-sdb.scm 11 Feb 2007 21:53:26 -0000 1.25
@@ -1,4 +1,4 @@
-;;; $Id: gnet-spice-sdb.scm,v 1.24 2007/02/11 14:23:46 sdb Exp $
+;;; $Id: gnet-spice-sdb.scm,v 1.25 2007/02/11 21:53:26 sdb Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
;;; gnetlist - GNU Netlist
@@ -385,10 +385,10 @@
;; (display "In get-file-type, first-char = .\n") ;; DEBUG stuff
(cond
- ((string-ci=? (string-pad-right file-line 7) ".subckt") ;; found .subckt as first line.
+ ((string-ci=? (gnetlist:safe-string-head file-line 7) ".subckt") ;; found .subckt as first line.
".SUBCKT" )
- ((string-ci=? (string-pad-right file-line 6) ".model") ;; found .model as first line.
+ ((string-ci=? (gnetlist:safe-string-head file-line 6) ".model") ;; found .model as first line.
".MODEL" )
(else "OTHER") ;; first . spice card is neither .model nor .subckt
1.28 +11 -1 eda/geda/gaf/gnetlist/scheme/gnetlist.scm
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gnetlist.scm
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/gnetlist.scm,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- gnetlist.scm 4 Jan 2006 14:36:25 -0000 1.27
+++ gnetlist.scm 11 Feb 2007 21:53:26 -0000 1.28
@@ -1,4 +1,4 @@
-;;; $Id: gnetlist.scm,v 1.27 2006/01/04 14:36:25 sdb Exp $
+;;; $Id: gnetlist.scm,v 1.28 2007/02/11 21:53:26 sdb Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
;;; gnetlist - GNU Netlist
@@ -86,6 +86,16 @@
)
+;; This fcn returns the first len characters of the string str. If
+;; str has less than len characters, it returns the whole string
+;; (but doesn't choke)
+(define safe-string-head
+ (lambda (str len)
+ (substring str 0 (min len (string-length str)))
+ )
+)
+
+
;; get all packages for a particular schematic page
;; eventually placeholder will be either the hierarchical level or something
;; of the sort
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs