You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by fu...@apache.org on 2011/02/18 13:05:22 UTC
svn commit: r1071973 - in /apr/apr/branches/0.9.x: build/ file_io/os2/
file_io/win32/ include/arch/netware/ include/arch/os2/ include/arch/win32/
locks/os2/ threadproc/netware/
Author: fuankg
Date: Fri Feb 18 12:05:21 2011
New Revision: 1071973
URL: http://svn.apache.org/viewvc?rev=1071973&view=rev
Log:
Axed C++ comments and tabs.
Modified:
apr/apr/branches/0.9.x/build/aplibtool.c
apr/apr/branches/0.9.x/file_io/os2/readwrite.c
apr/apr/branches/0.9.x/file_io/win32/pipe.c
apr/apr/branches/0.9.x/file_io/win32/readwrite.c
apr/apr/branches/0.9.x/include/arch/netware/apr_arch_threadproc.h
apr/apr/branches/0.9.x/include/arch/os2/apr_arch_file_io.h
apr/apr/branches/0.9.x/include/arch/win32/apr_arch_file_io.h
apr/apr/branches/0.9.x/include/arch/win32/apr_arch_misc.h
apr/apr/branches/0.9.x/locks/os2/proc_mutex.c
apr/apr/branches/0.9.x/threadproc/netware/thread.c
Modified: apr/apr/branches/0.9.x/build/aplibtool.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/build/aplibtool.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/build/aplibtool.c (original)
+++ apr/apr/branches/0.9.x/build/aplibtool.c Fri Feb 18 12:05:21 2011
@@ -528,9 +528,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/0.9.x/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/file_io/os2/readwrite.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/os2/readwrite.c (original)
+++ apr/apr/branches/0.9.x/file_io/os2/readwrite.c Fri Feb 18 12:05:21 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 == APR_FILE_BUFSIZE) // write buffer is full
+ if (thefile->bufpos == APR_FILE_BUFSIZE) /* write buffer is full */
rc = apr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ? APR_FILE_BUFSIZE - thefile->bufpos : size;
Modified: apr/apr/branches/0.9.x/file_io/win32/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/file_io/win32/pipe.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/pipe.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/pipe.c Fri Feb 18 12:05:21 2011
@@ -42,8 +42,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;
@@ -95,7 +94,7 @@ apr_status_t apr_create_nt_pipe(apr_file
char name[50];
sa.nLength = sizeof(sa);
-
+
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
sa.bInheritHandle = FALSE;
@@ -149,10 +148,10 @@ apr_status_t apr_create_nt_pipe(apr_file
(*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 */
@@ -163,14 +162,14 @@ apr_status_t apr_create_nt_pipe(apr_file
(*out)->pOverlapped = (OVERLAPPED*) apr_pcalloc(p, sizeof(OVERLAPPED));
(*out)->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}
-
+
(*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. */
@@ -233,3 +232,4 @@ APR_DECLARE(apr_status_t) apr_os_pipe_pu
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
}
+
Modified: apr/apr/branches/0.9.x/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/file_io/win32/readwrite.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/readwrite.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/readwrite.c Fri Feb 18 12:05:21 2011
@@ -251,7 +251,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/0.9.x/include/arch/netware/apr_arch_threadproc.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/arch/netware/apr_arch_threadproc.h?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/arch/netware/apr_arch_threadproc.h (original)
+++ apr/apr/branches/0.9.x/include/arch/netware/apr_arch_threadproc.h Fri Feb 18 12:05:21 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/0.9.x/include/arch/os2/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/arch/os2/apr_arch_file_io.h?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/arch/os2/apr_arch_file_io.h (original)
+++ apr/apr/branches/0.9.x/include/arch/os2/apr_arch_file_io.h Fri Feb 18 12:05:21 2011
@@ -47,11 +47,12 @@ struct apr_file_t {
/* Stuff for buffered mode */
char *buffer;
- int 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
+ int 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/0.9.x/include/arch/win32/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/arch/win32/apr_arch_file_io.h?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/arch/win32/apr_arch_file_io.h (original)
+++ apr/apr/branches/0.9.x/include/arch/win32/apr_arch_file_io.h Fri Feb 18 12:05:21 2011
@@ -151,13 +151,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/0.9.x/include/arch/win32/apr_arch_misc.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/arch/win32/apr_arch_misc.h?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/arch/win32/apr_arch_misc.h (original)
+++ apr/apr/branches/0.9.x/include/arch/win32/apr_arch_misc.h Fri Feb 18 12:05:21 2011
@@ -65,7 +65,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.
@@ -73,34 +73,34 @@ 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_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_oslevel_e;
extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;
@@ -136,13 +136,13 @@ apr_status_t apr_get_oslevel(apr_oslevel
#endif /* WINNT */
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);
@@ -232,8 +232,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, (
@@ -245,8 +245,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
@@ -260,12 +260,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
Modified: apr/apr/branches/0.9.x/locks/os2/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/locks/os2/proc_mutex.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/locks/os2/proc_mutex.c (original)
+++ apr/apr/branches/0.9.x/locks/os2/proc_mutex.c Fri Feb 18 12:05:21 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/0.9.x/threadproc/netware/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/threadproc/netware/thread.c?rev=1071973&r1=1071972&r2=1071973&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/threadproc/netware/thread.c (original)
+++ apr/apr/branches/0.9.x/threadproc/netware/thread.c Fri Feb 18 12:05:21 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)
@@ -65,21 +65,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
@@ -112,27 +112,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()