57 #if defined(INSTANTIATE_TEMPLATES) 58 #include "../base_class/EST_THash.cc" 77 static void void_to_addrname(
const void *v,
EST_String &saddr)
89 static int tc_utt = -1;
90 static int tc_val = -1;
97 err(
"wrong type of argument to get_c_utt",x);
116 void_to_addrname(u,saddr);
118 if ((cell = estobjs.val(saddr)) !=
NIL)
125 estobjs.add_item(saddr,utt);
130 static void utt_free(LISP lutt)
135 void_to_addrname(u,saddr);
140 estobjs.remove_item(saddr);
158 return *((
class EST_Val *)x->storage_as.val.v);
161 err(
"wrong type of argument to get_c_val",x);
189 static void val_free(LISP
val)
196 static void val_prin1(LISP v, FILE *fd)
206 static void val_print_string(LISP v,
char *
tkbuffer)
225 struct obj_val {LISP l;};
231 EST_error(
"val not of type val_type_scheme");
234 static void val_delete_scheme(
void *v)
236 struct obj_val *ov = (
struct obj_val *)v;
243 struct obj_val *ov =
walloc(
struct obj_val,1);
244 ov->l = (LISP)(
void *)v;
255 cerr <<
"EST_Val unset, can't build lisp value" << endl;
267 else if (pv.
type() == val_type_feats)
273 static int feature_like(LISP v)
281 for (p=v; p !=
NIL; p=
cdr(p))
300 else if (
TYPEP(v,tc_val))
314 for(p.begin(kvl); p; ++p)
328 for (p=l; p; p =
cdr(p))
339 for(p.
begin(f); p; ++p)
353 for (p=lf; p; p =
cdr(p))
358 static LISP feats_set(LISP lfeats, LISP fname, LISP
val)
371 static LISP feats_get(LISP
f, LISP fname)
376 static LISP feats_make()
382 static LISP feats_tolisp(LISP lf)
387 static LISP feats_remove(LISP lf, LISP fname)
394 static LISP feats_present(LISP lf, LISP fname)
434 "(feats.get FEATS FEATNAME)\n\ 435 Return value of FEATNAME (which may be a simple feature name or a\n\ 436 pathname) in FEATS. If FEATS is nil a new feature set is created");
438 "(feats.set FEATS FEATNAME VALUE)\n\ 439 Set FEATNAME to VALUE in FEATS.");
441 "(feats.remove FEATS FEATNAME)\n\ 442 Remove feature names FEATNAME from FEATS.");
444 "(feats.present FEATS FEATNAME)\n\ 445 Return t is FEATNAME is present in FEATS, nil otherwise.");
448 Return an new empty features object.");
450 "(feats.tolisp FEATS)\n\ 451 Gives a lisp representation of the features, this is a debug function\n\ 452 and may or may not exist tomorrow.");
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
void lisp_to_features(LISP lf, EST_Features &f)
LISP siod_make_typed_cell(long type, void *s)
#define walloc(TYPE, SIZE)
#define Instantiate_TStringHash(VAL)
#define SIOD_REGISTER_CLASS(NAME, CLASS)
float get_c_float(LISP x)
LISP val_equal(LISP a, LISP b)
void set_val(const EST_String &name, const EST_Val &sval)
LISP siod_get_lval(const char *name, const char *message)
LISP strintern(const char *data)
void init_subr_2(const char *name, LISP(*fcn)(LISP, LISP), const char *doc)
void gc_unprotect(LISP *location)
A specialised hash table for when the key is an EST_String.
class EST_Utterance * utterance(LISP x)
void set_print_hooks(long type, void(*prin1)(LISP, FILE *), void(*print_string)(LISP, char *))
LISP lisp_val(const EST_Val &pv)
void err(const char *message, LISP x) EST_NORETURN
int siod_register_user_type(const char *name)
const char * get_c_string(LISP x)
LISP scheme(const EST_Val &v)
Declare_TStringHash_Base(LISP,(LISP) 0, NIL) using namespace std
LISP cons(LISP x, LISP y)
void fput_st(FILE *f, const char *st)
val_type type(void) const
void remove(const EST_String &name)
const void * internal_ptr(void) const
int present(const EST_String &name) const
void init_subr_1(const char *name, LISP(*fcn)(LISP), const char *doc)
int add_item(const K &rkey, const V &rval, int no_search=0)
add key-val pair to list
const EST_String & string_only(void) const
class EST_Val & val(LISP x)
void init_subr_3(const char *name, LISP(*fcn)(LISP, LISP, LISP), const char *doc)
LISP siod(const class EST_Utterance *u)
LISP rintern(const char *name)
void begin(const Container &over)
Set the iterator ready to run over this container.
void init_subr_0(const char *name, LISP(*fcn)(void), const char *doc)
EST_Val est_val(const obj *v)
void gc_protect(LISP *location)
LISP features_to_lisp(EST_Features &f)
LISP kvlss_to_lisp(const EST_TKVL< EST_String, EST_String > &kvl)
void set_gc_hooks(long type, int gc_free_once, LISP(*rel)(LISP), LISP(*mark)(LISP), void(*scan)(LISP), void(*free)(LISP), void(*clear)(LISP), long *kind)
void reverse(EST_Wave &sig)
void lisp_to_kvlss(LISP l, EST_TKVL< EST_String, EST_String > &kvl)
void set_type_hooks(long type, long(*c_sxhash)(LISP, long), LISP(*equal)(LISP, LISP))