[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: stable-1.4 updated (1.4.0-20080127-9-gb0b9f27)
The branch, stable-1.4 has been updated
via b0b9f279968fa8308e807b6708a4a67e295b8aee (commit)
via 48bcfb94d6f14d6179c268ad4663667f89dda179 (commit)
via 0f01007769d117cb84877b5a261f888f732a0178 (commit)
via fa60f2c43a4c65013ffeec918e39d72267a97f85 (commit)
via bdf240c9cfe9348edfded807e433ea8910b9f20f (commit)
via 3e5a3a547903f04e78c7b54ee68ee544418069a9 (commit)
via 906fb6012fe6a69f384aebc82e48ebd9ededc750 (commit)
from 5bc18e253307f2b8177dbebf5896672f401512be (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gnetlist/scheme/gnet-verilog.scm | 201 ++++++++++++++++++++------------------
gnetlist/scheme/gnet-vhdl.scm | 7 +-
gschem/src/gschem.c | 1 +
gschem/src/o_delete.c | 7 +-
gschem/src/x_autonumber.c | 2 -
libgeda/po/es_ES.po | 8 +-
libgeda/src/m_basic.c | 2 +-
libgeda/src/o_attrib.c | 25 +++--
libgeda/src/s_textbuffer.c | 17 +++-
9 files changed, 154 insertions(+), 116 deletions(-)
=================
Commit Messages
=================
commit b0b9f279968fa8308e807b6708a4a67e295b8aee
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Thu Aug 14 19:02:15 2008 +0100
Don't crash on zero snap grid spacing [2026598]
If snap grid spacing is set to zero, behave the same as if snap is
disabled.
:100644 100644 82c5944... 5914400... M libgeda/src/m_basic.c
commit 48bcfb94d6f14d6179c268ad4663667f89dda179
Author: Patrick Bernaud <b-patrick@xxxxxxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
Fix memory leak in gschem.
When processing file names passed on command line, the pathname built
for each one was not freed.
:100644 100644 5c9b6db... 818315e... M gschem/src/gschem.c
commit 0f01007769d117cb84877b5a261f888f732a0178
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
libgeda: fixed EOL handling for mixed windows/linux usage
A file that is created on windows with windows EOL characters
may not be read into gschem without errors on Linux. This fix
strips off leading and trailing CR characters when reading a
single line from the textbuffer.
Bug reported by Thomas Arndt [#1993952]
The bug was introduced with commit 40833189228f8edeff
:100644 100644 4b0fd5c... 7bb33ac... M libgeda/src/s_textbuffer.c
commit fa60f2c43a4c65013ffeec918e39d72267a97f85
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
o_delete_text(): only call o_attrib_slot_update() for COMPLEX objects.
Fixes crash observed when deleting attributes from a net.
:100644 100644 60f6f38... df45421... M gschem/src/o_delete.c
commit bdf240c9cfe9348edfded807e433ea8910b9f20f
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
update the pinnumbers if a slot attribute is deleted
Update the slots whenever a text line that is attached to an object
gets deleted. The update checks the slotting even if there's no slot
attribut. This catches the case when the user deletes a slot attribute
and the current displayed pinnumbers are not the ones defined in the
symbol. This commit fixes [#1880221]
:100644 100644 1030f08... 60f6f38... M gschem/src/o_delete.c
:100644 100644 c02d35d... 017af04... M gschem/src/x_autonumber.c
:100644 100644 7a59ace... e54c5ba... M libgeda/src/o_attrib.c
commit 3e5a3a547903f04e78c7b54ee68ee544418069a9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Thu Aug 14 17:52:02 2008 +0100
Fix verilog and VHDL netlist backends
These were inadvertently broken when making core gnetlist changes to
accomodate slotting in spice-sdb. Since the netlist backend is loaded
before gnetlist has traversed the schematic, the backends must not
execute any code which queries gnetlist on load. All such work is
to be done only when gnetlist invokes the (<backend>) method.
:100644 100644 ad31a8b... 2675d3d... M gnetlist/scheme/gnet-verilog.scm
:100644 100644 0b4bcf1... dea8b66... M gnetlist/scheme/gnet-vhdl.scm
commit 906fb6012fe6a69f384aebc82e48ebd9ededc750
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date: Thu Aug 14 17:52:02 2008 +0100
Fix missing %s in two strings.
Two strings missed %s. Thanks to Peter Clifton for reporting.
:100644 100644 1d3e008... 2b3fcbc... M libgeda/po/es_ES.po
=========
Changes
=========
commit b0b9f279968fa8308e807b6708a4a67e295b8aee
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Thu Aug 14 19:02:15 2008 +0100
Don't crash on zero snap grid spacing [2026598]
If snap grid spacing is set to zero, behave the same as if snap is
disabled.
diff --git a/libgeda/src/m_basic.c b/libgeda/src/m_basic.c
index 82c5944..5914400 100644
--- a/libgeda/src/m_basic.c
+++ b/libgeda/src/m_basic.c
@@ -206,7 +206,7 @@ int snap_grid(TOPLEVEL *toplevel, int input)
int p, m, n;
int sign, value, snap_grid;
- if (!toplevel->snap) {
+ if (!toplevel->snap || (toplevel->snap_size <= 0)) {
return(input);
}
commit 48bcfb94d6f14d6179c268ad4663667f89dda179
Author: Patrick Bernaud <b-patrick@xxxxxxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
Fix memory leak in gschem.
When processing file names passed on command line, the pathname built
for each one was not freed.
diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c
index 5c9b6db..818315e 100644
--- a/gschem/src/gschem.c
+++ b/gschem/src/gschem.c
@@ -296,6 +296,7 @@ void main_prog(void *closure, int argc, char *argv[])
* f_open (called by x_window_open_page). This works for Linux and MINGW32.
*/
x_window_open_page(w_current, filename);
+ g_free (filename);
/* Go to the next argument */
i++;
commit 0f01007769d117cb84877b5a261f888f732a0178
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
libgeda: fixed EOL handling for mixed windows/linux usage
A file that is created on windows with windows EOL characters
may not be read into gschem without errors on Linux. This fix
strips off leading and trailing CR characters when reading a
single line from the textbuffer.
Bug reported by Thomas Arndt [#1993952]
The bug was introduced with commit 40833189228f8edeff
diff --git a/libgeda/src/s_textbuffer.c b/libgeda/src/s_textbuffer.c
index 4b0fd5c..7bb33ac 100644
--- a/libgeda/src/s_textbuffer.c
+++ b/libgeda/src/s_textbuffer.c
@@ -195,12 +195,19 @@ gchar *s_textbuffer_next (TextBuffer *tb, const gsize count)
gchar *s_textbuffer_next_line (TextBuffer *tb)
{
int len = 0;
+ gchar *line;
if (tb == NULL) return NULL;
if (tb->offset >= tb->size)
return NULL;
+ /* skip leading CR characters */
+ while (tb->buffer[tb->offset] == '\r'
+ && tb->offset < tb->size - 1) {
+ tb->offset += 1;
+ }
+
while ((tb->buffer[tb->offset + len] != '\n')
&& (len < tb->size - tb->offset - 1)) {
len++;
@@ -208,5 +215,13 @@ gchar *s_textbuffer_next_line (TextBuffer *tb)
len++;
- return s_textbuffer_next (tb, len);
+ line = s_textbuffer_next (tb, len);
+
+ /* wipe out all trailing CR characters */
+ while (len > 1 && line[len-2] == '\r') {
+ line[len-1] = 0;
+ len--;
+ }
+
+ return line;
}
commit fa60f2c43a4c65013ffeec918e39d72267a97f85
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
o_delete_text(): only call o_attrib_slot_update() for COMPLEX objects.
Fixes crash observed when deleting attributes from a net.
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 60f6f38..df45421 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -216,7 +216,7 @@ void o_delete_text(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
toplevel->page_current->object_tail =
(OBJECT *) return_tail(toplevel->page_current->object_head);
- if (o_parent != NULL)
+ if (o_parent != NULL && o_parent->type == OBJ_COMPLEX)
o_attrib_slot_update(toplevel, o_parent);
}
commit bdf240c9cfe9348edfded807e433ea8910b9f20f
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Thu Aug 14 17:52:03 2008 +0100
update the pinnumbers if a slot attribute is deleted
Update the slots whenever a text line that is attached to an object
gets deleted. The update checks the slotting even if there's no slot
attribut. This catches the case when the user deletes a slot attribute
and the current displayed pinnumbers are not the ones defined in the
symbol. This commit fixes [#1880221]
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 1030f08..60f6f38 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -208,11 +208,16 @@ static void o_delete_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
void o_delete_text(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
+ OBJECT *o_parent = obj->attached_to;
+
o_erase_single(w_current, obj);
s_delete(toplevel, obj);
toplevel->page_current->object_tail =
- (OBJECT *) return_tail(toplevel->page_current->object_head);
+ (OBJECT *) return_tail(toplevel->page_current->object_head);
+
+ if (o_parent != NULL)
+ o_attrib_slot_update(toplevel, o_parent);
}
/*! \todo Finish function documentation!!!
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index c02d35d..017af04 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -587,8 +587,6 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
/* delete the slot attribute */
o_selection_remove (autotext->w_current->toplevel->page_current->selection_list, o_slot);
o_delete_text (autotext->w_current, o_slot);
- /* redraw the slotted object. So that the pinnumbers appear as with slot=1 */
- /* --> No: should be done by o_delete_text as several dialog use it. */
}
}
}
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 7a59ace..e54c5ba 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -1665,6 +1665,7 @@ void o_attrib_slot_update(TOPLEVEL *toplevel, OBJECT *object)
char *string;
char *slotdef;
int slot;
+ int slot_string;
int pin_counter; /* Internal pin counter private to this fcn. */
char* current_pin; /* text from slotdef= to be made into pinnumber= */
char* cptr; /* char pointer pointing to pinnumbers in slotdef=#:#,#,# string */
@@ -1673,21 +1674,29 @@ void o_attrib_slot_update(TOPLEVEL *toplevel, OBJECT *object)
/* For this particular graphic object (component instantiation) */
/* get the slot number as a string */
string = o_attrib_search_slot(o_current, &o_slot_attrib);
-
+
if (!string) {
- /* s_log_message("Did not find slot= attribute\n"); */
- /* not a serious error */
- return;
+ /* "Did not find slot= attribute", this is true if
+ * * there is no slot attribut
+ * * or the slot attribute was deleted and we have to assume to use the
+ * first slot now
+ */
+ slot = 1;
+ slot_string = 0;
}
- slot = atoi(string);
- g_free(string);
+ else {
+ slot_string = 1;
+ slot = atoi(string);
+ g_free(string);
+ }
/* OK, now that we have the slot number, use it to get the */
/* corresponding slotdef=#:#,#,# string. */
slotdef = o_attrib_search_slotdef(o_current, slot);
- if (!slotdef) {
- s_log_message(_("Did not find slotdef=#:#,#,#... attribute\n"));
+ if (!slotdef) {
+ if (slot_string) /* only an error if there's a slot string */
+ s_log_message(_("Did not find slotdef=#:#,#,#... attribute\n"));
return;
}
commit 3e5a3a547903f04e78c7b54ee68ee544418069a9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Thu Aug 14 17:52:02 2008 +0100
Fix verilog and VHDL netlist backends
These were inadvertently broken when making core gnetlist changes to
accomodate slotting in spice-sdb. Since the netlist backend is loaded
before gnetlist has traversed the schematic, the backends must not
execute any code which queries gnetlist on load. All such work is
to be done only when gnetlist invokes the (<backend>) method.
diff --git a/gnetlist/scheme/gnet-verilog.scm b/gnetlist/scheme/gnet-verilog.scm
index ad31a8b..2675d3d 100644
--- a/gnetlist/scheme/gnet-verilog.scm
+++ b/gnetlist/scheme/gnet-verilog.scm
@@ -343,102 +343,110 @@
;; return a list of net description objects
;;
-(define the-nets '())
-
-(define verilog:get-nets
- (begin
- (for-each
- (lambda (netname)
- ; parse the netname, and see if it is already on the list
- (let* ((parsed (verilog:net-parse netname))
- (listed (assoc (car parsed) the-nets)))
- (if listed
- (begin ; it is, do some checks, and update the record
- ;; extract fields from list
- (let* ((list-name (car listed))
- (list-n1 (car (cadr listed)))
- (list-n2 (cadr (cadr listed)))
- (list-increasing (caddr (cadr listed)))
- (list-sure (cadddr (cadr listed)))
- (list-real (cadddr (cdr (cadr listed))))
-
- (name (car parsed))
- (n1 (car (cadr parsed)))
- (n2 (cadr (cadr parsed)))
- (increasing (caddr (cadr parsed)))
- (sure (cadddr (cadr parsed)))
- (real (cadddr (cdr (cadr parsed))))
-
- (consistant (or (and list-increasing increasing)
- (and (not list-increasing)
- (not increasing))))
-
- )
-
- (cond
- ((and list-sure consistant)
- (begin
- (set-cdr! listed
- (verilog:update-record n1 n2
- list-n1 list-n2
- increasing
- #t
- real)
- )))
- ((and list-sure (not sure) (zero? n1) (zero? n2))
- '() ;; this is a net without any expression, leave it
- )
- ((and list-sure (not consistant))
- (begin ;; order is inconsistent
- (display
- (string-append "Warning: Net `" real "' has a "
- "bit order that conflicts with "
- "the original definition of `"
- list-real "', ignoring `"
- real "'"
- ))
- (newline)))
- ((and (not list-sure) sure consistant)
- (begin
- (set-cdr! listed
- (verilog:update-record n1 n2
- list-n1 list-n2
- increasing
- #t
- real))))
-
- ((and (not list-sure) sure (not consistant))
- (begin
- (set-cdr! listed
- (verilog:update-record n1 n2
- list-n2 list-n1
- increasing
- #t
- real))))
- ((and (not list-sure) (not sure))
- (begin
- (set-cdr! listed
- (verilog:update-record n1 n2
- list-n1 list-n2
- increasing
- #f
- real))))
- (else
- (begin
- (display "This should never happen!")
- (newline)))
- )
- )
- )
- (begin ; it is not, just add it to the end
- (set! the-nets
- (append the-nets
- (list parsed))))
- ))
- )
-
- all-unique-nets)
- the-nets))
+
+(define verilog:get-nets '())
+
+
+(define verilog:get-nets-once!
+ (lambda nil
+ (define the-nets '())
+ (set! verilog:get-nets
+ (begin
+ (for-each
+ (lambda (netname)
+ ; parse the netname, and see if it is already on the list
+ (let* ((parsed (verilog:net-parse netname))
+ (listed (assoc (car parsed) the-nets)))
+ (if listed
+ (begin ; it is, do some checks, and update the record
+ ;; extract fields from list
+ (let* ((list-name (car listed))
+ (list-n1 (car (cadr listed)))
+ (list-n2 (cadr (cadr listed)))
+ (list-increasing (caddr (cadr listed)))
+ (list-sure (cadddr (cadr listed)))
+ (list-real (cadddr (cdr (cadr listed))))
+
+ (name (car parsed))
+ (n1 (car (cadr parsed)))
+ (n2 (cadr (cadr parsed)))
+ (increasing (caddr (cadr parsed)))
+ (sure (cadddr (cadr parsed)))
+ (real (cadddr (cdr (cadr parsed))))
+
+ (consistant (or (and list-increasing increasing)
+ (and (not list-increasing)
+ (not increasing))))
+
+ )
+
+ (cond
+ ((and list-sure consistant)
+ (begin
+ (set-cdr! listed
+ (verilog:update-record n1 n2
+ list-n1 list-n2
+ increasing
+ #t
+ real)
+ )))
+ ((and list-sure (not sure) (zero? n1) (zero? n2))
+ '() ;; this is a net without any expression, leave it
+ )
+ ((and list-sure (not consistant))
+ (begin ;; order is inconsistent
+ (display
+ (string-append "Warning: Net `" real "' has a "
+ "bit order that conflicts with "
+ "the original definition of `"
+ list-real "', ignoring `"
+ real "'"
+ ))
+ (newline)))
+ ((and (not list-sure) sure consistant)
+ (begin
+ (set-cdr! listed
+ (verilog:update-record n1 n2
+ list-n1 list-n2
+ increasing
+ #t
+ real))))
+
+ ((and (not list-sure) sure (not consistant))
+ (begin
+ (set-cdr! listed
+ (verilog:update-record n1 n2
+ list-n2 list-n1
+ increasing
+ #t
+ real))))
+ ((and (not list-sure) (not sure))
+ (begin
+ (set-cdr! listed
+ (verilog:update-record n1 n2
+ list-n1 list-n2
+ increasing
+ #f
+ real))))
+ (else
+ (begin
+ (display "This should never happen!")
+ (newline)))
+ )
+ )
+ )
+ (begin ; it is not, just add it to the end
+ (set! the-nets
+ (append the-nets
+ (list parsed))))
+ ))
+ )
+
+ all-unique-nets)
+ the-nets)
+ )
+ verilog:get-nets
+))
;; Retrieve the requested net record from the database.
@@ -624,6 +632,7 @@
(lambda (output-filename)
(let ((port (open-output-file output-filename)))
(begin
+ (verilog:get-nets-once!)
(verilog:write-top-header port)
(verilog:write-wires port)
(verilog:write-continuous-assigns port)
diff --git a/gnetlist/scheme/gnet-vhdl.scm b/gnetlist/scheme/gnet-vhdl.scm
index 0b4bcf1..dea8b66 100644
--- a/gnetlist/scheme/gnet-vhdl.scm
+++ b/gnetlist/scheme/gnet-vhdl.scm
@@ -418,8 +418,9 @@
;;;
(define unique-devices
- (vhdl:get-unique-devices (map get-device packages))
-)
+ (lambda nil
+ (vhdl:get-unique-devices (map get-device packages))
+))
;;; Signal Declaration
@@ -516,7 +517,7 @@
; Due to my taste will the component declarations go first
; XXX - Broken until someday
; THHE fixed today ;-)
- (vhdl:write-component-declarations unique-devices p)
+ (vhdl:write-component-declarations (unique-devices) p)
; Then comes the signal declatations
(vhdl:write-signal-declarations p)
)
commit 906fb6012fe6a69f384aebc82e48ebd9ededc750
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date: Thu Aug 14 17:52:02 2008 +0100
Fix missing %s in two strings.
Two strings missed %s. Thanks to Peter Clifton for reporting.
diff --git a/libgeda/po/es_ES.po b/libgeda/po/es_ES.po
index 1d3e008..2b3fcbc 100644
--- a/libgeda/po/es_ES.po
+++ b/libgeda/po/es_ES.po
@@ -157,8 +157,8 @@ msgstr "No se puede averiguar el nombre real del archivo %s."
#, c-format
msgid "Could NOT set previous backup file [%s] read-write\n"
msgstr ""
-"No se ha podido poner el archivo de copia de seguridad anterior en modo de "
-"lectura-escritura\n"
+"No se ha podido poner el archivo de copia de seguridad anterior [%s] "
+"en modo de lectura-escritura\n"
#: ../src/f_basic.c:393
#, c-format
@@ -169,8 +169,8 @@ msgstr "No se puede guardar la copia de seguridad: %s"
#, c-format
msgid "Could NOT set backup file [%s] readonly\n"
msgstr ""
-"No se ha podido poner el archivo de copia de seguridad anterior en modo de "
-"sólo lectura\n"
+"No se ha podido poner el archivo de copia de seguridad [%s] "
+"en modo de sólo lectura\n"
#: ../src/f_basic.c:538
#, c-format
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs