Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "conio.h"
  4. #include <errno.h>
  5. #include <limits.h>
  6.  
  7. char *gets(char* str)
  8. {
  9.     __con_init();
  10.     if(__con_gets(str, STDIO_MAX_MEM)==NULL){
  11.         errno = EIO;
  12.         return NULL;
  13.     }
  14.     str[strlen(str)-1]='\0';
  15.     return str;
  16. }