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:
parent
1f2902ecfd
commit
4e520c8c36
2 changed files with 0 additions and 18 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue