#include <grass/gis.h>
#include <grass/raster.h>

extern char *no_data_str;
extern int nfiles;
extern int nrows;
extern int ncols, no_nulls, no_nulls_all;
extern int nsteps, cat_ranges, raw_output, as_int, averaged;
extern int *is_fp;
extern DCELL *DMAX, *DMIN;

extern CELL NULL_CELL;
extern int (*get_row) ();

extern char fs[2];
extern struct Categories *labels;

/* cell_stats.c */
int cell_stats(int[], int, int, int, int, char *);

/* raw_stats.c */
int raw_stats(int[], int, int, int);

/* stats.c */
int initialize_cell_stats(int);
int allocate_values(void);
struct Node *NewNode(double);
void fix_max_fp_val(CELL *, int);
void reset_null_vals(CELL *, int);
int update_cell_stats(CELL **, int, double);
int node_compare(const void *, const void *);
int sort_cell_stats(void);
int print_node_count(void);
int print_cell_stats(char *, int, int, int, int, char *);
