--- l2_ut_param.c 2002/07/30 19:08:25 1.9
+++ l2_ut_param.c 2003/01/06 11:41:52 1.10
@@ -1,9 +1,10 @@
/*
-** OSSP l2 - Logging Library
-** Copyright (c) 2001-2002 The OSSP Project (http://www.ossp.org/)
-** Copyright (c) 2001-2002 Cable & Wireless Deutschland (http://www.cw.com/de/)
+** OSSP l2 - Flexible Logging
+** Copyright (c) 2001-2003 Cable & Wireless Deutschland GmbH
+** Copyright (c) 2001-2003 The OSSP Project (http://www.ossp.org/)
+** Copyright (c) 2001-2003 Ralf S. Engelschall <rse@engelschall.com>
**
-** This file is part of OSSP L2, a flexible logging library which
+** This file is part of OSSP l2, a flexible logging library which
** can be found at http://www.ossp.org/pkg/lib/l2/.
**
** Permission to use, copy, modify, and distribute this software for
@@ -41,7 +42,7 @@
char *cpB, *cpE;
char *spec;
int ok;
- int i;
+ int i;
int n;
/* argument sanity check */
@@ -62,7 +63,7 @@
/* determine end of parameter name */
cpE = cpB;
if (!isalpha((int)*cpE)) {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"expected alpha-numerical parameter "
"start character, got '%c'", *cpE);
return L2_ERR_ARG;
@@ -71,7 +72,7 @@
while (isalnum((int)*cpE))
cpE++;
if (*cpE != '=') {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"expected assignment operator ('='), "
"got '%c'", *cpE);
return L2_ERR_ARG;
@@ -134,13 +135,13 @@
else
val = strtol(cpB, &cpE, 10);
if ((val == LONG_MIN || val == LONG_MAX) && errno == ERANGE) {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"numerical parameter value out of range "
"('%s')", cpB);
return L2_ERR_ARG;
}
if (*cpE != '\0') {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"expected valid numerical parameter value, "
"got '%c' character", *cpE);
return L2_ERR_ARG;
@@ -152,18 +153,18 @@
/* floating point parameter */
double val = strtod(cpB, &cpE);
if (val == HUGE_VAL && errno == ERANGE) {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"floating point parameter value too huge "
"('%s')", cpB);
return L2_ERR_ARG;
}
if (val == 0 && cpE == cpB) {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"floating point parameter value conversion failed "
"('%s')", cpB);
}
if (*cpE != '\0') {
- l2_env_errorinfo(env, L2_ERR_ARG,
+ l2_env_errorinfo(env, L2_ERR_ARG,
"expected valid floating point parameter value, "
"got '%c' character", *cpE);
return L2_ERR_ARG;
@@ -173,7 +174,7 @@
}
case L2_TYPE_STR: {
/* string parameter */
- if (*(char **)(pa[i].store) != NULL)
+ if (*(char **)(pa[i].store) != NULL)
free(*(char **)(pa[i].store));
*(char **)(pa[i].store) = strdup(cpB);
break;
|