Remove some redundant wrbuf_vp_puts alikes
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Apr 2014 08:36:37 +0000 (10:36 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Apr 2014 08:36:37 +0000 (10:36 +0200)
src/rpn2cql.c
src/rpn2solr.c
src/zoom-query.c

index 8a09212..3402ac9 100644 (file)
 #include <yaz/wrbuf.h>
 #include <yaz/logrpn.h> /* For yaz_prox_unit_name() */
 
-static void wrbuf_vputs(const char *buf, void *client_data)
-{
-    wrbuf_write((WRBUF) client_data, buf, strlen(buf));
-}
-
 static const char *lookup_index_from_string_attr(Z_AttributeList *attributes)
 {
     int j;
@@ -357,7 +352,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
                                 WRBUF w,
                                 Z_RPNQuery *q)
 {
-    return cql_transform_rpn2cql_stream(ct, wrbuf_vputs, w, q);
+    return cql_transform_rpn2cql_stream(ct, wrbuf_vp_puts, w, q);
 }
 
 /*
index c9143c7..13d0350 100644 (file)
 #include <yaz/z-core.h>
 #include <yaz/wrbuf.h>
 
-static void wrbuf_vputs(const char *buf, void *client_data)
-{
-    wrbuf_write((WRBUF) client_data, buf, strlen(buf));
-}
-
 static const char *lookup_index_from_string_attr(Z_AttributeList *attributes)
 {
     int j;
@@ -428,7 +423,7 @@ int solr_transform_rpn2solr_wrbuf(solr_transform_t ct,
                                   WRBUF w,
                                   Z_RPNQuery *q)
 {
-    return solr_transform_rpn2solr_stream(ct, wrbuf_vputs, w, q);
+    return solr_transform_rpn2solr_stream(ct, wrbuf_vp_puts, w, q);
 }
 
 /*
index 2fc197d..a9b0941 100644 (file)
@@ -136,12 +136,6 @@ Z_SortKeySpecList *ZOOM_query_get_sortspec(ZOOM_query s)
     return s->sort_strategy == SORT_STRATEGY_Z3950 ? s->sort_spec : 0;
 }
 
-static void cql2pqf_wrbuf_puts(const char *buf, void *client_data)
-{
-    WRBUF wrbuf = (WRBUF) client_data;
-    wrbuf_puts(wrbuf, buf);
-}
-
 const char *ZOOM_query_get_query_string(ZOOM_query s)
 {
     return wrbuf_cstr(s->full_query);
@@ -194,7 +188,7 @@ static char *cql2pqf(ZOOM_connection c, const char *cql)
     {
         WRBUF wrbuf_result = wrbuf_alloc();
         error = cql_transform(trans, cql_parser_result(parser),
-                              cql2pqf_wrbuf_puts, wrbuf_result);
+                              wrbuf_vp_puts, wrbuf_result);
         if (error != 0) {
             char buf[512];
             const char *addinfo;