Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: source/tools/icuinfo/icuinfo.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/tools/icuinfo/Makefile.in ('k') | source/tools/icuinfo/icuinfo.vcxproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/tools/icuinfo/icuinfo.cpp
diff --git a/source/tools/icuinfo/icuinfo.cpp b/source/tools/icuinfo/icuinfo.cpp
index 218310bcabd923a723e24d1ca9e4269176a9017f..003b0bde507ffddadd5e86e9c84b5a3722b52d3f 100644
--- a/source/tools/icuinfo/icuinfo.cpp
+++ b/source/tools/icuinfo/icuinfo.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1999-2012, International Business Machines
+* Copyright (C) 1999-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -40,7 +40,7 @@ static UOption options[]={
/*1*/ UOPTION_HELP_QUESTION_MARK,
/*2*/ UOPTION_ICUDATADIR,
/*3*/ UOPTION_VERBOSE,
- /*4*/ UOPTION_DEF("list-plugins", 'L', UOPT_NO_ARG),
+ /*4*/ UOPTION_DEF("list-plugins", 'L', UOPT_NO_ARG), // may be a no-op if disabled
/*5*/ UOPTION_DEF("milisecond-time", 'm', UOPT_NO_ARG),
/*6*/ UOPTION_DEF("cleanup", 'K', UOPT_NO_ARG),
/*7*/ UOPTION_DEF("xml", 'x', UOPT_REQUIRES_ARG),
@@ -108,13 +108,17 @@ void cmd_version(UBool /* noLoad */, UErrorCode &errorCode)
printf("\n\nICU Initialization returned: %s\n", u_errorName(initStatus));
-
+
+#if UCONFIG_ENABLE_PLUGINS
#if U_ENABLE_DYLOAD
const char *pluginFile = uplug_getPluginFile();
printf("Plugin file is: %s\n", (pluginFile&&*pluginFile)?pluginFile:"(not set. try setting ICU_PLUGINS to a directory.)");
#else
fprintf(stderr, "Dynamic Loading: is disabled. No plugins will be loaded at start-up.\n");
#endif
+#else
+ fprintf(stderr, "Plugins are disabled.\n");
+#endif
}
void cmd_cleanup()
@@ -125,6 +129,7 @@ void cmd_cleanup()
void cmd_listplugins() {
+#if UCONFIG_ENABLE_PLUGINS
int32_t i;
UPlugData *plug;
@@ -201,7 +206,7 @@ void cmd_listplugins() {
if(i==0) {
printf("No plugins loaded.\n");
}
-
+#endif
}
@@ -227,7 +232,9 @@ main(int argc, char* argv[]) {
" -m or --millisecond-time - Print the current UTC time in milliseconds.\n"
" -d <dir> or --icudatadir <dir> - Set the ICU Data Directory\n"
" -v - Print version and configuration information about ICU\n"
+#if UCONFIG_ENABLE_PLUGINS
" -L or --list-plugins - List and diagnose issues with ICU Plugins\n"
+#endif
" -K or --cleanup - Call u_cleanup() before exitting (will attempt to unload plugins)\n"
"\n"
"If no arguments are given, the tool will print ICU version and configuration information.\n"
« no previous file with comments | « source/tools/icuinfo/Makefile.in ('k') | source/tools/icuinfo/icuinfo.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698