[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: branch master updated: * info/info.c (get_initial_file), * info/info
From: |
Eli Zaretskii |
Subject: |
Re: branch master updated: * info/info.c (get_initial_file), * info/infodoc.c (info_get_info_help_node), * info/nodes.c (info_get_node_with_defaults): Use strcmp or strcasecmp instead of mbscasecmp in several cases where we do not care about case-insensitive matching with non-ASCII characters. |
Date: |
Thu, 19 Oct 2023 15:26:51 +0300 |
> Date: Thu, 19 Oct 2023 08:20:49 -0400
> From: "Gavin D. Smith" <gavinsmith0123@gmail.com>
>
> +2023-10-19 Gavin Smith <gavinsmith0123@gmail.com>
> +
> + * info/info.c (get_initial_file),
> + * info/infodoc.c (info_get_info_help_node),
> + * info/nodes.c (info_get_node_with_defaults):
> + Use strcmp or strcasecmp instead of mbscasecmp in several
> + cases where we do not care about case-insensitive matching with
> + non-ASCII characters.
> +
> 2023-10-19 Gavin Smith <gavinsmith0123@gmail.com>
>
> * tp/maintain/change_perl_modules_version.sh:
> diff --git a/info/info.c b/info/info.c
> index 8ca4a17e58..d7a6afaa2c 100644
> --- a/info/info.c
> +++ b/info/info.c
> @@ -250,7 +250,7 @@ get_initial_file (int *argc, char ***argv, char **error)
> {
> /* If they say info info (or info -O info, etc.), show them
> info-stnd.texi. (Get info.texi with info -f info.) */
> - if ((*argv)[0] && mbscasecmp ((*argv)[0], "info") == 0)
> + if ((*argv)[0] && strcmp ((*argv)[0], "info") == 0)
> (*argv)[0] = "info-stnd";
This could produce regressions on case-insensitive filesystems, where
we could have INFO.EXE, for example. Do we really no longer care
about those?
> --- a/info/infodoc.c
> +++ b/info/infodoc.c
> @@ -357,8 +357,7 @@ DECLARE_INFO_COMMAND (info_get_info_help_node, _("Visit
> Info node '(info)Help'")
> for (win = windows; win; win = win->next)
> {
> if (win->node && win->node->fullpath
> - && !mbscasecmp ("info",
> - filename_non_directory (win->node->fullpath))
> + && !strcmp (filename_non_directory (win->node->fullpath), "info")
> && (!strcmp (win->node->nodename, "Help")
> || !strcmp (win->node->nodename, "Help-Small-Screen")))
Likewise here.
> /* If the node not found was "Top", try again with different case. */
> - if (!node && (nodename && mbscasecmp (nodename, "Top") == 0))
> + if (!node && (nodename && strcasecmp (nodename, "Top") == 0))
Are there no Info manuals that have "Top" with a different
letter-case?
- Re: branch master updated: * info/info.c (get_initial_file), * info/infodoc.c (info_get_info_help_node), * info/nodes.c (info_get_node_with_defaults): Use strcmp or strcasecmp instead of mbscasecmp in several cases where we do not care about case-insensitive matching with non-ASCII characters.,
Eli Zaretskii <=