summaryrefslogtreecommitdiffstats
path: root/cpukit/httpd/value.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-04-11 14:46:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-04-11 14:46:55 +0000
commitee3afa2e2ae017b22156164763a4099702ca472d (patch)
treed41c03f7bf2396e7e01147a9ffd75c7a0a71232c /cpukit/httpd/value.c
parent2003-04-10 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-ee3afa2e2ae017b22156164763a4099702ca472d.tar.bz2
2002-04-10 Mike Siers <mikes@poliac.com>
* rtems_webserver/NOTES, rtems_webserver/asp.c, rtems_webserver/balloc.c, rtems_webserver/default.c, rtems_webserver/ej.h, rtems_webserver/ejIntrn.h, rtems_webserver/ejlex.c, rtems_webserver/ejparse.c, rtems_webserver/emfdb.c, rtems_webserver/emfdb.h, rtems_webserver/form.c, rtems_webserver/h.c, rtems_webserver/handler.c, rtems_webserver/license.txt, rtems_webserver/md5.h, rtems_webserver/md5c.c, rtems_webserver/mime.c, rtems_webserver/misc.c, rtems_webserver/ringq.c, rtems_webserver/rom.c, rtems_webserver/security.c, rtems_webserver/sock.c, rtems_webserver/sym.c, rtems_webserver/uemf.c, rtems_webserver/uemf.h, rtems_webserver/um.c, rtems_webserver/um.h, rtems_webserver/url.c, rtems_webserver/value.c, rtems_webserver/wbase64.c, rtems_webserver/webcomp.c, rtems_webserver/webpage.c, rtems_webserver/webrom.c, rtems_webserver/webs.c, rtems_webserver/webs.h, rtems_webserver/websuemf.c, rtems_webserver/wsIntrn.h: Update to GoAhead Webserver 2.1.4. The following URL is the release notes from GoAhead. http://data.goahead.com/Software/Webserver/2.1.4/release.htm I have only done a minimal amount of testing (i.e. the network demo program works fine). Please try this out and let me know if it works. The patch needs to be applied on the c/src/libnetworking/rtems_webserver directory.
Diffstat (limited to 'cpukit/httpd/value.c')
-rw-r--r--cpukit/httpd/value.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/cpukit/httpd/value.c b/cpukit/httpd/value.c
index 97dba81633..ac21ec6afe 100644
--- a/cpukit/httpd/value.c
+++ b/cpukit/httpd/value.c
@@ -2,6 +2,8 @@
* value.c -- Generic type (holds all types)
*
* Copyright (c) GoAhead Software Inc., 1995-2000. All Rights Reserved.
+ *
+ * $Id$
*/
/******************************** Description *********************************/
@@ -13,14 +15,14 @@
/********************************* Includes ***********************************/
-#if UEMF
+#ifdef UEMF
#include "uemf.h"
#else
#include "basic/basicInternal.h"
#endif
/*********************************** Locals ***********************************/
-#if !UEMF
+#ifndef UEMF
static value_t value_null; /* All zeros */
/***************************** Forward Declarations ***************************/
@@ -77,7 +79,7 @@ void valueFree(value_t* v)
v->value.string != NULL) {
bfree(B_L, v->value.string);
}
-#if !UEMF
+#ifndef UEMF
if (v->valid && v->type == symbol && v->value.symbol.data != NULL &&
v->value.symbol.freeCb !=NULL) {
v->value.symbol.freeCb(v->value.symbol.data);
@@ -88,7 +90,7 @@ void valueFree(value_t* v)
v->allocated = 0;
}
-#if !UEMF
+#ifndef UEMF
/******************************************************************************/
/*
@@ -151,7 +153,7 @@ value_t valueShortint(short value)
return v;
}
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
/******************************************************************************/
/*
* Initialize a floating value.
@@ -336,7 +338,7 @@ value_t valueAdd(value_t v1, value_t v2)
a_assert(0);
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
v1.value.floating += v2.value.floating;
return v1;
@@ -393,7 +395,7 @@ value_t valueSub(value_t v1, value_t v2)
a_assert(0);
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
v1.value.floating -= v2.value.floating;
return v1;
@@ -454,7 +456,7 @@ value_t valueMul(value_t v1, value_t v2)
a_assert(v1.type != flag);
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
v1.value.floating *= v2.value.floating;
return v1;
@@ -511,7 +513,7 @@ value_t valueDiv(value_t v1, value_t v2)
a_assert(v1.type != flag);
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
v1.value.floating /= v2.value.floating;
return v1;
@@ -582,7 +584,7 @@ int valueCmp(value_t v1, value_t v2)
return 0;
else return 1;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
if (v1.value.floating < v2.value.floating)
return -1;
@@ -633,7 +635,7 @@ int valueCmp(value_t v1, value_t v2)
static void coerce_types(register value_t* v1, register value_t* v2)
{
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
if (v1->type == floating) {
v2->type = floating;
v2->value.floating = (double) v2->value.integer;
@@ -700,7 +702,7 @@ int valueNegative(value_t* vp)
case bytes:
return 0;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
if (vp->value.floating < 0)
return 1;
@@ -750,7 +752,7 @@ int valueZero(value_t* vp)
case bytes:
return 0;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
if (vp->value.floating == 0)
return 1;
@@ -801,7 +803,7 @@ static int value_to_integer(value_t* vp)
case string:
case bytes:
case big:
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
a_assert(0);
return -1;
@@ -852,7 +854,7 @@ void valueSprintf(char_t** out, int size, char_t* fmt, value_t vp)
}
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
if (fmt == NULL || *fmt == '\0') {
fmtAlloc(out, size, T("%f"), vp.value.floating);
@@ -961,7 +963,7 @@ void valueSprintf(char_t** out, int size, char_t* fmt, value_t vp)
}
break;
-#if UNUSED
+#ifdef UNUSED
case bytes:
asrc = vp.value.bytes;
@@ -1168,7 +1170,7 @@ value_t valueAtov(char_t* s, int pref_type)
}
break;
-#if FLOATING_POINT_SUPPORT
+#ifdef FLOATING_POINT_SUPPORT
case floating:
gsscanf(s, T("%f"), &v.value.floating);
break;
@@ -1191,7 +1193,7 @@ value_t valueAtov(char_t* s, int pref_type)
v = valueBytes((char*) s, VALUE_ALLOCATE);
break;
-#if UNUSED
+#ifdef UNUSED
case literal:
v = value_literal(bstrdup(B_L, s));
v.value.literal[len] = '\0';