This file is indexed.

/usr/include/xview_private/ps_impl.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
/*      @(#)ps_impl.h 20.13 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.
 */

#ifndef _ps_impl_h_already_included
#define _ps_impl_h_already_included

/*
 * Internal structures for piece_stream implementation.
 *
 */

#				ifndef primal_DEFINED
#include <xview_private/primal.h>
#				endif
#				ifndef entity_stream_h_already_defined
#include <xview_private/es.h>
#				endif
#				ifndef suntool_finger_table_DEFINED
#include <xview_private/finger_tbl.h>
#				endif

typedef struct piece_object {
	Es_index	pos;
	unsigned int	length;
	Es_index	source_and_pos;
} Piece_object;
typedef Piece_object *Piece;
#define PIECES_IN_TABLE(_private)					\
	((Piece) (_private->pieces.seq))

struct piece_table_object {
	int		magic;
	Es_handle	parent, original, scratch;
#ifdef DEBUG
	Es_handle	shadow;
	char		shadow_buf[4096];
#endif
	Es_status	status;
	Xv_opaque	client_data;
	ft_object	pieces;
	int		current;		/* pieces[] with position */
	Es_index	position, length,	/* in piece_stream */
			last_write_plus_one,	/* in piece_stream */
			oldest_not_undone_mark,	/* in scratch */
			rec_insert, rec_start;	/* in scratch */
	int		rec_insert_len;
	Es_index	scratch_max_len,
			scratch_position,	/* valid iff s_m_l != INF */
			scratch_length;		/* valid iff s_m_l != INF */
	Es_ops		scratch_ops;		/* valid iff s_m_l != INF */
};
typedef struct piece_table_object *Piece_table;
#define	ABS_TO_REP(esh)	(Piece_table)esh->data
#define	PS_MAGIC	0x71625348
#define	CURRENT_NULL	0x7FFFFFFF
#define	SCRATCH_MIN_LEN	8096

#ifdef notdef
The original is read-only, the scratch is read-write-append.

The parent is usually NULL, unless this piece_table contains deleted pieces
that are being held in the trash bin.
#endif

/* The file format of the scratch source is defined by:
 *	file		::= records
 *	records		::= record records |
 *	record		::= pos_prev_rec flags replace
 *	pos_prev_rec	::= four_bytes
 *	flags		::= four_bytes
 *	replace		::= start stop_plus_one dp_count deleted_pieces insert
 *	dp_count	::= four_bytes
 *	insert		::= insert_length bytes_inserted
 *	insert_length	::= four_bytes
 *	start		::= four_bytes
 *	stop_plus_one	::= four_bytes
 *	four_bytes	::= BYTE BYTE BYTE BYTE
 *	bytes_inserted	::= BYTE bytes_inserted |
 *	deleted_pieces	::= deleted_piece deleted_pieces |
 *	deleted_piece	::= source_and_pos length
 *	source_and_pos	::= four_bytes
 *	length		::= four_bytes
 */
#define	PS_ALREADY_UNDONE	0x1
struct piece_record_header {
	unsigned long		pos_prev_rec, flags,
				start, stop_plus_one, dp_count;
};
struct deleted_piece {
	unsigned long		source_and_pos, length;
};


#define PS_LAST_PLUS_ONE(po_formal)					\
	((po_formal).pos+(po_formal).length)
#define PS_IS_AT_END(_private, _length, _index)				\
	(PIECES_IN_TABLE(_private)[_index].length == _length && (	\
	  _index+1 == _private->pieces.last_plus_one ||			\
	  PIECES_IN_TABLE(_private)[_index+1].pos == ES_INFINITY ))

#define	PS_SCRATCH	0x80000000
	/* The above bit flag is used to encode whether the source_and_pos
	 *   is in the original source or in the scratch source.
	 */
#define PS_MAKE_ORIGINAL_SANDP(pos_formal)				\
	((pos_formal) & (~PS_SCRATCH))
#define PS_SET_ORIGINAL_SANDP(piece_object_formal, pos_formal)		\
	(piece_object_formal).source_and_pos =				\
		PS_MAKE_ORIGINAL_SANDP(pos_formal)
#define PS_MAKE_SCRATCH_SANDP(pos_formal)				\
	((pos_formal) | PS_SCRATCH)
#define PS_SET_SCRATCH_SANDP(piece_object_formal, pos_formal)		\
	(piece_object_formal).source_and_pos =				\
		PS_MAKE_SCRATCH_SANDP(pos_formal)
#define PS_SET_SANDP(piece_object_formal, pos_formal, is_scratch)	\
	(piece_object_formal).source_and_pos = ((is_scratch) ?		\
		PS_MAKE_SCRATCH_SANDP(pos_formal) :			\
		PS_MAKE_ORIGINAL_SANDP(pos_formal))
#define PS_SANDP_SOURCE(po_formal)					\
	((po_formal).source_and_pos & PS_SCRATCH)
#define PS_SANDP_POS(po_formal)						\
	((po_formal).source_and_pos & (~PS_SCRATCH))


#define	SCRATCH_TO_REP(_scratch)					\
	ABS_TO_REP(((Es_handle)es_get(_scratch, ES_CLIENT_DATA)))
#define	SCRATCH_FIRST_VALID(_private)					\
	((_private)->scratch_length - (_private)->scratch_max_len)
#define	SCRATCH_HAS_WRAPPED(_private)					\
	((_private)->scratch_length > (_private)->scratch_max_len)

EXTERN_FUNCTION( caddr_t ps_get, (Es_handle esh, Es_attribute attribute, DOTDOTDOT ));

#endif