mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
Do code cleanup use duff device linenoise i/o
This commit is contained in:
parent
6ff46ca373
commit
2f56ebfe78
79 changed files with 1393 additions and 1484 deletions
|
@ -29,7 +29,7 @@ errno_t ptsname_r(int fd, char *buf, size_t size) {
|
|||
if (size) {
|
||||
if (!buf) return einval();
|
||||
if (ioctl(fd, TIOCGPTN, &pty) == -1) return errno;
|
||||
int64toarray_radix10(pty, stpcpy(tb, "/dev/pts/"));
|
||||
FormatInt32(stpcpy(tb, "/dev/pts/"), pty);
|
||||
if (strlen(tb) + 1 >= size) return (errno = ERANGE);
|
||||
stpcpy(buf, tb);
|
||||
/* TODO(jart): OpenBSD OMG */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue