#
# This script requires autoconf-2.64..2.72 and automake-1.13..1.17 in the PATH.
-# Copyright (C) 2003-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2025 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
stdlib-h
stpcpy
stpncpy
+ str_startswith
strchrnul
strcspn
strerror
stdlib-h
stpcpy
stpncpy
+ str_startswith
strchrnul
strerror
string-desc
/* Unicode CLDR plural rule parser and converter.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file was written by Daiki Ueno <ueno@gnu.org>, 2015.
arg->cp = exp + length;
return ELLIPSIS;
}
- else if (strncmp ("...", exp, 3) == 0)
+ else if (str_startswith (exp, "..."))
{
arg->cp = exp + 3;
return ELLIPSIS;
}
- else if (strncmp ("..", exp, 2) == 0)
+ else if (str_startswith (exp, ".."))
{
arg->cp = exp + 2;
return RANGE;
}
- else if (strncmp ("other", exp, 5) == 0)
+ else if (str_startswith (exp, "other"))
{
arg->cp = exp + 5;
return OTHER;
}
- else if (strncmp ("@integer", exp, 8) == 0)
+ else if (str_startswith (exp, "@integer"))
{
arg->cp = exp + 8;
return AT_INTEGER;
}
- else if (strncmp ("@decimal", exp, 8) == 0)
+ else if (str_startswith (exp, "@decimal"))
{
arg->cp = exp + 8;
return AT_DECIMAL;
/* Java MessageFormat format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
type = FAT_OBJECT;
if (*element == '\0')
;
- else if (strncmp (element, ",time", 5) == 0
- || strncmp (element, ",date", 5) == 0)
+ else if (str_startswith (element, ",time")
+ || str_startswith (element, ",date"))
{
type = FAT_DATE;
element += 5;
return false;
}
}
- else if (strncmp (element, ",number", 7) == 0)
+ else if (str_startswith (element, ",number"))
{
type = FAT_NUMBER;
element += 7;
return false;
}
}
- else if (strncmp (element, ",choice", 7) == 0)
+ else if (str_startswith (element, ",choice"))
{
type = FAT_NUMBER; /* because ChoiceFormat extends NumberFormat */
element += 7;
number_nonempty = false;
while (*format != '\0'
&& !(!quoting && (*format == '<' || *format == '#'
- || strncmp (format, "\\u2264", 6) == 0
+ || str_startswith (format, "\\u2264")
|| *format == '|')))
{
if (format[0] == '\\')
if (*format == '<' || *format == '#')
format += 1;
- else if (strncmp (format, "\\u2264", 6) == 0)
+ else if (str_startswith (format, "\\u2264"))
format += 6;
else
{
/* Checking of messages in PO files.
- Copyright (C) 1995-2023 Free Software Foundation, Inc.
+ Copyright (C) 1995-2025 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software: you can redistribute it and/or modify
language += 15;
for (j = 0; j < plural_table_size; j++)
- if (strncmp (language,
- plural_table[j].language,
- strlen (plural_table[j].language)) == 0)
+ if (str_startswith (language, plural_table[j].language))
{
ptentry = &plural_table[j];
break;
if (*p == ' ')
p++;
if (default_values[cnt] != NULL
- && strncmp (p, default_values[cnt],
- strlen (default_values[cnt])) == 0)
+ && str_startswith (p, default_values[cnt]))
{
p += strlen (default_values[cnt]);
if (*p == '\0' || *p == '\n')
/* Reading textual message catalogs (such as PO files), abstract class.
- Copyright (C) 1995-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-2025 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
{
bool isolated_filename =
(catr->po_lex_isolate_start != NULL
- && strncmp (s, catr->po_lex_isolate_start,
- strlen (catr->po_lex_isolate_start)) == 0);
+ && str_startswith (s, catr->po_lex_isolate_start));
if (isolated_filename)
s += strlen (catr->po_lex_isolate_start);
filename_end = s;
break;
}
- if (strncmp (s, catr->po_lex_isolate_end,
- strlen (catr->po_lex_isolate_end)) == 0)
+ if (str_startswith (s, catr->po_lex_isolate_end))
{
filename_end = s;
s += strlen (catr->po_lex_isolate_end);
/* Reading C# satellite assemblies.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
for (p = culture_name; *p != '\0'; p++)
if (*p == '_')
*p = '-';
- if (strncmp (culture_name, "sr-CS", 5) == 0)
+ if (str_startswith (culture_name, "sr-CS"))
memcpy (culture_name, "sr-SP", 5);
p = strchr (culture_name, '@');
if (p != NULL)
/* Writing C# satellite assemblies.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
for (p = culture_name; *p != '\0'; p++)
if (*p == '_')
*p = '-';
- if (strncmp (culture_name, "sr-CS", 5) == 0)
+ if (str_startswith (culture_name, "sr-CS"))
memcpy (culture_name, "sr-SP", 5);
p = strchr (culture_name, '@');
if (p != NULL)
++(xp->line_number);
- if (strncmp ("=cut", xp->linebuf, 4) == 0)
+ if (str_startswith (xp->linebuf, "=cut"))
{
/* Force reading of a new line on next call to phase1_getc(). */
xp->linepos = xp->linesize;
--------------------+-------------+---------------------
emacs-terminal 26.1 | eterm-color | produces garbage
*/
- if (strncmp (term, "eterm", 5) == 0)
+ if (str_startswith (term, "eterm"))
return false;
/* xterm-compatible terminal emulators:
TODO: Revisit this table periodically.
*/
- if (strncmp (term, "xterm", 5) == 0)
+ if (str_startswith (term, "xterm"))
{
char *progname = get_terminal_emulator_progname ();
if (progname != NULL)
{
bool known_buggy =
- strncmp (progname, "python", 6) == 0 /* guake */
+ str_startswith (progname, "python") /* guake */
|| strcmp (progname, "lilyterm") == 0
|| strcmp (progname, "lterm") == 0
|| strcmp (progname, "lxterminal") == 0
get_ppid_of
get_progname_of
stdint-h
+str_startswith
terminfo-h
xalloc
xgethostname