From 85c501e80807ce1c0becb78b2da7ddab09131eaa Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 18 Jun 2004 02:00:14 +0000 Subject: [PATCH] ICU-3718 Make some data const. X-SVN-Rev: 15915 --- icu4c/source/tools/toolutil/unewdata.c | 2 +- icu4c/source/tools/toolutil/uperf.cpp | 18 +++++++++++++++++- icu4c/source/tools/toolutil/uperf.h | 20 +------------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/icu4c/source/tools/toolutil/unewdata.c b/icu4c/source/tools/toolutil/unewdata.c index c95c49b08c1..8084cecdcd3 100644 --- a/icu4c/source/tools/toolutil/unewdata.c +++ b/icu4c/source/tools/toolutil/unewdata.c @@ -167,7 +167,7 @@ udata_writeBlock(UNewDataMemory *pData, const void *s, int32_t length) { U_CAPI void U_EXPORT2 udata_writePadding(UNewDataMemory *pData, int32_t length) { - static uint8_t padding[16]={ + static const uint8_t padding[16]={ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, diff --git a/icu4c/source/tools/toolutil/uperf.cpp b/icu4c/source/tools/toolutil/uperf.cpp index 3e579b7b8f7..3493ae29d7f 100644 --- a/icu4c/source/tools/toolutil/uperf.cpp +++ b/icu4c/source/tools/toolutil/uperf.cpp @@ -10,7 +10,23 @@ static const char delim = '/'; static int32_t execCount = 0; UPerfTest* UPerfTest::gTest = NULL; static const int MAXLINES = 40000; -//static const char *currDir = "."; +const char UPerfTest::gUsageString[] = + "Usage: %s [OPTIONS] [FILES]\n" + "\tReads the input file and prints out time taken in seconds\n" + "Options:\n" + "\t-h or -? or --help this usage text\n" + "\t-v or --verbose print extra information when processing files\n" + "\t-s or --sourcedir source directory for files followed by path\n" + "\t followed by path\n" + "\t-e or --encoding encoding of source files\n" + "\t-u or --uselen perform timing analysis on non-null terminated buffer using length\n" + "\t-f or --file-name file to be used as input data\n" + "\t-p or --passes Number of passes to be performed. Requires Numeric argument. Cannot be used with --time\n" + "\t-i or --iterations Number of iterations to be performed. Requires Numeric argument\n" + "\t-t or --time Threshold time for looping until in seconds. Requires Numeric argument.Cannot be used with --iterations\n" + "\t-l or --line-mode The data file should be processed in line mode\n" + "\t-b or --bulk-mode The data file should be processed in file based. Cannot be used with --line-mode\n" + "\t-L or --locale Locale for the test\n"; enum { diff --git a/icu4c/source/tools/toolutil/uperf.h b/icu4c/source/tools/toolutil/uperf.h index 94d58fdb3e5..e794e961d5a 100644 --- a/icu4c/source/tools/toolutil/uperf.h +++ b/icu4c/source/tools/toolutil/uperf.h @@ -152,26 +152,8 @@ private: // static members public: static UPerfTest* gTest; - static const char* gUsageString; + static const char gUsageString[]; }; -const char* UPerfTest::gUsageString = - "Usage: %s [OPTIONS] [FILES]\n" - "\tReads the input file and prints out time taken in seconds\n" - "Options:\n" - "\t-h or -? or --help this usage text\n" - "\t-v or --verbose print extra information when processing files\n" - "\t-s or --sourcedir source directory for files followed by path\n" - "\t followed by path\n" - "\t-e or --encoding encoding of source files\n" - "\t-u or --uselen perform timing analysis on non-null terminated buffer using length\n" - "\t-f or --file-name file to be used as input data\n" - "\t-p or --passes Number of passes to be performed. Requires Numeric argument. Cannot be used with --time\n" - "\t-i or --iterations Number of iterations to be performed. Requires Numeric argument\n" - "\t-t or --time Threshold time for looping until in seconds. Requires Numeric argument.Cannot be used with --iterations\n" - "\t-l or --line-mode The data file should be processed in line mode\n" - "\t-b or --bulk-mode The data file should be processed in file based. Cannot be used with --line-mode\n" - "\t-L or --locale Locale for the test\n"; - #endif