ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/fptools.c
(Generate patch)

Comparing Convert-UUlib/uulib/fptools.c (file contents):
Revision 1.17 by root, Sat Dec 12 03:54:59 2020 UTC vs.
Revision 1.18 by root, Sun Dec 13 03:08:48 2020 UTC

62 return TRUE; 62 return TRUE;
63} 63}
64#endif 64#endif
65#endif 65#endif
66 66
67char * fptools_id = "$Id: fptools.c,v 1.17 2020/12/12 03:54:59 root Exp $"; 67char * fptools_id = "$Id: fptools.c,v 1.18 2020/12/13 03:08:48 root Exp $";
68 68
69/* 69/*
70 * some versions of free can't handle a NULL pointer properly 70 * some versions of free can't handle a NULL pointer properly
71 * (ANSI says, free ignores a NULL pointer, but some machines 71 * (ANSI says, free ignores a NULL pointer, but some machines
72 * prefer to SIGSEGV on it) 72 * prefer to SIGSEGV on it)
440 * My own fgets function. It handles all kinds of line terminators 440 * My own fgets function. It handles all kinds of line terminators
441 * properly: LF (Unix), CRLF (DOS) and CR (Mac). 441 * properly: LF (Unix), CRLF (DOS) and CR (Mac).
442 */ 442 */
443/* (schmorp) the buffer is always written to, and no LF is stored at the end */ 443/* (schmorp) the buffer is always written to, and no LF is stored at the end */
444/* also, if the buffer is too short, the remaining line is skipped */ 444/* also, if the buffer is too short, the remaining line is skipped */
445char * TOOLEXPORT 445ecb_hot char * TOOLEXPORT
446FP_fgets (char *buf, int n, FILE *stream) 446FP_fgets (char *buf, int n, FILE *stream)
447{ 447{
448 char *ptr = buf; 448 char *ptr = buf;
449 char *end = buf + n - 1; 449 char *end = buf + n - 1;
450 450

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines