Name .diff file differently
[yaz-moved-to-github.git] / test / tstpquery.c
index a3c0b25..ef4b43a 100644 (file)
@@ -1,8 +1,6 @@
-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
  * See the file LICENSE for details.
- *
- * $Id: tstpquery.c,v 1.2 2006-04-01 11:47:41 adam Exp $
  */
 
 #include <stdlib.h>
@@ -45,9 +43,9 @@ int expect_pqf(const char *pqf, const char *expect_pqf, int expect_error)
         {
             yaz_rpnquery_to_wrbuf(wrbuf, rpn);
             
-            if (!strcmp(wrbuf_buf(wrbuf), expect_pqf))
+            if (!strcmp(wrbuf_cstr(wrbuf), expect_pqf))
                 res = 1;
-            wrbuf_free(wrbuf, 1);
+            wrbuf_destroy(wrbuf);
         }
     }
     yaz_pqf_destroy(parser);
@@ -55,7 +53,7 @@ int expect_pqf(const char *pqf, const char *expect_pqf, int expect_error)
     return res;
 }
 
-static void tst()
+static void tst(void)
 {
     YAZ_CHECK(expect_pqf("a", "@attrset Bib-1 a", YAZ_PQF_ERROR_NONE));
     YAZ_CHECK(expect_pqf("@attr 1=4 a", "@attrset Bib-1 @attr 1=4 a", YAZ_PQF_ERROR_NONE));