qof translation screwed up a couple of things

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8800 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2003-06-28 21:24:07 +00:00
parent 2bf5f33c44
commit 439e305550
3 changed files with 25 additions and 25 deletions

View File

@ -863,7 +863,7 @@ gnc_scm2KvpFrame (SCM frame_scm)
} }
static SCM static SCM
gnc_queryterm2scm (QofQueryTerm_t qt) gnc_queryterm2scm (QofQueryTerm *qt)
{ {
SCM qt_scm = SCM_EOL; SCM qt_scm = SCM_EOL;
QofQueryPredData *pd = NULL; QofQueryPredData *pd = NULL;
@ -1526,7 +1526,7 @@ gnc_query_terms2scm (GList *terms)
for (and_node = or_node->data; and_node; and_node = and_node->next) for (and_node = or_node->data; and_node; and_node = and_node->next)
{ {
QofQueryTerm_t qt = and_node->data; QofQueryTerm *qt = and_node->data;
SCM qt_scm; SCM qt_scm;
qt_scm = gnc_queryterm2scm (qt); qt_scm = gnc_queryterm2scm (qt);
@ -1625,7 +1625,7 @@ gnc_scm2query_or_terms (SCM or_terms, query_version_t vers)
} }
static SCM static SCM
gnc_query_sort2scm (QofSortFunc_t qs) gnc_query_sort2scm (QofQuerySort *qs)
{ {
SCM sort_scm = SCM_EOL; SCM sort_scm = SCM_EOL;
GSList *path; GSList *path;
@ -1698,11 +1698,11 @@ gnc_query_scm2sort (SCM sort_scm, GSList **path, gint *options, gboolean *inc)
} }
SCM SCM
gnc_query2scm (Query *q) gnc_query2scm (QofQuery *q)
{ {
SCM query_scm = SCM_EOL; SCM query_scm = SCM_EOL;
SCM pair; SCM pair;
QofSortFunc_t s1, s2, s3; QofQuerySort *s1, *s2, *s3;
if (!q) return SCM_BOOL_F; if (!q) return SCM_BOOL_F;

View File

@ -26,8 +26,8 @@
#include "qofquery.h" #include "qofquery.h"
typedef struct _QofQueryTerm *QofQueryTerm_t; typedef struct _QofQueryTerm QofQueryTerm;
typedef struct _QofSortFunc *QofSortFunc_t; typedef struct _QofQuerySort QofQuerySort;
/* Initialize/Shutdown */ /* Initialize/Shutdown */
void qof_query_init (void); void qof_query_init (void);
@ -49,9 +49,9 @@ int qof_query_get_max_results (QofQuery *q);
*/ */
GList * qof_query_get_terms (QofQuery *q); GList * qof_query_get_terms (QofQuery *q);
GSList * qof_query_term_get_param_path (QofQueryTerm_t queryterm); GSList * qof_query_term_get_param_path (QofQueryTerm *queryterm);
QofQueryPredData *qof_query_term_get_pred_data (QofQueryTerm_t queryterm); QofQueryPredData *qof_query_term_get_pred_data (QofQueryTerm *queryterm);
gboolean qof_query_term_is_inverted (QofQueryTerm_t queryterm); gboolean qof_query_term_is_inverted (QofQueryTerm *queryterm);
/* Functions to get and look at QuerySorts */ /* Functions to get and look at QuerySorts */
@ -59,11 +59,11 @@ gboolean qof_query_term_is_inverted (QofQueryTerm_t queryterm);
/* This function returns the primary, secondary, and tertiary sorts. /* This function returns the primary, secondary, and tertiary sorts.
* These are part of the query and should NOT be changed! * These are part of the query and should NOT be changed!
*/ */
void qof_query_get_sorts (QofQuery *q, QofSortFunc_t *primary, void qof_query_get_sorts (QofQuery *q, QofQuerySort **primary,
QofSortFunc_t *secondary, QofSortFunc_t *tertiary); QofQuerySort **secondary, QofQuerySort **tertiary);
GSList * qof_query_sort_get_param_path (QofSortFunc_t querysort); GSList * qof_query_sort_get_param_path (QofQuerySort *querysort);
gint qof_query_sort_get_sort_options (QofSortFunc_t querysort); gint qof_query_sort_get_sort_options (QofQuerySort *querysort);
gboolean qof_query_sort_get_increasing (QofSortFunc_t querysort); gboolean qof_query_sort_get_increasing (QofQuerySort *querysort);
#endif /* QOF_QUERY_P_H */ #endif /* QOF_QUERY_P_H */

View File

@ -44,7 +44,7 @@
static short module = MOD_QUERY; static short module = MOD_QUERY;
typedef struct _QofQueryTerm struct _QofQueryTerm
{ {
GSList * param_list; GSList * param_list;
QofQueryPredData *pdata; QofQueryPredData *pdata;
@ -57,9 +57,9 @@ typedef struct _QofQueryTerm
*/ */
GSList * param_fcns; GSList * param_fcns;
QofQueryPredicateFunc pred_fcn; QofQueryPredicateFunc pred_fcn;
} QofQueryTerm; };
typedef struct _QofSortFunc struct _QofQuerySort
{ {
GSList * param_list; GSList * param_list;
gint options; gint options;
@ -74,7 +74,7 @@ typedef struct _QofSortFunc
GSList * param_fcns; GSList * param_fcns;
QofSortFunc obj_cmp; /* In case you are comparing objects */ QofSortFunc obj_cmp; /* In case you are comparing objects */
QofCompareFunc comp_fcn; /* When you are comparing core types */ QofCompareFunc comp_fcn; /* When you are comparing core types */
} QofQuerySort; };
/* The QUERY structure */ /* The QUERY structure */
struct _QofQuery struct _QofQuery
@ -1205,21 +1205,21 @@ GList * qof_query_get_terms (QofQuery *q)
return q->terms; return q->terms;
} }
GSList * qof_query_term_get_param_path (QofQueryTerm_t qt) GSList * qof_query_term_get_param_path (QofQueryTerm *qt)
{ {
if (!qt) if (!qt)
return NULL; return NULL;
return qt->param_list; return qt->param_list;
} }
QofQueryPredData *qof_query_term_get_pred_data (QofQueryTerm_t qt) QofQueryPredData *qof_query_term_get_pred_data (QofQueryTerm *qt)
{ {
if (!qt) if (!qt)
return NULL; return NULL;
return qt->pdata; return qt->pdata;
} }
gboolean qof_query_term_is_inverted (QofQueryTerm_t qt) gboolean qof_query_term_is_inverted (QofQueryTerm *qt)
{ {
if (!qt) if (!qt)
return FALSE; return FALSE;
@ -1261,7 +1261,7 @@ gboolean qof_query_sort_get_increasing (QofQuerySort *qs)
} }
static gboolean static gboolean
qof_query_term_equal (QofQueryTerm_t qt1, QofQueryTerm_t qt2) qof_query_term_equal (QofQueryTerm *qt1, QofQueryTerm *qt2)
{ {
if (qt1 == qt2) return TRUE; if (qt1 == qt2) return TRUE;
if (!qt1 || !qt2) return FALSE; if (!qt1 || !qt2) return FALSE;
@ -1493,7 +1493,7 @@ static GList *
qof_query_printAndTerms (GList * terms, GList * output) qof_query_printAndTerms (GList * terms, GList * output)
{ {
const char *prefix = " AND Terms:"; const char *prefix = " AND Terms:";
QofQueryTerm_t qt; QofQueryTerm *qt;
QofQueryPredData *pd; QofQueryPredData *pd;
GSList *path; GSList *path;
GList *lst; GList *lst;
@ -1502,7 +1502,7 @@ qof_query_printAndTerms (GList * terms, GList * output)
output = g_list_append (output, g_string_new (prefix)); output = g_list_append (output, g_string_new (prefix));
for (lst = terms; lst; lst = lst->next) for (lst = terms; lst; lst = lst->next)
{ {
qt = (QofQueryTerm_t) lst->data; qt = (QofQueryTerm *) lst->data;
pd = qof_query_term_get_pred_data (qt); pd = qof_query_term_get_pred_data (qt);
path = qof_query_term_get_param_path (qt); path = qof_query_term_get_param_path (qt);
invert = qof_query_term_is_inverted (qt); invert = qof_query_term_is_inverted (qt);