allow model names starting with underscore _

This commit is contained in:
Holger Vogt 2018-11-01 18:50:09 +01:00
parent bee866b926
commit df411ad1c9
1 changed files with 4 additions and 0 deletions

View File

@ -1821,6 +1821,10 @@ is_a_modelname(const char *s)
if (isalpha_c(s[0]))
return TRUE;
/* people use model names starting with '_' */
if (s[0] == '_')
return TRUE;
/* e.g. 1N4002, but do not accept floats (for example 1E2) */
if (isdigit_c(s[0]) && isalpha_c(s[1]) && isdigit_c(s[2]) && toupper_c(s[1]) != 'E')
return TRUE;