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;
|
const char *iptr;
|
||||||
(iptr - s) = *pi - s;
|
iptr = *pi - s + s;
|
||||||
int ia, ls, level;
|
int ia, ls, level;
|
||||||
char c, d;
|
char c, d;
|
||||||
nupa_type tpe;
|
nupa_type tpe;
|
||||||
|
|
@ -1355,15 +1355,15 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
if (s[ia - 1] == '"') {
|
if (s[ia - 1] == '"') {
|
||||||
/* string constant */
|
/* string constant */
|
||||||
ia++;
|
ia++;
|
||||||
(iptr - s) = ia;
|
iptr = ia + s;
|
||||||
|
|
||||||
while (((iptr - s) < ls) && (s[(iptr - s) - 1] != '"'))
|
while (((iptr - s) < ls) && (s[(iptr - s) - 1] != '"'))
|
||||||
(iptr - s)++;
|
iptr++;
|
||||||
|
|
||||||
tpe = NUPA_STRING;
|
tpe = NUPA_STRING;
|
||||||
|
|
||||||
do
|
do
|
||||||
(iptr - s)++;
|
iptr++;
|
||||||
while (((iptr - s) <= ls) && (s[(iptr - s) - 1] <= ' '));
|
while (((iptr - s) <= ls) && (s[(iptr - s) - 1] <= ' '));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1371,11 +1371,11 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
if (s[ia - 1] == '{')
|
if (s[ia - 1] == '{')
|
||||||
ia++;
|
ia++;
|
||||||
|
|
||||||
(iptr - s) = ia - 1;
|
iptr = ia - 1 + s;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
(iptr - s)++;
|
iptr++;
|
||||||
|
|
||||||
if ((iptr - s) > ls)
|
if ((iptr - s) > ls)
|
||||||
c = ';';
|
c = ';';
|
||||||
|
|
@ -1387,7 +1387,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
level = 1;
|
level = 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
(iptr - s)++;
|
iptr++;
|
||||||
|
|
||||||
if ((iptr - s) > ls)
|
if ((iptr - s) > ls)
|
||||||
d = '\0';
|
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);
|
pscopy(tstr_p, s, ia-1, (int) (iptr - s) - ia);
|
||||||
|
|
||||||
if (s[(iptr - s) - 1] == '}')
|
if (s[(iptr - s) - 1] == '}')
|
||||||
(iptr - s)++;
|
iptr++;
|
||||||
|
|
||||||
if (tpe == NUPA_STRING)
|
if (tpe == NUPA_STRING)
|
||||||
(iptr - s)++; /* beyond quote */
|
iptr++; /* beyond quote */
|
||||||
|
|
||||||
*pi = s + (iptr - s);
|
*pi = s + (iptr - s);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue