#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
+#include <roken.h>
-#include "cmd.h"
-#include <stdio.h>
-#include <com_err.h>
+#include <afs/com_err.h>
+#include <afs/cmd.h>
-static
-cproc1(as, arock)
- char *arock;
- struct cmd_syndesc *as;
+static int
+cproc1(struct cmd_syndesc *as, void *arock)
{
printf("in the apple command\n");
return 0;
}
-static
-cproc2(as, arock)
- char *arock;
- struct cmd_syndesc *as;
+static int
+cproc2(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
printf("in the pear command\n");
printf("number is %s\n", as->parms[0].items->data);
if (as->parms[1].items)
return 0;
}
-static void
-cproc3(as, arock)
- char *arock;
- struct cmd_syndesc *as;
+static int
+cproc3(struct cmd_syndesc *as, void *arock)
{
exit(0);
}
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
char tline[1000];
- long tc;
+ afs_int32 tc;
char *tp;
long code;
char *tv[100];
break;
code = cmd_ParseLine(tline, tv, &tc, 100);
if (code) {
- printf("itest: parsing failure: %s\n", error_message(code));
+ printf("itest: parsing failure: %s\n", afs_error_message(code));
exit(1);
}
code = cmd_Dispatch(tc, tv);
cmd_FreeArgv(tv);
if (code) {
- printf("itest: execution failed: %s\n", error_message(code));
+ printf("itest: execution failed: %s\n", afs_error_message(code));
}
}
return 0;