From 1383ce852dfc0c85de03e8e0ab838090b7fcd679 Mon Sep 17 00:00:00 2001 From: Rutger van Bergen Date: Wed, 22 Dec 2021 18:20:05 +0100 Subject: [PATCH] Add short options --- minsk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/minsk.c b/minsk.c index 669492a..419ce0d 100644 --- a/minsk.c +++ b/minsk.c @@ -1297,16 +1297,16 @@ static void usage(void) fprintf(stderr, "Options:\n\n"); #ifdef ENABLE_DAEMON_MODE fprintf(stderr, "\ ---daemon Run as daemon and listen for network connections\n\ ---nofork When run with --daemon, avoid forking\n\ +-d, --daemon Run as daemon and listen for network connections\n\ +-n, --nofork When run with --daemon, avoid forking\n\ "); #endif fprintf(stderr, "\ ---english Print messages in English\n\ ---set-password Put hidden password in memory\n\ ---trace= Enable tracing of program execution\n\ ---cpu-quota= Set CPU quota to instructions\n\ ---print-quota= Set printer quota to lines\n\ +-e, --english Print messages in English\n\ +-s, --set-password Put hidden password in memory\n\ +-t, --trace= Enable tracing of program execution\n\ +-q, --cpu-quota= Set CPU quota to instructions\n\ +-p, --print-quota= Set printer quota to lines\n\ "); exit(1); } @@ -1318,7 +1318,7 @@ int main(int argc, char **argv) int do_fork = 1; int set_password = 0; - while ((opt = getopt_long(argc, argv, "", longopts, NULL)) >= 0) + while ((opt = getopt_long(argc, argv, "q:desnp:t:", longopts, NULL)) >= 0) switch (opt) { case 'd': -- 2.39.2