1348: find last dot

This commit is contained in:
h_vogt 2009-05-10 19:29:13 +00:00
parent e778aab344
commit b16759cf97
2 changed files with 20 additions and 16 deletions

View File

@ -1,3 +1,6 @@
2009-05-10 Holger Vogt
* subckt.c:1348 find last dot, not first dot in model_name
2009-05-09 Holger Vogt
* graf.c: graphics scaling during iplot mad ea little more
convenient

View File

@ -1340,23 +1340,24 @@ gettrans(char *name)
static bool
model_bin_match( char* token, char* model_name )
{
char* dot_char;
bool flag = FALSE;
if ( strncmp( model_name, token, strlen(token) ) == 0 ) {
if ( (dot_char = strstr( model_name, "." )) ) {
flag = TRUE;
dot_char++;
while( *dot_char != '\0' ) {
if ( !isdigit( *dot_char ) ) {
flag = FALSE;
break;
}
dot_char++;
char* dot_char;
bool flag = FALSE;
/* continue evaluation if toeken is part of model_name */
if ( strncmp( model_name, token, strlen(token) ) == 0 ) {
/* find last dot in model_name */
if ( (dot_char = strrchr( model_name, '.' )) ) {
flag = TRUE;
dot_char++;
while( *dot_char != '\0' ) {
if ( !isdigit( *dot_char ) ) {
flag = FALSE;
break;
}
dot_char++;
}
}
}
}
return flag;
}
return flag;
}
/*-------------------------------------------------------------------*/