libgcrypt contains several instances of ungrammatical English phrases like "This allows to keep it uninitialized", where grammatical English would be something like "This allows keeping it uninitialized". I noticed this when correcting some grammar in Emacs and Gnulib comments. Proposed libgcrypt patch attached.
From 4d51bf931d43745f614067d0c231d0530e7dc5c0 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 8 May 2025 12:02:04 -0700
Subject: [PATCH] Fix ungrammatical use of "allow to"

---
 NEWS                     |  6 +++---
 README                   |  2 +-
 autogen.sh               |  2 +-
 cipher/cipher-cfb.c      |  4 ++--
 cipher/cipher-internal.h |  2 +-
 cipher/cipher-ocb.c      |  2 +-
 cipher/hash-common.c     |  2 +-
 cipher/mac-hmac.c        |  2 +-
 cipher/pubkey-util.c     |  4 ++--
 cipher/pubkey.c          |  2 +-
 cipher/rsa.c             |  6 +++---
 configure.ac             |  4 ++--
 doc/announce-1.4.txt     | 12 ++++++------
 doc/gcrypt.texi          | 16 ++++++++--------
 m4/libtool.m4            |  2 +-
 mpi/mpiutil.c            |  4 ++--
 random/random-csprng.c   |  2 +-
 random/random-drbg.c     |  2 +-
 random/random-system.c   |  2 +-
 random/random.c          |  4 ++--
 src/context.c            |  8 ++++----
 src/gcrypt.h.in          |  2 +-
 src/libgcrypt.m4         |  2 +-
 23 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/NEWS b/NEWS
index f5eab813..4618d5f3 100644
--- a/NEWS
+++ b/NEWS
@@ -727,7 +727,7 @@ Noteworthy changes in version 1.8.0 (2017-07-18)  [C22/A2/R0]
 
    - New function gcry_get_config.
 
-   - GCRYCTL_REINIT_SYSCALL_CLAMP allows to init nPth after Libgcrypt.
+   - GCRYCTL_REINIT_SYSCALL_CLAMP allows initializing nPth after Libgcrypt.
 
    - New global configuration file /etc/gcrypt/random.conf.
 
@@ -1391,7 +1391,7 @@ Noteworthy changes in version 1.3.1 (2007-10-26)
 Noteworthy changes in version 1.3.0 (2007-05-04)
 ------------------------------------------------
 
- * Changed the way the RNG gets initialized. This allows to keep it
+ * Changed the way the RNG gets initialized. This allows keeping it
    uninitialized as long as no random numbers are used.  To override
    this, the new macro gcry_fast_random_poll may be used.  It is in
    general a good idea to spread this macro into the application code
@@ -1423,7 +1423,7 @@ Noteworthy changes in version 1.3.0 (2007-05-04)
 
  * New configure option --enable-random-daemon to support a system
    wide random daemon.  The daemon code is experimental and not yet
-   very well working.  It will eventually allow to keep a global
+   very well working.  It will eventually allow keeping a global
    random pool for the sake of short living processes.
 
  * Non executable stack support is now used by default on systems
diff --git a/README b/README
index a0f9a031..cc2a9ffc 100644
--- a/README
+++ b/README
@@ -273,7 +273,7 @@
 
     Since 2001 maintenance and development of Libgcrypt is done by g10
     Code GmbH and was mostly financed by donations; since 2022 a raise
-    in revenues from support contracts allows to fully finance the
+    in revenues from support contracts allows fully financing the
     development without resorting to donations.  Many thanks to our
     paid developers for their work and also a big thank you to Jussi
     Kivilinna for all of his performance work.
diff --git a/autogen.sh b/autogen.sh
index 9b361581..b1094f64 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -57,7 +57,7 @@ replace_sysroot () {
     extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
 }
 
-# Allow to override the default tool names
+# Allow overriding the default tool names
 AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
 AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
 
diff --git a/cipher/cipher-cfb.c b/cipher/cipher-cfb.c
index d51ca4d4..bb99795d 100644
--- a/cipher/cipher-cfb.c
+++ b/cipher/cipher-cfb.c
@@ -70,7 +70,7 @@ _gcry_cipher_cfb_encrypt (gcry_cipher_hd_t c,
 
   /* Now we can process complete blocks.  We use a loop as long as we
      have at least 2 blocks and use conditions for the rest.  This
-     also allows to use a bulk encryption function if available.  */
+     also allows using a bulk encryption function if available.  */
   if (inbuflen >= blocksize_x_2 && c->bulk.cfb_enc)
     {
       size_t nblocks = inbuflen >> blocksize_shift;
@@ -168,7 +168,7 @@ _gcry_cipher_cfb_decrypt (gcry_cipher_hd_t c,
 
   /* Now we can process complete blocks.  We use a loop as long as we
      have at least 2 blocks and use conditions for the rest.  This
-     also allows to use a bulk encryption function if available.  */
+     also allows using a bulk encryption function if available.  */
   if (inbuflen >= blocksize_x_2 && c->bulk.cfb_dec)
     {
       size_t nblocks = inbuflen >> blocksize_shift;
diff --git a/cipher/cipher-internal.h b/cipher/cipher-internal.h
index eeb865dd..857b5da8 100644
--- a/cipher/cipher-internal.h
+++ b/cipher/cipher-internal.h
@@ -247,7 +247,7 @@ struct gcry_cipher_handle
   gcry_cipher_spec_t *spec;
 
   /* The algorithm id.  This is a hack required because the module
-     interface does not easily allow to retrieve this value. */
+     interface does not easily allow retrieving this value. */
   int algo;
 
   /* A structure with function pointers for mode operations. */
diff --git a/cipher/cipher-ocb.c b/cipher/cipher-ocb.c
index eaddc495..e690a7d4 100644
--- a/cipher/cipher-ocb.c
+++ b/cipher/cipher-ocb.c
@@ -238,7 +238,7 @@ _gcry_cipher_ocb_set_nonce (gcry_cipher_hd_t c, const unsigned char *nonce,
 
 
 /* Process additional authentication data.  This implementation allows
-   to add additional authentication data at any time before the final
+   adding additional authentication data at any time before the final
    gcry_cipher_gettag.  */
 gcry_err_code_t
 _gcry_cipher_ocb_authenticate (gcry_cipher_hd_t c, const unsigned char *abuf,
diff --git a/cipher/hash-common.c b/cipher/hash-common.c
index deff40d7..03cd11f0 100644
--- a/cipher/hash-common.c
+++ b/cipher/hash-common.c
@@ -110,7 +110,7 @@ _gcry_hash_selftest_check_one (int algo,
 
 /* Common function to write a chunk of data to the transform function
    of a hash algorithm.  Note that the use of the term "block" does
-   not imply a fixed size block.  Note that we explicitly allow to use
+   not imply a fixed size block.  Note that we explicitly allow using
    this function after the context has been finalized; the result does
    not have any meaning but writing after finalize is sometimes
    helpful to mitigate timing attacks. */
diff --git a/cipher/mac-hmac.c b/cipher/mac-hmac.c
index 09e259bb..94fe2c9f 100644
--- a/cipher/mac-hmac.c
+++ b/cipher/mac-hmac.c
@@ -1166,7 +1166,7 @@ selftests_sha3 (int hashalgo, int extended, selftest_report_func_t report)
           0xd5, 0xf3, 0x29, 0x8a, 0x41, 0xd0, 0x2c, 0x66  }
       }/*,*/
 
-      /* Our API does not allow to specify a bit count and thus we
+      /* Our API does not allow specifying a bit count and thus we
        * can't use the following test.  */
       /* { "data-5bit key-4",  /\* Test 8  *\/ */
       /*   /\* Test with data bit size no multiple of 8, the data bits are */
diff --git a/cipher/pubkey-util.c b/cipher/pubkey-util.c
index 0e67f892..5a16d2f1 100644
--- a/cipher/pubkey-util.c
+++ b/cipher/pubkey-util.c
@@ -259,7 +259,7 @@ get_hash_algo (const char *s, size_t n)
     {
       /* In case of not listed or dynamically allocated hash
 	 algorithm we fall back to this somewhat slower
-	 method.  Further, it also allows to use OIDs as
+	 method.  Further, it also allows using OIDs as
 	 algorithm names. */
       char *tmpname;
 
@@ -666,7 +666,7 @@ _gcry_pk_util_free_encoding_ctx (struct pk_encoding_ctx *ctx)
 /* Take the hash value and convert into an MPI, suitable for
    passing to the low level functions.  We currently support the
    old style way of passing just a MPI and the modern interface which
-   allows to pass flags so that we can choose between raw and pkcs1
+   allows passing flags so that we can choose between raw and pkcs1
    padding - may be more padding options later.
 
    (<mpi>)
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 3778f482..ac806d3c 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -296,7 +296,7 @@ pubkey_get_nenc (int algo)
    Caller has to provide a public key as the SEXP pkey and data as a
    SEXP with just one MPI in it. Alternatively S_DATA might be a
    complex S-Expression, similar to the one used for signature
-   verification.  This provides a flag which allows to handle PKCS#1
+   verification.  This provides a flag which allows handling PKCS#1
    block type 2 padding.  The function returns a sexp which may be
    passed to to pk_decrypt.
 
diff --git a/cipher/rsa.c b/cipher/rsa.c
index 7e086df4..4c3a8e42 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -472,8 +472,8 @@ generate_fips (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e,
     {
       /* Parameters to derive the key are given.  */
       /* Note that we explicitly need to setup the values of tbl
-         because some compilers (e.g. OpenWatcom, IRIX) don't allow to
-         initialize a structure with automatic variables.  */
+         because some compilers (e.g. OpenWatcom, IRIX) don't allow
+         initializing a structure with automatic variables.  */
       struct { const char *name; gcry_mpi_t *value; } tbl[] = {
         { "e" },
         { "p" },
@@ -825,7 +825,7 @@ generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value,
         /* Parameters to derive the key are given.  */
         /* Note that we explicitly need to setup the values of tbl
            because some compilers (e.g. OpenWatcom, IRIX) don't allow
-           to initialize a structure with automatic variables.  */
+           initializing a structure with automatic variables.  */
         struct { const char *name; gcry_mpi_t *value; } tbl[] = {
           { "Xp1" },
           { "Xp2" },
diff --git a/configure.ac b/configure.ac
index bcedad3a..7526d93a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2890,14 +2890,14 @@ if test "$random" = "default"; then
           random_modules="w32"
           ;;
         *)
-          # Build everything, allow to select at runtime.
+          # Build everything, allow selecting at runtime.
           random_modules="$auto_random_modules"
           ;;
         esac
     fi
 else
     if test "$random" = "auto"; then
-        # Build everything, allow to select at runtime.
+        # Build everything, allow selecting at runtime.
         random_modules="$auto_random_modules"
     else
         random_modules="$random"
diff --git a/doc/announce-1.4.txt b/doc/announce-1.4.txt
index 26e8bb33..8bb2e18b 100644
--- a/doc/announce-1.4.txt
+++ b/doc/announce-1.4.txt
@@ -2,7 +2,7 @@ To: gnupg-annou...@gnupg.org, info-...@gnu.org
 Cc: gcrypt-devel@gnupg.org
 
 
-Hello! 
+Hello!
 
 We are pleased to announce the availability of Libgcrypt 1.4.0.  This
 is the new stable version of Libgcrypt and upward compatible with the
@@ -22,7 +22,7 @@ Noteworthy changes between 1.2.x and 1.4.0 are:
 
  * Support for the SEED cipher.
 
- * Support for the Camellia cipher. 
+ * Support for the Camellia cipher.
 
  * Support for OFB encryption mode.
 
@@ -38,7 +38,7 @@ Noteworthy changes between 1.2.x and 1.4.0 are:
 
  * The ACE engine of VIA processors is now used for AES-128.
 
- * Changed the way the RNG gets initialized.  This allows to keep it
+ * Changed the way the RNG gets initialized.  This allows keeping it
    uninitialized as long as no random numbers are used.
 
  * Updated the entropy gatherer for W32.
@@ -72,7 +72,7 @@ Noteworthy changes between 1.2.x and 1.4.0 are:
 
  * New configure option --enable-random-daemon to support a system
    wide random daemon.  The daemon code is experimental and not yet
-   very well working.  It will eventually allow to keep a global
+   very well working.  It will eventually allow keeping a global
    random pool for the sake of short living processes.
 
  * Minor changes to some function declarations.  Buffer arguments are
@@ -93,7 +93,7 @@ Noteworthy changes between 1.2.x and 1.4.0 are:
    GCRY_CIPHER_CAMELLIA128    NEW.
    GCRY_CIPHER_CAMELLIA192    NEW.
    GCRY_CIPHER_CAMELLIA256    NEW.
-   GCRYCTL_FAKED_RANDOM_P     NEW. 
+   GCRYCTL_FAKED_RANDOM_P     NEW.
    GCRYCTL_PRINT_CONFIG       NEW.
    GCRYCTL_SET_RNDEGD_SOCKET  NEW.
    gcry_mpi_scan           CHANGED: Argument BUFFER is now void*.
@@ -109,7 +109,7 @@ Noteworthy changes between 1.2.x and 1.4.0 are:
    gcry_randomize          CHANGED: Argument BUFFER is now void*.
    gcry_cipher_register    CHANGED: Argument ALGORITHM_ID is now int*.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  
+
 
 Source code is hosted at the GnuPG FTP server and its mirrors as
 listed at http://www.gnupg.org/download/mirrors.html .  On the primary
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index eeab1a78..25ca0c28 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -1109,7 +1109,7 @@ for many error codes what they mean usually.  Some error values have
 specific meanings if returned by a certain functions.  Such cases are
 described in the documentation of those functions.
 
-Libgcrypt uses the @code{libgpg-error} library.  This allows to share
+Libgcrypt uses the @code{libgpg-error} library.  This allows sharing
 the error codes with other components of the GnuPG system, and to pass
 error values transparently from the crypto engine, or some helper
 application of the crypto engine, to the user.  This way no
@@ -1401,8 +1401,8 @@ This value means a verification failed because the public key is not
 available.
 
 @item GPG_ERR_NOT_OPERATIONAL
-This value means that the library is not yet in state which allows to
-use this function.  This error code is in particular returned if
+This value means that the library is not yet in state which allows
+using this function.  This error code is in particular returned if
 Libgcrypt is operated in FIPS mode and the internal state of the
 library does not yet or not anymore allow the use of a service.
 
@@ -2427,7 +2427,7 @@ indicate parameters, whereas lowercase words are literals.
 
 Note that all MPI (multi-precision-integers) values are expected to be in
 @code{GCRYMPI_FMT_USG} format.  An easy way to create S-expressions is
-by using @code{gcry_sexp_build} which allows to pass a string with
+by using @code{gcry_sexp_build} which allows passing a string with
 printf-like escapes to insert MPI values.
 
 @menu
@@ -2863,7 +2863,7 @@ Obviously a public key must be provided for encryption.  It is
 expected as an appropriate S-expression (see above) in @var{pkey}.
 The data to be encrypted can either be in the simple old format, which
 is a very simple S-expression consisting only of one MPI, or it may be
-a more complex S-expression which also allows to specify flags for
+a more complex S-expression which also allows specifying flags for
 operation, like e.g., padding rules.
 
 @noindent
@@ -2984,7 +2984,7 @@ This function creates a digital signature for @var{data} using the
 private key @var{skey} and place it into the variable at the address of
 @var{r_sig}.  @var{data} may either be the simple old style S-expression
 with just one MPI or a modern and more versatile S-expression which
-allows to let Libgcrypt handle padding:
+allows letting Libgcrypt handle padding:
 
 @example
  (data
@@ -3370,7 +3370,7 @@ above example.
 
 @item curve @var{name}
 For ECC a named curve may be used instead of giving the number of
-requested bits.  This allows to request a specific curve to override a
+requested bits.  This allows requesting a specific curve to override a
 default selection Libgcrypt would have taken if @code{nbits} has been
 given.  The available names are listed with the description of the ECC
 public key parameters.
@@ -5551,7 +5551,7 @@ result in @var{x}.
 
 @noindent
 Libgcrypt provides an API to access low level functions used by its
-elliptic curve implementation.  These functions allow to implement
+elliptic curve implementation.  These functions allow implementing
 elliptic curve methods for which no explicit support is available.
 
 @deftypefun gcry_mpi_point_t gcry_mpi_point_new (@w{unsigned int @var{nbits}})
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index c6f534e9..102e884d 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1121,7 +1121,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
 # Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
+# Allow overriding them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
 if test "${lt_cv_aix_libpath+set}" = set; then
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c
index 07cef257..9625693c 100644
--- a/mpi/mpiutil.c
+++ b/mpi/mpiutil.c
@@ -55,8 +55,8 @@ _gcry_mpi_get_hw_config (void)
 }
 
 
-/* Initialize the MPI subsystem.  This is called early and allows to
-   do some initialization without taking care of threading issues.  */
+/* Initialize the MPI subsystem.  This is called early and allows
+   doing some initialization without taking care of threading issues.  */
 gcry_err_code_t
 _gcry_mpi_init (void)
 {
diff --git a/random/random-csprng.c b/random/random-csprng.c
index 7304f180..44183ffd 100644
--- a/random/random-csprng.c
+++ b/random/random-csprng.c
@@ -980,7 +980,7 @@ read_pool (byte *buffer, size_t length, int level)
 
   gcry_assert (pool_is_locked);
 
-  /* Our code does not allow to extract more than POOLSIZE.  Better
+  /* Our code does not allow extracting more than POOLSIZE.  Better
      check it here. */
   if (length > POOLSIZE)
     {
diff --git a/random/random-drbg.c b/random/random-drbg.c
index cad364ab..323c0dd9 100644
--- a/random/random-drbg.c
+++ b/random/random-drbg.c
@@ -573,7 +573,7 @@ drbg_add_buf (unsigned char *dst, size_t dstlen,
 
 /* Helper variables for read_cb().
  *
- *   The _gcry_rnd*_gather_random interface does not allow to provide a
+ *   The _gcry_rnd*_gather_random interface does not allow providing a
  *   data pointer.  Thus we need to use a global variable for
  *   communication.  However, the then required locking is anyway a good
  *   idea because it does not make sense to have several readers of (say
diff --git a/random/random-system.c b/random/random-system.c
index a1d17ad0..efe5df97 100644
--- a/random/random-system.c
+++ b/random/random-system.c
@@ -103,7 +103,7 @@ unlock_rng (void)
 
 /* Helper variables for read_cb().
 
-   The _gcry_rnd*_gather_random interface does not allow to provide a
+   The _gcry_rnd*_gather_random interface does not allow providing a
    data pointer.  Thus we need to use a global variable for
    communication.  However, the then required locking is anyway a good
    idea because it does not make sense to have several readers of (say
diff --git a/random/random.c b/random/random.c
index c0435d7b..5649055e 100644
--- a/random/random.c
+++ b/random/random.c
@@ -176,8 +176,8 @@ _gcry_set_preferred_rng_type (int type)
     }
   else if (any_init)
     {
-      /* After any initialization has been done we only allow to
-         upgrade to the standard RNG (handled above).  All other
+      /* After any initialization has been done we only allow
+         upgrading to the standard RNG (handled above).  All other
          requests are ignored.  The idea is that the application needs
          to declare a preference for a weaker RNG as soon as possible
          and before any library sets a preference.  We assume that a
diff --git a/src/context.c b/src/context.c
index de0a183d..c4083d12 100644
--- a/src/context.c
+++ b/src/context.c
@@ -83,8 +83,8 @@ _gcry_ctx_alloc (int type, size_t length, void (*deinit)(void*),
 
 
 /* Return a pointer to the private part of the context CTX.  TYPE is
-   the requested context type.  Using an explicit type allows to cross
-   check the type and eventually allows to store several private
+   the requested context type.  Using an explicit type allows cross
+   checking the type and eventually allows storing several private
    contexts in one context object.  The function does not return an
    error but aborts if the provided CTX is not valid.
    Special usage: using TYPE with 0, which returns CTX->NEXT.
@@ -105,8 +105,8 @@ _gcry_ctx_get_pointer (gcry_ctx_t ctx, int type)
 }
 
 /* Return a pointer to the private part of the context CTX.  TYPE is
-   the requested context type.  Using an explicit type allows to cross
-   check the type and eventually allows to store several private
+   the requested context type.  Using an explicit type allows cross
+   checking the type and eventually allows storing several private
    contexts in one context object.  In contrast to
    _gcry_ctx_get_pointer, this function returns NULL if no context for
    the given type was found.  If CTX is NULL the function does not
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 8c80c6fb..4adcd286 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -379,7 +379,7 @@ gcry_error_t gcry_sexp_new (gcry_sexp_t *retsexp,
                             const void *buffer, size_t length,
                             int autodetect);
 
- /* Same as gcry_sexp_new but allows to pass a FREEFNC which has the
+ /* Same as gcry_sexp_new but allows passing a FREEFNC which has the
     effect to transfer ownership of BUFFER to the created object.  */
 gcry_error_t gcry_sexp_create (gcry_sexp_t *retsexp,
                                void *buffer, size_t length,
diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
index 353df81b..2eefb521 100644
--- a/src/libgcrypt.m4
+++ b/src/libgcrypt.m4
@@ -105,7 +105,7 @@ dnl MINIMUM-VERSION is a string with the version number optionally prefixed
 dnl with the API version to also check the API compatibility. Example:
 dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed
 dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1.  Using
-dnl this features allows to prevent build against newer versions of libgcrypt
+dnl this features allows preventing build against newer versions of libgcrypt
 dnl with a changed API.
 dnl
 dnl If a prefix option is not used, the config script is first
-- 
2.48.1

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel

Reply via email to