7ee2621d88
* Fix build when WITHOUT_NLS is defined [2] PR: 144719 Submitted by: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net> [1], maintainer [2] Approved by: maintainer
61 lines
1.5 KiB
Text
61 lines
1.5 KiB
Text
--- src/mp3splt.c.orig 2010-04-22 14:06:08.000000000 +0400
|
|
+++ src/mp3splt.c 2010-04-22 14:16:50.000000000 +0400
|
|
@@ -30,7 +30,6 @@
|
|
#include <ctype.h>
|
|
#include <getopt.h>
|
|
#include <locale.h>
|
|
-#include <libintl.h>
|
|
|
|
#ifdef __WIN32__
|
|
#include <windows.h>
|
|
@@ -46,6 +45,10 @@
|
|
#define PACKAGE_NAME "mp3splt"
|
|
#endif
|
|
|
|
+#ifdef ENABLE_NLS
|
|
+#include <libintl.h>
|
|
+#endif
|
|
+
|
|
#define MP3SPLT_DATE "17/02/10"
|
|
#define MP3SPLT_AUTHOR1 "Matteo Trotta"
|
|
#define MP3SPLT_AUTHOR2 "Alexandru Munteanu"
|
|
@@ -54,7 +57,11 @@
|
|
#define MP3SPLT_CDDBFILE "query.cddb"
|
|
|
|
#define MP3SPLT_GETTEXT_DOMAIN "mp3splt"
|
|
+#ifdef ENABLE_NLS
|
|
#define _(STR) gettext(STR)
|
|
+#else
|
|
+#define _(STR) STR
|
|
+#endif
|
|
|
|
//in case of STDIN/STDOUT usage, we change the console file handle
|
|
//-yeah indeed, global variables might suck
|
|
@@ -1801,9 +1808,11 @@ split:
|
|
//main program starts here
|
|
int main(int argc, char **orig_argv)
|
|
{
|
|
+#ifdef ENABLE_NLS
|
|
//gettext
|
|
setlocale(LC_ALL, "");
|
|
textdomain(MP3SPLT_GETTEXT_DOMAIN);
|
|
+#endif
|
|
|
|
console_out = stdout;
|
|
console_err = stderr;
|
|
@@ -1814,6 +1823,7 @@ int main(int argc, char **orig_argv)
|
|
|
|
main_data *data = create_main_struct(argc, orig_argv);
|
|
|
|
+#ifdef ENABLE_NLS
|
|
#ifdef __WIN32__
|
|
char mp3splt_uninstall_file[2048] = { '\0' };
|
|
DWORD dwType, dwSize = sizeof(mp3splt_uninstall_file) - 1;
|
|
@@ -1873,6 +1883,7 @@ int main(int argc, char **orig_argv)
|
|
#endif
|
|
|
|
bind_textdomain_codeset(MP3SPLT_GETTEXT_DOMAIN, "UTF-8");
|
|
+#endif
|
|
|
|
data->state = mp3splt_new_state(&err);
|
|
process_confirmation_error(err, data);
|