#include <sent/stddefs.h>
#include <sent/tcpip.h>
#include <zlib.h>
Go to the source code of this file.
Functions | |
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 * | get_line_from_stdin (char *buf, int buflen, char *prompt) |
Get one file name from stdin with a prompt . |
This file provides functions to read text inputs from various input source such as file pointer, file descpritor, socket descriptor. The input will be read per line, and the newline characters are removed. Also, blank lines will be ignored.
Definition in file 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 |
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_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.
buf | [out] data buffer | |
maxlen | [in] maximum length of above | |
fp | [in] file pointer |
Definition at line 87 of file readfile.c.
Referenced by adin_file_begin(), adin_sndfile_begin(), htk_config_file_parse(), main_recognition_stream_loop(), multigram_add_prefix_filelist(), rddfa_fp(), voca_load_htkdict_fp(), and voca_load_wordlist_fp().
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 |
Definition at line 118 of file readfile.c.
Referenced by adin_file_begin(), adin_sndfile_begin(), main(), and main_recognition_stream_loop().