A '$' is also allowed in identifier names (dumpers)

Update the dumper escaped identifier check to allow a '$'
character after the first character in a normal identifier.
(cherry picked from commit 2e0accf812)
This commit is contained in:
Cary R 2011-03-13 12:04:40 -07:00 committed by Stephen Williams
parent b1b54ff531
commit 6b4de9aa82
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com)
* Copyright (c) 2003-2011 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -36,7 +36,8 @@ int is_escaped_id(const char *name)
for (lp=1; name[lp] != '\0'; lp++) {
/* If this digit is not alpha-numeric or '_' we have
* an escaped identifier. */
if (!(isalnum((int)name[lp]) || name[lp] == '_')) {
if (!(isalnum((int)name[lp]) ||
name[lp] == '_') || name[lp] == '$') {
return 1;
}
}