getexpress(), fix lvalues
This commit is contained in:
parent
c351f2f19b
commit
f19ddf6090
|
|
@ -1341,7 +1341,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
|||
*/
|
||||
{
|
||||
const char *iptr;
|
||||
(iptr - s) = *pi - s;
|
||||
iptr = *pi - s + s;
|
||||
int ia, ls, level;
|
||||
char c, d;
|
||||
nupa_type tpe;
|
||||
|
|
@ -1355,15 +1355,15 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
|||
if (s[ia - 1] == '"') {
|
||||
/* string constant */
|
||||
ia++;
|
||||
(iptr - s) = ia;
|
||||
iptr = ia + s;
|
||||
|
||||
while (((iptr - s) < ls) && (s[(iptr - s) - 1] != '"'))
|
||||
(iptr - s)++;
|
||||
iptr++;
|
||||
|
||||
tpe = NUPA_STRING;
|
||||
|
||||
do
|
||||
(iptr - s)++;
|
||||
iptr++;
|
||||
while (((iptr - s) <= ls) && (s[(iptr - s) - 1] <= ' '));
|
||||
|
||||
} else {
|
||||
|
|
@ -1371,11 +1371,11 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
|||
if (s[ia - 1] == '{')
|
||||
ia++;
|
||||
|
||||
(iptr - s) = ia - 1;
|
||||
iptr = ia - 1 + s;
|
||||
|
||||
do
|
||||
{
|
||||
(iptr - s)++;
|
||||
iptr++;
|
||||
|
||||
if ((iptr - s) > ls)
|
||||
c = ';';
|
||||
|
|
@ -1387,7 +1387,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
|||
level = 1;
|
||||
do
|
||||
{
|
||||
(iptr - s)++;
|
||||
iptr++;
|
||||
|
||||
if ((iptr - s) > ls)
|
||||
d = '\0';
|
||||
|
|
@ -1410,10 +1410,10 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
|||
pscopy(tstr_p, s, ia-1, (int) (iptr - s) - ia);
|
||||
|
||||
if (s[(iptr - s) - 1] == '}')
|
||||
(iptr - s)++;
|
||||
iptr++;
|
||||
|
||||
if (tpe == NUPA_STRING)
|
||||
(iptr - s)++; /* beyond quote */
|
||||
iptr++; /* beyond quote */
|
||||
|
||||
*pi = s + (iptr - s);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue