You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/09/28 05:28:09 UTC
svn commit: r580207 [1/3] - in /webservices/axis2/trunk/c/util/src: ./
minizip/ platforms/unix/
Author: samisa
Date: Thu Sep 27 20:28:06 2007
New Revision: 580207
URL: http://svn.apache.org/viewvc?rev=580207&view=rev
Log:
Fixed indentation
Modified:
webservices/axis2/trunk/c/util/src/array_list.c
webservices/axis2/trunk/c/util/src/base64.c
webservices/axis2/trunk/c/util/src/base64_binary.c
webservices/axis2/trunk/c/util/src/class_loader.c
webservices/axis2/trunk/c/util/src/date_time.c
webservices/axis2/trunk/c/util/src/dir_handler.c
webservices/axis2/trunk/c/util/src/dll_desc.c
webservices/axis2/trunk/c/util/src/duration.c
webservices/axis2/trunk/c/util/src/env.c
webservices/axis2/trunk/c/util/src/error.c
webservices/axis2/trunk/c/util/src/file.c
webservices/axis2/trunk/c/util/src/generic_obj.c
webservices/axis2/trunk/c/util/src/hash.c
webservices/axis2/trunk/c/util/src/linked_list.c
webservices/axis2/trunk/c/util/src/log.c
webservices/axis2/trunk/c/util/src/minizip/archive_extract.c
webservices/axis2/trunk/c/util/src/minizip/crypt.c
webservices/axis2/trunk/c/util/src/minizip/ioapi.c
webservices/axis2/trunk/c/util/src/minizip/iowin32.c
webservices/axis2/trunk/c/util/src/minizip/unzip.c
webservices/axis2/trunk/c/util/src/network_handler.c
webservices/axis2/trunk/c/util/src/param.c
webservices/axis2/trunk/c/util/src/param_container.c
webservices/axis2/trunk/c/util/src/platforms/unix/uuid_gen_unix.c
webservices/axis2/trunk/c/util/src/properties.c
webservices/axis2/trunk/c/util/src/property.c
webservices/axis2/trunk/c/util/src/qname.c
webservices/axis2/trunk/c/util/src/stack.c
webservices/axis2/trunk/c/util/src/stream.c
webservices/axis2/trunk/c/util/src/string.c
webservices/axis2/trunk/c/util/src/thread_pool.c
webservices/axis2/trunk/c/util/src/uri.c
webservices/axis2/trunk/c/util/src/url.c
webservices/axis2/trunk/c/util/src/utils.c
Modified: webservices/axis2/trunk/c/util/src/array_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/array_list.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/array_list.c (original)
+++ webservices/axis2/trunk/c/util/src/array_list.c Thu Sep 27 20:28:06 2007
@@ -79,7 +79,8 @@
if (min_capacity > array_list->capacity)
{
int new_capacity =
- (array_list->capacity * 2 > min_capacity) ? (array_list->capacity * 2) : min_capacity;
+ (array_list->capacity * 2 >
+ min_capacity) ? (array_list->capacity * 2) : min_capacity;
void **data = (void **) AXIS2_MALLOC(env->allocator,
sizeof(void *) * new_capacity);
if (!data)
@@ -180,8 +181,8 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if (array_list->size == array_list->capacity)
- if (axutil_array_list_ensure_capacity(array_list, env, array_list->size + 1) !=
- AXIS2_SUCCESS)
+ if (axutil_array_list_ensure_capacity
+ (array_list, env, array_list->size + 1) != AXIS2_SUCCESS)
return AXIS2_FAILURE;
array_list->data[array_list->size++] = (void *) e;
return AXIS2_SUCCESS;
@@ -200,8 +201,8 @@
return AXIS2_FAILURE;
if (array_list->size == array_list->capacity)
{
- if (axutil_array_list_ensure_capacity(array_list, env, array_list->size + 1) !=
- AXIS2_SUCCESS)
+ if (axutil_array_list_ensure_capacity
+ (array_list, env, array_list->size + 1) != AXIS2_SUCCESS)
return AXIS2_FAILURE;
}
if (index != array_list->size)
@@ -245,7 +246,8 @@
if (index < 0 || index > array_list->size)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS,
+ AXIS2_FAILURE);
return AXIS2_FALSE;
}
return AXIS2_TRUE;
@@ -261,7 +263,8 @@
if (index < 0 || index >= array_list->size)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS,
+ AXIS2_FAILURE);
return AXIS2_FALSE;
}
return AXIS2_TRUE;
Modified: webservices/axis2/trunk/c/util/src/base64.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/base64.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/base64.c (original)
+++ webservices/axis2/trunk/c/util/src/base64.c Thu Sep 27 20:28:06 2007
@@ -77,8 +77,10 @@
45, 47, 194, 196, 192, 193, 195, 197, 199, 209, 166, 44, 37, 95, 62, 63,
248, 201, 202, 203, 200, 205, 206, 207, 204, 96, 58, 35, 64, 39, 61, 34,
216, 97, 98, 99, 100, 101, 102, 103, 104, 105, 171, 187, 240, 253, 254, 177,
- 176, 106, 107, 108, 109, 110, 111, 112, 113, 114, 170, 186, 230, 184, 198, 164,
- 181, 126, 115, 116, 117, 118, 119, 120, 121, 122, 161, 191, 208, 221, 222, 174,
+ 176, 106, 107, 108, 109, 110, 111, 112, 113, 114, 170, 186, 230, 184, 198,
+ 164,
+ 181, 126, 115, 116, 117, 118, 119, 120, 121, 122, 161, 191, 208, 221, 222,
+ 174,
94, 163, 165, 183, 169, 167, 182, 188, 189, 190, 91, 93, 175, 168, 180, 215,
123, 65, 66, 67, 68, 69, 70, 71, 72, 73, 173, 244, 246, 242, 243, 245,
125, 74, 75, 76, 77, 78, 79, 80, 81, 82, 185, 251, 252, 249, 250, 255,
@@ -140,9 +142,12 @@
while (nprbytes > 4)
{
- *(bufout++) = (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
- *(bufout++) = (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
- *(bufout++) = (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
+ *(bufout++) =
+ (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
+ *(bufout++) =
+ (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
+ *(bufout++) =
+ (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
bufin += 4;
nprbytes -= 4;
}
@@ -150,22 +155,26 @@
/* Note: (nprbytes == 1) would be an error, so just ingore that case */
if (nprbytes > 1)
{
- *(bufout++) = (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
+ *(bufout++) =
+ (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
}
if (nprbytes > 2)
{
- *(bufout++) = (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
+ *(bufout++) =
+ (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
}
if (nprbytes > 3)
{
- *(bufout++) = (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
+ *(bufout++) =
+ (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
}
nbytesdecoded -= (4 - nprbytes) & 3;
return nbytesdecoded;
}
-static const char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char basis_64[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
AXIS2_EXTERN int AXIS2_CALL
axutil_base64_encode_len(
@@ -181,7 +190,8 @@
int len)
{
#ifndef __OS400__
- return axutil_base64_encode_binary(encoded, (const unsigned char *) string, len);
+ return axutil_base64_encode_binary(encoded, (const unsigned char *) string,
+ len);
#else /* __OS400__ */
int i;
char *p;
@@ -237,8 +247,12 @@
for (i = 0; i < len - 2; i += 3)
{
*p++ = basis_64[(string[i] >> 2) & 0x3F];
- *p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 0xF0) >> 4)];
- *p++ = basis_64[((string[i + 1] & 0xF) << 2) | ((int) (string[i + 2] & 0xC0) >> 6)];
+ *p++ =
+ basis_64[((string[i] & 0x3) << 4) |
+ ((int) (string[i + 1] & 0xF0) >> 4)];
+ *p++ =
+ basis_64[((string[i + 1] & 0xF) << 2) |
+ ((int) (string[i + 2] & 0xC0) >> 6)];
*p++ = basis_64[string[i + 2] & 0x3F];
}
if (i < len)
@@ -251,7 +265,9 @@
}
else
{
- *p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 0xF0) >> 4)];
+ *p++ =
+ basis_64[((string[i] & 0x3) << 4) |
+ ((int) (string[i + 1] & 0xF0) >> 4)];
*p++ = basis_64[((string[i + 1] & 0xF) << 2)];
}
*p++ = '=';
Modified: webservices/axis2/trunk/c/util/src/base64_binary.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/base64_binary.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/base64_binary.c (original)
+++ webservices/axis2/trunk/c/util/src/base64_binary.c Thu Sep 27 20:28:06 2007
@@ -34,7 +34,8 @@
AXIS2_ENV_CHECK(env, NULL);
base64_binary =
- (axutil_base64_binary_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_base64_binary_t));
+ (axutil_base64_binary_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axutil_base64_binary_t));
if (!base64_binary)
{
@@ -147,7 +148,8 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- memcpy(base64_binary->plain_binary, plain_binary, base64_binary->plain_binary_len);
+ memcpy(base64_binary->plain_binary, plain_binary,
+ base64_binary->plain_binary_len);
base64_binary->plain_binary_len = plain_binary_len;
return AXIS2_SUCCESS;
@@ -197,8 +199,10 @@
char *encoded_binary = NULL;
int encoded_binary_len = 0;
- encoded_binary_len = axutil_base64_encode_len(base64_binary->plain_binary_len);
- encoded_binary = AXIS2_MALLOC(env->allocator, sizeof(char) * encoded_binary_len);
+ encoded_binary_len =
+ axutil_base64_encode_len(base64_binary->plain_binary_len);
+ encoded_binary =
+ AXIS2_MALLOC(env->allocator, sizeof(char) * encoded_binary_len);
if (!encoded_binary)
{
@@ -217,7 +221,8 @@
const axutil_env_t * env)
{
int encoded_binary_len = 0;
- encoded_binary_len = axutil_base64_encode_len(base64_binary->plain_binary_len);
+ encoded_binary_len =
+ axutil_base64_encode_len(base64_binary->plain_binary_len);
return encoded_binary_len;
}
Modified: webservices/axis2/trunk/c/util/src/class_loader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/class_loader.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/class_loader.c (original)
+++ webservices/axis2/trunk/c/util/src/class_loader.c Thu Sep 27 20:28:06 2007
@@ -41,7 +41,8 @@
{
if (!dll_desc)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
axutil_class_loader_unload_lib(env, dll_desc);
@@ -64,7 +65,8 @@
dll_desc = axutil_param_get_value(impl_info_param, env);
if (!dll_desc)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED,
+ AXIS2_FAILURE);
return NULL;
}
dl_handler = axutil_dll_desc_get_dl_handler(dll_desc, env);
@@ -73,7 +75,8 @@
status = axutil_class_loader_load_lib(env, dll_desc);
if (AXIS2_SUCCESS != status)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED,
+ AXIS2_FAILURE);
return NULL;
}
dl_handler = axutil_dll_desc_get_dl_handler(dll_desc, env);
@@ -82,7 +85,9 @@
return NULL;
}
- create_funct = (CREATE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler, AXIS2_CREATE_FUNCTION);
+ create_funct =
+ (CREATE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler,
+ AXIS2_CREATE_FUNCTION);
if (!create_funct)
{
return NULL;
@@ -91,11 +96,14 @@
if (AXIS2_FAILURE == status)
{
axutil_class_loader_unload_lib(env, dll_desc);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED,
+ AXIS2_FAILURE);
return NULL;
}
- delete_funct = (DELETE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler, AXIS2_DELETE_FUNCTION);
+ delete_funct =
+ (DELETE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler,
+ AXIS2_DELETE_FUNCTION);
if (!delete_funct)
{
return NULL;
@@ -104,14 +112,16 @@
if (AXIS2_FAILURE == status)
{
axutil_class_loader_unload_lib(env, dll_desc);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_CREATE_FAILED,
+ AXIS2_FAILURE);
return NULL;
}
}
create_funct = axutil_dll_desc_get_create_funct(dll_desc, env);
if (!create_funct)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_STATE_DLL_DESC, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_STATE_DLL_DESC,
+ AXIS2_FAILURE);
return NULL;
}
error_code = axutil_dll_desc_get_error_code(dll_desc, env);
@@ -120,7 +130,8 @@
if (!obj)
{
axutil_class_loader_unload_lib(env, dll_desc);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Object create function returned NULL");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Object create function returned NULL");
AXIS2_ERROR_SET(env->error, error_code, AXIS2_FAILURE);
return NULL;
}
@@ -144,7 +155,8 @@
dl_handler = AXIS2_PLATFORM_LOADLIB(dll_name);
if (!dl_handler)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_LOADING_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_LOADING_FAILED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
status = axutil_dll_desc_set_dl_handler(dll_desc, env, dl_handler);
@@ -153,7 +165,8 @@
{
AXIS2_PLATFORM_UNLOADLIB(dl_handler);
dl_handler = NULL;
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_LOADING_FAILED, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_LOADING_FAILED,
+ AXIS2_FAILURE);
return status;
}
Modified: webservices/axis2/trunk/c/util/src/date_time.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/date_time.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Thu Sep 27 20:28:06 2007
@@ -46,7 +46,9 @@
/*struct tm* utc_time_ret = NULL; */
AXIS2_ENV_CHECK(env, NULL);
- date_time = (axutil_date_time_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_date_time_t));
+ date_time =
+ (axutil_date_time_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axutil_date_time_t));
if (!date_time)
{
@@ -97,8 +99,8 @@
const axis2_char_t * time_str)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- sscanf(time_str, "%d:%d:%d:%dZ", &date_time->hour, &date_time->min, &date_time->sec,
- &date_time->msec);
+ sscanf(time_str, "%d:%d:%d:%dZ", &date_time->hour, &date_time->min,
+ &date_time->sec, &date_time->msec);
return AXIS2_SUCCESS;
}
@@ -110,7 +112,8 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- sscanf(date_str, "%d-%d-%d", &date_time->year, &date_time->mon, &date_time->day);
+ sscanf(date_str, "%d-%d-%d", &date_time->year, &date_time->mon,
+ &date_time->day);
date_time->year -= 1900;
return AXIS2_SUCCESS;
}
@@ -123,8 +126,9 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- sscanf(date_time_str, "%d-%d-%dT%d:%d:%d.%dZ", &date_time->year, &date_time->mon,
- &date_time->day, &date_time->hour, &date_time->min, &date_time->sec, &date_time->msec);
+ sscanf(date_time_str, "%d-%d-%dT%d:%d:%d.%dZ", &date_time->year,
+ &date_time->mon, &date_time->day, &date_time->hour, &date_time->min,
+ &date_time->sec, &date_time->msec);
date_time->year -= 1900;
return AXIS2_SUCCESS;
}
@@ -246,10 +250,12 @@
AXIS2_ENV_CHECK(env, NULL);
- time_str = (axis2_char_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * 32);
+ time_str =
+ (axis2_char_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_char_t) * 32);
- sprintf(time_str, "%d:%d:%d.%dZ", date_time->hour, date_time->min, date_time->sec,
- date_time->msec);
+ sprintf(time_str, "%d:%d:%d.%dZ", date_time->hour, date_time->min,
+ date_time->sec, date_time->msec);
return time_str;
}
@@ -262,9 +268,12 @@
AXIS2_ENV_CHECK(env, NULL);
- date_str = (axis2_char_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * 32);
+ date_str =
+ (axis2_char_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_char_t) * 32);
- sprintf(date_str, "%d-%d-%d", date_time->year + 1900, date_time->mon, date_time->day);
+ sprintf(date_str, "%d-%d-%d", date_time->year + 1900, date_time->mon,
+ date_time->day);
return date_str;
}
@@ -278,9 +287,9 @@
AXIS2_ENV_CHECK(env, NULL);
date_time_str = AXIS2_MALLOC(env->allocator, sizeof(char) * 32);
- sprintf(date_time_str, "%d-%02d-%02dT%02d:%02d:%02d.%03dZ", date_time->year + 1900,
- date_time->mon + 1, date_time->day, date_time->hour, date_time->min, date_time->sec,
- date_time->msec);
+ sprintf(date_time_str, "%d-%02d-%02dT%02d:%02d:%02d.%03dZ",
+ date_time->year + 1900, date_time->mon + 1, date_time->day,
+ date_time->hour, date_time->min, date_time->sec, date_time->msec);
return date_time_str;
}
Modified: webservices/axis2/trunk/c/util/src/dir_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/dir_handler.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/dir_handler.c (original)
+++ webservices/axis2/trunk/c/util/src/dir_handler.c Thu Sep 27 20:28:06 2007
@@ -62,7 +62,8 @@
if (count <= 0)
{
axutil_array_list_free(file_list, env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No files in the path %s.", pathname);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No files in the path %s.",
+ pathname);
return NULL;
}
@@ -199,7 +200,8 @@
if (count <= 0)
{
axutil_array_list_free(file_list, env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No files in the path %s.", pathname);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No files in the path %s.",
+ pathname);
return NULL;
}
Modified: webservices/axis2/trunk/c/util/src/dll_desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/dll_desc.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/dll_desc.c (original)
+++ webservices/axis2/trunk/c/util/src/dll_desc.c Thu Sep 27 20:28:06 2007
@@ -41,7 +41,9 @@
AXIS2_ENV_CHECK(env, NULL);
- dll_desc = (axutil_dll_desc_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_dll_desc_t));
+ dll_desc =
+ (axutil_dll_desc_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axutil_dll_desc_t));
if (!dll_desc)
{
Modified: webservices/axis2/trunk/c/util/src/duration.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/duration.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/duration.c (original)
+++ webservices/axis2/trunk/c/util/src/duration.c Thu Sep 27 20:28:06 2007
@@ -59,7 +59,9 @@
AXIS2_ENV_CHECK(env, NULL);
- duration = (axutil_duration_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_duration_t));
+ duration =
+ (axutil_duration_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axutil_duration_t));
if (NULL == duration)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -119,7 +121,8 @@
if (duration_str == NULL)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
@@ -209,7 +212,8 @@
{
if ((num_type = 0) && (seq < (sizeof(desig) - 1)))
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NONE, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NONE,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
@@ -260,14 +264,18 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- duration_str = (axis2_char_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * 64);
+ duration_str =
+ (axis2_char_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_char_t) * 64);
if (duration->is_negative == 0)
- sprintf(duration_str, "P%dY%dM%dDT%dH%dM%fS", duration->years, duration->months,
- duration->days, duration->hours, duration->mins, duration->secs);
+ sprintf(duration_str, "P%dY%dM%dDT%dH%dM%fS", duration->years,
+ duration->months, duration->days, duration->hours,
+ duration->mins, duration->secs);
else
- sprintf(duration_str, "-P%dY%dM%dDT%dH%dM%fS", duration->years, duration->months,
- duration->days, duration->hours, duration->mins, duration->secs);
+ sprintf(duration_str, "-P%dY%dM%dDT%dH%dM%fS", duration->years,
+ duration->months, duration->days, duration->hours,
+ duration->mins, duration->secs);
return duration_str;
}
@@ -438,7 +446,8 @@
if (!duration_one || !duration_two)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM,
+ AXIS2_FAILURE);
return -1;
}
Modified: webservices/axis2/trunk/c/util/src/env.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/env.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/env.c (original)
+++ webservices/axis2/trunk/c/util/src/env.c Thu Sep 27 20:28:06 2007
@@ -46,7 +46,9 @@
log = axutil_log_create_default(allocator);
thread_pool = axutil_thread_pool_init(allocator);
- env = axutil_env_create_with_error_log_thread_pool(allocator, error, log, thread_pool);
+ env =
+ axutil_env_create_with_error_log_thread_pool(allocator, error, log,
+ thread_pool);
if (env->log)
{
env->log->level = log_level;
@@ -104,7 +106,8 @@
if (!allocator)
return NULL;
- environment = (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
+ environment =
+ (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
if (!environment)
return NULL;
@@ -143,7 +146,8 @@
if (!error)
return NULL;
- environment = (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
+ environment =
+ (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
if (!environment)
return NULL;
@@ -181,7 +185,8 @@
if (!pool)
return NULL;
- environment = (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
+ environment =
+ (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
if (!environment)
return NULL;
Modified: webservices/axis2/trunk/c/util/src/error.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/error.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/error.c (original)
+++ webservices/axis2/trunk/c/util/src/error.c Thu Sep 27 20:28:06 2007
@@ -19,7 +19,8 @@
#include <stdlib.h>
#include "axutil_error_default.h"
-AXIS2_EXPORT const axis2_char_t *axutil_error_messages[AXIS2_ERROR_LAST + 10000];
+AXIS2_EXPORT const axis2_char_t *axutil_error_messages[AXIS2_ERROR_LAST +
+ 10000];
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axutil_error_init(
@@ -41,59 +42,81 @@
/* core:clientapi */
axutil_error_messages[AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE] =
"Blocking invocation expects response";
- axutil_error_messages[AXIS2_ERROR_CANNOT_INFER_TRANSPORT] = "cannot infer transport from URL";
+ axutil_error_messages[AXIS2_ERROR_CANNOT_INFER_TRANSPORT] =
+ "cannot infer transport from URL";
axutil_error_messages[AXIS2_ERROR_CLIENT_SIDE_SUPPORT_ONLY_ONE_CONF_CTX] =
"Client side support only one configuration context";
axutil_error_messages[AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT] =
"MEP cannot be NULL in MEP client";
- axutil_error_messages[AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT] = "MEP Mismatch";
+ axutil_error_messages[AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT] =
+ "MEP Mismatch";
axutil_error_messages[AXIS2_ERROR_TWO_WAY_CHANNEL_NEEDS_ADDRESSING] =
"Two way channel needs addressing module to be engaged";
axutil_error_messages[AXIS2_ERROR_UNKNOWN_TRANSPORT] = "Unknown Transport";
- axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_TYPE] = "type is not supported";
- axutil_error_messages[AXIS2_ERROR_OPTIONS_OBJECT_IS_NOT_SET] = "Options object is not set";
+ axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_TYPE] =
+ "type is not supported";
+ axutil_error_messages[AXIS2_ERROR_OPTIONS_OBJECT_IS_NOT_SET] =
+ "Options object is not set";
/* core:clientapi:diclient */
/* core:context */
- axutil_error_messages[AXIS2_ERROR_INVALID_SOAP_ENVELOPE_STATE] = "Invalid SOAP envelope state";
- axutil_error_messages[AXIS2_ERROR_INVALID_STATE_MSG_CTX] = "Invalid message context state";
- axutil_error_messages[AXIS2_ERROR_INVALID_STATE_SVC] = "Service accessed has invalid state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_SOAP_ENVELOPE_STATE] =
+ "Invalid SOAP envelope state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_STATE_MSG_CTX] =
+ "Invalid message context state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_STATE_SVC] =
+ "Service accessed has invalid state";
axutil_error_messages[AXIS2_ERROR_INVALID_STATE_SVC_GRP] =
"Service group accessed has invalid state";
- axutil_error_messages[AXIS2_ERROR_SERVICE_NOT_YET_FOUND] = "Service not yet found";
+ axutil_error_messages[AXIS2_ERROR_SERVICE_NOT_YET_FOUND] =
+ "Service not yet found";
/* core:deployment */
- axutil_error_messages[AXI2_ERROR_INVALID_PHASE] = "Invalid phase found in phase validation*";
- axutil_error_messages[AXIS2_ERROR_CONFIG_NOT_FOUND] = "axis2.xml cannot be found";
- axutil_error_messages[AXIS2_ERROR_DATA_ELEMENT_IS_NULL] = "Data element of the OM Node is null";
+ axutil_error_messages[AXI2_ERROR_INVALID_PHASE] =
+ "Invalid phase found in phase validation*";
+ axutil_error_messages[AXIS2_ERROR_CONFIG_NOT_FOUND] =
+ "axis2.xml cannot be found";
+ axutil_error_messages[AXIS2_ERROR_DATA_ELEMENT_IS_NULL] =
+ "Data element of the OM Node is null";
axutil_error_messages[AXIS2_ERROR_IN_FLOW_NOT_ALLOWED_IN_TRS_OUT] =
"In transport sender, Inflow is not allowed";
- axutil_error_messages[AXIS2_ERROR_INVALID_HANDLER_STATE] = "Invalid handler state";
- axutil_error_messages[AXIS2_ERROR_INVALID_MODUELE_REF] = "Invalid Module Ref encountered";
+ axutil_error_messages[AXIS2_ERROR_INVALID_HANDLER_STATE] =
+ "Invalid handler state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_MODUELE_REF] =
+ "Invalid Module Ref encountered";
axutil_error_messages[AXIS2_ERROR_INVALID_MODUELE_REF_BY_OP] =
"Invalid Module Reference by Operation";
- axutil_error_messages[AXIS2_ERROR_INVALID_MODULE_CONF] = "Invalid Module Configuration";
+ axutil_error_messages[AXIS2_ERROR_INVALID_MODULE_CONF] =
+ "Invalid Module Configuration";
axutil_error_messages[AXIS2_ERROR_INVALID_STATE_DESC_BUILDER] =
"Description Builder is found to be in invalid state";
axutil_error_messages[AXIS2_ERROR_MODULE_NOT_FOUND] = "Module Not Found";
- axutil_error_messages[AXIS2_ERROR_MODULE_VALIDATION_FAILED] = "Module Validation Failed";
+ axutil_error_messages[AXIS2_ERROR_MODULE_VALIDATION_FAILED] =
+ "Module Validation Failed";
axutil_error_messages[AXIS2_ERROR_MODULE_XML_NOT_FOUND_FOR_THE_MODULE] =
"Module xml file is not found in the given path";
- axutil_error_messages[AXIS2_ERROR_NO_DISPATCHER_FOUND] = "No dispatcher found";
- axutil_error_messages[AXIS2_ERROR_OP_NAME_MISSING] = "Operation name is missing";
+ axutil_error_messages[AXIS2_ERROR_NO_DISPATCHER_FOUND] =
+ "No dispatcher found";
+ axutil_error_messages[AXIS2_ERROR_OP_NAME_MISSING] =
+ "Operation name is missing";
axutil_error_messages[AXIS2_ERROR_OUT_FLOW_NOT_ALLOWED_IN_TRS_IN] =
"In transport Receiver, Outflow is not allowed";
- axutil_error_messages[AXIS2_ERROR_REPO_CAN_NOT_BE_NULL] = "Repository name cannot be NULL";
- axutil_error_messages[AXIS2_ERROR_REPOSITORY_NOT_EXIST] = "Repository in path does not exist";
+ axutil_error_messages[AXIS2_ERROR_REPO_CAN_NOT_BE_NULL] =
+ "Repository name cannot be NULL";
+ axutil_error_messages[AXIS2_ERROR_REPOSITORY_NOT_EXIST] =
+ "Repository in path does not exist";
axutil_error_messages[AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED] =
"Repository Listener initialization failed";
axutil_error_messages[AXIS2_ERROR_SERVICE_XML_NOT_FOUND] =
"Service xml file is not found in the given path";
axutil_error_messages[AXIS2_ERROR_SVC_NAME_ERROR] = "Service Name Error";
- axutil_error_messages[AXIS2_ERROR_TRANSPORT_SENDER_ERROR] = "Transport Sender Error";
- axutil_error_messages[AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL] = "Path to Config can not be NULL";
+ axutil_error_messages[AXIS2_ERROR_TRANSPORT_SENDER_ERROR] =
+ "Transport Sender Error";
+ axutil_error_messages[AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL] =
+ "Path to Config can not be NULL";
axutil_error_messages[AXIS2_ERROR_INVALID_SVC] = "Invalid Service";
/* core:description */
- axutil_error_messages[AXIS2_ERROR_CANNOT_CORRELATE_MSG] = "Cannot correlate message";
+ axutil_error_messages[AXIS2_ERROR_CANNOT_CORRELATE_MSG] =
+ "Cannot correlate message";
axutil_error_messages[AXIS2_ERROR_COULD_NOT_MAP_MEP_URI_TO_MEP_CONSTANT] =
"Could not Map the MEP URI to a axis MEP constant value";
axutil_error_messages[AXIS2_ERROR_INVALID_MESSAGE_ADDITION] =
@@ -110,17 +133,20 @@
"module has alredy been engaged on the service. Group Operation terminated !!!";
axutil_error_messages[AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE] =
"Parameter locked, Cannot override";
- axutil_error_messages[AXIS2_ERROR_EMPTY_SCHEMA_LIST] = "schema list is empty or NULL in svc ";
+ axutil_error_messages[AXIS2_ERROR_EMPTY_SCHEMA_LIST] =
+ "schema list is empty or NULL in svc ";
/* core:engine */
axutil_error_messages[AXIS2_ERROR_BEFORE_AFTER_HANDLERS_SAME] =
"Both before and after handlers cannot be the same";
- axutil_error_messages[AXIS2_ERROR_INVALID_HANDLER_RULES] = "Invalid handler rules";
+ axutil_error_messages[AXIS2_ERROR_INVALID_HANDLER_RULES] =
+ "Invalid handler rules";
axutil_error_messages[AXIS2_ERROR_INVALID_MODULE] = "Invalid Module";
axutil_error_messages[AXIS2_ERROR_INVALID_PHASE_FIRST_HANDLER] =
"Invalid first handler for phase";
axutil_error_messages[AXIS2_ERROR_INVALID_PHASE_LAST_HANDLER] =
"Invalid last handler for phase";
- axutil_error_messages[AXIS2_ERROR_INVALID_STATE_CONF] = "Invalid engine config state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_STATE_CONF] =
+ "Invalid engine config state";
axutil_error_messages[AXIS2_ERROR_INVALID_STATE_PROCESSING_FAULT_ALREADY] =
"Message context processing a fault already";
axutil_error_messages[AXIS2_ERROR_NOWHERE_TO_SEND_FAULT] =
@@ -134,38 +160,45 @@
axutil_error_messages[AXIS2_ERROR_TWO_SVCS_CANNOT_HAVE_SAME_NAME] =
"Two service can not have same name, a service with same name alredy";
/* core:phaseresolver */
- axutil_error_messages[AXIS2_ERROR_INVALID_MODULE_REF] = "Invalid Module Ref";
+ axutil_error_messages[AXIS2_ERROR_INVALID_MODULE_REF] =
+ "Invalid Module Ref";
axutil_error_messages[AXIS2_ERROR_INVALID_PHASE] = "Invalid Phase";
axutil_error_messages[AXIS2_ERROR_NO_TRANSPORT_IN_CONFIGURED] =
"There are no in transport chains configured";
axutil_error_messages[AXIS2_ERROR_NO_TRANSPORT_OUT_CONFIGURED] =
"There are no out transport chains configured";
- axutil_error_messages[AXIS2_ERROR_PHASE_IS_NOT_SPECIFED] = "Phase is not specified";
- axutil_error_messages[AXIS2_ERROR_SERVICE_MODULE_CAN_NOT_REFER_GLOBAL_PHASE] =
- "Service module can not refer global phase";
+ axutil_error_messages[AXIS2_ERROR_PHASE_IS_NOT_SPECIFED] =
+ "Phase is not specified";
+ axutil_error_messages[AXIS2_ERROR_SERVICE_MODULE_CAN_NOT_REFER_GLOBAL_PHASE]
+ = "Service module can not refer global phase";
/* core:wsdl */
axutil_error_messages[AXIS2_ERROR_WSDL_SCHEMA_IS_NULL] = "Schema is NULL";
/* core:receivers */
- axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_INVALID_STATE] = "Om Element has invalid state";
- axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_MISMATCH] = "Om Elements do not match";
+ axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_INVALID_STATE] =
+ "Om Element has invalid state";
+ axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_MISMATCH] =
+ "Om Elements do not match";
axutil_error_messages[AXIS2_ERROR_RPC_NEED_MATCHING_CHILD] =
"RPC style soap body don't have a child element";
axutil_error_messages[AXIS2_ERROR_UNKNOWN_STYLE] =
"Operation Description has unknown operation style";
- axutil_error_messages[AXIS2_ERROR_STRING_DOES_NOT_REPRESENT_A_VALID_NC_NAME] =
- "String does not represent a valid NCName";
+ axutil_error_messages[AXIS2_ERROR_STRING_DOES_NOT_REPRESENT_A_VALID_NC_NAME]
+ = "String does not represent a valid NCName";
/* core:transport */
/* core:transport:http */
- axutil_error_messages[AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR] = "Error occured in transport";
+ axutil_error_messages[AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR] =
+ "Error occured in transport";
axutil_error_messages[AXIS2_ERROR_HTTP_REQUEST_NOT_SENT] =
"A read attempt(HTTP) for the reply without sending the request";
- axutil_error_messages[AXIS2_ERROR_INVALID_HEADER] = "Invalid string passed as a http header";
+ axutil_error_messages[AXIS2_ERROR_INVALID_HEADER] =
+ "Invalid string passed as a http header";
axutil_error_messages[AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE] =
"Invalid status line or invalid request line";
axutil_error_messages[AXIS2_ERROR_INVALID_TRANSPORT_PROTOCOL] =
"Transport protocol is unsupported by axis2";
- axutil_error_messages[AXIS2_ERROR_NULL_BODY] = "No body present in the request or the response";
+ axutil_error_messages[AXIS2_ERROR_NULL_BODY] =
+ "No body present in the request or the response";
axutil_error_messages[AXIS2_ERROR_NULL_CONFIGURATION_CONTEXT] =
"A valid conf_ctx is reqd for the http worker";
axutil_error_messages[AXIS2_ERROR_NULL_HTTP_VERSION] =
@@ -180,43 +213,58 @@
axutil_error_messages[AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY] =
"We got a NULL stream in the response body";
axutil_error_messages[AXIS2_ERROR_NULL_URL] = "URL NULL in http client";
- axutil_error_messages[AXIS2_ERROR_OUT_TRNSPORT_INFO_NULL] = "We need transport_info in msg_ctx";
+ axutil_error_messages[AXIS2_ERROR_OUT_TRNSPORT_INFO_NULL] =
+ "We need transport_info in msg_ctx";
axutil_error_messages[AXIS2_ERROR_RESPONSE_CONTENT_TYPE_MISSING] =
"Content-Type header missing in HTTP response";
- axutil_error_messages[AXIS2_ERROR_RESPONSE_TIMED_OUT] = "Response timed out";
+ axutil_error_messages[AXIS2_ERROR_RESPONSE_TIMED_OUT] =
+ "Response timed out";
axutil_error_messages[AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL] =
"SOAP envelope or SOAP body NULL";
- axutil_error_messages[AXIS2_ERROR_SSL_ENGINE] = "Error occured in SSL engine";
+ axutil_error_messages[AXIS2_ERROR_SSL_ENGINE] =
+ "Error occured in SSL engine";
axutil_error_messages[AXIS2_ERROR_SSL_NO_CA_FILE] =
"Either axis2c cannot find certificates or the env variable is not set";
axutil_error_messages[AXIS2_ERROR_WRITING_RESPONSE] =
"Error in writing the response in response writer";
axutil_error_messages[AXIS2_ERROR_REQD_PARAM_MISSING] =
"Required parameter is missing in url encoded request";
- axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_SCHEMA_TYPE] = " Unsuppoted schema type in REST";
- axutil_error_messages[AXIS2_ERROR_SVC_OR_OP_NOT_FOUND] = "Service or operation not found";
+ axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_SCHEMA_TYPE] =
+ " Unsuppoted schema type in REST";
+ axutil_error_messages[AXIS2_ERROR_SVC_OR_OP_NOT_FOUND] =
+ "Service or operation not found";
/* mod_addr */
/* platforms */
/* utils */
- axutil_error_messages[AXIS2_ERROR_COULD_NOT_OPEN_FILE] = "Could not open the file";
- axutil_error_messages[AXIS2_ERROR_DLL_CREATE_FAILED] = "Failed in creating DLL";
- axutil_error_messages[AXIS2_ERROR_DLL_LOADING_FAILED] = "DLL loading failed";
- axutil_error_messages[AXIS2_ERROR_ENVIRONMENT_IS_NULL] = "Environment passed is null";
- axutil_error_messages[AXIS2_ERROR_FILE_NAME_NOT_SET] = "Axis2 File does not have a file name";
+ axutil_error_messages[AXIS2_ERROR_COULD_NOT_OPEN_FILE] =
+ "Could not open the file";
+ axutil_error_messages[AXIS2_ERROR_DLL_CREATE_FAILED] =
+ "Failed in creating DLL";
+ axutil_error_messages[AXIS2_ERROR_DLL_LOADING_FAILED] =
+ "DLL loading failed";
+ axutil_error_messages[AXIS2_ERROR_ENVIRONMENT_IS_NULL] =
+ "Environment passed is null";
+ axutil_error_messages[AXIS2_ERROR_FILE_NAME_NOT_SET] =
+ "Axis2 File does not have a file name";
axutil_error_messages[AXIS2_ERROR_INVALID_STATE_DLL_DESC] =
"dll description has invalid state of not having valid dll create function, \
of valid delete function or valid dll_handler";
- axutil_error_messages[AXIS2_ERROR_HANDLER_CREATION_FAILED] = "Failed in creating Handler";
- axutil_error_messages[AXIS2_ERROR_INDEX_OUT_OF_BOUNDS] = "Array list index out of bounds";
- axutil_error_messages[AXIS2_ERROR_INVALID_ADDRESS] = "Invalid IP or hostname";
+ axutil_error_messages[AXIS2_ERROR_HANDLER_CREATION_FAILED] =
+ "Failed in creating Handler";
+ axutil_error_messages[AXIS2_ERROR_INDEX_OUT_OF_BOUNDS] =
+ "Array list index out of bounds";
+ axutil_error_messages[AXIS2_ERROR_INVALID_ADDRESS] =
+ "Invalid IP or hostname";
axutil_error_messages[AXIS2_ERROR_INVALID_FD] =
"Trying to do operation on invalid file descriptor";
axutil_error_messages[AXIS2_ERROR_INVALID_SOCKET] =
"Trying to do operation on closed/not opened socket";
- axutil_error_messages[AXIS2_ERROR_INVALID_STATE_PARAM] = "Parameter not set";
- axutil_error_messages[AXIS2_ERROR_MODULE_CREATION_FAILED] = "Module create failed";
+ axutil_error_messages[AXIS2_ERROR_INVALID_STATE_PARAM] =
+ "Parameter not set";
+ axutil_error_messages[AXIS2_ERROR_MODULE_CREATION_FAILED] =
+ "Module create failed";
axutil_error_messages[AXIS2_ERROR_MSG_RECV_CREATION_FAILED] =
"Failed in creating Message Receiver";
axutil_error_messages[AXIS2_ERROR_NO_SUCH_ELEMENT] = "No such element";
@@ -224,7 +272,8 @@
"Socket bind failed. Another process may be already using this port";
axutil_error_messages[AXIS2_ERROR_SOCKET_ERROR] =
"Error creating a socket. Most probably error returned by OS";
- axutil_error_messages[AXIS2_ERROR_SOCKET_LISTEN_FAILED] = "Listen failed for the server socket";
+ axutil_error_messages[AXIS2_ERROR_SOCKET_LISTEN_FAILED] =
+ "Listen failed for the server socket";
axutil_error_messages[AXIS2_ERROR_SVC_SKELETON_CREATION_FAILED] =
"Failed in creating Service Skeleton";
axutil_error_messages[AXIS2_ERROR_TRANSPORT_RECV_CREATION_FAILED] =
@@ -235,14 +284,18 @@
"Generation of platform dependent uuid failed";
axutil_error_messages[AXIS2_ERROR_POSSIBLE_DEADLOCK] = "Possible deadlock";
/* wsdl */
- axutil_error_messages[AXIS2_ERROR_INTERFACE_OR_PORT_TYPE_NOT_FOUND_FOR_THE_BINDING] =
+ axutil_error_messages
+ [AXIS2_ERROR_INTERFACE_OR_PORT_TYPE_NOT_FOUND_FOR_THE_BINDING] =
"Interface or Port Type not found for the binding";
- axutil_error_messages[AXIS2_ERROR_INTERFACES_OR_PORTS_NOT_FOUND_FOR_PARTIALLY_BUILT_WOM] =
+ axutil_error_messages
+ [AXIS2_ERROR_INTERFACES_OR_PORTS_NOT_FOUND_FOR_PARTIALLY_BUILT_WOM] =
"Interfaces or Ports not found for the partially built WOM";
- axutil_error_messages[AXIS2_ERROR_INVALID_STATE_WSDL_OP] = "Wsdl op accessed has invalid state";
+ axutil_error_messages[AXIS2_ERROR_INVALID_STATE_WSDL_OP] =
+ "Wsdl op accessed has invalid state";
axutil_error_messages[AXIS2_ERROR_INVALID_STATE_WSDL_SVC] =
"Wsdl Service accessed has invalid state";
- axutil_error_messages[AXIS2_ERROR_MEP_CANNOT_DETERMINE_MEP] = "Cannot determine MEP";
+ axutil_error_messages[AXIS2_ERROR_MEP_CANNOT_DETERMINE_MEP] =
+ "Cannot determine MEP";
axutil_error_messages[AXIS2_ERROR_WSDL_BINDING_NAME_IS_REQUIRED] =
"Wsdl binding name is cannot be NULL(Is required)";
axutil_error_messages[AXIS2_ERROR_WSDL_INTERFACE_NAME_IS_REQUIRED] =
@@ -264,15 +317,17 @@
"Bulder's last node is NULL when it is not supposed to be NULL";
axutil_error_messages[AXIS2_ERROR_INVALID_DOCUMENT_STATE_ROOT_NULL] =
"Document root is NULL] = when it is not supposed to be NULL";
- axutil_error_messages[AXIS2_ERROR_INVALID_DOCUMENT_STATE_UNDEFINED_NAMESPACE] =
+ axutil_error_messages
+ [AXIS2_ERROR_INVALID_DOCUMENT_STATE_UNDEFINED_NAMESPACE] =
"Undefined namespace used";
axutil_error_messages[AXIS2_ERROR_INVALID_EMPTY_NAMESPACE_URI] =
"Error a namespace should have a valid uri";
- axutil_error_messages[AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED] =
+ axutil_error_messages
+ [AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED] =
"next method has not been called so cannot remove"
"an element before calling next valid for any om iterator";
- axutil_error_messages[AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED] =
- "Document root is NULL, when it is not supposed to be NULL";
+ axutil_error_messages[AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED]
+ = "Document root is NULL, when it is not supposed to be NULL";
axutil_error_messages[AXIS2_ERROR_XML_READER_ELEMENT_NULL] =
"axiom_xml_reader returned NULL element";
axutil_error_messages[AXIS2_ERROR_XML_READER_VALUE_NULL] =
@@ -282,13 +337,16 @@
"error occured creating xml stream reader";
axutil_error_messages[AXIS2_ERROR_CREATING_XML_STREAM_WRITER] =
"error occured creating xml stream writer";
- axutil_error_messages[AXIS2_ERROR_WRITING_ATTRIBUTE] = "error in writing attribute";
+ axutil_error_messages[AXIS2_ERROR_WRITING_ATTRIBUTE] =
+ "error in writing attribute";
axutil_error_messages[AXIS2_ERROR_WRITING_ATTRIBUTE_WITH_NAMESPACE] =
"error in writing attribute with namespace";
axutil_error_messages[AXIS2_ERROR_WRITING_ATTRIBUTE_WITH_NAMESPACE_PREFIX] =
"error in writing attribute with namespace prefix";
- axutil_error_messages[AXIS2_ERROR_WRITING_COMMENT] = "error in writing comment";
- axutil_error_messages[AXIS2_ERROR_WRITING_DATA_SOURCE] = "error in writing data source";
+ axutil_error_messages[AXIS2_ERROR_WRITING_COMMENT] =
+ "error in writing comment";
+ axutil_error_messages[AXIS2_ERROR_WRITING_DATA_SOURCE] =
+ "error in writing data source";
axutil_error_messages[AXIS2_ERROR_WRITING_DEFAULT_NAMESPACE] =
"error in writing default namespace";
axutil_error_messages[AXIS2_ERROR_WRITING_DTD] = "error in writing dtd";
@@ -296,7 +354,8 @@
"error occured in writing empty element";
axutil_error_messages[AXIS2_ERROR_WRITING_EMPTY_ELEMENT_WITH_NAMESPACE] =
"error occured in writing empty element with namespace";
- axutil_error_messages[AXIS2_ERROR_WRITING_EMPTY_ELEMENT_WITH_NAMESPACE_PREFIX] =
+ axutil_error_messages
+ [AXIS2_ERROR_WRITING_EMPTY_ELEMENT_WITH_NAMESPACE_PREFIX] =
"error in writing empty element with namespace prefix";
axutil_error_messages[AXIS2_ERROR_WRITING_END_DOCUMENT] =
"error occured in writing end document in xml writer";
@@ -310,17 +369,21 @@
"error occured in writing start element in xml writer";
axutil_error_messages[AXIS2_ERROR_WRITING_START_ELEMENT_WITH_NAMESPACE] =
"error occured in writing start element with namespace in xml writer";
- axutil_error_messages[AXIS2_ERROR_WRITING_START_ELEMENT_WITH_NAMESPACE_PREFIX] =
+ axutil_error_messages
+ [AXIS2_ERROR_WRITING_START_ELEMENT_WITH_NAMESPACE_PREFIX] =
"error occured in writing start element with namespace prefix";
- axutil_error_messages[AXIS2_ERROR_WRITING_CDATA] = "error in writing cdata section";
+ axutil_error_messages[AXIS2_ERROR_WRITING_CDATA] =
+ "error in writing cdata section";
axutil_error_messages[AXIS2_ERROR_XML_PARSER_INVALID_MEM_TYPE] =
"AXIS2_XML_PARSER_TYPE_BUFFER or AXIS2_XML_PARSER_TYPE_DOC is expected";
/* invalid type passed */
- axutil_error_messages[AXIS2_ERROR_INVALID_BASE_TYPE] = "invalid type passed";
+ axutil_error_messages[AXIS2_ERROR_INVALID_BASE_TYPE] =
+ "invalid type passed";
axutil_error_messages[AXIS2_ERROR_INVALID_SOAP_NAMESPACE_URI] =
"invalid soap namespace uri found";
- axutil_error_messages[AXIS2_ERROR_INVALID_SOAP_VERSION] = "Invalid SOAP version";
+ axutil_error_messages[AXIS2_ERROR_INVALID_SOAP_VERSION] =
+ "Invalid SOAP version";
axutil_error_messages[AXIS2_ERROR_INVALID_VALUE_FOUND_IN_MUST_UNDERSTAND] =
"invalid value found in must understand";
axutil_error_messages[AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED] =
@@ -335,47 +398,62 @@
"multiple fault role elements encountered in soap fault ";
axutil_error_messages[AXIS2_ERROR_MULTIPLE_SUB_CODE_VALUES_ENCOUNTERED] =
"multiple fault subcode value elements encountered";
- axutil_error_messages[AXIS2_ERROR_MULTIPLE_VALUE_ENCOUNTERED_IN_CODE_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_MULTIPLE_VALUE_ENCOUNTERED_IN_CODE_ELEMENT] =
"multiple fault value elements encounterd";
- axutil_error_messages[AXIS2_ERROR_MUST_UNDERSTAND_SHOULD_BE_1_0_TRUE_FALSE] =
- "must understatnd attribute should have values of true or false";
- axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_EXPECTED] = "om element is expected";
+ axutil_error_messages[AXIS2_ERROR_MUST_UNDERSTAND_SHOULD_BE_1_0_TRUE_FALSE]
+ = "must understatnd attribute should have values of true or false";
+ axutil_error_messages[AXIS2_ERROR_OM_ELEMENT_EXPECTED] =
+ "om element is expected";
axutil_error_messages[AXIS2_ERROR_ONLY_CHARACTERS_ARE_ALLOWED_HERE] =
- "processing soap11 fault value element should have only" "text as its children";
+ "processing soap11 fault value element should have only"
+ "text as its children";
axutil_error_messages[AXIS2_ERROR_ONLY_ONE_SOAP_FAULT_ALLOWED_IN_BODY] =
"only one SOAP fault allowed in SOAP body";
- axutil_error_messages[AXIS2_ERROR_SOAP11_FAULT_ACTOR_SHOULD_NOT_HAVE_CHILD_ELEMENTS] =
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP11_FAULT_ACTOR_SHOULD_NOT_HAVE_CHILD_ELEMENTS] =
"AXIS2_ERROR_SOAP11_FAULT_ACTOR_SHOULD_NOT_HAVE_CHILD_ELEMENTS";
- axutil_error_messages[AXIS2_ERROR_SOAP_BUILDER_ENVELOPE_CAN_HAVE_ONLY_HEADER_AND_BODY] =
- "soap builder found a child element other than header or body in envelope" "element";
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_BUILDER_ENVELOPE_CAN_HAVE_ONLY_HEADER_AND_BODY] =
+ "soap builder found a child element other than header or body in envelope"
+ "element";
axutil_error_messages[AXIS2_ERROR_SOAP_BUILDER_HEADER_BODY_WRONG_ORDER] =
"soap builder encounterd body element first and header next";
- axutil_error_messages[AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED] =
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED] =
"soap builder multiple body elements encounterd";
- axutil_error_messages[AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED] =
- "soap builder encountered multiple headers";
+ axutil_error_messages[AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED]
+ = "soap builder encountered multiple headers";
axutil_error_messages[AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE] =
"AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE";
- axutil_error_messages[AXIS2_ERROR_SOAP_FAULT_REASON_ELEMENT_SHOULD_HAVE_A_TEXT] =
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_FAULT_REASON_ELEMENT_SHOULD_HAVE_A_TEXT] =
"AXIS2_ERROR_SOAP_FAULT_REASON_ELEMENT_SHOULD_HAVE_A_TEXT";
- axutil_error_messages[AXIS2_ERROR_SOAP_FAULT_ROLE_ELEMENT_SHOULD_HAVE_A_TEXT] =
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_FAULT_ROLE_ELEMENT_SHOULD_HAVE_A_TEXT] =
"soap fault role element should have a text value";
- axutil_error_messages[AXIS2_ERROR_SOAP_FAULT_VALUE_SHOULD_BE_PRESENT_BEFORE_SUB_CODE] =
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_FAULT_VALUE_SHOULD_BE_PRESENT_BEFORE_SUB_CODE] =
"soap fault value should be present before subcode element in soap fault code";
- axutil_error_messages[AXIS2_ERROR_SOAP_MESSAGE_DOES_NOT_CONTAIN_AN_ENVELOPE] =
- "soap message does not contain a soap envelope element";
- axutil_error_messages[AXIS2_ERROR_SOAP_MESSAGE_FIRST_ELEMENT_MUST_CONTAIN_LOCAL_NAME] =
+ axutil_error_messages[AXIS2_ERROR_SOAP_MESSAGE_DOES_NOT_CONTAIN_AN_ENVELOPE]
+ = "soap message does not contain a soap envelope element";
+ axutil_error_messages
+ [AXIS2_ERROR_SOAP_MESSAGE_FIRST_ELEMENT_MUST_CONTAIN_LOCAL_NAME] =
"soap messgae first element should have a localname";
- axutil_error_messages[AXIS2_ERROR_THIS_LOCALNAME_IS_NOT_SUPPORTED_INSIDE_THE_REASON_ELEMENT] =
- "localname not supported inside a reason element";
- axutil_error_messages[AXIS2_ERROR_THIS_LOCALNAME_IS_NOT_SUPPORTED_INSIDE_THE_SUB_CODE_ELEMENT] =
- "localname not supported inside the subcode element";
- axutil_error_messages[AXIS2_ERROR_THIS_LOCALNAME_NOT_SUPPORTED_INSIDE_THE_CODE_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_THIS_LOCALNAME_IS_NOT_SUPPORTED_INSIDE_THE_REASON_ELEMENT]
+ = "localname not supported inside a reason element";
+ axutil_error_messages
+ [AXIS2_ERROR_THIS_LOCALNAME_IS_NOT_SUPPORTED_INSIDE_THE_SUB_CODE_ELEMENT]
+ = "localname not supported inside the subcode element";
+ axutil_error_messages
+ [AXIS2_ERROR_THIS_LOCALNAME_NOT_SUPPORTED_INSIDE_THE_CODE_ELEMENT] =
"localname not supported inside the code element";
- axutil_error_messages[AXIS2_ERROR_TRANSPORT_LEVEL_INFORMATION_DOES_NOT_MATCH_WITH_SOAP] =
+ axutil_error_messages
+ [AXIS2_ERROR_TRANSPORT_LEVEL_INFORMATION_DOES_NOT_MATCH_WITH_SOAP] =
"transport identified soap version does not match with soap message version ";
- axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_ELEMENT_IN_SOAP_FAULT_ELEMENT] =
- "unsupported element found in soap fault element";
+ axutil_error_messages[AXIS2_ERROR_UNSUPPORTED_ELEMENT_IN_SOAP_FAULT_ELEMENT]
+ = "unsupported element found in soap fault element";
axutil_error_messages[AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED] =
"wrong element order encountered ";
/* services */
@@ -383,48 +461,66 @@
"Invalid XML format in request";
axutil_error_messages[AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL] =
"Input OM node NULL, Probably error in SOAP request";
- axutil_error_messages[AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST] =
+ axutil_error_messages
+ [AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST] =
"Invalid parameters for service operation in SOAP request";
axutil_error_messages[AXIS2_ERROR_WSDL_SCHEMA_IS_NULL] = "Schema is NULL";
/* repos */
- axutil_error_messages[AXIS2_ERROR_REPOS_NOT_AUTHENTICATED] = "NOT_AUTHENTICATED";
- axutil_error_messages[AXIS2_ERROR_REPOS_UNSUPPORTED_MODE] = "UNSUPPORTED_MODE";
+ axutil_error_messages[AXIS2_ERROR_REPOS_NOT_AUTHENTICATED] =
+ "NOT_AUTHENTICATED";
+ axutil_error_messages[AXIS2_ERROR_REPOS_UNSUPPORTED_MODE] =
+ "UNSUPPORTED_MODE";
axutil_error_messages[AXIS2_ERROR_REPOS_EXPIRED] = "EXPIRED";
- axutil_error_messages[AXIS2_ERROR_REPOS_NOT_IMPLEMENTED] = "NOT_IMPLEMENTED";
+ axutil_error_messages[AXIS2_ERROR_REPOS_NOT_IMPLEMENTED] =
+ "NOT_IMPLEMENTED";
axutil_error_messages[AXIS2_ERROR_REPOS_NOT_FOUND] = "NOT_FOUND";
- axutil_error_messages[AXIS2_ERROR_REPOS_BAD_SEARCH_TEXT] = "BAD_SEARCH_TEXT";
+ axutil_error_messages[AXIS2_ERROR_REPOS_BAD_SEARCH_TEXT] =
+ "BAD_SEARCH_TEXT";
/* neethi */
axutil_error_messages[AXIS2_ERROR_NEETHI_ELEMENT_WITH_NO_NAMESPACE] =
"Element With No Namespace";
- axutil_error_messages[AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED_FROM_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED_FROM_ELEMENT] =
"Policy Creation failed from element";
axutil_error_messages[AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED_FROM_ELEMENT] =
"All creation failed from element";
- axutil_error_messages[AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED_FROM_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED_FROM_ELEMENT] =
"Exactlyone creation failed from element";
- axutil_error_messages[AXIS2_ERROR_NEETHI_REFERENCE_CREATION_FAILED_FROM_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_REFERENCE_CREATION_FAILED_FROM_ELEMENT] =
"Reference creation failed from element";
- axutil_error_messages[AXIS2_ERROR_NEETHI_ASSERTION_CREATION_FAILED_FROM_ELEMENT] =
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_ASSERTION_CREATION_FAILED_FROM_ELEMENT] =
"Assertion creation failed from element";
- axutil_error_messages[AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED] = "All Creation failed";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED] =
+ "All Creation failed";
axutil_error_messages[AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED] =
"Exactlyone Creation failed";
- axutil_error_messages[AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED] = "Policy Creation failed";
- axutil_error_messages[AXIS2_ERROR_NEETHI_NORMALIZATION_FAILED] = "Normalization failed";
- axutil_error_messages[AXIS2_ERROR_NEETHI_WRONG_INPUT_FOR_MERGE] = "Wrong Input for merge";
- axutil_error_messages[AXIS2_ERROR_NEETHI_CROSS_PRODUCT_FAILED] = "Cross Product failed";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED] =
+ "Policy Creation failed";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_NORMALIZATION_FAILED] =
+ "Normalization failed";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_WRONG_INPUT_FOR_MERGE] =
+ "Wrong Input for merge";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_CROSS_PRODUCT_FAILED] =
+ "Cross Product failed";
axutil_error_messages[AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS] =
"No Children Policy components";
- axutil_error_messages[AXIS2_ERROR_NEETHI_URI_NOT_SPECIFIED] = "Reference Uri not specified";
+ axutil_error_messages[AXIS2_ERROR_NEETHI_URI_NOT_SPECIFIED] =
+ "Reference Uri not specified";
axutil_error_messages[AXIS2_ERROR_NEETHI_NO_ENTRY_FOR_THE_GIVEN_URI] =
"No entry for the given Uri";
- axutil_error_messages[AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY] =
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY] =
"Exactlyone not found in normalized_policy";
- axutil_error_messages[AXIS2_ERROR_NEETHI_EXACTLYONE_IS_EMPTY] = "Exactlyone is Empty";
- axutil_error_messages[AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT] =
+ axutil_error_messages[AXIS2_ERROR_NEETHI_EXACTLYONE_IS_EMPTY] =
+ "Exactlyone is Empty";
+ axutil_error_messages
+ [AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT] =
"All not found while getting cross product";
return AXIS2_SUCCESS;
@@ -468,7 +564,8 @@
const axis2_char_t *message = NULL;
if (error)
{
- if (error->error_number > AXIS2_ERROR_NONE && error->error_number < AXIS2_ERROR_LAST)
+ if (error->error_number > AXIS2_ERROR_NONE &&
+ error->error_number < AXIS2_ERROR_LAST)
message = axutil_error_messages[error->error_number];
else
{
@@ -477,7 +574,8 @@
else if (error->error_number == AXIS2_ERROR_NONE)
message = axutil_error_messages[AXIS2_ERROR_NONE];
else
- message = "Undefined error returned by business logic implementation";
+ message =
+ "Undefined error returned by business logic implementation";
}
}
Modified: webservices/axis2/trunk/c/util/src/file.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/file.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/file.c (original)
+++ webservices/axis2/trunk/c/util/src/file.c Thu Sep 27 20:28:06 2007
@@ -34,7 +34,8 @@
AXIS2_ENV_CHECK(env, NULL);
- file = (axutil_file_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_file_t));
+ file =
+ (axutil_file_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_file_t));
if (!file)
{
@@ -102,7 +103,8 @@
{
if (!file->name)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_FILE_NAME_NOT_SET, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_FILE_NAME_NOT_SET,
+ AXIS2_FAILURE);
return NULL;
}
return (file->name);
@@ -141,7 +143,8 @@
{
if (!(file->path))
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_FILE_NAME_NOT_SET, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_FILE_NAME_NOT_SET,
+ AXIS2_FAILURE);
return NULL;
}
Modified: webservices/axis2/trunk/c/util/src/generic_obj.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/generic_obj.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/generic_obj.c (original)
+++ webservices/axis2/trunk/c/util/src/generic_obj.c Thu Sep 27 20:28:06 2007
@@ -33,7 +33,8 @@
AXIS2_ENV_CHECK(env, NULL);
generic_obj =
- (axutil_generic_obj_t *) AXIS2_MALLOC(env->allocator, sizeof(axutil_generic_obj_t));
+ (axutil_generic_obj_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axutil_generic_obj_t));
if (!generic_obj)
{
Modified: webservices/axis2/trunk/c/util/src/hash.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/hash.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/hash.c (original)
+++ webservices/axis2/trunk/c/util/src/hash.c Thu Sep 27 20:28:06 2007
@@ -84,8 +84,9 @@
axutil_hash_t * ht,
unsigned int max)
{
- return memset(AXIS2_MALLOC(ht->env->allocator, sizeof(*ht->array) * (max + 1)), 0,
- sizeof(*ht->array) * (max + 1));
+ return
+ memset(AXIS2_MALLOC(ht->env->allocator, sizeof(*ht->array) * (max + 1)),
+ 0, sizeof(*ht->array) * (max + 1));
}
AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
@@ -291,9 +292,11 @@
hash = ht->hash_func(key, &klen);
/* scan linked list */
- for (hep = &ht->array[hash & ht->max], he = *hep; he; hep = &he->next, he = *hep)
+ for (hep = &ht->array[hash & ht->max], he = *hep; he;
+ hep = &he->next, he = *hep)
{
- if (he->hash == hash && he->klen == klen && memcmp(he->key, key, klen) == 0)
+ if (he->hash == hash && he->klen == klen &&
+ memcmp(he->key, key, klen) == 0)
break;
}
@@ -328,7 +331,8 @@
AXIS2_ENV_CHECK(env, NULL);
ht = AXIS2_MALLOC(env->allocator,
- sizeof(axutil_hash_t) + sizeof(*ht->array) * (orig->max + 1) +
+ sizeof(axutil_hash_t) + sizeof(*ht->array) * (orig->max +
+ 1) +
sizeof(axutil_hash_entry_t) * orig->count);
ht->env = env;
ht->free = NULL;
@@ -454,12 +458,14 @@
*/
if (!axutil_env_is_ancestor(overlay->env, p))
{
- fprintf(stderr, "axutil_hash_merge: overlay's env is not an ancestor of p\n");
+ fprintf(stderr,
+ "axutil_hash_merge: overlay's env is not an ancestor of p\n");
abort();
}
if (!axutil_env_is_ancestor(base->env, p))
{
- fprintf(stderr, "axutil_hash_merge: base's env is not an ancestor of p\n");
+ fprintf(stderr,
+ "axutil_hash_merge: base's env is not an ancestor of p\n");
abort();
}
#endif
@@ -479,7 +485,8 @@
{
new_vals =
AXIS2_MALLOC(env->allocator,
- sizeof(axutil_hash_entry_t) * (base->count + overlay->count));
+ sizeof(axutil_hash_entry_t) * (base->count +
+ overlay->count));
}
j = 0;
for (k = 0; k <= base->max; k++)
@@ -504,12 +511,14 @@
i = iter->hash & res->max;
for (ent = res->array[i]; ent; ent = ent->next)
{
- if ((ent->klen == iter->klen) && (memcmp(ent->key, iter->key, iter->klen) == 0))
+ if ((ent->klen == iter->klen) &&
+ (memcmp(ent->key, iter->key, iter->klen) == 0))
{
if (merger)
{
ent->val =
- (*merger) (env, iter->key, iter->klen, iter->val, ent->val, data);
+ (*merger) (env, iter->key, iter->klen, iter->val,
+ ent->val, data);
}
else
{
Modified: webservices/axis2/trunk/c/util/src/linked_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/linked_list.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/linked_list.c (original)
+++ webservices/axis2/trunk/c/util/src/linked_list.c Thu Sep 27 20:28:06 2007
@@ -214,7 +214,8 @@
if (index < 0 || index > linked_list->size)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS,
+ AXIS2_FAILURE);
return AXIS2_FALSE;
}
return AXIS2_TRUE;
@@ -229,7 +230,8 @@
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
if (index < 0 || index >= linked_list->size)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INDEX_OUT_OF_BOUNDS,
+ AXIS2_FAILURE);
return AXIS2_FALSE;
}
return AXIS2_TRUE;
@@ -583,7 +585,9 @@
void **array;
entry_t *e;
AXIS2_ENV_CHECK(env, NULL);
- array = (void **) AXIS2_MALLOC(env->allocator, linked_list->size * sizeof(void *));
+ array =
+ (void **) AXIS2_MALLOC(env->allocator,
+ linked_list->size * sizeof(void *));
e = linked_list->first;
for (i = 0; i < linked_list->size; i++)
{
Modified: webservices/axis2/trunk/c/util/src/log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/log.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/log.c (original)
+++ webservices/axis2/trunk/c/util/src/log.c Thu Sep 27 20:28:06 2007
@@ -101,12 +101,15 @@
if (!allocator)
return NULL;
- log_impl = (axutil_log_impl_t *) AXIS2_MALLOC(allocator, sizeof(axutil_log_impl_t));
+ log_impl =
+ (axutil_log_impl_t *) AXIS2_MALLOC(allocator,
+ sizeof(axutil_log_impl_t));
if (!log_impl)
return NULL;
- log_impl->mutex = axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
+ log_impl->mutex =
+ axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
if (!log_impl->mutex)
{
@@ -127,22 +130,26 @@
{
if ((path_home = AXIS2_GETENV("AXIS2C_HOME")))
{
- AXIS2_SNPRINTF(log_dir, 500, "%s%c%s", path_home, AXIS2_PATH_SEP_CHAR, "logs");
- if (AXIS2_SUCCESS == axutil_file_handler_access(log_dir, AXIS2_F_OK))
+ AXIS2_SNPRINTF(log_dir, 500, "%s%c%s", path_home,
+ AXIS2_PATH_SEP_CHAR, "logs");
+ if (AXIS2_SUCCESS ==
+ axutil_file_handler_access(log_dir, AXIS2_F_OK))
{
- AXIS2_SNPRINTF(log_file_name, 500, "%s%c%s", log_dir, AXIS2_PATH_SEP_CHAR,
- tmp_filename);
+ AXIS2_SNPRINTF(log_file_name, 500, "%s%c%s", log_dir,
+ AXIS2_PATH_SEP_CHAR, tmp_filename);
}
else
{
- fprintf(stderr, "log folder %s does not exist - log file %s is written to . dir\n",
+ fprintf(stderr,
+ "log folder %s does not exist - log file %s is written to . dir\n",
log_dir, tmp_filename);
AXIS2_SNPRINTF(log_file_name, 500, "%s", tmp_filename);
}
}
else
{
- fprintf(stderr, "AXIS2C_HOME is not set - log is written to . dir\n");
+ fprintf(stderr,
+ "AXIS2C_HOME is not set - log is written to . dir\n");
AXIS2_SNPRINTF(log_file_name, 500, "%s", tmp_filename);
}
}
@@ -256,10 +263,11 @@
}
axutil_thread_mutex_lock(mutex);
if (file)
- fprintf(fd, "[%s] %s%s(%d) %s\n", axutil_log_impl_get_time_str(), level_str, file, line,
- value);
+ fprintf(fd, "[%s] %s%s(%d) %s\n", axutil_log_impl_get_time_str(),
+ level_str, file, line, value);
else
- fprintf(fd, "[%s] %s %s\n", axutil_log_impl_get_time_str(), level_str, value);
+ fprintf(fd, "[%s] %s %s\n", axutil_log_impl_get_time_str(), level_str,
+ value);
fflush(fd);
axutil_thread_mutex_unlock(mutex);
}
@@ -296,8 +304,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_DEBUG, filename, linenumber,
- value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_DEBUG,
+ filename, linenumber, value);
}
}
else
@@ -334,7 +342,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_INFO, NULL, -1, value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_INFO, NULL,
+ -1, value);
}
}
else
@@ -374,8 +383,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_WARNING, filename, linenumber,
- value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_WARNING,
+ filename, linenumber, value);
}
}
else
@@ -413,8 +422,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_ERROR, filename, linenumber,
- value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_ERROR,
+ filename, linenumber, value);
}
else
fprintf(stderr, "please check your log and buffer");
@@ -453,8 +462,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_CRITICAL, filename, linenumber,
- value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_CRITICAL,
+ filename, linenumber, value);
}
else
fprintf(stderr, "please check your log and buffer");
@@ -489,12 +498,15 @@
if (!allocator)
return NULL;
- log_impl = (axutil_log_impl_t *) AXIS2_MALLOC(allocator, sizeof(axutil_log_impl_t));
+ log_impl =
+ (axutil_log_impl_t *) AXIS2_MALLOC(allocator,
+ sizeof(axutil_log_impl_t));
if (!log_impl)
return NULL;
- log_impl->mutex = axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
+ log_impl->mutex =
+ axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
if (!log_impl->mutex)
{
@@ -547,8 +559,8 @@
va_start(ap, format);
AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_TRACE, filename, linenumber,
- value);
+ axutil_log_impl_write_to_file(fd, mutex, AXIS2_LOG_LEVEL_TRACE,
+ filename, linenumber, value);
}
}
else
Modified: webservices/axis2/trunk/c/util/src/minizip/archive_extract.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/archive_extract.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/archive_extract.c (original)
+++ webservices/axis2/trunk/c/util/src/minizip/archive_extract.c Thu Sep 27 20:28:06 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -32,13 +33,18 @@
#define WRITEBUFFERSIZE (8192)
#define MAXFILENAME (256)
-axis2_status_t aar_select();
-int aar_extract(axis2_char_t *d_name);
-
-extern int AXIS2_ALPHASORT();
-
-int axis2_mkdir(dir_name)
-const axis2_char_t* dir_name;
+axis2_status_t aar_select(
+ );
+int aar_extract(
+ axis2_char_t * d_name);
+
+extern int AXIS2_ALPHASORT(
+ );
+
+int
+axis2_mkdir(
+ dir_name)
+ const axis2_char_t *dir_name;
{
int value = 0;
#ifdef WIN32
@@ -49,22 +55,24 @@
return value;
}
-int axis2_create_dir(new_dir)
-axis2_char_t *new_dir;
+int
+axis2_create_dir(
+ new_dir)
+ axis2_char_t *new_dir;
{
- axis2_char_t *buffer ;
+ axis2_char_t *buffer;
axis2_char_t *p;
- int len = (int)strlen(new_dir);
+ int len = (int) strlen(new_dir);
if (len <= 0)
return 0;
- buffer = (axis2_char_t*)malloc(len + 1);
+ buffer = (axis2_char_t *) malloc(len + 1);
strcpy(buffer, new_dir);
- if (buffer[len-1] == '/')
+ if (buffer[len - 1] == '/')
{
- buffer[len-1] = '\0';
+ buffer[len - 1] = '\0';
}
if (axis2_mkdir(buffer) == 0)
@@ -95,22 +103,29 @@
return 1;
}
-int axis2_extract_currentfile(uf, popt_extract_without_path, popt_overwrite, password)
-unzFile uf;
-const int* popt_extract_without_path;
-int* popt_overwrite;
-const axis2_char_t* password;
+int
+axis2_extract_currentfile(
+ uf,
+ popt_extract_without_path,
+ popt_overwrite,
+ password)
+ unzFile uf;
+ const int *popt_extract_without_path;
+ int *popt_overwrite;
+ const axis2_char_t *password;
{
axis2_char_t filename_inzip[256];
- axis2_char_t* filename_withoutpath;
- axis2_char_t* p;
+ axis2_char_t *filename_withoutpath;
+ axis2_char_t *p;
int err = UNZ_OK;
FILE *fout = NULL;
- void* buf;
+ void *buf;
uInt size_buf;
unz_file_info file_info;
- err = unzGetCurrentFileInfo(uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0);
+ err =
+ unzGetCurrentFileInfo(uf, &file_info, filename_inzip,
+ sizeof(filename_inzip), NULL, 0, NULL, 0);
if (err != UNZ_OK)
{
@@ -118,7 +133,7 @@
}
size_buf = WRITEBUFFERSIZE;
- buf = (void*)malloc(size_buf);
+ buf = (void *) malloc(size_buf);
if (buf == NULL)
return UNZ_INTERNALERROR;
@@ -139,7 +154,7 @@
}
else
{
- const axis2_char_t* write_filename;
+ const axis2_char_t *write_filename;
int skip = 0;
if ((*popt_extract_without_path) == 0)
@@ -154,7 +169,7 @@
fout = fopen(write_filename, "wb");
if ((fout == NULL) && ((*popt_extract_without_path) == 0) &&
- (filename_withoutpath != (axis2_char_t*)filename_inzip))
+ (filename_withoutpath != (axis2_char_t *) filename_inzip))
{
axis2_char_t c = *(filename_withoutpath - 1);
*(filename_withoutpath - 1) = '\0';
@@ -198,11 +213,16 @@
return err;
}
-int axis2_extract(uf, opt_extract_without_path, opt_overwrite, password)
-unzFile uf;
-int opt_extract_without_path;
-int opt_overwrite;
-const axis2_char_t* password;
+int
+axis2_extract(
+ uf,
+ opt_extract_without_path,
+ opt_overwrite,
+ password)
+ unzFile uf;
+ int opt_extract_without_path;
+ int opt_overwrite;
+ const axis2_char_t *password;
{
uLong i;
unz_global_info gi;
@@ -212,11 +232,10 @@
if (err != UNZ_OK)
return -1;
- for (i = 0;i < gi.number_entry;i++)
+ for (i = 0; i < gi.number_entry; i++)
{
if (axis2_extract_currentfile(uf, &opt_extract_without_path,
- &opt_overwrite,
- password) != UNZ_OK)
+ &opt_overwrite, password) != UNZ_OK)
break;
if ((i + 1) < gi.number_entry)
@@ -233,13 +252,14 @@
return 0;
}
-
-int aar_extract(axis2_char_t *d_name)
+int
+aar_extract(
+ axis2_char_t * d_name)
{
const axis2_char_t *zipfilename = NULL;
const axis2_char_t *filename_to_extract = NULL;
const axis2_char_t *password = NULL;
- axis2_char_t filename_try[MAXFILENAME+16] = "";
+ axis2_char_t filename_try[MAXFILENAME + 16] = "";
int opt_do_extract_withoutpath = 0;
int opt_overwrite = 0;
int opt_extractdir = 0;
@@ -255,7 +275,7 @@
{
zlib_filefunc_def ffunc;
strncpy(filename_try, zipfilename, MAXFILENAME - 1);
- filename_try[ MAXFILENAME ] = '\0';
+ filename_try[MAXFILENAME] = '\0';
axis2_fill_win32_filefunc(&ffunc);
@@ -274,36 +294,42 @@
if (opt_extractdir && chdir(dir_name))
exit(-1);
- return axis2_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password);
+ return axis2_extract(uf, opt_do_extract_withoutpath, opt_overwrite,
+ password);
unzCloseCurrentFile(uf);
return 0;
}
-
-
-int axis2_extract_onefile(uf, filename, opt_extract_without_path, opt_overwrite, password)
-unzFile uf;
-const axis2_char_t* filename;
-int opt_extract_without_path;
-int opt_overwrite;
-const axis2_char_t* password;
+int
+axis2_extract_onefile(
+ uf,
+ filename,
+ opt_extract_without_path,
+ opt_overwrite,
+ password)
+ unzFile uf;
+ const axis2_char_t *filename;
+ int opt_extract_without_path;
+ int opt_overwrite;
+ const axis2_char_t *password;
{
if (unzLocateFile(uf, filename, CASESENSITIVITY) != UNZ_OK)
return -1;
if (axis2_extract_currentfile(uf, &opt_extract_without_path,
- &opt_overwrite,
- password) == UNZ_OK)
+ &opt_overwrite, password) == UNZ_OK)
return 0;
else
return -1;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_archive_extract()
+axis2_archive_extract(
+ )
{
struct dirent **namelist;
- int n, i;
+ int n,
+ i;
axis2_char_t *ptr;
n = scandir(".", &namelist, 0, alphasort);
@@ -314,22 +340,25 @@
while (n--)
{
if ((strcmp(namelist[n]->d_name, ".") == 0) ||
- (strcmp(namelist[n]->d_name, "..") == 0))
+ (strcmp(namelist[n]->d_name, "..") == 0))
{
- for (i = n; i >= 0; i--) /* clean remaining memory before return */
+ for (i = n; i >= 0; i--) /* clean remaining memory before return */
free(namelist[i]);
free(namelist);
return (AXIS2_FALSE);
}
-
+
ptr = axutil_rindex(namelist[n]->d_name, '.');
if ((ptr) &&
- (((strcmp(ptr, AXIS2_AAR_SUFFIX) == 0)) || (strcmp(ptr, AXIS2_MAR_SUFFIX) == 0)))
- for (i = 0;i < n;i++)
- if (strncmp(namelist[n]->d_name, namelist[i]->d_name, strlen(namelist[i]->d_name)) == 0)
+ (((strcmp(ptr, AXIS2_AAR_SUFFIX) == 0)) ||
+ (strcmp(ptr, AXIS2_MAR_SUFFIX) == 0)))
+ for (i = 0; i < n; i++)
+ if (strncmp
+ (namelist[n]->d_name, namelist[i]->d_name,
+ strlen(namelist[i]->d_name)) == 0)
{
int j;
- for (j = n; j >= 0; j--) /* clean remaining memory before return */
+ for (j = n; j >= 0; j--) /* clean remaining memory before return */
free(namelist[j]);
free(namelist);
return (AXIS2_FALSE);
@@ -342,4 +371,3 @@
}
return (AXIS2_TRUE);
}
-
Modified: webservices/axis2/trunk/c/util/src/minizip/crypt.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/crypt.c?rev=580207&r1=580206&r2=580207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/crypt.c (original)
+++ webservices/axis2/trunk/c/util/src/minizip/crypt.c Thu Sep 27 20:28:06 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -15,10 +16,8 @@
* limitations under the License.
*/
-
/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2005 Gilles Vollant
@@ -52,44 +51,54 @@
/***********************************************************************
* Return the next byte in the pseudo-random sequence
*/
-int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+int
+decrypt_byte(
+ unsigned long *pkeys,
+ const unsigned long *pcrc_32_tab)
{
- unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
- * unpredictable manner on 16-bit systems; not a problem
- * with any known compiler so far, though */
+ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
+ * unpredictable manner on 16-bit systems; not a problem
+ * with any known compiler so far, though */
- temp = ((unsigned)(*(pkeys + 2)) & 0xffff) | 2;
- return (int)(((temp *(temp ^ 1)) >> 8) & 0xff);
+ temp = ((unsigned) (*(pkeys + 2)) & 0xffff) | 2;
+ return (int) (((temp * (temp ^ 1)) >> 8) & 0xff);
}
/***********************************************************************
* Update the encryption keys with the next byte of plain text
*/
-int update_keys(unsigned long* pkeys, const unsigned long* pcrc_32_tab, int c)
+int
+update_keys(
+ unsigned long *pkeys,
+ const unsigned long *pcrc_32_tab,
+ int c)
{
(*(pkeys + 0)) = CRC32((*(pkeys + 0)), c);
(*(pkeys + 1)) += (*(pkeys + 0)) & 0xff;
(*(pkeys + 1)) = (*(pkeys + 1)) * 134775813L + 1;
{
- register int keyshift = (int)((*(pkeys + 1)) >> 24);
+ register int keyshift = (int) ((*(pkeys + 1)) >> 24);
(*(pkeys + 2)) = CRC32((*(pkeys + 2)), keyshift);
}
return c;
}
-
/***********************************************************************
* Initialize the encryption keys and the random header according to
* the given password.
*/
-void init_keys(const char* passwd, unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+void
+init_keys(
+ const char *passwd,
+ unsigned long *pkeys,
+ const unsigned long *pcrc_32_tab)
{
*(pkeys + 0) = 305419896L;
*(pkeys + 1) = 591751049L;
*(pkeys + 2) = 878082192L;
while (*passwd != '\0')
{
- update_keys(pkeys, pcrc_32_tab, (int)*passwd);
+ update_keys(pkeys, pcrc_32_tab, (int) *passwd);
passwd++;
}
}
@@ -103,24 +112,32 @@
#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
#define RAND_HEAD_LEN 12
+
/* "last resort" source for second part of crypt seed pattern */
# ifndef ZCR_SEED2
-# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
+# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
# endif
-int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
-const char *passwd; /* password string */
-unsigned char *buf; /* where to write header */
-int bufSize;
-unsigned long* pkeys;
-const unsigned long* pcrc_32_tab;
-unsigned long crcForCrypting;
+int
+crypthead(
+ passwd,
+ buf,
+ bufSize,
+ pkeys,
+ pcrc_32_tab,
+ crcForCrypting)
+ const char *passwd; /* password string */
+ unsigned char *buf; /* where to write header */
+ int bufSize;
+ unsigned long *pkeys;
+ const unsigned long *pcrc_32_tab;
+ unsigned long crcForCrypting;
{
- int n; /* index in random header */
- int t; /* temporary */
- int c; /* random byte */
- unsigned char header[RAND_HEAD_LEN-2]; /* random header */
- static unsigned calls = 0; /* ensure different random header each time */
+ int n; /* index in random header */
+ int t; /* temporary */
+ int c; /* random byte */
+ unsigned char header[RAND_HEAD_LEN - 2]; /* random header */
+ static unsigned calls = 0; /* ensure different random header each time */
if (bufSize < RAND_HEAD_LEN)
return 0;
@@ -131,22 +148,24 @@
*/
if (++calls == 1)
{
- srand((unsigned)(time(NULL) ^ ZCR_SEED2));
+ srand((unsigned) (time(NULL) ^ ZCR_SEED2));
}
init_keys(passwd, pkeys, pcrc_32_tab);
for (n = 0; n < RAND_HEAD_LEN - 2; n++)
{
c = (rand() >> 7) & 0xff;
- header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
+ header[n] = (unsigned char) zencode(pkeys, pcrc_32_tab, c, t);
}
/* Encrypt random header (last two bytes is high word of crc) */
init_keys(passwd, pkeys, pcrc_32_tab);
for (n = 0; n < RAND_HEAD_LEN - 2; n++)
{
- buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
+ buf[n] = (unsigned char) zencode(pkeys, pcrc_32_tab, header[n], t);
}
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ buf[n++] =
+ zencode(pkeys, pcrc_32_tab, (int) (crcForCrypting >> 16) & 0xff, t);
+ buf[n++] =
+ zencode(pkeys, pcrc_32_tab, (int) (crcForCrypting >> 24) & 0xff, t);
return n;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org