You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by iv...@apache.org on 2022/11/20 07:14:40 UTC
svn commit: r1905414 [2/8] - in /apr/apr/trunk: atomic/netware/ atomic/os390/ buckets/ build/ crypto/ dbd/ dbd/unsupported/ dbm/ dbm/sdbm/ dso/aix/ dso/beos/ dso/netware/ dso/os2/ dso/os390/ dso/unix/ dso/win32/ encoding/ file_io/netware/ file_io/os2/ ...
Modified: apr/apr/trunk/dso/win32/dso.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dso/win32/dso.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/dso/win32/dso.c (original)
+++ apr/apr/trunk/dso/win32/dso.c Sun Nov 20 07:14:38 2022
@@ -51,7 +51,7 @@ static apr_status_t dso_cleanup(void *th
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
{
HINSTANCE os_handle;
@@ -59,7 +59,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(s
DWORD em;
apr_wchar_t wpath[APR_PATH_MAX];
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))
!= APR_SUCCESS) {
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
@@ -97,14 +97,14 @@ APR_DECLARE(apr_status_t) apr_dso_load(s
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_dso_unload(struct apr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- struct apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ struct apr_dso_handle_t *handle,
const char *symname)
{
*ressym = (apr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
Modified: apr/apr/trunk/encoding/apr_base64.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/encoding/apr_base64.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/encoding/apr_base64.c (original)
+++ apr/apr/trunk/encoding/apr_base64.c Sun Nov 20 07:14:38 2022
@@ -87,7 +87,7 @@ APR_DECLARE(apr_status_t) apr_base64init
apr_size_t inbytes_left, outbytes_left;
apr_status_t rv;
int onoff;
-
+
/* Only single-byte conversion is supported.
*/
rv = apr_xlate_sb_get(to_ascii, &onoff);
@@ -135,7 +135,7 @@ APR_DECLARE(int) apr_base64_decode(char
apr_size_t inbytes_left, outbytes_left;
#endif /* APR_CHARSET_EBCDIC */
int len;
-
+
len = apr_base64_decode_binary((unsigned char *) bufplain, bufcoded);
#if APR_CHARSET_EBCDIC
inbytes_left = outbytes_left = len;
Modified: apr/apr/trunk/encoding/apr_escape.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/encoding/apr_escape.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/encoding/apr_escape.c (original)
+++ apr/apr/trunk/encoding/apr_escape.c Sun Nov 20 07:14:38 2022
@@ -1171,7 +1171,7 @@ APR_DECLARE(apr_status_t) apr_escape_lda
}
else {
while (((c = *s) && slen) || (slen > 0)) {
- if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
+ if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
|| ((flags & APR_ESCAPE_LDAP_FILTER) && TEST_CHAR(c, T_ESCAPE_LDAP_FILTER))) {
size += 2;
found = 1;
Modified: apr/apr/trunk/file_io/netware/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/netware/filestat.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/netware/filestat.c (original)
+++ apr/apr/trunk/file_io/netware/filestat.c Sun Nov 20 07:14:38 2022
@@ -55,8 +55,8 @@ static apr_filetype_e filetype_from_mode
static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
apr_int32_t wanted)
-{
- finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
+{
+ finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
@@ -104,7 +104,7 @@ apr_status_t apr_file_info_get_locked(ap
}
}
-APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
+APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)
{
@@ -128,7 +128,7 @@ APR_DECLARE(apr_status_t) apr_file_info_
}
}
-APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
@@ -232,14 +232,14 @@ int cstat (NXPathCtx_t ctx, char *path,
and return */
if (!gPool) {
char poolname[50];
-
+
if (apr_pool_create(&gPool, NULL) != APR_SUCCESS) {
return getstat(ctx, path, buf, requestmap);
}
-
+
setGlobalPool(gPool);
apr_pool_tag(gPool, apr_pstrdup(gPool, "cstat_mem_pool"));
-
+
statCache = apr_hash_make(gPool);
apr_pool_userdata_set ((void*)statCache, "STAT_CACHE", stat_cache_cleanup, gPool);
@@ -254,7 +254,7 @@ int cstat (NXPathCtx_t ctx, char *path,
if (!gPool || !statCache || !rwlock) {
return getstat(ctx, path, buf, requestmap);
}
-
+
for (x = 0,tr = path;*tr != '\0';tr++,x++) {
if (*tr == '\\' || *tr == '/') {
ptr = tr;
@@ -265,7 +265,7 @@ int cstat (NXPathCtx_t ctx, char *path,
len = x;
}
}
-
+
if (ptr) {
ppath = apr_pstrndup (p, path, len);
strlwr(ppath);
@@ -283,7 +283,7 @@ int cstat (NXPathCtx_t ctx, char *path,
pinfo = apr_pstrdup (p, ptr);
}
}
-
+
/* If we have a statCache then try to pull the information
from the cache. Otherwise just stat the file and return.*/
if (statCache) {
@@ -310,8 +310,8 @@ int cstat (NXPathCtx_t ctx, char *path,
}
#endif
-APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
- const char *fname,
+APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
+ const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
{
struct stat info;
@@ -347,17 +347,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
* include files, APR cannot report a good reason why the stat()
* of the file failed; there are cases where it can fail even though
* the file exists. This opens holes in Apache, for example, because
- * it becomes possible for someone to get a directory listing of a
- * directory even though there is an index (eg. index.html) file in
- * it. If you do not have a problem with this, delete the above
+ * it becomes possible for someone to get a directory listing of a
+ * directory even though there is an index (eg. index.html) file in
+ * it. If you do not have a problem with this, delete the above
* #error lines and start the compile again. If you need to do this,
* please submit a bug report to http://www.apache.org/bug_report.html
- * letting us know that you needed to do this. Please be sure to
+ * letting us know that you needed to do this. Please be sure to
* include the operating system you are using.
*/
/* WARNING: All errors will be handled as not found
*/
-#if !defined(ENOENT)
+#if !defined(ENOENT)
return APR_ENOENT;
#else
/* WARNING: All errors but not found will be handled as not directory
@@ -388,12 +388,12 @@ APR_DECLARE(apr_status_t) apr_file_mtime
#ifdef HAVE_UTIMES
{
struct timeval tvp[2];
-
+
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
-
+
if (utimes(fname, tvp) == -1) {
return errno;
}
@@ -401,10 +401,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime
#elif defined(HAVE_UTIME)
{
struct utimbuf buf;
-
+
buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC);
buf.modtime = (time_t) (mtime / APR_USEC_PER_SEC);
-
+
if (utime(fname, &buf) == -1) {
return errno;
}
Modified: apr/apr/trunk/file_io/netware/filesys.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/netware/filesys.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/netware/filesys.c (original)
+++ apr/apr/trunk/file_io/netware/filesys.c Sun Nov 20 07:14:38 2022
@@ -21,7 +21,7 @@
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
{
/* See the Windows code to figure out what to do here.
- It probably checks to make sure that the root exists
+ It probably checks to make sure that the root exists
and case it correctly according to the file system.
*/
*rootpath = apr_pstrdup(p, root);
Modified: apr/apr/trunk/file_io/netware/flock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/netware/flock.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/netware/flock.c (original)
+++ apr/apr/trunk/file_io/netware/flock.c Sun Nov 20 07:14:38 2022
@@ -26,7 +26,7 @@ apr_status_t apr_file_lock(apr_file_t *t
if(NXFileRangeLock(thefile->filedes,fc, 0, 0) == -1)
return errno;
-
+
return APR_SUCCESS;
}
@@ -34,6 +34,6 @@ apr_status_t apr_file_unlock(apr_file_t
{
if(NXFileRangeUnlock(thefile->filedes,NX_RANGE_LOCK_CANCEL,0 , 0) == -1)
return errno;
-
+
return APR_SUCCESS;
}
Modified: apr/apr/trunk/file_io/netware/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/netware/pipe.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/netware/pipe.c (original)
+++ apr/apr/trunk/file_io/netware/pipe.c Sun Nov 20 07:14:38 2022
@@ -102,7 +102,7 @@ APR_DECLARE(apr_status_t) apr_os_pipe_pu
apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -156,7 +156,7 @@ static apr_status_t file_pipe_create(apr
(*out)->flags = APR_INHERIT;
(*in)->is_pipe =
(*out)->is_pipe = 1;
- (*out)->fname =
+ (*out)->fname =
(*in)->fname = NULL;
(*in)->buffered =
(*out)->buffered = 0;
@@ -200,8 +200,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -217,11 +217,11 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
+APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
+
-
Modified: apr/apr/trunk/file_io/os2/buffer.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/buffer.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/buffer.c (original)
+++ apr/apr/trunk/file_io/os2/buffer.c Sun Nov 20 07:14:38 2022
@@ -17,7 +17,7 @@
#include "apr_arch_file_io.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_buffe
if (do_locking) {
apr_thread_mutex_lock(file->mutex);
}
-
+
if (file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
@@ -39,7 +39,7 @@ APR_DECLARE(apr_status_t) apr_file_buffe
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->bufpos = 0;
@@ -51,11 +51,11 @@ APR_DECLARE(apr_status_t) apr_file_buffe
rv = apr_thread_mutex_create(&file->mutex, 0, file->pool);
}
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = file->bufsize > 0;
-
+
if (do_locking) {
apr_thread_mutex_unlock(file->mutex);
}
Modified: apr/apr/trunk/file_io/os2/dir.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/dir.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/dir.c (original)
+++ apr/apr/trunk/file_io/os2/dir.c Sun Nov 20 07:14:38 2022
@@ -34,10 +34,10 @@ APR_DECLARE(apr_status_t) apr_dir_open(a
FILESTATUS3 filestatus;
int rv;
apr_dir_t *thedir = (apr_dir_t *)apr_palloc(pool, sizeof(apr_dir_t));
-
+
if (thedir == NULL)
return APR_ENOMEM;
-
+
thedir->pool = pool;
thedir->dirname = apr_pstrdup(pool, dirname);
@@ -67,17 +67,17 @@ APR_DECLARE(apr_status_t) apr_dir_open(a
APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir)
{
int rv = 0;
-
+
if (thedir->handle) {
rv = DosFindClose(thedir->handle);
-
+
if (rv == 0) {
thedir->handle = 0;
}
}
return APR_FROM_OS_ERROR(rv);
-}
+}
@@ -86,11 +86,11 @@ APR_DECLARE(apr_status_t) apr_dir_read(a
{
int rv;
ULONG entries = 1;
-
+
if (thedir->handle == 0) {
thedir->handle = HDIR_CREATE;
- rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
- FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY,
+ rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
+ FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY,
&thedir->entry, sizeof(thedir->entry), &entries, FIL_STANDARD);
} else {
rv = DosFindNext(thedir->handle, &thedir->entry, sizeof(thedir->entry), &entries);
Modified: apr/apr/trunk/file_io/os2/dir_make_recurse.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/dir_make_recurse.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/dir_make_recurse.c (original)
+++ apr/apr/trunk/file_io/os2/dir_make_recurse.c Sun Nov 20 07:14:38 2022
@@ -64,7 +64,7 @@ apr_status_t apr_dir_make_recursive(cons
apr_pool_t *pool)
{
apr_status_t apr_err = APR_SUCCESS;
-
+
apr_err = apr_dir_make(path, perm, pool); /* Try to make PATH right out */
if (APR_STATUS_IS_ENOENT(apr_err)) { /* Missing an intermediate dir */
Modified: apr/apr/trunk/file_io/os2/filedup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/filedup.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/filedup.c (original)
+++ apr/apr/trunk/file_io/os2/filedup.c Sun Nov 20 07:14:38 2022
@@ -115,7 +115,7 @@ APR_DECLARE(apr_status_t) apr_file_setas
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
apr_file_cleanup,
apr_file_cleanup);
}
Modified: apr/apr/trunk/file_io/os2/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/filestat.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/filestat.c (original)
+++ apr/apr/trunk/file_io/os2/filestat.c Sun Nov 20 07:14:38 2022
@@ -38,14 +38,14 @@ static void FS3_to_finfo(apr_finfo_t *fi
finfo->device = 0;
finfo->size = fstatus->cbFile;
finfo->csize = fstatus->cbFileAlloc;
- apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
+ apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
fstatus->ftimeLastAccess );
- apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
+ apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
fstatus->ftimeLastWrite );
- apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
+ apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
fstatus->ftimeCreation );
finfo->valid = APR_FINFO_TYPE | APR_FINFO_PROT | APR_FINFO_SIZE
- | APR_FINFO_CSIZE | APR_FINFO_MTIME
+ | APR_FINFO_CSIZE | APR_FINFO_MTIME
| APR_FINFO_CTIME | APR_FINFO_ATIME | APR_FINFO_LINK;
}
@@ -84,7 +84,7 @@ static apr_status_t handle_type(apr_file
-APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
+APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
{
ULONG rc;
@@ -133,12 +133,12 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
{
ULONG rc;
FILESTATUS3 fstatus;
-
+
finfo->protection = 0;
finfo->filetype = APR_NOFILE;
finfo->name = NULL;
rc = DosQueryPathInfo(fname, FIL_STANDARD, &fstatus, sizeof(fstatus));
-
+
if (rc == 0) {
FS3_to_finfo(finfo, &fstatus);
finfo->fname = fname;
Modified: apr/apr/trunk/file_io/os2/filesys.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/filesys.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/filesys.c (original)
+++ apr/apr/trunk/file_io/os2/filesys.c Sun Nov 20 07:14:38 2022
@@ -27,8 +27,8 @@
*
* Leading spaces and periods are accepted, however.
* The * ? < > codes all have wildcard side effects
- * The " / \ : are exclusively component separator tokens
- * The system doesn't accept | for any (known) purpose
+ * The " / \ : are exclusively component separator tokens
+ * The system doesn't accept | for any (known) purpose
* Oddly, \x7f _is_ acceptable ;)
*/
@@ -63,7 +63,7 @@ apr_status_t filepath_root_test(char *pa
}
-apr_status_t filepath_drive_get(char **rootpath, char drive,
+apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
{
char path[APR_PATH_MAX];
@@ -130,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_filepath_g
}
return APR_SUCCESS;
-}
+}
Modified: apr/apr/trunk/file_io/os2/maperrorcode.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/maperrorcode.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/maperrorcode.c (original)
+++ apr/apr/trunk/file_io/os2/maperrorcode.c Sun Nov 20 07:14:38 2022
@@ -85,11 +85,11 @@ int apr_canonical_error(apr_status_t err
err -= APR_OS_START_SYSERR;
for (index=0; index<MAPSIZE && errormap[index][0] != err; index++);
-
+
if (index<MAPSIZE)
rv = errormap[index][1];
else
fprintf(stderr, "apr_canonical_error: Unknown OS/2 error code %d\n", err );
-
+
return rv;
}
Modified: apr/apr/trunk/file_io/os2/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/open.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/open.c (original)
+++ apr/apr/trunk/file_io/os2/open.c Sun Nov 20 07:14:38 2022
@@ -49,7 +49,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
dafile->flags = flag;
dafile->blocking = BLK_ON;
dafile->ungetchar = -1;
-
+
if ((flag & APR_FOPEN_READ) && (flag & APR_FOPEN_WRITE)) {
mflags |= OPEN_ACCESS_READWRITE;
} else if (flag & APR_FOPEN_READ) {
@@ -83,7 +83,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
}
}
-
+
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE))
return APR_EACCES;
@@ -92,20 +92,20 @@ APR_DECLARE(apr_status_t) apr_file_open(
} else if ((oflags & 0xFF) == 0) {
oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
}
-
+
rv = DosOpen(fname, &(dafile->filedes), &action, 0, 0, oflags, mflags, NULL);
-
+
if (rv == 0 && (flag & APR_FOPEN_APPEND)) {
ULONG newptr;
rv = DosSetFilePtr(dafile->filedes, 0, FILE_END, &newptr );
-
+
if (rv)
DosClose(dafile->filedes);
}
-
+
if (rv != 0)
return APR_FROM_OS_ERROR(rv);
-
+
dafile->isopen = TRUE;
dafile->fname = apr_pstrdup(pool, fname);
dafile->filePtr = 0;
@@ -128,18 +128,18 @@ APR_DECLARE(apr_status_t) apr_file_close
{
ULONG rc;
apr_status_t status;
-
+
if (file && file->isopen) {
status = apr_file_flush(file);
rc = DosClose(file->filedes);
-
+
if (rc == 0) {
file->isopen = FALSE;
if (file->flags & APR_FOPEN_DELONCLOSE) {
status = APR_FROM_OS_ERROR(DosDelete(file->fname));
}
- /* else we return the status of the flush attempt
+ /* else we return the status of the flush attempt
* when all else succeeds
*/
} else {
@@ -217,7 +217,7 @@ APR_DECLARE(apr_status_t) apr_os_file_pu
}
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
@@ -226,10 +226,10 @@ APR_DECLARE(apr_status_t) apr_file_eof(a
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -239,7 +239,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -249,7 +249,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
Modified: apr/apr/trunk/file_io/os2/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/pipe.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/pipe.c (original)
+++ apr/apr/trunk/file_io/os2/pipe.c Sun Nov 20 07:14:38 2022
@@ -148,8 +148,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -164,15 +164,15 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
{
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-
-
+
+
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool)
{
/* Not yet implemented, interface not suitable */
return APR_ENOTIMPL;
-}
+}
+
-
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
{
Modified: apr/apr/trunk/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/readwrite.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/readwrite.c (original)
+++ apr/apr/trunk/file_io/os2/readwrite.c Sun Nov 20 07:14:38 2022
@@ -136,7 +136,7 @@ APR_DECLARE(apr_status_t) apr_file_read(
}
*nbytes = bytesread;
-
+
if (bytesread == 0 && req_nbytes > 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
@@ -289,12 +289,12 @@ APR_DECLARE(apr_status_t) apr_file_getc(
if (rc) {
return rc;
}
-
+
if (bytesread == 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
}
-
+
return APR_SUCCESS;
}
@@ -305,7 +305,7 @@ APR_DECLARE(apr_status_t) apr_file_puts(
apr_size_t len;
len = strlen(str);
- return apr_file_write(thefile, str, &len);
+ return apr_file_write(thefile, str, &len);
}
@@ -360,7 +360,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(
{
apr_size_t readlen;
apr_status_t rv = APR_SUCCESS;
- int i;
+ int i;
for (i = 0; i < len-1; i++) {
readlen = 1;
@@ -374,7 +374,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(
rv = APR_EOF;
break;
}
-
+
if (str[i] == '\n') {
i++;
break;
Modified: apr/apr/trunk/file_io/unix/buffer.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/buffer.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/buffer.c (original)
+++ apr/apr/trunk/file_io/unix/buffer.c Sun Nov 20 07:14:38 2022
@@ -18,7 +18,7 @@
#include "apr_pools.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -34,17 +34,17 @@ APR_DECLARE(apr_status_t) apr_file_buffe
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->buffered = 1;
file->bufpos = 0;
file->direction = 0;
file->dataRead = 0;
-
+
if (file->bufsize == 0) {
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = 0;
}
Modified: apr/apr/trunk/file_io/unix/dir.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/dir.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/dir.c (original)
+++ apr/apr/trunk/file_io/unix/dir.c Sun Nov 20 07:14:38 2022
@@ -37,7 +37,7 @@ static apr_status_t dir_cleanup(void *th
else {
return errno;
}
-}
+}
#define PATH_SEPARATOR '/'
@@ -48,10 +48,10 @@ static const char *path_canonicalize (co
* now, it just makes sure there is no trailing slash. */
apr_size_t len = strlen (path);
apr_size_t orig_len = len;
-
+
while ((len > 0) && (path[len - 1] == PATH_SEPARATOR))
len--;
-
+
if (len != orig_len)
return apr_pstrndup (pool, path, len);
else
@@ -63,7 +63,7 @@ static char *path_remove_last_component
{
const char *newpath = path_canonicalize (path, pool);
int i;
-
+
for (i = (strlen(newpath) - 1); i >= 0; i--) {
if (path[i] == PATH_SEPARATOR)
break;
@@ -72,7 +72,7 @@ static char *path_remove_last_component
return apr_pstrndup (pool, path, (i < 0) ? 0 : i);
}
-apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
+apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
{
DIR *dir = opendir(dirname);
@@ -89,7 +89,7 @@ apr_status_t apr_dir_open(apr_dir_t **ne
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
&& !defined(READDIR_IS_THREAD_SAFE)
- /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
+ /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
* dirent is declared with enough storage for the name. On other
* platforms (e.g., Solaris 8 for Intel), d_name is declared as a
* one-byte array. Note: gcc evaluates this at compile time.
@@ -248,7 +248,7 @@ apr_status_t apr_dir_read(apr_finfo_t *f
if (end > fspec && end[-1] != '/' && (end < fspec + APR_PATH_MAX))
*end++ = '/';
- apr_cpystrn(end, thedir->entry->d_name,
+ apr_cpystrn(end, thedir->entry->d_name,
sizeof fspec - (end - fspec));
ret = apr_stat(finfo, fspec, APR_FINFO_LINK | wanted, thedir->pool);
@@ -294,7 +294,7 @@ apr_status_t apr_dir_rewind(apr_dir_t *t
return APR_SUCCESS;
}
-apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
+apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
@@ -308,15 +308,15 @@ apr_status_t apr_dir_make(const char *pa
}
apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
- apr_pool_t *pool)
+ apr_pool_t *pool)
{
apr_status_t apr_err = 0;
-
+
apr_err = apr_dir_make (path, perm, pool); /* Try to make PATH right out */
-
+
if (apr_err == ENOENT) { /* Missing an intermediate dir */
char *dir;
-
+
dir = path_remove_last_component(path, pool);
/* If there is no path left, give up. */
if (dir[0] == '\0') {
@@ -324,8 +324,8 @@ apr_status_t apr_dir_make_recursive(cons
}
apr_err = apr_dir_make_recursive(dir, perm, pool);
-
- if (!apr_err)
+
+ if (!apr_err)
apr_err = apr_dir_make (path, perm, pool);
}
@@ -370,4 +370,4 @@ apr_status_t apr_os_dir_put(apr_dir_t **
return APR_SUCCESS;
}
-
+
Modified: apr/apr/trunk/file_io/unix/fileacc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/fileacc.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/fileacc.c (original)
+++ apr/apr/trunk/file_io/unix/fileacc.c Sun Nov 20 07:14:38 2022
@@ -107,13 +107,13 @@ apr_fileperms_t apr_unix_mode2perms(mode
APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key,
apr_file_t *file)
-{
+{
return apr_pool_userdata_get(data, key, file->pool);
}
APR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,
const char *key,
apr_status_t (*cleanup)(void *))
-{
+{
return apr_pool_userdata_set(data, key, cleanup, file->pool);
}
Modified: apr/apr/trunk/file_io/unix/filedup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/filedup.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/filedup.c (original)
+++ apr/apr/trunk/file_io/unix/filedup.c Sun Nov 20 07:14:38 2022
@@ -22,7 +22,7 @@
#include <assert.h>
-static apr_status_t file_dup(apr_file_t **new_file,
+static apr_status_t file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p,
int which_dup)
{
@@ -32,7 +32,7 @@ static apr_status_t file_dup(apr_file_t
#endif
assert(which_dup == 1 || which_dup == 2);
-
+
if (which_dup == 2) {
if ((*new_file) == NULL) {
/* We can't dup2 unless we have a valid new_file */
@@ -65,7 +65,7 @@ static apr_status_t file_dup(apr_file_t
if (rv == -1)
return errno;
-
+
if (which_dup == 1) {
(*new_file) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
(*new_file)->pool = p;
@@ -94,7 +94,7 @@ static apr_status_t file_dup(apr_file_t
}
/* this is the way dup() works */
- (*new_file)->blocking = old_file->blocking;
+ (*new_file)->blocking = old_file->blocking;
/* make sure unget behavior is consistent */
(*new_file)->ungetchar = old_file->ungetchar;
@@ -110,8 +110,8 @@ static apr_status_t file_dup(apr_file_t
(*new_file)->rotating->manual = old_file->rotating->manual;
}
- /* apr_file_dup2() retains the original cleanup, reflecting
- * the existing inherit and nocleanup flags. This means,
+ /* apr_file_dup2() retains the original cleanup, reflecting
+ * the existing inherit and nocleanup flags. This means,
* that apr_file_dup2() cannot be called against an apr_file_t
* already closed with apr_file_close, because the expected
* cleanup was already killed.
@@ -122,14 +122,14 @@ static apr_status_t file_dup(apr_file_t
/* apr_file_dup() retains all old_file flags with the exceptions
* of APR_INHERIT and APR_FOPEN_NOCLEANUP.
- * The user must call apr_file_inherit_set() on the dupped
+ * The user must call apr_file_inherit_set() on the dupped
* apr_file_t when desired.
*/
(*new_file)->flags = old_file->flags
& ~(APR_INHERIT | APR_FOPEN_NOCLEANUP);
apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file),
- apr_unix_file_cleanup,
+ apr_unix_file_cleanup,
apr_unix_child_file_cleanup);
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
@@ -181,7 +181,7 @@ APR_DECLARE(apr_status_t) apr_file_setas
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_unix_file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
apr_unix_file_cleanup,
((*new_file)->flags & APR_INHERIT)
? apr_pool_cleanup_null
Modified: apr/apr/trunk/file_io/unix/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/filestat.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/filestat.c (original)
+++ apr/apr/trunk/file_io/unix/filestat.c Sun Nov 20 07:14:38 2022
@@ -69,7 +69,7 @@ static apr_filetype_e filetype_from_mode
static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
apr_int32_t wanted)
-{
+{
finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
@@ -148,7 +148,7 @@ apr_status_t apr_file_info_get_locked(ap
}
}
-APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
+APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)
{
@@ -171,7 +171,7 @@ APR_DECLARE(apr_status_t) apr_file_info_
}
}
-APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
@@ -252,12 +252,12 @@ APR_DECLARE(apr_status_t) apr_file_mtime
#ifdef HAVE_UTIMES
{
struct timeval tvp[2];
-
+
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
-
+
if (utimes(fname, tvp) == -1) {
return errno;
}
@@ -265,10 +265,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime
#elif defined(HAVE_UTIME)
{
struct utimbuf buf;
-
+
buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC);
buf.modtime = (time_t) (mtime / APR_USEC_PER_SEC);
-
+
if (utime(fname, &buf) == -1) {
return errno;
}
@@ -281,8 +281,8 @@ APR_DECLARE(apr_status_t) apr_file_mtime
}
-APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
- const char *fname,
+APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
+ const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
{
struct_stat info;
@@ -310,17 +310,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
* include files, APR cannot report a good reason why the stat()
* of the file failed; there are cases where it can fail even though
* the file exists. This opens holes in Apache, for example, because
- * it becomes possible for someone to get a directory listing of a
- * directory even though there is an index (eg. index.html) file in
- * it. If you do not have a problem with this, delete the above
+ * it becomes possible for someone to get a directory listing of a
+ * directory even though there is an index (eg. index.html) file in
+ * it. If you do not have a problem with this, delete the above
* #error lines and start the compile again. If you need to do this,
* please submit a bug report to http://www.apache.org/bug_report.html
- * letting us know that you needed to do this. Please be sure to
+ * letting us know that you needed to do this. Please be sure to
* include the operating system you are using.
*/
/* WARNING: All errors will be handled as not found
*/
-#if !defined(ENOENT)
+#if !defined(ENOENT)
return APR_ENOENT;
#else
/* WARNING: All errors but not found will be handled as not directory
Modified: apr/apr/trunk/file_io/unix/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/open.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/open.c (original)
+++ apr/apr/trunk/file_io/unix/open.c Sun Nov 20 07:14:38 2022
@@ -88,10 +88,10 @@ apr_status_t apr_unix_child_file_cleanup
return file_cleanup(thefile, 1);
}
-APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
- const char *fname,
- apr_int32_t flag,
- apr_fileperms_t perm,
+APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
+ const char *fname,
+ apr_int32_t flag,
+ apr_fileperms_t perm,
apr_pool_t *pool)
{
apr_os_file_t fd;
@@ -111,7 +111,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
oflags = O_WRONLY;
}
else {
- return APR_EACCES;
+ return APR_EACCES;
}
if (flag & APR_FOPEN_CREATE) {
@@ -122,7 +122,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
}
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE)) {
return APR_EACCES;
- }
+ }
if (flag & APR_FOPEN_APPEND) {
oflags |= O_APPEND;
@@ -151,7 +151,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
oflags |= O_CLOEXEC;
}
#endif
-
+
#if APR_HAS_LARGE_FILES && defined(_LARGEFILE64_SOURCE)
oflags |= O_LARGEFILE;
#elif defined(O_LARGEFILE)
@@ -175,7 +175,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
}
else {
fd = open(fname, oflags, apr_unix_perms2mode(perm));
- }
+ }
if (fd < 0) {
return errno;
}
@@ -243,8 +243,8 @@ APR_DECLARE(apr_status_t) apr_file_open(
(*new)->pollset = NULL;
#endif
if (!(flag & APR_FOPEN_NOCLEANUP)) {
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
- apr_unix_file_cleanup,
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_unix_file_cleanup,
apr_unix_child_file_cleanup);
}
@@ -291,7 +291,7 @@ APR_DECLARE(apr_status_t) apr_file_remov
}
}
-APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
const char *to_path,
apr_pool_t *p)
{
@@ -301,19 +301,19 @@ APR_DECLARE(apr_status_t) apr_file_renam
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file)
{
*thefile = file->filedes;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
+APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_int32_t flags, apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -346,7 +346,7 @@ APR_DECLARE(apr_status_t) apr_os_file_pu
#endif
}
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
{
@@ -354,9 +354,9 @@ APR_DECLARE(apr_status_t) apr_file_eof(a
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -365,7 +365,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_WRITE, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -374,7 +374,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_WRITE, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -383,19 +383,19 @@ APR_DECLARE(apr_status_t) apr_file_open_
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_READ, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stderr(thefile, 0, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stdout(thefile, 0, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stdin(thefile, 0, pool);
@@ -432,7 +432,7 @@ APR_DECLARE(apr_status_t) apr_file_inher
APR_POOL_IMPLEMENT_ACCESSOR(file)
-APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
const char *to_path)
{
if (link(from_path, to_path) == -1) {
Modified: apr/apr/trunk/file_io/unix/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/pipe.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/pipe.c (original)
+++ apr/apr/trunk/file_io/unix/pipe.c Sun Nov 20 07:14:38 2022
@@ -45,7 +45,7 @@ static apr_status_t pipeblock(apr_file_t
fd_flags &= ~O_NDELAY;
# elif defined(O_FNDELAY)
fd_flags &= ~O_FNDELAY;
-# else
+# else
/* XXXX: this breaks things, but an alternative isn't obvious...*/
return APR_ENOTIMPL;
# endif
@@ -61,8 +61,8 @@ static apr_status_t pipeblock(apr_file_t
}
# else /* "classic" BeOS doesn't support this at all */
return APR_ENOTIMPL;
-# endif
-
+# endif
+
#endif /* !BEOS_BLOCKING */
thepipe->blocking = BLK_ON;
@@ -87,7 +87,7 @@ static apr_status_t pipenonblock(apr_fil
if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) {
return errno;
}
-
+
#else /* BEOS_BLOCKING */
# if BEOS_BONE /* This only works on BONE 0-6 */
@@ -139,7 +139,7 @@ APR_DECLARE(apr_status_t) apr_os_pipe_pu
apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -187,7 +187,7 @@ static apr_status_t file_pipe_create(apr
if (pipe(filedes) == -1) {
return errno;
}
-
+
(*in) = (apr_file_t *)apr_pcalloc(pool_in, sizeof(apr_file_t));
(*in)->pool = pool_in;
(*in)->filedes = filedes[0];
@@ -249,8 +249,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -266,7 +266,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
+APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
@@ -275,7 +275,7 @@ APR_DECLARE(apr_status_t) apr_file_named
return errno;
}
return APR_SUCCESS;
-}
+}
+
-
Modified: apr/apr/trunk/file_io/unix/printf.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/printf.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/printf.c (original)
+++ apr/apr/trunk/file_io/unix/printf.c Sun Nov 20 07:14:38 2022
@@ -32,7 +32,7 @@ static int file_printf_flush(apr_vformat
{
struct apr_file_printf_data *data = (struct apr_file_printf_data *)buff;
- if (apr_file_write_full(data->fptr, data->buf,
+ if (apr_file_write_full(data->fptr, data->buf,
data->vbuff.curpos - data->buf, NULL)) {
return -1;
}
@@ -41,7 +41,7 @@ static int file_printf_flush(apr_vformat
return 0;
}
-APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
+APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
Modified: apr/apr/trunk/file_io/unix/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/readwrite.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/readwrite.c (original)
+++ apr/apr/trunk/file_io/unix/readwrite.c Sun Nov 20 07:14:38 2022
@@ -54,7 +54,7 @@ static apr_status_t file_read_buffered(a
}
while (rv == 0 && size > 0) {
if (thefile->bufpos >= thefile->dataRead) {
- int bytesread = read(thefile->filedes, thefile->buffer,
+ int bytesread = read(thefile->filedes, thefile->buffer,
thefile->bufsize);
if (bytesread == 0) {
thefile->eof_hit = TRUE;
@@ -118,8 +118,8 @@ APR_DECLARE(apr_status_t) apr_file_read(
rv = read(thefile->filedes, buf, *nbytes);
} while (rv == -1 && errno == EINTR);
#ifdef USE_WAIT_FOR_IO
- if (rv == -1 &&
- (errno == EAGAIN || errno == EWOULDBLOCK) &&
+ if (rv == -1 &&
+ (errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 1);
if (arv != APR_SUCCESS) {
@@ -131,7 +131,7 @@ APR_DECLARE(apr_status_t) apr_file_read(
rv = read(thefile->filedes, buf, *nbytes);
} while (rv == -1 && errno == EINTR);
}
- }
+ }
#endif
*nbytes = bytes_read;
if (rv == 0) {
@@ -159,7 +159,7 @@ static apr_status_t do_rotating_check(ap
rv = apr_stat(&new_finfo, thefile->fname,
APR_FINFO_DEV|APR_FINFO_INODE, tmp_pool);
- if (rv != APR_SUCCESS ||
+ if (rv != APR_SUCCESS ||
new_finfo.inode != thefile->rotating->finfo.inode ||
new_finfo.device != thefile->rotating->finfo.device) {
@@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_file_write
file_lock(thefile);
if ( thefile->direction == 0 ) {
- /* Position file pointer for writing at the offset we are
+ /* Position file pointer for writing at the offset we are
* logically reading from
*/
apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
@@ -256,9 +256,9 @@ APR_DECLARE(apr_status_t) apr_file_write
if (thefile->bufpos == thefile->bufsize) /* write buffer is full*/
rv = apr_file_flush_locked(thefile);
- blocksize = size > thefile->bufsize - thefile->bufpos ?
+ blocksize = size > thefile->bufsize - thefile->bufpos ?
thefile->bufsize - thefile->bufpos : size;
- memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
+ memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
thefile->bufpos += blocksize;
pos += blocksize;
size -= blocksize;
@@ -274,7 +274,7 @@ APR_DECLARE(apr_status_t) apr_file_write
} while (rv == (apr_size_t)-1 && errno == EINTR);
#ifdef USE_WAIT_FOR_IO
if (rv == (apr_size_t)-1 &&
- (errno == EAGAIN || errno == EWOULDBLOCK) &&
+ (errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 0);
if (arv != APR_SUCCESS) {
@@ -297,7 +297,7 @@ APR_DECLARE(apr_status_t) apr_file_write
}
} while (1);
}
- }
+ }
#endif
if (rv == (apr_size_t)-1) {
(*nbytes) = 0;
@@ -358,14 +358,14 @@ APR_DECLARE(apr_status_t) apr_file_write
/**
* The problem with trying to output the entire iovec is that we cannot
* maintain the behaviour that a real writev would have. If we iterate
- * over the iovec one at a time, we lose the atomic properties of
+ * over the iovec one at a time, we lose the atomic properties of
* writev(). The other option is to combine the entire iovec into one
- * buffer that we could then send in one call to write(). This is not
+ * buffer that we could then send in one call to write(). This is not
* reasonable since we do not know how much data an iovec could contain.
*
- * The only reasonable option, that maintains the semantics of a real
+ * The only reasonable option, that maintains the semantics of a real
* writev(), is to only write the first iovec. Callers of file_writev()
- * must deal with partial writes as they normally would. If you want to
+ * must deal with partial writes as they normally would. If you want to
* ensure an entire iovec is written, use apr_file_writev_full().
*/
@@ -384,7 +384,7 @@ APR_DECLARE(apr_status_t) apr_file_putc(
APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
{
thefile->ungetchar = (unsigned char)ch;
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
@@ -506,8 +506,8 @@ APR_DECLARE(apr_status_t) apr_file_gets(
const char *str_start = str;
char *final = str + len - 1;
- if (len <= 1) {
- /* sort of like fgets(), which returns NULL and stores no bytes
+ if (len <= 1) {
+ /* sort of like fgets(), which returns NULL and stores no bytes
*/
return APR_SUCCESS;
}
@@ -567,7 +567,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(
}
/* We must store a terminating '\0' if we've stored any chars. We can
- * get away with storing it if we hit an error first.
+ * get away with storing it if we hit an error first.
*/
*str = '\0';
if (str > str_start) {
Modified: apr/apr/trunk/file_io/unix/tempdir.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/tempdir.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/tempdir.c (original)
+++ apr/apr/trunk/file_io/unix/tempdir.c Sun Nov 20 07:14:38 2022
@@ -37,7 +37,7 @@ static int test_tempdir(const char *temp
}
-APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
+APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
apr_pool_t *p)
{
apr_status_t apr_err;
@@ -60,7 +60,7 @@ APR_DECLARE(apr_status_t) apr_temp_dir_g
"/var/tmp"
"/usr/tmp"
P_tmpdir (POSIX define)
- `pwd`
+ `pwd`
NOTE: This algorithm is basically the same one used by Python
2.2's tempfile.py module. */
@@ -102,16 +102,16 @@ APR_DECLARE(apr_status_t) apr_temp_dir_g
}
#ifdef P_tmpdir
- /*
- * If we have it, use the POSIX definition of where
- * the tmpdir should be
+ /*
+ * If we have it, use the POSIX definition of where
+ * the tmpdir should be
*/
if (test_tempdir(P_tmpdir, p)) {
dir = P_tmpdir;
goto end;
}
#endif
-
+
/* Finally, try the current working directory. */
if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
if (test_tempdir(cwd, p)) {
Modified: apr/apr/trunk/file_io/win32/buffer.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/buffer.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/buffer.c (original)
+++ apr/apr/trunk/file_io/win32/buffer.c Sun Nov 20 07:14:38 2022
@@ -17,7 +17,7 @@
#include "apr_arch_file_io.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -26,7 +26,7 @@ APR_DECLARE(apr_status_t) apr_file_buffe
if (file->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_lock(file->mutex);
}
-
+
if(file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
@@ -37,21 +37,21 @@ APR_DECLARE(apr_status_t) apr_file_buffe
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->buffered = 1;
file->bufpos = 0;
file->direction = 0;
file->dataRead = 0;
-
+
if (file->bufsize == 0) {
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = 0;
}
-
+
if (file->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(file->mutex);
}
Modified: apr/apr/trunk/file_io/win32/dir.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/dir.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/dir.c (original)
+++ apr/apr/trunk/file_io/win32/dir.c Sun Nov 20 07:14:38 2022
@@ -43,7 +43,7 @@ static apr_status_t dir_cleanup(void *th
}
dir->dirhand = INVALID_HANDLE_VALUE;
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
@@ -52,7 +52,7 @@ APR_DECLARE(apr_status_t) apr_dir_open(a
apr_size_t len = strlen(dirname);
(*new) = apr_pcalloc(pool, sizeof(apr_dir_t));
- /* Leave room here to add and pop the '*' wildcard for FindFirstFile
+ /* Leave room here to add and pop the '*' wildcard for FindFirstFile
* and double-null terminate so we have one character to change.
*/
(*new)->dirname = apr_palloc(pool, len + 3);
@@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_dir_open(a
(*new)->dirname[len++] = '\0';
(*new)->dirname[len] = '\0';
- /* Create a buffer for the longest file name we will ever see
+ /* Create a buffer for the longest file name we will ever see
*/
(*new)->entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
(*new)->name = apr_pcalloc(pool, APR_FILE_MAX * 3 + 1);
@@ -103,10 +103,10 @@ APR_DECLARE(apr_status_t) apr_dir_read(a
/* This code path is always be invoked by apr_dir_open or
* apr_dir_rewind, so return without filling out the finfo.
*/
- if (thedir->dirhand == INVALID_HANDLE_VALUE)
+ if (thedir->dirhand == INVALID_HANDLE_VALUE)
{
- if ((rv = utf8_to_unicode_path(wdirname, sizeof(wdirname)
- / sizeof(apr_wchar_t),
+ if ((rv = utf8_to_unicode_path(wdirname, sizeof(wdirname)
+ / sizeof(apr_wchar_t),
thedir->dirname))) {
return rv;
}
@@ -130,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(a
* either apr_dir_open or apr_dir_rewind ... use
* that first record.
*/
- thedir->bof = 0;
+ thedir->bof = 0;
}
else if (!FindNextFileW(thedir->dirhand, thedir->entry)) {
return apr_get_os_error();
@@ -143,7 +143,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(a
return apr_get_os_error();
}
}
- if ((rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1,
+ if ((rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1,
thedir->entry->cFileName)))
return rv;
fname = thedir->name;
@@ -227,7 +227,7 @@ static apr_status_t dir_make_parent(char
*ch = '\0';
rv = apr_dir_make (path, perm, pool); /* Try to make straight off */
-
+
if (APR_STATUS_IS_ENOENT(rv)) { /* Missing an intermediate dir */
rv = dir_make_parent(path, perm, pool);
Modified: apr/apr/trunk/file_io/win32/filedup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filedup.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filedup.c (original)
+++ apr/apr/trunk/file_io/win32/filedup.c Sun Nov 20 07:14:38 2022
@@ -29,8 +29,8 @@ APR_DECLARE(apr_status_t) apr_file_dup(a
HANDLE hproc = GetCurrentProcess();
HANDLE newhand = NULL;
- if (!DuplicateHandle(hproc, old_file->filehand,
- hproc, &newhand, 0, FALSE,
+ if (!DuplicateHandle(hproc, old_file->filehand,
+ hproc, &newhand, 0, FALSE,
DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
}
@@ -142,13 +142,13 @@ APR_DECLARE(apr_status_t) apr_file_dup2(
_setmode(0, _O_BINARY);
newhand = (HANDLE)_get_osfhandle(0);
}
- newflags = (new_file->flags & APR_STD_FLAGS)
+ newflags = (new_file->flags & APR_STD_FLAGS)
| (old_file->flags & ~APR_STD_FLAGS) | APR_INHERIT;
/* No need to close the old file, _dup2() above did that for us */
}
else {
- if (!DuplicateHandle(hproc, old_file->filehand,
+ if (!DuplicateHandle(hproc, old_file->filehand,
hproc, &newhand, 0,
FALSE, DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
@@ -205,7 +205,7 @@ APR_DECLARE(apr_status_t) apr_file_setas
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
file_cleanup,
file_cleanup);
}
Modified: apr/apr/trunk/file_io/win32/filepath.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filepath.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filepath.c (original)
+++ apr/apr/trunk/file_io/win32/filepath.c Sun Nov 20 07:14:38 2022
@@ -29,16 +29,16 @@
/* WinNT accepts several odd forms of a 'root' path. Under Unicode
* calls (ApiFunctionW) the //?/C:/foo or //?/UNC/mach/share/foo forms
- * are accepted. Ansi and Unicode functions both accept the //./C:/foo
- * form under WinNT/2K. Since these forms are handled in the utf-8 to
- * unicode translation phase, we don't want the user confused by them, so
+ * are accepted. Ansi and Unicode functions both accept the //./C:/foo
+ * form under WinNT/2K. Since these forms are handled in the utf-8 to
+ * unicode translation phase, we don't want the user confused by them, so
* we will accept them but always return the canonical C:/ or //mach/share/
*
* OS2 appears immune from the nonsense :)
*/
-APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
- const char **inpath,
+APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
+ const char **inpath,
apr_int32_t flags,
apr_pool_t *p)
{
@@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
if (volsep) {
/* Split the inpath into its separate parts. */
deconstruct(testpath, server, volume, NULL, file, NULL, &elements, PATH_UNDEF);
-
+
/* If we got a volume part then continue splitting out the root.
Otherwise we either have an incomplete or relative path
*/
@@ -131,7 +131,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
#ifdef WIN32 /* //server/share isn't the only // delimited syntax */
if ((testpath[2] == '?' || testpath[2] == '.')
&& (testpath[3] == '/' || testpath[3] == '\\')) {
- if (IS_FNCHAR(testpath[4]) && testpath[5] == ':')
+ if (IS_FNCHAR(testpath[4]) && testpath[5] == ':')
{
apr_status_t rv;
testpath += 4;
@@ -144,9 +144,9 @@ APR_DECLARE(apr_status_t) apr_filepath_r
return rv;
}
else if (strncasecmp(testpath + 4, "UNC", 3) == 0
- && (testpath[7] == '/' || testpath[7] == '\\')
+ && (testpath[7] == '/' || testpath[7] == '\\')
&& (testpath[2] == '?')) {
- /* given '//?/UNC/machine/share, a little magic
+ /* given '//?/UNC/machine/share, a little magic
* at the end makes this all work out by using
* 'C/machine' as the starting point and replacing
* the UNC delimiters with \'s, including the 'C'
@@ -176,9 +176,9 @@ APR_DECLARE(apr_status_t) apr_filepath_r
/* Protect against //machine/X/ where X is illegal */
if (!IS_FNCHAR(*(delim2++)))
return APR_EBADPATH;
- }
+ }
- /* Copy the '//machine/[share[/]]' path, always providing
+ /* Copy the '//machine/[share[/]]' path, always providing
* an extra byte for the trailing slash.
*/
newpath = apr_pstrmemdup(p, testpath, delim2 - testpath + 1);
@@ -192,11 +192,11 @@ APR_DECLARE(apr_status_t) apr_filepath_r
}
if (flags & APR_FILEPATH_TRUENAME) {
- /* Validate the \\Machine\Share\ designation,
- * Win32 will argue about slashed in UNC paths,
+ /* Validate the \\Machine\Share\ designation,
+ * Win32 will argue about slashed in UNC paths,
* so use backslashes till we finish testing,
* and add the trailing backslash [required].
- * apr_pstrmemdup above guarentees us the new
+ * apr_pstrmemdup above guarentees us the new
* trailing null character.
*/
newpath[0] = '\\';
@@ -215,7 +215,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
newpath[delim1 - testpath] = seperator[0];
newpath[delim2 - testpath] = (*delim2 ? seperator[0] : '\0');
}
- else {
+ else {
/* Give back the caller's own choice of delimiters
*/
newpath[0] = testpath[0];
@@ -224,7 +224,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
newpath[delim2 - testpath] = *delim2;
}
- /* If this root included the trailing / or \ designation
+ /* If this root included the trailing / or \ designation
* then lop off multiple trailing slashes and give back
* appropriate delimiters.
*/
@@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
*rootpath = newpath;
return APR_SUCCESS;
}
-
+
/* Have path of '\\[machine]', if the machine is given,
* append same trailing slash as the leading slash
*/
@@ -265,7 +265,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
return APR_EINCOMPLETE;
}
- /* Left with a path of '/', what drive are we asking about?
+ /* Left with a path of '/', what drive are we asking about?
*/
*inpath = testpath + 1;
newpath = apr_palloc(p, 2);
@@ -279,7 +279,7 @@ APR_DECLARE(apr_status_t) apr_filepath_r
}
/* Evaluate path of 'd:[/]' */
- if (IS_FNCHAR(*testpath) && testpath[1] == ':')
+ if (IS_FNCHAR(*testpath) && testpath[1] == ':')
{
apr_status_t rv;
/* Validate that D:\ drive exists, test must be rooted
@@ -349,9 +349,9 @@ static int same_drive(const char *path1,
}
#endif
-APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
- const char *basepath,
- const char *addpath,
+APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
+ const char *basepath,
+ const char *addpath,
apr_int32_t flags,
apr_pool_t *p)
{
@@ -370,7 +370,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
#ifndef NETWARE
int fixunc = 0; /* flag to complete an incomplete UNC basepath */
#endif
-
+
/* Treat null as an empty path, otherwise split addroot from the addpath
*/
if (!addpath) {
@@ -380,7 +380,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
else {
/* This call _should_ test the path
*/
- addtype = apr_filepath_root(&addroot, &addpath,
+ addtype = apr_filepath_root(&addroot, &addpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@@ -398,7 +398,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
/* If addpath is (even partially) rooted, then basepath is
- * unused. Ths violates any APR_FILEPATH_SECUREROOTTEST
+ * unused. Ths violates any APR_FILEPATH_SECUREROOTTEST
* and APR_FILEPATH_NOTABSOLUTE flags specified.
*/
if (addtype == APR_EABSOLUTE || addtype == APR_EINCOMPLETE)
@@ -422,8 +422,8 @@ APR_DECLARE(apr_status_t) apr_filepath_m
basetype = APR_ERELATIVE;
}
- /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
- * requires an absolutely relative result, So do not retrieve
+ /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
+ * requires an absolutely relative result, So do not retrieve
* the working path.
*/
if (addtype == APR_ERELATIVE && (flags & APR_FILEPATH_NOTABSOLUTE)) {
@@ -432,12 +432,12 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
}
- if (!basepath)
+ if (!basepath)
{
/* Start with the current working path. This is bass akwards,
* but required since the compiler (at least vc) doesn't like
* passing the address of a char const* for a char** arg.
- * We must grab the current path of the designated drive
+ * We must grab the current path of the designated drive
* if addroot is given in drive-relative form (e.g. d:foo)
*/
char *getpath;
@@ -471,8 +471,8 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
baselen = strlen(basepath);
- /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
- * requires an absolutely relative result. If the given
+ /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
+ * requires an absolutely relative result. If the given
* basepath is not relative then fail.
*/
if ((flags & APR_FILEPATH_NOTABSOLUTE) && basetype != APR_ERELATIVE)
@@ -485,7 +485,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
{
/* Ignore the given root path, and start with the addroot
*/
- if ((flags & APR_FILEPATH_NOTABOVEROOT)
+ if ((flags & APR_FILEPATH_NOTABOVEROOT)
&& strncmp(baseroot, addroot, strlen(baseroot)))
return APR_EABOVEROOT;
keptlen = 0;
@@ -494,22 +494,22 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
else if (addtype == APR_EINCOMPLETE)
{
- /* There are several types of incomplete paths,
+ /* There are several types of incomplete paths,
* incomplete UNC paths (//foo/ or //),
- * drives without rooted paths (d: as in d:foo),
+ * drives without rooted paths (d: as in d:foo),
* and simple roots (/ as in /foo).
* Deal with these in significantly different manners...
*/
#ifndef NETWARE
if ((addroot[0] == '/' || addroot[0] == '\\') &&
- (addroot[1] == '/' || addroot[1] == '\\'))
+ (addroot[1] == '/' || addroot[1] == '\\'))
{
/* Ignore the given root path if the incomplete addpath is UNC,
* (note that the final result will be incomplete).
*/
if (flags & APR_FILEPATH_NOTRELATIVE)
return addtype;
- if ((flags & APR_FILEPATH_NOTABOVEROOT)
+ if ((flags & APR_FILEPATH_NOTABOVEROOT)
&& strncmp(baseroot, addroot, strlen(baseroot)))
return APR_EABOVEROOT;
fixunc = 1;
@@ -518,8 +518,8 @@ APR_DECLARE(apr_status_t) apr_filepath_m
memcpy(path, addroot, pathlen);
}
else
-#endif
- if ((addroot[0] == '/' || addroot[0] == '\\') && !addroot[1])
+#endif
+ if ((addroot[0] == '/' || addroot[0] == '\\') && !addroot[1])
{
/* Bring together the drive or UNC root from the baseroot
* if the addpath is a simple root and basepath is rooted,
@@ -529,7 +529,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
return basetype;
if (basetype != APR_ERELATIVE) {
#ifndef NETWARE
- if (basetype == APR_INCOMPLETE
+ if (basetype == APR_INCOMPLETE
&& (baseroot[0] == '/' || baseroot[0] == '\\')
&& (baseroot[1] == '/' || baseroot[1] == '\\'))
fixunc = 1;
@@ -546,16 +546,16 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
}
#ifdef NETWARE
- else if (filepath_has_drive(addroot, DRIVE_ONLY, p))
+ else if (filepath_has_drive(addroot, DRIVE_ONLY, p))
{
/* If the addroot is a drive (without a volume root)
* use the basepath _if_ it matches this drive letter!
* Otherwise we must discard the basepath.
*/
- if (!filepath_compare_drive(addroot, baseroot, p) &&
+ if (!filepath_compare_drive(addroot, baseroot, p) &&
filepath_has_drive(baseroot, 0, p)) {
#else
- else if (addroot[0] && addroot[1] == ':' && !addroot[2])
+ else if (addroot[0] && addroot[1] == ':' && !addroot[2])
{
/* If the addroot is a drive (without a volume root)
* use the basepath _if_ it matches this drive letter!
@@ -573,7 +573,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
return APR_ENAMETOOLONG;
memcpy(path, baseroot, rootlen);
memcpy(path + rootlen, basepath, baselen);
- }
+ }
else {
if (flags & APR_FILEPATH_NOTRELATIVE)
return addtype;
@@ -600,7 +600,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
#ifndef NETWARE
/* An incomplete UNC path must be completed
*/
- if (basetype == APR_INCOMPLETE
+ if (basetype == APR_INCOMPLETE
&& (baseroot[0] == '/' || baseroot[0] == '\\')
&& (baseroot[1] == '/' || baseroot[1] == '\\'))
fixunc = 1;
@@ -624,7 +624,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
if (path[pathlen - 1] != '/' && path[pathlen - 1] != '\\') {
if (pathlen + 1 >= sizeof(path))
return APR_ENAMETOOLONG;
-
+
path[pathlen++] = ((flags & APR_FILEPATH_NATIVE) ? '\\' : '/');
}
/* XXX: wrong, but gotta figure out what I intended;
@@ -633,9 +633,9 @@ APR_DECLARE(apr_status_t) apr_filepath_m
*/
}
- while (*addpath)
+ while (*addpath)
{
- /* Parse each segment, find the closing '/'
+ /* Parse each segment, find the closing '/'
*/
seglen = 0;
while (addpath[seglen] && addpath[seglen] != '/'
@@ -644,7 +644,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
/* Truncate all trailing spaces and all but the first two dots */
segend = seglen;
- while (seglen && (addpath[seglen - 1] == ' '
+ while (seglen && (addpath[seglen - 1] == ' '
|| addpath[seglen - 1] == '.')) {
if (seglen > 2 || addpath[seglen - 1] != '.' || addpath[0] != '.')
--seglen;
@@ -652,7 +652,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
break;
}
- if (seglen == 0 || (seglen == 1 && addpath[0] == '.'))
+ if (seglen == 0 || (seglen == 1 && addpath[0] == '.'))
{
/* NOTE: win32 _hates_ '/ /' and '/. /' (yes, with spaces in there)
* so eliminate all preconceptions that it is valid.
@@ -667,13 +667,13 @@ APR_DECLARE(apr_status_t) apr_filepath_m
return APR_EBADPATH;
#endif
- /* Otherwise, this is a noop segment (/ or ./) so ignore it
+ /* Otherwise, this is a noop segment (/ or ./) so ignore it
*/
}
- else if (seglen == 2 && addpath[0] == '.' && addpath[1] == '.')
+ else if (seglen == 2 && addpath[0] == '.' && addpath[1] == '.')
{
/* NOTE: win32 _hates_ '/.. /' (yes, with a space in there)
- * and '/..../', some functions treat it as ".", and some
+ * and '/..../', some functions treat it as ".", and some
* fail! Eliminate all preconceptions that they are valid.
*/
if (seglen < segend && (seglen != 3 || addpath[2] != '.'))
@@ -687,32 +687,32 @@ APR_DECLARE(apr_status_t) apr_filepath_m
#endif
/* backpath (../) when an absolute path is given */
- if (rootlen && (pathlen <= rootlen))
+ if (rootlen && (pathlen <= rootlen))
{
- /* Attempt to move above root. Always die if the
+ /* Attempt to move above root. Always die if the
* APR_FILEPATH_SECUREROOTTEST flag is specified.
*/
if (flags & APR_FILEPATH_SECUREROOTTEST)
return APR_EABOVEROOT;
-
+
/* Otherwise this is simply a noop, above root is root.
*/
}
- else if (pathlen == 0
- || (pathlen >= 3
+ else if (pathlen == 0
+ || (pathlen >= 3
&& (pathlen == 3
|| path[pathlen - 4] == ':'
- || path[pathlen - 4] == '/'
+ || path[pathlen - 4] == '/'
|| path[pathlen - 4] == '\\')
- && path[pathlen - 3] == '.'
- && path[pathlen - 2] == '.'
- && (path[pathlen - 1] == '/'
+ && path[pathlen - 3] == '.'
+ && path[pathlen - 2] == '.'
+ && (path[pathlen - 1] == '/'
|| path[pathlen - 1] == '\\')))
{
/* Verified path is empty, exactly "..[/\]", or ends
* in "[:/\]..[/\]" - these patterns we will not back
* over since they aren't 'prior segements'.
- *
+ *
* If APR_FILEPATH_SECUREROOTTEST.was given, die now.
*/
if (flags & APR_FILEPATH_SECUREROOTTEST)
@@ -725,7 +725,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
path[pathlen++] = '.';
path[pathlen++] = '.';
if (addpath[segend]) {
- path[pathlen++] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen++] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : ((flags & APR_FILEPATH_TRUENAME)
? '/' : addpath[segend]));
}
@@ -735,9 +735,9 @@ APR_DECLARE(apr_status_t) apr_filepath_m
*/
keptlen = pathlen;
}
- else
+ else
{
- /* otherwise crop the prior segment
+ /* otherwise crop the prior segment
*/
do {
--pathlen;
@@ -747,7 +747,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
/* Now test if we are above where we started and back up
* the keptlen offset to reflect the added/altered path.
*/
- if (pathlen < keptlen)
+ if (pathlen < keptlen)
{
if (flags & APR_FILEPATH_SECUREROOTTEST)
return APR_EABOVEROOT;
@@ -763,7 +763,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
const char *testroot;
apr_status_t testtype;
apr_size_t i = (addpath[segend] != '\0');
-
+
/* This isn't legal unless the unc path is complete!
*/
if (seglen < segend)
@@ -771,10 +771,10 @@ APR_DECLARE(apr_status_t) apr_filepath_m
if (pathlen + seglen + 1 >= sizeof(path))
return APR_ENAMETOOLONG;
memcpy(path + pathlen, addpath, seglen + i);
-
+
/* Always add the trailing slash to a UNC segment
*/
- path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : '/');
pathlen += seglen + 1;
@@ -785,7 +785,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
path[pathlen] = '\0';
/* This call _should_ test the path
*/
- testtype = apr_filepath_root(&testroot, &testpath,
+ testtype = apr_filepath_root(&testroot, &testpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@@ -810,7 +810,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
return APR_ENAMETOOLONG;
memcpy(path + pathlen, addpath, seglen + i);
if (i)
- path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : '/');
pathlen += seglen + i;
}
@@ -823,23 +823,23 @@ APR_DECLARE(apr_status_t) apr_filepath_m
addpath += segend;
}
-
+
/* keptlen will be the baselen unless the addpath contained
* backpath elements. If so, and APR_FILEPATH_NOTABOVEROOT
* is specified (APR_FILEPATH_SECUREROOTTEST was caught above),
- * compare the string beyond the root to assure the result path
- * is still within given basepath. Note that the root path
+ * compare the string beyond the root to assure the result path
+ * is still within given basepath. Note that the root path
* segment is thoroughly tested prior to path parsing.
*/
if ((flags & APR_FILEPATH_NOTABOVEROOT) && baselen) {
if (memcmp(basepath, path + rootlen, baselen) != 0)
return APR_EABOVEROOT;
-
+
/* Ahem... if we have a basepath without a trailing slash,
* we better be sure that /foo wasn't replaced with /foobar!
*/
if (basepath[baselen - 1] != '/' && basepath[baselen - 1] != '\\'
- && path[rootlen + baselen] && path[rootlen + baselen] != '/'
+ && path[rootlen + baselen] && path[rootlen + baselen] != '/'
&& path[rootlen + baselen] != '\\')
return APR_EABOVEROOT;
}
@@ -869,7 +869,7 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
/* Null term for stat! */
path[keptlen + seglen] = '\0';
- if ((rv = apr_stat(&finfo, path,
+ if ((rv = apr_stat(&finfo, path,
APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_NAME, p))
== APR_SUCCESS) {
apr_size_t namelen = strlen(finfo.name);
@@ -881,8 +881,8 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
#else /* WIN32 || NETWARE; here there be aliases that gire and gimble and change length */
- if ((namelen != seglen) ||
- (memcmp(finfo.name, path + keptlen, seglen) != 0))
+ if ((namelen != seglen) ||
+ (memcmp(finfo.name, path + keptlen, seglen) != 0))
{
if (namelen <= seglen) {
memcpy(path + keptlen, finfo.name, namelen);
@@ -909,17 +909,17 @@ APR_DECLARE(apr_status_t) apr_filepath_m
}
#endif /* !OS2 (Whatever that alias was we're over it) */
- /* That's it, the rest is path info.
+ /* That's it, the rest is path info.
* I don't know how we aught to handle this. Should
* we define a new error to indicate 'more info'?
* Should we split out the rest of the path?
*/
- if ((finfo.filetype != APR_DIR) &&
- (finfo.filetype != APR_LNK) && saveslash)
+ if ((finfo.filetype != APR_DIR) &&
+ (finfo.filetype != APR_LNK) && saveslash)
rv = APR_ENOTDIR;
#ifdef XXX_FIGURE_THIS_OUT
{
- /* the example inserts a null between the end of
+ /* the example inserts a null between the end of
* the filename and the next segment, and increments
* the path length so we would return both segments.
*/