hello,

yet another spell fixes.

Ilya
From af89f34503eed1f36b0e2262bb2cef286336fbc5 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <chipits...@gmail.com>
Date: Sun, 22 Aug 2021 22:18:07 +0500
Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments

This is 26th iteration of typo fixes
---
 doc/lua-api/index.rst    | 30 +++++++++++++++---------------
 include/haproxy/hlua-t.h |  2 +-
 src/hlua.c               | 22 +++++++++++-----------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst
index 0f25760cd..d671b3222 100644
--- a/doc/lua-api/index.rst
+++ b/doc/lua-api/index.rst
@@ -1386,7 +1386,7 @@ Channel class
   retrieve a maximum of data and, if called by an action, it yields if
   necessary. It also waits for more data if the requested length exceeds the
   available amount of incoming data. Do not providing an offset is the same 
that
-  setting it to 0. A positive offset is relative to the begining of incoming
+  setting it to 0. A positive offset is relative to the beginning of incoming
   data of the channel buffer while negative offset is relative to their end.
 
   If there is no incoming data and the channel can't receive more data, a 'nil'
@@ -1426,7 +1426,7 @@ Channel class
   success or -1 if data cannot be copied.
 
   By default, if no offset is provided, the string is copied in front of
-  incoming data. A positive offset is relative to the begining of incoming data
+  incoming data. A positive offset is relative to the beginning of incoming 
data
   of the channel buffer while negative offset is relative to their end.
 
   :param class_channel channel: The manipulated Channel.
@@ -1462,7 +1462,7 @@ Channel class
   retrieve a maximum of data and, if called by an action, yields if
   necessary. It also waits for more data if the requested length exceeds the
   available amount of incoming data. Do not providing an offset is the same 
that
-  setting it to 0. A positive offset is relative to the begining of incoming
+  setting it to 0. A positive offset is relative to the beginning of incoming
   data of the channel buffer while negative offset is relative to their end.
 
   If there is no incoming data and the channel can't receive more data, a 'nil'
@@ -1512,7 +1512,7 @@ Channel class
 
   By default, if no length is provided, all incoming data, starting at the 
given
   offset, are removed. Do not providing an offset is the same that setting it
-  to 0. A positive offset is relative to the begining of incoming data of the
+  to 0. A positive offset is relative to the beginning of incoming data of the
   channel buffer while negative offset is relative to their end.
 
   :param class_channel channel: The manipulated Channel.
@@ -1526,7 +1526,7 @@ Channel class
 .. js:function:: Channel.send(channel, string)
 
   This function requires immediate send of the string **string**. It means the
-  string is copied at the begining of incoming data of the channel buffer and
+  string is copied at the beginning of incoming data of the channel buffer and
   immediately forwarded. Unless if the connection is close, and if called by an
   action, this function yields to copied and forward all the string.
 
@@ -1542,7 +1542,7 @@ Channel class
 
   By default, if no length is provided, all incoming data, starting at the 
given
   offset, are replaced. Do not providing an offset is the same that setting it
-  to 0. A positive offset is relative to the begining of incoming data of the
+  to 0. A positive offset is relative to the beginning of incoming data of the
   channel buffer while negative offset is relative to their end.
 
   :param class_channel channel: The manipulated Channel.
@@ -2082,7 +2082,7 @@ TXN class
   processing after some data have been returned to the client (eg: a redirect).
   To do so, a reply may be provided. This object is optional and may contain a
   status code, a reason, a header list and a body. All these fields are
-  optionnals. When not provided, the default values are used. By default, with
+  optional. When not provided, the default values are used. By default, with
   an empty reply object, an empty HTTP 200 response is returned to the
   client. If no reply object is provided, the transaction is terminated without
   any reply.
@@ -3169,7 +3169,7 @@ Filter class
   **context**: filter
 
   Enable the data filtering on the channel **chn** for the current filter. It
-  may be called at any time from any callback functions preceeding the data
+  may be called at any time from any callback functions proceeding the data
   analysis.
 
   :param class_Channel chn: A :ref:`channel_class`.
@@ -3208,7 +3208,7 @@ attributes:
 
 Such filter class must also define all required callback functions in the
 following list. Note that :js:func:`Filter.new()` must be defined otherwise the
-filter is ignored. Others are optionnal.
+filter is ignored. Others are optional.
 
 * .. js:function:: FILTER.new()
 
@@ -3355,7 +3355,7 @@ HTTPMessage class
   given offset, are returned. If **length** is set to -1, the function tries to
   retrieve a maximum of data. Because it is called in the filter context, it
   never yield. Do not providing an offset is the same that setting it to 0. A
-  positive offset is relative to the begining of incoming data of the
+  positive offset is relative to the beginning of incoming data of the
   http_message buffer while negative offset is relative to their end.
 
   If there is no incoming data and the HTTP message can't receive more data, a 
'nil'
@@ -3450,7 +3450,7 @@ HTTPMessage class
   copied length on success or -1 if data cannot be copied.
 
   By default, if no offset is provided, the string is copied in front of
-  incoming data. A positive offset is relative to the begining of incoming data
+  incoming data. A positive offset is relative to the beginning of incoming 
data
   of the HTTP message while negative offset is relative to their end.
 
   :param class_httpmessage http_msg: The manipulated HTTP message.
@@ -3511,7 +3511,7 @@ HTTPMessage class
 
   By default, if no length is provided, all incoming data, starting at the 
given
   offset, are removed. Do not providing an offset is the same that setting it
-  to 0. A positive offset is relative to the begining of incoming data of the
+  to 0. A positive offset is relative to the beginning of incoming data of the
   HTTP message while negative offset is relative to their end.
 
   :param class_httpmessage http_msg: The manipulated HTTP message.
@@ -3550,7 +3550,7 @@ HTTPMessage class
 .. js:function:: HTTPMessage.send(http_msg, string)
 
   This function required immediate send of the string **string**. It means the
-  string is copied at the begining of incoming data of the HTTP message
+  string is copied at the beginning of incoming data of the HTTP message
   **http_msg** and immediately forwarded. Because it is called in the filter
   context, it never yield.
 
@@ -3566,7 +3566,7 @@ HTTPMessage class
 
   By default, if no length is provided, all incoming data, starting at the 
given
   offset, are replaced. Do not providing an offset is the same that setting it
-  to 0. A positive offset is relative to the begining of incoming data of the
+  to 0. A positive offset is relative to the beginning of incoming data of the
   HTTP message while negative offset is relative to their end.
 
   :param class_httpmessage http_msg: The manipulated HTTP message.
@@ -3628,7 +3628,7 @@ HTTPMessage class
 
 .. js:function:: HTTPMessage.set_status(http_msg, status[, reason])
 
-  Rewrites the response status code with the integer **code** and optionnal the
+  Rewrites the response status code with the integer **code** and optional the
   reason **reason**. If no custom reason is provided, it will be generated from
   the status. The HTTP message **http_msg** must be the response.
 
diff --git a/include/haproxy/hlua-t.h b/include/haproxy/hlua-t.h
index 44f20d804..17f659f86 100644
--- a/include/haproxy/hlua-t.h
+++ b/include/haproxy/hlua-t.h
@@ -65,7 +65,7 @@ struct stream;
 #define HLUA_F_MAY_USE_HTTP 0x02
 
 #define HLUA_TXN_NOTERM   0x00000001
-/* 0x00000002 .. 0x00000008 unsued */
+/* 0x00000002 .. 0x00000008 unused */
 #define HLUA_TXN_SMP_CTX  0x00000010 /* Executed from a sample fecth context */
 #define HLUA_TXN_ACT_CTX  0x00000020 /* Executed from a action context */
 #define HLUA_TXN_FLT_CTX  0x00000030 /* Executed from a filter context */
diff --git a/src/hlua.c b/src/hlua.c
index 8ba8aad95..4ec28a083 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -3025,7 +3025,7 @@ static int hlua_channel_new(lua_State *L, struct channel 
*channel)
 
 /* Helper function returning a filter attached to a channel at the position 
<ud>
  * in the stack, filling the current offset and length of the filter. If no
- * filter is attached, NULL is returned and <offet> and <len> are not
+ * filter is attached, NULL is returned and <offset> and <len> are not
  * initialized.
  */
 static struct filter *hlua_channel_filter(lua_State *L, int ud, struct channel 
*chn, size_t *offset, size_t *len)
@@ -5952,7 +5952,7 @@ static int hlua_http_msg_new(lua_State *L, struct 
http_msg *msg)
 
 /* Helper function returning a filter attached to the HTTP message at the
  * position <ud> in the stack, filling the current offset and length of the
- * filter. If no filter is attached, NULL is returned and <offet> and <len> are
+ * filter. If no filter is attached, NULL is returned and <offset> and <len> 
are
  * filled with output and input length respectively.
  */
 static struct filter *hlua_http_msg_filter(lua_State *L, int ud, struct 
http_msg *msg, size_t *offset, size_t *len)
@@ -6046,7 +6046,7 @@ __LJMP static int hlua_http_msg_del_hdr(lua_State *L)
        return hlua_http_del_hdr(L, msg);
 }
 
-/* Matches the full value line of all occurences of an header in the HTTP
+/* Matches the full value line of all occurrences of an header in the HTTP
  * message given its name against a regex and replaces it if it matches. It
  * relies on hlua_http_rep_hdr().
  */
@@ -6291,7 +6291,7 @@ __LJMP static int hlua_http_msg_get_out_len(lua_State *L)
 
 /* Copies at most <len> bytes of DATA blocks from the HTTP message <msg>
  * starting at the offset <offset> and put it in a string LUA variables. It
- * returns the length of the builded string. It stops on the first non-DATA HTX
+ * returns the built string length. It stops on the first non-DATA HTX
  * block. This function is called during the payload filtering, so the headers
  * are already scheduled for output (from the filter point of view).
  */
@@ -6343,7 +6343,7 @@ static int _hlua_http_msg_dup(struct http_msg *msg, 
lua_State *L, size_t offset,
 
 /* Copies the string <str> to the HTTP message <msg> at the offset
  * <offset>. This function returns -1 if data cannot be copied. Otherwise, it
- * returns the amount of data written. This function is responsibile to update
+ * returns the amount of data written. This function is responsible to update
  * the filter context.
  */
 static int _hlua_http_msg_insert(struct http_msg *msg, struct filter *filter, 
struct ist str, size_t offset)
@@ -6388,7 +6388,7 @@ static int _hlua_http_msg_insert(struct http_msg *msg, 
struct filter *filter, st
 /* Helper function removing at most <len> bytes of DATA blocks at the absolute
  * position <offset>. It stops on the first non-DATA HTX block. This function 
is
  * called during the payload filtering, so the headers are already scheduled 
for
- * output (from the filter point of view). This function is responsibile to
+ * output (from the filter point of view). This function is responsible to
  * update the filter context.
  */
 static void _hlua_http_msg_delete(struct http_msg *msg, struct filter *filter, 
size_t offset, size_t len)
@@ -6443,7 +6443,7 @@ static void _hlua_http_msg_delete(struct http_msg *msg, 
struct filter *filter, s
                                goto end;
                }
 
-               /* Remove oll the data block */
+               /* Remove all the data block */
                len -= sz;
                ret += sz;
                blk = htx_remove_blk(htx, blk);
@@ -6678,7 +6678,7 @@ __LJMP static int hlua_http_msg_del_data(lua_State *L)
        return 1;
 }
 
-/* Replaces a given amount of data at the given offet by a string. By default,
+/* Replaces a given amount of data at the given offset by a string. By default,
  * all remaining data are removed, accordingly to the filter context. It 
returns
  * the amount of data written or -1 if nothing was copied. Unlike the channel
  * function used to replace data, this one can only be called inside a filter,
@@ -9874,7 +9874,7 @@ static int hlua_filter_init_per_thread(struct proxy *px, 
struct flt_conf *fconf)
                goto error;
 #endif
        default:
-               ha_alert("Lua filter '%s' : unknonwn error : %s", 
conf->reg->name, lua_tostring(L, -1));
+               ha_alert("Lua filter '%s' : unknown error : %s", 
conf->reg->name, lua_tostring(L, -1));
                goto error;
        }
 
@@ -10490,7 +10490,7 @@ __LJMP static int hlua_unregister_data_filter(lua_State 
*L)
 }
 
 /* This function is an LUA binding used for registering a filter. It expects a
- * fileter name used in the haproxy configuration file and a LUA function to
+ * filter name used in the haproxy configuration file and a LUA function to
  * parse configuration arguments.
  */
 __LJMP static int hlua_register_filter(lua_State *L)
@@ -11476,7 +11476,7 @@ lua_State *hlua_init_state(int thread_num)
        /* Create and fill the metatable. */
        lua_newtable(L);
 
-       /* Create and fille the __index entry. */
+       /* Create and fill the __index entry. */
        lua_pushstring(L, "__index");
        lua_newtable(L);
 
-- 
2.29.2.windows.2

Reply via email to