/* Reading PO files, abstract class.
- Copyright (C) 1995-1996, 1998, 2000-2009, 2013, 2015, 2021 Free Software
- Foundation, Inc.
+ Copyright (C) 1995-1996, 1998, 2000-2009, 2013, 2015, 2021, 2023 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
if (error_message_count > 0)
po_xerror (PO_SEVERITY_FATAL_ERROR, NULL,
/*real_filename*/ NULL, (size_t)(-1), (size_t)(-1), false,
- xasprintf (ngettext ("found %d fatal error",
- "found %d fatal errors",
+ xasprintf (ngettext ("found %u fatal error",
+ "found %u fatal errors",
error_message_count),
error_message_count));
}
/* Writing Java ResourceBundles.
- Copyright (C) 2001-2003, 2005-2010, 2014, 2016, 2018-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010, 2014, 2016, 2018-2020, 2023 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
write_lookup_code (FILE *stream, unsigned int hashsize, bool collisions)
{
fprintf (stream, " int hash_val = msgid.hashCode() & 0x7fffffff;\n");
- fprintf (stream, " int idx = (hash_val %% %d) << 1;\n", hashsize);
+ fprintf (stream, " int idx = (hash_val %% %u) << 1;\n", hashsize);
if (collisions)
{
fprintf (stream, " {\n");
fprintf (stream, " if (msgid.equals(found))\n");
fprintf (stream, " return table[idx + 1];\n");
fprintf (stream, " }\n");
- fprintf (stream, " int incr = ((hash_val %% %d) + 1) << 1;\n",
+ fprintf (stream, " int incr = ((hash_val %% %u) + 1) << 1;\n",
hashsize - 2);
fprintf (stream, " for (;;) {\n");
fprintf (stream, " idx += incr;\n");
- fprintf (stream, " if (idx >= %d)\n", 2 * hashsize);
- fprintf (stream, " idx -= %d;\n", 2 * hashsize);
+ fprintf (stream, " if (idx >= %u)\n", 2 * hashsize);
+ fprintf (stream, " idx -= %u;\n", 2 * hashsize);
fprintf (stream, " java.lang.Object found = table[idx];\n");
fprintf (stream, " if (found == null)\n");
fprintf (stream, " return null;\n");
{
const struct table_item *ti = &table_items[j];
- fprintf (stream, " t[%d] = ", 2 * ti->index);
+ fprintf (stream, " t[%u] = ", 2 * ti->index);
write_java_msgid (stream, ti->mp);
fprintf (stream, ";\n");
- fprintf (stream, " t[%d] = ", 2 * ti->index + 1);
+ fprintf (stream, " t[%u] = ", 2 * ti->index + 1);
write_java_msgstr (stream, ti->mp);
fprintf (stream, ";\n");
}
}
}
fprintf (stream, " static {\n");
- fprintf (stream, " %s[] t = new %s[%d];\n", table_eltype,
+ fprintf (stream, " %s[] t = new %s[%u];\n", table_eltype,
table_eltype, 2 * hashsize);
if (mlp->nitems > max_items_per_method)
{
fprintf (stream, " return\n");
fprintf (stream, " new java.util.Enumeration() {\n");
fprintf (stream, " private int idx = 0;\n");
- fprintf (stream, " { while (idx < %d && table[idx] == null) idx += 2; }\n",
+ fprintf (stream, " { while (idx < %u && table[idx] == null) idx += 2; }\n",
2 * hashsize);
fprintf (stream, " public boolean hasMoreElements () {\n");
- fprintf (stream, " return (idx < %d);\n", 2 * hashsize);
+ fprintf (stream, " return (idx < %u);\n", 2 * hashsize);
fprintf (stream, " }\n");
fprintf (stream, " public java.lang.Object nextElement () {\n");
fprintf (stream, " java.lang.Object key = table[idx];\n");
- fprintf (stream, " do idx += 2; while (idx < %d && table[idx] == null);\n",
+ fprintf (stream, " do idx += 2; while (idx < %u && table[idx] == null);\n",
2 * hashsize);
fprintf (stream, " return key;\n");
fprintf (stream, " }\n");