+ /*
+ * Because of encoding issues with filenames (mentioned in the glib
+ * documentation), we don't check them with a callback function, but
+ * collect them into arrays and then check if the arrays contain at
+ * most one element.
+ */
+ if (NULL != input_file_array) {
+ if (NULL != input_file_array[0] && NULL != input_file_array[1]) {
+ g_critical("option \"--input-file/-i\" only allowed once");
+ goto done;
+ }
+ opt_input_file = g_strdup(input_file_array[0]);
+ }
+
+ if (NULL != output_file_array) {
+ if (NULL != output_file_array[0] && NULL != output_file_array[1]) {
+ g_critical("option \"--output-file/-o\" only allowed once");
+ goto done;
+ }
+ opt_output_file = g_strdup(output_file_array[0]);
+ }
+
+ if (1 != argc) {
+ g_critical("superfluous command line argument \"%s\"", argv[1]);
+ goto done;
+ }
+