libsent/include/sent/util.h File Reference

Definitions for common utility functions. More...

Go to the source code of this file.

Data Structures

struct  BMALLOC_BASE
 Information of allocated memory block for mybmalloc(). More...

Defines

#define MYBMALLOC_BLOCK_SIZE   10000
 Memory block size in bytes for mybmalloc().

Functions

char * getl (char *, int, FILE *)
 Read one line from file that has been opened by fopen_readfile().
char * getl_fp (char *, int, FILE *)
 Read one line from file pointer.
char * getl_fd (char *, int, int)
 Read one line from a file descriptor.
char * getl_sd (char *, int, int)
 Read one line from a socket descriptor.
char * get_line_from_stdin (char *buf, int buflen, char *prompt)
 Get one file name from stdin with a prompt .
FILE * fopen_readfile (char *)
 Open a file with zlib.
int fclose_readfile (FILE *)
 Close a file previously opened by fopen_readfile().
FILE * fopen_writefile (char *)
 Open or create a file for writing (no compression supported),.
int fclose_writefile (FILE *)
 Close file previously opened by open_writefile().
size_t myfread (void *ptr, size_t size, size_t n, FILE *fp)
 Read data from input stream opened by fopen_readfile().
size_t myfwrite (void *ptr, size_t size, size_t n, FILE *fp)
 Write data.
int myfgetc (FILE *fp)
 Read one character from input stream opened by fopen_readfile().
int myfeof (FILE *fp)
 Test if reached end of file, for files opened by fopen_readfile().
int myfrewind (FILE *fp)
 Seek to the first of the file.
void * mybmalloc2 (unsigned int size, BMALLOC_BASE **list)
 Another version of memory block allocation, used for tree lexicon.
char * mybstrdup2 (char *, BMALLOC_BASE **list)
 String duplication using mybmalloc2().
void mybfree2 (BMALLOC_BASE **list)
 Free all memories allocated by mybmalloc2().
void * mymalloc (int)
 Allocate a memory, as the same as malloc.
void * myrealloc (void *, int)
 Re-allocate memory area, keeping the existing data, as the same as realloc.
void * mycalloc (int, int)
 Allocate memory area and set it to zero, as the same as calloc.
void swap_sample_bytes (SP16 *buf, int len)
 Byte swapping of 16bit audio samples.
void swap_bytes (char *buf, size_t unitbyte, int unitnum)
 Generic byte-swapping functions for any size of unit.
void jlog_set_output (FILE *fp)
 Set file pointer to output the log.
FILE * jlog_get_fp ()
 Return the current file pointer to output log.
void jlog (char *format,...)
 Output a normal message to log.
int jlog_flush ()
 Flush text message.
char * mystrtok_quotation (char *str, char *delim, int left_paren, int right_paren, int mode)
 Generic function to extract tokens from strings, with quotation handling.
char * mystrtok_quote (char *str, char *delim)
 Extract tokens considering quotation by double quotation mark.
char * mystrtok (char *str, char *delim)
 Extract tokens, not considering quotation, just as the same as strtok.
char * mystrtok_movetonext (char *str, char *delim)
 Just move to the beginning of the next token, without modifying the str.
void confout (FILE *strm)
 Output all information of this libsent library.
void confout_version (FILE *strm)
 Output version of this libsent library.
void confout_audio (FILE *strm)
 Output audio configuration of this libsent library.
void confout_lm (FILE *strm)
 Output language model configuration of this libsent library.
void confout_am (FILE *strm)
 Output acoustic model configuration of this libsent library.
void confout_lib (FILE *strm)
 Output about linked libraries of this libsent library.
void confout_process (FILE *strm)
 Output about process handling of this libsent library.


Detailed Description

Definitions for common utility functions.

This file contains definitions for common utility functions: text reading and parsing, compressed file input, memory allocation, byte order changing, common printf function (j_printf etc.) and so on.

Author:
Akinobu LEE
Date:
Sat Feb 12 12:30:40 2005
Revision
1.1.1.1

Definition in file util.h.


Define Documentation

#define MYBMALLOC_BLOCK_SIZE   10000

Memory block size in bytes for mybmalloc().

mybmalloc() allocate memory per big block to reduce memory management overhead. This value sets the block size to be allocated. Smaller value may leads to finer granularity, but overhead may increase. Larger value may result in reduction of overhead, but too much memory can be allocated for a small memory requirement.

Definition at line 50 of file util.h.

Referenced by mybmalloc_set_param().


Function Documentation

char* getl ( char *  buf,
int  maxlen,
FILE *  fp 
)

Read one line from file that has been opened by fopen_readfile().

Blank line will be skipped.

Parameters:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer or gzFile pointer
Returns:
the buffer buf, or NULL on EOF or error.

Definition at line 53 of file readfile.c.

Referenced by add_bigram(), add_unigram(), get_total_info(), ngram_read_arpa(), rddfa(), rdhmmlist(), read_token(), set_ngram(), set_unigram(), voca_load_htkdict(), and voca_load_wordlist().

char* getl_fp ( char *  buf,
int  maxlen,
FILE *  fp 
)

Read one line from file pointer.

Blank line will be skipped.

Parameters:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer
Returns:
the buffer buf, or NULL on EOF or error.

Definition at line 86 of file readfile.c.

Referenced by adin_file_begin(), htk_config_file_parse(), main_recognition_stream_loop(), and multigram_add_prefix_filelist().

char* getl_fd ( char *  buf,
int  maxlen,
int  fd 
)

Read one line from a file descriptor.

Blank line will be skipped.

Parameters:
buf [out] data buffer
maxlen [in] maximum length of above
fd [in] file descriptor
Returns:
the buffer buf, or NULL on EOF or error.

Definition at line 114 of file readfile.c.

Referenced by rddfa_fd(), and voca_load_htkdict_fd().

char* getl_sd ( char *  buf,
int  maxlen,
int  sd 
)

Read one line from a socket descriptor.

Blank line will be skipped.

Parameters:
buf [out] data buffer
maxlen [in] maximum length of above
sd [in] socket descpritor
Returns:
the buffer buf, or NULL on EOF or error.

Definition at line 152 of file readfile.c.

Referenced by rddfa_sd(), and voca_load_htkdict_sd().

char* get_line_from_stdin ( char *  buf,
int  buflen,
char *  prompt 
)

Get one file name from stdin with a prompt .

Blank line is omitted.

Parameters:
buf [out] buffer to hold input text line
buflen [in] length of the buffer
prompt [in] prompt string
Returns:
pointer to buf, or NULL on EOF input.

Definition at line 193 of file readfile.c.

Referenced by adin_file_begin(), main(), and main_recognition_stream_loop().

FILE* fopen_readfile ( char *  filename  ) 

Open a file with zlib.

Parameters:
filename [in] file name to open
Returns:
gzFile pointer if succeed, NULL on failure.

Definition at line 55 of file gzfile.c.

Referenced by adin_file_open(), CMN_load_from_file(), init_dfa(), init_hmminfo(), init_ngram_arpa(), init_ngram_arpa_additional(), init_ngram_bin(), init_voca(), init_wordlist(), new_SS_load_from_file(), and rdparam().

int fclose_readfile ( FILE *  fp  ) 

Close a file previously opened by fopen_readfile().

Parameters:
fp [in] gzFile pointer
Returns:
0 on success, -1 on error.

Definition at line 73 of file gzfile.c.

Referenced by adin_file_close(), adin_file_open(), CMN_load_from_file(), init_dfa(), init_hmminfo(), init_ngram_arpa(), init_ngram_arpa_additional(), init_ngram_bin(), init_voca(), init_wordlist(), new_SS_load_from_file(), rdparam(), and setup_wav().

FILE* fopen_writefile ( char *  filename  ) 

Open or create a file for writing (no compression supported),.

Parameters:
filename [in] filename
Returns:
the file pointer or NULL on failure.

Definition at line 326 of file gzfile.c.

Referenced by wrwav_open().

int fclose_writefile ( FILE *  fp  ) 

Close file previously opened by open_writefile().

Parameters:
fp [in] file pointer
Returns:
0 on success, -1 on failure.

Definition at line 345 of file gzfile.c.

Referenced by wrwav_close().

size_t myfread ( void *  ptr,
size_t  size,
size_t  n,
FILE *  fp 
)

Read data from input stream opened by fopen_readfile().

Parameters:
ptr [out] data buffer
size [in] size of unit in bytes
n [in] number of unit to be read
fp [in] gzFile pointer
Returns:
number of read units or EOF, -1 on error.

Definition at line 93 of file gzfile.c.

Referenced by adin_file_open(), adin_file_read(), adin_stdin_read(), myread(), and rdnfunc().

size_t myfwrite ( void *  ptr,
size_t  size,
size_t  n,
FILE *  fp 
)

Write data.

Parameters:
ptr [in] data buffer
size [in] size of unit in bytes
n [in] number of unit to write
fp [in] file pointer
Returns:
the number of units successfully written, or 0 if EOF or failed.

Definition at line 364 of file gzfile.c.

Referenced by mywrite(), and wrtfunc().

int myfgetc ( FILE *  fp  ) 

Read one character from input stream opened by fopen_readfile().

Parameters:
fp [in] gzFile pointer
Returns:
the read character, or -1 on EOF or error.

Definition at line 112 of file gzfile.c.

Referenced by rdn_strfunc().

int myfeof ( FILE *  fp  ) 

Test if reached end of file, for files opened by fopen_readfile().

Parameters:
fp [in] gzFile pointer.
Returns:
1 if already on EOF, 0 if otherwise.

Definition at line 127 of file gzfile.c.

Referenced by adin_file_read().

int myfrewind ( FILE *  fp  ) 

Seek to the first of the file.

Parameters:
fp [in] gzFile pointer.
Returns:
0 on success, -1 on error.

Definition at line 143 of file gzfile.c.

void* mybmalloc2 ( unsigned int  size,
BMALLOC_BASE **  list 
)

Another version of memory block allocation, used for tree lexicon.

Parameters:
size [in] memory size to be allocated
list [i/o] total memory management information (will be updated here)
Returns:
pointer to the newly allocated area.

Definition at line 84 of file mybmalloc.c.

Referenced by add_ac(), add_to_error(), bt_new(), bt_relocate_rw(), calc_tied_mix_extend(), dens_new(), dens_read(), hmm_add_physical_to_logical(), hmm_add_pseudo_phones_sub(), htk_hmmdata_new(), htk_hmmdata_read(), make_hmm_basephone_list(), mybstrdup2(), outprob_cache_extend(), param_alloc(), rd_data(), rd_dens(), rd_state(), rd_tmix(), rd_trans(), rd_var(), rdhmmlist(), rdn_strfunc(), state_new(), state_read(), tmix_create_codebook_index(), tmix_read(), trans_new(), trans_read(), var_new(), var_read(), voca_load_htkdict_line(), voca_load_wordlist_line(), wchmm_add_word(), and wchmm_duplicate_state().

char* mybstrdup2 ( char *  s,
BMALLOC_BASE **  list 
)

String duplication using mybmalloc2().

Parameters:
s [in] string to be duplicated
list [i/o] total memory management information pointer
Returns:
pointer to the newly allocated string.

Definition at line 122 of file mybmalloc.c.

Referenced by rdhmmdef(), rdhmmlist(), and tmix_read().

void mybfree2 ( BMALLOC_BASE **  list  ) 

Free all memories allocated by mybmalloc2().

Parameters:
list [i/o] total memory management information (will be cleaned here)

Definition at line 138 of file mybmalloc.c.

Referenced by bt_free(), bt_prepare(), calc_tied_mix_free(), hmminfo_free(), outprob_cache_free(), param_free_content(), wchmm_free(), and word_info_free().

void* mymalloc ( int  size  ) 

Allocate a memory, as the same as malloc.

Parameters:
size [in] required size in bytes.
Returns:
pointer to the the newly allocated area.

Definition at line 41 of file mymalloc.c.

Referenced by add_arc(), add_bigram(), add_successor(), add_to_error(), add_unigram(), adin_cut_callback_store_buffer(), adin_initialize(), adin_mic_standby(), adin_setup_param(), adin_thread_create(), build_gsset(), build_state2gs(), calc_tied_mix_extend(), calc_tied_mix_init(), cdset_new(), CMN_realtime_new(), CMN_realtime_update(), cn_build_wordlist(), cn_new(), config_file_parse(), dfa_append(), dfa_find_pause_word(), dfa_info_new(), dfa_pause_word_append(), dfa_state_init(), do_align(), expand_env(), filepath(), gmm_gprune_safe_init(), gmm_init(), gms_gprune_init(), gms_init(), gms_prepare(), gprune_beam_init(), gprune_heu_init(), gprune_none_init(), gprune_safe_init(), graph_make_order(), hmminfo_new(), init_count_zc_e(), InitFBank(), j_add_option(), j_jconf_am_new(), j_jconf_lm_new(), j_jconf_new(), j_jconf_search_new(), j_launch_recognition_instance(), j_mfcccalc_new(), j_process_am_new(), j_process_lm_new(), j_recog_new(), j_recogprocess_new(), make_costbl_hamming(), make_costbl_makemfcc(), make_fft_table(), make_phseq(), make_sintbl_wcep(), make_successor_list(), make_terminfo(), malloc_dfa_cp(), malloc_wordtrellis(), max_successor_cache_init(), multigram_add(), multigram_add_gramlist(), multigram_add_prefix_filelist(), mybmalloc2(), new_make_word_hmm_with_lm(), new_node(), new_param(), new_SS_calculate(), new_SS_load_from_file(), new_str2phseq(), new_str2wordseq(), newnode(), ngram_compact_context(), ngram_info_new(), ngram_make_lookup_tree(), nw_malloc(), opt_parse(), outprob_cache_extend(), outprob_cd_nbest_init(), param_str2code(), phoneme_rev_align(), rd_dens(), rd_state(), rd_tmix(), rd_trans(), rd_var(), rddfa_line(), rdhmmlist(), read_param(), read_token(), realloc_dfa_cp(), RealTimeInit(), RealTimePipeLine(), regist_cdset(), result_sentence_malloc(), select_param_kind(), set_ngram(), set_unigram(), state_rev_align(), terminfo_append(), test_expand_triphone(), tmix_create_codebook_index(), useropt_new(), viterbi_segment(), voca_load_htkdict_line(), voca_load_wordlist_line(), wchmm_duplicate_leafnode(), wchmm_init(), wchmm_new(), winfo_init(), WMP_deltabuf_new(), word_info_new(), word_rev_align(), wordgraph_adjust_boundary_sub(), wordgraph_depth_cut(), wordgraph_new(), wordgraph_sort_and_annotate_id(), wt_dens(), wt_state(), wt_tmix(), wt_trans(), and wt_var().

void* myrealloc ( void *  ptr,
int  size 
)

Re-allocate memory area, keeping the existing data, as the same as realloc.

Parameters:
ptr [in] memory pointer to be re-allocated
size [in] required new size in bytes
Returns:
pointer to the the newly allocated area with existing data.

Definition at line 60 of file mymalloc.c.

Referenced by adin_cut_callback_store_buffer(), calc_tied_mix_extend(), CMN_realtime_update(), cn_add_wg(), config_file_parse(), dfa_pause_word_append(), dfa_state_expand(), expand_env(), new_str2phseq(), new_str2wordseq(), ngram_compact_context(), nw_expand(), outprob_cache_extend(), RealTimePipeLine(), regist_cdset(), shrink_successor(), terminfo_append(), voca_load_htkdict_line(), voca_load_wordlist_line(), wchmm_extend(), wchmm_extend_startnode(), winfo_expand(), wordgraph_add_leftword(), and wordgraph_add_rightword().

void* mycalloc ( int  nelem,
int  elsize 
)

Allocate memory area and set it to zero, as the same as calloc.

Parameters:
nelem [in] size of element in bytes
elsize [in] number of elements to allocate
Returns:
pointer to the newly allocated area.

Definition at line 79 of file mymalloc.c.

Referenced by CMN().

void swap_sample_bytes ( SP16 buf,
int  len 
)

Byte swapping of 16bit audio samples.

Parameters:
buf [i/o] data buffer
len [in] length of above

Definition at line 59 of file endian.c.

Referenced by adin_file_read(), adin_mic_read(), adin_stdin_read(), adin_tcpip_read(), NA_read(), and wrsamp().

void swap_bytes ( char *  buf,
size_t  unitbyte,
int  unitnum 
)

Generic byte-swapping functions for any size of unit.

Parameters:
buf [i/o] data buffer
unitbyte [in] size of unit in bytes
unitnum [in] number of unit in the buffer

Definition at line 35 of file endian.c.

Referenced by myread(), mywrite(), rdnfunc(), read_param(), and wrtfunc().

void jlog_set_output ( FILE *  fp  ) 

Set file pointer to output the log.

Set to NULL to totally disable the log outputs.

Parameters:
fp [in] file pointer or NULL to disable

Definition at line 52 of file jlog.c.

FILE* jlog_get_fp (  ) 

Return the current file pointer to output log.

Returns:
the file pointer.

Definition at line 65 of file jlog.c.

Referenced by check_hmm_limit(), make_dfa_voca_ref(), print_engine_info(), and wordgraph_remove_context().

void jlog ( char *  fmt,
  ... 
)

Output a normal message to log.

Parameters:
fmt [in] format string, like printf.
... [in] variable length argument like printf.

Definition at line 80 of file jlog.c.

Referenced by accept_from(), add_bigram(), add_unigram(), adin_cut(), adin_cut_callback_store_buffer(), adin_file_begin(), adin_file_close(), adin_file_open(), adin_file_read(), adin_file_standby(), adin_initialize(), adin_initialize_user(), adin_mic_begin(), adin_mic_end(), adin_mic_read(), adin_mic_standby(), adin_netaudio_read(), adin_setup_all(), adin_stdin_begin(), adin_stdin_read(), adin_tcpip_begin(), adin_tcpip_end(), adin_tcpip_read(), adin_tcpip_send_pause(), adin_tcpip_send_resume(), adin_tcpip_send_terminate(), adin_tcpip_standby(), adin_thread_create(), adjust_sc_index(), aptree_remove_entry(), build_state2gs(), callback_add_core(), callback_delete(), callback_exec(), callback_exec_adin(), callback_list_error(), charconv_iconv_setup(), charconv_libjcode_setup(), charconv_win32(), charconv_win32_setup(), check_format(), check_header(), check_hmm_limit(), check_hmm_options(), check_wchmm(), checkpath(), clear_stocker(), CMN_load_from_file(), CMN_save_to_file(), codebook_add(), compaction_successor(), config_file_parse(), cpair_append(), create_mfcc_calc_instances(), decode_end(), decode_proceed(), dens_add(), detect_end_of_segment(), dfa_pause_word_append(), dfa_symbol_lookup(), do_align(), expand_env(), extract_cpair(), fclose_readfile(), finalize_segment(), fopen_readfile(), fopen_writefile(), get_dens_data(), get_state_data(), get_total_info(), get_trans_data(), get_var_data(), getl_fd(), getl_sd(), gmm_init(), gmm_proceed(), gms_init(), graph_make_order(), guess_abs_e_location(), guess_basenum(), guess_if_cd_hmm(), hmm_add_physical_to_logical(), hmm_add_pseudo_phones(), hmm_add_pseudo_phones_sub(), hmm_check(), htk_config_file_parse(), htk_hmm_has_several_arc_on_edge(), htk_hmm_set_pause_model(), htk_hmmdata_add(), init_dfa(), init_hmminfo(), init_ngram_arpa(), init_ngram_arpa_additional(), init_ngram_bin(), init_voca(), init_wordlist(), initialize_dict(), initialize_GMM(), initialize_GSHMM(), initialize_HMM(), j_add_option(), j_create_instance_from_jconf(), j_final_fusion(), j_get_amconf_by_id(), j_get_amconf_by_name(), j_get_lmconf_by_id(), j_get_lmconf_by_name(), j_get_searchconf_by_id(), j_get_searchconf_by_name(), j_jconf_am_regist(), j_jconf_finalize(), j_jconf_lm_regist(), j_jconf_search_regist(), j_launch_recognition_instance(), j_load_all(), j_load_am(), j_load_lm(), j_mfcccalc_new(), j_process_activate(), j_process_activate_by_id(), j_process_add_lm(), j_process_am_remove(), j_process_deactivate(), j_process_deactivate_by_id(), j_process_lm_remove(), j_process_remove(), list_error(), make_base_phone(), make_connection(), make_connection_unix(), make_costbl_hamming(), make_costbl_makemfcc(), make_dfa_voca_ref(), make_fft_table(), make_log_tbl(), make_ngram_ref(), make_sintbl_wcep(), make_successor_list(), make_voca_ref(), mark_word_edge(), merge_contexts(), multigram_activate(), multigram_add(), multigram_add_prefix_filelist(), multigram_add_prefix_list(), multigram_add_words_to_grammar(), multigram_append_to_global(), multigram_build(), multigram_deactivate(), multigram_delete(), multigram_exec_activate(), multigram_exec_delete(), multigram_get_grammar_by_id(), multigram_get_grammar_by_name(), multigram_read_file_and_add(), multigram_rebuild_wchmm(), multigram_update(), mycalloc(), myfread(), mymalloc(), myread(), myrealloc(), NA_standby(), new_make_word_hmm_with_lm(), new_SS_load_from_file(), new_str2phseq(), new_str2wordseq(), next_arg(), ngram_compact_context(), ngram_nextwords(), ngram_prob(), ngram_read_arpa(), ngram_read_bin(), ngram_write_bin(), opt_parse(), param_alloc(), param_check_and_adjust(), param_qualstr2code(), param_strip_zero(), print_engine_info(), print_format(), print_jconf_overview(), put_all_in_stack(), rd(), rd_data(), rd_dens(), rd_header(), rd_para(), rd_state(), rd_tmix(), rd_trans(), rd_var(), rddfa_line(), rderr(), rdhmmdef(), rdhmmlist(), rdn_strfunc(), rdnfunc(), read_binhmm(), read_global_opt(), read_param(), ready_as_server(), RealTimeCMNUpdate(), RealTimeInit(), RealTimeParam(), RealTimePipeLine(), RealTimePipeLinePrepare(), regist_cdset(), remove_cdset(), reset_count_zc_e(), scan_word(), select_param_vmark(), set_beam_width(), set_ngram(), set_terminal_words(), set_unigram(), set_unknown_id(), setup_wav(), state_add(), store_result_pass2(), strip_zero(), swap_leftword(), swap_rightword(), tmix_create_codebook_index(), trans_add(), trans_ok_p(), useropt_exec(), var_add(), var_read(), viterbi_segment(), voca_load_htkdict_line(), voca_load_wordlist_line(), voca_lookup_wid(), Wav2MFCC(), wav2mfcc(), wchmm_add_word(), winfo_expand(), wordgraph_add_leftword(), wordgraph_add_rightword(), wordgraph_adjust_boundary(), wordgraph_adjust_boundary_sub(), wordgraph_check_and_add_leftword(), wordgraph_check_and_add_rightword(), wordgraph_depth_cut(), wordgraph_new(), wordgraph_purge_leaf_nodes(), wordgraph_remove_context(), write_binhmm(), write_header(), wrtfunc(), wrwav_close(), wt(), wt_data(), wt_dens(), wt_state(), wt_tmix(), wt_trans(), and wt_var().

int jlog_flush (  ) 

Flush text message.

The output device can be changed by set_print_func().

Returns:
the same as fflush, i.e. 0 on success, other if failed.

Definition at line 103 of file jlog.c.

Referenced by rderr().

char* mystrtok_quotation ( char *  str,
char *  delim,
int  left_paren,
int  right_paren,
int  mode 
)

Generic function to extract tokens from strings, with quotation handling.

The usage is as the same as strtok.

Parameters:
str [i/o] source string, or NULL when this is a continuous call from previous call. Will be truncated in this function.
delim [in] string to specify the delimiters.
left_paren [in] left brace
right_paren [in] right brace
mode [in] if 1, just move to the beginning of next token
Returns:
pointer to the next extracted token.

Definition at line 51 of file mystrtok.c.

Referenced by mystrtok(), mystrtok_movetonext(), mystrtok_quote(), voca_load_htkdict_line(), and voca_load_wordlist_line().

char* mystrtok_quote ( char *  str,
char *  delim 
)

Extract tokens considering quotation by double quotation mark.

Parameters:
str [i/o] source string, will be truncated.
delim [in] string of all token delimiters
Returns:
pointer to the next extracted token, or NULL when no token found.

Definition at line 107 of file mystrtok.c.

Referenced by read_token(), voca_load_htkdict_line(), and voca_load_wordlist_line().

char* mystrtok ( char *  str,
char *  delim 
)

Extract tokens, not considering quotation, just as the same as strtok.

Parameters:
str [i/o] source string, will be truncated.
delim [in] string of all token delimiters
Returns:
pointer to the next extracted token, or NULL when no token found.

Definition at line 121 of file mystrtok.c.

Referenced by voca_load_htkdict_line(), and voca_load_wordlist_line().

char* mystrtok_movetonext ( char *  str,
char *  delim 
)

Just move to the beginning of the next token, without modifying the str.

Parameters:
str [i/o] source string, will be truncated.
delim [in] string of all token delimiters
Returns:
pointer to the next extracted token, or NULL when no token found.

Definition at line 135 of file mystrtok.c.

Referenced by voca_load_htkdict_line(), and voca_load_wordlist_line().

void confout ( FILE *  strm  ) 

Output all information of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 136 of file confout.c.

Referenced by j_put_library_defs().

void confout_version ( FILE *  strm  ) 

Output version of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 36 of file confout.c.

void confout_audio ( FILE *  strm  ) 

Output audio configuration of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 47 of file confout.c.

void confout_lm ( FILE *  strm  ) 

Output language model configuration of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 68 of file confout.c.

void confout_am ( FILE *  strm  ) 

Output acoustic model configuration of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 89 of file confout.c.

void confout_lib ( FILE *  strm  ) 

Output about linked libraries of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 108 of file confout.c.

void confout_process ( FILE *  strm  ) 

Output about process handling of this libsent library.

Parameters:
strm [in] file pointer to output

Definition at line 120 of file confout.c.


Generated on Tue Dec 18 16:01:37 2007 for Julius by  doxygen 1.5.4