From c1507f4e8687d8ddb6157277b2003e5cfa3655aa Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Mon, 18 Jul 2005 06:49:18 +0000 Subject: [PATCH] ICU-4501 Update samples to use the current data building procedure and fix a few other problems found along the way X-SVN-Rev: 18267 --- icu4c/source/samples/all/all.sln | 1 + icu4c/source/samples/uresb/resources.mak | 14 +++++++------- icu4c/source/samples/uresb/uresb.c | 8 ++++---- icu4c/source/samples/uresb/uresb.vcproj | 5 +---- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/icu4c/source/samples/all/all.sln b/icu4c/source/samples/all/all.sln index f5b41ce9b00..0ac1779b69c 100644 --- a/icu4c/source/samples/all/all.sln +++ b/icu4c/source/samples/all/all.sln @@ -73,6 +73,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ugrep", "..\ugrep\ugrep.vcp EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uresb", "..\uresb\uresb.vcproj", "{5AD1AEF5-E13B-4411-BDD8-FF735FADAE1B}" ProjectSection(ProjectDependencies) = postProject + {AB75D6BC-660C-4225-A601-CC40294E775E} = {AB75D6BC-660C-4225-A601-CC40294E775E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ustring", "..\ustring\ustring.vcproj", "{3A28CC89-98B6-4E9E-B688-DF5651819759}" diff --git a/icu4c/source/samples/uresb/resources.mak b/icu4c/source/samples/uresb/resources.mak index 3ee4a69cc69..0c8225fb351 100644 --- a/icu4c/source/samples/uresb/resources.mak +++ b/icu4c/source/samples/uresb/resources.mak @@ -1,8 +1,9 @@ -## Copyright (c) 2001-2003 International Business Machines +## Copyright (c) 2001-2005 International Business Machines ## Corporation and others. All Rights Reserved. -TARGETS = uresb_en.res uresb_root.res uresb_sr.res +PACKAGE_NAME = uresb +TARGETS = en.res root.res sr.res GENRB = ..\..\..\bin\genrb.exe -GENRBOPT = -s. -d. --package-name uresb +GENRBOPT = -s . -d . all : $(TARGETS) @echo All targets are up to date @@ -10,13 +11,12 @@ all : $(TARGETS) clean : -erase $(TARGETS) - -uresb_en.res : en.txt +en.res : en.txt $(GENRB) $(GENRBOPT) $? -uresb_root.res : root.txt +root.res : root.txt $(GENRB) $(GENRBOPT) $? -uresb_sr.res : sr.txt +sr.res : sr.txt $(GENRB) $(GENRBOPT) --encoding cp1251 $? diff --git a/icu4c/source/samples/uresb/uresb.c b/icu4c/source/samples/uresb/uresb.c index 0b9cc913feb..db2d57896ae 100644 --- a/icu4c/source/samples/uresb/uresb.c +++ b/icu4c/source/samples/uresb/uresb.c @@ -95,9 +95,9 @@ main(int argc, char* argv[]) { "error in command line argument \"%s\"\n", argv[-argc]); } - if(argc<0 || options[0].doesOccur || options[1].doesOccur) { + if(argc<2 || options[0].doesOccur || options[1].doesOccur) { fprintf(stderr, - "usage: %s [-options]\n", + "usage: %s [-options] locale(s)\n", argv[0]); return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR; } @@ -139,7 +139,7 @@ main(int argc, char* argv[]) { } if(options[6].doesOccur) { - VERBOSE = TRUE; + VERBOSE = TRUE; } outerr = u_finit(stderr, locale, encoding); @@ -149,7 +149,7 @@ main(int argc, char* argv[]) { status = U_ZERO_ERROR; arg = getLongPathname(argv[i]); - printf("uresb: processing file \"%s\" in path \"%s\"\n", arg, resPath); + u_fprintf(out, "uresb: processing file \"%s\" in path \"%s\"\n", arg, resPath); bundle = ures_open(resPath, arg, &status); if(U_SUCCESS(status)) { u_fprintf(out, "%s\n", arg); diff --git a/icu4c/source/samples/uresb/uresb.vcproj b/icu4c/source/samples/uresb/uresb.vcproj index 2a7636e1fc3..1944436b4ab 100644 --- a/icu4c/source/samples/uresb/uresb.vcproj +++ b/icu4c/source/samples/uresb/uresb.vcproj @@ -94,10 +94,7 @@ DebugInformationFormat="4" CompileAs="0"/> + Name="VCCustomBuildTool"/>