mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-05 17:52:30 +02:00
Bash-4.4 distribution sources and documentation
This commit is contained in:
@@ -63,6 +63,12 @@
|
||||
|
||||
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;
|
||||
{
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
/* Standard include files. stdio.h is required. */
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Used for select(2) */
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Standard readline include files. */
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "readline.h"
|
||||
# include "history.h"
|
||||
#else
|
||||
# include <readline/readline.h>
|
||||
# include <readline/history.h>
|
||||
#endif
|
||||
|
||||
extern int errno;
|
||||
|
||||
static void cb_linehandler (char *);
|
||||
|
||||
@@ -65,7 +74,7 @@ main (int c, char **v)
|
||||
FD_SET (fileno (rl_instream), &fds);
|
||||
|
||||
r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
|
||||
if (r < 0)
|
||||
if (r < 0 && errno != EINTR)
|
||||
{
|
||||
perror ("rltest: select");
|
||||
rl_callback_handler_remove ();
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user