summaryrefslogtreecommitdiff
path: root/file_io/os2
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-04-03 17:14:11 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-04-03 17:14:11 +0000
commite675453044d65b2da994396284e37db866e26d41 (patch)
treefa1108bd3c18613f0a90b5964f03ed8d8def4bd2 /file_io/os2
parentab9365209a4f4c8b5faa91bb6f4ebb38cfbd23f8 (diff)
downloadlibapr-e675453044d65b2da994396284e37db866e26d41.tar.gz
Change struct file_t to struct ap_file_t. This clarifies things a bit that
APR defines both the struct and typedef's it. This is also the way things should have been coded originally, so this just fixes it. Expect more of these patches today. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59768 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2')
-rw-r--r--file_io/os2/fileacc.c8
-rw-r--r--file_io/os2/filedup.c6
-rw-r--r--file_io/os2/fileio.h2
-rw-r--r--file_io/os2/filestat.c2
-rw-r--r--file_io/os2/open.c16
-rw-r--r--file_io/os2/pipe.c8
-rw-r--r--file_io/os2/readwrite.c8
-rw-r--r--file_io/os2/seek.c4
8 files changed, 27 insertions, 27 deletions
diff --git a/file_io/os2/fileacc.c b/file_io/os2/fileacc.c
index 0090c5d5e..505518661 100644
--- a/file_io/os2/fileacc.c
+++ b/file_io/os2/fileacc.c
@@ -60,9 +60,9 @@
#include <string.h>
#include <sys/types.h>
-/* A file to put ALL of the accessor functions for struct file_t types. */
+/* A file to put ALL of the accessor functions for struct ap_file_t types. */
-ap_status_t ap_get_filename(char **new, struct file_t *thefile)
+ap_status_t ap_get_filename(char **new, struct ap_file_t *thefile)
{
if (thefile != NULL) {
*new = ap_pstrdup(thefile->cntxt, thefile->fname);
@@ -75,7 +75,7 @@ ap_status_t ap_get_filename(char **new, struct file_t *thefile)
-ap_status_t ap_get_filedata(void **data, char *key, struct file_t *file)
+ap_status_t ap_get_filedata(void **data, char *key, struct ap_file_t *file)
{
if (file != NULL) {
return ap_get_userdata(data, key, file->cntxt);
@@ -88,7 +88,7 @@ ap_status_t ap_get_filedata(void **data, char *key, struct file_t *file)
-ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
+ap_status_t ap_set_filedata(struct ap_file_t *file, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (file != NULL) {
diff --git a/file_io/os2/filedup.c b/file_io/os2/filedup.c
index b04d09285..52f707cbb 100644
--- a/file_io/os2/filedup.c
+++ b/file_io/os2/filedup.c
@@ -60,13 +60,13 @@
#define INCL_DOS
#include <os2.h>
-ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file)
+ap_status_t ap_dupfile(struct ap_file_t **new_file, struct ap_file_t *old_file)
{
int rv;
- struct file_t *dup_file;
+ struct ap_file_t *dup_file;
if (*new_file == NULL) {
- dup_file = (struct file_t *)ap_palloc(old_file->cntxt, sizeof(struct file_t));
+ dup_file = (struct ap_file_t *)ap_palloc(old_file->cntxt, sizeof(struct ap_file_t));
if (dup_file == NULL) {
return APR_ENOMEM;
diff --git a/file_io/os2/fileio.h b/file_io/os2/fileio.h
index 9965cdc39..1706c95dc 100644
--- a/file_io/os2/fileio.h
+++ b/file_io/os2/fileio.h
@@ -65,7 +65,7 @@
#define APR_FILE_BUFSIZE 4096
-struct file_t {
+struct ap_file_t {
ap_context_t *cntxt;
HFILE filedes;
char * fname;
diff --git a/file_io/os2/filestat.c b/file_io/os2/filestat.c
index ef02677c8..151951f2e 100644
--- a/file_io/os2/filestat.c
+++ b/file_io/os2/filestat.c
@@ -109,7 +109,7 @@ static ap_status_t handle_type(ap_filetype_e *ftype, HFILE file)
-ap_status_t ap_getfileinfo(ap_finfo_t *finfo, struct file_t *thefile)
+ap_status_t ap_getfileinfo(ap_finfo_t *finfo, struct ap_file_t *thefile)
{
ULONG rc;
FILESTATUS3 fstatus;
diff --git a/file_io/os2/open.c b/file_io/os2/open.c
index d0dedff4c..2914903ad 100644
--- a/file_io/os2/open.c
+++ b/file_io/os2/open.c
@@ -63,19 +63,19 @@
ap_status_t apr_file_cleanup(void *thefile)
{
- struct file_t *file = thefile;
+ struct ap_file_t *file = thefile;
return ap_close(file);
}
-ap_status_t ap_open(struct file_t **new, const char *fname, ap_int32_t flag, ap_fileperms_t perm, ap_context_t *cntxt)
+ap_status_t ap_open(struct ap_file_t **new, const char *fname, ap_int32_t flag, ap_fileperms_t perm, ap_context_t *cntxt)
{
int oflags = 0;
int mflags = OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYNONE;
int rv;
ULONG action;
- ap_file_t *dafile = (struct file_t *)ap_palloc(cntxt, sizeof(struct file_t));
+ ap_file_t *dafile = (struct ap_file_t *)ap_palloc(cntxt, sizeof(struct ap_file_t));
*new = dafile;
dafile->cntxt = cntxt;
@@ -179,7 +179,7 @@ ap_status_t ap_remove_file(char *path, ap_context_t *cntxt)
-ap_status_t ap_get_os_file(ap_os_file_t *thefile, struct file_t *file)
+ap_status_t ap_get_os_file(ap_os_file_t *thefile, struct ap_file_t *file)
{
if (file == NULL) {
return APR_ENOFILE;
@@ -191,11 +191,11 @@ ap_status_t ap_get_os_file(ap_os_file_t *thefile, struct file_t *file)
-ap_status_t ap_put_os_file(struct file_t **file, ap_os_file_t *thefile, ap_context_t *cont)
+ap_status_t ap_put_os_file(struct ap_file_t **file, ap_os_file_t *thefile, ap_context_t *cont)
{
ap_os_file_t *dafile = thefile;
if ((*file) == NULL) {
- (*file) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
+ (*file) = (struct ap_file_t *)ap_palloc(cont, sizeof(struct ap_file_t));
(*file)->cntxt = cont;
}
(*file)->filedes = *dafile;
@@ -218,9 +218,9 @@ ap_status_t ap_eof(ap_file_t *fptr)
-ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
+ap_status_t ap_open_stderr(struct ap_file_t **thefile, ap_context_t *cont)
{
- (*thefile) = ap_palloc(cont, sizeof(struct file_t));
+ (*thefile) = ap_palloc(cont, sizeof(struct ap_file_t));
if ((*thefile) == NULL) {
return APR_ENOMEM;
}
diff --git a/file_io/os2/pipe.c b/file_io/os2/pipe.c
index e862c3f66..2bf002e1c 100644
--- a/file_io/os2/pipe.c
+++ b/file_io/os2/pipe.c
@@ -58,7 +58,7 @@
#include "apr_lib.h"
#include <string.h>
-ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t *cont)
+ap_status_t ap_create_pipe(struct ap_file_t **in, struct ap_file_t **out, ap_context_t *cont)
{
ULONG filedes[2];
ULONG rc;
@@ -69,7 +69,7 @@ ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t
return os2errno(rc);
}
- (*in) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
+ (*in) = (struct ap_file_t *)ap_palloc(cont, sizeof(struct ap_file_t));
(*in)->cntxt = cont;
(*in)->filedes = filedes[0];
(*in)->fname = ap_pstrdup(cont, "PIPE");
@@ -78,7 +78,7 @@ ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t
(*in)->flags = 0;
ap_register_cleanup(cont, *in, apr_file_cleanup, ap_null_cleanup);
- (*out) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
+ (*out) = (struct ap_file_t *)ap_palloc(cont, sizeof(struct ap_file_t));
(*out)->cntxt = cont;
(*out)->filedes = filedes[1];
(*out)->fname = ap_pstrdup(cont, "PIPE");
@@ -100,7 +100,7 @@ ap_status_t ap_create_namedpipe(char *filename, ap_fileperms_t perm, ap_context_
-ap_status_t ap_set_pipe_timeout(struct file_t *thepipe, ap_int32_t timeout)
+ap_status_t ap_set_pipe_timeout(struct ap_file_t *thepipe, ap_int32_t timeout)
{
return APR_ENOTIMPL;
}
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index 40c2bdba2..e5dcdd91a 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -60,7 +60,7 @@
#include <os2.h>
#include <malloc.h>
-ap_status_t ap_read(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
+ap_status_t ap_read(struct ap_file_t *thefile, void *buf, ap_ssize_t *nbytes)
{
ULONG rc = 0;
ULONG bytesread;
@@ -126,7 +126,7 @@ ap_status_t ap_read(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
-ap_status_t ap_write(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
+ap_status_t ap_write(struct ap_file_t *thefile, void *buf, ap_ssize_t *nbytes)
{
ULONG rc = 0;
ULONG byteswritten;
@@ -182,7 +182,7 @@ ap_status_t ap_write(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
#ifdef HAVE_WRITEV
-ap_status_t ap_writev(struct file_t *thefile, const struct iovec *vec, ap_size_t nvec, ap_ssize_t *nbytes)
+ap_status_t ap_writev(struct ap_file_t *thefile, const struct iovec *vec, ap_size_t nvec, ap_ssize_t *nbytes)
{
int bytes;
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
@@ -313,7 +313,7 @@ ap_status_t ap_fgets(char *str, int len, ap_file_t *thefile)
-API_EXPORT(int) ap_fprintf(struct file_t *fptr, const char *format, ...)
+API_EXPORT(int) ap_fprintf(struct ap_file_t *fptr, const char *format, ...)
{
int cc;
va_list ap;
diff --git a/file_io/os2/seek.c b/file_io/os2/seek.c
index 2a6c41ece..bc8863345 100644
--- a/file_io/os2/seek.c
+++ b/file_io/os2/seek.c
@@ -65,7 +65,7 @@ int os2errno( ULONG oserror );
-static ap_status_t setptr(struct file_t *thefile, unsigned long pos )
+static ap_status_t setptr(struct ap_file_t *thefile, unsigned long pos )
{
long newbufpos;
ULONG rc;
@@ -91,7 +91,7 @@ static ap_status_t setptr(struct file_t *thefile, unsigned long pos )
-ap_status_t ap_seek(struct file_t *thefile, ap_seek_where_t where, ap_off_t *offset)
+ap_status_t ap_seek(struct ap_file_t *thefile, ap_seek_where_t where, ap_off_t *offset)
{
if (!thefile->isopen) {
return APR_EBADF;