Standardize License information
[openafs.git] / src / cmd / test / dtest.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include "cmd.h"
11 #include <stdio.h>
12
13 static cproc (as, arock)
14 char *arock;
15 struct cmd_syndesc *as; {
16     register struct cmd_item *ti;
17     printf("in the pear command\n");
18     printf("number is %s\n", as->parms[0].items->data);
19     if (as->parms[1].items) printf("running unauthenticated\n");
20     for(ti=as->parms[2].items; ti; ti=ti->next) {
21         printf("spotspos %s\n", ti->data);
22     }
23     return 0;
24 }
25
26 main(argc, argv)
27 int argc;
28 char **argv; {
29     register struct cmd_syndesc *ts;
30     
31     ts = cmd_CreateSyntax((char *) 0, cproc, (char *) 0, "describe pear");
32     cmd_AddParm(ts, "-num", CMD_SINGLE, 0, "number of pears");
33     cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");
34     cmd_AddParm(ts, "-spotpos", CMD_LIST, CMD_OPTIONAL, 0);
35     
36     return cmd_Dispatch(argc, argv);
37 }