/* Automatically generated by mknewcmd on Mon Aug 11 00:22:05 PHT 2008
* This is machine generated output. The author of mknewcmd claims no
* copyright over the contents of this file. Where legally permitted, the
* contents herein are donated to the public domain.
*
* You should apply any license and copyright that you wish to this file,
* replacing this header in its entirety. */
#include <stdio.h>
#include <stdlib.h>
#include "entry.h"
#include "touch.h"
#include "cmds.h"
static char *cmdname = "touch";
/* Dispays help for touch in various levels */
void * help_cmd_touch(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
/* Main entry point for touch, accepts an array of arguments */
int * cmd_touch(char **argv)
{
unsigned int argc;
unsigned int i;
/* Count the arguments */
for (argc = 0; argv[argc] != NULL; argc ++);
printf("%s %s\n", TEST_ANNOUNCE
, cmdname
);
printf("%d arguments passed to %s", argc
- 1, cmdname
);
if (argc < 2) {
return 0;
}
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i
, argv
[i
]);
return 0;
}