gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated (fa4a35d9 -> ec2725b5)


From: gnunet
Subject: [libmicrohttpd] branch master updated (fa4a35d9 -> ec2725b5)
Date: Wed, 03 Nov 2021 12:55:09 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from fa4a35d9 MHD_str_remove_token_caseless_(): clarified comments
     new 10cb9ff0 MHD_str_remove_tokens_caseless_(): improved comments
     new ec2725b5 test_str_token{,s}_remove: fixed comments

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/microhttpd/mhd_str.c                | 12 ++++++------
 src/microhttpd/mhd_str.h                |  4 ++--
 src/microhttpd/test_str_token_remove.c  |  4 ++--
 src/microhttpd/test_str_tokens_remove.c |  4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c
index 4222cbab..0526a1a5 100644
--- a/src/microhttpd/mhd_str.c
+++ b/src/microhttpd/mhd_str.c
@@ -697,7 +697,7 @@ MHD_str_remove_token_caseless_ (const char *str,
  * Perform in-place case-insensitive removal of @a tokens from the @a str.
  *
  * Token could be surrounded by spaces and tabs and delimited by comma.
- * The token match succeed if substring between start, end (of string) or
+ * The token match succeed if substring between start, end (of the string), or
  * comma contains only case-insensitive token and optional spaces and tabs.
  * The quoted strings and comments are not supported by this function.
  *
@@ -705,7 +705,7 @@ MHD_str_remove_token_caseless_ (const char *str,
  * are removed, no whitespaces before commas, exactly one space is used after
  * each comma. The string is updated in-place.
  *
- * Behavior is undefined is input string in not normalised.
+ * Behavior is undefined is the input string in not normalised.
  *
  * @param[in,out] str the string to update
  * @param[in,out] str_len the length of the @a str, not including optional
@@ -753,13 +753,13 @@ MHD_str_remove_tokens_caseless_ (char *str,
         pt++;
       } while (pt < tokens_len &&
                (' ' != t[pt] && '\t' != t[pt] && ',' != t[pt]));
-      /* Found end of token string, space, tab, or comma */
+      /* Found end of the token string, space, tab, or comma */
       tkn_len = pt - (size_t) (tkn - t);
 
       /* Skip all spaces and tabs */
       while (pt < tokens_len && (' ' == t[pt] || '\t' == t[pt]))
         pt++;
-      /* Found end of token string or non-whitespace char */
+      /* Found end of the token string or non-whitespace char */
     } while(pt < tokens_len && ',' != t[pt]);
 
     /* 'tkn' is the input token with 'tkn_len' chars */
@@ -779,8 +779,8 @@ MHD_str_remove_tokens_caseless_ (char *str,
      * It's know that 'tkn' is not equal to the 'str' (was checked previously).
      * As 'str' is normalized when 'tkn' is not equal to the 'str'
      * it is required that 'str' to be at least 3 chars larger then 'tkn'
-     * (the comma, the space and at least one additional character)
-     * to remove 'tkn' from the 'str'. */
+     * (the comma, the space and at least one additional character for the next
+     * token) to remove 'tkn' from the 'str'. */
     if (*str_len > tkn_len + 2)
     { /* Remove 'tkn' from the input string */
       size_t pr;    /**< the 'read' position in the @a str */
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index 3e5f8a41..4faeba08 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -193,7 +193,7 @@ MHD_str_remove_token_caseless_ (const char *str,
  * Perform in-place case-insensitive removal of @a tokens from the @a str.
  *
  * Token could be surrounded by spaces and tabs and delimited by comma.
- * The token match succeed if substring between start, end (of string) or
+ * The token match succeed if substring between start, end (of the string), or
  * comma contains only case-insensitive token and optional spaces and tabs.
  * The quoted strings and comments are not supported by this function.
  *
@@ -201,7 +201,7 @@ MHD_str_remove_token_caseless_ (const char *str,
  * are removed, no whitespaces before commas, exactly one space is used after
  * each comma. The string is updated in-place.
  *
- * Behavior is undefined is input string in not normalised.
+ * Behavior is undefined is the input string in not normalised.
  *
  * @param[in,out] str the string to update
  * @param[in,out] str_len the length of the @a str, not including optional
diff --git a/src/microhttpd/test_str_token_remove.c 
b/src/microhttpd/test_str_token_remove.c
index 8334ba97..a4f7ae55 100644
--- a/src/microhttpd/test_str_token_remove.c
+++ b/src/microhttpd/test_str_token_remove.c
@@ -1,6 +1,6 @@
 /*
   This file is part of libmicrohttpd
-  Copyright (C) 2017 Karlson2k (Evgeny Grin)
+  Copyright (C) 2017-2021 Karlson2k (Evgeny Grin)
 
   This test tool is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
@@ -19,7 +19,7 @@
 
 /**
  * @file microhttpd/test_str_token.c
- * @brief  Unit tests for some mhd_str functions
+ * @brief  Unit tests for MHD_str_remove_token_caseless_() function
  * @author Karlson2k (Evgeny Grin)
  */
 
diff --git a/src/microhttpd/test_str_tokens_remove.c 
b/src/microhttpd/test_str_tokens_remove.c
index f5347868..1cd1696b 100644
--- a/src/microhttpd/test_str_tokens_remove.c
+++ b/src/microhttpd/test_str_tokens_remove.c
@@ -1,6 +1,6 @@
 /*
   This file is part of libmicrohttpd
-  Copyright (C) 2017 Karlson2k (Evgeny Grin)
+  Copyright (C) 2017-2021 Karlson2k (Evgeny Grin)
 
   This test tool is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
@@ -19,7 +19,7 @@
 
 /**
  * @file microhttpd/test_str_token.c
- * @brief  Unit tests for some mhd_str functions
+ * @brief  Unit tests for MHD_str_remove_tokens_caseless_() function
  * @author Karlson2k (Evgeny Grin)
  */
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]