[Freeswitch-svn] [commit] r10762 - freeswitch/trunk/src/mod/applications/mod_expr
FreeSWITCH SVN
mikej at freeswitch.org
Sun Dec 14 19:28:24 PST 2008
Author: mikej
Date: Sun Dec 14 22:28:23 2008
New Revision: 10762
Log:
FSCORE-253 work around netbsd failures
Modified:
freeswitch/trunk/src/mod/applications/mod_expr/exprpars.c
freeswitch/trunk/src/mod/applications/mod_expr/exprutil.c
Modified: freeswitch/trunk/src/mod/applications/mod_expr/exprpars.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_expr/exprpars.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_expr/exprpars.c Sun Dec 14 22:28:23 2008
@@ -12,6 +12,7 @@
#include "exprpriv.h"
#include "exprmem.h"
+#include "switch_utils.h"
/* Data structure used by parser */
typedef struct _exprToken {
@@ -314,12 +315,12 @@
default:
{
if (!comment) {
- if (expr[pos] == '.' || isdigit(expr[pos])) {
+ if (expr[pos] == '.' || switch_isdigit(expr[pos])) {
/* Value */
start = pos;
/* Find digits before a period */
- while (isdigit(expr[pos]))
+ while (switch_isdigit(expr[pos]))
pos++;
/* Find a period */
@@ -327,7 +328,7 @@
pos++;
/* Find digits after a period */
- while (isdigit(expr[pos]))
+ while (switch_isdigit(expr[pos]))
pos++;
/* pos is AFTER last item, back up */
@@ -356,12 +357,12 @@
list[tpos].data.val = (EXPRTYPE) atof(buf);
tpos++;
}
- } else if (expr[pos] == '_' || isalpha(expr[pos])) {
+ } else if (expr[pos] == '_' || switch_isalpha(expr[pos])) {
/* Identifier */
start = pos;
/* Find rest of identifier */
- while (expr[pos] == '_' || isalnum(expr[pos]))
+ while (expr[pos] == '_' || switch_isalnum(expr[pos]))
pos++;
/* pos is AFTER last item, back up */
@@ -397,7 +398,7 @@
strcpy(list[tpos].data.str, buf);
tpos++;
}
- } else if (isspace(expr[pos])) {
+ } else if (switch_isspace(expr[pos])) {
/* Spaces are ignored, do nothing */
} else {
/* Unknown */
Modified: freeswitch/trunk/src/mod/applications/mod_expr/exprutil.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_expr/exprutil.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_expr/exprutil.c Sun Dec 14 22:28:23 2008
@@ -11,6 +11,7 @@
#include "exprincl.h"
#include "exprpriv.h"
+#include "switch_utils.h"
/* Return the version number */
@@ -27,13 +28,13 @@
return 0;
/* First must be letter or underscore */
- if (isalpha(*name) || *name == '_')
+ if (switch_isalpha(*name) || *name == '_')
name++; /* Point to next letter */
else
return 0; /* Not letter or underscore, maybe empty */
/* others can be letter, number, or underscore */
- while (isalnum(*name) || *name == '_')
+ while (switch_isalnum(*name) || *name == '_')
name++;
/* When the while breaks out, we should be at the end */
More information about the Freeswitch-svn
mailing list