From 57205c1dfafdf86eebef8a3a358cf3bd6a297d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Fri, 13 Oct 2023 09:18:12 +0200 Subject: [PATCH] doc: Fix typos in documentation and source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- Anonymous contribution Signed-off-by: Ingo Klöcker --- build-aux/texinfo.tex | 2 +- doc/texinfo.tex | 2 +- src/assuan-support.c | 2 +- src/dirinfo.c | 2 +- src/sign.c | 2 +- src/trustlist.c | 2 +- src/util.h | 4 ++-- src/version.c | 4 ++-- src/w32-glib-io.c | 2 +- src/w32-io.c | 10 +++++----- src/w32-util.c | 6 +++--- tests/json/t-json.c | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index be5a3e00..e3e3c488 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -482,7 +482,7 @@ % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % -% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% Actually, I use \csname\string\foo\endcsname, i.e. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% diff --git a/doc/texinfo.tex b/doc/texinfo.tex index a5c849c8..a505e733 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -498,7 +498,7 @@ % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % -% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% Actually, I use \csname\string\foo\endcsname, i.e. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% diff --git a/src/assuan-support.c b/src/assuan-support.c index 0bc003b9..c6052194 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -371,7 +371,7 @@ my_connect (assuan_context_t ctx, int sock, struct sockaddr *addr, /* Note for Windows: Ignore the incompatible pointer type warning for my_read and my_write. Mingw has been changed to use int for ssize_t on 32 bit systems while we use long. For 64 bit we use - int64_t while mingw uses __int64_t. It doe not matter at all + int64_t while mingw uses __int64_t. It does not matter at all because under Windows long and int are both 32 bit even on 64 bit. */ struct assuan_system_hooks _gpgme_assuan_system_hooks = diff --git a/src/dirinfo.c b/src/dirinfo.c index de2a9180..a0753191 100644 --- a/src/dirinfo.c +++ b/src/dirinfo.c @@ -488,7 +488,7 @@ _gpgme_get_default_uisrv_socket (void) return get_gpgconf_item (WANT_UISRV_SOCKET); } -/* Return true if we are in GnuPG-1 mode - ie. no gpgconf and agent +/* Return true if we are in GnuPG-1 mode - i.e. no gpgconf and agent being optional. */ int _gpgme_in_gpg_one_mode (void) diff --git a/src/sign.c b/src/sign.c index 7198d934..51f581ca 100644 --- a/src/sign.c +++ b/src/sign.c @@ -125,7 +125,7 @@ gpgme_op_sign_result (gpgme_ctx_t ctx) if (gpgme_signers_count (ctx) && signatures + inv_signers != gpgme_signers_count (ctx)) { - /* In this case at least one signatures was not created perhaps + /* In this case at least one signature was not created perhaps due to a bad passphrase etc. Thus the entire message is broken and should not be used. We add the already created signatures to the invalid signers list and thus this case can diff --git a/src/trustlist.c b/src/trustlist.c index a0e82385..e31c2456 100644 --- a/src/trustlist.c +++ b/src/trustlist.c @@ -65,7 +65,7 @@ trustlist_status_handler (void *priv, gpgme_status_code_t code, char *args) With TYPE = U for a user ID K for a key The RECNO is either the one of the dir record or the one of the uid - record. OT is the the usual trust letter and only available on K + record. OT is the usual trust letter and only available on K lines. VAL is the calculated validity MC is the marginal trust counter and only available on U lines CC is the same for the complete count NAME ist the username and only printed on U diff --git a/src/util.h b/src/util.h index d3b982e7..20a9ff7f 100644 --- a/src/util.h +++ b/src/util.h @@ -99,7 +99,7 @@ int _gpgme_ttyname_r (int fd, char *buf, size_t buflen); /*-- conversion.c --*/ -/* Make sure to to erase the memory (PTR,LEN). */ +/* Make sure to erase the memory (PTR,LEN). */ void _gpgme_wipememory (void *ptr, size_t len); /* Concatenate the string S1 with all the following strings up to a @@ -135,7 +135,7 @@ gpgme_error_t _gpgme_encode_percent_string (const char *src, char **destp, size_t len); /* Split a string into space delimited fields and remove leading and - * trailing spaces from each field. A pointer to the each field is + * trailing spaces from each field. A pointer to each field is * stored in ARRAY. Stop splitting at ARRAYSIZE fields. The function * modifies STRING. The number of parsed fields is returned. */ int _gpgme_split_fields (char *string, char **array, int arraysize); diff --git a/src/version.c b/src/version.c index 693a1e83..b0e2a105 100644 --- a/src/version.c +++ b/src/version.c @@ -186,7 +186,7 @@ _gpgme_compare_versions (const char *my_version, } -/* Check that the the version of the library is at minimum the +/* Check that the version of the library is at minimum the requested one and return the version string; return NULL if the condition is not met. If a NULL is passed to this function, no check is done and the version string is simply returned. @@ -203,7 +203,7 @@ gpgme_check_version (const char *req_version) /* Catch-22: We need to get at least the debug subsystem ready before using the trace facility. If we won't the trace would - automagically initialize the debug system with out the locks + automagically initialize the debug system without the locks being initialized and missing the assuan log level setting. */ TRACE (DEBUG_INIT, "gpgme_check_version", NULL, "req_version=%s, VERSION=%s", diff --git a/src/w32-glib-io.c b/src/w32-glib-io.c index 09ffffa2..943b207a 100644 --- a/src/w32-glib-io.c +++ b/src/w32-glib-io.c @@ -903,7 +903,7 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock) TRACE_END (dbg_help, "]"); } - /* COUNT is used to stop the lop as soon as possible. */ + /* COUNT is used to stop the loop as soon as possible. */ for (n = count, i = 0; i < npollfds && n; i++) { j = pollfds_map[i]; diff --git a/src/w32-io.c b/src/w32-io.c index 80978f9a..a403a73a 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -143,7 +143,7 @@ static struct /* The context of an associated writer object or NULL. */ struct writer_context_s *writer; - /* A notification handler. Noet that we current support only one + /* A notification handler. Note that we currently support only one * callback per fd. */ struct { _gpgme_close_notify_handler_t handler; @@ -410,7 +410,7 @@ reader (void *arg) else { /* Check whether the shutdown triggered the error - - no need to to print a warning in this case. */ + no need to print a warning in this case. */ if ( ctx->error_code == WSAECONNABORTED || ctx->error_code == WSAECONNRESET) { @@ -749,8 +749,8 @@ _gpgme_io_read (int fd, void *buffer, size_t count) /* The writer does use a simple buffering strategy so that we are - informed about write errors as soon as possible (i. e. with the the - next call to the write function. */ + informed about write errors as soon as possible (i.e. with the + next call to the write function). */ static DWORD CALLBACK writer (void *arg) { @@ -1275,7 +1275,7 @@ _gpgme_io_close (int fd) /* Set a close notification callback which is called right after FD - * has been closed but before its slot (ie. the FD number) is being + * has been closed but before its slot (i.e. the FD number) is being * released. The HANDLER may thus use the provided value of the FD * but it may not pass it to any I/O functions. Note: Only the last * handler set for an FD is used. */ diff --git a/src/w32-util.c b/src/w32-util.c index 2e6428c0..c661fb4b 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -97,13 +97,13 @@ DEFINE_STATIC_LOCK (get_path_lock); /* The module handle of this DLL. If we are linked statically, - dllmain does not exists and thus the value of my_hmodule will be + dllmain does not exist and thus the value of my_hmodule will be NULL. The effect is that a GetModuleFileName always returns the file name of the DLL or executable which contains the gpgme code. */ static HMODULE my_hmodule; /* These variables store the malloced name of alternative default - binaries. The are set only once by gpgme_set_global_flag. */ + binaries. They are set only once by gpgme_set_global_flag. */ static char *default_gpg_name; static char *default_gpgconf_name; /* If this variable is not NULL the value is assumed to be the @@ -179,7 +179,7 @@ wchar_to_utf8 (const wchar_t *string) } -/* Return a malloced wide char string from an UTF-8 encoded input +/* Return a malloced wide char string from a UTF-8 encoded input string STRING. Caller must free this value. On failure returns NULL; caller may use GetLastError to get the actual error number. Calling this function with STRING set to NULL is not defined. */ diff --git a/tests/json/t-json.c b/tests/json/t-json.c index 160132b2..0d127a49 100644 --- a/tests/json/t-json.c +++ b/tests/json/t-json.c @@ -488,7 +488,7 @@ main (int argc, char *argv[]) if (!check_gpg_version ("2.1.18")) { - /* Lets not break too much or have to test all combinations */ + /* Let us not break too much or have to test all combinations */ printf ("Testsuite skipped. Minimum GnuPG version (2.1.18) " "not found.\n"); exit(0);