1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Remove sortix_gets(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2013-09-23 22:10:29 +02:00
parent 1f2902ecfd
commit 4e520c8c36
2 changed files with 0 additions and 18 deletions

View file

@ -174,13 +174,6 @@ extern FILE* _firstfile;
#endif
#endif
#if (defined(_SOURCE_SOURCE) && __SORTIX_STDLIB_REDIRECTS) || \
defined(_WANT_SORTIX_GETS)
char* gets(void) asm ("sortix_gets");
#else
/* traditional gets(3) is no longer POSIX, hence removed. */
#endif
#if defined(_SORTIX_SOURCE) || defined(_WANT_SORTIX_VPRINTF_CALLBACK)
size_t vprintf_callback(size_t (*callback)(void*, const char*, size_t),
void* user,

View file

@ -57,17 +57,6 @@ extern "C" int putchar(int c)
return fputc(c, stdout);
}
extern "C" char* sortix_gets(void)
{
char* buf = NULL;
size_t n;
if ( getline(&buf, &n, stdin) < 0 )
return NULL;
size_t linelen = strlen(buf);
if ( linelen && buf[linelen-1] == '\n' ) { buf[linelen-1] = 0; }
return buf;
}
extern "C" int puts(const char* str)
{
return printf("%s\n", str) < 0 ? EOF : 1;