sumom****@users*****
sumom****@users*****
2009年 9月 18日 (金) 17:31:08 JST
Index: julius4/libsent/include/sent/adin.h diff -u julius4/libsent/include/sent/adin.h:1.6 julius4/libsent/include/sent/adin.h:1.7 --- julius4/libsent/include/sent/adin.h:1.6 Fri Jul 3 02:05:20 2009 +++ julius4/libsent/include/sent/adin.h Fri Sep 18 17:31:08 2009 @@ -19,7 +19,7 @@ * @author Akinobu LEE * @date Thu Feb 10 17:22:36 2005 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ */ /* * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University @@ -144,6 +144,11 @@ #define ZC_POSITIVE 1 ///< Positive mark used for zerocross #define ZC_NEGATIVE -1 ///< Negative mark used for zerocross + +#ifdef __cplusplus +extern "C" { +#endif + /* adin/adin_mic_*.c */ boolean adin_mic_standby(int freq, void *arg); boolean adin_mic_begin(char *pathname); @@ -225,4 +230,9 @@ void ds48to16_free(DS_BUFFER *ds); int ds48to16(SP16 *dst, SP16 *src, int srclen, int maxdstlen, DS_BUFFER *ds); +#ifdef __cplusplus +} +#endif + + #endif /* __SENT_ADIN__ */ Index: julius4/libsent/include/sent/dfa.h diff -u julius4/libsent/include/sent/dfa.h:1.4 julius4/libsent/include/sent/dfa.h:1.5 --- julius4/libsent/include/sent/dfa.h:1.4 Tue Aug 5 18:50:53 2008 +++ julius4/libsent/include/sent/dfa.h Fri Sep 18 17:31:08 2009 @@ -29,7 +29,7 @@ * @author Akinobu LEE * @date Thu Feb 10 18:21:27 2005 * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * */ /* @@ -93,6 +93,10 @@ WORD_ID sp_id; ///< Word ID of short pause word } DFA_INFO; +#ifdef __cplusplus +extern "C" { +#endif + DFA_INFO *dfa_info_new(); void dfa_info_free(DFA_INFO *dfa); void dfa_state_init(DFA_INFO *dinfo); @@ -131,4 +135,8 @@ void dfa_find_pause_word(DFA_INFO *dfa, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo); boolean dfa_pause_word_append(DFA_INFO *dst, DFA_INFO *src, int coffset); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_DFA_H__ */ Index: julius4/libsent/include/sent/hmm.h diff -u julius4/libsent/include/sent/hmm.h:1.2 julius4/libsent/include/sent/hmm.h:1.3 --- julius4/libsent/include/sent/hmm.h:1.2 Tue Dec 18 17:45:50 2007 +++ julius4/libsent/include/sent/hmm.h Fri Sep 18 17:31:08 2009 @@ -21,7 +21,7 @@ * @author Akinobu LEE * @date Thu Feb 10 14:54:06 2005 * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * */ /* @@ -98,6 +98,10 @@ struct _seg_token *list; ///< Link to next token, NULL if last } SEGTOKEN; +#ifdef __cplusplus +extern "C" { +#endif + /* mkwhmm.c */ HMM *new_make_word_hmm(HTK_HMM_INFO *, HMM_Logical **, int, boolean *); HMM *new_make_word_hmm_with_lm(HTK_HMM_INFO *, HMM_Logical **, int, boolean *, LOGPROB *); @@ -112,4 +116,8 @@ void put_hmm_outprob(FILE *fp, HMM *d); void put_hmm(FILE *fp, HMM *d); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_HMM_NEW2_H__ */ Index: julius4/libsent/include/sent/hmm_calc.h diff -u julius4/libsent/include/sent/hmm_calc.h:1.6 julius4/libsent/include/sent/hmm_calc.h:1.7 --- julius4/libsent/include/sent/hmm_calc.h:1.6 Thu Sep 25 14:00:07 2008 +++ julius4/libsent/include/sent/hmm_calc.h Fri Sep 18 17:31:08 2009 @@ -13,7 +13,7 @@ * @author Akinobu LEE * @date Thu Feb 10 14:54:06 2005 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * */ /* @@ -157,6 +157,10 @@ } HMMWork; +#ifdef __cplusplus +extern "C" { +#endif + /* addlog.c */ void make_log_tbl(); LOGPROB addlog(LOGPROB x, LOGPROB y); @@ -219,4 +223,9 @@ void gprune_beam_free(HMMWork *wrk); void gprune_beam(HMMWork *wrk, HTK_HMM_Dens **g, int gnum, int *last_id, int lnum); + +#ifdef __cplusplus +} +#endif + #endif /* __SENT_HMM_CALC_H__ */ Index: julius4/libsent/include/sent/htk_hmm.h diff -u julius4/libsent/include/sent/htk_hmm.h:1.6 julius4/libsent/include/sent/htk_hmm.h:1.7 --- julius4/libsent/include/sent/htk_hmm.h:1.6 Fri Nov 14 01:55:52 2008 +++ julius4/libsent/include/sent/htk_hmm.h Fri Sep 18 17:31:08 2009 @@ -16,7 +16,7 @@ * @author Akinobu LEE * @date Thu Feb 10 19:36:47 2005 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * */ /* @@ -413,6 +413,11 @@ //@} } HTK_HMM_INFO; + +#ifdef __cplusplus +extern "C" { +#endif + /* init_phmm.c */ void htk_hmm_set_pause_model(HTK_HMM_INFO *hmminfo, char *spmodel_name); /* rdhmmdef.c */ @@ -526,4 +531,9 @@ boolean write_binhmm(FILE *fp, HTK_HMM_INFO *hmm, Value *para); boolean read_binhmm(FILE *fp, HTK_HMM_INFO *hmm, boolean gzfile_p, Value *para); +#ifdef __cplusplus +} +#endif + + #endif /* __SENT_HTK_HMM_2_H__ */ Index: julius4/libsent/include/sent/htk_param.h diff -u julius4/libsent/include/sent/htk_param.h:1.2 julius4/libsent/include/sent/htk_param.h:1.3 --- julius4/libsent/include/sent/htk_param.h:1.2 Tue Dec 18 17:45:50 2007 +++ julius4/libsent/include/sent/htk_param.h Fri Sep 18 17:31:08 2009 @@ -48,7 +48,7 @@ * @author Akinobu LEE * @date Fri Feb 11 02:52:52 2005 * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * */ /* @@ -89,6 +89,10 @@ */ #define HTK_PARAM_INCREMENT_STEP_FRAME 200 +#ifdef __cplusplus +extern "C" { +#endif + boolean rdparam(char *, HTK_Param *); HTK_Param *new_param(); void free_param(HTK_Param *); @@ -110,4 +114,8 @@ void put_param(FILE *fp, HTK_Param *pinfo); void put_param_info(FILE *fp, HTK_Param *pinfo); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_HTK_PARAM_H__ */ Index: julius4/libsent/include/sent/machines.h diff -u julius4/libsent/include/sent/machines.h:1.2 julius4/libsent/include/sent/machines.h:1.3 --- julius4/libsent/include/sent/machines.h:1.2 Tue Dec 18 17:45:50 2007 +++ julius4/libsent/include/sent/machines.h Fri Sep 18 17:31:08 2009 @@ -21,7 +21,7 @@ * @author Akinobu LEE * @date Fri Feb 11 03:38:31 2005 * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * */ /* @@ -37,8 +37,14 @@ #include <sent/stddefs.h> #ifndef HAVE_STRCASECMP +#ifdef __cplusplus +extern "C" { +#endif int strcasecmp(char *s1, char *s2); int strncasecmp(char *s1, char *s2, size_t n); +#ifdef __cplusplus +} +#endif #endif #endif /* __SENT_MACHINES_H__ */ Index: julius4/libsent/include/sent/mfcc.h diff -u julius4/libsent/include/sent/mfcc.h:1.4 julius4/libsent/include/sent/mfcc.h:1.5 --- julius4/libsent/include/sent/mfcc.h:1.4 Tue Jun 17 10:20:51 2008 +++ julius4/libsent/include/sent/mfcc.h Fri Sep 18 17:31:08 2009 @@ -27,7 +27,7 @@ * @author Akinobu LEE * @date Fri Feb 11 03:40:52 2005 * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * */ @@ -205,6 +205,11 @@ LOGPROB max; ///< Maximum energy value of current input } ENERGYWork; + +#ifdef __cplusplus +extern "C" { +#endif + /**** mfcc-core.c ****/ MFCCWork *WMP_work_new(Value *para); void WMP_calc(MFCCWork *w, float *mfcc, Value *para); @@ -279,5 +284,8 @@ void calc_para_from_header(Value *para, short param_type, short vec_size); void put_para(FILE *fp, Value *para); +#ifdef __cplusplus +} +#endif #endif /* __MFCC_H__ */ Index: julius4/libsent/include/sent/ngram2.h diff -u julius4/libsent/include/sent/ngram2.h:1.7 julius4/libsent/include/sent/ngram2.h:1.8 --- julius4/libsent/include/sent/ngram2.h:1.7 Sat Jul 4 23:11:43 2009 +++ julius4/libsent/include/sent/ngram2.h Fri Sep 18 17:31:08 2009 @@ -95,7 +95,7 @@ * @author Akinobu LEE * @date Fri Feb 11 15:04:02 2005 * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * */ /* @@ -215,6 +215,11 @@ #define BINGRAM_NATURAL_BYTEORDER "LE" #endif + +#ifdef __cplusplus +extern "C" { +#endif + /* function declaration */ NNID search_ngram(NGRAM_INFO *ndata, int n, WORD_ID *w); LOGPROB ngram_prob(NGRAM_INFO *ndata, int n, WORD_ID *w); @@ -245,4 +250,8 @@ boolean make_voca_ref(NGRAM_INFO *ndata, WORD_INFO *winfo); void fix_uniprob_srilm(NGRAM_INFO *ndata, WORD_INFO *winfo); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_NGRAM2_H__ */ Index: julius4/libsent/include/sent/ptree.h diff -u julius4/libsent/include/sent/ptree.h:1.4 julius4/libsent/include/sent/ptree.h:1.5 --- julius4/libsent/include/sent/ptree.h:1.4 Tue Feb 10 02:27:46 2009 +++ julius4/libsent/include/sent/ptree.h Fri Sep 18 17:31:08 2009 @@ -17,7 +17,7 @@ * @author Akinobu LEE * @date Fri Feb 11 17:27:24 2005 * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * */ /* @@ -64,6 +64,11 @@ struct _patnode *right1; ///< Link to right node (bit=1) } PATNODE; + +#ifdef __cplusplus +extern "C" { +#endif + int testbit(char *str, int slen, int bitplace); int testbit_max(char *str, int bitplace, int maxbitplace); int where_the_bit_differ(char *str1, char *str2); @@ -83,4 +88,8 @@ boolean aptree_write(FILE *fp, APATNODE *root, boolean (*save_data_func)(void *, FILE *fp)); boolean aptree_read(FILE *fp, APATNODE **root, BMALLOC_BASE **mroot, void *data, boolean (*load_data_func)(void **, void *, FILE *fp)); +#ifdef __cplusplus +} +#endif + #endif /* __PATRICIA_TREE_H__ */ Index: julius4/libsent/include/sent/speech.h diff -u julius4/libsent/include/sent/speech.h:1.2 julius4/libsent/include/sent/speech.h:1.3 --- julius4/libsent/include/sent/speech.h:1.2 Tue Dec 18 17:45:50 2007 +++ julius4/libsent/include/sent/speech.h Fri Sep 18 17:31:08 2009 @@ -23,7 +23,7 @@ * @author Akinobu LEE * @date Sat Feb 12 11:16:41 2005 * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * */ /* @@ -97,6 +97,11 @@ */ #define OUTPROB_CACHE_PERIOD 100 + +#ifdef __cplusplus +extern "C" { +#endif + /// Macro to convert smpPeriod (100nsec unit) to frequency (Hz) #define period2freq(A) (10000000.0 / (float)(A)) /// Macro to convert sampling frequency (Hz) to smpPeriod (100nsec unit) @@ -113,4 +118,8 @@ /* for an;z/strip.c */ int strip_zero(SP16 a[], int len); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_SPEECH__ */ Index: julius4/libsent/include/sent/stddefs.h diff -u julius4/libsent/include/sent/stddefs.h:1.3 julius4/libsent/include/sent/stddefs.h:1.4 --- julius4/libsent/include/sent/stddefs.h:1.3 Tue Jan 22 22:01:55 2008 +++ julius4/libsent/include/sent/stddefs.h Fri Sep 18 17:31:08 2009 @@ -29,7 +29,7 @@ * @author Akinobu LEE * @date Sat Feb 12 11:49:37 2005 * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * */ /* @@ -44,14 +44,13 @@ /* load site-dependent configuration by configure script */ #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__) -#include <sent/config-win.h> +#include <config-msvc-libsent.h> #else #include <sent/config.h> #endif #include <stdio.h> #include <stdlib.h> -#include <strings.h> #include <string.h> #include <math.h> #if !defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__) Index: julius4/libsent/include/sent/tcpip.h diff -u julius4/libsent/include/sent/tcpip.h:1.2 julius4/libsent/include/sent/tcpip.h:1.3 --- julius4/libsent/include/sent/tcpip.h:1.2 Tue Dec 18 17:45:50 2007 +++ julius4/libsent/include/sent/tcpip.h Fri Sep 18 17:31:08 2009 @@ -11,7 +11,7 @@ * @author Akinobu LEE * @date Sat Feb 12 12:26:15 2005 * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * */ /* @@ -53,6 +53,11 @@ /// Interval time between retry in seconds #define CONNECTION_RETRY_INTERVAL 2 /* sec. */ + +#ifdef __cplusplus +extern "C" { +#endif + /* net/rdwt.c */ int rd(int fd, char *data, int *len, int maxlen); int wt(int fd, char *data, int len); @@ -64,4 +69,8 @@ int close_socket(int sd); void cleanup_socket(); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_SPEECH_TCPIP__ */ Index: julius4/libsent/include/sent/util.h diff -u julius4/libsent/include/sent/util.h:1.6 julius4/libsent/include/sent/util.h:1.7 --- julius4/libsent/include/sent/util.h:1.6 Sat Jan 31 00:04:18 2009 +++ julius4/libsent/include/sent/util.h Fri Sep 18 17:31:08 2009 @@ -21,7 +21,7 @@ * @author Akinobu LEE * @date Sat Feb 12 12:30:40 2005 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * */ /* @@ -57,6 +57,11 @@ struct _bmalloc_base *next; ///< Link to next data, NULL if no more } BMALLOC_BASE; + +#ifdef __cplusplus +extern "C" { +#endif + /* readfile.c */ char *getl(char *, int, FILE *); char *getl_fp(char *, int, FILE *); @@ -112,5 +117,8 @@ /* qsort.c */ void qsort_reentrant(void *base, int count, int size, int (*compare)(const void *, const void *, void *), void *pointer); +#ifdef __cplusplus +} +#endif #endif /* __SENT_UTIL_H__ */ Index: julius4/libsent/include/sent/vocabulary.h diff -u julius4/libsent/include/sent/vocabulary.h:1.5 julius4/libsent/include/sent/vocabulary.h:1.6 --- julius4/libsent/include/sent/vocabulary.h:1.5 Tue Feb 10 02:27:46 2009 +++ julius4/libsent/include/sent/vocabulary.h Fri Sep 18 17:31:08 2009 @@ -30,7 +30,7 @@ * @author Akinobu LEE * @date Sat Feb 12 12:38:13 2005 * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * */ /* @@ -80,6 +80,10 @@ BMALLOC_BASE *mroot; ///< Pointer for block memory allocation } WORD_INFO; +#ifdef __cplusplus +extern "C" { +#endif + WORD_INFO *word_info_new(); void word_info_free(WORD_INFO *winfo); void winfo_init(WORD_INFO *winfo); @@ -115,4 +119,8 @@ void print_all_basephone_name(HMM_basephone *base); void test_interword_triphone(HTK_HMM_INFO *hmminfo, WORD_INFO *winfo); +#ifdef __cplusplus +} +#endif + #endif /* __SENT_VOCA_H__ */