1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_COLLECT_H_
3 # define _GNM_COLLECT_H_
11 COLLECT_IGNORE_STRINGS
= 0x01,
12 COLLECT_ZERO_STRINGS
= 0x02,
13 COLLECT_COERCE_STRINGS
= 0x04,
15 COLLECT_IGNORE_BOOLS
= 0x10,
16 COLLECT_ZEROONE_BOOLS
= 0x20,
18 COLLECT_IGNORE_ERRORS
= 0x100,
19 COLLECT_ZERO_ERRORS
= 0x200,
21 COLLECT_IGNORE_BLANKS
= 0x1000,
22 COLLECT_ZERO_BLANKS
= 0x2000,
24 COLLECT_IGNORE_SUBTOTAL
= 0x4000,
26 COLLECT_SORT
= 0x10000,
27 COLLECT_ORDER_IRRELEVANT
= 0x20000,
29 /* Not for general usage. */
30 COLLECT_INFO
= 0x1000000
33 typedef int (*float_range_function_t
) (gnm_float
const *xs
, int n
, gnm_float
*res
);
34 typedef int (*float_range_function2_t
) (gnm_float
const *xs
, gnm_float
const *ys
, int n
, gnm_float
*res
);
35 typedef int (*float_range_function2d_t
) (gnm_float
const *xs
, gnm_float
const *ys
, int n
, gnm_float
*res
, gpointer data
);
36 typedef int (*string_range_function_t
) (GPtrArray
*xs
, char**res
, gpointer user
);
38 gnm_float
*collect_floats_value (GnmValue
const *val
,
41 int *n
, GnmValue
**error
);
42 gnm_float
*collect_floats (int argc
, GnmExprConstPtr
const *argv
,
43 GnmEvalPos
const *ep
, CollectFlags flags
,
44 int *n
, GnmValue
**error
, GSList
**info
,
47 gnm_float
*collect_floats_value_with_info (GnmValue
const *val
, GnmEvalPos
const *ep
,
48 CollectFlags flags
, int *n
, GSList
**info
,
51 GnmValue
*collect_float_pairs (GnmValue
const *v0
, GnmValue
const *v1
,
52 GnmEvalPos
const *ep
, CollectFlags flags
,
53 gnm_float
**xs0
, gnm_float
**xs1
, int *n
,
56 GnmValue
*float_range_function (int argc
, GnmExprConstPtr
const *argv
,
58 float_range_function_t func
,
60 GnmStdError func_error
);
62 GnmValue
*float_range_function2 (GnmValue
const *val0
, GnmValue
const *val1
,
64 float_range_function2_t func
,
66 GnmStdError func_error
);
68 GnmValue
*float_range_function2d (GnmValue
const *val0
, GnmValue
const *val1
,
70 float_range_function2d_t func
,
72 GnmStdError func_error
,
75 GnmValue
*string_range_function (int argc
, GnmExprConstPtr
const *argv
,
77 string_range_function_t func
,
80 GnmStdError func_error
);
82 GSList
*gnm_slist_sort_merge (GSList
* list_1
, GSList
* list_2
);
84 void gnm_strip_missing (gnm_float
* data
, int *p
, GSList
*missing
);
89 #endif /* _GNM_COLLECT_H_ */