This file is indexed.

/usr/include/libspreadsheet-1.12/spreadsheet/ranges.h is in gnumeric 1.12.32-1+b1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _GNM_RANGES_H_
# define _GNM_RANGES_H_

#include "gnumeric.h"
#include <glib-object.h>

G_BEGIN_DECLS

/**
 * range_equal:
 * @a: First range
 * @b: Second range
 *
 * NB. commutative, symmetric, and transitive.
 *
 * Returns: True if both ranges are equal.
 **/
#define range_equal(a,b)   ((a)->start.row == (b)->start.row && \
			    (a)->end.row   == (b)->end.row && \
			    (a)->start.col == (b)->start.col && \
			    (a)->end.col   == (b)->end.col)

GType	  gnm_range_get_type (void); /* GBoxedType */
GnmRange *gnm_range_dup	  (GnmRange const *r);
gboolean  gnm_range_equal (GnmRange const *a, GnmRange const *b);
int       gnm_range_compare (GnmRange const *a, GnmRange const *b);

/**
 * range_overlap:
 * @a: First range
 * @b: Second range
 *
 * NB. commutative, symmetric, but not transitive.
 *
 * Returns: True if the ranges overlap at all.
 **/
#define range_overlap(a,b) (((a)->end.row >= (b)->start.row) && \
			    ((b)->end.row >= (a)->start.row) && \
			    ((a)->end.col >= (b)->start.col) && \
			    ((b)->end.col >= (a)->start.col))

/**
 * range_contains:
 * @r:   range to operate on
 * @x:   column,
 * @y:   row co-ordinate
 *
 * Determine if a range contains a col,row co-ordinate.
 *
 * Return value: TRUE if co-ordinate contained.
 **/
#define range_contains(r,x,y)	(((y) <= (r)->end.row) && \
				 ((y) >= (r)->start.row) && \
				 ((x) >= (r)->start.col) && \
				 ((x) <= (r)->end.col))

/*
 * Quickly Test if a range is valid
 */
#define range_valid(r)          ((r)->start.col <= (r)->end.col && \
				 (r)->start.row <= (r)->end.row)

#define range_fragment_free(f) g_slist_free_full ((f), g_free)

GnmRange   *range_init_full_sheet   (GnmRange *r, Sheet const *sheet);
GnmRange   *range_init_cols   	    (GnmRange *r, Sheet const *sheet,
				     int start_col, int end_col);
GnmRange   *range_init_rows         (GnmRange *r, Sheet const *sheet,
				     int start_row, int end_row);
GnmRange   *range_init_invalid	    (GnmRange *r);
GnmRange   *range_init_rangeref	    (GnmRange *r, GnmRangeRef const *rr);
GnmRange   *range_init_value	    (GnmRange *r, GnmValue const *v);
GnmRange   *range_init_cellpos	    (GnmRange *r, GnmCellPos const *pos);
GnmRange   *range_init_cellpos_size (GnmRange *r, GnmCellPos const *start,
				     int cols, int rows);
GnmRange   *range_init              (GnmRange *r, int start_col, int start_row,
				     int end_col, int end_row);
gboolean    range_parse 	    (GnmRange *r, char const *text,
				     GnmSheetSize const *ss);

void        range_list_destroy      (GSList *ranges);

int	    range_width		(GnmRange const *r);
int	    range_height	(GnmRange const *r);
gboolean    range_is_singleton  (GnmRange const *r);
gboolean    range_is_full	(GnmRange const *r, Sheet const *sheet, gboolean horiz);
void        range_clip_to_finite(GnmRange *range, Sheet *sheet);
gboolean    range_contained     (GnmRange const *a, GnmRange const *b);
gboolean    range_intersection  (GnmRange *r,
				 GnmRange const *a,
				 GnmRange const *b);
void        range_normalize     (GnmRange *src);
GnmRange    range_union         (GnmRange const *a, GnmRange const *b);
void        range_ensure_sanity (GnmRange *range, Sheet const *sheet);
gboolean    range_is_sane	(GnmRange const *range);
gboolean    range_translate     (GnmRange *range, Sheet const *sheet,
				 int col_offset, int row_offset);
gboolean    range_transpose     (GnmRange *range, Sheet const *sheet,
				 GnmCellPos const *origin);

char const *range_as_string	(GnmRange const *r);
void        range_dump		(GnmRange const *r, char const *suffix);

GSList     *range_split_ranges    (GnmRange const *hard, GnmRange const *soft);
GSList     *range_fragment        (GnmRange const *a, GnmRange const *b);

GType	       gnm_sheet_range_get_type   (void); /* GBoxedType */
GnmSheetRange *gnm_sheet_range_new	  (Sheet *sheet, GnmRange const *r);
void           gnm_sheet_range_free       (GnmSheetRange *r);
gboolean       gnm_sheet_range_from_value (GnmSheetRange *r, GnmValue const *v);
gboolean       gnm_sheet_range_overlap    (GnmSheetRange const *a, GnmSheetRange const *b);
GnmSheetRange *gnm_sheet_range_dup	  (GnmSheetRange const *sr);
gboolean       gnm_sheet_range_equal      (GnmSheetRange const *a,
					   GnmSheetRange const *b);

char	      *global_range_name	  (Sheet const *sheet, GnmRange const *r);
char	      *undo_cell_pos_name	  (Sheet const *sheet, GnmCellPos const *pos);
char	      *undo_range_name		  (Sheet const *sheet, GnmRange const *r);
char	      *undo_range_list_name	  (Sheet const *sheet, GSList const *ranges);

GSList	      *global_range_list_parse    (Sheet *sheet, char const *str);
GnmValue      *global_range_list_foreach  (GSList *gr_list, GnmEvalPos const *ep,
					   CellIterFlags	flags,
					   CellIterFunc	handler,
					   gpointer	closure);
gboolean       global_range_contained	  (Sheet const *sheet,
					   GnmValue const *a, GnmValue const *b);

G_END_DECLS

#endif /* _GNM_RANGES_H_ */