X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=3c96d910da5fb20903a6b55b5f0046f12c7ffb92;hb=5038ee934566dcef1d366c32be2e54f53a0e4b99;hp=c4e7b49685a3556e7feec5339c18c4ab2c44f84b;hpb=b8b750a84e0c9f7253d210f9604e385bd84a7569;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index c4e7b49..3c96d91 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -1,16 +1,18 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** \file * \brief yaz-ztest Generic Frontend Server */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include -#include #if HAVE_SYS_TIME_H #include @@ -210,8 +212,8 @@ static void ztest_sleep(double d) Sleep( (DWORD) (d * 1000)); #else struct timeval tv; - tv.tv_sec = floor(d); - tv.tv_usec = (d - floor(d)) * 1000000; + tv.tv_sec = d; + tv.tv_usec = (d - (long) d) * 1000000; select(0, 0, 0, 0, &tv); #endif } @@ -1007,8 +1009,8 @@ int ztest_scan(void *handle, bend_scan_rr *q) strcpy(term, "0"); for (p = term; *p; p++) - if (islower(*(unsigned char *) p)) - *p = toupper(*p); + if (yaz_islower(*p)) + *p = yaz_toupper(*p); fseek(f, 0, SEEK_SET); q->num_entries = 0;