2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #include <afsconfig.h>
11 #include <afs/param.h>
22 struct cmd_syndesc *as;
24 printf("in the apple command\n");
31 struct cmd_syndesc *as;
33 register struct cmd_item *ti;
34 printf("in the pear command\n");
35 printf("number is %s\n", as->parms[0].items->data);
36 if (as->parms[1].items)
37 printf("running unauthenticated\n");
38 for (ti = as->parms[2].items; ti; ti = ti->next) {
39 printf("spotspos %s\n", ti->data);
41 if (as->parms[8].items)
42 printf("cell name %s\n", as->parms[8].items->data);
50 register struct cmd_syndesc *ts;
52 ts = cmd_CreateSyntax("apple", cproc1, NULL, "describe apple");
53 cmd_CreateAlias(ts, "appl");
55 ts = cmd_CreateSyntax("pear", cproc2, NULL, "describe pear");
56 cmd_AddParm(ts, "-num", CMD_LIST, 0, "number of pears");
57 cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");
58 cmd_AddParm(ts, "-spotpos", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS, 0);
60 cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
61 cmd_CreateAlias(ts, "alias");
63 return cmd_Dispatch(argc, argv);