FSCORE-253 work around netbsd failures
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10762 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6113ab943c
commit
5c5d03bcdc
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "exprpriv.h"
|
#include "exprpriv.h"
|
||||||
#include "exprmem.h"
|
#include "exprmem.h"
|
||||||
|
#include "switch_utils.h"
|
||||||
|
|
||||||
/* Data structure used by parser */
|
/* Data structure used by parser */
|
||||||
typedef struct _exprToken {
|
typedef struct _exprToken {
|
||||||
|
@ -314,12 +315,12 @@ int exprStringToTokenList(exprObj * obj, char *expr, exprToken ** tokens, int *c
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (!comment) {
|
if (!comment) {
|
||||||
if (expr[pos] == '.' || isdigit(expr[pos])) {
|
if (expr[pos] == '.' || switch_isdigit(expr[pos])) {
|
||||||
/* Value */
|
/* Value */
|
||||||
start = pos;
|
start = pos;
|
||||||
|
|
||||||
/* Find digits before a period */
|
/* Find digits before a period */
|
||||||
while (isdigit(expr[pos]))
|
while (switch_isdigit(expr[pos]))
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
/* Find a period */
|
/* Find a period */
|
||||||
|
@ -327,7 +328,7 @@ int exprStringToTokenList(exprObj * obj, char *expr, exprToken ** tokens, int *c
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
/* Find digits after a period */
|
/* Find digits after a period */
|
||||||
while (isdigit(expr[pos]))
|
while (switch_isdigit(expr[pos]))
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
/* pos is AFTER last item, back up */
|
/* pos is AFTER last item, back up */
|
||||||
|
@ -356,12 +357,12 @@ int exprStringToTokenList(exprObj * obj, char *expr, exprToken ** tokens, int *c
|
||||||
list[tpos].data.val = (EXPRTYPE) atof(buf);
|
list[tpos].data.val = (EXPRTYPE) atof(buf);
|
||||||
tpos++;
|
tpos++;
|
||||||
}
|
}
|
||||||
} else if (expr[pos] == '_' || isalpha(expr[pos])) {
|
} else if (expr[pos] == '_' || switch_isalpha(expr[pos])) {
|
||||||
/* Identifier */
|
/* Identifier */
|
||||||
start = pos;
|
start = pos;
|
||||||
|
|
||||||
/* Find rest of identifier */
|
/* Find rest of identifier */
|
||||||
while (expr[pos] == '_' || isalnum(expr[pos]))
|
while (expr[pos] == '_' || switch_isalnum(expr[pos]))
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
/* pos is AFTER last item, back up */
|
/* pos is AFTER last item, back up */
|
||||||
|
@ -397,7 +398,7 @@ int exprStringToTokenList(exprObj * obj, char *expr, exprToken ** tokens, int *c
|
||||||
strcpy(list[tpos].data.str, buf);
|
strcpy(list[tpos].data.str, buf);
|
||||||
tpos++;
|
tpos++;
|
||||||
}
|
}
|
||||||
} else if (isspace(expr[pos])) {
|
} else if (switch_isspace(expr[pos])) {
|
||||||
/* Spaces are ignored, do nothing */
|
/* Spaces are ignored, do nothing */
|
||||||
} else {
|
} else {
|
||||||
/* Unknown */
|
/* Unknown */
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "exprincl.h"
|
#include "exprincl.h"
|
||||||
|
|
||||||
#include "exprpriv.h"
|
#include "exprpriv.h"
|
||||||
|
#include "switch_utils.h"
|
||||||
|
|
||||||
|
|
||||||
/* Return the version number */
|
/* Return the version number */
|
||||||
|
@ -27,13 +28,13 @@ int exprValidIdent(char *name)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* First must be letter or underscore */
|
/* First must be letter or underscore */
|
||||||
if (isalpha(*name) || *name == '_')
|
if (switch_isalpha(*name) || *name == '_')
|
||||||
name++; /* Point to next letter */
|
name++; /* Point to next letter */
|
||||||
else
|
else
|
||||||
return 0; /* Not letter or underscore, maybe empty */
|
return 0; /* Not letter or underscore, maybe empty */
|
||||||
|
|
||||||
/* others can be letter, number, or underscore */
|
/* others can be letter, number, or underscore */
|
||||||
while (isalnum(*name) || *name == '_')
|
while (switch_isalnum(*name) || *name == '_')
|
||||||
name++;
|
name++;
|
||||||
|
|
||||||
/* When the while breaks out, we should be at the end */
|
/* When the while breaks out, we should be at the end */
|
||||||
|
|
Loading…
Reference in New Issue