Rev 8793 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8687 | turbocat | 1 | #include |
2 | #include "conio.h" |
||
3 | #include |
||
4 | |||
5 | char *fgets(char *str, int n, FILE *stream) |
||
6 | { |
||
7 | int i=0, sym_code; |
||
8 | |||
9 | if(!stream || !str){ |
||
10 | errno = EINVAL; |
||
11 | return NULL; |
||
12 | } |
||
13 | |||
9081 | turbocat | 14 | i = fread(str, n-1, sizeof(char), stream); |
8687 | turbocat | 15 | if(i<1){ return NULL; } |
16 | return str; |
||
17 | }1){> |
||
9081 | turbocat | 18 |