Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 1881 → Rev 1882

/programs/develop/libraries/menuetlibc/src/libc/ansi/stdio/fgets.c
0,0 → 1,18
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <libc/file.h>
 
char * fgets(char *s, int n, FILE *f)
{
int c=0;
char *cs;
cs = s;
while (--n>0 && (c = __getc(f)) != EOF)
{
*cs++ = c;
if (c == '\n') break;
}
if (c == EOF && cs == s) return NULL;
*cs++ = '\0';
return s;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property