Edinburgh Speech Tools  2.1-release
EST_cutils.h File Reference
#include "EST_common.h"
#include "EST_walloc.h"
#include "EST_system.h"
Include dependency graph for EST_cutils.h:

Go to the source code of this file.

Macros

#define streq(X, Y)   (strcmp(X,Y)==0)
 
#define EST_BIG_ENDIAN   (((char *)&est_endian_loc)[0] == 0)
 
#define EST_LITTLE_ENDIAN   (((char *)&est_endian_loc)[0] != 0)
 
#define EST_NATIVE_BO   (EST_BIG_ENDIAN ? bo_big : bo_little)
 
#define EST_SWAPPED_BO   (EST_BIG_ENDIAN ? bo_little : bo_big)
 
#define SWAPINT(x)
 
#define SWAPSHORT(x)
 
#define Gof(a, b)   (((a) > (b)) ? (a) : (b))
 
#define Lof(a, b)   (((a) < (b)) ? (a) : (b))
 

Enumerations

enum  EST_bo_t { bo_big, bo_little, bo_perq }
 

Functions

char * cmake_tmp_filename ()
 
void swapdouble (double *d)
 
void swapfloat (float *f)
 
void swap_bytes_ushort (unsigned short *data, int length)
 
void swap_bytes_short (short *data, int length)
 
void swap_bytes_uint (unsigned int *data, int length)
 
void swap_bytes_int (int *data, int length)
 
void swap_bytes_float (float *data, int length)
 
void swap_bytes_double (double *data, int length)
 
enum EST_bo_t str_to_bo (const char *boname)
 
const char * bo_to_str (enum EST_bo_t bo)
 

Variables

const char *const est_tools_version
 
const char *const est_name
 
const char *const est_libdir
 
const char *const est_ostype
 
int est_endian_loc
 

Macro Definition Documentation

#define streq (   X,
 
)    (strcmp(X,Y)==0)

Definition at line 57 of file EST_cutils.h.

#define EST_BIG_ENDIAN   (((char *)&est_endian_loc)[0] == 0)

Definition at line 69 of file EST_cutils.h.

#define EST_LITTLE_ENDIAN   (((char *)&est_endian_loc)[0] != 0)

Definition at line 71 of file EST_cutils.h.

#define EST_NATIVE_BO   (EST_BIG_ENDIAN ? bo_big : bo_little)

Definition at line 72 of file EST_cutils.h.

#define EST_SWAPPED_BO   (EST_BIG_ENDIAN ? bo_little : bo_big)

Definition at line 73 of file EST_cutils.h.

#define SWAPINT (   x)
Value:
((((unsigned)x) & 0xff) << 24 | \
(((unsigned)x) & 0xff00) << 8 | \
(((unsigned)x) & 0xff0000) >> 8 | \
(((unsigned)x) & 0xff000000) >> 24)

Definition at line 75 of file EST_cutils.h.

#define SWAPSHORT (   x)
Value:
((((unsigned)x) & 0xff) << 8 | \
(((unsigned)x) & 0xff00) >> 8)

Definition at line 79 of file EST_cutils.h.

#define Gof (   a,
 
)    (((a) > (b)) ? (a) : (b))

Definition at line 95 of file EST_cutils.h.

#define Lof (   a,
 
)    (((a) < (b)) ? (a) : (b))

Definition at line 97 of file EST_cutils.h.

Enumeration Type Documentation

enum EST_bo_t
Enumerator
bo_big 
bo_little 
bo_perq 

Definition at line 65 of file EST_cutils.h.

Function Documentation

char* cmake_tmp_filename ( )

Definition at line 66 of file EST_cutils.c.

void swapdouble ( double *  d)

Definition at line 44 of file EST_swapping.cc.

void swapfloat ( float *  f)

Definition at line 53 of file EST_swapping.cc.

void swap_bytes_ushort ( unsigned short *  data,
int  length 
)

Definition at line 107 of file EST_swapping.cc.

void swap_bytes_short ( short *  data,
int  length 
)

Definition at line 97 of file EST_swapping.cc.

void swap_bytes_uint ( unsigned int data,
int  length 
)

Definition at line 87 of file EST_swapping.cc.

void swap_bytes_int ( int data,
int  length 
)

Definition at line 77 of file EST_swapping.cc.

void swap_bytes_float ( float *  data,
int  length 
)

Definition at line 59 of file EST_swapping.cc.

void swap_bytes_double ( double *  data,
int  length 
)

Definition at line 68 of file EST_swapping.cc.

enum EST_bo_t str_to_bo ( const char *  boname)

Definition at line 95 of file EST_cutils.c.

const char* bo_to_str ( enum EST_bo_t  bo)

Definition at line 120 of file EST_cutils.c.

Variable Documentation

const char* const est_tools_version

Definition at line 49 of file EST_cutils.c.

const char* const est_name

Definition at line 52 of file EST_cutils.c.

const char* const est_libdir

Definition at line 62 of file EST_cutils.c.

const char* const est_ostype

Definition at line 64 of file EST_cutils.c.

int est_endian_loc

Definition at line 42 of file EST_swapping.cc.