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 11:59:33 UTC

svn commit: r580280 - in /webservices/axis2/trunk/c/util: src/ src/minizip/ test/util/

Author: samisa
Date: Fri Sep 28 02:59:33 2007
New Revision: 580280

URL: http://svn.apache.org/viewvc?rev=580280&view=rev
Log:
Fixed formatting

Modified:
    webservices/axis2/trunk/c/util/src/base64.c
    webservices/axis2/trunk/c/util/src/minizip/axis2_archive_extract.h
    webservices/axis2/trunk/c/util/src/minizip/axis2_crypt.h
    webservices/axis2/trunk/c/util/src/minizip/axis2_ioapi.h
    webservices/axis2/trunk/c/util/src/minizip/axis2_iowin32.h
    webservices/axis2/trunk/c/util/src/minizip/axis2_unzip.h
    webservices/axis2/trunk/c/util/test/util/test_log.c
    webservices/axis2/trunk/c/util/test/util/test_log.h
    webservices/axis2/trunk/c/util/test/util/test_string.c
    webservices/axis2/trunk/c/util/test/util/test_thread.c
    webservices/axis2/trunk/c/util/test/util/test_thread.h
    webservices/axis2/trunk/c/util/test/util/test_util.c

Modified: webservices/axis2/trunk/c/util/src/base64.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/base64.c?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/base64.c (original)
+++ webservices/axis2/trunk/c/util/src/base64.c Fri Sep 28 02:59:33 2007
@@ -78,9 +78,9 @@
     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,
+    164,
     181, 126, 115, 116, 117, 118, 119, 120, 121, 122, 161, 191, 208, 221, 222,
-        174,
+    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,

Modified: webservices/axis2/trunk/c/util/src/minizip/axis2_archive_extract.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/axis2_archive_extract.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/axis2_archive_extract.h (original)
+++ webservices/axis2/trunk/c/util/src/minizip/axis2_archive_extract.h Fri Sep 28 02:59:33 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
@@ -14,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 #ifndef AXIS2_ARCHIVE_EXTRACT_H
 #define AXIS2_ARCHIVE_EXTRACT_H
@@ -24,12 +24,12 @@
 {
 #endif
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_archive_extract();
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_archive_extract(
+    );
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif /** AXIS2_ARCHIVE_EXTRACT_H */
-

Modified: webservices/axis2/trunk/c/util/src/minizip/axis2_crypt.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/axis2_crypt.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/axis2_crypt.h (original)
+++ webservices/axis2/trunk/c/util/src/minizip/axis2_crypt.h Fri Sep 28 02:59:33 2007
@@ -1,3 +1,4 @@
+
 /*
   * Copyright 2004,2005 The Apache Software Foundation.
   *
@@ -16,7 +17,6 @@
 
 /* crypt.h -- base code for crypt/uncrypt ZIPfile
 
-
    Version 1.01e, February 12th, 2005
 
    Copyright (C) 1998-2005 Gilles Vollant
@@ -48,18 +48,26 @@
 /***********************************************************************
  * 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);
 
 /***********************************************************************
  * 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);
 
 /***********************************************************************
  * 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);
 
 #define zdecode(pkeys,pcrc_32_tab,c) \
     (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
@@ -70,12 +78,17 @@
 #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
 
 #define RAND_HEAD_LEN  12
-   /* "last resort" source for second part of crypt seed pattern */
+/* "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);
-
+int crypthead(
+    passwd,
+    buf,
+    bufSize,
+    pkeys,
+    pcrc_32_tab,
+    crcForCrypting);
 
 #endif

Modified: webservices/axis2/trunk/c/util/src/minizip/axis2_ioapi.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/axis2_ioapi.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/axis2_ioapi.h (original)
+++ webservices/axis2/trunk/c/util/src/minizip/axis2_ioapi.h Fri Sep 28 02:59:33 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
@@ -26,7 +27,6 @@
 #ifndef _ZLIBIOAPI_H
 #define _ZLIBIOAPI_H
 
-
 #define ZLIB_FILEFUNC_SEEK_CUR (1)
 #define ZLIB_FILEFUNC_SEEK_END (2)
 #define ZLIB_FILEFUNC_SEEK_SET (0)
@@ -38,7 +38,6 @@
 #define ZLIB_FILEFUNC_MODE_EXISTING (4)
 #define ZLIB_FILEFUNC_MODE_CREATE   (8)
 
-
 #ifndef ZCALLBACK
 
 #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
@@ -49,32 +48,61 @@
 #endif
 
 #ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong  (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong  (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long   (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long   (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int    (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int    (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef struct zlib_filefunc_def_s
+extern "C"
 {
-    open_file_func      zopen_file;
-    read_file_func      zread_file;
-    write_file_func     zwrite_file;
-    tell_file_func      ztell_file;
-    seek_file_func      zseek_file;
-    close_file_func     zclose_file;
-    testerror_file_func zerror_file;
-    voidpf              opaque;
-} zlib_filefunc_def;
-
+#endif
 
+    typedef voidpf(
+        ZCALLBACK * open_file_func) OF(
+            (voidpf opaque,
+                    const char *filename,
+                    int mode));
+    typedef uLong(
+        ZCALLBACK * read_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream,
+                    void *buf,
+                    uLong size));
+    typedef uLong(
+        ZCALLBACK * write_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream,
+                    const void *buf,
+                    uLong size));
+    typedef long(
+        ZCALLBACK * tell_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream));
+    typedef long(
+        ZCALLBACK * seek_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream,
+                    uLong offset,
+                    int origin));
+    typedef int(
+        ZCALLBACK * close_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream));
+    typedef int(
+        ZCALLBACK * testerror_file_func) OF(
+            (voidpf opaque,
+                    voidpf stream));
+
+    typedef struct zlib_filefunc_def_s
+    {
+        open_file_func zopen_file;
+        read_file_func zread_file;
+        write_file_func zwrite_file;
+        tell_file_func ztell_file;
+        seek_file_func zseek_file;
+        close_file_func zclose_file;
+        testerror_file_func zerror_file;
+        voidpf opaque;
+    }
+    zlib_filefunc_def;
 
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+    void fill_fopen_filefunc OF(
+        (zlib_filefunc_def * pzlib_filefunc_def));
 
 #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
 #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
@@ -83,10 +111,8 @@
 #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
 #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
 
-
 #ifdef __cplusplus
 }
 #endif
 
 #endif
-

Modified: webservices/axis2/trunk/c/util/src/minizip/axis2_iowin32.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/axis2_iowin32.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/axis2_iowin32.h (original)
+++ webservices/axis2/trunk/c/util/src/minizip/axis2_iowin32.h Fri Sep 28 02:59:33 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
@@ -26,12 +27,13 @@
 
 #include <windows.h>
 
-
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+    void fill_win32_filefunc OF(
+        (zlib_filefunc_def * pzlib_filefunc_def));
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/util/src/minizip/axis2_unzip.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/minizip/axis2_unzip.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/minizip/axis2_unzip.h (original)
+++ webservices/axis2/trunk/c/util/src/minizip/axis2_unzip.h Fri Sep 28 02:59:33 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,8 +16,6 @@
  * limitations under the License.
  */
 
-
-
 /* unzip.h -- IO for uncompress .zip files using zlib
    Version 1.01e, February 12th, 2005
 
@@ -29,7 +28,6 @@
    Encryption compatible with pkzip 2.04g only supported
    Old compressions used by old PKZip 1.x are not supported
 
-
    I WAIT FEEDBACK at mail info@winimage.com
    Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
 
@@ -65,7 +63,8 @@
 #define _unz_H
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
 #ifndef _ZLIB_H
@@ -77,15 +76,19 @@
 #endif
 
 #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
-    from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
+
+    /* like the STRICT of WIN32, we define a pointer that cannot be converted
+        from (void*) without cast */
+    typedef struct TagunzFile__
+    {
+        int unused;
+    }
+    unzFile__;
+    typedef unzFile__ *unzFile;
 #else
-typedef voidp unzFile;
+    typedef voidp unzFile;
 #endif
 
-
 #define UNZ_OK                          (0)
 #define UNZ_END_OF_LIST_OF_FILE         (-100)
 #define UNZ_ERRNO                       (Z_ERRNO)
@@ -95,279 +98,320 @@
 #define UNZ_INTERNALERROR               (-104)
 #define UNZ_CRCERROR                    (-105)
 
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
-    uInt tm_sec;            /* seconds after the minute - [0,59] */
-    uInt tm_min;            /* minutes after the hour - [0,59] */
-    uInt tm_hour;           /* hours since midnight - [0,23] */
-    uInt tm_mday;           /* day of the month - [1,31] */
-    uInt tm_mon;            /* months since January - [0,11] */
-    uInt tm_year;           /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
-   These data comes from the end of central dir */
-typedef struct unz_global_info_s
-{
-    uLong number_entry;         /* total number of entries in
-                       the central dir on this disk */
-    uLong size_comment;         /* size of the global comment of the zipfile */
-} unz_global_info;
-
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info_s
-{
-    uLong version;              /* version made by                 2 bytes */
-    uLong version_needed;       /* version needed to extract       2 bytes */
-    uLong flag;                 /* general purpose bit flag        2 bytes */
-    uLong compression_method;   /* compression method              2 bytes */
-    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */
-    uLong crc;                  /* crc-32                          4 bytes */
-    uLong compressed_size;      /* compressed size                 4 bytes */
-    uLong uncompressed_size;    /* uncompressed size               4 bytes */
-    uLong size_filename;        /* filename length                 2 bytes */
-    uLong size_file_extra;      /* extra field length              2 bytes */
-    uLong size_file_comment;    /* file comment length             2 bytes */
-
-    uLong disk_num_start;       /* disk number start               2 bytes */
-    uLong internal_fa;          /* internal file attributes        2 bytes */
-    uLong external_fa;          /* external file attributes        4 bytes */
-
-    tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
-                                                 const char* fileName2,
-                                                 int iCaseSensitivity));
-/*
-   Compare two filename (fileName1,fileName2).
-   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                or strcasecmp)
-   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-    (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-/*
-  Open a Zip file. path contain the full pathname (by example,
-     on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
-     "zlib/zlib113.zip".
-     If the zipfile cannot be opened (file don't exist or in not valid), the
-       return value is NULL.
-     Else, the return value is a unzFile Handle, usable with other function
-       of this unzip package.
-*/
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
-                                    zlib_filefunc_def* pzlib_filefunc_def));
-/*
-   Open a Zip file, like unzOpen, but provide a set of file low level API
-      for read/write the zip file (see axis2_ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
-  Close a ZipFile opened with unzipOpen.
-  If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
-    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
-  return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
-                                        unz_global_info *pglobal_info));
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
-                                           char *szComment,
-                                           uLong uSizeBuf));
-/*
-  Get the global comment string of the ZipFile, in the szComment buffer.
-  uSizeBuf is the size of the szComment buffer.
-  return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the first file.
-  return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the next file.
-  return UNZ_OK if there is no problem
-  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
-                     const char *szFileName,
-                     int iCaseSensitivity));
-/*
-  Try locate the file szFileName in the zipfile.
-  For the iCaseSensitivity signification, see unzStringFileNameCompare
-
-  return value :
-  UNZ_OK if the file is found. It becomes the current file.
-  UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
-    uLong pos_in_zip_directory;   /* offset in zip file directory */
-    uLong num_of_file;            /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
-                         unz_file_info *pfile_info,
-                         char *szFileName,
-                         uLong fileNameBufferSize,
-                         void *extraField,
-                         uLong extraFieldBufferSize,
-                         char *szComment,
-                         uLong commentBufferSize));
-/*
-  Get Info about the current file
-  if pfile_info!=NULL, the *pfile_info structure will contain somes info about
-        the current file
-  if szFileName!=NULL, the filemane string will be copied in szFileName
-            (fileNameBufferSize is the size of the buffer)
-  if extraField!=NULL, the extra field information will be copied in extraField
-            (extraFieldBufferSize is the size of the buffer).
-            This is the Central-header version of the extra field
-  if szComment!=NULL, the comment string of the file will be copied in szComment
-            (commentBufferSize is the size of the buffer)
-*/
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
-   from it, and close it (you can close it before reading all the file)
-   */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
-  Open for reading data the current file in the zipfile.
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
-                                                  const char* password));
-/*
-  Open for reading data the current file in the zipfile.
-  password is a crypting password
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw,
-                                           const char* password));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
-  Close the file in zip opened with unzOpenCurrentFile
-  Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
-                      voidp buf,
-                      unsigned len));
-/*
-  Read bytes from the current file (opened by unzOpenCurrentFile)
-  buf contain buffer where data must be copied
-  len the size of buf.
-
-  return the number of byte copied if somes bytes are copied
-  return 0 if the end of file was reached
-  return <0 with error code if there is an error
-    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-/*
-  Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
-  return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
-                                             voidp buf,
-                                             unsigned len));
-/*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
-
-  if buf==NULL, it return the size of the local extra field
-
-  if buf!=NULL, len is the size of the buffer, the extra header is copied in
-    buf.
-  the return value is the number of bytes copied in buf, or (if <0)
-    the error code
-*/
-
-/***************************************************************************/
-
-/* Get the current file offset */
-extern uLong ZEXPORT unzGetOffset (unzFile file);
-
-/* Set the current file offset */
-extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
-
-
+    /* tm_unz contain date/time info */
+    typedef struct tm_unz_s
+    {
+        uInt tm_sec;    /* seconds after the minute - [0,59] */
+        uInt tm_min;    /* minutes after the hour - [0,59] */
+        uInt tm_hour;   /* hours since midnight - [0,23] */
+        uInt tm_mday;   /* day of the month - [1,31] */
+        uInt tm_mon;    /* months since January - [0,11] */
+        uInt tm_year;   /* years - [1980..2044] */
+    }
+    tm_unz;
+
+    /* unz_global_info structure contain global data about the ZIPfile
+       These data comes from the end of central dir */
+    typedef struct unz_global_info_s
+    {
+        uLong number_entry; /* total number of entries in
+                                               the central dir on this disk */
+        uLong size_comment; /* size of the global comment of the zipfile */
+    }
+    unz_global_info;
+
+    /* unz_file_info contain information about a file in the zipfile */
+    typedef struct unz_file_info_s
+    {
+        uLong version;  /* version made by                 2 bytes */
+        uLong version_needed;   /* version needed to extract       2 bytes */
+        uLong flag;     /* general purpose bit flag        2 bytes */
+        uLong compression_method;   /* compression method              2 bytes */
+        uLong dosDate;  /* last mod file date in Dos fmt   4 bytes */
+        uLong crc;      /* crc-32                          4 bytes */
+        uLong compressed_size;  /* compressed size                 4 bytes */
+        uLong uncompressed_size;    /* uncompressed size               4 bytes */
+        uLong size_filename;    /* filename length                 2 bytes */
+        uLong size_file_extra;  /* extra field length              2 bytes */
+        uLong size_file_comment;    /* file comment length             2 bytes */
+
+        uLong disk_num_start;   /* disk number start               2 bytes */
+        uLong internal_fa;  /* internal file attributes        2 bytes */
+        uLong external_fa;  /* external file attributes        4 bytes */
+
+        tm_unz tmu_date;
+    }
+    unz_file_info;
+
+    extern int ZEXPORT unzStringFileNameCompare OF(
+            (const char *fileName1,
+                    const char *fileName2,
+                    int iCaseSensitivity));
+
+    /*
+       Compare two filename (fileName1,fileName2).
+       If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+       If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+                                    or strcasecmp)
+       If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+        (like 1 on Unix, 2 on Windows)
+    */
+
+    extern unzFile ZEXPORT unzOpen OF(
+            (const char *path));
+
+    /*
+      Open a Zip file. path contain the full pathname (by example,
+         on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
+         "zlib/zlib113.zip".
+         If the zipfile cannot be opened (file don't exist or in not valid), the
+           return value is NULL.
+         Else, the return value is a unzFile Handle, usable with other function
+           of this unzip package.
+    */
+
+    extern unzFile ZEXPORT unzOpen2 OF(
+            (const char *path,
+                    zlib_filefunc_def * pzlib_filefunc_def));
+
+    /*
+       Open a Zip file, like unzOpen, but provide a set of file low level API
+          for read/write the zip file (see axis2_ioapi.h)
+    */
+
+    extern int ZEXPORT unzClose OF(
+            (unzFile file));
+
+    /*
+      Close a ZipFile opened with unzipOpen.
+      If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
+        these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
+      return UNZ_OK if there is no problem. */
+
+    extern int ZEXPORT unzGetGlobalInfo OF(
+            (unzFile file,
+                    unz_global_info * pglobal_info));
+
+    /*
+      Write info about the ZipFile in the *pglobal_info structure.
+      No preparation of the structure is needed
+      return UNZ_OK if there is no problem. */
+
+    extern int ZEXPORT unzGetGlobalComment OF(
+            (unzFile file,
+                    char *szComment,
+                    uLong uSizeBuf));
+
+    /*
+      Get the global comment string of the ZipFile, in the szComment buffer.
+      uSizeBuf is the size of the szComment buffer.
+      return the number of byte copied or an error code <0
+    */
+
+    /***************************************************************************/
+
+    /* Unzip package allow you browse the directory of the zipfile */
+
+    extern int ZEXPORT unzGoToFirstFile OF(
+            (unzFile file));
+
+    /*
+      Set the current file of the zipfile to the first file.
+      return UNZ_OK if there is no problem
+    */
+
+    extern int ZEXPORT unzGoToNextFile OF(
+            (unzFile file));
+
+    /*
+      Set the current file of the zipfile to the next file.
+      return UNZ_OK if there is no problem
+      return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+    */
+
+    extern int ZEXPORT unzLocateFile OF(
+            (unzFile file,
+                    const char *szFileName,
+                    int iCaseSensitivity));
+
+    /*
+      Try locate the file szFileName in the zipfile.
+      For the iCaseSensitivity signification, see unzStringFileNameCompare
+
+      return value :
+      UNZ_OK if the file is found. It becomes the current file.
+      UNZ_END_OF_LIST_OF_FILE if the file is not found
+    */
+
+    /* ****************************************** */
+
+    /* Ryan supplied functions */
+
+    /* unz_file_info contain information about a file in the zipfile */
+    typedef struct unz_file_pos_s
+    {
+        uLong pos_in_zip_directory; /* offset in zip file directory */
+        uLong num_of_file;  /* # of file */
+    }
+    unz_file_pos;
+
+    extern int ZEXPORT unzGetFilePos(
+            unzFile file,
+            unz_file_pos * file_pos);
+
+    extern int ZEXPORT unzGoToFilePos(
+            unzFile file,
+            unz_file_pos * file_pos);
+
+    /* ****************************************** */
+
+    extern int ZEXPORT unzGetCurrentFileInfo OF(
+            (unzFile file,
+                    unz_file_info * pfile_info,
+                    char *szFileName,
+                    uLong fileNameBufferSize,
+                    void *extraField,
+                    uLong extraFieldBufferSize,
+                    char *szComment,
+                    uLong commentBufferSize));
+
+    /*
+      Get Info about the current file
+      if pfile_info!=NULL, the *pfile_info structure will contain somes info about
+            the current file
+      if szFileName!=NULL, the filemane string will be copied in szFileName
+                (fileNameBufferSize is the size of the buffer)
+      if extraField!=NULL, the extra field information will be copied in extraField
+                (extraFieldBufferSize is the size of the buffer).
+                This is the Central-header version of the extra field
+      if szComment!=NULL, the comment string of the file will be copied in szComment
+                (commentBufferSize is the size of the buffer)
+    */
+
+    /***************************************************************************/
+
+    /* for reading the content of the current zipfile, you can open it, read data
+       from it, and close it (you can close it before reading all the file)
+       */
+
+    extern int ZEXPORT unzOpenCurrentFile OF(
+            (unzFile file));
+
+    /*
+      Open for reading data the current file in the zipfile.
+      If there is no error, the return value is UNZ_OK.
+    */
+
+    extern int ZEXPORT unzOpenCurrentFilePassword OF(
+            (unzFile file,
+                    const char *password));
+
+    /*
+      Open for reading data the current file in the zipfile.
+      password is a crypting password
+      If there is no error, the return value is UNZ_OK.
+    */
+
+    extern int ZEXPORT unzOpenCurrentFile2 OF(
+            (unzFile file,
+                    int *method,
+                    int *level,
+                    int raw));
+
+    /*
+      Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+        if raw==1
+      *method will receive method of compression, *level will receive level of
+         compression
+      note : you can set level parameter as NULL (if you did not want known level,
+             but you CANNOT set method parameter as NULL
+    */
+
+    extern int ZEXPORT unzOpenCurrentFile3 OF(
+            (unzFile file,
+                    int *method,
+                    int *level,
+                    int raw,
+                    const char *password));
+
+    /*
+      Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+        if raw==1
+      *method will receive method of compression, *level will receive level of
+         compression
+      note : you can set level parameter as NULL (if you did not want known level,
+             but you CANNOT set method parameter as NULL
+    */
+
+    extern int ZEXPORT unzCloseCurrentFile OF(
+            (unzFile file));
+
+    /*
+      Close the file in zip opened with unzOpenCurrentFile
+      Return UNZ_CRCERROR if all the file was read but the CRC is not good
+    */
+
+    extern int ZEXPORT unzReadCurrentFile OF(
+            (unzFile file,
+                    voidp buf,
+                    unsigned len));
+
+    /*
+      Read bytes from the current file (opened by unzOpenCurrentFile)
+      buf contain buffer where data must be copied
+      len the size of buf.
+
+      return the number of byte copied if somes bytes are copied
+      return 0 if the end of file was reached
+      return <0 with error code if there is an error
+        (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+    */
+
+    extern z_off_t ZEXPORT unztell OF(
+            (unzFile file));
+
+    /*
+      Give the current position in uncompressed data
+    */
+
+    extern int ZEXPORT unzeof OF(
+            (unzFile file));
+
+    /*
+      return 1 if the end of file was reached, 0 elsewhere
+    */
+
+    extern int ZEXPORT unzGetLocalExtrafield OF(
+            (unzFile file,
+                    voidp buf,
+                    unsigned len));
+
+    /*
+      Read extra field from the current file (opened by unzOpenCurrentFile)
+      This is the local-header version of the extra field (sometimes, there is
+        more info in the local-header version than in the central-header)
+
+      if buf==NULL, it return the size of the local extra field
+
+      if buf!=NULL, len is the size of the buffer, the extra header is copied in
+        buf.
+      the return value is the number of bytes copied in buf, or (if <0)
+        the error code
+    */
+
+    /***************************************************************************/
+
+    /* Get the current file offset */
+    extern uLong ZEXPORT unzGetOffset(
+            unzFile file);
+
+    /* Set the current file offset */
+    extern int ZEXPORT unzSetOffset(
+            unzFile file,
+            uLong pos);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _unz_H */
+#endif                          /* _unz_H */

Modified: webservices/axis2/trunk/c/util/test/util/test_log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_log.c?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_log.c (original)
+++ webservices/axis2/trunk/c/util/test/util/test_log.c Fri Sep 28 02:59:33 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
@@ -22,7 +23,9 @@
 #include <axutil_allocator.h>
 #include <test_log.h>
 #include <string.h>
-const axutil_env_t *create_env_with_error_log()
+const axutil_env_t *
+create_env_with_error_log(
+    )
 {
     axutil_allocator_t *allocator = axutil_allocator_init(NULL);
     if (!allocator)
@@ -37,7 +40,7 @@
         return NULL;
     }
 
-    axutil_log_t *log22  = axutil_log_create(allocator, NULL, NULL);
+    axutil_log_t *log22 = axutil_log_create(allocator, NULL, NULL);
     if (!log22)
     {
         printf("cannot create log\n");
@@ -45,10 +48,11 @@
     }
     /*
      * allow all types of logs
-      */
+     */
     log22->level = AXIS2_LOG_LEVEL_DEBUG;
-    /*   log22->enabled = 0;*/
-    const axutil_env_t *env = axutil_env_create_with_error_log(allocator, error, log22);
+    /*   log22->enabled = 0; */
+    const axutil_env_t *env =
+        axutil_env_create_with_error_log(allocator, error, log22);
     if (!env)
     {
         printf("cannot create env with error and log\n");
@@ -57,7 +61,9 @@
     return env;
 }
 
-void test_axutil_log_write(const axutil_env_t *env)
+void
+test_axutil_log_write(
+    const axutil_env_t * env)
 {
     char msg[32];
     printf("\n####start of test_axutil_log_write\n\n");
@@ -65,7 +71,9 @@
     printf("\n####end of test_axutil_log_write\n\n");
 }
 
-void test_axutil_log_debug(const axutil_env_t *env)
+void
+test_axutil_log_debug(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_degug\n\n");
     env->log->level = AXIS2_LOG_LEVEL_DEBUG;
@@ -73,15 +81,20 @@
     printf("\n####end of test_axutil_log_debug\n\n");
 }
 
-void test_axutil_log_debug_off(const axutil_env_t *env)
+void
+test_axutil_log_debug_off(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_degug_off\n\n");
-    env->log->level = AXIS2_LOG_LEVEL_ERROR;/*log only ERROR's and CRITICAL's*/
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "this should not be logged log_debug test %s %d", "foo", 1);
+    env->log->level = AXIS2_LOG_LEVEL_ERROR;    /*log only ERROR's and CRITICAL's */
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+                    "this should not be logged log_debug test %s %d", "foo", 1);
     printf("\n####end of test_axutil_log_debug_off\n\n");
 }
 
-void test_axutil_log_info(const axutil_env_t *env)
+void
+test_axutil_log_info(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_info\n\n");
     env->log->level = AXIS2_LOG_LEVEL_DEBUG;
@@ -89,35 +102,44 @@
     printf("\n####end of test_axutil_log_info\n\n");
 }
 
-
-void test_axutil_log_info_off(const axutil_env_t *env)
+void
+test_axutil_log_info_off(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_info_off\n\n");
-    env->log->level = AXIS2_LOG_LEVEL_ERROR;/*log only ERROR's and CRITICAL's*/
-    AXIS2_LOG_INFO(env->log, "this should not be logged log_info test %s %d", "foo", 1);
+    env->log->level = AXIS2_LOG_LEVEL_ERROR;    /*log only ERROR's and CRITICAL's */
+    AXIS2_LOG_INFO(env->log, "this should not be logged log_info test %s %d",
+                   "foo", 1);
     printf("\n####end of test_axutil_log_info_off\n\n");
 }
 
-
-void test_axutil_log_warning(const axutil_env_t *env)
+void
+test_axutil_log_warning(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_warning\n\n");
     env->log->level = AXIS2_LOG_LEVEL_DEBUG;
-    AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "log_warning test %s %d", "foo", 1);
+    AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "log_warning test %s %d", "foo",
+                      1);
     printf("\n####end of test_axutil_log_warning\n\n");
 }
 
-
-void test_axutil_log_warning_off(const axutil_env_t *env)
+void
+test_axutil_log_warning_off(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_warning_off\n\n");
-    env->log->level = AXIS2_LOG_LEVEL_ERROR;/*log only ERROR's and CRITICAL's*/
-    AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "this should not be logged log_warning test %s %d", "foo", 1);
+    env->log->level = AXIS2_LOG_LEVEL_ERROR;    /*log only ERROR's and CRITICAL's */
+    AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI,
+                      "this should not be logged log_warning test %s %d", "foo",
+                      1);
     printf("\n####end of test_axutil_log_warning_off\n\n");
 }
 
 /*no need to sent log level, should always log*/
-void test_axutil_log_error(const axutil_env_t *env)
+void
+test_axutil_log_error(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_error\n\n");
     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "log_error test %s %d", "foo", 1);
@@ -125,14 +147,19 @@
 }
 
 /*no need to sent log level, should always log*/
-void test_axutil_log_critical(const axutil_env_t *env)
+void
+test_axutil_log_critical(
+    const axutil_env_t * env)
 {
     printf("\n####start of test_axutil_log_critical\n\n");
-    AXIS2_LOG_CRITICAL(env->log, AXIS2_LOG_SI, "log_critical test %s %d", "foo", 1);
+    AXIS2_LOG_CRITICAL(env->log, AXIS2_LOG_SI, "log_critical test %s %d", "foo",
+                       1);
     printf("\n####end of test_axutil_log_critical\n\n");
 }
 
-void run_test_log()
+void
+run_test_log(
+    )
 {
     printf("\n####start of run_test_log test suite\n\n");
     const axutil_env_t *env = create_env_with_error_log();
@@ -153,4 +180,3 @@
     test_axutil_log_critical(env);
     printf("\n####end of run_test_log test suite \n\n");
 }
-

Modified: webservices/axis2/trunk/c/util/test/util/test_log.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_log.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_log.h (original)
+++ webservices/axis2/trunk/c/util/test/util/test_log.h Fri Sep 28 02:59:33 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
@@ -20,17 +21,27 @@
 
 #include <axutil_env.h>
 
-void run_test_log();
-const axutil_env_t *create_env_with_error_log();
-void test_axutil_log_write(const axutil_env_t *env);
-void test_axutil_log_debug(const axutil_env_t *env);
-void test_axutil_log_debug_off(const axutil_env_t *env);
-void test_axutil_log_info(const axutil_env_t *env);
-void test_axutil_log_info_off(const axutil_env_t *env);
-void test_axutil_log_warning(const axutil_env_t *env);
-void test_axutil_log_warning_off(const axutil_env_t *env);
-void test_axutil_log_error(const axutil_env_t *env);
-void test_axutil_log_critical(const axutil_env_t *env);
-
-#endif /* _TEST_LOG_H_ */
+void run_test_log(
+);
+const axutil_env_t *create_env_with_error_log(
+);
+void test_axutil_log_write(
+    const axutil_env_t * env);
+void test_axutil_log_debug(
+    const axutil_env_t * env);
+void test_axutil_log_debug_off(
+    const axutil_env_t * env);
+void test_axutil_log_info(
+    const axutil_env_t * env);
+void test_axutil_log_info_off(
+    const axutil_env_t * env);
+void test_axutil_log_warning(
+    const axutil_env_t * env);
+void test_axutil_log_warning_off(
+    const axutil_env_t * env);
+void test_axutil_log_error(
+    const axutil_env_t * env);
+void test_axutil_log_critical(
+    const axutil_env_t * env);
 
+#endif                          /* _TEST_LOG_H_ */

Modified: webservices/axis2/trunk/c/util/test/util/test_string.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_string.c?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_string.c (original)
+++ webservices/axis2/trunk/c/util/test/util/test_string.c Fri Sep 28 02:59:33 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
@@ -20,7 +21,9 @@
 #include <axutil_log.h>
 #include <axutil_string.h>
 
-void test_strltrim(const axutil_env_t *env)
+void
+test_strltrim(
+    const axutil_env_t * env)
 {
     axis2_char_t *s = axutil_strdup(env, "    abcd efgh    ");
     axis2_char_t *trimmed = NULL;
@@ -35,7 +38,9 @@
         AXIS2_FREE(env->allocator, s);
 }
 
-void test_strrtrim(const axutil_env_t *env)
+void
+test_strrtrim(
+    const axutil_env_t * env)
 {
     axis2_char_t *s = axutil_strdup(env, "abcd efgh    ");
     axis2_char_t *trimmed = NULL;
@@ -50,7 +55,9 @@
         AXIS2_FREE(env->allocator, s);
 }
 
-void test_strtrim(const axutil_env_t *env)
+void
+test_strtrim(
+    const axutil_env_t * env)
 {
     axis2_char_t *s = axutil_strdup(env, "    abcd efgh    ");
     axis2_char_t *trimmed = NULL;
@@ -65,7 +72,9 @@
         AXIS2_FREE(env->allocator, s);
 }
 
-void run_test_string(axutil_env_t *env)
+void
+run_test_string(
+    axutil_env_t * env)
 {
     if (!env)
         return;
@@ -73,4 +82,3 @@
     test_strrtrim(env);
     test_strtrim(env);
 }
-

Modified: webservices/axis2/trunk/c/util/test/util/test_thread.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_thread.c?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_thread.c (original)
+++ webservices/axis2/trunk/c/util/test/util/test_thread.c Fri Sep 28 02:59:33 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,7 +16,6 @@
  * limitations under the License.
  */
 
-
 #include <stdio.h>
 #include <string.h>
 #include <axutil_error_default.h>
@@ -26,7 +26,6 @@
 #include "test_thread.h"
 #include <unistd.h>
 
-
 const axutil_env_t *env = NULL;
 static axutil_thread_mutex_t *thread_lock = NULL;
 static axutil_thread_once_t *control = NULL;
@@ -40,12 +39,16 @@
 static axutil_thread_t *t3 = NULL;
 static axutil_thread_t *t4 = NULL;
 
-void init_func(void)
+void
+init_func(
+    void)
 {
     value++;
 }
 
-void thread_init(const axutil_env_t *env)
+void
+thread_init(
+    const axutil_env_t * env)
 {
     axutil_allocator_t *allocator = NULL;
 
@@ -53,19 +56,27 @@
 
     control = axutil_thread_once_init(allocator);
 
-    if (control) printf("success - thread_init - axutil_thread_once_init \n");
-    else printf("failure - thread_init - axutil_thread_once_init \n");
-
-    thread_lock = axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
-
-    if (thread_lock) printf("success - thread_init - axutil_thread_mutex_create \n");
-    else printf("failure - thread_init - axutil_thread_mutex_create \n");
-}
-
-void * AXIS2_CALL test_function(axutil_thread_t *td, void *param)
+    if (control)
+        printf("success - thread_init - axutil_thread_once_init \n");
+    else
+        printf("failure - thread_init - axutil_thread_once_init \n");
+
+    thread_lock =
+        axutil_thread_mutex_create(allocator, AXIS2_THREAD_MUTEX_DEFAULT);
+
+    if (thread_lock)
+        printf("success - thread_init - axutil_thread_mutex_create \n");
+    else
+        printf("failure - thread_init - axutil_thread_mutex_create \n");
+}
+
+void *AXIS2_CALL
+test_function(
+    axutil_thread_t * td,
+    void *param)
 {
     int i;
-    i = *((int*)param);
+    i = *((int *) param);
     printf("thread data = %d \n", i);
 
     axutil_thread_once(control, init_func);
@@ -74,55 +85,72 @@
     printf("x = %d \n", ++x);
     axutil_thread_mutex_unlock(thread_lock);
 
-    /*axutil_thread_exit(td, env->allocator);*/
+    /*axutil_thread_exit(td, env->allocator); */
 
-    return (void*)1;
+    return (void *) 1;
 }
 
-
-void test_axutil_thread_create(const axutil_env_t *env)
+void
+test_axutil_thread_create(
+    const axutil_env_t * env)
 {
     axis2_status_t rv = AXIS2_FAILURE;
     axutil_allocator_t *allocator = NULL;
-    int *i = NULL, *j = NULL;
+    int *i = NULL,
+        *j = NULL;
 
     allocator = env->allocator;
     i = AXIS2_MALLOC(allocator, sizeof(int));
     *i = 5;
-    t1 = axutil_thread_create(allocator, NULL, test_function, (void*)i);
+    t1 = axutil_thread_create(allocator, NULL, test_function, (void *) i);
 
-    if (t1) printf("success - test_axutil_thread_create - axutil_thread_create \n");
-    else printf("failure - test_axutil_thread_create - axutil_thread_create \n");
+    if (t1)
+        printf("success - test_axutil_thread_create - axutil_thread_create \n");
+    else
+        printf("failure - test_axutil_thread_create - axutil_thread_create \n");
 
     j = AXIS2_MALLOC(allocator, sizeof(int));
     *j = 25;
 
-    t2 = axutil_thread_create(allocator, NULL, test_function, (void*)j);
+    t2 = axutil_thread_create(allocator, NULL, test_function, (void *) j);
 
-    if (t2) printf("success - test_axutil_thread_create - axutil_thread_create \n");
-    else printf("failure - test_axutil_thread_create - axutil_thread_create \n");
+    if (t2)
+        printf("success - test_axutil_thread_create - axutil_thread_create \n");
+    else
+        printf("failure - test_axutil_thread_create - axutil_thread_create \n");
 
     rv = axutil_thread_join(t1);
 
-    if (AXIS2_SUCCESS == rv) printf("success - test_axutil_thread_create - axutil_thread_join \n");
-    else printf("failure - thread_init - test_axutil_thread_create - axutil_thread_join \n");
+    if (AXIS2_SUCCESS == rv)
+        printf("success - test_axutil_thread_create - axutil_thread_join \n");
+    else
+        printf
+            ("failure - thread_init - test_axutil_thread_create - axutil_thread_join \n");
 
     rv = axutil_thread_join(t2);
 
-    if (AXIS2_SUCCESS == rv) printf("success - test_axutil_thread_create - axutil_thread_join \n");
-    else printf("failure - thread_init - test_axutil_thread_create - axutil_thread_join \n");
+    if (AXIS2_SUCCESS == rv)
+        printf("success - test_axutil_thread_create - axutil_thread_join \n");
+    else
+        printf
+            ("failure - thread_init - test_axutil_thread_create - axutil_thread_join \n");
 
 }
 
-void * AXIS2_CALL test_function2(axutil_thread_t *td, void *param)
+void *AXIS2_CALL
+test_function2(
+    axutil_thread_t * td,
+    void *param)
 {
     printf("thread \n");
-    /*axutil_thread_exit(td, env->allocator);*/
+    /*axutil_thread_exit(td, env->allocator); */
 
-    return (void*)1;
+    return (void *) 1;
 }
 
-void test_axutil_thread_detach(const axutil_env_t *env)
+void
+test_axutil_thread_detach(
+    const axutil_env_t * env)
 {
     axutil_threadattr_t *attr = NULL;
     axutil_allocator_t *allocator = NULL;
@@ -165,7 +193,7 @@
      * thread is already detached - should return AXIS2_FAILURE
      * cannot join detached threads
      */
-    /*rv = axutil_thread_join(t3);*/
+    /*rv = axutil_thread_join(t3); */
     if (AXIS2_FAILURE != rv)
     {
         printf("failure - test_axutil_thread_detach\n");
@@ -174,7 +202,9 @@
     printf("success - test_axutil_thread_detach\n");
 }
 
-void test_axutil_thread_detach2(const axutil_env_t *env)
+void
+test_axutil_thread_detach2(
+    const axutil_env_t * env)
 {
     axutil_threadattr_t *attr = NULL;
     axutil_allocator_t *allocator = NULL;
@@ -211,7 +241,7 @@
      * thread is already detached - should return AXIS2_FAILURE
      * cannot join detached threads
      */
-    /*rv = axutil_thread_join(t4);*/
+    /*rv = axutil_thread_join(t4); */
     if (AXIS2_FAILURE != rv)
     {
         printf("failure - test_axutil_thread_detach2\n");
@@ -220,20 +250,30 @@
     printf("success - test_axutil_thread_detach2\n");
 }
 
-void check_locks()
+void
+check_locks(
+    )
 {
-    if (2 == x) printf("success - check_locks \n");
-    else printf("failure - check_locks \n");
+    if (2 == x)
+        printf("success - check_locks \n");
+    else
+        printf("failure - check_locks \n");
 
 }
 
-void check_thread_once()
+void
+check_thread_once(
+    )
 {
-    if (1 == value) printf("success - check_thread_once \n");
-    else printf("failure - check_thread_once \n");
+    if (1 == value)
+        printf("success - check_thread_once \n");
+    else
+        printf("failure - check_thread_once \n");
 }
 
-void run_test_thread(const axutil_env_t *env)
+void
+run_test_thread(
+    const axutil_env_t * env)
 {
     thread_init(env);
     test_axutil_thread_create(env);
@@ -243,7 +283,7 @@
     test_axutil_thread_detach2(env);
 
 #if defined (WIN32)
-    Sleep(1000);/*to give time for detached threads to execute*/
+    Sleep(1000);                /*to give time for detached threads to execute */
 #else
     sleep(2);
 #endif
@@ -251,7 +291,9 @@
     axutil_thread_mutex_destroy(thread_lock);
 }
 
-const axutil_env_t *create_env_with_error_log()
+const axutil_env_t *
+create_env_with_error_log(
+    )
 {
     axutil_error_t *error = NULL;
     axutil_log_t *log22 = NULL;
@@ -269,7 +311,7 @@
         return NULL;
     }
 
-    log22  = axutil_log_create(allocator, NULL, "test123.log");
+    log22 = axutil_log_create(allocator, NULL, "test123.log");
     if (!log22)
     {
         printf("cannot create log\n");
@@ -277,9 +319,9 @@
     }
     /*
      * allow all types of logs
-      */
+     */
     log22->level = AXIS2_LOG_LEVEL_DEBUG;
-    /*   log22->enabled = 0;*/
+    /*   log22->enabled = 0; */
     env = axutil_env_create_with_error_log(allocator, error, log22);
     if (!env)
     {
@@ -289,8 +331,9 @@
     return env;
 }
 
-
-int main(void)
+int
+main(
+    void)
 {
     env = create_env_with_error_log();
 
@@ -300,4 +343,3 @@
 
     return 0;
 }
-

Modified: webservices/axis2/trunk/c/util/test/util/test_thread.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_thread.h?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_thread.h (original)
+++ webservices/axis2/trunk/c/util/test/util/test_thread.h Fri Sep 28 02:59:33 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
@@ -21,17 +22,29 @@
 #include <axutil_env.h>
 #include <axutil_thread.h>
 
+void init_func(
+    void);
+void thread_init(
+    const axutil_env_t * env);
+void *AXIS2_CALL
+test_function(
+    axutil_thread_t * td,
+    void *param);
+void test_axutil_thread_create(
+    const axutil_env_t * env);
+void *AXIS2_CALL
+test_function2(
+    axutil_thread_t * td,
+    void *param);
+void test_axutil_thread_detach(
+    const axutil_env_t * env);
+void test_axutil_thread_detach2(
+    const axutil_env_t * env);
+void check_locks(
+);
 
-void init_func(void);
-void thread_init(const axutil_env_t *env);
-void * AXIS2_CALL test_function(axutil_thread_t *td,void *param);
-void test_axutil_thread_create(const axutil_env_t *env);
-void * AXIS2_CALL test_function2(axutil_thread_t *td,void *param);
-void test_axutil_thread_detach(const axutil_env_t *env);
-void test_axutil_thread_detach2(const axutil_env_t *env);
-void check_locks();
 /*call this method from main*/
-void run_test_thread(const axutil_env_t *env);
+void run_test_thread(
+    const axutil_env_t * env);
 
 #endif
-

Modified: webservices/axis2/trunk/c/util/test/util/test_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/util/test_util.c?rev=580280&r1=580279&r2=580280&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/util/test_util.c (original)
+++ webservices/axis2/trunk/c/util/test/util/test_util.c Fri Sep 28 02:59:33 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
@@ -36,7 +37,9 @@
 }
 a;
 
-const axutil_env_t *test_init()
+const axutil_env_t *
+test_init(
+    )
 {
     axutil_allocator_t *allocator = axutil_allocator_init(NULL);
     axutil_error_t *error = axutil_error_create(allocator);
@@ -44,10 +47,15 @@
     return env;
 }
 
-int test_hash_get(const axutil_env_t *env)
+int
+test_hash_get(
+    const axutil_env_t * env)
 {
     axutil_hash_t *ht;
-    a *a1, *a2, *a3, *a4;
+    a *a1,
+    *a2,
+    *a3,
+    *a4;
 
     axutil_hash_index_t *i = 0;
     void *v = NULL;
@@ -62,7 +70,6 @@
     a3 = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     a4 = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
 
-
     a1->value = axutil_strdup(env, "value1");
     a2->value = axutil_strdup(env, "value2");
     a3->value = axutil_strdup(env, "value3");
@@ -84,16 +91,16 @@
     }
 
     printf("\n demo get %s ",
-            ((a *) axutil_hash_get(ht, key1, AXIS2_HASH_KEY_STRING))->value);
+           ((a *) axutil_hash_get(ht, key1, AXIS2_HASH_KEY_STRING))->value);
 
     printf("\n demo get %s ",
-            ((a *) axutil_hash_get(ht, key2, AXIS2_HASH_KEY_STRING))->value);
+           ((a *) axutil_hash_get(ht, key2, AXIS2_HASH_KEY_STRING))->value);
 
     printf("\n demo get %s ",
-            ((a *) axutil_hash_get(ht, key3, AXIS2_HASH_KEY_STRING))->value);
+           ((a *) axutil_hash_get(ht, key3, AXIS2_HASH_KEY_STRING))->value);
 
     printf("\n demo get %s \n",
-            ((a *) axutil_hash_get(ht, key4, AXIS2_HASH_KEY_STRING))->value);
+           ((a *) axutil_hash_get(ht, key4, AXIS2_HASH_KEY_STRING))->value);
 
     axutil_hash_free(ht, env);
     AXIS2_FREE(env->allocator, a1->value);
@@ -107,52 +114,60 @@
     return 0;
 }
 
-void test_axutil_dir_handler_list_service_or_module_dirs()
+void
+test_axutil_dir_handler_list_service_or_module_dirs(
+    )
 {
-    int i, isize;
+    int i,
+     isize;
     axutil_file_t *file = NULL;
     axis2_char_t *filename = NULL;
     axutil_allocator_t *allocator = axutil_allocator_init(NULL);
     axutil_error_t *error = axutil_error_create(allocator);
-    axutil_log_t *log  = axutil_log_create(allocator, NULL, NULL);
-    const axutil_env_t *env = axutil_env_create_with_error_log(allocator, error, log);
+    axutil_log_t *log = axutil_log_create(allocator, NULL, NULL);
+    const axutil_env_t *env =
+        axutil_env_create_with_error_log(allocator, error, log);
 
     axis2_char_t *pathname = axutil_strdup(env, "/tmp/test/");
 
-    axutil_array_list_t *arr_folders = axutil_dir_handler_list_service_or_module_dirs(env, pathname);
+    axutil_array_list_t *arr_folders =
+        axutil_dir_handler_list_service_or_module_dirs(env, pathname);
     if (arr_folders == NULL)
     {
         printf("List of folders is NULL\n");
-        return ;
+        return;
     }
 
-
     isize = axutil_array_list_size(arr_folders, env);
     printf("Folder array size = %d \n", isize);
 
-    for (i = 0;i < isize;++i)
+    for (i = 0; i < isize; ++i)
     {
-        file = (axutil_file_t*)axutil_array_list_get(arr_folders, env, i);
-        filename =  axutil_file_get_name(file, env);
+        file = (axutil_file_t *) axutil_array_list_get(arr_folders, env, i);
+        filename = axutil_file_get_name(file, env);
         printf("filename = %s \n", filename);
     }
-    printf("----end of test_axutil_dir_handler_list_service_or_module_dirs----\n");
+    printf
+        ("----end of test_axutil_dir_handler_list_service_or_module_dirs----\n");
 
 }
 
-
 /**
   * This test is intended to test whether given two files are equal or not.
   * Spaces and new lines are ignored in comparing
   */
-int test_file_diff(const axutil_env_t *env)
+int
+test_file_diff(
+    const axutil_env_t * env)
 {
-  /*  axis2_char_t *expected_file_name = axutil_strdup("expected", env);
-    axis2_char_t *actual_file_name = axutil_strdup("actual", env);*/
+    /*  axis2_char_t *expected_file_name = axutil_strdup("expected", env);
+       axis2_char_t *actual_file_name = axutil_strdup("actual", env); */
     return 0;
 }
 
-void test_array_list(const axutil_env_t *env)
+void
+test_array_list(
+    const axutil_env_t * env)
 {
     axutil_array_list_t *al;
     a *entry = NULL;
@@ -163,31 +178,31 @@
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value1");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value2");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value3");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value4");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value5");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value6");
-    axutil_array_list_add(al, env, (void*)entry);
+    axutil_array_list_add(al, env, (void *) entry);
 
     entry = (a *) AXIS2_MALLOC(env->allocator, sizeof(a));
     entry->value = axutil_strdup(env, "value7");
-    axutil_array_list_set(al, env, 3, (void*)entry);
+    axutil_array_list_set(al, env, 3, (void *) entry);
     axutil_array_list_remove(al, env, 2);
 
     entry = (a *) axutil_array_list_get(al, env, 0);
@@ -200,8 +215,9 @@
 
 }
 
-
-void test_uuid_gen(const axutil_env_t *env)
+void
+test_uuid_gen(
+    const axutil_env_t * env)
 {
     char *uuid = NULL;
     printf("starting uuid_gen test...\n");
@@ -214,7 +230,9 @@
     printf("finished uuid_gen test...\n");
 }
 
-void test_log_write()
+void
+test_log_write(
+    )
 {
     char msg[10];
     printf("start of test_log_write\n\n");
@@ -230,7 +248,7 @@
         printf("cannot create error\n");
         return;
     }
-    axutil_log_t *log22  = axutil_log_create(allocator, NULL, NULL);
+    axutil_log_t *log22 = axutil_log_create(allocator, NULL, NULL);
     if (!log22)
     {
         printf("cannot create log\n");
@@ -238,7 +256,8 @@
     }
     log22->level = AXIS2_LOG_LEVEL_DEBUG;
 
-    const axutil_env_t *env = axutil_env_create_with_error_log(allocator, error, log22);
+    const axutil_env_t *env =
+        axutil_env_create_with_error_log(allocator, error, log22);
     if (!env)
     {
         printf("cannot create env with error and log\n");
@@ -255,7 +274,9 @@
 
 }
 
-int main(void)
+int
+main(
+    void)
 {
     const axutil_env_t *env = test_init();
     test_hash_get(env);
@@ -266,6 +287,7 @@
     run_test_string(env);
     test_axutil_dir_handler_list_service_or_module_dirs();
     axutil_allocator_t *allocator = env->allocator;
+
 /*    axutil_env_free(env);*/
     axutil_allocator_free(allocator);
     return 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org