vtwrap

Fake ptty allocator
git clone https://git.sinitax.com/sinitax/vtwrap
Log | Files | Refs | LICENSE | sfeed.txt

commit e5f5e5e6e5e5515d41a5ed8d662d3181d94a08d2
parent f4cdd9172cc6eca6a28cb60b3de5c96b8631bf93
Author: Louis Burda <quent.burda@gmail.com>
Date:   Sun, 19 Nov 2023 02:40:56 +0100

Rename flags and add usage

Diffstat:
Mapty.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/apty.c b/apty.c @@ -116,10 +116,13 @@ main(int argc, char **argv) } if (tcgetattr(fd, &termios)) err(1, "tcgetattr tty"); - } else if (!strcmp(*arg, "-w") || !strcmp(*arg, "--width")) { + } else if (!strcmp(*arg, "-c") || !strcmp(*arg, "--cols")) { winsize.ws_col = atoi(*++arg); - } else if (!strcmp(*arg, "-h") || !strcmp(*arg, "--height")) { + } else if (!strcmp(*arg, "-r") || !strcmp(*arg, "--rows")) { winsize.ws_row = atoi(*++arg); + } else if (!strcmp(*arg, "-h") || !strcmp(*arg, "--help")) { + fprintf(stderr, "Usage: apty [-r ROWS] [-c COLS] [-h] [--] CMD\n"); + return 0; } else if (!strcmp(*arg, "--")) { arg++; break;