mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +03:00
minor cleanup for various compilation warnings (AIX as well as gcc)
* libxslt/numbers.c, libxslt/extensions.c, libexslt/date.c, python/libxslt.c, xsltproc/xsltproc.c: minor cleanup for various compilation warnings (AIX as well as gcc)
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Sat Sep 27 18:42:57 PDT 2003 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
|
* libxslt/numbers.c, libxslt/extensions.c, libexslt/date.c,
|
||||||
|
python/libxslt.c, xsltproc/xsltproc.c: minor cleanup for
|
||||||
|
various compilation warnings (AIX as well as gcc)
|
||||||
|
|
||||||
Sat Sep 27 17:29:43 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
Sat Sep 27 17:29:43 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libexslt/saxon.c: applied patch from Brett Kail to implement
|
* libexslt/saxon.c: applied patch from Brett Kail to implement
|
||||||
|
@ -77,7 +77,7 @@ struct _exsltDateValDate {
|
|||||||
unsigned int hour :5; /* 0 <= hour <= 23 */
|
unsigned int hour :5; /* 0 <= hour <= 23 */
|
||||||
unsigned int min :6; /* 0 <= min <= 59 */
|
unsigned int min :6; /* 0 <= min <= 59 */
|
||||||
double sec;
|
double sec;
|
||||||
int tz_flag :1; /* is tzo explicitely set? */
|
unsigned int tz_flag :1; /* is tzo explicitely set? */
|
||||||
int tzo :11; /* -1440 <= tzo <= 1440 */
|
int tzo :11; /* -1440 <= tzo <= 1440 */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -147,8 +147,12 @@ static const unsigned long daysInMonthLeap[12] =
|
|||||||
#define VALID_DATE(dt) \
|
#define VALID_DATE(dt) \
|
||||||
(VALID_YEAR(dt->year) && VALID_MONTH(dt->mon) && VALID_MDAY(dt))
|
(VALID_YEAR(dt->year) && VALID_MONTH(dt->mon) && VALID_MDAY(dt))
|
||||||
|
|
||||||
|
/*
|
||||||
|
hour and min structure vals are unsigned, so normal macros give
|
||||||
|
warnings on some compilers.
|
||||||
|
*/
|
||||||
#define VALID_TIME(dt) \
|
#define VALID_TIME(dt) \
|
||||||
(VALID_HOUR(dt->hour) && VALID_MIN(dt->min) && \
|
((dt->hour <=23 ) && (dt->min <= 59) && \
|
||||||
VALID_SEC(dt->sec) && VALID_TZO(dt->tzo))
|
VALID_SEC(dt->sec) && VALID_TZO(dt->tzo))
|
||||||
|
|
||||||
#define VALID_DATETIME(dt) \
|
#define VALID_DATETIME(dt) \
|
||||||
|
@ -331,9 +331,7 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style,
|
|||||||
|
|
||||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||||
if (module != NULL) {
|
if (module != NULL) {
|
||||||
xsltExtDataPtr data;
|
xsltStyleGetExtData(style, URI);
|
||||||
|
|
||||||
data = xsltStyleGetExtData(style, URI);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
|
@ -215,7 +215,7 @@ xsltNumberFormatDecimal(xmlBufferPtr buffer,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pointer -= len;
|
pointer -= len;
|
||||||
strncpy((char *)pointer, (const char *)temp_char, len);
|
memcpy(pointer, temp_char, len);
|
||||||
}
|
}
|
||||||
number /= 10.0;
|
number /= 10.0;
|
||||||
++i;
|
++i;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
|
#include "libexslt/exslt.h"
|
||||||
#include "libxslt_wrap.h"
|
#include "libxslt_wrap.h"
|
||||||
#include "libxslt-py.h"
|
#include "libxslt-py.h"
|
||||||
|
|
||||||
|
@ -441,16 +441,15 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename) {
|
|||||||
|
|
||||||
xmlFreeDoc(res);
|
xmlFreeDoc(res);
|
||||||
} else {
|
} else {
|
||||||
int ret;
|
|
||||||
|
|
||||||
ctxt = xsltNewTransformContext(cur, doc);
|
ctxt = xsltNewTransformContext(cur, doc);
|
||||||
if (ctxt == NULL)
|
if (ctxt == NULL)
|
||||||
return;
|
return;
|
||||||
if (profile) {
|
if (profile) {
|
||||||
ret = xsltRunStylesheetUser(cur, doc, params, output,
|
xsltRunStylesheetUser(cur, doc, params, output,
|
||||||
NULL, NULL, stderr, ctxt);
|
NULL, NULL, stderr, ctxt);
|
||||||
} else {
|
} else {
|
||||||
ret = xsltRunStylesheetUser(cur, doc, params, output,
|
xsltRunStylesheetUser(cur, doc, params, output,
|
||||||
NULL, NULL, NULL, ctxt);
|
NULL, NULL, NULL, ctxt);
|
||||||
}
|
}
|
||||||
if (ctxt->state == XSLT_STATE_ERROR)
|
if (ctxt->state == XSLT_STATE_ERROR)
|
||||||
@ -644,12 +643,10 @@ main(int argc, char **argv)
|
|||||||
(!strcmp(argv[i], "--stringparam"))) {
|
(!strcmp(argv[i], "--stringparam"))) {
|
||||||
const xmlChar *string;
|
const xmlChar *string;
|
||||||
xmlChar *value;
|
xmlChar *value;
|
||||||
int len;
|
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
params[nbparams++] = argv[i++];
|
params[nbparams++] = argv[i++];
|
||||||
string = (const xmlChar *) argv[i];
|
string = (const xmlChar *) argv[i];
|
||||||
len = xmlStrlen(string);
|
|
||||||
if (xmlStrchr(string, '"')) {
|
if (xmlStrchr(string, '"')) {
|
||||||
if (xmlStrchr(string, '\'')) {
|
if (xmlStrchr(string, '\'')) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
Reference in New Issue
Block a user