From 32d986c025c7e0abcb2a933862b545a408a1c03d Mon Sep 17 00:00:00 2001
From: Veres Lajos <vlajos@gmail.com>
Date: Tue, 2 Jul 2013 22:46:37 +0100
Subject: [PATCH] typofixes by https://github.com/vlajos/misspell_fixer

---
 CHANGES                         |    2 +-
 CWRU/changelog                  |    2 +-
 bashline.c                      |    2 +-
 builtins/mkbuiltins.c           |    8 ++++----
 builtins/psize.sh               |    2 +-
 builtins/trap.def               |    2 +-
 eval.c                          |    2 +-
 examples/functions/getoptx.bash |    2 +-
 examples/scripts.v2/fman        |    2 +-
 examples/scripts.v2/ncp         |    2 +-
 examples/scripts.v2/nmv         |    2 +-
 examples/scripts.v2/untar       |    2 +-
 examples/scripts/dd-ex.sh       |    2 +-
 examples/scripts/timeout3       |    2 +-
 expr.c                          |    2 +-
 general.h                       |    2 +-
 lib/readline/doc/hstech.texi    |    2 +-
 lib/readline/histexpand.c       |    2 +-
 lib/readline/history.h          |    2 +-
 lib/readline/input.c            |    2 +-
 quit.h                          |    2 +-
 redir.c                         |    4 ++--
 shell.c                         |    4 ++--
 test.c                          |    2 +-
 trap.c                          |    2 +-
 variables.c                     |   16 ++++++++--------
 variables.h                     |    2 +-
 27 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/CHANGES b/CHANGES
index 84e1dbd..d5f2913 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3126,7 +3126,7 @@ c.  Fixed a problem which caused the display to be messed up when the last
     line of a multi-line prompt (possibly containing invisible characters)
     was longer than the screen width.
 
-d.  Fixed a problem with the vi-mode `r' command that ocurred on systems with
+d.  Fixed a problem with the vi-mode `r' command that occurred on systems with
     support for multibyte characters when running in a locale without any
     multibyte characters.
 
diff --git a/CWRU/changelog b/CWRU/changelog
index bcc6657..7e45c66 100644
--- a/CWRU/changelog
+++ b/CWRU/changelog
@@ -5566,7 +5566,7 @@ subst.h
 	- change extern declaration for expand_prompt_string to add third arg
 
 bashline.c
-	- pass W_NOCOMSUB as third argment to expand_prompt_string when
+	- pass W_NOCOMSUB as third argument to expand_prompt_string when
 	  calling from bash_directory_completion_hook, since we don't want
 	  to do command substitution from the completion code
 
diff --git a/bashline.c b/bashline.c
index 3cbb18f..0f35a61 100644
--- a/bashline.c
+++ b/bashline.c
@@ -772,7 +772,7 @@ clear_hostname_list ()
 }
 
 /* Return a NULL terminated list of hostnames which begin with TEXT.
-   Initialize the hostname list the first time if neccessary.
+   Initialize the hostname list the first time if necessary.
    The array is malloc ()'ed, but not the individual strings. */
 static char **
 hostnames_matching (text)
diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
index cdfdfb1..cf434a9 100644
--- a/builtins/mkbuiltins.c
+++ b/builtins/mkbuiltins.c
@@ -198,7 +198,7 @@ void remove_trailing_whitespace ();
 
 /* For each file mentioned on the command line, process it and
    write the information to STRUCTFILE and EXTERNFILE, while
-   creating the production file if neccessary. */
+   creating the production file if necessary. */
 int
 main (argc, argv)
      int argc;
@@ -390,7 +390,7 @@ copy_string_array (array)
   return (copy);
 }
 
-/* Add ELEMENT to ARRAY, growing the array if neccessary. */
+/* Add ELEMENT to ARRAY, growing the array if necessary. */
 void
 array_add (element, array)
      char *element;
@@ -1138,7 +1138,7 @@ char *structfile_footer[] = {
   (char *)NULL
 };
 
-/* Write out any neccessary opening information for
+/* Write out any necessary opening information for
    STRUCTFILE and EXTERNFILE. */
 void
 write_file_headers (structfile, externfile)
@@ -1247,7 +1247,7 @@ write_builtins (defs, structfile, externfile)
 		   long documentation strings. */
 		save_builtin (builtin);
 
-	      /* Write out the matching #endif, if neccessary. */
+	      /* Write out the matching #endif, if necessary. */
 	      if (builtin->dependencies)
 		{
 		  if (externfile)
diff --git a/builtins/psize.sh b/builtins/psize.sh
index c4d73e1..29bc115 100644
--- a/builtins/psize.sh
+++ b/builtins/psize.sh
@@ -27,7 +27,7 @@ echo ""
 
 #
 # Try to avoid tempfile races.  We can't really check for the file's
-# existance before we run psize.aux, because `test -e' is not portable,
+# existence before we run psize.aux, because `test -e' is not portable,
 # `test -h' (test for symlinks) is not portable, and `test -f' only
 # checks for regular files.  If we used mktemp(1), we're ahead of the
 # game.
diff --git a/builtins/trap.def b/builtins/trap.def
index 2119f5b..3179c28 100644
--- a/builtins/trap.def
+++ b/builtins/trap.def
@@ -86,7 +86,7 @@ static int display_traps __P((WORD_LIST *));
    trap -p [sigspec ...]
    trap [--]
 
-   Set things up so that ARG is executed when SIGNAL(s) N is recieved.
+   Set things up so that ARG is executed when SIGNAL(s) N is received.
    If ARG is the empty string, then ignore the SIGNAL(s).  If there is
    no ARG, then set the trap for SIGNAL(s) to its original value.  Just
    plain "trap" means to print out the list of commands associated with
diff --git a/eval.c b/eval.c
index 9011e0b..0d4188e 100644
--- a/eval.c
+++ b/eval.c
@@ -90,7 +90,7 @@ reader_loop ()
 
 	  switch (code)
 	    {
-	      /* Some kind of throw to top_level has occured. */
+	      /* Some kind of throw to top_level has occurred. */
 	    case FORCE_EOF:
 	    case ERREXIT:
 	    case EXITPROG:
diff --git a/examples/functions/getoptx.bash b/examples/functions/getoptx.bash
index d402c7d..a27f9a9 100644
--- a/examples/functions/getoptx.bash
+++ b/examples/functions/getoptx.bash
@@ -54,7 +54,7 @@
 # like getopts, but parse long-named options.
 #
 # Both getopt and getoptex return 0 if an option has been parsed,
-# and 1 if all options are already parsed or an error occured
+# and 1 if all options are already parsed or an error occurred
 #
 # Both getopt and getoptex set or test the following variables:
 #
diff --git a/examples/scripts.v2/fman b/examples/scripts.v2/fman
index 1e94d21..6ce6a98 100644
--- a/examples/scripts.v2/fman
+++ b/examples/scripts.v2/fman
@@ -4,7 +4,7 @@
 # fman: new man program
 # @(#) fman.ksh 1.5 94/04/16
 # 91/07/03 john h. dubois iii (john@armory.com)
-# 91/07/11 made it unpack man pages if neccessary
+# 91/07/11 made it unpack man pages if necessary
 # 91/07/16 fixed test for whether man file pattern was expanded
 # 92/01/21 made it read /etc/default/man to get section order,
 #          and only display the first section found.
diff --git a/examples/scripts.v2/ncp b/examples/scripts.v2/ncp
index c91ba64..22da82f 100644
--- a/examples/scripts.v2/ncp
+++ b/examples/scripts.v2/ncp
@@ -146,7 +146,7 @@ files=$*" 1>&2
 fi
 
 if $noover || $overwrite; then
-    $debug && echo "checking for existance of directories..." 1>&2
+    $debug && echo "checking for existence of directories..." 1>&2
     # If the destination is not intended to be a directory...
     if [ $# -eq 2 ] && [ ! -d "$dest" ]; then
 	Check "$dest" "$1" || exit 0		# No files to copy
diff --git a/examples/scripts.v2/nmv b/examples/scripts.v2/nmv
index c91ba64..22da82f 100644
--- a/examples/scripts.v2/nmv
+++ b/examples/scripts.v2/nmv
@@ -146,7 +146,7 @@ files=$*" 1>&2
 fi
 
 if $noover || $overwrite; then
-    $debug && echo "checking for existance of directories..." 1>&2
+    $debug && echo "checking for existence of directories..." 1>&2
     # If the destination is not intended to be a directory...
     if [ $# -eq 2 ] && [ ! -d "$dest" ]; then
 	Check "$dest" "$1" || exit 0		# No files to copy
diff --git a/examples/scripts.v2/untar b/examples/scripts.v2/untar
index 1ba6b6b..84012a3 100644
--- a/examples/scripts.v2/untar
+++ b/examples/scripts.v2/untar
@@ -11,7 +11,7 @@
 phelp()
 {
 echo \
-"$name: extract tar archives into directories, uncompressing if neccessary.
+"$name: extract tar archives into directories, uncompressing if necessary.
 Usage: $name archive[.tar[.[Z|gz]]] ..
 If an archive name given does not end in .tar, .tar.Z, or .tar.gz, it is
 searched for first with .tar added, then .tar.Z, and then .tar.gz added. 
diff --git a/examples/scripts/dd-ex.sh b/examples/scripts/dd-ex.sh
index fafc83f..0543241 100644
--- a/examples/scripts/dd-ex.sh
+++ b/examples/scripts/dd-ex.sh
@@ -243,7 +243,7 @@ replace () {
 }
 
 # rstring n s bla
-# replace the n-th occurence of s with bla
+# replace the n-th occurrence of s with bla
 
 rstring () {
   n="$1"
diff --git a/examples/scripts/timeout3 b/examples/scripts/timeout3
index de650be..0ba6253 100644
--- a/examples/scripts/timeout3
+++ b/examples/scripts/timeout3
@@ -82,7 +82,7 @@ fi
     done
 
     # Be nice, post SIGTERM first.
-    # The 'exit 0' below will be executed if any preceeding command fails.
+    # The 'exit 0' below will be executed if any preceding command fails.
     kill -s SIGTERM $$ && kill -0 $$ || exit 0
     sleep $delay
     kill -s SIGKILL $$
diff --git a/expr.c b/expr.c
index 98d75b6..c43ccf0 100644
--- a/expr.c
+++ b/expr.c
@@ -87,7 +87,7 @@
    Here is a macro which accepts newlines, tabs and spaces as whitespace. */
 #define cr_whitespace(c) (whitespace(c) || ((c) == '\n'))
 
-/* Size be which the expression stack grows when neccessary. */
+/* Size be which the expression stack grows when necessary. */
 #define EXPR_STACK_GROW_SIZE 10
 
 /* Maximum amount of recursion allowed.  This prevents a non-integer
diff --git a/general.h b/general.h
index 2b31c58..8de5b15 100644
--- a/general.h
+++ b/general.h
@@ -124,7 +124,7 @@ typedef struct {
   int token;
 } STRING_INT_ALIST;
 
-/* A macro to avoid making an uneccessary function call. */
+/* A macro to avoid making an unecessary function call. */
 #define REVERSE_LIST(list, type) \
   ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \
 			: (type)(list))
diff --git a/lib/readline/doc/hstech.texi b/lib/readline/doc/hstech.texi
index 4fc9e8e..03d10fe 100644
--- a/lib/readline/doc/hstech.texi
+++ b/lib/readline/doc/hstech.texi
@@ -377,7 +377,7 @@ if the returned line should be displayed, but not executed,
 as with the @code{:p} modifier (@pxref{Modifiers}).
 @end table
 
-If an error ocurred in expansion, then @var{output} contains a descriptive
+If an error occurred in expansion, then @var{output} contains a descriptive
 error message.
 @end deftypefun
 
diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
index 8fb3798..5542951 100644
--- a/lib/readline/histexpand.c
+++ b/lib/readline/histexpand.c
@@ -894,7 +894,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
    1) If expansions did take place
    2) If the `p' modifier was given and the caller should print the result
 
-  If an error ocurred in expansion, then OUTPUT contains a descriptive
+  If an error occurred in expansion, then OUTPUT contains a descriptive
   error message. */
 
 #define ADD_STRING(s) \
diff --git a/lib/readline/history.h b/lib/readline/history.h
index 1257e66..c8af47e 100644
--- a/lib/readline/history.h
+++ b/lib/readline/history.h
@@ -216,7 +216,7 @@ extern int history_truncate_file PARAMS((const char *, int));
   -1) If there was an error in expansion.
    2) If the returned line should just be printed.
 
-  If an error ocurred in expansion, then OUTPUT contains a descriptive
+  If an error occurred in expansion, then OUTPUT contains a descriptive
   error message. */
 extern int history_expand PARAMS((char *, char **));
 
diff --git a/lib/readline/input.c b/lib/readline/input.c
index b49af88..74f9ffb 100644
--- a/lib/readline/input.c
+++ b/lib/readline/input.c
@@ -511,7 +511,7 @@ rl_getc (stream)
 
       /* If the error that we received was SIGINT, then try again,
 	 this is simply an interrupted system call to read ().
-	 Otherwise, some error ocurred, also signifying EOF. */
+	 Otherwise, some error occurred, also signifying EOF. */
       if (errno != EINTR)
 	return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
     }
diff --git a/quit.h b/quit.h
index e7bf05b..1d2eb69 100644
--- a/quit.h
+++ b/quit.h
@@ -21,7 +21,7 @@
 #if !defined (_QUIT_H_)
 #define _QUIT_H_
 
-/* Non-zero means SIGINT has already ocurred. */
+/* Non-zero means SIGINT has already occurred. */
 extern volatile int interrupt_state;
 extern volatile int terminating_signal;
 
diff --git a/redir.c b/redir.c
index 02e477d..0ac66a1 100644
--- a/redir.c
+++ b/redir.c
@@ -206,7 +206,7 @@ expandable_filename:
 
 /* Perform the redirections on LIST.  If flags & RX_ACTIVE, then actually
    make input and output file descriptors, otherwise just do whatever is
-   neccessary for side effecting.  flags & RX_UNDOABLE says to remember
+   necessary for side effecting.  flags & RX_UNDOABLE says to remember
    how to undo the redirections later, if non-zero.  If flags & RX_CLEXEC
    is non-zero, file descriptors opened in do_redirection () have their
    close-on-exec flag set. */
@@ -659,7 +659,7 @@ undoablefd (fd)
 
 /* Do the specific redirection requested.  Returns errno or one of the
    special redirection errors (*_REDIRECT) in case of error, 0 on success.
-   If flags & RX_ACTIVE is zero, then just do whatever is neccessary to
+   If flags & RX_ACTIVE is zero, then just do whatever is necessary to
    produce the appropriate side effects.   flags & RX_UNDOABLE, if non-zero,
    says to remember how to undo each redirection.  If flags & RX_CLEXEC is
    non-zero, then we set all file descriptors > 2 that we open to be
diff --git a/shell.c b/shell.c
index 9e74f3b..152919d 100644
--- a/shell.c
+++ b/shell.c
@@ -1222,7 +1222,7 @@ run_wordexp (words)
     {
       switch (code)
 	{
-	  /* Some kind of throw to top_level has occured. */
+	  /* Some kind of throw to top_level has occurred. */
 	case FORCE_EOF:
 	  return last_command_exit_value = 127;
 	case ERREXIT:
@@ -1300,7 +1300,7 @@ run_one_command (command)
 #endif /* PROCESS_SUBSTITUTION */
       switch (code)
 	{
-	  /* Some kind of throw to top_level has occured. */
+	  /* Some kind of throw to top_level has occurred. */
 	case FORCE_EOF:
 	  return last_command_exit_value = 127;
 	case ERREXIT:
diff --git a/test.c b/test.c
index e0cc19d..83a4c9f 100644
--- a/test.c
+++ b/test.c
@@ -156,7 +156,7 @@ integer_expected_error (pch)
 }
 
 /* Increment our position in the argument list.  Check that we're not
-   past the end of the argument list.  This check is supressed if the
+   past the end of the argument list.  This check is suppressed if the
    argument is FALSE.  Made a macro for efficiency. */
 #define advance(f) do { ++pos; if (f && pos >= argc) beyond (); } while (0)
 #define unary_advance() do { advance (1); ++pos; } while (0)
diff --git a/trap.c b/trap.c
index 86665e7..0130dd3 100644
--- a/trap.c
+++ b/trap.c
@@ -92,7 +92,7 @@ extern WORD_LIST *subst_assign_varlist;
 SigHandler *original_signals[NSIG];
 
 /* For each signal, a slot for a string, which is a command to be
-   executed when that signal is recieved.  The slot can also contain
+   executed when that signal is received.  The slot can also contain
    DEFAULT_SIG, which means do whatever you were going to do before
    you were so rudely interrupted, or IGNORE_SIG, which says ignore
    this signal. */
diff --git a/variables.c b/variables.c
index 7bb850f..6521c3e 100644
--- a/variables.c
+++ b/variables.c
@@ -3571,10 +3571,10 @@ do \
     export_env[export_env_index] = (char *)NULL; \
   } while (0)
 
-/* Add ASSIGN to EXPORT_ENV, or supercede a previous assignment in the
+/* Add ASSIGN to EXPORT_ENV, or supersede a previous assignment in the
    array with the same left-hand side.  Return the new EXPORT_ENV. */
 char **
-add_or_supercede_exported_var (assign, do_alloc)
+add_or_supersede_exported_var (assign, do_alloc)
      char *assign;
      int do_alloc;
 {
@@ -3606,9 +3606,9 @@ add_or_supercede_exported_var (assign, do_alloc)
 }
 
 static void
-add_temp_array_to_env (temp_array, do_alloc, do_supercede)
+add_temp_array_to_env (temp_array, do_alloc, do_supersede)
      char **temp_array;
-     int do_alloc, do_supercede;
+     int do_alloc, do_supersede;
 {
   register int i;
 
@@ -3617,8 +3617,8 @@ add_temp_array_to_env (temp_array, do_alloc, do_supercede)
 
   for (i = 0; temp_array[i]; i++)
     {
-      if (do_supercede)
-	export_env = add_or_supercede_exported_var (temp_array[i], do_alloc);
+      if (do_supersede)
+	export_env = add_or_supersede_exported_var (temp_array[i], do_alloc);
       else
 	add_to_export_env (temp_array[i], do_alloc);
     }
@@ -3749,7 +3749,7 @@ update_export_env_inplace (env_prefix, preflen, value)
   strcpy (evar, env_prefix);
   if (value)
     strcpy (evar + preflen, value);
-  export_env = add_or_supercede_exported_var (evar, 0);
+  export_env = add_or_supersede_exported_var (evar, 0);
 }
 
 /* We always put _ in the environment as the name of this command. */
@@ -3783,7 +3783,7 @@ put_gnu_argv_flags_into_env (pid, flags_string)
 
   free (pbuf);
 
-  export_env = add_or_supercede_exported_var (dummy, 0);
+  export_env = add_or_supersede_exported_var (dummy, 0);
 }
 #endif
 
diff --git a/variables.h b/variables.h
index 84e92bb..b345dba 100644
--- a/variables.h
+++ b/variables.h
@@ -259,7 +259,7 @@ extern SHELL_VAR **all_array_variables __P((void));
 extern char **all_variables_matching_prefix __P((const char *));
 
 extern char **make_var_array __P((HASH_TABLE *));
-extern char **add_or_supercede_exported_var __P((char *, int));
+extern char **add_or_supersede_exported_var __P((char *, int));
 
 extern char *get_variable_value __P((SHELL_VAR *));
 extern char *get_string_value __P((const char *));
-- 
1.7.10.4

