Import readline 7.0 (patch 5)
[deliverable/binutils-gdb.git] / readline / examples / fileman.c
index f7eed8a982fdf86f54822fcffdc28acee4cfb98b..c821df033aa8b42702d016bc767f66d4f676d1f8 100644 (file)
 
 extern char *xmalloc PARAMS((size_t));
 
+void initialize_readline PARAMS((void));
+void too_dangerous PARAMS((char *));
+
+int execute_line PARAMS((char *));
+int valid_argument PARAMS((char *, char *));
+
 /* The names of functions that actually do the manipulation. */
 int com_list PARAMS((char *));
 int com_view PARAMS((char *));
@@ -119,6 +125,7 @@ dupstr (s)
   return (r);
 }
 
+int
 main (argc, argv)
      int argc;
      char **argv;
@@ -241,6 +248,7 @@ char **fileman_completion PARAMS((const char *, int, int));
 /* Tell the GNU Readline library how to complete.  We want to try to complete
    on command names if this is the first word in the line, or on filenames
    if not. */
+void
 initialize_readline ()
 {
   /* Allow conditional parsing of the ~/.inputrc file. */
@@ -317,6 +325,7 @@ command_generator (text, state)
 static char syscom[1024];
 
 /* List the file(s) named in arg. */
+int
 com_list (arg)
      char *arg;
 {
@@ -327,6 +336,7 @@ com_list (arg)
   return (system (syscom));
 }
 
+int
 com_view (arg)
      char *arg;
 {
@@ -342,6 +352,7 @@ com_view (arg)
   return (system (syscom));
 }
 
+int
 com_rename (arg)
      char *arg;
 {
@@ -349,6 +360,7 @@ com_rename (arg)
   return (1);
 }
 
+int
 com_stat (arg)
      char *arg;
 {
@@ -377,6 +389,7 @@ com_stat (arg)
   return (0);
 }
 
+int
 com_delete (arg)
      char *arg;
 {
@@ -386,6 +399,7 @@ com_delete (arg)
 
 /* Print out help for ARG, or for all of the commands if ARG is
    not present. */
+int
 com_help (arg)
      char *arg;
 {
@@ -425,6 +439,7 @@ com_help (arg)
 }
 
 /* Change to the directory ARG. */
+int
 com_cd (arg)
      char *arg;
 {
@@ -439,6 +454,7 @@ com_cd (arg)
 }
 
 /* Print out the current working directory. */
+int
 com_pwd (ignore)
      char *ignore;
 {
@@ -456,6 +472,7 @@ com_pwd (ignore)
 }
 
 /* The user wishes to quit using this program.  Just set DONE non-zero. */
+int
 com_quit (arg)
      char *arg;
 {
@@ -464,6 +481,7 @@ com_quit (arg)
 }
 
 /* Function which tells you that you can't do this. */
+void
 too_dangerous (caller)
      char *caller;
 {
This page took 0.02979 seconds and 4 git commands to generate.