This file is indexed.

/usr/include/xview/rect.h is in xviewg-dev 3.2p1.4-28.1.

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
133
134
135
136
137
138
139
140
141
142
143
144
/*	@(#)rect.h 20.20 93/06/28 SMI	*/

/*
 *	(c) Copyright 1989 Sun Microsystems, Inc. Sun design patents 
 *	pending in the U.S. and foreign countries. See LEGAL NOTICE 
 *	file for terms of the license.
 */

/*
 * Defines the interface to the geometric object
 * called a Rect which is a rectangle.
 */

#ifndef xview_rect_DEFINED
#define xview_rect_DEFINED

#include <xview/xv_c_types.h>

/*
 ***********************************************************************
 *			Definitions and Macros
 ***********************************************************************
 */

/*
 * PUBLIC #defines
 */

#define	RECT_NULL	((Rect *)0)

#ifndef coord
#define coord	short
#endif

/*
 * Rectangle sort ordering.
 */
#define	RECTS_TOPTOBOTTOM	0
#define	RECTS_BOTTOMTOTOP	1
#define	RECTS_LEFTTORIGHT	2
#define	RECTS_RIGHTTOLEFT	3

#define	RECTS_UNSORTED		-1
#define	RECTS_SORTS		4

/*
 * Rect Geometry macros
 */
#define	rect_right(rect)  	((rect)->r_left+(rect)->r_width-1)
#define	rect_bottom(rect) 	((rect)->r_top+(rect)->r_height-1)

#define rect_print(rect) 							\
        (void)fprintf(stderr,"[left: %d, top: %d, width: %d, height: %d]\n",	\
            (rect)->r_left, (rect)->r_top, (rect)->r_width, (rect)->r_height)

#define rect_marginadjust(r,m) 				\
	{ (r)->r_left-=(m);(r)->r_top-=(m); 		\
	 (r)->r_width+=(m)+(m);(r)->r_height+=(m)+(m);}

#define rect_borderadjust(r,m) 				\
	{ (r)->r_width+=(m)+(m);(r)->r_height+=(m)+(m);}

#define rect_construct(r,x,y,w,h) \
	{(r)->r_left=(x);(r)->r_top=(y);(r)->r_width=(w);(r)->r_height=(h);}

/*
 * Rect Predicate macros
 */
#define rect_equal(r1,r2) \
	((r1)->r_left==(r2)->r_left && (r1)->r_width==(r2)->r_width && \
	 (r1)->r_top==(r2)->r_top && (r1)->r_height==(r2)->r_height)

#define rect_sizes_differ(r1, r2) \
        ((r1)->r_width != (r2)->r_width || (r1)->r_height != (r2)->r_height)

#define rect_isnull(r)		((r)->r_width == 0 || (r)->r_height == 0)

#define rect_includespoint(r,x,y) \
	((x) >= (r)->r_left && (y) >= (r)->r_top && \
	 (x)<(r)->r_left+(r)->r_width && (y)<(r)->r_top+(r)->r_height)

#define rect_includesrect(r1, r2) \
	((r1)->r_left <= (r2)->r_left && (r1)->r_top <= (r2)->r_top && \
	 (r1)->r_left+(r1)->r_width >= (r2)->r_left+(r2)->r_width && \
	 (r1)->r_top+(r1)->r_height >= (r2)->r_top+(r2)->r_height)

#define rect_intersectsrect(r1,r2) \
	((r1)->r_left<(r2)->r_left+(r2)->r_width && \
	 (r1)->r_top<(r2)->r_top+(r2)->r_height &&  \
	 (r2)->r_left<(r1)->r_left+(r1)->r_width && \
	 (r2)->r_top<(r1)->r_top+(r1)->r_height)

/*
 * Rect Transformation macros used for passing rects up/down embedded
 * coordinate systems.
 */
#define	rect_passtoparent(x,y,rect) \
	{(rect)->r_left=(rect)->r_left+(x); (rect)->r_top=(rect)->r_top+(y);}

#define	rect_passtochild(x,y,rect) \
	{(rect)->r_left=(rect)->r_left-(x); (rect)->r_top=(rect)->r_top-(y);}

/*
 ***********************************************************************
 *		Typedefs, Enumerations, and Structures
 ***********************************************************************
 */

/*
 * PUBLIC structures 
 */

typedef struct rect {
	coord	r_left, r_top;
	short	r_width, r_height;
} Rect;

/*
 ***********************************************************************
 *				Globals
 ***********************************************************************
 */

/*
 * PUBLIC variables 
 */
extern	struct rect 	rect_null;

/*
 * PUBLIC Functions
 */

EXTERN_FUNCTION (struct rect rect_bounding, (Rect *r1, Rect *r2));
EXTERN_FUNCTION (unsigned rect_clipvector, (Rect *rect, int *x1arg, int *y1arg, int *x2arg, int *y2arg));
EXTERN_FUNCTION (unsigned rect_order, (Rect *rl, Rect *r2, int sortorder));
EXTERN_FUNCTION (int rect_right_of, (Rect *rect1, Rect *rect2));
EXTERN_FUNCTION (int rect_below, (Rect *rect1, Rect *rect2));
#ifdef _OTHER_RECT_FUNCTIONS

EXTERN_FUNCTION (void rect_intersection, (Rect *rl, Rect *r2, Rect *r));
EXTERN_FUNCTION (int rect_distance, (Rect *rect, int x, int y, int * x_used, int * y_used));
#endif /* _OTHER_RECT_FUNCTIONS */

#endif /* ~xview_rect_DEFINED */