mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-25 01:12:12 -04:00
table printer: Use localeconv for decimal point
This gives us a chance of working correctly in exotic locales.
This commit is contained in:
committed by
Alexander Larsson
parent
5635adea29
commit
ea93b3977d
@@ -26,6 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <locale.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -93,8 +94,10 @@ flatpak_table_printer_add_aligned_column (FlatpakTablePrinter *printer,
|
||||
static const char *
|
||||
find_decimal_point (const char *text)
|
||||
{
|
||||
// FIXME use localeconv
|
||||
return strchr (text, '.');
|
||||
struct lconv *locale_data;
|
||||
|
||||
locale_data = localeconv ();
|
||||
return strstr (text, locale_data->decimal_point);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user