Diff for /XML/encoding.c between versions 1.36 and 1.37

version 1.36, 2000/05/07 16:36:16 version 1.37, 2000/05/08 07:25:51
Line 47  xmlCharEncodingHandlerPtr xmlUTF16LEHand Line 47  xmlCharEncodingHandlerPtr xmlUTF16LEHand
 xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;  xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
   
 #ifdef LIBXML_ICONV_ENABLED  #ifdef LIBXML_ICONV_ENABLED
 #if 1  #if 0
 #define DEBUG_ENCODING  /* Define this to get encoding traces */  #define DEBUG_ENCODING  /* Define this to get encoding traces */
 #endif  #endif
 #endif  #endif
Line 317  UTF8ToUTF16LE(unsigned char* outb, int * Line 317  UTF8ToUTF16LE(unsigned char* outb, int *
     unsigned char *tmp;      unsigned char *tmp;
     unsigned short tmp1, tmp2;      unsigned short tmp1, tmp2;
   
       if (in == NULL) {
           /*
            * initialization, add the Byte Order Mark
            */
           if (*outlen >= 2) {
               outb[0] = 0xFF;
               outb[1] = 0xFE;
               *outlen = 2;
               *inlen = 0;
   #ifdef DEBUG_ENCODING
               fprintf(stderr, "Added FFFE Byte Order Mark\n");
   #endif
               return(2);
           }
           *outlen = 0;
           *inlen = 0;
           return(0);
       }
     outend = out + (*outlen / 2);      outend = out + (*outlen / 2);
     while (in < inend) {      while (in < inend) {
       d= *in++;        d= *in++;
Line 509  UTF8ToUTF16BE(unsigned char* outb, int * Line 527  UTF8ToUTF16BE(unsigned char* outb, int *
     unsigned char *tmp;      unsigned char *tmp;
     unsigned short tmp1, tmp2;      unsigned short tmp1, tmp2;
   
       if (in == NULL) {
           /*
            * initialization, add the Byte Order Mark
            */
           if (*outlen >= 2) {
               outb[0] = 0xFE;
               outb[1] = 0xFF;
               *outlen = 2;
               *inlen = 0;
   #ifdef DEBUG_ENCODING
               fprintf(stderr, "Added FEFF Byte Order Mark\n");
   #endif
               return(2);
           }
           *outlen = 0;
           *inlen = 0;
           return(0);
       }
     outend = out + (*outlen / 2);      outend = out + (*outlen / 2);
     while (in < inend) {      while (in < inend) {
       d= *in++;        d= *in++;

Removed from v.1.36  
changed lines
  Added in v.1.37


Webmaster