Author: sebor
Date: Tue Sep 5 17:54:14 2006
New Revision: 440549
URL: http://svn.apache.org/viewvc?view=rev&rev=440549
Log:
2006-09-05 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-184
* charmap.cpp (Charmap): Set code_set_name_ to the same basename
as the name of the character set description file in case it's
not specified by the <code_set_name> declaration witin the said
file.
Modified:
incubator/stdcxx/trunk/util/charmap.cpp
Modified: incubator/stdcxx/trunk/util/charmap.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/charmap.cpp?view=diff&rev=440549&r1=440548&r2=440549
==============================================================================
--- incubator/stdcxx/trunk/util/charmap.cpp (original)
+++ incubator/stdcxx/trunk/util/charmap.cpp Tue Sep 5 17:54:14 2006
@@ -2,20 +2,27 @@
*
* charmap.cpp
*
- * $Id: //stdlib/dev/source/stdlib/util/charmap.cpp#95 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0. Unless required by
- * applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2001-2006 Rogue Wave Software.
*
**************************************************************************/
@@ -818,6 +825,11 @@
#endif // _MSC_VER
scanner_.open (fname, '#', '\\');
+
+ // set code_set_name to the name of the character set description
+ // file by default, in case it's not explicitly specified
+ const char* const slash = std::strrchr (fname, _RWSTD_PATH_SEP);
+ code_set_name_ = slash ? slash + 1 : fname;
// loop until we reach the end of the file
while ((next = scanner_.next_token()).token != Scanner::tok_end_tokens) {