diff --git a/headers/os/locale/DefaultCatalog.h b/headers/os/locale/DefaultCatalog.h index 1b500b4328..a81b6536b7 100644 --- a/headers/os/locale/DefaultCatalog.h +++ b/headers/os/locale/DefaultCatalog.h @@ -31,11 +31,11 @@ struct hash { #if __GNUC__ > 2 } // namespace __gnu_cxx -using namespace __gnu_cxx; +using __gnu_cxx::hash; +using __gnu_cxx::hash_map; +using __gnu_cxx::equal_to; #endif // __GNUC__ > 2 -using namespace std; - namespace BPrivate { /* diff --git a/src/bin/locale/linkcatkeys.cpp b/src/bin/locale/linkcatkeys.cpp index ba3083e1c3..80650558a6 100644 --- a/src/bin/locale/linkcatkeys.cpp +++ b/src/bin/locale/linkcatkeys.cpp @@ -1,4 +1,4 @@ -/* +/* ** Copyright 2003, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved. ** Distributed under the terms of the OpenBeOS License. */ @@ -13,8 +13,10 @@ #include #include +using std::vector; + void -usage() +usage() { fprintf(stderr, "usage: linkcatkeys [-v] [-t(a|f|r)] [-o ] [-l ]\n" @@ -80,17 +82,17 @@ main(int argc, char **argv) } if (inputFiles.empty() || !catalogSig || !outputFile.Length()) usage(); - + EditableCatalog targetCatalog("Default", catalogSig, catalogLang); if ((res = targetCatalog.InitCheck()) != B_OK) { - fprintf(stderr, "couldn't construct target-catalog %s - error: %s\n", + fprintf(stderr, "couldn't construct target-catalog %s - error: %s\n", outputFile.String(), strerror(res)); exit(-1); } DefaultCatalog* targetCatImpl = dynamic_cast(targetCatalog.CatalogAddOn()); if (!targetCatImpl) { - fprintf(stderr, "couldn't access impl of target-catalog %s\n", + fprintf(stderr, "couldn't access impl of target-catalog %s\n", outputFile.String()); exit(-1); } @@ -99,14 +101,14 @@ main(int argc, char **argv) for( uint32 i=0; i(inputCatalog.CatalogAddOn()); if (!inputCatImpl) { - fprintf(stderr, "couldn't access impl of input-catalog %s\n", + fprintf(stderr, "couldn't access impl of input-catalog %s\n", inputFiles[i]); exit(-1); } @@ -116,7 +118,7 @@ main(int argc, char **argv) // but this should be fast enough). DefaultCatalog::CatWalker walker; if ((res = inputCatImpl->GetWalker(&walker)) != B_OK) { - fprintf(stderr, "couldn't get walker for input-catalog %s - error: %s\n", + fprintf(stderr, "couldn't get walker for input-catalog %s - error: %s\n", inputFiles[i], strerror(res)); exit(-1); } @@ -135,7 +137,7 @@ main(int argc, char **argv) entry.GetRef(&eref); res = targetCatalog.WriteToAttribute(&eref); if (res != B_OK) { - fprintf(stderr, "couldn't write target-attribute to %s - error: %s\n", + fprintf(stderr, "couldn't write target-attribute to %s - error: %s\n", outputFile.String(), strerror(res)); exit(-1); } @@ -147,7 +149,7 @@ main(int argc, char **argv) entry.GetRef(&eref); res = targetCatalog.WriteToResource(&eref); if (res != B_OK) { - fprintf(stderr, "couldn't write target-resource to %s - error: %s\n", + fprintf(stderr, "couldn't write target-resource to %s - error: %s\n", outputFile.String(), strerror(res)); exit(-1); } @@ -155,7 +157,7 @@ main(int argc, char **argv) default: { res = targetCatalog.WriteToFile(outputFile.String()); if (res != B_OK) { - fprintf(stderr, "couldn't write target-catalog to %s - error: %s\n", + fprintf(stderr, "couldn't write target-catalog to %s - error: %s\n", outputFile.String(), strerror(res)); exit(-1); } diff --git a/src/kits/locale/DefaultCatalog.cpp b/src/kits/locale/DefaultCatalog.cpp index 8ed574d5e7..e9d80b4604 100644 --- a/src/kits/locale/DefaultCatalog.cpp +++ b/src/kits/locale/DefaultCatalog.cpp @@ -24,6 +24,12 @@ #include +using std::auto_ptr; +using std::min; +using std::max; +using std::pair; + + /* * This file implements the default catalog-type for the opentracker locale kit. * Alternatively, this could be used as a full add-on, but currently this