Back to index

php5  5.3.10
Classes | Typedefs | Functions
gd_io.h File Reference
#include <stdio.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gdIOCtx

Typedefs

typedef struct gdIOCtx gdIOCtx
typedef struct gdIOCtxgdIOCtxPtr

Functions

void Putword (int w, gdIOCtx *ctx)
void Putchar (int c, gdIOCtx *ctx)
void gdPutC (const unsigned char c, gdIOCtx *ctx)
int gdPutBuf (const void *, int, gdIOCtx *)
void gdPutWord (int w, gdIOCtx *ctx)
void gdPutInt (int w, gdIOCtx *ctx)
int gdGetC (gdIOCtx *ctx)
int gdGetBuf (void *, int, gdIOCtx *)
int gdGetByte (int *result, gdIOCtx *ctx)
int gdGetWord (int *result, gdIOCtx *ctx)
int gdGetInt (int *result, gdIOCtx *ctx)
int gdSeek (gdIOCtx *ctx, const int)
long gdTell (gdIOCtx *ctx)

Typedef Documentation

typedef struct gdIOCtx gdIOCtx
typedef struct gdIOCtx* gdIOCtxPtr

Definition at line 24 of file gd_io.h.


Function Documentation

int gdGetBuf ( void *  ,
int  ,
gdIOCtx  
)

Definition at line 129 of file gd_io.c.

{
       return (ctx->getBuf) (ctx, buf, size);
}

Here is the caller graph for this function:

int gdGetByte ( int result,
gdIOCtx ctx 
)

Definition at line 76 of file gd_io.c.

{
       int r;
       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result = r;
       return 1;
}

Here is the caller graph for this function:

int gdGetC ( gdIOCtx ctx)

Definition at line 71 of file gd_io.c.

{
       return ((ctx->getC) (ctx));
}

Here is the caller graph for this function:

int gdGetInt ( int result,
gdIOCtx ctx 
)

Definition at line 98 of file gd_io.c.

{
       int r;
       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result = r << 24;

       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result += r << 16;

       r = (ctx->getC) (ctx);
       if (r == EOF) {
              return 0;
       }
       *result += r << 8;

       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result += r;

       return 1;
}

Here is the caller graph for this function:

int gdGetWord ( int result,
gdIOCtx ctx 
)

Definition at line 85 of file gd_io.c.

{
       int r;
       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result = r << 8;
       r = (ctx->getC) (ctx);
       GD_IO_EOF_CHK(r);
       *result += r;
       return 1;
}

Here is the caller graph for this function:

int gdPutBuf ( const void *  ,
int  ,
gdIOCtx  
)

Definition at line 122 of file gd_io.c.

{
       IO_DBG (php_gd_error("Putting buf..."));
       return (ctx->putBuf) (ctx, buf, size);
       IO_DBG (php_gd_error("put."));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gdPutC ( const unsigned char  c,
gdIOCtx ctx 
)

Definition at line 48 of file gd_io.c.

{
       (ctx->putC) (ctx, c);
}

Here is the caller graph for this function:

void gdPutInt ( int  w,
gdIOCtx ctx 
)

Definition at line 61 of file gd_io.c.

{
       IO_DBG (php_gd_error("Putting int..."));
       (ctx->putC) (ctx, (unsigned char) (w >> 24));
       (ctx->putC) (ctx, (unsigned char) ((w >> 16) & 0xFF));
       (ctx->putC) (ctx, (unsigned char) ((w >> 8) & 0xFF));
       (ctx->putC) (ctx, (unsigned char) (w & 0xFF));
       IO_DBG (php_gd_error("put."));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gdPutWord ( int  w,
gdIOCtx ctx 
)

Definition at line 53 of file gd_io.c.

{
       IO_DBG (php_gd_error("Putting word..."));
       (ctx->putC) (ctx, (unsigned char) (w >> 8));
       (ctx->putC) (ctx, (unsigned char) (w & 0xFF));
       IO_DBG (php_gd_error("put."));
}

Here is the call graph for this function:

Here is the caller graph for this function:

int gdSeek ( gdIOCtx ctx,
const int   
)

Definition at line 134 of file gd_io.c.

{
       IO_DBG (php_gd_error("Seeking..."));
       return ((ctx->seek) (ctx, pos));
       IO_DBG (php_gd_error("Done."));
}

Here is the call graph for this function:

Here is the caller graph for this function:

long gdTell ( gdIOCtx ctx)

Definition at line 141 of file gd_io.c.

{
       IO_DBG (php_gd_error("Telling..."));
       return ((ctx->tell) (ctx));
       IO_DBG (php_gd_error ("told."));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void Putchar ( int  c,
gdIOCtx ctx 
)

Definition at line 43 of file gd_io.c.

{
       (ctx->putC) (ctx, c & 0xff);
}
void Putword ( int  w,
gdIOCtx ctx 
)

Definition at line 34 of file gd_io.c.

{
       unsigned char buf[2];

       buf[0] = w & 0xff;
       buf[1] = (w / 256) & 0xff;
       (ctx->putBuf) (ctx, (char *) buf, 2);
}