1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Huge cleanup, I switched to compile with

-Wall -g -O -ansi -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
- HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch]
  encoding.h entities.c error.c list.[ch] nanoftp.c
  nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c
  testSAX.c testURI.c testXPath.c tree.[ch] uri.c
  valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c
  xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c:
  Cleanup, staticfied a number of non-exported functions,
  detected and cleaned up a dozen of problem found this way,
  avoided a lot of public function name/typedef/system names clashes
- doc/xml.html: updated
- configure.in: switched private flags to the really pedantic ones.
Daniel
This commit is contained in:
Daniel Veillard
2001-03-24 17:00:36 +00:00
parent c7ad7ce598
commit 56a4cb8c4d
49 changed files with 1261 additions and 1186 deletions

View File

@ -91,7 +91,7 @@ static int xmlLittleEndian = 1;
* Returns the char value or -1 in case of error and update @len with the
* number of bytes used
*/
int
static int
xmlGetUTF8Char(const unsigned char *utf, int *len) {
unsigned int c;
@ -206,7 +206,7 @@ xmlCheckUTF8(const unsigned char *utf)
* as the return value is positive, else unpredictiable.
* The value of @outlen after return is the number of ocetes consumed.
*/
int
static int
asciiToUTF8(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
unsigned char* outstart = out;
@ -258,7 +258,7 @@ asciiToUTF8(unsigned char* out, int *outlen,
* as the return value is positive, else unpredictiable.
* The value of @outlen after return is the number of ocetes consumed.
*/
int
static int
UTF8Toascii(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
const unsigned char* processed = in;
@ -478,7 +478,7 @@ UTF8Toisolat1(unsigned char* out, int *outlen,
* The value of *inlen after return is the number of octets consumed
* as the return value is positive, else unpredictiable.
*/
int
static int
UTF16LEToUTF8(unsigned char* out, int *outlen,
const unsigned char* inb, int *inlenb)
{
@ -562,7 +562,7 @@ UTF16LEToUTF8(unsigned char* out, int *outlen,
* Returns the number of byte written, or -1 by lack of space, or -2
* if the transcoding failed.
*/
int
static int
UTF8ToUTF16LE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
@ -685,7 +685,7 @@ UTF8ToUTF16LE(unsigned char* outb, int *outlen,
* The value of *inlen after return is the number of octets consumed
* as the return value is positive, else unpredictiable.
*/
int
static int
UTF16BEToUTF8(unsigned char* out, int *outlen,
const unsigned char* inb, int *inlenb)
{
@ -773,7 +773,7 @@ UTF16BEToUTF8(unsigned char* out, int *outlen,
* Returns the number of byte written, or -1 by lack of space, or -2
* if the transcoding failed.
*/
int
static int
UTF8ToUTF16BE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
@ -1247,7 +1247,7 @@ static xmlCharEncodingHandlerPtr xmlDefaultCharEncodingHandler = NULL;
* Create and registers an xmlCharEncodingHandler.
* Returns the xmlCharEncodingHandlerPtr created (or NULL in case of error).
*/
xmlCharEncodingHandlerPtr
static xmlCharEncodingHandlerPtr
xmlNewCharEncodingHandler(const char *name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output) {
@ -1662,9 +1662,7 @@ xmlIconvWrapper(iconv_t cd,
char *icv_out = (char *) out;
int ret;
ret = iconv(cd,
&icv_in, &icv_inlen,
&icv_out, &icv_outlen);
ret = iconv(cd, &icv_in, &icv_inlen, &icv_out, &icv_outlen);
if (in != NULL) {
*inlen -= icv_inlen;
*outlen -= icv_outlen;
@ -1672,7 +1670,7 @@ xmlIconvWrapper(iconv_t cd,
*inlen = 0;
*outlen = 0;
}
if (icv_inlen != 0 || ret == (size_t) -1) {
if ((icv_inlen != 0) || (ret == -1)) {
#ifdef EILSEQ
if (errno == EILSEQ) {
return -2;