You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
_cupsStrFormatd() doesn't format decimal values properly #2296
The _cupsStrFormatd() function (which is used for formatting locale-independent decimal numbers in PS output, among other places) incorrectly formats decimal numbers (you get double decimal points...)
if (argc == 1)
{
language = cupsLangDefault();
@@ -61,6 +76,8 @@
if (language != language2)
{
errors ++;
puts("**** ERROR: Language cache did not work! ****");
puts("First result from cupsLangGet:");
}
@@ -80,7 +97,26 @@
printf("Yes = "%s"\n", _cupsLangString(language2, "Yes"));
}
return (0);
loc = localeconv();
for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i ++)
Activity
michaelrsweet commentedon Mar 17, 2007
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Mar 17, 2007
"str2296.patch":
Index: string.c
--- string.c (revision 6342)
+++ string.c (working copy)
@@ -266,9 +266,9 @@
tempptr < tempdec && bufptr < bufend;
*bufptr++ = *tempptr++);
{
*bufptr++ = '.';
Index: testlang.c
--- testlang.c (revision 6342)
+++ testlang.c (working copy)
@@ -34,6 +34,7 @@
#include <stdio.h>
#include "i18n.h"
+#include "string.h"
/*
@@ -44,10 +45,24 @@
main(int argc, /* I - Number of command-line arguments /
char *argv[]) / I - Command-line arguments */
{
cups_lang_t *language; / Message catalog /
cups_lang_t *language2; / Message catalog */
if (argc == 1)
{
language = cupsLangDefault();
@@ -61,6 +76,8 @@
if (language != language2)
{
puts("**** ERROR: Language cache did not work! ****");
puts("First result from cupsLangGet:");
}
@@ -80,7 +97,26 @@
printf("Yes = "%s"\n", _cupsLangString(language2, "Yes"));
}
}