44#include "EST_cutils.h"
47#define STRINGIZE(S) _S_S_S(S)
49const char *
const est_tools_version =
50 STRINGIZE(ESTVERSION)
":" STRINGIZE(ESTSTATE)
" " STRINGIZE(ESTDATE) ;
52const char *
const est_name = STRINGIZE(ESTNAME);
55# define ESTLIBDIR STRINGIZE(ESTLIBDIRC)
58#define ESTLIBDIR "/usr/local/lib/speech_tools"
62# define ESTDATADIR STRINGIZE(ESTDATADIRC)
65#define ESTDATADIR "/usr/local/share/speech_tools"
68const char *
const est_libdir = ESTLIBDIR;
69const char *
const est_datadir = ESTDATADIR;
71const char *
const est_ostype = STRINGIZE(ESTOSTYPE);
73char *cmake_tmp_filename()
81 if (((tdir=getenv(
"TMPDIR")) == NULL) &&
82 ((tdir=getenv(
"TEMP")) == NULL) &&
83 ((tdir=getenv(
"TMP")) == NULL))
89 for (j=i=0; t1[i] !=
'\0'; i++)
93 sprintf(fname,
"%s/est_%05ld_%05d",t1,(
long)getpid(),n++);
94 return wstrdup(fname);
97enum EST_bo_t str_to_bo(
const char *boname)
101 if ((streq(boname,
"hilo")) || (streq(boname,
"big")) ||
102 (streq(boname,
"MSB")) || (streq(boname,
"big_endian")))
104 else if ((streq(boname,
"lohi")) || (streq(boname,
"little")) ||
105 (streq(boname,
"LSB")) || (streq(boname,
"little_endian")))
107 else if ((streq(boname,
"native")) || (streq(boname,
"mine")))
108 return (EST_BIG_ENDIAN ? bo_big : bo_little);
109 else if ((streq(boname,
"nonnative")) || (streq(boname,
"other")) ||
110 (streq(boname,
"wrong")) || (streq(boname,
"swap")) ||
111 (streq(boname,
"swapped")))
112 return (EST_BIG_ENDIAN ? bo_little : bo_big);
115 fprintf(stderr,
"Unknown byte swap format: \"%s\" assuming native\n",
117 return (EST_BIG_ENDIAN ? bo_big : bo_little);
122const char *bo_to_str(
enum EST_bo_t bo)
128 case bo_big:
return "hilo";
129 case bo_little:
return "lohi";
131 fprintf(stderr,
"Unrecognized byte order %d\n",bo);
132 return "unrecognized";