aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-09 12:33:39 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-09 12:33:39 +0000
commit542f5e01cacce53f8106d4a0020a68c525c8950c (patch)
treef25ee851c87702f1bfea84cb86c64c10593374a9 /libio/iofopncook.c
parentUpdate. (diff)
downloadglibc-542f5e01cacce53f8106d4a0020a68c525c8950c.tar.gz
glibc-542f5e01cacce53f8106d4a0020a68c525c8950c.tar.bz2
glibc-542f5e01cacce53f8106d4a0020a68c525c8950c.zip
Update.
* libio/iofopncook.c: Adjust for renaming of structure elements. * libio/libio.h: Define cookie functions with all the names.
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r--libio/iofopncook.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index 7820fa325a..f26744f39d 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -46,10 +46,10 @@ _IO_cookie_read (fp, buf, size)
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
- if (cfile->io_functions.read == NULL)
+ if (cfile->__io_functions.read == NULL)
return -1;
- return cfile->io_functions.read (cfile->cookie, buf, size);
+ return cfile->__io_functions.read (cfile->__cookie, buf, size);
}
static _IO_ssize_t
@@ -60,10 +60,10 @@ _IO_cookie_write (fp, buf, size)
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
- if (cfile->io_functions.write == NULL)
+ if (cfile->__io_functions.write == NULL)
return -1;
- return cfile->io_functions.write (cfile->cookie, buf, size);
+ return cfile->__io_functions.write (cfile->__cookie, buf, size);
}
static _IO_fpos64_t
@@ -73,15 +73,11 @@ _IO_cookie_seek (fp, offset, dir)
int dir;
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
- _IO_fpos64_t pos;
- if (cfile->io_functions.seek == NULL)
+ if (cfile->__io_functions.seek == NULL)
return _IO_pos_BAD;
- pos = _IO_pos_0;
- _IO_pos_adjust (pos, offset);
-
- return cfile->io_functions.seek (cfile->cookie, pos, dir);
+ return cfile->__io_functions.seek (cfile->__cookie, offset, dir);
}
static int
@@ -90,10 +86,10 @@ _IO_cookie_close (fp)
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
- if (cfile->io_functions.close == NULL)
+ if (cfile->__io_functions.close == NULL)
return 0;
- return cfile->io_functions.close (cfile->cookie);
+ return cfile->__io_functions.close (cfile->__cookie);
}
@@ -157,19 +153,19 @@ fopencookie (cookie, mode, io_functions)
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
- new_f->cfile.file._lock = &new_f->lock;
+ new_f->cfile.__file._lock = &new_f->lock;
#endif
- _IO_init (&new_f->cfile.file, 0);
- _IO_JUMPS (&new_f->cfile.file) = &_IO_cookie_jumps;
- new_f->cfile.cookie = cookie;
- new_f->cfile.io_functions = io_functions;
+ _IO_init (&new_f->cfile.__file, 0);
+ _IO_JUMPS (&new_f->cfile.__file) = &_IO_cookie_jumps;
+ new_f->cfile.__cookie = cookie;
+ new_f->cfile.__io_functions = io_functions;
- _IO_file_init(&new_f->cfile.file);
+ _IO_file_init(&new_f->cfile.__file);
- new_f->cfile.file._IO_file_flags =
- _IO_mask_flags (&new_f->cfile.file, read_write,
+ new_f->cfile.__file._IO_file_flags =
+ _IO_mask_flags (&new_f->cfile.__file, read_write,
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
- return &new_f->cfile.file;
+ return &new_f->cfile.__file;
}