summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuankg <fuankg@13f79535-47bb-0310-9956-ffa450edef68>2011-02-18 11:27:05 +0000
committerfuankg <fuankg@13f79535-47bb-0310-9956-ffa450edef68>2011-02-18 11:27:05 +0000
commit15c7fc6114ad6b188730571cc554477e1a74d93a (patch)
tree3d1a323b2d658f35ff93ece931a254241347061c
parentb3be3d2cd4370d097b24e7760ee6c24f8287cd43 (diff)
downloadlibapr-15c7fc6114ad6b188730571cc554477e1a74d93a.tar.gz
Axed C++ comments and tabs.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1071969 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/aplibtool.c6
-rw-r--r--file_io/os2/readwrite.c4
-rw-r--r--file_io/win32/pipe.c28
-rw-r--r--file_io/win32/readwrite.c2
-rw-r--r--include/arch/netware/apr_arch_threadproc.h12
-rw-r--r--include/arch/os2/apr_arch_file_io.h13
-rw-r--r--include/arch/win32/apr_arch_file_io.h4
-rw-r--r--include/arch/win32/apr_arch_misc.h95
-rw-r--r--locks/os2/proc_mutex.c2
-rw-r--r--threadproc/netware/thread.c53
10 files changed, 111 insertions, 108 deletions
diff --git a/build/aplibtool.c b/build/aplibtool.c
index 8f4943c3e..ffbdc3f7b 100644
--- a/build/aplibtool.c
+++ b/build/aplibtool.c
@@ -532,9 +532,9 @@ char *shell_esc(const char *str)
for (; *s; ++s) {
if (*s == '"' || *s == '\\') {
- *d++ = '\\';
- }
- *d++ = *s;
+ *d++ = '\\';
+ }
+ *d++ = *s;
}
*d = '\0';
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index 9c44ee0e0..d00591d76 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -140,7 +140,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
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(apr_file_t *thefile, const void *buf, a
}
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);
diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c
index aaf07f70e..2d65b532f 100644
--- a/file_io/win32/pipe.c
+++ b/file_io/win32/pipe.c
@@ -43,8 +43,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe,
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_create_ex(apr_file_t **in,
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_create_ex(apr_file_t **in,
(*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_create_ex(apr_file_t **in,
(*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(apr_file_t *file)
}
return stat;
}
+
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index b40c89a22..7b3013dbd 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -263,7 +263,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
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);
diff --git a/include/arch/netware/apr_arch_threadproc.h b/include/arch/netware/apr_arch_threadproc.h
index 713ed295a..2fee2c00e 100644
--- a/include/arch/netware/apr_arch_threadproc.h
+++ b/include/arch/netware/apr_arch_threadproc.h
@@ -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 */
diff --git a/include/arch/os2/apr_arch_file_io.h b/include/arch/os2/apr_arch_file_io.h
index 399371237..79a57964e 100644
--- a/include/arch/os2/apr_arch_file_io.h
+++ b/include/arch/os2/apr_arch_file_io.h
@@ -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 {
diff --git a/include/arch/win32/apr_arch_file_io.h b/include/arch/win32/apr_arch_file_io.h
index c8c7bdee8..6afaf8fb1 100644
--- a/include/arch/win32/apr_arch_file_io.h
+++ b/include/arch/win32/apr_arch_file_io.h
@@ -155,13 +155,13 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
* 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;
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h
index 6c2b30991..ed05bcd28 100644
--- a/include/arch/win32/apr_arch_misc.h
+++ b/include/arch/win32/apr_arch_misc.h
@@ -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 * *retarr,
* 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(void* userData, size_t newSize,
#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, BOOL, WINAPI, GetNamedSecurityInfoW, 0,
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, BOOL, WINAPI, GetNamedSecurityInfoA, 0,
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, BOOL, WINAPI, GetSecurityInfo, 0, (
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, BOOL, WINAPI, SetDllDirectoryW, 0, (
#endif /* !defined(_WIN32_WCE) */
#endif /* ! MISC_H */
+
diff --git a/locks/os2/proc_mutex.c b/locks/os2/proc_mutex.c
index 5a4935635..0f3a564ef 100644
--- a/locks/os2/proc_mutex.c
+++ b/locks/os2/proc_mutex.c
@@ -32,7 +32,7 @@ static char *fixed_name(const char *fname, apr_pool_t *pool)
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++;
}
diff --git a/threadproc/netware/thread.c b/threadproc/netware/thread.c
index 4b5d930a0..e1a46e6e2 100644
--- a/threadproc/netware/thread.c
+++ b/threadproc/netware/thread.c
@@ -41,7 +41,7 @@ apr_status_t apr_threadattr_create(apr_threadattr_t **new,
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_thread_t **new,
}
(*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);
-
- if(stat==0)
- return APR_SUCCESS;
+ /* 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;
- return(stat);// if error
+ return(stat); /* if error */
}
apr_os_thread_t apr_os_thread_current()