Main Page   Modules   Compound List   File List   Compound Members   File Members  

endian_io.h File Reference

#include <gandalf/common/misc_defs.h>

Go to the source code of this file.

Functions

Gan_Bool gan_fread_lendian_i16 (FILE *fp, gan_i16 *aui16, size_t nitems)
 Reads an array of signed 16-bit integers from a file.

Gan_Bool gan_fwrite_lendian_i16 (FILE *fp, gan_i16 *aui16, size_t nitems)
 Writes an array of signed 16-bit integers to a file.

Gan_Bool gan_fread_lendian_ui16 (FILE *fp, gan_ui16 *aui16, size_t nitems)
 Reads an array of unsigned 16-bit integers from a file.

Gan_Bool gan_fwrite_lendian_ui16 (FILE *fp, gan_ui16 *aui16, size_t nitems)
 Writes an array of unsigned 16-bit integers to a file.

Gan_Bool gan_fread_lendian_i32 (FILE *fp, gan_i32 *aui32, size_t nitems)
 Reads an array of signed 32-bit integers from a file.

Gan_Bool gan_fwrite_lendian_i32 (FILE *fp, gan_i32 *aui32, size_t nitems)
 Writes an array of signed 32-bit integers to a file.

Gan_Bool gan_fread_lendian_ui32 (FILE *fp, gan_ui32 *aui32, size_t nitems)
 Reads an array of unsigned 32-bit integers from a file.

Gan_Bool gan_fwrite_lendian_ui32 (FILE *fp, gan_ui32 *aui32, size_t nitems)
 Writes an array of unsigned 32-bit integers to a file.

Gan_Bool gan_fread_lendian_f (FILE *fp, float *af, size_t nitems)
 Reads an array of floats from a file.

Gan_Bool gan_fwrite_lendian_f (FILE *fp, float *af, size_t nitems)
 Writes an array of floats to a file.

Gan_Bool gan_fread_lendian_d (FILE *fp, double *ad, size_t nitems)
 Reads an array of doubles from a file.

Gan_Bool gan_fwrite_lendian_d (FILE *fp, double *ad, size_t nitems)
 Writes an array of doubles to a file.

Gan_Bool gan_fread_lendian_s (FILE *fp, short *as, size_t nitems)
 Macro: Reads an array of signed short integers from a file.

Gan_Bool gan_fwrite_lendian_s (FILE *fp, short *as, size_t nitems)
 Macro: Writes an array of signed short integers to a file.

Gan_Bool gan_fread_lendian_us (FILE *fp, unsigned short *aus, size_t nitems)
 Macro: Reads an array of unsigned short integers from a file.

Gan_Bool gan_fwrite_lendian_us (FILE *fp, unsigned short *aus, size_t nitems)
 Macro: Writes an array of unsigned short integers to a file.

Gan_Bool gan_fread_lendian_i (FILE *fp, int *ai, size_t nitems)
 Macro: Reads an array of signed integers from a file.

Gan_Bool gan_fwrite_lendian_i (FILE *fp, int *ai, size_t nitems)
 Macro: Writes an array of signed integers to a file.

Gan_Bool gan_fread_lendian_ui (FILE *fp, unsigned *aui, size_t nitems)
 Macro: Reads an array of unsigned integers from a file.

Gan_Bool gan_fwrite_lendian_ui (FILE *fp, unsigned *aui, size_t nitems)
 Macro: Writes an array of unsigned integers to a file.

Gan_Bool gan_fread_lendian_l (FILE *fp, long *al, size_t nitems)
 Macro: Reads an array of signed long integers from a file.

Gan_Bool gan_fwrite_lendian_l (FILE *fp, long *al, size_t nitems)
 Macro: Writes an array of signed long integers to a file.

Gan_Bool gan_fread_lendian_ul (FILE *fp, unsigned long *aul, size_t nitems)
 Macro: Reads an array of unsigned long integers from a file.

Gan_Bool gan_fwrite_lendian_ul (FILE *fp, unsigned long *aul, size_t nitems)
 Macro: Writes an array of unsigned long integers to a file.


Detailed Description

Module: Little and big-endian I/O for architecture independent I/O

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

Gan_Bool gan_fread_lendian_d FILE *    fp,
double *    ad,
size_t    nitems
 

Reads an array of doubles from a file.

Parameters:
fp Pointer to a binary file opened for reading
ad Array of doubles
nitems The number of values to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Reads an array of doubles from a file in little-endian byte order.

Gan_Bool gan_fread_lendian_f FILE *    fp,
float *    af,
size_t    nitems
 

Reads an array of floats from a file.

Parameters:
fp Pointer to a binary file opened for reading
af Array of floats
nitems The number of integers to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Reads an array of floats from a file in little-endian byte order.

Gan_Bool gan_fread_lendian_i16 FILE *    fp,
gan_i16 *    ai16,
size_t    nitems
 

Reads an array of signed 16-bit integers from a file.

Parameters:
fp Pointer to a binary file opened for reading
ai16 Array of integers
nitems The number of integers to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Reads an array of signed 16-bit integers from a file in little-endian byte order.

Gan_Bool gan_fread_lendian_i32 FILE *    fp,
gan_i32 *    ai32,
size_t    nitems
 

Reads an array of signed 32-bit integers from a file.

Parameters:
fp Pointer to a binary file opened for reading
ai32 Array of integers
nitems The number of integers to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Reads an array of signed 32-bit integers from a file in little-endian byte order.

Gan_Bool gan_fread_lendian_ui16 FILE *    fp,
gan_ui16 *    aui16,
size_t    nitems
 

Reads an array of unsigned 16-bit integers from a file.

Parameters:
fp Pointer to a binary file opened for reading
aui16 Array of integers
nitems The number of integers to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.

GAN_TRUE on success, GAN_FALSE on failure.

Reads an array of unsigned 16-bit integers from a file in little-endian byte order.

Gan_Bool gan_fread_lendian_ui32 FILE *    fp,
gan_ui32 *    aui32,
size_t    nitems
 

Reads an array of unsigned 32-bit integers from a file.

Parameters:
fp Pointer to a binary file opened for reading
aui32 Array of integers
nitems The number of integers to be read into the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Reads an array of unsigned 32-bit integers from a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_d FILE *    fp,
double *    ad,
size_t    nitems
 

Writes an array of doubles to a file.

Parameters:
fp Pointer to a binary file opened for writing
ad Array of doubles
nitems The number of values to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of doubles to a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_f FILE *    fp,
float *    af,
size_t    nitems
 

Writes an array of floats to a file.

Parameters:
fp Pointer to a binary file opened for writing
af Array of floats
nitems The number of integers to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of floats to a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_i16 FILE *    fp,
gan_i16 *    ai16,
size_t    nitems
 

Writes an array of signed 16-bit integers to a file.

Parameters:
fp Pointer to a binary file opened for reading
ai16 Array of integers
nitems The number of integers to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of signed 16-bit integers to a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_i32 FILE *    fp,
gan_i32 *    ai32,
size_t    nitems
 

Writes an array of signed 32-bit integers to a file.

Parameters:
fp Pointer to a binary file opened for reading
ai32 Array of integers
nitems The number of integers to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of signed 32-bit integers to a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_ui16 FILE *    fp,
gan_ui16 *    aui16,
size_t    nitems
 

Writes an array of unsigned 16-bit integers to a file.

Parameters:
fp Pointer to a binary file opened for reading
aui16 Array of integers
nitems The number of integers to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of unsigned 16-bit integers to a file in little-endian byte order.

Gan_Bool gan_fwrite_lendian_ui32 FILE *    fp,
gan_ui32 *    aui32,
size_t    nitems
 

Writes an array of unsigned 32-bit integers to a file.

Parameters:
fp Pointer to a binary file opened for reading
aui32 Array of integers
nitems The number of integers to be written from the array
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Writes an array of unsigned 32-bit integers to a file in little-endian byte order.


Generated on Mon Oct 13 16:14:41 2003 by doxygen1.3-rc1