The logic used for form-feed-delimited pages is roughly the same, but slightly simpler, as there is no need for a line counter: Read char by char using the getc library function.
用于换页定界的页的逻辑大体上相同,只是稍稍简单一些,因为不需要行计数器:使用getc库函数逐个读取字符。
If the page type is fixed-lines-per-page, we read input line by line using the fgets library function.
若页类型是每页行数固定的,则使用fgets库函数逐行读取输入。
If the search term is not found, the function simply proceeds to read the next text line in the script file.
如果没有找到查找项的话,函数就会读取脚本中的下一个文本行。
Once the file is opened, the function begins traversing the script file once text line at a time. Each line is read in as a string.
一旦成功打开文件,函数便开始逐行遍历脚本,并把每一行都当作一个字符串读取进来。
The fgets() function is used to read a single line from a file.
函数用来读取文件中的一行内容。
The fgets() function is used to read a single line from a file.
函数用来读取文件中的一行内容。
应用推荐