rahulj      99/11/17 14:36:43

  Modified:    c/src    Makefile.incl runConfigure
               c/src/util/Platforms Makefile.in
               c/src/util/Transcoders/ICU ICUTransService.cpp
  Log:
  Code works with ICU transcoding service
  
  Revision  Changes    Path
  1.4       +4 -1      xml-xerces/c/src/Makefile.incl
  
  Index: Makefile.incl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/Makefile.incl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.incl     1999/11/12 20:38:49     1.3
  +++ Makefile.incl     1999/11/17 22:36:31     1.4
  @@ -55,6 +55,9 @@
   # 
   #
   # $Log: Makefile.incl,v $
  +# Revision 1.4  1999/11/17 22:36:31  rahulj
  +# Code works with ICU transcoding service
  +#
   # Revision 1.3  1999/11/12 20:38:49  rahulj
   # Replaced XML4CROOT with XERCESCROOT.
   #
  @@ -151,7 +154,7 @@
   PLATFORM_COMPILE_OPTIONS = -fpic -instances=static -D${PLATFORM} -D_REENTRANT
   MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -D${PLATFORM} -shared -fpic
   MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -D${PLATFORM} -shared -fpic
  -EXTRA_LINK_OPTIONS = -lc
  +ALLLIBS = -lc -lpthread
   SHLIBSUFFIX=.so
   endif
   
  
  
  
  1.4       +11 -0     xml-xerces/c/src/runConfigure
  
  Index: runConfigure
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/runConfigure,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- runConfigure      1999/11/12 20:38:50     1.3
  +++ runConfigure      1999/11/17 22:36:33     1.4
  @@ -58,6 +58,9 @@
   # 
   #
   # $Log: runConfigure,v $
  +# Revision 1.4  1999/11/17 22:36:33  rahulj
  +# Code works with ICU transcoding service
  +#
   # Revision 1.3  1999/11/12 20:38:50  rahulj
   # Replaced XML4CROOT with XERCESCROOT.
   #
  @@ -202,6 +205,10 @@
   if test $transcoder; then
   case $transcoder in
      icu)
  +       if test -z $ICUROOT ; then
  +           echo '***Error*** ICUROOT environment variable not defined. 
Exiting...';
  +           exit -1;
  +       fi
          transcoderoption="-DXML_USE_ICU_TRANSCODER" ;
          TRANSCODER=ICU ;;
   
  @@ -224,6 +231,10 @@
   if test $msgloader ; then
   case $msgloader in
      icu)
  +       if test -z $ICUROOT ; then
  +           echo '***Error*** ICUROOT environment variable not defined. 
Exiting...';
  +           exit -1;
  +       fi
          MESSAGELOADER=ICU;
          msgloaderoption="-DXML_USE_ICU_MESSAGELOADER" ;;
   
  
  
  
  1.2       +4 -0      xml-xerces/c/src/util/Platforms/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in       1999/11/09 01:06:14     1.1
  +++ Makefile.in       1999/11/17 22:36:37     1.2
  @@ -55,9 +55,12 @@
   # 
   #
   # $Log: Makefile.in,v $
  -# Revision 1.1  1999/11/09 01:06:14  twl
  -# Initial revision
  +# Revision 1.2  1999/11/17 22:36:37  rahulj
  +# Code works with ICU transcoding service
   #
  +# Revision 1.1.1.1  1999/11/09 01:06:14  twl
  +# Initial checkin
  +#
   # Revision 1.3  1999/11/08 20:45:28  rahul
   # Swat for adding in Product name and CVS comment log variable.
   #:
  @@ -91,6 +94,7 @@
   endif
   ifeq (${PLATFORM}, LINUX)
       SUBMODULE = Platforms/Linux
  +    CXXFLAGS += -D__USE_UNIX98 -D__USE_GNU
       CPP_PUBHEADERS = Linux/LinuxDefs.hpp
       CPP_OBJECTS = Linux/LinuxPlatformUtils.o
   endif
  
  
  
  1.2       +25 -22    xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp
  
  Index: ICUTransService.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ICUTransService.cpp       1999/11/09 01:06:07     1.1
  +++ ICUTransService.cpp       1999/11/17 22:36:41     1.2
  @@ -56,9 +56,12 @@
   
   /**
    * $Log: ICUTransService.cpp,v $
  - * Revision 1.1  1999/11/09 01:06:07  twl
  - * Initial revision
  + * Revision 1.2  1999/11/17 22:36:41  rahulj
  + * Code works with ICU transcoding service
    *
  + * Revision 1.1.1.1  1999/11/09 01:06:07  twl
  + * Initial checkin
  + *
    * Revision 1.3  1999/11/08 20:45:33  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
  @@ -174,7 +177,7 @@
       //  which will basically cause the system to give up because we really 
can't
       //  do anything without one.
       //
  -    UErrorCode uerr = ZERO_ERROR;
  +    UErrorCode uerr = U_ZERO_ERROR;
       UConverter* converter = ucnv_open(NULL, &uerr);
       if (!converter)
           return 0;
  @@ -189,7 +192,7 @@
                                           ,       XMLTransService::Codes&; 
resValue
                                           , const unsigned int            
blockSize)
   {
  -    UErrorCode uerr = ZERO_ERROR;
  +    UErrorCode uerr = U_ZERO_ERROR;
       UConverter* converter = ucnv_openU(encodingName, &uerr);
       if (!converter)
       {
  @@ -239,7 +242,7 @@
   
       XMLMutexLock lockConverter(&fMutex);
   
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       const int32_t targetCap = ucnv_fromUChars
       (
           fConverter
  @@ -249,7 +252,7 @@
           , &err
       );
   
  -    if (err != BUFFER_OVERFLOW_ERROR)
  +    if (err != U_BUFFER_OVERFLOW_ERROR)
           return 0;
   
       return (unsigned int)targetCap;
  @@ -262,7 +265,7 @@
   
       XMLMutexLock lockConverter(&fMutex);
   
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       const int32_t targetCap = ucnv_toUChars
       (
           fConverter
  @@ -273,7 +276,7 @@
           , &err
       );
   
  -    if (err != BUFFER_OVERFLOW_ERROR)
  +    if (err != U_BUFFER_OVERFLOW_ERROR)
           return 0;
   
       // Subtract one since it includes the terminator space
  @@ -291,7 +294,7 @@
   
       XMLMutexLock lockConverter(&fMutex);
   
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       const char* startSrc = srcData;
       const XMLCh chRet = ucnv_getNextUChar
       (
  @@ -302,7 +305,7 @@
       );
   
       // Bail out if an error
  -    if (FAILURE(err))
  +    if (U_FAILURE(err))
           return 0;
   
       // Calculate the bytes eaten and return the char
  @@ -335,7 +338,7 @@
       retBuf = new char[targetLen + 1];
   
       //Convert the Unicode string to char* using Intl stuff
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       int32_t targetCap = ucnv_fromUChars
       (
           fConverter
  @@ -346,16 +349,16 @@
       );
   
       // If targetLen is not enough then buffer overflow might occur
  -    if (err == BUFFER_OVERFLOW_ERROR)
  +    if (err == U_BUFFER_OVERFLOW_ERROR)
       {
           // Reset the error, delete the old buffer, allocate a new one, and 
try again
  -        err = ZERO_ERROR;
  +        err = U_ZERO_ERROR;
           delete [] retBuf;
           retBuf = new char[targetCap];
           targetCap = ucnv_fromUChars(fConverter, retBuf, targetCap, 
toTranscode, &err);
       }
   
  -    if (FAILURE(err))
  +    if (U_FAILURE(err))
       {
           delete [] retBuf;
           return 0;
  @@ -386,11 +389,11 @@
   
       XMLMutexLock lockConverter(&fMutex);
   
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       int32_t targetCap;
       targetCap = ucnv_fromUChars(fConverter, toFill, maxChars + 1, 
toTranscode, &err);
   
  -    if (FAILURE(err))
  +    if (U_FAILURE(err))
           return false;
   
       return true;
  @@ -425,7 +428,7 @@
       //  an BUFFER_OVERFLOW_ERROR in which case it'd get resolved by the
       //  correct capacity value.
       //
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       int32_t targetCap;
       targetCap = ucnv_toUChars
       (
  @@ -437,10 +440,10 @@
           , &err
       );
   
  -    if (err != BUFFER_OVERFLOW_ERROR)
  +    if (err != U_BUFFER_OVERFLOW_ERROR)
           return 0;
   
  -    err = ZERO_ERROR;
  +    err = U_ZERO_ERROR;
       retVal = new XMLCh[targetCap];
       ucnv_toUChars
       (
  @@ -452,7 +455,7 @@
           , &err
       );
   
  -    if (FAILURE(err))
  +    if (U_FAILURE(err))
           return 0;
   
       return retVal;
  @@ -478,7 +481,7 @@
   
       XMLMutexLock lockConverter(&fMutex);
   
  -    UErrorCode err = ZERO_ERROR;
  +    UErrorCode err = U_ZERO_ERROR;
       const int32_t srcLen = (int32_t)strlen(toTranscode);
   
       ucnv_toUChars
  @@ -491,7 +494,7 @@
           , &err
       );
   
  -    if (FAILURE(err))
  +    if (U_FAILURE(err))
           return false;
       return true;
   }
  @@ -524,7 +527,7 @@
       //  when the raw input buffer holds more characters than will fit
       //  in the Unicode output buffer.
       //
  -    UErrorCode  err = ZERO_ERROR;
  +    UErrorCode  err = U_ZERO_ERROR;
       ucnv_toUnicode
       (
           fConverter
  @@ -537,7 +540,7 @@
           , &err
       );
   
  -    if ((err != ZERO_ERROR) && (err != INDEX_OUTOFBOUNDS_ERROR))
  +    if ((err != U_ZERO_ERROR) && (err != U_INDEX_OUTOFBOUNDS_ERROR))
           ThrowXML(TranscodingException, 
XML4CExcepts::Trans_CouldNotXCodeXMLData);
   
       // Calculate the bytes eaten and store in caller's param
  
  
  

Reply via email to