readline.c

来自「在linux下的聊天软件」· C语言 代码 · 共 24 行

C
24
字号
/*
  readline.c
  
  Hacked for Free Chat to allow for BINARY-FTP'd files (strips &M)

  by bill kendrick, ported to NT by Patrick Stepp
  kendrick@zippy.sonoma.edu, stepp@adelphia.net
  http://zippy.sonoma.edu/kendrick/
  
  reads a line using fgets
*/

#include <stdio.h>
#include <string.h>
#include "defines.h"

void readline(FILE * fi, char * buf)
{
  fgets(buf, STRLEN, fi);
  buf[strlen(buf)-1] = '\0';
  /*  if (buf[strlen(buf)-1] == 13)
    buf[strlen(buf)-1] = '\0'; */
}

⌨️ 快捷键说明

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