⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mgetl.txt

📁 [随书类]Dos6.0源代码
💻 TXT
字号:
SUMMARY mgetl

#include <tools.h>

char *mgetl(pbuf, len, pSrc);
char *pbuf;
int len;
char *pSrc;

DESCRIPTION

mgetl gets the next line from the memory at pSrc.  CR and LF are removed
and line is terminated with '\0'.  len is the max number of characters
that may be stored into pbuf.  Returns NULL if *pSrc == NULL at entry else
returns pointer to next char in pSrc to be processed.

Tabs, \t, are replaced by appropriate number of blanks to reach the next
tab stop.  Tabs tops are at n*8 for n greater than or equal to zero.


RETURN VALUE

See above.

IMPLEMENTATION


SEE ALSO  fgetl 

NOTE


EXAMPLE

#include <tools.h>

#define BUFLEN 256
char *strSRC = "firt line\n\ttabbed line\n";
char strLine[BUFLEN];

char *mgetl(char *, int, char *);

main(c, argv)
int c;
char *argv[];
{

    char *p = strSRC;

    while ( ( p = mgetl ( strLine, BUFLEN, p ) ) )
        printf("%s\n", strLine);
}
f

⌨️ 快捷键说明

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