libsent/src/util/readfile.c

様々な入力からテキストを行単位で読み込む関数群 [詳細]

#include <sent/stddefs.h>
#include <sent/tcpip.h>
#include <zlib.h>

ソースコードを見る。

関数

char * getl (char *buf, int maxlen, FILE *fp)
 Read one line from file that has been opened by fopen_readfile().
char * getl_fp (char *buf, int maxlen, FILE *fp)
 Read one line from file pointer.
char * getl_fd (char *buf, int maxlen, int fd)
 Read one line from a file descriptor.
char * getl_sd (char *buf, int maxlen, int sd)
 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 .


説明

様々な入力からテキストを行単位で読み込む関数群

入力ストリームやファイルデスクプリタなど,様々なソースから テキスト入力を行単位で読み込むための関数群です. 読み込み時において,空行は無視されます.また行末の改行は削除されます.

作者:
Akinobu LEE
日付:
Thu Feb 17 16:41:58 2005
Revision
1.1.1.1

readfile.c で定義されています。


関数

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.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer or gzFile pointer
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c53 行で定義されています。

参照元 add_bigram(), add_unigram(), get_total_info(), ngram_read_arpa(), rddfa(), rdhmmlist(), read_token(), set_ngram(), set_unigram(), voca_load_htkdict(), と voca_load_wordlist().

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

Read one line from file pointer.

Blank line will be skipped.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c86 行で定義されています。

参照元 adin_file_begin(), htk_config_file_parse(), main_recognition_stream_loop(), と 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.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fd [in] file descriptor
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c114 行で定義されています。

参照元 rddfa_fd(), と 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.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
sd [in] socket descpritor
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c152 行で定義されています。

参照元 rddfa_sd(), と 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.

引数:
buf [out] buffer to hold input text line
buflen [in] length of the buffer
prompt [in] prompt string
戻り値:
pointer to buf, or NULL on EOF input.

readfile.c193 行で定義されています。

参照元 adin_file_begin(), main(), と main_recognition_stream_loop().


Juliusに対してTue Dec 18 16:05:05 2007に生成されました。  doxygen 1.5.4