Rev 8793 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8687 | turbocat | 1 | #include |
2 | #include |
||
3 | #include "conio.h" |
||
4 | #include |
||
5 | #include |
||
6 | |||
7 | char *gets(char* str) |
||
8 | { |
||
8744 | turbocat | 9 | con_init(); |
10 | if(con_gets(str, STDIO_MAX_MEM)==NULL){ |
||
8687 | turbocat | 11 | errno = EIO; |
12 | return NULL; |
||
13 | } |
||
9081 | turbocat | 14 | |
15 | int str_len = strlen(str); |
||
16 | if(str[str_len-1]=='\n'){ |
||
17 | str[str_len-1]='\0'; |
||
18 | } |
||
8687 | turbocat | 19 | return str; |
9081 | turbocat | 20 | } |