1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

32 Commits

Author SHA1 Message Date
Alejandro Colomar
68a407f668 Use strnul in a few places.
* lib/argz.c (argz_next): Use strnul.
* lib/cpu-supports.c (hwcap_allowed): Likewise.
* lib/file-has-acl.c (aclinfo_has_xattr): Likewise.
* lib/inet_ntop.c (inet_ntop6): Likewise.
* lib/link.c (link): Likewise.
* lib/localename-unsafe.c (enum_locales_fn): Likewise.
* lib/mbspcasecmp.c (mbspcasecmp): Likewise.
* lib/opendir.c (opendir): Likewise.
* lib/parse-duration.c (parse_year_month_day, parse_hour_minute_second,
trim): Likewise.
* lib/setlocale.c (setlocale_unixlike): Likewise.
* lib/strftime.c (__strftime_internal): Likewise.
* lib/striconv.c (str_cd_iconv): Likewise.
* lib/strncat.c (strncat): Likewise.
* lib/term-style-control.c (log_signal_handler_called,
tcsetattr_failed): Likewise.
* lib/time_rz.c (save_abbr): Likewise.
* lib/vc-mtime.c (git_mtime, max_vc_mtime): Likewise.
* tests/test-savedir.c (test_savedir_sort_none, test_savedir_sort_name):
Likewise.
* modules/argz (Depends-on): Add strnul.
* modules/cpu-supports (Depends-on): Likewise.
* modules/file-has-acl (Depends-on): Likewise.
* modules/inet_ntop (Depends-on): Likewise.
* modules/link (Depends-on): Likewise.
* modules/localename-unsafe (Depends-on): Likewise.
* modules/localename-unsafe-limited (Depends-on): Likewise.
* modules/mbspcasecmp (Depends-on): Likewise.
* modules/opendir (Depends-on): Likewise.
* modules/parse-duration (Depends-on): Likewise.
* modules/setlocale (Depends-on): Likewise.
* modules/nstrftime (Depends-on): Likewise.
* modules/nstrftime-limited (Depends-on): Likewise.
* modules/c-nstrftime (Depends-on): Likewise.
* modules/fprintftime (Depends-on): Likewise.
* modules/striconv (Depends-on): Likewise.
* modules/strncat (Depends-on): Likewise.
* modules/term-style-control (Depends-on): Likewise.
* modules/time_rz (Depends-on): Likewise.
* modules/vc-mtime (Depends-on): Likewise.
* modules/savedir-tests (Depends-on): Likewise.

Copyright-paperwork-exempt: Yes
2026-02-24 02:59:14 +01:00
Collin Funk
a8482ceecf maint: run 'make update-copyright' 2026-01-01 10:37:05 -08:00
Bruno Haible
0b6d2755f3 mbsstr, mbscasestr, mbspcasecmp: Use const-improved function macros.
* lib/string.in.h (mbsstr, mbspcasecmp, mbscasestr): Define as macros
that cast the result to 'const char *' when the first argument is a
'const char *'.
* lib/mbsstr.c: Define _GL_NO_CONST_GENERICS.
* lib/mbscasestr.c: Likewise.
* lib/mbspcasecmp.c: Likewise.
2025-02-09 08:18:18 +01:00
Pádraig Brady
7b08932179 maint: run 'make update-copyright' 2025-01-01 09:25:10 +00:00
Simon Josefsson
5b92dd0a45 maint: run 'make update-copyright' 2024-01-01 10:31:48 +01:00
Paul Eggert
5e4405c7fa Remaining support for GNULIB_MCEL_PREFER
Support mcel API in remaining modules where this might matter,
for apps that prefer it.
* lib/mbmemcasecmp.c, lib/mbscspn.c, lib/mbsncasecmp.c, lib/mbsnlen.c:
* lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbssep.c, lib/mbsspn.c:
* lib/regex-quote.c:
Include mcel.h instead of mbiterf.h or mbuiterf.h,
if GNULIB_MCEL_PREFER.
* lib/mbmemcasecmp.c (mbmemcasecmp), lib/mbscspn.c (mbscspn):
* lib/mbsncasecmp.c (mbsncasecmp), lib/mbsnlen.c (mbsnlen):
* lib/mbspbrk.c (mbspbrk), lib/mbspcasecmp.c (mbspcasecmp):
* lib/mbssep.c (mbssep), lib/mbsspn.c (mbsspn):
* lib/regex-quote.c (regex_quote_length, regex_quote_copy):
Use mcel API, if GNULIB_MCEL_PREFER.
* lib/mbscspn.c, lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbsspn.c:
Include stdlib.h, for MB_CUR_MAX.
* modules/mbmemcasecmp, modules/mbsncasecmp, modules/mbspcasecmp:
Depend on c32tolower.
* modules/regex-quote: Depend on mempcpy.
2023-09-26 15:50:31 -07:00
Paul Eggert
b9be00f49a Tune single-byte code involving tolower
* lib/mbmemcasecmp.c (mbmemcasecmp):
* lib/mbscasecmp.c (mbscasecmp):
* lib/mbscasestr.c (mbscasestr):
* lib/mbsncasecmp.c (mbsncasecmp):
* lib/mbspcasecmp.c (mbspcasecmp):
Avoid some unnecessary calls to tolower.  For example, if the two
single-byte characters are equal before downcasing there is no
need to call tolower on either character.
2023-08-26 23:34:01 -07:00
Paul Eggert
9452e886bf Don’t worry about Version 7 tolower
Some code ported back to pre-C89 libraries where tolower (C) had
undefined behavior if C is not an upper case character.
Nowadays that function is _tolower which is itself obsolete,
and much Gnulib code already assumes this part of C89 anyway.
Assume C89 or better tolower, which simplifies the code
and should improve performance slightly.
* lib/mbmemcasecmp.c, lib/mbmemcasecoll.c, lib/mbscasecmp.c:
* lib/mbscasestr.c, lib/mbsncasecmp.c, lib/mbspcasecmp.c:
* lib/strcasecmp.c, lib/strcasestr.c, lib/strncasecmp.c:
(TOLOWER): Remove.  All uses replaced by tolower.
2023-07-19 13:53:01 -07:00
Bruno Haible
056967bada mbspcasecmp: Optimize.
* lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h.
(mbspcasecmp): Use mbuif_* macros instead of mbui_* macros.
* modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
2023-07-18 13:40:11 +02:00
Simon Josefsson
32a72f4537 maint: run 'make update-copyright' 2023-01-01 01:14:21 +01:00
Bernhard Voelker
87e6634b28 license: fix GPLv3 texts to use a comma instead of semicolon.
See: https://www.gnu.org/licenses/gpl-3.0.html#howto
Run:
  $ git grep -l 'Foundation; either version 3' \
      | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'

* All files using GPLv3: Adjust via the above command.
2022-01-05 11:56:23 +01:00
Paul Eggert
eec12c00cf maint: run 'make update-copyright' 2022-01-01 09:44:11 -08:00
Bruno Haible
0f9fb7c259 Put LGPLv3+ notices in source files where appropriate.
* lib/**.{h,c}: Use LGPLv3+ notice whenever the module description says
so.
2021-06-04 20:55:53 +02:00
Paul Eggert
4b94832196 maint: run 'make update-copyright' 2020-12-31 23:30:01 -08:00
Paul Eggert
2cdc1bafb2 maint: Run 'make update-copyright' 2019-12-31 16:02:16 -08:00
Paul Eggert
e6633650a2 maint: Run 'make update-copyright' 2019-01-01 00:30:05 +01:00
Paul Eggert
281b825eba maint: Run 'make update-copyright' 2018-01-01 00:58:38 +00:00
Paul Eggert
ca35d46812 all: prefer https: URLs 2017-09-13 00:48:57 -07:00
Paul Eggert
a3fd683de3 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2017-01-01 02:59:23 +00:00
Paul Eggert
71090a2a31 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2016-01-01 00:57:21 -08:00
Paul Eggert
b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
Eric Blake
1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Eric Blake
9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Jim Meyering
1602f0afed maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:04:58 +01:00
Jim Meyering
d60f3b0c6b maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
2011-01-01 22:12:59 +01:00
Bruno Haible
fa8d786628 mbspcasecmp: Fix function specification. 2010-07-28 00:53:16 +02:00
Jim Meyering
b2e2010c7c update nearly all FSF copyright year lists to include 2010
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
2010-01-01 10:42:00 +01:00
Jim Meyering
3030c5b5e0 update nearly all FSF copyright year lists to include 2009
The files named by the following are exempted:

    grep -v '^#' config/srclist.txt|grep -v '^$' \
      | while read src dst; do
          test -f "$dst" && { echo "$dst"; continue; }
          test -d "$dst" || continue
          echo "$dst"/$(basename "$src")
        done > exempt
    git ls-files tests/unictype >> exempt

In the remaining files, convert to all-interval notation if
- there is already at least one year interval like 2000-2003
- the file is maintained by me
- the file is in lib/uni*/, where that style already prevails
Otherwise, use update-copyright's default.
2009-12-29 17:49:30 +01:00
Bruno Haible
441aa3044f Use spaces for indentation, not tabs. 2009-12-10 20:28:30 +01:00
Bruno Haible
4eda4ba54f Remove HAVE_MBRTOWC conditionals. Use mbrtowc unconditionally. 2008-12-22 12:11:44 +01:00
Bruno Haible
57fdfd3f8e Change copyright notice from GPLv2+ to GPLv3+. 2007-10-07 19:14:58 +02:00
Bruno Haible
58d5932625 New module 'mbspcasecmp'. 2007-02-15 03:07:04 +00:00