实施",;“更多过滤器”;在C中
我想知道如何实现更多的过滤器-就像在显示文本中一样,直到它填满屏幕并用“回车”移动每一行(就像在UNIX中一样)。我知道网络课程很有用,但找不到合适的方法实施",;“更多过滤器”;在C中,c,shell,unix,C,Shell,Unix,我想知道如何实现更多的过滤器-就像在显示文本中一样,直到它填满屏幕并用“回车”移动每一行(就像在UNIX中一样)。我知道网络课程很有用,但找不到合适的方法 谢谢 实现两个缓冲区 这可以是一个大纲: Read from file into the 1st buffer. offset=0 while `offset != total_lines_in_file` [1] show `max_lines_in_a_page` number of lines starting from line
谢谢 实现两个缓冲区 这可以是一个大纲:
Read from file into the 1st buffer.
offset=0
while `offset != total_lines_in_file`
[1] show `max_lines_in_a_page` number of lines starting from line number `offset`
[2] when showing the lines if a buffer end is detected, load the other buffer and switch buffer, and print remaining lines.
[3] if the specific scroll keypress is detected make `offset = offset + x` (x = 1, 2 etc.)
最好查看
more
实现的源代码。查看源代码了解更多信息如何?您可以阅读简单more
变体的实际源代码,例如。对于,不需要更多的完整课程;仅获取屏幕大小(这也是可选的)。