summaryrefslogtreecommitdiff
path: root/src/commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands.h')
-rw-r--r--src/commands.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/commands.h b/src/commands.h
new file mode 100644
index 0000000..c9d975d
--- /dev/null
+++ b/src/commands.h
@@ -0,0 +1,60 @@
+
+#ifndef __COMMANDS_H
+#define __COMMANDS_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ A structure which contains information on the commands
+ this program can understand.
+ */
+typedef struct {
+ char *name; /* User printable name of the function. */
+ rl_icpfunc_t *func; /* Function to call to do the job. */
+ char *doc; /* Documentation for this function. */
+} COMMAND;
+
+typedef struct {
+ char *name;
+ COMMAND *list;
+} COMMAND_LIST;
+
+
+extern COMMAND_LIST top;
+extern COMMAND_LIST shell;
+extern COMMAND_LIST users;
+
+extern COMMAND_LIST *current;
+
+
+extern int com_ls( char *arg );
+extern int com_more( char *arg );
+extern int com_vi( char *arg );
+extern int com_rename( char *arg );
+extern int com_stat( char *arg );
+extern int com_delete( char *arg );
+extern int com_help( char *arg );
+extern int com_cd( char *arg );
+extern int com_ping( char *arg );
+extern int com_pwd( char *ignore );
+
+extern int com_useradd( char *arg );
+extern int com_userdel( char *arg );
+extern int com_userlist( char *arg );
+
+extern int com_quit( char *arg );
+
+extern int com_shell( char *arg );
+extern int com_users( char *arg );
+extern int com_top( char *arg );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COMMANDS_H */
+