Merged changes from 3.14 branch up to revno 12530
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
int dbStaticDebug = 0;
|
||||
static char *pNullString = "";
|
||||
#define messagesize 100
|
||||
#define RPCL_LEN 184
|
||||
#define RPCL_LEN INFIX_TO_POSTFIX_SIZE(80)
|
||||
|
||||
static char *ppstring[5]={"NPP","PP","CA","CP","CPP"};
|
||||
static char *msstring[4]={"NMS","MS","MSI","MSS"};
|
||||
|
||||
@@ -100,7 +100,7 @@ int epicsStrnRawFromEscaped(char *dst, size_t dstlen, const char *src,
|
||||
{ /* \xXXX... */
|
||||
unsigned int u = 0;
|
||||
|
||||
if (!srclen-- || !(c = *src++))
|
||||
if (!srclen-- || !(c = *src++ & 0xff))
|
||||
goto done;
|
||||
|
||||
while (isxdigit(c)) {
|
||||
@@ -108,7 +108,7 @@ int epicsStrnRawFromEscaped(char *dst, size_t dstlen, const char *src,
|
||||
if (u > 0xff) {
|
||||
/* Undefined behaviour! */
|
||||
}
|
||||
if (!srclen-- || !(c = *src++)) {
|
||||
if (!srclen-- || !(c = *src++ & 0xff)) {
|
||||
OUT(u);
|
||||
goto done;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ int epicsStrnEscapedFromRaw(char *dst, size_t dstlen, const char *src,
|
||||
case '\'': OUT('\\'); OUT('\''); break;
|
||||
case '\"': OUT('\\'); OUT('\"'); break;
|
||||
default:
|
||||
if (isprint(c)) {
|
||||
if (isprint(c & 0xff)) {
|
||||
OUT(c);
|
||||
break;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ size_t epicsStrnEscapedFromRawSize(const char *src, size_t srclen)
|
||||
ndst++;
|
||||
break;
|
||||
default:
|
||||
if (!isprint(c))
|
||||
if (!isprint(c & 0xff))
|
||||
ndst += 3;
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ int epicsStrPrintEscaped(FILE *fp, const char *s, size_t len)
|
||||
case '\'': nout += fprintf(fp, "\\'"); break;
|
||||
case '\"': nout += fprintf(fp, "\\\""); break;
|
||||
default:
|
||||
if (isprint((int)c))
|
||||
if (isprint(0xff & (int)c))
|
||||
nout += fprintf(fp, "%c", c);
|
||||
else
|
||||
nout += fprintf(fp, "\\%03o", (unsigned char)c);
|
||||
|
||||
@@ -553,10 +553,18 @@ MAIN(epicsCalcTest)
|
||||
testExpr(0.0 + NaN);
|
||||
testExpr(Inf + 0.0);
|
||||
testExpr(Inf + Inf);
|
||||
#if defined(_WIN64) && defined(_MSC_VER)
|
||||
testCalc("Inf + -Inf", NaN);
|
||||
#else
|
||||
testExpr(Inf + -Inf);
|
||||
#endif
|
||||
testExpr(Inf + NaN);
|
||||
testExpr(-Inf + 0.0);
|
||||
#if defined(_WIN64) && defined(_MSC_VER)
|
||||
testCalc("-Inf + Inf", NaN);
|
||||
#else
|
||||
testExpr(-Inf + Inf);
|
||||
#endif
|
||||
testExpr(-Inf + -Inf);
|
||||
testExpr(-Inf + NaN);
|
||||
testExpr(NaN + 0.0);
|
||||
|
||||
Reference in New Issue
Block a user