getexpress(), rename ls_ptr --> s_end
This commit is contained in:
parent
043a04b775
commit
35524f7e48
|
|
@ -1340,11 +1340,11 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
|
||||||
returns tpe=='R' if (numeric, 'S' if (string only
|
returns tpe=='R' if (numeric, 'S' if (string only
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
const char * const ls_ptr = s + strlen(s);
|
const char * const s_end = s + strlen(s);
|
||||||
const char *p;
|
const char *p;
|
||||||
nupa_type tpe;
|
nupa_type tpe;
|
||||||
|
|
||||||
while ((s < ls_ptr - 1) && (*s <= ' '))
|
while ((s < s_end - 1) && (*s <= ' '))
|
||||||
s++; /*white space ? */
|
s++; /*white space ? */
|
||||||
|
|
||||||
if (*s == '"') { /* string constant */
|
if (*s == '"') { /* string constant */
|
||||||
|
|
@ -1352,12 +1352,12 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
|
||||||
s++;
|
s++;
|
||||||
p = s;
|
p = s;
|
||||||
|
|
||||||
while ((p < ls_ptr - 1) && (*p != '"'))
|
while ((p < s_end - 1) && (*p != '"'))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
do
|
do
|
||||||
p++;
|
p++;
|
||||||
while ((p < ls_ptr) && (*p <= ' '));
|
while ((p < s_end) && (*p <= ' '));
|
||||||
|
|
||||||
tpe = NUPA_STRING;
|
tpe = NUPA_STRING;
|
||||||
|
|
||||||
|
|
@ -1368,7 +1368,7 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
|
||||||
|
|
||||||
p = s;
|
p = s;
|
||||||
|
|
||||||
for (; p < ls_ptr; p++) {
|
for (; p < s_end; p++) {
|
||||||
|
|
||||||
if (strchr(",;)}", *p)) /* legal separators */
|
if (strchr(",;)}", *p)) /* legal separators */
|
||||||
break;
|
break;
|
||||||
|
|
@ -1377,7 +1377,7 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
|
||||||
/* sub-formula */
|
/* sub-formula */
|
||||||
int level = 1;
|
int level = 1;
|
||||||
p++;
|
p++;
|
||||||
for (; p < ls_ptr; p++) {
|
for (; p < s_end; p++) {
|
||||||
|
|
||||||
char d = *p;
|
char d = *p;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue