Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3276 → Rev 3277

/branches/shell/uspace/app/bdsh/cmds/modules/touch/touch.def
0,0 → 1,8
{
"touch",
"The touch command",
&cmd_touch,
&help_cmd_touch,
0
},
 
/branches/shell/uspace/app/bdsh/cmds/modules/touch/touch.c
0,0 → 1,48
/* 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) {
printf("\n");
return 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}
 
/branches/shell/uspace/app/bdsh/cmds/modules/touch/entry.h
0,0 → 1,9
#ifndef TOUCH_ENTRY_H
#define TOUCH_ENTRY_H
 
/* Entry points for the touch command */
extern int * cmd_touch(char **);
extern void * help_cmd_touch(unsigned int);
 
#endif /* TOUCH_ENTRY_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/touch/touch.h
0,0 → 1,8
#ifndef TOUCH_H
#define TOUCH_H
 
/* Prototypes for the touch command, excluding entry points */
 
 
#endif /* TOUCH_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/mkdir/mkdir.def
0,0 → 1,16
{
"mkdir",
"The mkdir command",
&cmd_mkdir,
&help_cmd_mkdir,
0
},
 
{
"md",
NULL,
&cmd_mkdir,
&help_cmd_mkdir,
0
},
 
/branches/shell/uspace/app/bdsh/cmds/modules/mkdir/entry.h
0,0 → 1,9
#ifndef MKDIR_ENTRY_H
#define MKDIR_ENTRY_H
 
/* Entry points for the mkdir command */
extern int * cmd_mkdir(char **);
extern void * help_cmd_mkdir(unsigned int);
 
#endif /* MKDIR_ENTRY_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
0,0 → 1,48
/* Automatically generated by mknewcmd on Mon Aug 11 00:06:46 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 "mkdir.h"
#include "cmds.h"
 
static char *cmdname = "mkdir";
 
/* Dispays help for mkdir in various levels */
void * help_cmd_mkdir(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
 
/* Main entry point for mkdir, accepts an array of arguments */
int * cmd_mkdir(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) {
printf("\n");
return 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}
 
/branches/shell/uspace/app/bdsh/cmds/modules/mkdir/mkdir.h
0,0 → 1,8
#ifndef MKDIR_H
#define MKDIR_H
 
/* Prototypes for the mkdir command, excluding entry points */
 
 
#endif /* MKDIR_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/cat/cat.def
0,0 → 1,8
{
"cat",
"The cat command",
&cmd_cat,
&help_cmd_cat,
0
},
 
/branches/shell/uspace/app/bdsh/cmds/modules/cat/entry.h
0,0 → 1,9
#ifndef CAT_ENTRY_H
#define CAT_ENTRY_H
 
/* Entry points for the cat command */
extern int * cmd_cat(char **);
extern void * help_cmd_cat(unsigned int);
 
#endif /* CAT_ENTRY_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/cat/cat.c
0,0 → 1,48
/* Automatically generated by mknewcmd on Mon Aug 11 00:21:59 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 "cat.h"
#include "cmds.h"
 
static char *cmdname = "cat";
 
/* Dispays help for cat in various levels */
void * help_cmd_cat(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
 
/* Main entry point for cat, accepts an array of arguments */
int * cmd_cat(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) {
printf("\n");
return 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}
 
/branches/shell/uspace/app/bdsh/cmds/modules/cat/cat.h
0,0 → 1,8
#ifndef CAT_H
#define CAT_H
 
/* Prototypes for the cat command, excluding entry points */
 
 
#endif /* CAT_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/module_aliases.h
13,6 → 13,9
 
char *mod_aliases[] = {
"exit", "quit",
"md", "mkdir",
"del", "rm",
"dir", "ls",
NULL, NULL
};
 
/branches/shell/uspace/app/bdsh/cmds/modules/modules.h
19,6 → 19,11
 
#include "help/entry.h"
#include "quit/entry.h"
#include "mkdir/entry.h"
#include "rm/entry.h"
#include "cat/entry.h"
#include "touch/entry.h"
#include "ls/entry.h"
 
/* Each .def function fills the module_t struct with the individual name, entry
* point, help entry point, etc. You can use config.h to control what modules
27,6 → 32,11
module_t modules[] = {
#include "help/help.def"
#include "quit/quit.def"
#include "mkdir/mkdir.def"
#include "rm/rm.def"
#include "cat/cat.def"
#include "touch/touch.def"
#include "ls/ls.def"
{NULL, NULL, NULL, NULL}
};
 
/branches/shell/uspace/app/bdsh/cmds/modules/ls/ls.c
0,0 → 1,48
/* Automatically generated by mknewcmd on Mon Aug 11 00:22:09 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 "ls.h"
#include "cmds.h"
 
static char *cmdname = "ls";
 
/* Dispays help for ls in various levels */
void * help_cmd_ls(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
 
/* Main entry point for ls, accepts an array of arguments */
int * cmd_ls(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) {
printf("\n");
return 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}
 
/branches/shell/uspace/app/bdsh/cmds/modules/ls/ls.h
0,0 → 1,8
#ifndef LS_H
#define LS_H
 
/* Prototypes for the ls command, excluding entry points */
 
 
#endif /* LS_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/ls/entry.h
0,0 → 1,9
#ifndef LS_ENTRY_H
#define LS_ENTRY_H
 
/* Entry points for the ls command */
extern int * cmd_ls(char **);
extern void * help_cmd_ls(unsigned int);
 
#endif /* LS_ENTRY_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/ls/ls.def
0,0 → 1,16
{
"ls",
"The ls command",
&cmd_ls,
&help_cmd_ls,
0
},
 
{
"dir",
NULL,
&cmd_ls,
&help_cmd_ls,
0
},
 
/branches/shell/uspace/app/bdsh/cmds/modules/rm/rm.c
0,0 → 1,48
/* Automatically generated by mknewcmd on Mon Aug 11 00:14:56 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 "rm.h"
#include "cmds.h"
 
static char *cmdname = "rm";
 
/* Dispays help for rm in various levels */
void * help_cmd_rm(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
 
/* Main entry point for rm, accepts an array of arguments */
int * cmd_rm(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) {
printf("\n");
return 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}
 
/branches/shell/uspace/app/bdsh/cmds/modules/rm/rm.h
0,0 → 1,8
#ifndef RM_H
#define RM_H
 
/* Prototypes for the rm command, excluding entry points */
 
 
#endif /* RM_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/rm/entry.h
0,0 → 1,9
#ifndef RM_ENTRY_H
#define RM_ENTRY_H
 
/* Entry points for the rm command */
extern int * cmd_rm(char **);
extern void * help_cmd_rm(unsigned int);
 
#endif /* RM_ENTRY_H */
 
/branches/shell/uspace/app/bdsh/cmds/modules/rm/rm.def
0,0 → 1,16
{
"rm",
"The rm command",
&cmd_rm,
&help_cmd_rm,
0
},
 
{
"del",
NULL,
&cmd_rm,
&help_cmd_rm,
0
},