mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Fixed bug #153937, making sure the conversion functions return the number
* encoding.c doc/examples/testWriter.c: Fixed bug #153937, making sure the conversion functions return the number of byte written. Had to fix one of the examples. Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
Sun Oct 31 16:33:54 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* encoding.c doc/examples/testWriter.c: Fixed bug #153937, making
|
||||
sure the conversion functions return the number of byte written.
|
||||
Had to fix one of the examples.
|
||||
|
||||
Fri Oct 29 14:16:56 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* doc/xmllint.1 doc/xmllint.xml: indicate - means stdin closing #156626
|
||||
|
@@ -309,7 +309,7 @@ else
|
||||
CFLAGS="${CFLAGS} -fexceptions"
|
||||
fi
|
||||
|
||||
CFLAGS="${CFLAGS} -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
case "${host}" in
|
||||
alpha*-*-linux* )
|
||||
CFLAGS="${CFLAGS} -mieee"
|
||||
@@ -447,7 +447,7 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
|
||||
fi
|
||||
fi
|
||||
if test "${CC}" = "gcc" ; then
|
||||
CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
|
||||
CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
|
||||
fi
|
||||
STATIC_BINARIES="-static"
|
||||
dnl -Wcast-qual -ansi
|
||||
|
@@ -1168,8 +1168,8 @@ ConvertInput(const char *in, const char *encoding)
|
||||
if (out != 0) {
|
||||
temp = size - 1;
|
||||
ret = handler->input(out, &out_size, (const xmlChar *) in, &temp);
|
||||
if (ret || temp - size + 1) {
|
||||
if (ret) {
|
||||
if ((ret < 0) || (temp - size + 1)) {
|
||||
if (ret < 0) {
|
||||
printf("ConvertInput: conversion wasn't successful.\n");
|
||||
} else {
|
||||
printf
|
||||
|
22
encoding.c
22
encoding.c
@@ -125,7 +125,7 @@ asciiToUTF8(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = processed - base;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
@@ -209,7 +209,7 @@ UTF8Toascii(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = processed - instart;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
@@ -255,7 +255,7 @@ isolat1ToUTF8(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - base;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,7 +291,7 @@ UTF8ToUTF8(unsigned char* out, int *outlen,
|
||||
|
||||
*outlen = len;
|
||||
*inlenb = len;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ UTF8Toisolat1(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = processed - instart;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
@@ -470,7 +470,7 @@ UTF16LEToUTF8(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlenb = processed - inb;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
@@ -578,7 +578,7 @@ UTF8ToUTF16LE(unsigned char* outb, int *outlen,
|
||||
}
|
||||
*outlen = (out - outstart) * 2;
|
||||
*inlen = processed - instart;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -710,7 +710,7 @@ UTF16BEToUTF8(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlenb = processed - inb;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
@@ -815,7 +815,7 @@ UTF8ToUTF16BE(unsigned char* outb, int *outlen,
|
||||
}
|
||||
*outlen = (out - outstart) * 2;
|
||||
*inlen = processed - instart;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
@@ -2290,7 +2290,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart;
|
||||
return(0);
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2350,7 +2350,7 @@ ISO8859xToUTF8(unsigned char* out, int *outlen,
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart;
|
||||
return (0);
|
||||
return (*outlen);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user