mirror of https://github.com/djcb/mu.git
* mu-query: take a char** instead of a gslist
This commit is contained in:
parent
7dc44abd9d
commit
3a7d6dfd34
|
@ -157,12 +157,12 @@ print_rows (MuQueryXapian *xapian, const gchar *query, MuConfigOptions *opts)
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
do_output (MuQueryXapian *xapian, GSList *args, MuConfigOptions* opts)
|
do_output (MuQueryXapian *xapian, MuConfigOptions* opts, gchar **params)
|
||||||
{
|
{
|
||||||
gchar *query;
|
gchar *query;
|
||||||
gboolean retval = TRUE;
|
gboolean retval = TRUE;
|
||||||
|
|
||||||
query = mu_query_xapian_combine (args, FALSE);
|
query = mu_query_xapian_combine (params, FALSE);
|
||||||
|
|
||||||
/* if xquery is set, we print the xapian query instead of the
|
/* if xquery is set, we print the xapian query instead of the
|
||||||
* output; this is for debugging purposes */
|
* output; this is for debugging purposes */
|
||||||
|
@ -179,7 +179,7 @@ do_output (MuQueryXapian *xapian, GSList *args, MuConfigOptions* opts)
|
||||||
|
|
||||||
|
|
||||||
MuResult
|
MuResult
|
||||||
mu_query_run (MuConfigOptions *opts, GSList *args)
|
mu_query_run (MuConfigOptions *opts, gchar **params)
|
||||||
{
|
{
|
||||||
MuQueryXapian *xapian;
|
MuQueryXapian *xapian;
|
||||||
MuResult rv;
|
MuResult rv;
|
||||||
|
@ -192,7 +192,7 @@ mu_query_run (MuConfigOptions *opts, GSList *args)
|
||||||
if (!xapian)
|
if (!xapian)
|
||||||
return MU_ERROR;
|
return MU_ERROR;
|
||||||
|
|
||||||
rv = do_output (xapian, args, opts) ? 0 : 1;
|
rv = do_output (xapian, opts, params) ? 0 : 1;
|
||||||
|
|
||||||
mu_query_xapian_destroy (xapian);
|
mu_query_xapian_destroy (xapian);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "mu-config.h"
|
#include "mu-config.h"
|
||||||
|
|
||||||
MuResult mu_query_run (MuConfigOptions *opts, GSList *args);
|
MuResult mu_query_run (MuConfigOptions *opts, gchar **params);
|
||||||
|
|
||||||
#endif /*__MU_QUERY_H__*/
|
#endif /*__MU_QUERY_H__*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue