[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: x_autonumber.c
User: werner
Date: 06/12/31 06:56:03
Modified: . x_autonumber.c
Log:
* src/x_autonumber.c: fixed a bug if one searchtext is a subset
of another one. Bug reported by Levente Kovacs.
Revision Changes Path
1.8 +4 -1 eda/geda/gaf/gschem/src/x_autonumber.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_autonumber.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_autonumber.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- x_autonumber.c 28 Dec 2006 10:13:37 -0000 1.7
+++ x_autonumber.c 31 Dec 2006 11:56:03 -0000 1.8
@@ -344,6 +344,9 @@
/* now look for the extension, either a number or the "?" */
if (g_str_has_suffix (o_current->text->string,"?")) {
isnumbered = 0;
+ /* There must not be any character between the "?" and the searchtext */
+ if (strlen(o_current->text->string) != len+1)
+ return AUTONUMBER_IGNORE;
}
else {
if (!isdigit( (int) (o_current->text->string[len]) )) /* has at least one digit */
@@ -748,7 +751,7 @@
/* Step3: iterate over the search items in the list */
for (text_item=searchtext_list; text_item !=NULL; text_item=g_list_next(text_item)) {
autotext->current_searchtext = text_item->data;
- // printf("autonumber_text2: searchtext %s\n", autotext->current_searchtext);
+ // printf("autonumber_text_autonumber: searchtext %s\n", autotext->current_searchtext);
/* decide whether to renumber page by page or get a global used-list */
if (autotext->scope_skip == SCOPE_HIERARCHY) { /* whole hierarchy database */
/* renumbering all means that no db is required */
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs