Update of /cvsroot/winbash/winbash/builtins
In directory usw-pr-cvs1:/tmp/cvs-serv555/builtins
Modified Files:
fc.def getopt.c getopts.def
Log Message:
applied gnu bash 1.14.6 diffs
Index: fc.def
===================================================================
RCS file: /cvsroot/winbash/winbash/builtins/fc.def,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fc.def 11 Mar 2002 01:47:04 -0000 1.4
+++ fc.def 11 Mar 2002 04:50:29 -0000 1.5
@@ -267,6 +267,8 @@
/* This is the second form of the command (the list-or-edit-and-rerun
form). */
hlist = history_list ();
+ if (hlist == 0)
+ return (EXECUTION_SUCCESS);
for (i = 0; hlist[i]; i++);
/* With the Bash implementation of history, the current command line
Index: getopt.c
===================================================================
RCS file: /cvsroot/winbash/winbash/builtins/getopt.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- getopt.c 11 Mar 2002 01:47:04 -0000 1.3
+++ getopt.c 11 Mar 2002 04:50:29 -0000 1.4
@@ -105,8 +105,8 @@
ARGV-element, is returned in `sh_optarg'. */
/* 1003.2 specifies the format of this message. */
-#define BADOPT(c) fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c)
-#define NEEDARG(c) fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], c)
+#define BADOPT(x) fprintf (stderr, "%s: illegal option -- %c\n", argv[0], x)
+#define NEEDARG(x) fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], x)
int
sh_getopt (argc, argv, optstring)
Index: getopts.def
===================================================================
RCS file: /cvsroot/winbash/winbash/builtins/getopts.def,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- getopts.def 11 Mar 2002 01:47:04 -0000 1.4
+++ getopts.def 11 Mar 2002 04:50:29 -0000 1.5
@@ -165,7 +165,7 @@
{
register int i;
- for (i = 0; dollar_vars[i]; i++);
+ for (i = 0; i < 10 && dollar_vars[i]; i++);
ret = sh_getopt (i, dollar_vars, optstr);
}
else
@@ -174,10 +174,10 @@
register WORD_LIST *words;
char **v;
- for (i = 0; dollar_vars[i]; i++);
+ for (i = 0; i < 10 && dollar_vars[i]; i++);
for (words = rest_of_args; words; words = words->next, i++);
v = (char **)xmalloc ((i + 1) * sizeof (char *));
- for (i = 0; dollar_vars[i]; i++)
+ for (i = 0; i < 10 && dollar_vars[i]; i++)
v[i] = dollar_vars[i];
for (words = rest_of_args; words; words = words->next, i++)
v[i] = words->word->word;
|