- Move source code from `trunk` into program root directory. - Update build files and include paths. - Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
19 lines
307 B
C
19 lines
307 B
C
#include <stdio.h>
|
|
#include "conio.h"
|
|
#include <errno.h>
|
|
|
|
char *fgets(char *str, int n, FILE *stream)
|
|
{
|
|
int i=0, sym_code;
|
|
|
|
if(!stream || !str){
|
|
errno = EINVAL;
|
|
return NULL;
|
|
}
|
|
|
|
i = fread(str, n-1, sizeof(char), stream);
|
|
if(i<1){ return NULL; }
|
|
return str;
|
|
}
|
|
|