apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1071969 - in /apr/apr/branches/1.4.x: build/ file_io/os2/ file_io/win32/ include/arch/netware/ include/arch/os2/ include/arch/win32/ locks/os2/ threadproc/netware/
Date Fri, 18 Feb 2011 11:27:05 GMT
Author: fuankg
Date: Fri Feb 18 11:27:05 2011
New Revision: 1071969

URL: http://svn.apache.org/viewvc?rev=1071969&view=rev
Log:
Axed C++ comments and tabs.

Modified:
    apr/apr/branches/1.4.x/build/aplibtool.c
    apr/apr/branches/1.4.x/file_io/os2/readwrite.c
    apr/apr/branches/1.4.x/file_io/win32/pipe.c
    apr/apr/branches/1.4.x/file_io/win32/readwrite.c
    apr/apr/branches/1.4.x/include/arch/netware/apr_arch_threadproc.h
    apr/apr/branches/1.4.x/include/arch/os2/apr_arch_file_io.h
    apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h
    apr/apr/branches/1.4.x/include/arch/win32/apr_arch_misc.h
    apr/apr/branches/1.4.x/locks/os2/proc_mutex.c
    apr/apr/branches/1.4.x/threadproc/netware/thread.c

Modified: apr/apr/branches/1.4.x/build/aplibtool.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/build/aplibtool.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/build/aplibtool.c (original)
+++ apr/apr/branches/1.4.x/build/aplibtool.c Fri Feb 18 11:27:05 2011
@@ -532,9 +532,9 @@ char *shell_esc(const char *str)
 
     for (; *s; ++s) {
         if (*s == '"' || *s == '\\') {
-	    *d++ = '\\';
-	}
-	*d++ = *s;
+            *d++ = '\\';
+        }
+        *d++ = *s;
     }
 
     *d = '\0';

Modified: apr/apr/branches/1.4.x/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/os2/readwrite.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/os2/readwrite.c (original)
+++ apr/apr/branches/1.4.x/file_io/os2/readwrite.c Fri Feb 18 11:27:05 2011
@@ -140,7 +140,7 @@ APR_DECLARE(apr_status_t) apr_file_write
         apr_thread_mutex_lock(thefile->mutex);
 
         if ( thefile->direction == 0 ) {
-            // Position file pointer for writing at the offset we are logically reading from
+            /* Position file pointer for writing at the offset we are logically reading from
*/
             ULONG offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
             if (offset != thefile->filePtr)
                 DosSetFilePtr(thefile->filedes, offset, FILE_BEGIN, &thefile->filePtr
);
@@ -149,7 +149,7 @@ APR_DECLARE(apr_status_t) apr_file_write
         }
 
         while (rc == 0 && size > 0) {
-            if (thefile->bufpos == thefile->bufsize)   // write buffer is full
+            if (thefile->bufpos == thefile->bufsize) /* write buffer is full */
                 /* XXX bug; - rc is double-transformed os->apr below */
                 rc = apr_file_flush(thefile);
 

Modified: apr/apr/branches/1.4.x/file_io/win32/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/win32/pipe.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/win32/pipe.c (original)
+++ apr/apr/branches/1.4.x/file_io/win32/pipe.c Fri Feb 18 11:27:05 2011
@@ -43,8 +43,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
         return APR_ENOTIMPL;
     }
     if (timeout && !(thepipe->pOverlapped)) {
-        /* Cannot be nonzero if a pipe was opened blocking
-         */
+        /* Cannot be nonzero if a pipe was opened blocking */
         return APR_EINVAL;
     }
     thepipe->timeout = timeout;
@@ -82,7 +81,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
     char name[50];
 
     sa.nLength = sizeof(sa);
-    
+
 #if APR_HAS_UNICODE_FS
     IF_WIN_OS_IS_UNICODE
         sa.bInheritHandle = FALSE;
@@ -139,10 +138,10 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
         (*in)->filehand = CreateNamedPipe(name,
                                           dwOpenMode,
                                           dwPipeMode,
-                                          1,            //nMaxInstances,
-                                          0,            //nOutBufferSize, 
-                                          65536,        //nInBufferSize,                
  
-                                          1,            //nDefaultTimeOut,              
 
+                                          1,            /* nMaxInstances,   */
+                                          0,            /* nOutBufferSize,  */
+                                          65536,        /* nInBufferSize,   */
+                                          1,            /* nDefaultTimeOut, */
                                           &sa);
 
         /* Create the write end of the pipe */
@@ -154,14 +153,14 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
             (*out)->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
             (*out)->timeout = 0;
         }
-        
+
         (*out)->filehand = CreateFile(name,
-                                      GENERIC_WRITE,   // access mode
-                                      0,               // share mode
-                                      &sa,             // Security attributes
-                                      OPEN_EXISTING,   // dwCreationDisposition
-                                      dwOpenMode,      // Pipe attributes
-                                      NULL);           // handle to template file
+                                      GENERIC_WRITE, /* access mode             */
+                                      0,             /* share mode              */
+                                      &sa,           /* Security attributes     */
+                                      OPEN_EXISTING, /* dwCreationDisposition   */
+                                      dwOpenMode,    /* Pipe attributes         */
+                                      NULL);         /* handle to template file */
     }
     else {
         /* Pipes on Win9* are blocking. Live with it. */
@@ -436,3 +435,4 @@ apr_status_t apr_file_socket_pipe_close(
     }
     return stat;
 }
+

Modified: apr/apr/branches/1.4.x/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/win32/readwrite.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/win32/readwrite.c (original)
+++ apr/apr/branches/1.4.x/file_io/win32/readwrite.c Fri Feb 18 11:27:05 2011
@@ -263,7 +263,7 @@ APR_DECLARE(apr_status_t) apr_file_write
         apr_thread_mutex_lock(thefile->mutex);
 
         if (thefile->direction == 0) {
-            // Position file pointer for writing at the offset we are logically reading from
+            /* Position file pointer for writing at the offset we are logically reading from
*/
             apr_off_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
             DWORD offlo = (DWORD)offset;
             DWORD offhi = (DWORD)(offset >> 32);

Modified: apr/apr/branches/1.4.x/include/arch/netware/apr_arch_threadproc.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/netware/apr_arch_threadproc.h?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/netware/apr_arch_threadproc.h (original)
+++ apr/apr/branches/1.4.x/include/arch/netware/apr_arch_threadproc.h Fri Feb 18 11:27:05
2011
@@ -68,11 +68,13 @@ struct apr_thread_once_t {
     unsigned long value;
 };
 
-//struct apr_proc_t {
-//    apr_pool_t *pool;
-//    pid_t pid;
-//    apr_procattr_t *attr;
-//};
+/*
+struct apr_proc_t {
+    apr_pool_t *pool;
+    pid_t pid;
+    apr_procattr_t *attr;
+};
+*/
 
 #endif  /* ! THREAD_PROC_H */
 

Modified: apr/apr/branches/1.4.x/include/arch/os2/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/os2/apr_arch_file_io.h?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/os2/apr_arch_file_io.h (original)
+++ apr/apr/branches/1.4.x/include/arch/os2/apr_arch_file_io.h Fri Feb 18 11:27:05 2011
@@ -49,12 +49,13 @@ struct apr_file_t {
 
     /* Stuff for buffered mode */
     char *buffer;
-    apr_size_t bufsize;       // Read/Write position in buffer
-    apr_size_t bufpos;        // Read/Write position in buffer
-    unsigned long dataRead;   // amount of valid data read into buffer
-    int direction;            // buffer being used for 0 = read, 1 = write
-    unsigned long filePtr;    // position in file of handle
-    apr_thread_mutex_t *mutex;// mutex semaphore, must be owned to access the above fields
+    apr_size_t bufsize;        /* Read/Write position in buffer             */
+    apr_size_t bufpos;         /* Read/Write position in buffer             */
+    unsigned long dataRead;    /* amount of valid data read into buffer     */
+    int direction;             /* buffer being used for 0 = read, 1 = write */
+    unsigned long filePtr;     /* position in file of handle                */
+    apr_thread_mutex_t *mutex; /* mutex semaphore, must be owned to access
+                                  the above fields                          */
 };
 
 struct apr_dir_t {

Modified: apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h (original)
+++ apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h Fri Feb 18 11:27:05 2011
@@ -155,13 +155,13 @@ apr_status_t more_finfo(apr_finfo_t *fin
  *           correctly when writing to a file with this flag set TRUE.
  */
 
-// for apr_poll.c;
+/* for apr_poll.c */
 #define filedes filehand
 
 struct apr_file_t {
     apr_pool_t *pool;
     HANDLE filehand;
-    BOOLEAN pipe;              // Is this a pipe of a file?
+    BOOLEAN pipe;              /* Is this a pipe of a file? */
     OVERLAPPED *pOverlapped;
     apr_interval_time_t timeout;
     apr_int32_t flags;

Modified: apr/apr/branches/1.4.x/include/arch/win32/apr_arch_misc.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/win32/apr_arch_misc.h?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/win32/apr_arch_misc.h (original)
+++ apr/apr/branches/1.4.x/include/arch/win32/apr_arch_misc.h Fri Feb 18 11:27:05 2011
@@ -66,7 +66,7 @@ struct apr_other_child_rec_t {
  */
 extern int APR_DECLARE_DATA apr_app_init_complete;
 
-int apr_wastrtoastr(char const * const * *retarr, 
+int apr_wastrtoastr(char const * const * *retarr,
                     wchar_t const * const *arr, int args);
 
 /* Platform specific designation of run time os version.
@@ -74,38 +74,38 @@ int apr_wastrtoastr(char const * const *
  * export new kernel or winsock functions or behavior.
  */
 typedef enum {
-        APR_WIN_UNK =       0,
-        APR_WIN_UNSUP =     1,
-        APR_WIN_95 =       10,
-        APR_WIN_95_B =     11,
-        APR_WIN_95_OSR2 =  12,
-        APR_WIN_98 =       14,
-        APR_WIN_98_SE =    16,
-        APR_WIN_ME =       18,
-
-	APR_WIN_UNICODE =  20, /* Prior versions support only narrow chars */
-
-        APR_WIN_CE_3 =     23, /* CE is an odd beast, not supporting */
-                               /* some pre-NT features, such as the    */
-        APR_WIN_NT =       30, /* narrow charset APIs (fooA fns), while  */
-        APR_WIN_NT_3_5 =   35, /* not supporting some NT-family features.  */
-        APR_WIN_NT_3_51 =  36,
-
-        APR_WIN_NT_4 =     40,
-        APR_WIN_NT_4_SP2 = 42,
-        APR_WIN_NT_4_SP3 = 43,
-        APR_WIN_NT_4_SP4 = 44,
-        APR_WIN_NT_4_SP5 = 45,
-        APR_WIN_NT_4_SP6 = 46,
-
-        APR_WIN_2000 =     50,
-        APR_WIN_2000_SP1 = 51,
-        APR_WIN_2000_SP2 = 52,
-        APR_WIN_XP =       60,
-        APR_WIN_XP_SP1 =   61,
-        APR_WIN_XP_SP2 =   62,
-        APR_WIN_2003 =     70,
-        APR_WIN_VISTA =    80
+    APR_WIN_UNK =       0,
+    APR_WIN_UNSUP =     1,
+    APR_WIN_95 =       10,
+    APR_WIN_95_B =     11,
+    APR_WIN_95_OSR2 =  12,
+    APR_WIN_98 =       14,
+    APR_WIN_98_SE =    16,
+    APR_WIN_ME =       18,
+
+    APR_WIN_UNICODE =  20, /* Prior versions support only narrow chars */
+
+    APR_WIN_CE_3 =     23, /* CE is an odd beast, not supporting */
+                           /* some pre-NT features, such as the    */
+    APR_WIN_NT =       30, /* narrow charset APIs (fooA fns), while  */
+    APR_WIN_NT_3_5 =   35, /* not supporting some NT-family features.  */
+    APR_WIN_NT_3_51 =  36,
+
+    APR_WIN_NT_4 =     40,
+    APR_WIN_NT_4_SP2 = 42,
+    APR_WIN_NT_4_SP3 = 43,
+    APR_WIN_NT_4_SP4 = 44,
+    APR_WIN_NT_4_SP5 = 45,
+    APR_WIN_NT_4_SP6 = 46,
+
+    APR_WIN_2000 =     50,
+    APR_WIN_2000_SP1 = 51,
+    APR_WIN_2000_SP2 = 52,
+    APR_WIN_XP =       60,
+    APR_WIN_XP_SP1 =   61,
+    APR_WIN_XP_SP2 =   62,
+    APR_WIN_2003 =     70,
+    APR_WIN_VISTA =    80
 } apr_oslevel_e;
 
 extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;
@@ -172,13 +172,13 @@ static APR_INLINE void* apr_realloc_dbg(
 #endif  /* ! _MSC_VER */
 
 typedef enum {
-    DLL_WINBASEAPI = 0,    // kernel32 From WinBase.h
-    DLL_WINADVAPI = 1,     // advapi32 From WinBase.h
-    DLL_WINSOCKAPI = 2,    // mswsock  From WinSock.h
-    DLL_WINSOCK2API = 3,   // ws2_32   From WinSock2.h
-    DLL_SHSTDAPI = 4,      // shell32  From ShellAPI.h
-    DLL_NTDLL = 5,         // shell32  From our real kernel
-    DLL_defined = 6        // must define as last idx_ + 1
+    DLL_WINBASEAPI = 0,    /* kernel32 From WinBase.h       */
+    DLL_WINADVAPI = 1,     /* advapi32 From WinBase.h       */
+    DLL_WINSOCKAPI = 2,    /* mswsock  From WinSock.h       */
+    DLL_WINSOCK2API = 3,   /* ws2_32   From WinSock2.h      */
+    DLL_SHSTDAPI = 4,      /* shell32  From ShellAPI.h      */
+    DLL_NTDLL = 5,         /* shell32  From our real kernel */
+    DLL_defined = 6        /* must define as last idx_ + 1  */
 } apr_dlltoken_e;
 
 FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
@@ -279,8 +279,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI,
     OUT PACL *ppDacl,
     OUT PACL *ppSacl,
     OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
-    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, 
-	 ppDacl, ppSacl, ppSecurityDescriptor));
+    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+        ppDacl, ppSacl, ppSecurityDescriptor));
 #define GetNamedSecurityInfoW apr_winapi_GetNamedSecurityInfoW
 
 APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0, (
@@ -292,8 +292,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI,
     OUT PACL *ppDacl,
     OUT PACL *ppSacl,
     OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
-    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, 
-	 ppDacl, ppSacl, ppSecurityDescriptor));
+    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+        ppDacl, ppSacl, ppSecurityDescriptor));
 #define GetNamedSecurityInfoA apr_winapi_GetNamedSecurityInfoA
 #undef GetNamedSecurityInfo
 #define GetNamedSecurityInfo apr_winapi_GetNamedSecurityInfoA
@@ -307,12 +307,12 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI,
     OUT PACL *ppDacl,
     OUT PACL *ppSacl,
     OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
-    (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, 
-	 ppDacl, ppSacl, ppSecurityDescriptor));
+    (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+        ppDacl, ppSacl, ppSecurityDescriptor));
 #define GetSecurityInfo apr_winapi_GetSecurityInfo
 
 APR_DECLARE_LATE_DLL_FUNC(DLL_SHSTDAPI, LPWSTR *, WINAPI, CommandLineToArgvW, 0, (
-    LPCWSTR lpCmdLine, 
+    LPCWSTR lpCmdLine,
     int *pNumArgs),
     (lpCmdLine, pNumArgs));
 #define CommandLineToArgvW apr_winapi_CommandLineToArgvW
@@ -483,3 +483,4 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI
 #endif /* !defined(_WIN32_WCE) */
 
 #endif  /* ! MISC_H */
+

Modified: apr/apr/branches/1.4.x/locks/os2/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/locks/os2/proc_mutex.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/locks/os2/proc_mutex.c (original)
+++ apr/apr/branches/1.4.x/locks/os2/proc_mutex.c Fri Feb 18 11:27:05 2011
@@ -32,7 +32,7 @@ static char *fixed_name(const char *fnam
     if (fname == NULL)
         semname = NULL;
     else {
-        // Semaphores don't live in the file system, fix up the name
+        /* Semaphores don't live in the file system, fix up the name */
         while (*fname == '/' || *fname == '\\') {
             fname++;
         }

Modified: apr/apr/branches/1.4.x/threadproc/netware/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/threadproc/netware/thread.c?rev=1071969&r1=1071968&r2=1071969&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/threadproc/netware/thread.c (original)
+++ apr/apr/branches/1.4.x/threadproc/netware/thread.c Fri Feb 18 11:27:05 2011
@@ -41,7 +41,7 @@ apr_status_t apr_threadattr_create(apr_t
 apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,apr_int32_t on)
 {
     attr->detach = on;
-	return APR_SUCCESS;   
+    return APR_SUCCESS;   
 }
 
 apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
@@ -71,21 +71,21 @@ static void *dummy_worker(void *opaque)
 }
 
 apr_status_t apr_thread_create(apr_thread_t **new,
- 											apr_threadattr_t *attr, 
-                             				apr_thread_start_t func,
- 											void *data,
- 											apr_pool_t *pool)
+                               apr_threadattr_t *attr, 
+                               apr_thread_start_t func,
+                               void *data,
+                               apr_pool_t *pool)
 {
     apr_status_t stat;
     long flags = NX_THR_BIND_CONTEXT;
-  	char threadName[NX_MAX_OBJECT_NAME_LEN+1];
+    char threadName[NX_MAX_OBJECT_NAME_LEN+1];
     size_t stack_size = APR_DEFAULT_STACK_SIZE;
 
     if (attr && attr->thread_name) {
         strncpy (threadName, attr->thread_name, NX_MAX_OBJECT_NAME_LEN);
     }
     else {
-	    sprintf(threadName, "APR_thread %04ld", ++thread_count);
+        sprintf(threadName, "APR_thread %04ld", ++thread_count);
     }
 
     /* An original stack size of 0 will allow NXCreateThread() to
@@ -117,27 +117,26 @@ apr_status_t apr_thread_create(apr_threa
     }
     
     (*new)->ctx = NXContextAlloc(
-    	/* void(*start_routine)(void *arg)*/(void (*)(void *)) dummy_worker,
-     	/* void *arg */										   (*new),
-     	/* int priority */ 									   NX_PRIO_MED,
-     	/* NXSize_t stackSize */							   stack_size,
-     	/* long flags */									   NX_CTX_NORMAL,
-     	/* int *error */									   &stat);
-		
-     	                                                                   
-  	stat = NXContextSetName(
-		 	/* NXContext_t ctx */			(*new)->ctx,
-			/* const char *name */			threadName);
-
-  	stat = NXThreadCreate(
-        	/* NXContext_t context */		(*new)->ctx,
-        	/* long flags */				flags,
-        	/* NXThreadId_t *thread_id */	&(*new)->td);
+        /* void(*start_routine)(void *arg) */ (void (*)(void *)) dummy_worker,
+        /* void *arg */                       (*new),
+        /* int priority */                    NX_PRIO_MED,
+        /* NXSize_t stackSize */              stack_size,
+        /* long flags */                      NX_CTX_NORMAL,
+        /* int *error */                      &stat);
+
+    stat = NXContextSetName(
+        /* NXContext_t ctx */  (*new)->ctx,
+        /* const char *name */ threadName);
+
+    stat = NXThreadCreate(
+        /* NXContext_t context */     (*new)->ctx,
+        /* long flags */              flags,
+        /* NXThreadId_t *thread_id */ &(*new)->td);
 
-    if(stat==0)
-     	return APR_SUCCESS;
+    if (stat == 0)
+        return APR_SUCCESS;
         
-	return(stat);// if error    
+    return(stat); /* if error */    
 }
 
 apr_os_thread_t apr_os_thread_current()



Mime
View raw message