Rev 8793 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8793 | Rev 9081 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | if(!stream || !str){ |
9 | if(!stream || !str){ |
10 | errno = EINVAL; |
10 | errno = EINVAL; |
11 | return NULL; |
11 | return NULL; |
12 | } |
12 | } |
Line 13... | Line -... | ||
13 | - | ||
14 | while (i |
13 | |
15 | sym_code = fgetc(stream); |
- | |
16 | if(sym_code =='\n' || sym_code == EOF){ break; } |
- | |
17 | str[i]=(char)sym_code; |
- | |
18 | i++; |
- | |
19 | } |
- | |
20 | 14 | i = fread(str, n-1, sizeof(char), stream); |
|
21 | if(i<1){ return NULL; } |
15 | if(i<1){ return NULL; } |
22 | return str; |
16 | return str; |
Line 23... | Line 17... | ||
23 | }1){> |
17 | }1){> |