mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
all: Call setlocale() at the start of main()
This fixes some broken characters in the fprintd debug output.
This commit is contained in:
@ -136,6 +136,8 @@ int main(int argc, char **argv)
|
|||||||
DBusGProxy *driver_proxy;
|
DBusGProxy *driver_proxy;
|
||||||
guint32 request_name_ret;
|
guint32 request_name_ret;
|
||||||
|
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <dbus/dbus-glib-bindings.h>
|
#include <dbus/dbus-glib-bindings.h>
|
||||||
#include "manager-dbus-glue.h"
|
#include "manager-dbus-glue.h"
|
||||||
#include "device-dbus-glue.h"
|
#include "device-dbus-glue.h"
|
||||||
@ -125,6 +126,8 @@ static void process_devices(char **argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
create_manager();
|
create_manager();
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <dbus/dbus-glib-bindings.h>
|
#include <dbus/dbus-glib-bindings.h>
|
||||||
#include "manager-dbus-glue.h"
|
#include "manager-dbus-glue.h"
|
||||||
#include "device-dbus-glue.h"
|
#include "device-dbus-glue.h"
|
||||||
@ -159,6 +160,8 @@ int main(int argc, char **argv)
|
|||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
DBusGProxy *dev;
|
DBusGProxy *dev;
|
||||||
|
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
|
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
|
||||||
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
|
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <dbus/dbus-glib-bindings.h>
|
#include <dbus/dbus-glib-bindings.h>
|
||||||
#include "manager-dbus-glue.h"
|
#include "manager-dbus-glue.h"
|
||||||
#include "device-dbus-glue.h"
|
#include "device-dbus-glue.h"
|
||||||
@ -130,6 +131,8 @@ static void process_devices(char **argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
create_manager();
|
create_manager();
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <dbus/dbus-glib-bindings.h>
|
#include <dbus/dbus-glib-bindings.h>
|
||||||
#include "manager-dbus-glue.h"
|
#include "manager-dbus-glue.h"
|
||||||
#include "device-dbus-glue.h"
|
#include "device-dbus-glue.h"
|
||||||
@ -172,6 +173,8 @@ int main(int argc, char **argv)
|
|||||||
DBusGProxy *dev;
|
DBusGProxy *dev;
|
||||||
char *username;
|
char *username;
|
||||||
|
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
|
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
|
||||||
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
|
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user