You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2008/03/03 10:14:05 UTC

svn commit: r632994 - in /xerces/c/trunk: ./ src/ src/xercesc/util/MsgLoaders/ICU/ src/xercesc/util/MsgLoaders/ICU/resources/

Author: borisk
Date: Mon Mar  3 01:14:03 2008
New Revision: 632994

URL: http://svn.apache.org/viewvc?rev=632994&view=rev
Log:
Do not use the build version component in the ICU message loader's entry point. While at it, rename the package/entry point to be consistent with the library name.

Added:
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/res-file-list.txt
      - copied unchanged from r632978, xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/res-file-list-unix.txt
Removed:
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/res-file-list-unix.txt
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/res-file-list-wins.txt
Modified:
    xerces/c/trunk/src/Makefile.am
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/resources.mak
    xerces/c/trunk/version.incl

Modified: xerces/c/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/Makefile.am?rev=632994&r1=632993&r2=632994&view=diff
==============================================================================
--- xerces/c/trunk/src/Makefile.am (original)
+++ xerces/c/trunk/src/Makefile.am Mon Mar  3 01:14:03 2008
@@ -135,7 +135,7 @@
 AM_CPPFLAGS += -I${ICU_PREFIX}/include
 
 SUBDIRS += xercesc/util/MsgLoaders/ICU/resources
-libxerces_c_la_LIBADD += xercesc/util/MsgLoaders/ICU/resources/XercesMessages.lo
+libxerces_c_la_LIBADD += xercesc/util/MsgLoaders/ICU/resources/xercesc_messages.lo
 endif
 
 if XERCES_USE_MSGLOADER_ICONV

Modified: xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp?rev=632994&r1=632993&r2=632994&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp Mon Mar  3 01:14:03 2008
@@ -5,9 +5,9 @@
  * 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.
@@ -32,7 +32,7 @@
 #include "ICUMsgLoader.hpp"
 #include "unicode/putil.h"
 #include "unicode/uloc.h"
-#include "unicode/udata.h" 
+#include "unicode/udata.h"
 
 #include "string.h"
 #include <stdio.h>
@@ -45,24 +45,19 @@
 // ---------------------------------------------------------------------------
 
 /*
- *  Resource Data Reference.  
- * 
+ *  Resource Data Reference.
+ *
  *  The data is packaged as a dll (or .so or whatever, depending on the platform) that exports a data symbol.
- *  The application (this *.cpp) references that symbol here, and will pass the data address to ICU, which 
+ *  The application (this *.cpp) references that symbol here, and will pass the data address to ICU, which
  *  will then  be able to fetch resources from the data.
  */
+#define ENTRY_POINT xercesc_messages_3_0_dat
+#define BUNDLE_NAME "xercesc_messages_3_0"
 
-#if defined(_WIN32) || defined(WIN32)
-#define ENTRY_POINT XercesMessages3_0_dat
-#define BUNDLE_NAME "XercesMessages3_0"
-#else
-#define ENTRY_POINT XercesMessages3_0_0_dat
-#define BUNDLE_NAME "XercesMessages3_0_0"
-#endif
 extern "C" void U_IMPORT *ENTRY_POINT;
 
-/* 
- *  Tell ICU where our resource data is located in memory. The data lives in the XercesMessages dll, and we just
+/*
+ *  Tell ICU where our resource data is located in memory. The data lives in the xercesc_nessages dll, and we just
  *  pass the address of an exported symbol from that library to ICU.
  */
 static bool setAppDataOK = false;
@@ -115,7 +110,7 @@
 
     /***
         Location resolution priority
-         
+
          1. XMLMsgLoader::getNLSHome(), set by user through
             XMLPlatformUtils::Initialize(), which provides user-specified
             location where the message loader shall retrieve error messages.
@@ -150,7 +145,7 @@
                 strcpy(locationBuf, nlsHome);
                 strcat(locationBuf, U_FILE_SEP_STRING);
                 strcat(locationBuf, "msg");
-                strcat(locationBuf, U_FILE_SEP_STRING);                    
+                strcat(locationBuf, U_FILE_SEP_STRING);
             }
             else
             {
@@ -160,7 +155,7 @@
                  ***/
                  setAppData();
             }
-        }    
+        }
     }
 
     /***
@@ -179,8 +174,8 @@
         ***/
 
         if (strcmp(locationBuf, BUNDLE_NAME) !=0 )
-        {    	     	   
-            setAppData();        	
+        {
+            setAppData();
             err = U_ZERO_ERROR;
             fLocaleBundle = ures_open(BUNDLE_NAME, XMLMsgLoader::getLocale(), &err);
             if (!U_SUCCESS(err) || fLocaleBundle == NULL)
@@ -189,9 +184,9 @@
             }
         }
         else
-        {    	     	   
+        {
             XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
-        }        
+        }
     }
 
     /***
@@ -289,7 +284,7 @@
     XMLCh* tmp1 = 0;
     XMLCh* tmp2 = 0;
     XMLCh* tmp3 = 0;
-    XMLCh* tmp4 = 0;    
+    XMLCh* tmp4 = 0;
 
     bool bRet = false;
     if (repText1)

Modified: xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in?rev=632994&r1=632993&r2=632994&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in (original)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in Mon Mar  3 01:14:03 2008
@@ -42,7 +42,6 @@
 BUILD_SHARED = @BUILD_SHARED@
 BUILD_STATIC = @BUILD_STATIC@
 
-# Special build rules
 include $(top_srcdir)/version.incl
 
 GENRB=$(ICU_PREFIX)/bin/genrb
@@ -54,21 +53,21 @@
 "CPPFLAGS=$(CPPFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "LDFLAGS=$(LDFLAGS)"'
 
 # Resource shortname
-PKGNAME=XercesMessages$(VER)
+PKGNAME=xercesc_messages_$(VER_UNDERSCORED)
 
 # Resource files.  Add new ones for additional locales here.
 # keep in sync with the file RESLIST
 RESFILES=en_US.res
 
 # list of resource bundles  - keep in sync with RESFILES
-RESLIST=$(srcdir)/res-file-list-unix.txt
+RESLIST=$(srcdir)/res-file-list.txt
 
 #
 #
 .PHONY: all
-all: XercesMessages.lo
+all: xercesc_messages.lo
 
-XercesMessages.lo: $(RESFILES)
+xercesc_messages.lo: $(RESFILES)
 ifeq ($(BUILD_SHARED),yes)
 	$(PKGDATA) --name $(PKGNAME) --mode dll $(PKGDATAOPTS) $(RESLIST)
 	mv $(PKGNAME)_dat.o $(PKGNAME)_dat-pic.o
@@ -99,7 +98,7 @@
 # reason.
 #
 distclean clean:
-	rm -f XercesMessages.lo
+	rm -f xercesc_messages.lo
 ifeq ($(BUILD_SHARED),yes)
 	$(PKGDATA) --name $(PKGNAME) --mode dll --clean $(PKGDATAOPTS) $(RESLIST)
 	rm -f $(PKGNAME)_dat-pic.o
@@ -121,7 +120,7 @@
 distdir:
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='res-file-list-unix.txt res-file-list-wins.txt en_US.txt Makefile.in resources.mak'; \
+	list='res-file-list.txt en_US.txt Makefile.in resources.mak'; \
 	  dist_files=`for file in $$list; do echo $$file; done | \
 	  sed -e "s|^$$srcdirstrip/||;t" \
 	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \

Modified: xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/resources.mak
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/resources.mak?rev=632994&r1=632993&r2=632994&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/resources.mak (original)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/resources.mak Mon Mar  3 01:14:03 2008
@@ -19,9 +19,9 @@
 # for VER
 include ..\..\..\..\..\..\version.incl
 
-RESFILES= en_US.res 
+RESFILES= en_US.res
 
-PKGNAME       = XercesMessages$(WIN_MSG_VER)
+PKGNAME       = xercesc_messages_$(VER_UNDERSCORED)
 TARGET_DLL    = $(PKGNAME).DLL
 TARGET_LIB    = $(PKGNAME).lib
 
@@ -42,7 +42,7 @@
 #  -t fools make into thinking there are files such as es.res, etc
 #
 .txt.res:
-	$(GENRB) -t --package-name $(PKGNAME) -d . $*.txt
+	$(GENRB) -d . $*.txt
 
 #
 #  all - nmake starts here by default
@@ -50,5 +50,5 @@
 all: $(TARGET_DLL)
 
 $(TARGET_DLL): $(RESFILES)
-	$(PKGDATA) --name $(PKGNAME) -v -O R:$(ICUROOT) --mode dll -d . res-file-list-wins.txt
+	$(PKGDATA) --name $(PKGNAME) -v -O R:$(ICUROOT) --mode dll -d . res-file-list.txt
 

Modified: xerces/c/trunk/version.incl
URL: http://svn.apache.org/viewvc/xerces/c/trunk/version.incl?rev=632994&r1=632993&r2=632994&view=diff
==============================================================================
--- xerces/c/trunk/version.incl (original)
+++ xerces/c/trunk/version.incl Mon Mar  3 01:14:03 2008
@@ -1,12 +1,12 @@
 #
 # Copyright 1999-2004 The Apache Software Foundation.
-# 
+#
 # 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.
@@ -19,4 +19,4 @@
 #
 VER=3_0_0
 VER_DOTTED=3.0
-WIN_MSG_VER=3_0
+VER_UNDERSCORED=3_0



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org