From 0735a45f38c8d7eee195972fddd335c17b53f524 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 23 Aug 2002 17:45:40 +0000 Subject: [PATCH] make it handle --version/--help git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11222 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/afsutil/pagsh.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/appl/afsutil/pagsh.c b/appl/afsutil/pagsh.c index 7d7e62b5e..909fcf337 100644 --- a/appl/afsutil/pagsh.c +++ b/appl/afsutil/pagsh.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1995 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -62,6 +62,24 @@ RCSID("$Id$"); #include #include +#include + +static int help_flag; +static int version_flag; + +struct getargs args[] = { + { "version", 0, arg_flag, &version_flag }, + { "help", 'h', arg_flag, &help_flag }, +}; + +static int num_args = sizeof(args) / sizeof(args[0]); + +static void +usage(int ecode) +{ + arg_printusage(args, num_args, NULL, "[cell]... [path]..."); + exit(ecode); +} /* * Run command with a new ticket file / credentials cache / token