home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-14 | 31.7 KB | 1,124 lines |
- diff -rc bash-1.12-fsf/Makefile bash-1.12-amiga/Makefile
- *** bash-1.12-fsf/Makefile Sat Jan 18 15:43:12 1992
- --- bash-1.12-amiga/Makefile Sat Nov 20 01:20:30 1993
- ***************
- *** 17,25 ****
- GAWK = awk
- # GAWK = gawk
-
- ! CPPNAME = /lib/cpp
- CPP = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
- ! # CPP = $(CC) -E
-
- CPP_MAKEFILE = cpp-Makefile
-
- --- 17,25 ----
- GAWK = awk
- # GAWK = gawk
-
- ! CPPNAME = /gcc/lib/gcc-lib/amigados/2.5.7/cpp
- CPP = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
- ! #CPP = $(CC) -E
-
- CPP_MAKEFILE = cpp-Makefile
-
- ***************
- *** 39,47 ****
- # much trouble with this, just forget it. It is for making
- # bash-Makefile pretty and readable; something that isn't strictly
- # necessary.
- ! # SQUASH_BLANKS = cat -s
- #
- ! SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
-
- all: .notified bash-Makefile
- $(MAKE) $(MFLAGS) $(MAKEARGS) -f bash-Makefile
- --- 39,47 ----
- # much trouble with this, just forget it. It is for making
- # bash-Makefile pretty and readable; something that isn't strictly
- # necessary.
- ! SQUASH_BLANKS = cat -s
- #
- ! #SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
-
- all: .notified bash-Makefile
- $(MAKE) $(MFLAGS) $(MAKEARGS) -f bash-Makefile
- diff -rc bash-1.12-fsf/alias.h bash-1.12-amiga/alias.h
- *** bash-1.12-fsf/alias.h Sun Jul 7 14:35:44 1991
- --- bash-1.12-amiga/alias.h Sat Nov 20 01:55:30 1993
- ***************
- *** 21,27 ****
- #if !defined (_ALIAS_)
- #define _ALIAS_
-
- ! extern char *xmalloc (), *malloc ();
-
- #ifndef whitespace
- #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
- --- 21,28 ----
- #if !defined (_ALIAS_)
- #define _ALIAS_
-
- ! extern char *xmalloc ();
- ! extern void *malloc ();
-
- #ifndef whitespace
- #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
- diff -rc bash-1.12-fsf/bashline.c bash-1.12-amiga/bashline.c
- *** bash-1.12-fsf/bashline.c Mon Jan 20 04:49:52 1992
- --- bash-1.12-amiga/bashline.c Fri Nov 19 01:36:57 1993
- ***************
- *** 42,49 ****
-
- /* Externally defined functions used by this file. */
- extern char
- ! *get_string_value (), *filename_completion_function (),
- ! *username_completion_function ();
-
- extern int show_shell_version ();
-
- --- 42,51 ----
-
- /* Externally defined functions used by this file. */
- extern char
- ! *get_string_value (), *filename_completion_function ();
- ! #ifndef amigados
- ! extern char *username_completion_function ();
- ! #endif /* amigados */
-
- extern int show_shell_version ();
-
- ***************
- *** 550,556 ****
- --- 552,562 ----
- /* If the word starts in `~', and there is no slash in the word, then
- try completing this word as a username. */
- if (!matches && *text == '~' && !index (text, '/'))
- + #ifdef amigados
- + matches = (char **)NULL;
- + #else
- matches = completion_matches (text, username_completion_function);
- + #endif /* amigados */
-
- /* Another one. Why not? If the word starts in '@', then look through
- the world of known hostnames for completion first. */
- ***************
- *** 1238,1245 ****
- --- 1244,1253 ----
- bash_complete_username_internal (what_to_do)
- int what_to_do;
- {
- + #ifndef amigados
- bash_specific_completion
- (what_to_do, (Function *)username_completion_function);
- + #endif /* amigados */
- }
-
- static void
- diff -rc bash-1.12-fsf/builtins/Makefile bash-1.12-amiga/builtins/Makefile
- *** bash-1.12-fsf/builtins/Makefile Thu Nov 7 15:46:32 1991
- --- bash-1.12-amiga/builtins/Makefile Sat Nov 20 14:17:30 1993
- ***************
- *** 58,65 ****
-
- builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
- $(RM) builtext.h builtins.c
- ! ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
- ! -noproduction $(DEFS)
-
- mkbuiltins: mkbuiltins.c
- $(CC) $(CFLAGS) -o $(MKBUILTINS) mkbuiltins.c
- --- 58,65 ----
-
- builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
- $(RM) builtext.h builtins.c
- ! ./$(MKBUILTINS) -externfile - -noproduction $(DEFS) >builtext.h
- ! ./$(MKBUILTINS) -structfile builtins.c -noproduction $(DEFS)
-
- mkbuiltins: mkbuiltins.c
- $(CC) $(CFLAGS) -o $(MKBUILTINS) mkbuiltins.c
- diff -rc bash-1.12-fsf/builtins/mkbuiltins.c bash-1.12-amiga/builtins/mkbuiltins.c
- *** bash-1.12-fsf/builtins/mkbuiltins.c Tue Nov 5 23:54:21 1991
- --- bash-1.12-amiga/builtins/mkbuiltins.c Sat Nov 20 14:13:34 1993
- ***************
- *** 158,164 ****
-
- if (extern_filename)
- {
- ! externfile = fopen (extern_filename, "w");
-
- if (!externfile)
- file_error (extern_filename);
- --- 158,167 ----
-
- if (extern_filename)
- {
- ! if (strcmp (extern_filename, "-") == 0)
- ! externfile = stdout;
- ! else
- ! externfile = fopen (extern_filename, "w");
-
- if (!externfile)
- file_error (extern_filename);
- ***************
- *** 199,205 ****
- unlink (temp_struct_filename);
- }
-
- ! if (externfile)
- fclose (externfile);
- }
-
- --- 202,208 ----
- unlink (temp_struct_filename);
- }
-
- ! if (externfile && externfile != stdout)
- fclose (externfile);
- }
-
- ***************
- *** 1001,1006 ****
- --- 1004,1010 ----
- /* Write the extern definition. */
- if (externfile)
- {
- + fprintf (externfile, "/* %s */\n", defs -> filename);
- if (builtin->function)
- fprintf (externfile, "extern int %s ();\n",
- builtin->function);
- diff -rc bash-1.12-fsf/builtins/psize.sh bash-1.12-amiga/builtins/psize.sh
- *** bash-1.12-fsf/builtins/psize.sh Sun Jul 7 14:37:15 1991
- --- bash-1.12-amiga/builtins/psize.sh Sat Nov 20 02:41:23 1993
- ***************
- *** 11,17 ****
- echo " */"
- echo ""
-
- ! ./psize.aux 2>/tmp/pipesize | sleep 3
-
- echo "#define PIPESIZE `cat /tmp/pipesize`"
-
- --- 11,20 ----
- echo " */"
- echo ""
-
- ! #./psize.aux 2>/tmp/pipesize | sleep 3
- ! # Begin Amiga hack
- ! echo 5120 >/tmp/pipesize
- ! #endif Amiga hack
-
- echo "#define PIPESIZE `cat /tmp/pipesize`"
-
- diff -rc bash-1.12-fsf/config.h bash-1.12-amiga/config.h
- *** bash-1.12-fsf/config.h Mon Nov 4 01:21:13 1991
- --- bash-1.12-amiga/config.h Fri Nov 19 01:36:57 1993
- ***************
- *** 59,65 ****
- --- 59,67 ----
-
- /* Define JOB_CONTROL if your operating system supports
- BSD-like job control. */
- + #ifndef amigados
- #define JOB_CONTROL
- + #endif /* amigados */
-
- /* Note that vanilla System V machines don't support BSD job control,
- although some do support Posix job control. */
- ***************
- *** 87,99 ****
- --- 89,111 ----
- #endif /* READLINE */
-
- /* The default value of the PATH variable. */
- + #ifdef amigados
- #define DEFAULT_PATH_VALUE \
- + ":/c:/gcc:/usr/bin:/bin:/usr/local/bin:.:/local/bin"
- + #else
- + #define DEFAULT_PATH_VALUE \
- ":/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc"
- + #endif /* amigados */
-
- /* The value for PATH when invoking `command -p'. This is only used when
- the Posix.2 confstr () function, or CS_PATH define are not present. */
- + #ifdef amigados
- + #define STANDARD_UTILS_PATH \
- + "/c:/gcc:/usr/bin:/bin:/usr/local/bin:.:/local/bin"
- + #else
- #define STANDARD_UTILS_PATH \
- "/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
- + #endif /* amigados */
-
- /* Define V9_ECHO if you want to give the echo builtin backslash-escape
- interpretation using the -e option, in the style of the Bell Labs 9th
- ***************
- *** 120,124 ****
- --- 132,156 ----
- /* Define DISABLED_BUILTINS if you want "builtin foo" to always run the
- shell builtin "foo", even if it has been disabled with "enable -n foo". */
- /* #define DISABLED_BUILTINS */
- +
- + #ifdef amigados
- + #define SYSTEM_NAME "amiga"
- + #define OS_NAME "Bsd"
- + #define PPROMPT "bash$ "
- + #define SPROMPT "> "
- + #ifdef HOSTTYPE
- + # undef HOSTTYPE
- + #endif /* HOSTTYPE */
- + #define HOSTTYPE "amiga"
- + #ifndef MAINTAINER
- + # define MAINTAINER "phb@colombo.telesys-innov.fr"
- + #endif /* MAINTAINER */
- + #ifdef JOB_CONTROL
- + # undef JOB_CONTROL
- + #endif /* JOB_CONTROL */
- + #ifdef HAVE_BSD_SIGNALS
- + # undef HAVE_BSD_SIGNALS
- + #endif
- + #endif /* amigados */
-
- #endif /* _CONFIG_ */
- diff -rc bash-1.12-fsf/cpp-Makefile bash-1.12-amiga/cpp-Makefile
- *** bash-1.12-fsf/cpp-Makefile Sat Jan 25 22:16:31 1992
- --- bash-1.12-amiga/cpp-Makefile Fri Nov 19 01:36:58 1993
- ***************
- *** 192,198 ****
- SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
- $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
- -D$(MACHINE) -D$(OS)
- ! DEBUG_FLAGS = $(PROFILE_FLAGS) -g
- LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
- CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
- CPPFLAGS= -I$(LIBSRC)
- --- 192,198 ----
- SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
- $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
- -D$(MACHINE) -D$(OS)
- ! DEBUG_FLAGS = $(PROFILE_FLAGS)
- LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
- CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
- CPPFLAGS= -I$(LIBSRC)
- ***************
- *** 224,230 ****
- ($(LIBINC_DECL); cd directory; \
- $(MAKE) $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' \
- CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' \
- ! RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' DIRECTDEFINE='-D 'directory)
-
- /* Flags used when building libraries. */
- LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
- --- 224,230 ----
- ($(LIBINC_DECL); cd directory; \
- $(MAKE) $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' \
- CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' \
- ! RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)')
-
- /* Flags used when building libraries. */
- LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
- ***************
- *** 252,269 ****
- -DMachineSystem="$(MachineSystem)"
- #endif /* NotYet */
-
- - /**/# The default primary and secondary prompts.
- - PPROMPT = '"${PROGRAM}\\$$ "'
- - SPROMPT = '"> "'
- -
- #if defined (MAINTAINER)
- bash_maintainer = MAINTAINER
- MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
- #endif
-
- /**/# The group of configuration flags. These are for shell.c
- ! CFG_FLAGS = -DPPROMPT=$(PPROMPT) -DSPROMPT=$(SPROMPT) -DOS_NAME='"$(OS_NAME)"'\
- ! -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
-
- /**/# The directory which contains the source for malloc. The name must
- /**/# end in a slash, as in "./lib/malloc/".
- --- 252,264 ----
- -DMachineSystem="$(MachineSystem)"
- #endif /* NotYet */
-
- #if defined (MAINTAINER)
- bash_maintainer = MAINTAINER
- MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
- #endif
-
- /**/# The group of configuration flags. These are for shell.c
- ! CFG_FLAGS = $(SIGLIST_FLAG)
-
- /**/# The directory which contains the source for malloc. The name must
- /**/# end in a slash, as in "./lib/malloc/".
- diff -rc bash-1.12-fsf/general.h bash-1.12-amiga/general.h
- *** bash-1.12-fsf/general.h Tue Jan 21 13:20:56 1992
- --- bash-1.12-amiga/general.h Sat Nov 20 01:45:55 1993
- ***************
- *** 76,82 ****
- #define FS_EXEC_PREFERRED 0x4
- #define FS_EXEC_ONLY 0x8
-
- ! extern char *xmalloc (), *malloc (), *xrealloc (), *realloc ();
- extern char *itos ();
-
- #endif /* _GENERAL_ */
- --- 76,83 ----
- #define FS_EXEC_PREFERRED 0x4
- #define FS_EXEC_ONLY 0x8
-
- ! extern char *xmalloc (), *xrealloc ();
- ! extern void *malloc (), *realloc ();
- extern char *itos ();
-
- #endif /* _GENERAL_ */
- diff -rc bash-1.12-fsf/lib/glob/tilde.c bash-1.12-amiga/lib/glob/tilde.c
- *** bash-1.12-fsf/lib/glob/tilde.c Thu Oct 3 16:22:17 1991
- --- bash-1.12-amiga/lib/glob/tilde.c Sat Nov 20 14:57:16 1993
- ***************
- *** 30,35 ****
- --- 30,36 ----
- #include <pwd.h>
-
- #ifndef savestring
- + extern char *strcpy();
- #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x))
- #endif
-
- ***************
- *** 208,213 ****
- --- 209,219 ----
- {
- /* Prepend $HOME to the rest of the string. */
- char *temp_home = (char *)getenv ("HOME");
- + #ifdef amigados
- + /* Default $HOME to s:, which is the semi-traditional place
- + for reconfiguration files and whatnot. -fnf */
- + temp_home = temp_home ? temp_home : "/s";
- + #endif
-
- temp_name = (char *)alloca (1 + strlen (&dirname[1])
- + (temp_home? strlen (temp_home) : 0));
- diff -rc bash-1.12-fsf/lib/readline/Makefile bash-1.12-amiga/lib/readline/Makefile
- *** bash-1.12-fsf/lib/readline/Makefile Sun Nov 3 14:45:05 1991
- --- bash-1.12-amiga/lib/readline/Makefile Fri Nov 19 01:36:59 1993
- ***************
- *** 6,11 ****
- --- 6,12 ----
-
- # Here is a rule for making .o files from .c files that doesn't force
- # the type of the machine (like -sun3) into the flags.
- +
- .c.o:
- $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) \
- $(READLINE_DEFINES) $(CPPFLAGS) $*.c
- ***************
- *** 44,49 ****
- --- 45,53 ----
- AR = ar
- RM = rm
- CP = cp
- +
- + CC=gcc
- + CFLAGS=-O2 -DHAVE_UNISTD_H
-
- LOCAL_INCLUDES = -I../
-
- diff -rc bash-1.12-fsf/lib/readline/readline.c bash-1.12-amiga/lib/readline/readline.c
- *** bash-1.12-fsf/lib/readline/readline.c Sat Jan 25 17:47:30 1992
- --- bash-1.12-amiga/lib/readline/readline.c Fri Nov 19 01:37:01 1993
- ***************
- *** 70,76 ****
- #endif /* !_POSIX_VERSION */
-
- /* Posix systems use termios and the Posix signal functions. */
- ! #if defined (_POSIX_VERSION)
- # if !defined (TERMIOS_MISSING)
- # undef NEW_TTY_DRIVER
- # define TERMIOS_TTY_DRIVER
- --- 70,76 ----
- #endif /* !_POSIX_VERSION */
-
- /* Posix systems use termios and the Posix signal functions. */
- ! #if defined (_POSIX_VERSION) && !defined (amigados)
- # if !defined (TERMIOS_MISSING)
- # undef NEW_TTY_DRIVER
- # define TERMIOS_TTY_DRIVER
- ***************
- *** 276,282 ****
- --- 276,286 ----
- static FILE *in_stream, *out_stream;
-
- /* The names of the streams that we do input and output to. */
- + #ifdef amigados
- + FILE *rl_instream, *rl_outstream;
- + #else
- FILE *rl_instream = stdin, *rl_outstream = stdout;
- + #endif /* amigados */
-
- /* Non-zero means echo characters as they are read. */
- int readline_echoing_p = 1;
- ***************
- *** 4007,4012 ****
- --- 4011,4017 ----
- return (strcmp (*s1, *s2));
- }
-
- + #ifndef amigados
- /* A completion function for usernames.
- TEXT contains a partial username preceded by a random
- character (usually `~'). */
- ***************
- *** 4061,4066 ****
- --- 4066,4072 ----
- return (value);
- }
- }
- + #endif /* amigados */
-
- /* **************************************************************** */
- /* */
- diff -rc bash-1.12-fsf/machines.h bash-1.12-amiga/machines.h
- *** bash-1.12-fsf/machines.h Fri Jan 17 17:42:24 1992
- --- bash-1.12-amiga/machines.h Fri Nov 19 01:37:02 1993
- ***************
- *** 817,828 ****
- #undef USE_GNU_MALLOC
- #endif /* drs6000 */
-
- /* ******************************************** */
- /* */
- /* System V Release 4 on the Commodore Amiga */
- /* */
- /* ******************************************** */
- ! #if defined (amiga)
- #define M_MACHINE "amiga"
- #define M_OS USG
- #define SYSDEP_CFLAGS -DUSGr4
- --- 817,852 ----
- #undef USE_GNU_MALLOC
- #endif /* drs6000 */
-
- + /* **************************************************************** */
- + /* */
- + /* Commodore Amiga running AmigaDOS */
- + /* */
- + /* **************************************************************** */
- +
- + #if defined(amigados)
- + #define M_MACHINE "amiga"
- + #define M_OS Bsd
- + #if !defined (HAVE_GCC)
- + # define HAVE_GCC
- + #endif /* HAVE_GCC */
- + #define SYSDEP_CFLAGS -O2
- + #define REQUIRED_LIBRARIES
- + #define HAVE_SYS_SIGLIST
- + #define HAVE_ALLOCA
- + #undef USE_GNU_MALLOC
- + #undef HAVE_SETLINEBUF
- + #define HAVE_VFPRINTF
- + #if !defined (HAVE_RESOURCE)
- + # define HAVE_RESOURCE
- + #endif
- + #endif /* Commodore Amiga running AmigaDOS */
- +
- /* ******************************************** */
- /* */
- /* System V Release 4 on the Commodore Amiga */
- /* */
- /* ******************************************** */
- ! #if defined (amiga) && !defined(amigados)
- #define M_MACHINE "amiga"
- #define M_OS USG
- #define SYSDEP_CFLAGS -DUSGr4
- diff -rc bash-1.12-fsf/nojobs.c bash-1.12-amiga/nojobs.c
- *** bash-1.12-fsf/nojobs.c Tue Jan 21 00:27:03 1992
- --- bash-1.12-amiga/nojobs.c Sat Nov 20 14:28:23 1993
- ***************
- *** 54,60 ****
- # define siginterrupt(sig, code)
- #endif /* USG */
-
- ! #if defned (_POSIX_VERSION)
- # define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
- #else
- # define WAITPID(pid, statusp, options) wait (statusp)
- --- 54,60 ----
- # define siginterrupt(sig, code)
- #endif /* USG */
-
- ! #if defined (_POSIX_VERSION)
- # define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
- #else
- # define WAITPID(pid, statusp, options) wait (statusp)
- ***************
- *** 130,143 ****
- retry_fork:
- #endif /* _POSIX_VERSION */
-
- if ((pid = fork ()) < 0)
- {
- #if defined (_POSIX_VERSION)
- /* Posix systems with a non-blocking waitpid () system call available
- get another chance after zombies are reaped. */
- if (errno == EAGAIN && retry)
- {
- ! reap_zombie_chilren ();
- retry = 0;
- goto retry_fork;
- }
- --- 130,148 ----
- retry_fork:
- #endif /* _POSIX_VERSION */
-
- + #ifdef amigados
- + if ((pid = vfork ()) < 0)
- + #else
- if ((pid = fork ()) < 0)
- + #endif /* amigados */
- +
- {
- #if defined (_POSIX_VERSION)
- /* Posix systems with a non-blocking waitpid () system call available
- get another chance after zombies are reaped. */
- if (errno == EAGAIN && retry)
- {
- ! reap_zombie_children ();
- retry = 0;
- goto retry_fork;
- }
- diff -rc bash-1.12-fsf/support/getcppsyms.c bash-1.12-amiga/support/getcppsyms.c
- *** bash-1.12-fsf/support/getcppsyms.c Thu Jan 9 04:33:05 1992
- --- bash-1.12-amiga/support/getcppsyms.c Sat Nov 20 01:38:43 1993
- ***************
- *** 305,310 ****
- --- 305,316 ----
- #if defined (vax)
- printf (" -Dvax");
- #endif /* vax */
- + #if defined (amiga)
- + printf (" -Damiga");
- + #endif
- + #if defined (amigados)
- + printf (" -Damigados");
- + #endif
-
- printf ("\n");
- exit (0);
- diff -rc bash-1.12-fsf/support/mksysdefs bash-1.12-amiga/support/mksysdefs
- *** bash-1.12-fsf/support/mksysdefs Thu Jan 9 03:45:08 1992
- --- bash-1.12-amiga/support/mksysdefs Sat Nov 20 01:34:36 1993
- ***************
- *** 43,62 ****
- fi
-
- # Get name of maintainer.
- ! if (whoami) >/dev/null 2>&1 && (hostname) >/dev/null 2>&1; then
- ! WHOAMI=`whoami`@`hostname`;
- ! else
- ! WHOAMI=`who am i | awk '{ print $1; }'`
- ! fi
- !
- ! if [ "$WHOAMI" = "" ]; then
- ! WHOAMI=`id | sed 's/uid=[01-9]*(//' | sed 's/) [) A-Za-z01-9(=,]*//'`
- ! if (hostname) >/dev/null 2>&1; then
- ! WHOAMI=$WHOAMI@`hostname`
- ! elif test -f /usr/bin/uuname -o -f /bin/uuname; then
- ! WHOAMI=`uuname -l`!$WHOAMI
- ! fi
- ! fi
-
- if [ "$WHOAMI" = "" ]; then
- WHOAMI=root
- --- 43,62 ----
- fi
-
- # Get name of maintainer.
- ! # if (whoami) >/dev/null 2>&1 && (hostname) >/dev/null 2>&1; then
- ! # WHOAMI=`whoami`@`hostname`;
- ! # else
- ! # WHOAMI=`who am i | awk '{ print $1; }'`
- ! # fi
- ! #
- ! # if [ "$WHOAMI" = "" ]; then
- ! # WHOAMI=`id | sed 's/uid=[01-9]*(//' | sed 's/) [) A-Za-z01-9(=,]*//'`
- ! # if (hostname) >/dev/null 2>&1; then
- ! # WHOAMI=$WHOAMI@`hostname`
- ! # elif test -f /usr/bin/uuname -o -f /bin/uuname; then
- ! # WHOAMI=`uuname -l`!$WHOAMI
- ! # fi
- ! # fi
-
- if [ "$WHOAMI" = "" ]; then
- WHOAMI=root
- diff -rc bash-1.12-fsf/trap.c bash-1.12-amiga/trap.c
- *** bash-1.12-fsf/trap.c Mon Jan 20 04:35:49 1992
- --- bash-1.12-amiga/trap.c Fri Nov 19 01:37:05 1993
- ***************
- *** 289,295 ****
- /* Non-zero when we catch a trapped signal. */
- static int catch_flag = 0;
-
- ! #if !defined (USG) && !defined (USGr4)
- #define HAVE_BSD_SIGNALS
- #endif
-
- --- 289,295 ----
- /* Non-zero when we catch a trapped signal. */
- static int catch_flag = 0;
-
- ! #if !defined (USG) && !defined (USGr4) && !defined(amigados)
- #define HAVE_BSD_SIGNALS
- #endif
-
- diff -rc bash-1.12-fsf/y.tab.c bash-1.12-amiga/y.tab.c
- *** bash-1.12-fsf/y.tab.c Sat Jan 25 18:52:54 1992
- --- bash-1.12-amiga/y.tab.c Fri Nov 19 01:37:07 1993
- ***************
- *** 1,6 ****
- --- 1,8 ----
-
- /* A Bison parser, made from parse.y */
-
- + #define YYBISON 1 /* Identify Bison output. */
- +
- #define IF 258
- #define THEN 259
- #define ELSE 260
- ***************
- *** 233,246 ****
- 473, 480, 489, 491, 493, 495, 497, 499, 506, 509
- };
-
- ! static const char * const yytname[] = { "$",
- ! "error","$illegal.","IF","THEN","ELSE","ELIF","FI","CASE","ESAC","FOR",
- ! "WHILE","UNTIL","DO","DONE","FUNCTION","IN","BANG","WORD","NUMBER","AND_AND",
- ! "OR_OR","GREATER_GREATER","LESS_LESS","LESS_AND","GREATER_AND","SEMI_SEMI","LESS_LESS_MINUS","AND_GREATER","LESS_GREATER","GREATER_BAR",
- ! "'&'","';'","'\\n'","yacc_EOF","'|'","'>'","'<'","'-'","'{'","'}'",
- ! "'('","')'","inputunit","words","redirection","simple_command_element","redirections","simple_command","command","shell_command",
- ! "shell_command_1","if_command","group_command","elif_clause","case_clause_1","pattern_list_1","case_clause_sequence","pattern_list","pattern","list",
- ! "list0","list1","list_terminator","newlines","simple_list","simple_list1","pipeline",""
- };
- #endif
-
- --- 235,250 ----
- 473, 480, 489, 491, 493, 495, 497, 499, 506, 509
- };
-
- ! static const char * const yytname[] = { "$","error","$illegal.","IF","THEN",
- ! "ELSE","ELIF","FI","CASE","ESAC","FOR","WHILE","UNTIL","DO","DONE","FUNCTION",
- ! "IN","BANG","WORD","NUMBER","AND_AND","OR_OR","GREATER_GREATER","LESS_LESS",
- ! "LESS_AND","GREATER_AND","SEMI_SEMI","LESS_LESS_MINUS","AND_GREATER","LESS_GREATER",
- ! "GREATER_BAR","'&'","';'","'\\n'","yacc_EOF","'|'","'>'","'<'","'-'","'{'","'}'",
- ! "'('","')'","inputunit","words","redirection","simple_command_element","redirections",
- ! "simple_command","command","shell_command","shell_command_1","if_command","group_command",
- ! "elif_clause","case_clause_1","pattern_list_1","case_clause_sequence","pattern_list",
- ! "pattern","list","list0","list1","list_terminator","newlines","simple_list",
- ! "simple_list1","pipeline",""
- };
- #endif
-
- ***************
- *** 448,454 ****
- -1, 36, 37
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- ! #line 3 "/usr/gnu/lib/bison.simple"
-
- /* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
- --- 452,458 ----
- -1, 36, 37
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- ! #line 3 "bison.simple"
-
- /* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
- ***************
- *** 471,485 ****
- #ifndef alloca
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- ! #else /* Not GNU C. */
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
- #include <alloca.h>
- ! #else /* Not sparc */
- ! #ifdef MSDOS
- #include <malloc.h>
- ! #endif /* MSDOS */
- ! #endif /* Not sparc. */
- ! #endif /* Not GNU C. */
- #endif /* alloca not defined. */
-
- /* This is the parser code that is written into each bison parser
- --- 475,494 ----
- #ifndef alloca
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- ! #else /* not GNU C. */
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
- #include <alloca.h>
- ! #else /* not sparc */
- ! #if defined (MSDOS) && !defined (__TURBOC__)
- ! #include <malloc.h>
- ! #else /* not MSDOS, or __TURBOC__ */
- ! #if defined(_AIX)
- #include <malloc.h>
- ! #pragma alloca
- ! #endif /* not _AIX */
- ! #endif /* not MSDOS, or __TURBOC__ */
- ! #endif /* not sparc. */
- ! #endif /* not GNU C. */
- #endif /* alloca not defined. */
-
- /* This is the parser code that is written into each bison parser
- ***************
- *** 491,496 ****
- --- 500,749 ----
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
- +
- +
- +
- +
- + #ifdef AMIGA
- +
- + #define bzero(b, length) memset((b),'\0',(length))
- + #define bcopy(b1, b2, length) memcpy((b1),(b2),(length))
- + #define bcmp(b1, b2, length) memcmp((b1),(b2),(length))
- +
- + #include <stdlib.h>
- +
- + /* extern char *calloc();*/
- + /* extern void done();*/
- +
- + /* extern char *program_name;*/
- +
- + #ifdef Phil.B_not_to_be_included
- +
- + char *
- + mallocate(n)
- + register unsigned n;
- + {
- + register char *block;
- +
- + /* Avoid uncertainty about what an arg of 0 will do. */
- + if (n == 0)
- + n = 1;
- + block = calloc(n,1);
- + if (block == NULL)
- + {
- + fprintf(stderr, "Bison: memory exhausted\n");
- + /*done(1);*/ exit(1);
- + }
- +
- + return (block);
- + }
- +
- + /* This name is used by alloca.c. */
- +
- + char *
- + xmalloc (n)
- + unsigned int n;
- + {
- + return mallocate (n);
- + }
- +
- + #endif
- +
- +
- + /*
- + alloca -- (mostly) portable public-domain implementation -- D A Gwyn
- +
- + last edit: 86/05/30 rms
- + include config.h, since on VMS it renames some symbols.
- + Use xmalloc instead of malloc.
- +
- + This implementation of the PWB library alloca() function,
- + which is used to allocate space off the run-time stack so
- + that it is automatically reclaimed upon procedure exit,
- + was inspired by discussions with J. Q. Johnson of Cornell.
- +
- + It should work under any C implementation that uses an
- + actual procedure stack (as opposed to a linked list of
- + frames). There are some preprocessor constants that can
- + be defined when compiling for your specific system, for
- + improved efficiency; however, the defaults should be okay.
- +
- + The general concept of this implementation is to keep
- + track of all alloca()-allocated blocks, and reclaim any
- + that are found to be deeper in the stack than the current
- + invocation. This heuristic does not reclaim storage as
- + soon as it becomes invalid, but it will do so eventually.
- +
- + As a special case, alloca(0) reclaims storage without
- + allocating any. It is a good idea to use alloca(0) in
- + your main control loop, etc. to force garbage collection.
- + */
- + #ifndef lint
- + static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
- + #endif
- +
- + #ifdef emacs
- + #include "config.h"
- + #ifdef static
- + /* actually, only want this if static is defined as ""
- + -- this is for usg, in which emacs must undefine static
- + in order to make unexec workable
- + */
- + #ifndef STACK_DIRECTION
- + you
- + lose
- + -- must know STACK_DIRECTION at compile-time
- + #endif /* STACK_DIRECTION undefined */
- + #endif /* static */
- + #endif /* emacs */
- +
- + #ifdef __STDC__
- + typedef void *pointer; /* generic pointer type */
- + #else
- + typedef char *pointer; /* generic pointer type */
- + #endif
- +
- + extern void free();
- + /* extern pointer xmalloc();*/
- +
- + /*
- + Define STACK_DIRECTION if you know the direction of stack
- + growth for your system; otherwise it will be automatically
- + deduced at run-time.
- +
- + STACK_DIRECTION > 0 => grows toward higher addresses
- + STACK_DIRECTION < 0 => grows toward lower addresses
- + STACK_DIRECTION = 0 => direction of growth unknown
- + */
- +
- + #ifndef STACK_DIRECTION
- + #define STACK_DIRECTION 0 /* direction unknown */
- + #endif
- +
- + #if STACK_DIRECTION != 0
- +
- + #define STACK_DIR STACK_DIRECTION /* known at compile-time */
- +
- + #else /* STACK_DIRECTION == 0; need run-time code */
- +
- + static int stack_dir; /* 1 or -1 once known */
- + #define STACK_DIR stack_dir
- +
- + static void
- + find_stack_direction (/* void */)
- + {
- + static char *addr = NULL; /* address of first
- + `dummy', once known */
- + auto char dummy; /* to get stack address */
- +
- + if (addr == NULL)
- + { /* initial entry */
- + addr = &dummy;
- +
- + find_stack_direction (); /* recurse once */
- + }
- + else /* second entry */
- + if (&dummy > addr)
- + stack_dir = 1; /* stack grew upward */
- + else
- + stack_dir = -1; /* stack grew downward */
- + }
- +
- + #endif /* STACK_DIRECTION == 0 */
- +
- + /*
- + An "alloca header" is used to:
- + (a) chain together all alloca()ed blocks;
- + (b) keep track of stack depth.
- +
- + It is very important that sizeof(header) agree with malloc()
- + alignment chunk size. The following default should work okay.
- + */
- +
- + #ifndef ALIGN_SIZE
- + #define ALIGN_SIZE sizeof(double)
- + #endif
- +
- + typedef union hdr
- + {
- + char align[ALIGN_SIZE]; /* to force sizeof(header) */
- + struct
- + {
- + union hdr *next; /* for chaining headers */
- + char *deep; /* for stack depth measure */
- + } h;
- + } header;
- +
- + /*
- + alloca( size ) returns a pointer to at least `size' bytes of
- + storage which will be automatically reclaimed upon exit from
- + the procedure that called alloca(). Originally, this space
- + was supposed to be taken from the current stack frame of the
- + caller, but that method cannot be made to work for some
- + implementations of C, for example under Gould's UTX/32.
- + */
- +
- + static header *last_alloca_header = NULL; /* -> last alloca header */
- +
- + pointer
- + alloca (size) /* returns pointer to storage */
- + unsigned size; /* # bytes to allocate */
- + {
- + auto char probe; /* probes stack depth: */
- + register char *depth = &probe;
- +
- + #if STACK_DIRECTION == 0
- + if (STACK_DIR == 0) /* unknown growth direction */
- + find_stack_direction ();
- + #endif
- +
- + /* Reclaim garbage, defined as all alloca()ed storage that
- + was allocated from deeper in the stack than currently. */
- +
- + {
- + register header *hp; /* traverses linked list */
- +
- + for (hp = last_alloca_header; hp != NULL;)
- + if ((STACK_DIR > 0 && hp->h.deep > depth)
- + || (STACK_DIR < 0 && hp->h.deep < depth))
- + {
- + register header *np = hp->h.next;
- +
- + free ((pointer) hp); /* collect garbage */
- +
- + hp = np; /* -> next header */
- + }
- + else
- + break; /* rest are not deeper */
- +
- + last_alloca_header = hp; /* -> last valid storage */
- + }
- +
- + if (size == 0)
- + return NULL; /* no allocation required */
- +
- + /* Allocate combined header + user data storage. */
- +
- + {
- + register pointer new = xmalloc (sizeof (header) + size);
- + /* address of header */
- +
- + ((header *)new)->h.next = last_alloca_header;
- + ((header *)new)->h.deep = depth;
- +
- + last_alloca_header = (header *)new;
- +
- + /* User storage begins just after header. */
- +
- + return (pointer)((char *)new + sizeof(header));
- + }
- + }
- + #endif
- +
- +
- +
- +
- +
- #define yyerrok (yyerrstatus = 0)
- #define yyclearin (yychar = YYEMPTY)
- #define YYEMPTY -2
- ***************
- *** 570,575 ****
- --- 823,831 ----
- #define YYMAXDEPTH 10000
- #endif
-
- + #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
- + #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
- + #else /* not GNU C or C++ */
- #ifndef __cplusplus
-
- /* This is the most reliable way to avoid incompatibilities
- ***************
- *** 604,611 ****
- }
-
- #endif
-
- ! #line 160 "/usr/gnu/lib/bison.simple"
- int
- yyparse()
- {
- --- 860,868 ----
- }
-
- #endif
- + #endif
-
- ! #line 169 "bison.simple"
- int
- yyparse()
- {
- ***************
- *** 623,631 ****
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
- #ifdef YYLSP_NEEDED
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
-
- #define YYPOPSTACK (yyvsp--, yysp--, yylsp--)
- #else
- --- 880,888 ----
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
- #ifdef YYLSP_NEEDED
- + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
- #define YYPOPSTACK (yyvsp--, yysp--, yylsp--)
- #else
- ***************
- *** 788,794 ****
-
- #if YYDEBUG != 0
- if (yydebug)
- ! fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
- #endif
- }
-
- --- 1045,1059 ----
-
- #if YYDEBUG != 0
- if (yydebug)
- ! {
- ! fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- ! /* Give the individual parser a way to print the precise meaning
- ! of a token, for further debugging info. */
- ! #ifdef YYPRINT
- ! YYPRINT (stderr, yychar, yylval);
- ! #endif
- ! fprintf (stderr, ")\n");
- ! }
- #endif
- }
-
- ***************
- *** 1386,1392 ****
- break;}
- }
- /* the action file gets copied in in place of this dollarsign */
- ! #line 423 "/usr/gnu/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
- --- 1651,1657 ----
- break;}
- }
- /* the action file gets copied in in place of this dollarsign */
- ! #line 440 "bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-