diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-28 21:19:20 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-28 21:19:20 -0400 |
commit | 19c7a5d6512dcf4d0b0e6db797d754a8e281a6aa (patch) | |
tree | 87f92b9913d8b66748cde1b03dd26a8797cb23a8 /src/gd_io_stream.cxx | |
parent | df8f98982552112039f66b5f1639599e423c6800 (diff) | |
download | libgd-19c7a5d6512dcf4d0b0e6db797d754a8e281a6aa.tar.gz |
use gdIOCtxPtr more consistently
We have gdIOCtxPtr for gdIOCtx*, so switch the public headers to it
consistently.
Diffstat (limited to 'src/gd_io_stream.cxx')
-rw-r--r-- | src/gd_io_stream.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gd_io_stream.cxx b/src/gd_io_stream.cxx index 0d64c72..603780e 100644 --- a/src/gd_io_stream.cxx +++ b/src/gd_io_stream.cxx @@ -25,7 +25,7 @@ If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero). */ -int istreamIOCtx::Getbuf (struct gdIOCtx * ctx, void * buf, int size) +int istreamIOCtx::Getbuf(gdIOCtxPtr ctx, void *buf, int size) { stream_type * _str = ( (istreamIOCtx * ) ctx )->_M_stream; _str->read((char * )buf, size); @@ -36,7 +36,7 @@ int istreamIOCtx::Getbuf (struct gdIOCtx * ctx, void * buf, int size) If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero). */ -int istreamIOCtx::Putbuf (struct gdIOCtx * , const void * , int ) +int istreamIOCtx::Putbuf(gdIOCtxPtr, const void *, int) { return 0; } @@ -44,7 +44,7 @@ int istreamIOCtx::Putbuf (struct gdIOCtx * , const void * , int ) /** Reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error. */ -int istreamIOCtx::Getchar (struct gdIOCtx * ctx) +int istreamIOCtx::Getchar(gdIOCtxPtr ctx) { stream_type * _str = ( (istreamIOCtx * ) ctx )->_M_stream; return _str->get(); @@ -52,14 +52,14 @@ int istreamIOCtx::Getchar (struct gdIOCtx * ctx) /** Write the character to stream Character is cast to unsigned char before writing */ -void istreamIOCtx::Putchar (struct gdIOCtx * , int ) +void istreamIOCtx::Putchar(gdIOCtxPtr, int) { } /** Seek to position offset from the beginning of the stream must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */ -int istreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos) +int istreamIOCtx::Seek(gdIOCtxPtr ctx, const int pos) { stream_type * _str = ( (istreamIOCtx * ) ctx )->_M_stream; _str->seekg(pos); @@ -68,14 +68,14 @@ int istreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos) /** Obtains the current value of the stream position. Returns -1 on error. */ -long istreamIOCtx::Tell (struct gdIOCtx * ctx) +long istreamIOCtx::Tell(gdIOCtxPtr ctx) { stream_type * _str = ( (istreamIOCtx * ) ctx )->_M_stream; return _str->tellg(); } /** Deallocate the context */ -void istreamIOCtx::FreeCtx (struct gdIOCtx * ctx) +void istreamIOCtx::FreeCtx(gdIOCtxPtr ctx) { delete (istreamIOCtx * )ctx; } @@ -85,7 +85,7 @@ void istreamIOCtx::FreeCtx (struct gdIOCtx * ctx) If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero). */ -int ostreamIOCtx::Getbuf (struct gdIOCtx * , void * , int ) +int ostreamIOCtx::Getbuf(gdIOCtxPtr, void *, int) { return 0; } @@ -94,7 +94,7 @@ int ostreamIOCtx::Getbuf (struct gdIOCtx * , void * , int ) If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero). */ -int ostreamIOCtx::Putbuf (struct gdIOCtx * ctx, const void * buf, int size) +int ostreamIOCtx::Putbuf(gdIOCtxPtr ctx, const void * buf, int size) { stream_type * _str = ( (ostreamIOCtx * ) ctx )->_M_stream; _str->write((const char * )buf, size); @@ -104,14 +104,14 @@ int ostreamIOCtx::Putbuf (struct gdIOCtx * ctx, const void * buf, int size) /** Reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error. */ -int ostreamIOCtx::Getchar (struct gdIOCtx * ) +int ostreamIOCtx::Getchar(gdIOCtxPtr) { return EOF; } /** Write the character to stream Character is cast to unsigned char before writing */ -void ostreamIOCtx::Putchar (struct gdIOCtx * ctx, int c) +void ostreamIOCtx::Putchar(gdIOCtxPtr ctx, int c) { stream_type * _str = ( (ostreamIOCtx * ) ctx )->_M_stream; _str->put((char)c); @@ -120,7 +120,7 @@ void ostreamIOCtx::Putchar (struct gdIOCtx * ctx, int c) /** Seek to position offset from the beginning of the stream must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */ -int ostreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos) +int ostreamIOCtx::Seek(gdIOCtxPtr ctx, const int pos) { stream_type * _str = ( (ostreamIOCtx * ) ctx )->_M_stream; _str->seekp(pos); @@ -129,14 +129,14 @@ int ostreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos) /** Obtains the current value of the stream position. Returns -1 on error. */ -long ostreamIOCtx::Tell (struct gdIOCtx * ctx) +long ostreamIOCtx::Tell(gdIOCtxPtr ctx) { stream_type * _str = ( (ostreamIOCtx * ) ctx )->_M_stream; return _str->tellp(); } /** Deallocate the context */ -void ostreamIOCtx::FreeCtx (struct gdIOCtx * ctx) +void ostreamIOCtx::FreeCtx(gdIOCtxPtr ctx) { delete (ostreamIOCtx * )ctx; } |