spBase
Loading...
Searching...
No Matches
File I/O

File Size

spFileOffset spGetFileSize (const char *filename, long headsize)
 
long spGetTextFileSize (const char *filename)
 
void spFSkipHeader (long headsize, FILE *fp)
 
long spFSkipByte (long len, FILE *fp)
 
#define spGetSignalLength(filename, headsize, type)   (spGetFileSize(filename, headsize) / (spFileOffset)sizeof(type))
 
#define spFSkipData(len, fp, type)   (spFSkipByte((len) * (long)sizeof(type), fp) / (long)sizeof(type))
 

Data Shift

void spShiftShort (short *data, long length, long shift)
 
void spShiftLong (long *data, long length, long shift)
 
void spShiftFloat (float *data, long length, long shift)
 
void spShiftDouble (double *data, long length, long shift)
 

Data Swap

void spSwapByte (void *data, long length, int samp_byte)
 
void spSwapShort (short *data, long length)
 
void spSwapLong (long *data, long length)
 
void spSwapLong32 (spLong32 *data, long length)
 
void spSwapULong32 (spULong32 *data, long length)
 
void spSwapFloat (float *data, long length)
 
void spSwapDouble (double *data, long length)
 
void spSwapLong64 (spLong64 *data, long length)
 
void spSwapULong64 (spULong64 *data, long length)
 

Read

long spFReadShort (short *data, long length, int swap, FILE *fp)
 
long spFReadLong (long *data, long length, int swap, FILE *fp)
 
long spFReadLong32 (long *data, long length, int swap, FILE *fp)
 
long spFReadULong32 (unsigned long *data, long length, int swap, FILE *fp)
 
long spFReadLong32Direct (spLong32 *data, long length, int swap, FILE *fp)
 
long spFReadULong32Direct (spULong32 *data, long length, int swap, FILE *fp)
 
long spFReadLong24 (long *data, long length, int swap, FILE *fp)
 
long spFReadULong24 (unsigned long *data, long length, int swap, FILE *fp)
 
long spFReadLong64 (spLong64 *data, long length, int swap, FILE *fp)
 
long spFReadULong64 (spULong64 *data, long length, int swap, FILE *fp)
 
long spFReadFloatWeighted (float *data, long length, float weight, int swap, FILE *fp)
 
long spFReadFloat (float *data, long length, int swap, FILE *fp)
 
long spFReadDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadByte (short *data, long length, FILE *fp)
 
long spFReadSignedByte (short *data, long length, FILE *fp)
 
long spFReadULaw (short *data, long length, FILE *fp)
 
long spFReadALaw (short *data, long length, FILE *fp)
 
long spFReadINT8 (spINT8 *data, long length, FILE *fp)
 
long spFReadINT16 (spINT16 *data, long length, FILE *fp)
 
long spFReadBYTE (spBYTE *data, long length, FILE *fp)
 
long spFReadWORD (spWORD *data, long length, FILE *fp)
 
long spFReadLONG (spLONG *data, long length, FILE *fp)
 
long spFReadULONG (spULONG *data, long length, FILE *fp)
 
long spFReadShortToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadShortToDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadLongToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadLongToDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadLong32ToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadLong32ToDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadLong24ToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadLong24ToDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadFloatToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFReadFloatToDouble (double *data, long length, int swap, FILE *fp)
 
long spFReadBitToDoubleWeighted (double *data, long length, double weight, int samp_bit, int swap, FILE *fp)
 
long spFReadBitToDouble (double *data, long length, double max, int samp_bit, int swap, FILE *fp)
 
#define spFReadDWORD(data, length, fp)   spFReadULONG(data, length, fp)
 

Write

long spFWriteShort (short *data, long length, int swap, FILE *fp)
 
long spFWriteLong (long *data, long length, int swap, FILE *fp)
 
long spFWriteLong32 (long *data, long length, int swap, FILE *fp)
 
long spFWriteULong32 (unsigned long *data, long length, int swap, FILE *fp)
 
long spFWriteLong32Direct (spLong32 *data, long length, int swap, FILE *fp)
 
long spFWriteULong32Direct (spULong32 *data, long length, int swap, FILE *fp)
 
long spFWriteLong24 (long *data, long length, int swap, FILE *fp)
 
long spFWriteULong24 (unsigned long *data, long length, int swap, FILE *fp)
 
long spFWriteLong64 (spLong64 *data, long length, int swap, FILE *fp)
 
long spFWriteULong64 (spULong64 *data, long length, int swap, FILE *fp)
 
long spFWriteFloatWeighted (float *data, long length, float weight, int swap, FILE *fp)
 
long spFWriteFloat (float *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDouble (double *data, long length, int swap, FILE *fp)
 
long spFWriteByte (short *data, long length, FILE *fp)
 
long spFWriteSignedByte (short *data, long length, FILE *fp)
 
long spFWriteULaw (short *data, long length, FILE *fp)
 
long spFWriteALaw (short *data, long length, FILE *fp)
 
long spFWriteINT8 (spINT8 *data, long length, FILE *fp)
 
long spFWriteINT16 (spINT16 *data, long length, FILE *fp)
 
long spFWriteBYTE (spBYTE *data, long length, FILE *fp)
 
long spFWriteWORD (spWORD *data, long length, FILE *fp)
 
long spFWriteLONG (spLONG *data, long length, FILE *fp)
 
long spFWriteULONG (spULONG *data, long length, FILE *fp)
 
long spFWriteDoubleToShortWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDoubleToShort (double *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleToLongWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDoubleToLong (double *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleToLong32Weighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDoubleToLong32 (double *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleToLong24Weighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDoubleToLong24 (double *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleToFloatWeighted (double *data, long length, double weight, int swap, FILE *fp)
 
long spFWriteDoubleToFloat (double *data, long length, int swap, FILE *fp)
 
long spFWriteDoubleToBitWeighted (double *data, long length, double weight, int samp_bit, int swap, FILE *fp)
 
long spFWriteDoubleToBit (double *data, long length, double max, int samp_bit, int swap, FILE *fp)
 
long spFWriteLong32ToShort (long *data, long length, int swap, FILE *fp)
 
long spFWriteLong24ToShort (long *data, long length, int swap, FILE *fp)
 
#define spFWriteDWORD(data, length, fp)   spFWriteULONG(data, length, fp)
 

Interleave and Deinterleave

long _spInterleaveData (char *ddata, long dlength, char *idata, long ilength, int num_channel, int samp_byte)
 
long _spDeinterleaveData (char *idata, long ilength, char *ddata, long dlength, int num_channel, int samp_byte)
 
#define spInterleaveData(ddata, dlength, idata, ilength, num_channel, type)   _spInterleaveData((char *)(ddata), dlength, (char *)(idata), ilength, num_channel, sizeof(type))
 
#define spInterleaveShort(ddata, dlength, idata, ilength, num_channel)   spInterleaveData(ddata, dlength, idata, ilength, num_channel, short)
 
#define spInterleaveLong(ddata, dlength, idata, ilength, num_channel)   spInterleaveData(ddata, dlength, idata, ilength, num_channel, long)
 
#define spInterleaveLong32(ddata, dlength, idata, ilength, num_channel)   spInterleaveData(ddata, dlength, idata, ilength, num_channel, spLong32)
 
#define spInterleaveFloat(ddata, dlength, idata, ilength, num_channel)   spInterleaveData(ddata, dlength, idata, ilength, num_channel, float)
 
#define spInterleaveDouble(ddata, dlength, idata, ilength, num_channel)   spInterleaveData(ddata, dlength, idata, ilength, num_channel, double)
 
#define spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, type)   _spDeinterleaveData((char *)(idata), ilength, (char *)(ddata), dlength, num_channel, sizeof(type))
 
#define spDeinterleaveShort(idata, ilength, ddata, dlength, num_channel)   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, short)
 
#define spDeinterleaveLong(idata, ilength, ddata, dlength, num_channel)   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, long)
 
#define spDeinterleaveLong32(idata, ilength, ddata, dlength, num_channel)   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, spLong32)
 
#define spDeinterleaveFloat(idata, ilength, ddata, dlength, num_channel)   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, float)
 
#define spDeinterleaveDouble(idata, ilength, ddata, dlength, num_channel)   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, double)
 

Text I/O

int spGetNumRow (const char *filename)
 
int spGetNumColumn (const char *filename)
 
int spGetCSVNumRow (const char *filename)
 
int spGetCSVNumColumn (const char *filename)
 
int spFGetNColumn (char *buf, int size, int col, FILE *fp)
 
int spFGetColumn (char *buf, int col, FILE *fp)
 
int spSGetNColumn (char *buf, int size, int col, const char *line)
 
int spSGetColumn (char *buf, int col, const char *line)
 
char * spSGetNextNColumn (char *buf, int size, const char *line)
 
int spFGetCSVNColumn (char *buf, int size, int col, FILE *fp)
 
int spSGetCSVNColumn (char *buf, int size, int col, const char *line)
 
char * spSGetNextCSVNColumn (char *buf, int size, const char *line)
 
int spFGetNLine (char *buf, int size, FILE *fp)
 
int spFGetLine (char *buf, FILE *fp)
 
int spGetNLine (char *buf, int size)
 
int spGetLine (char *buf)
 
int spFPutLine (const char *input, FILE *fp)
 
int spSPutLine (const char *input, char *line, int size)
 
int spFPutString (const char *input, FILE *fp)
 
int spSPutString (const char *input, char *line, int size)
 
char * spFGetNString (char *buf, int size, FILE *fp)
 
char * spGetNString (char *buf, int size)
 
char * spSGetNString (char *buf, int size, const char *string)
 
int spSScanNSetup (const char *line, char *name, int namelen, char *value, int valuelen)
 
int spSScanSetup (const char *line, char *name, char *value)
 

Detailed Description

Macro Definition Documentation

◆ spGetSignalLength

#define spGetSignalLength ( filename,
headsize,
type )   (spGetFileSize(filename, headsize) / (spFileOffset)sizeof(type))

Gets the length of the signal file.

◆ spFSkipData

#define spFSkipData ( len,
fp,
type )   (spFSkipByte((len) * (long)sizeof(type), fp) / (long)sizeof(type))

Skips a part of the signal file. The origin of this function call is the current position of the file pointer.

◆ spFReadDWORD

#define spFReadDWORD ( data,
length,
fp )   spFReadULONG(data, length, fp)

Reads data of DWORD type on Windows from the binary file.

◆ spFWriteDWORD

#define spFWriteDWORD ( data,
length,
fp )   spFWriteULONG(data, length, fp)

Writes data as DWORD type on Windows to the binary file.

◆ spInterleaveData

#define spInterleaveData ( ddata,
dlength,
idata,
ilength,
num_channel,
type )   _spInterleaveData((char *)(ddata), dlength, (char *)(idata), ilength, num_channel, sizeof(type))

Interleaves data. For example, for stereo data containing L and R, this function reorders data of LLL...RRR... into that of LRLRLR... .

Parameters
[in]ddataThe input buffer.
[in]dlengthThe number of elements of the input buffer.
[in]idataThe output buffer.
[in]ilengthThe number of elements of the output buffer.
[in]num_channelThe number of channels.
[in]typeThe type of data such as short, long, float or double.
Returns
Returns the number of elements processed.

◆ spInterleaveShort

#define spInterleaveShort ( ddata,
dlength,
idata,
ilength,
num_channel )   spInterleaveData(ddata, dlength, idata, ilength, num_channel, short)

Interleaves data of short type.

◆ spInterleaveLong

#define spInterleaveLong ( ddata,
dlength,
idata,
ilength,
num_channel )   spInterleaveData(ddata, dlength, idata, ilength, num_channel, long)

Interleaves data of long type.

◆ spInterleaveLong32

#define spInterleaveLong32 ( ddata,
dlength,
idata,
ilength,
num_channel )   spInterleaveData(ddata, dlength, idata, ilength, num_channel, spLong32)

Interleaves data of spLong32 type.

◆ spInterleaveFloat

#define spInterleaveFloat ( ddata,
dlength,
idata,
ilength,
num_channel )   spInterleaveData(ddata, dlength, idata, ilength, num_channel, float)

Interleaves data of float type.

◆ spInterleaveDouble

#define spInterleaveDouble ( ddata,
dlength,
idata,
ilength,
num_channel )   spInterleaveData(ddata, dlength, idata, ilength, num_channel, double)

Interleaves data of double type.

◆ spDeinterleaveData

#define spDeinterleaveData ( idata,
ilength,
ddata,
dlength,
num_channel,
type )   _spDeinterleaveData((char *)(idata), ilength, (char *)(ddata), dlength, num_channel, sizeof(type))

Deinterleaves data. For example, for stereo data containing L and R, this function reorders data of LRLRLR... into that of LLL...RRR... .

Parameters
[in]idataThe input buffer.
[in]ilengthThe number of elements of the input buffer.
[in]ddataThe output buffer.
[in]dlengthThe number of elements of the output buffer.
[in]num_channelThe number of channels.
[in]typeThe type of data such as short, long, float or double.
Returns
Returns the number of elements processed.

◆ spDeinterleaveShort

#define spDeinterleaveShort ( idata,
ilength,
ddata,
dlength,
num_channel )   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, short)

Deinterleaves data of short type.

◆ spDeinterleaveLong

#define spDeinterleaveLong ( idata,
ilength,
ddata,
dlength,
num_channel )   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, long)

Deinterleaves data of long type.

◆ spDeinterleaveLong32

#define spDeinterleaveLong32 ( idata,
ilength,
ddata,
dlength,
num_channel )   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, spLong32)

Deinterleaves data of spLong type.

◆ spDeinterleaveFloat

#define spDeinterleaveFloat ( idata,
ilength,
ddata,
dlength,
num_channel )   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, float)

Deinterleaves data of float type.

◆ spDeinterleaveDouble

#define spDeinterleaveDouble ( idata,
ilength,
ddata,
dlength,
num_channel )   spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, double)

Deinterleaves data of double type.

Function Documentation

◆ spGetFileSize()

spFileOffset spGetFileSize ( const char * filename,
long headsize )
extern

Gets the size of the binary file.

◆ spGetTextFileSize()

long spGetTextFileSize ( const char * filename)
extern

Gets the size of the text file. This size corresponds to the number of valid lines excluding comment lines which begin with '#' in the file.

◆ spFSkipHeader()

void spFSkipHeader ( long headsize,
FILE * fp )
extern

Skips the header of the binary file. The origin of this function call is always beginning of a file.

◆ spFSkipByte()

long spFSkipByte ( long len,
FILE * fp )
extern

Skips a part of the binary file. The origin of this function call is the current position of the file pointer.

◆ spShiftShort()

void spShiftShort ( short * data,
long length,
long shift )
extern

Shifts contents of the buffer of short type.

◆ spShiftLong()

void spShiftLong ( long * data,
long length,
long shift )
extern

Shifts contents of the buffer of long type.

◆ spShiftFloat()

void spShiftFloat ( float * data,
long length,
long shift )
extern

Shifts contents of the buffer of float type.

◆ spShiftDouble()

void spShiftDouble ( double * data,
long length,
long shift )
extern

Shifts contents of the buffer of double type.

◆ spSwapByte()

void spSwapByte ( void * data,
long length,
int samp_byte )
extern

Byte-swaps all elements of the buffer for any type.

◆ spSwapShort()

void spSwapShort ( short * data,
long length )
extern

Byte-swaps all elements of the buffer of short type.

◆ spSwapLong()

void spSwapLong ( long * data,
long length )
extern

Byte-swaps all elements of the buffer of long type.

◆ spSwapLong32()

void spSwapLong32 ( spLong32 * data,
long length )
extern

Byte-swaps all elements of the buffer of spLong32 type.

◆ spSwapULong32()

void spSwapULong32 ( spULong32 * data,
long length )
extern

Byte-swaps all elements of the buffer of spULong32 type.

◆ spSwapFloat()

void spSwapFloat ( float * data,
long length )
extern

Byte-swaps all elements of the buffer of float type.

◆ spSwapDouble()

void spSwapDouble ( double * data,
long length )
extern

Byte-swaps all elements of the buffer of double type.

◆ spSwapLong64()

void spSwapLong64 ( spLong64 * data,
long length )
extern

Byte-swaps all elements of the buffer of spLong64 (64-bit long) type.

◆ spSwapULong64()

void spSwapULong64 ( spULong64 * data,
long length )
extern

Byte-swaps all elements of the buffer of spULong64 (64-bit unsigned long) type.

◆ spFReadShort()

long spFReadShort ( short * data,
long length,
int swap,
FILE * fp )
extern

Reads data of short type from the binary file.

◆ spFReadLong()

long spFReadLong ( long * data,
long length,
int swap,
FILE * fp )
extern

Reads data of long type from the binary file.

◆ spFReadLong32()

long spFReadLong32 ( long * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 32-bit integer from the binary file.

◆ spFReadULong32()

long spFReadULong32 ( unsigned long * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 32-bit unsigned integer from the binary file.

◆ spFReadLong32Direct()

long spFReadLong32Direct ( spLong32 * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 32-bit integer from the binary file to the 32-bit integer buffer.

◆ spFReadULong32Direct()

long spFReadULong32Direct ( spULong32 * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 32-bit unsigned integer from the binary file to the 32-bit unsigned integer buffer.

◆ spFReadLong24()

long spFReadLong24 ( long * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 24-bit integer from the binary file.

◆ spFReadULong24()

long spFReadULong24 ( unsigned long * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 24-bit unsigned integer from the binary file.

◆ spFReadLong64()

long spFReadLong64 ( spLong64 * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 64-bit integer from the binary file.

◆ spFReadULong64()

long spFReadULong64 ( spULong64 * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 64-bit unsigned integer from the binary file.

◆ spFReadFloatWeighted()

long spFReadFloatWeighted ( float * data,
long length,
float weight,
int swap,
FILE * fp )
extern

Reads data of float type from the binary file.

◆ spFReadFloat()

long spFReadFloat ( float * data,
long length,
int swap,
FILE * fp )
extern

Reads data of float type from the binary file.

◆ spFReadDoubleWeighted()

long spFReadDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of double type from the binary file.

◆ spFReadDouble()

long spFReadDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of double type from the binary file.

◆ spFReadByte()

long spFReadByte ( short * data,
long length,
FILE * fp )
extern

Reads data of 8-bit unsigned integer from the binary file.

◆ spFReadSignedByte()

long spFReadSignedByte ( short * data,
long length,
FILE * fp )
extern

Reads data of 8-bit signed integer from the binary file.

◆ spFReadULaw()

long spFReadULaw ( short * data,
long length,
FILE * fp )
extern

Reads data of u-law from the binary file.

◆ spFReadALaw()

long spFReadALaw ( short * data,
long length,
FILE * fp )
extern

Reads data of a-law from the binary file.

◆ spFReadINT8()

long spFReadINT8 ( spINT8 * data,
long length,
FILE * fp )
extern

Reads data of INT8 type on Windows from the binary file.

◆ spFReadINT16()

long spFReadINT16 ( spINT16 * data,
long length,
FILE * fp )
extern

Reads data of INT16 type on Windows from the binary file.

◆ spFReadBYTE()

long spFReadBYTE ( spBYTE * data,
long length,
FILE * fp )
extern

Reads data of BYTE type on Windows from the binary file.

◆ spFReadWORD()

long spFReadWORD ( spWORD * data,
long length,
FILE * fp )
extern

Reads data of WORD type on Windows from the binary file.

◆ spFReadLONG()

long spFReadLONG ( spLONG * data,
long length,
FILE * fp )
extern

Reads data of LONG type on Windows from the binary file.

◆ spFReadULONG()

long spFReadULONG ( spULONG * data,
long length,
FILE * fp )
extern

Reads data of ULONG type on Windows from the binary file.

◆ spFReadShortToDoubleWeighted()

long spFReadShortToDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of short type to double array from the binary file.

◆ spFReadShortToDouble()

long spFReadShortToDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of short type to double array from the binary file.

◆ spFReadLongToDoubleWeighted()

long spFReadLongToDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of long type to double array from the binary file.

◆ spFReadLongToDouble()

long spFReadLongToDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of long type to double array from the binary file.

◆ spFReadLong32ToDoubleWeighted()

long spFReadLong32ToDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of 32-bit integer to double array from the binary file.

◆ spFReadLong32ToDouble()

long spFReadLong32ToDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 32-bit integer to double array from the binary file.

◆ spFReadLong24ToDoubleWeighted()

long spFReadLong24ToDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of 24-bit integer to double array from the binary file.

◆ spFReadLong24ToDouble()

long spFReadLong24ToDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of 24-bit integer to double array from the binary file.

◆ spFReadFloatToDoubleWeighted()

long spFReadFloatToDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Reads data of float type to double array from the binary file.

◆ spFReadFloatToDouble()

long spFReadFloatToDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Reads data of float type to double array from the binary file.

◆ spFReadBitToDoubleWeighted()

long spFReadBitToDoubleWeighted ( double * data,
long length,
double weight,
int samp_bit,
int swap,
FILE * fp )
extern

Reads data of specified bit format to double array from the binary file.

◆ spFReadBitToDouble()

long spFReadBitToDouble ( double * data,
long length,
double max,
int samp_bit,
int swap,
FILE * fp )
extern

Reads data of specified bit format to double array from the binary file.

◆ spFWriteShort()

long spFWriteShort ( short * data,
long length,
int swap,
FILE * fp )
extern

Writes data of short type to the binary file.

◆ spFWriteLong()

long spFWriteLong ( long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file.

◆ spFWriteLong32()

long spFWriteLong32 ( long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file as that of 32-bit integer.

◆ spFWriteULong32()

long spFWriteULong32 ( unsigned long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file as that of 32-bit unsigned integer.

◆ spFWriteLong32Direct()

long spFWriteLong32Direct ( spLong32 * data,
long length,
int swap,
FILE * fp )
extern

Writes data of spLong32 type to the binary file.

◆ spFWriteULong32Direct()

long spFWriteULong32Direct ( spULong32 * data,
long length,
int swap,
FILE * fp )
extern

Writes data of spULong32 type to the binary file.

◆ spFWriteLong24()

long spFWriteLong24 ( long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file as that of 24-bit integer.

◆ spFWriteULong24()

long spFWriteULong24 ( unsigned long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of unsigned long type to the binary file as that of 24-bit unsigned integer.

◆ spFWriteLong64()

long spFWriteLong64 ( spLong64 * data,
long length,
int swap,
FILE * fp )
extern

Writes data of spLong type to the binary file.

◆ spFWriteULong64()

long spFWriteULong64 ( spULong64 * data,
long length,
int swap,
FILE * fp )
extern

Writes data of spULong type to the binary file.

◆ spFWriteFloatWeighted()

long spFWriteFloatWeighted ( float * data,
long length,
float weight,
int swap,
FILE * fp )
extern

Writes data of float type to the binary file.

◆ spFWriteFloat()

long spFWriteFloat ( float * data,
long length,
int swap,
FILE * fp )
extern

Writes data of float type to the binary file.

◆ spFWriteDoubleWeighted()

long spFWriteDoubleWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file.

◆ spFWriteDouble()

long spFWriteDouble ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file.

◆ spFWriteByte()

long spFWriteByte ( short * data,
long length,
FILE * fp )
extern

Writes data of short type to the binary file as that of 8-bit unsigned integer.

◆ spFWriteSignedByte()

long spFWriteSignedByte ( short * data,
long length,
FILE * fp )
extern

Writes data of short type to the binary file as that of 8-bit signed integer.

◆ spFWriteULaw()

long spFWriteULaw ( short * data,
long length,
FILE * fp )
extern

Writes data of short type to the binary file as that of u-law.

◆ spFWriteALaw()

long spFWriteALaw ( short * data,
long length,
FILE * fp )
extern

Writes data of short type to the binary file as that of a-law.

◆ spFWriteINT8()

long spFWriteINT8 ( spINT8 * data,
long length,
FILE * fp )
extern

Writes data as INT8 type on Windows to the binary file.

◆ spFWriteINT16()

long spFWriteINT16 ( spINT16 * data,
long length,
FILE * fp )
extern

Writes data as INT16 type on Windows to the binary file.

◆ spFWriteBYTE()

long spFWriteBYTE ( spBYTE * data,
long length,
FILE * fp )
extern

Writes data as BYTE type on Windows to the binary file.

◆ spFWriteWORD()

long spFWriteWORD ( spWORD * data,
long length,
FILE * fp )
extern

Writes data as WORD type on Windows to the binary file.

◆ spFWriteLONG()

long spFWriteLONG ( spLONG * data,
long length,
FILE * fp )
extern

Writes data as LONG type on Windows to the binary file.

◆ spFWriteULONG()

long spFWriteULONG ( spULONG * data,
long length,
FILE * fp )
extern

Writes data as ULONG type on Windows to the binary file.

◆ spFWriteDoubleToShortWeighted()

long spFWriteDoubleToShortWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of short type.

◆ spFWriteDoubleToShort()

long spFWriteDoubleToShort ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of short type.

◆ spFWriteDoubleToLongWeighted()

long spFWriteDoubleToLongWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of long type.

◆ spFWriteDoubleToLong()

long spFWriteDoubleToLong ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of long type.

◆ spFWriteDoubleToLong32Weighted()

long spFWriteDoubleToLong32Weighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of 32-bit integer.

◆ spFWriteDoubleToLong32()

long spFWriteDoubleToLong32 ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of 32-bit integer.

◆ spFWriteDoubleToLong24Weighted()

long spFWriteDoubleToLong24Weighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of 24-bit integer.

◆ spFWriteDoubleToLong24()

long spFWriteDoubleToLong24 ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of 24-bit integer.

◆ spFWriteDoubleToFloatWeighted()

long spFWriteDoubleToFloatWeighted ( double * data,
long length,
double weight,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of float type.

◆ spFWriteDoubleToFloat()

long spFWriteDoubleToFloat ( double * data,
long length,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of float type.

◆ spFWriteDoubleToBitWeighted()

long spFWriteDoubleToBitWeighted ( double * data,
long length,
double weight,
int samp_bit,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of specified bit format.

◆ spFWriteDoubleToBit()

long spFWriteDoubleToBit ( double * data,
long length,
double max,
int samp_bit,
int swap,
FILE * fp )
extern

Writes data of double type to the binary file as that of specified bit format.

◆ spFWriteLong32ToShort()

long spFWriteLong32ToShort ( long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file as that of short type.

◆ spFWriteLong24ToShort()

long spFWriteLong24ToShort ( long * data,
long length,
int swap,
FILE * fp )
extern

Writes data of long type to the binary file as that of short type.

◆ _spInterleaveData()

long _spInterleaveData ( char * ddata,
long dlength,
char * idata,
long ilength,
int num_channel,
int samp_byte )
extern

Interleaves data. Use spInterleaveData() instead of this function.

◆ _spDeinterleaveData()

long _spDeinterleaveData ( char * idata,
long ilength,
char * ddata,
long dlength,
int num_channel,
int samp_byte )
extern

Deinterleaves data. Use spDeinterleaveData() instead of this function.

◆ spGetNumRow()

int spGetNumRow ( const char * filename)
extern

Gets the number of rows of the text file.

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spGetNumColumn()

int spGetNumColumn ( const char * filename)
extern

Gets the number of columns of the text file. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spGetCSVNumRow()

int spGetCSVNumRow ( const char * filename)
extern

Gets the number of rows of the CSV file.

◆ spGetCSVNumColumn()

int spGetCSVNumColumn ( const char * filename)
extern

Gets the number of columns of the CSV file.

◆ spFGetNColumn()

int spFGetNColumn ( char * buf,
int size,
int col,
FILE * fp )
extern

Gets a column from the text file. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spFGetColumn()

int spFGetColumn ( char * buf,
int col,
FILE * fp )
extern

Gets a column from the text file. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spSGetNColumn()

int spSGetNColumn ( char * buf,
int size,
int col,
const char * line )
extern

Gets a column from the specified line. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spSGetColumn()

int spSGetColumn ( char * buf,
int col,
const char * line )
extern

Gets a column from the specified line. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spSGetNextNColumn()

char * spSGetNextNColumn ( char * buf,
int size,
const char * line )
extern

Gets a column from the specified line and returns the address of the next column. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • A quoted string will be treated as a single column.
  • An escaped character by '\' such as '\#' will be converted into a non-escaped character such as '#'.

◆ spFGetCSVNColumn()

int spFGetCSVNColumn ( char * buf,
int size,
int col,
FILE * fp )
extern

Gets a column from the CSV file.

◆ spSGetCSVNColumn()

int spSGetCSVNColumn ( char * buf,
int size,
int col,
const char * line )
extern

Gets a column from the specified CSV line.

◆ spSGetNextCSVNColumn()

char * spSGetNextCSVNColumn ( char * buf,
int size,
const char * line )
extern

Gets a column from the specified CSV line and returns the address of the next column.

◆ spFGetNLine()

int spFGetNLine ( char * buf,
int size,
FILE * fp )
extern

Gets a line from the text file. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • The line feed character such as '\n' is removed.

◆ spFGetLine()

int spFGetLine ( char * buf,
FILE * fp )
extern

Gets a line from the text file. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • The line feed character such as '\n' is removed.

◆ spGetNLine()

int spGetNLine ( char * buf,
int size )
extern

Gets a line from the standard input. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • The line feed character such as '\n' is removed.

◆ spGetLine()

int spGetLine ( char * buf)
extern

Gets a line from the standard input. This function reads data based on the following rules:

  • A comment from '#' to the line end is removed.
  • Multiple lines escaped by '\' at the end of each line will be treated as a single line.
  • The line feed character such as '\n' is removed.

◆ spFPutLine()

int spFPutLine ( const char * input,
FILE * fp )
extern

Puts a line to the text file. '#', '\', '"' and "'" are escaped by '\'. The line feed character is not implicitly added.

◆ spSPutLine()

int spSPutLine ( const char * input,
char * line,
int size )
extern

Puts a line to the buffer. '#', '\', '"' and "'" are escaped by '\'.

◆ spFPutString()

int spFPutString ( const char * input,
FILE * fp )
extern

Puts a column to the text file. '#', '\', '"' and "'" are escaped by '\'. A string that includes white spaces or tabs will be quoted by '"'.

◆ spSPutString()

int spSPutString ( const char * input,
char * line,
int size )
extern

Puts a column to the buffer. '#', '\', '"' and "'" are escaped by '\'. A string that includes white spaces or tabs will be quoted by '"'.

◆ spFGetNString()

char * spFGetNString ( char * buf,
int size,
FILE * fp )
extern

Gets a string to the line end from the text file. Multiple lines escaped by '\' at the end of each line will be treated as a single line.

◆ spGetNString()

char * spGetNString ( char * buf,
int size )
extern

Gets a string to the line end from the standard input. Multiple lines escaped by '\' at the end of each line will be treated as a single line.

◆ spSGetNString()

char * spSGetNString ( char * buf,
int size,
const char * string )
extern

Gets a string to the line end from the buffer and returns the address of the next string. Multiple lines escaped by '\' at the end of each line will be treated as a single line.

◆ spSScanNSetup()

int spSScanNSetup ( const char * line,
char * name,
int namelen,
char * value,
int valuelen )
extern

Extracts the parameter name and the parameter value from the line of the setup file.

◆ spSScanSetup()

int spSScanSetup ( const char * line,
char * name,
char * value )
extern

Extracts the parameter name and the parameter value from the line of the setup file.