aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-01-30 21:14:17 +0100
committerMattias Andrée <m@maandree.se>2025-01-30 21:14:17 +0100
commit445794569c9b1a0e7a90ab9123e371c84e668bf2 (patch)
tree289b8839634abac5066fa68824be59c94e9ff0f7
parentFirst commit (diff)
downloadlibenv-445794569c9b1a0e7a90ab9123e371c84e668bf2.tar.gz
libenv-445794569c9b1a0e7a90ab9123e371c84e668bf2.tar.bz2
libenv-445794569c9b1a0e7a90ab9123e371c84e668bf2.tar.xz
Fix some mistakes
Signed-off-by: Mattias Andrée <m@maandree.se>
-rw-r--r--README8
-rw-r--r--enum_libenv_class.332
-rw-r--r--libenv.710
-rw-r--r--libenv.h74
-rw-r--r--libenv_filter_name_list.318
-rw-r--r--libenv_filter_variable_list.318
-rw-r--r--libenv_get_chosen_list.310
-rw-r--r--libenv_get_complete_list.32
-rw-r--r--libenv_select_name_list.318
-rw-r--r--libenv_select_variable_list.316
-rw-r--r--libenv_vprocess_list__.c2
11 files changed, 102 insertions, 106 deletions
diff --git a/README b/README
index 109984f..01776f7 100644
--- a/README
+++ b/README
@@ -12,11 +12,11 @@ DESCRIPTION
Some utilities need to remove environment variables that are
not appropriate for the new context that the utility entires.
- Likewise some utilities may meed to remove all except some
+ Likewise, some utilities may need to remove all except some
special environment variables. libenv provides a database of
- environment variable variables that could be interesting and
- provides functionality to describe the new context the is is
- entered and filter out environment variables accordingly.
+ environment variables that could be of interest and provides
+ functionality to describe the new context the is entered and
+ filter out environment variables accordingly.
SEE ALSO
libenv_filter_variable_list(3),
diff --git a/enum_libenv_class.3 b/enum_libenv_class.3
index 25edd60..e5fa1a0 100644
--- a/enum_libenv_class.3
+++ b/enum_libenv_class.3
@@ -35,7 +35,7 @@ the desktop environment.
.TP
.B LIBENV_TERMINAL_CAPS
Environment variables that describe
-the terminals capabilities.
+the terminal's capabilities.
.TP
.B LIBENV_LOCAL_TERMINAL
Environment variables that describe
@@ -54,7 +54,7 @@ the timezone.
Environment variables that describe
the current session.
-This for example includes variables
+This includes, for example, variables
added by
.BR sshd (8)
to describe the remote connection.
@@ -68,8 +68,8 @@ user.
Environment variables that configure
the user's theme.
-This is excludes variables listed for
-.I LIBENV_THEME_PLUGIN
+This excludes variables listed for
+.IR LIBENV_THEME_PLUGIN ,
except in the
hypothetical scenario where it names
a plugin and additional configurations.
@@ -80,7 +80,7 @@ the plugins the user's theme requires.
.TP
.B LIBENV_INTERNET
Environment variables that configures
-the user's internet configurations,
+the user's Internet connection,
including mainly proxies.
.TP
.B LIBENV_AUDIO
@@ -109,7 +109,7 @@ configured system wide (but could be
overwritten for the user).
Environment variables with this classification
-has at least also
+also have at least
.IR LIBENV_PATH .
.TP
.B LIBENV_USER_PATHS
@@ -117,7 +117,7 @@ Environment variables that list directories
configured for the user.
Environment variables with this classification
-has at least also
+also have at least
.IR LIBENV_PATH .
.TP
.B LIBENV_PWD
@@ -125,7 +125,7 @@ Environment variables that contain
current and past working directories.
Environment variables with this classification
-has at least also
+also have at least
.IR LIBENV_PATH .
.TP
.B LIBENV_EXEC
@@ -149,9 +149,8 @@ classification has at least one other
classification.
.TP
.B LIBENV_REMOTE_SAFE
-Environment variables that should be can
-safely be kepted when entering a remote
-session.
+Environment variables that can safely be kept
+when entering a remote session.
Any environment variable with this
classification has at least one other
@@ -159,16 +158,15 @@ classification.
.TP
.B LIBENV_LOGIN_UNSAFE
Environment variables that should be removed
-when entering a logging into a new user.
+when logging in as a new user.
Any environment variable with this
classification has at least one other
classification.
.TP
.B LIBENV_LOGIN_SAFE
-Environment variables that should be can
-safely be kepted when entering a logging
-into a new user.
+Environment variables that can safely be
+kept when logging in as a new user.
Any environment variable with this
classification has at least one other
@@ -183,8 +181,8 @@ classification has at least one other
classification.
.TP
.B LIBENV_SU_SAFE
-Environment variables that should be can
-safely be kepted when escalating privileges.
+Environment variables that can safely be
+kept when escalating privileges.
Any environment variable with this
classification has at least one other
diff --git a/libenv.7 b/libenv.7
index 638a47f..3d0e723 100644
--- a/libenv.7
+++ b/libenv.7
@@ -18,13 +18,13 @@ utilities perform sanitation of environment variables.
.PP
Some utilities need to remove environment variables that are
not appropriate for the new context that the utility entires.
-Likewise some utilities may meed to remove all except some
+Likewise, some utilities may need to remove all except some
special environment variables.
.B libenv
-provides a database of
-environment variable variables that could be interesting and
-provides functionality to describe the new context the is is
-entered and filter out environment variables accordingly.
+provides a database of environment variables that could be
+of interest and provides functionality to describe the new
+context the is entered and filter out environment variables
+accordingly.
.SH SEE ALSO
.BR libenv_filter_variable_list (3),
diff --git a/libenv.h b/libenv.h
index a1ac96d..8e12509 100644
--- a/libenv.h
+++ b/libenv.h
@@ -47,7 +47,7 @@ enum libenv_class {
/**
* Environment variables that describe
- * the terminals capabilities
+ * the terminal's capabilities
*/
LIBENV_TERMINAL_CAPS,
@@ -74,7 +74,7 @@ enum libenv_class {
* Environment variables that describe
* the current session
*
- * This for example includes variables
+ * This includes, for example, variables
* added by SSH to describe the remote
* connection
*
@@ -89,8 +89,8 @@ enum libenv_class {
* Environment variables that configure
* the user's theme
*
- * This is excludes variables listed
- * for LIBENV_THEME_PLUGIN except in the
+ * This excludes variables listed for
+ * LIBENV_THEME_PLUGIN, except in the
* hypothetical scenario where it names
* a plugin and additional configurations
*/
@@ -103,14 +103,14 @@ enum libenv_class {
LIBENV_THEME_PLUGIN,
/**
- * Environment variables that configures
- * the user's internet configurations,
+ * Environment variables that configure
+ * the user's Internet connection,
* including mainly proxies
*/
LIBENV_INTERNET,
/**
- * Environment variables that configures
+ * Environment variables that configure
* the user's audio
*/
LIBENV_AUDIO,
@@ -141,7 +141,7 @@ enum libenv_class {
* overwritten for the user)
*
* Environment variables with this classification
- * has at least also LIBENV_PATH
+ * also have at least LIBENV_PATH
*/
LIBENV_SYSTEM_PATHS,
@@ -150,7 +150,7 @@ enum libenv_class {
* configured for the user
*
* Environment variables with this classification
- * has at least also LIBENV_PATH
+ * also have at least LIBENV_PATH
*/
LIBENV_USER_PATHS,
@@ -159,7 +159,7 @@ enum libenv_class {
* current and past working directories
*
* Environment variables with this classification
- * has at least also LIBENV_PATH
+ * also have at least LIBENV_PATH
*/
LIBENV_PWD,
@@ -190,9 +190,8 @@ enum libenv_class {
LIBENV_REMOTE_UNSAFE,
/**
- * Environment variables that should be can
- * safely be kepted when entering a remote
- * session
+ * Environment variables that can safely be
+ * kept when entering a remote session
*
* Any environment variable with this
* classification has at least one other
@@ -202,7 +201,7 @@ enum libenv_class {
/**
* Environment variables that should be removed
- * when entering a logging into a new user
+ * when logging in as a new user
*
* Any environment variable with this
* classification has at least one other
@@ -211,9 +210,8 @@ enum libenv_class {
LIBENV_LOGIN_UNSAFE,
/**
- * Environment variables that should be can
- * safely be kepted when entering a logging
- * into a new user
+ * Environment variables that can safely be
+ * kept when logging in as a new user
*
* Any environment variable with this
* classification has at least one other
@@ -232,8 +230,8 @@ enum libenv_class {
LIBENV_SU_UNSAFE,
/**
- * Environment variables that should be can
- * safely be kepted when escalating privileges
+ * Environment variables that can safely be
+ * kept when escalating privileges
*
* Any environment variable with this
* classification has at least one other
@@ -274,7 +272,7 @@ struct libenv_variable {
* the list will container their names and classes
*
* This function does not read the current environment,
- * and may return unset environemnt variables
+ * and may return unset environment variables
*
* @param nclasswords_out Output parameter for the number of elements in each returned
* `struct libenv_variable`'s `.classes`, may be `NULL`
@@ -296,7 +294,7 @@ LIBENV_RET_NONNULL__ const struct libenv_variable *libenv_get_complete_list(size
* statically allocated and should not be deallocated or modified,
* `NULL` on failure
*
- * @throws ENOMEM Not enought memory available to allocate the list
+ * @throws ENOMEM Not enough memory available to allocate the list
*/
LIBENV_MALLOC__ const char **libenv_vget_chosen_list(enum libenv_class, va_list);
@@ -312,7 +310,7 @@ LIBENV_MALLOC__ const char **libenv_vget_chosen_list(enum libenv_class, va_list)
* statically allocated and should not be deallocated or modified,
* `NULL` on failure
*
- * @throws ENOMEM Not enought memory available to allocate the list
+ * @throws ENOMEM Not enough memory available to allocate the list
*/
LIBENV_MALLOC__ const char **libenv_get_chosen_list(enum libenv_class, ... /*, LIBENV_END */);
@@ -320,7 +318,7 @@ LIBENV_MALLOC__ const char **libenv_get_chosen_list(enum libenv_class, ... /*, L
* Given a list of environment variable names, remove the variables
* that belong to all of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -333,7 +331,7 @@ size_t libenv_vfilter_name_list(const char **, va_list);
* Given a list of environment variable names, remove the variables
* that belong to all of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -347,7 +345,7 @@ size_t libenv_filter_name_list(const char **, /* enum libenv_class */ ... /*, LI
* Given a list of environment variables, with values, remove the variables
* that belong to all of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -360,7 +358,7 @@ size_t libenv_vfilter_variable_list(const char **, va_list);
* Given a list of environment variables, with values, remove the variables
* that belong to all of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -374,7 +372,7 @@ size_t libenv_filter_variable_list(const char **, /* enum libenv_class */ ... /*
* Given a list of environment variable names, remove any variable that
* does not belong to any of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -387,7 +385,7 @@ size_t libenv_vselect_name_list(const char **, va_list);
* Given a list of environment variable names, remove any variable that
* does not belong to any of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -401,7 +399,7 @@ size_t libenv_select_name_list(const char **, /* enum libenv_class */ ... /*, LI
* Given a list of environment variables, with values, remove any variable
* that does not belong to any of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -414,7 +412,7 @@ size_t libenv_vselect_variable_list(const char **, va_list);
* Given a list of environment variables, with values, remove any variable
* that does not belong to any of the specified environment variable classes
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -431,7 +429,7 @@ size_t libenv_select_variable_list(const char **, /* enum libenv_class */ ... /*
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -447,7 +445,7 @@ size_t libenv_vfilter_name_list_with_dealloc(char **, va_list);
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -464,7 +462,7 @@ size_t libenv_filter_name_list_with_dealloc(char **, /* enum libenv_class */ ...
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -480,7 +478,7 @@ size_t libenv_vfilter_variable_list_with_dealloc(char **, va_list);
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -497,7 +495,7 @@ size_t libenv_filter_variable_list_with_dealloc(char **, /* enum libenv_class */
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -513,7 +511,7 @@ size_t libenv_vselect_name_list_with_dealloc(char **, va_list);
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variable names; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variable names; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
@@ -530,7 +528,7 @@ size_t libenv_select_name_list_with_dealloc(char **, /* enum libenv_class */ ...
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param classes The list of environment variable classes, must end with `LIBENV_END`
@@ -546,7 +544,7 @@ size_t libenv_vselect_variable_list_with_dealloc(char **, va_list);
* Any element removed from `variables` will be deallocated using
* the free(3) function
*
- * @param variables `NULL`-terminated list environemnt variables; may be `NULL`,
+ * @param variables `NULL`-terminated list environment variables; may be `NULL`,
* which causes the function to return 0; unless `NULL` the list
* will be updated
* @param ... The list of environment variable classes, must end with `LIBENV_END`,
diff --git a/libenv_filter_name_list.3 b/libenv_filter_name_list.3
index 8f9d44d..ee5bb3e 100644
--- a/libenv_filter_name_list.3
+++ b/libenv_filter_name_list.3
@@ -18,15 +18,15 @@ Link with
.SH DESCRIPTION
The
.BR libenv_filter_name_list ()
-function removes element in
+function removes elements in
.I variables
-that matches the name of an environment variable that
-belong to all of the environment variable classes listed
+that match the name of an environment variable that
+belong to all the environment variable classes listed
after the
.I variables
argument. The list must end with
.I LIBENV_END
-to mark indicate to the function that there are no
+to signal to the function that there are no
more arguments to read.
.PP
.I variables
@@ -37,11 +37,11 @@ terminated list, but may be
.PP
The
.BR libenv_filter_name_list_with_dealloc ()
-fucntion is a variant of the
+function is a variant of the
.BR libenv_filter_name_list ()
function that deallocates, using the
.BR free (3)
-function, any remove element.
+function, any removed element.
.PP
The
.BR libenv_vfilter_name_list ()
@@ -51,7 +51,7 @@ functions are variants of the
.BR libenv_filter_name_list ()
and
.BR libenv_filter_name_list_with_dealloc ()
-functions, respectively, that uses
+functions, respectively, that use
.I va_list
instead of being properly variadic.
@@ -64,10 +64,10 @@ and
.BR libenv_vfilter_name_list_with_dealloc ()
functions return the new number of elements in
.IR variables ,
-exclucing the
+excluding the
.I NULL
element at the end of the list.
-0 if
+The functions return 0 if
.I variables
is
.IR NULL .
diff --git a/libenv_filter_variable_list.3 b/libenv_filter_variable_list.3
index 641f162..132cb28 100644
--- a/libenv_filter_variable_list.3
+++ b/libenv_filter_variable_list.3
@@ -18,17 +18,17 @@ Link with
.SH DESCRIPTION
The
.BR libenv_filter_variable_list ()
-function removes element in
+function removes elements in
.I variables
-that matches the name, optionally with an equals sign
+that match the name, optionally with an equals sign
.RB ( = )
followed by anything, of an environment variable that
-belong to all of the environment variable classes listed
+belong to all the environment variable classes listed
after the
.I variables
argument. The list must end with
.I LIBENV_END
-to mark indicate to the function that there are no
+to signal to the function that there are no
more arguments to read.
.PP
.I variables
@@ -39,11 +39,11 @@ terminated list, but may be
.PP
The
.BR libenv_filter_variable_list_with_dealloc ()
-fucntion is a variant of the
+function is a variant of the
.BR libenv_filter_variable_list ()
function that deallocates, using the
.BR free (3)
-function, any remove element.
+function, any removed element.
.PP
The
.BR libenv_vfilter_variable_list ()
@@ -53,7 +53,7 @@ functions are variants of the
.BR libenv_filter_variable_list ()
and
.BR libenv_filter_variable_list_with_dealloc ()
-functions, respectively, that uses
+functions, respectively, that use
.I va_list
instead of being properly variadic.
@@ -66,10 +66,10 @@ and
.BR libenv_vfilter_variable_list_with_dealloc ()
functions return the new number of elements in
.IR variables ,
-exclucing the
+excluding the
.I NULL
element at the end of the list.
-0 if
+The functions return 0 if
.I variables
is
.IR NULL .
diff --git a/libenv_get_chosen_list.3 b/libenv_get_chosen_list.3
index 0b87403..7132a5d 100644
--- a/libenv_get_chosen_list.3
+++ b/libenv_get_chosen_list.3
@@ -19,11 +19,11 @@ The
function returns a
.I NULL
terminated list of the names of all environment variables, that it knows of,
-regardless if they are set in the environemnt, and that belong to at least
+regardless if they are set in the environment, and that belong to at least
one of the environment variable classes listed in the functions argument list.
-The argument list must be termianted with
+The argument list must be terminated with
.I LIBENV_END
-so that the function knonws when there are no more arguments to read.
+so that the function knows when there are no more arguments to read.
.PP
The
.BR libenv_vget_chosen_list ()
@@ -42,14 +42,14 @@ functions return a
.IR NULL -
terminated list of statically allocated
strings, representing environment variable names.
-The returned list, but not it's element, shall
+The returned list, but not its element, shall
be deallocated using the
.BR free (3)
function. On failure
.I NULL
is returned and
.I errno
-is appropriately set to describe the error.
+is set appropriately to describe the error.
.SH ERRORS
The
diff --git a/libenv_get_complete_list.3 b/libenv_get_complete_list.3
index 83038a3..a55ca85 100644
--- a/libenv_get_complete_list.3
+++ b/libenv_get_complete_list.3
@@ -36,7 +36,7 @@ then the
member with the value
.I i*64+b
describes a class the environment variable belongs to. (Make sure that you
-do not compare against values greeater than or equal to
+do not compare against values greater than or equal to
.IR *nclasswords_out*64 .)
The bit corresponding to
.I LIBENV_END
diff --git a/libenv_select_name_list.3 b/libenv_select_name_list.3
index 6addcd1..c0cb1e8 100644
--- a/libenv_select_name_list.3
+++ b/libenv_select_name_list.3
@@ -18,15 +18,15 @@ Link with
.SH DESCRIPTION
The
.BR libenv_select_name_list ()
-function removes element in
+function removes elements in
.I variables
-that matches the name of an environment variable that
-do not belong to ant of the environment variable classes
+that match the name of an environment variable that
+do not belong to any of the environment variable classes
listed after the
.I variables
argument. The list must end with
.I LIBENV_END
-to mark indicate to the function that there are no
+to signal to the function that there are no
more arguments to read.
.PP
.I variables
@@ -37,11 +37,11 @@ terminated list, but may be
.PP
The
.BR libenv_select_name_list_with_dealloc ()
-fucntion is a variant of the
+function is a variant of the
.BR libenv_select_name_list ()
function that deallocates, using the
.BR free (3)
-function, any remove element.
+function, any removed element.
.PP
The
.BR libenv_vselect_name_list ()
@@ -51,7 +51,7 @@ functions are variants of the
.BR libenv_select_name_list ()
and
.BR libenv_select_name_list_with_dealloc ()
-functions, respectively, that uses
+functions, respectively, that use
.I va_list
instead of being properly variadic.
@@ -64,10 +64,10 @@ and
.BR libenv_vselect_name_list_with_dealloc ()
functions return the new number of elements in
.IR variables ,
-exclucing the
+excluding the
.I NULL
element at the end of the list.
-0 if
+The functions return 0 if
.I variables
is
.IR NULL .
diff --git a/libenv_select_variable_list.3 b/libenv_select_variable_list.3
index 2ec8427..b38950f 100644
--- a/libenv_select_variable_list.3
+++ b/libenv_select_variable_list.3
@@ -18,9 +18,9 @@ Link with
.SH DESCRIPTION
The
.BR libenv_select_variable_list ()
-function removes element in
+function removes elements in
.I variables
-that matches the name, optionally with an equals sign
+that match the name, optionally with an equals sign
.RB ( = )
followed by anything, of an environment variable that
do not belong to any of the environment variable classes
@@ -28,7 +28,7 @@ listed after the
.I variables
argument. The list must end with
.I LIBENV_END
-to mark indicate to the function that there are no
+to signal to the function that there are no
more arguments to read.
.PP
.I variables
@@ -39,11 +39,11 @@ terminated list, but may be
.PP
The
.BR libenv_select_variable_list_with_dealloc ()
-fucntion is a variant of the
+function is a variant of the
.BR libenv_select_variable_list ()
function that deallocates, using the
.BR free (3)
-function, any remove element.
+function, any removed element.
.PP
The
.BR libenv_vselect_variable_list ()
@@ -53,7 +53,7 @@ functions are variants of the
.BR libenv_select_variable_list ()
and
.BR libenv_select_variable_list_with_dealloc ()
-functions, respectively, that uses
+functions, respectively, that use
.I va_list
instead of being properly variadic.
@@ -66,10 +66,10 @@ and
.BR libenv_vselect_variable_list_with_dealloc ()
functions return the new number of elements in
.IR variables ,
-exclucing the
+excluding the
.I NULL
element at the end of the list.
-0 if
+The functions return 0 if
.I variables
is
.IR NULL .
diff --git a/libenv_vprocess_list__.c b/libenv_vprocess_list__.c
index 1124a63..b590d4b 100644
--- a/libenv_vprocess_list__.c
+++ b/libenv_vprocess_list__.c
@@ -22,7 +22,7 @@ found:
for (; classes_head; classes_head = va_arg(classes_tail, enum libenv_class)) {
w = (size_t)classes_head / 64U;
b = (size_t)classes_head % 64U;
- if (w >= nclasswords && ((known->classes[w] >> b) & 1)) {
+ if (w < nclasswords && ((known->classes[w] >> b) & 1)) {
if (!all)
return 1;
} else {