mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +03:00
small fix cleanup avoid a problem with $(TESTS) augmented the wrappers
* xsltproc/xsltproc.c: small fix * Makefile.am: cleanup * python/tests/Makefile.am: avoid a problem with $(TESTS) * python/generator.py python/libxml_wrap.h python/libxsl.py python/libxslt.c python/libxsltclass.txt: augmented the wrappers * python/tests/pyxsltproc.py: rewrote xsltproc on top of the libxslt-python API to get an estimate of what is missing Daniel
This commit is contained in:
@ -114,7 +114,7 @@ static int errorno = 0;
|
||||
*/
|
||||
|
||||
#if defined(HAVE_GETTIMEOFDAY)
|
||||
static struct timeval begin, end;
|
||||
static struct timeval begin, endtime;
|
||||
/*
|
||||
* startTimer: call where you want to start timing
|
||||
*/
|
||||
@ -132,10 +132,10 @@ static void endTimer(const char *format, ...)
|
||||
long msec;
|
||||
va_list ap;
|
||||
|
||||
gettimeofday(&end, NULL);
|
||||
msec = end.tv_sec - begin.tv_sec;
|
||||
gettimeofday(&endtime, NULL);
|
||||
msec = endtime.tv_sec - begin.tv_sec;
|
||||
msec *= 1000;
|
||||
msec += (end.tv_usec - begin.tv_usec) / 1000;
|
||||
msec += (endtime.tv_usec - begin.tv_usec) / 1000;
|
||||
|
||||
#ifndef HAVE_STDARG_H
|
||||
#error "endTimer required stdarg functions"
|
||||
@ -153,7 +153,7 @@ static void endTimer(const char *format, ...)
|
||||
* that.
|
||||
*/
|
||||
|
||||
clock_t begin, end;
|
||||
clock_t begin, endtime;
|
||||
static void startTimer(void)
|
||||
{
|
||||
begin=clock();
|
||||
@ -163,8 +163,8 @@ static void endTimer(char *format, ...)
|
||||
long msec;
|
||||
va_list ap;
|
||||
|
||||
end=clock();
|
||||
msec = ((end-begin) * 1000) / CLOCKS_PER_SEC;
|
||||
endtime=clock();
|
||||
msec = ((endtime-begin) * 1000) / CLOCKS_PER_SEC;
|
||||
|
||||
#ifndef HAVE_STDARG_H
|
||||
#error "endTimer required stdarg functions"
|
||||
@ -536,6 +536,11 @@ main(int argc, char **argv)
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
if ((!strcmp(argv[i], "-stringparam")) ||
|
||||
(!strcmp(argv[i], "--stringparam"))) {
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
|
||||
if (timing)
|
||||
startTimer();
|
||||
|
Reference in New Issue
Block a user