readline.h

来自「eC++编译器源码」· C头文件 代码 · 共 15 行

H
15
字号
//This module reads strings from a file a line at a time
#pragma ReadLine
#include <stdio.h>

typedef struct {
  FILE *file;
  char buffer[512];
  unsigned int max, pointer;
} Lines;

void Open(Lines &line, FILE *file);  //an open file, if file==NULL, stdin is assumed

int Read(Lines &line, char &output[]); //-1 on eof; otherwise count of chars in output

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?