summaryrefslogtreecommitdiffstats
path: root/linux.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-10-04 03:44:47 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-04 03:12:19 -0700
commitf928be5061744bb38c3aff8ea41dbd0c42851cbc (patch)
tree6aee4fbbf194fa699fcd3b36a298f6831c912e73 /linux.c
parent3917e7b2f77048be01bc90ed5bc0bf6803bd8c59 (diff)
downloadsubsurface-f928be5061744bb38c3aff8ea41dbd0c42851cbc.tar.gz
Provide a method to use unicode command line arguments on Windows
For unicode command line characters Windows uses UTF-16, while Glib and GTK use UTF-8. To solve that we retrieve the command line via __wgetmainargs() and use g_utf16_to_utf8() to convert each argument. The used method should support wildcards passed as arguments (e.g. *.xml). Two new, OS abstracted functions appear in linux.c (NOP), macos.c (NOP), windows.c: subsurface_command_line_init(...) subsurface_command_line_exit(...) which are being called in main() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'linux.c')
-rw-r--r--linux.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux.c b/linux.c
index 47a00a059..4e7e61c7c 100644
--- a/linux.c
+++ b/linux.c
@@ -91,3 +91,13 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
divelist_font = DIVELIST_DEFAULT_FONT;
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
}
+
+void subsurface_command_line_init(gint *argc, gchar ***argv)
+{
+ /* this is a no-op */
+}
+
+void subsurface_command_line_exit(gint *argc, gchar ***argv)
+{
+ /* this is a no-op */
+}