Version 5.8.0
[yaz-moved-to-github.git] / util / srwtst.c
index cd10a51..e7411c5 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 #if HAVE_CONFIG_H
@@ -53,18 +53,7 @@ int main(int argc, char **argv)
             if (sr->which == Z_SRW_searchRetrieve_request)
             {
                 Z_SRW_searchRetrieveRequest *req = sr->u.request;
-                switch(req->query_type)
-                {
-                case Z_SRW_query_type_cql:
-                    fprintf(stderr, "CQL: %s\n", req->query.cql);
-                    break;
-                case Z_SRW_query_type_xcql:
-                    fprintf(stderr, "XCQL\n");
-                    break;
-                case Z_SRW_query_type_pqf:
-                    fprintf(stderr, "PQF: %s\n", req->query.pqf);
-                    break;
-                }
+                fprintf(stderr, "%s: %s\n", req->queryType, req->query);
             }
             else if (sr->which == Z_SRW_searchRetrieve_response)
             {