This file is indexed.

/usr/share/doc/xviewg/examples/panels/list_6_glyphs.c is in xview-examples 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
/*
 * list_6glyphs.c -- show a scrolling list with six items in it.
 * Each item is an icon (a pattern) and a string.  The scrolling
 * list displays three items.
 */
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/svrimage.h>

#define gray1_width 16
#define gray1_height 16
static u_char gray1_bits[] = 
{
    0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
    0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
    0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
    0xaa, 0xaa
};

#define gray2_width 16
#define gray2_height 16
static u_char gray2_bits[] = {
    0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x11, 0x11,
    0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
    0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x44, 0x44,
    0x00, 0x00
};

#define gray3_width 16
#define gray3_height 16
static u_char gray3_bits[] = {
    0x22, 0x22, 0xee, 0xee, 0x33, 0x33, 0xee, 0xee, 0x22, 0x22,
    0xee, 0xee, 0x33, 0x33, 0xee, 0xee, 0x22, 0x22, 0xee, 0xee,
    0x33, 0x33, 0xee, 0xee, 0x22, 0x22, 0xee, 0xee, 0x33, 0x33,
    0xee, 0xee
};

#define gray4_width 16
#define gray4_height 16
static u_char gray4_bits[] = {
    0xc3, 0xc3, 0xaa, 0xaa, 0xc3, 0xc3, 0xaa, 0xaa, 0xc3, 0xc3,
    0xaa, 0xaa, 0xc3, 0xc3, 0xaa, 0xaa, 0xc3, 0xc3, 0xaa, 0xaa,
    0xc3, 0xc3, 0xaa, 0xaa, 0xc3, 0xc3, 0xaa, 0xaa, 0xc3, 0xc3,
    0xaa, 0xaa
};

#define gray5_width 16
#define gray5_height 16
static u_char gray5_bits[] = {
    0xf5, 0xf5, 0x00, 0x00, 0x41, 0x41, 0x00, 0x00, 0xf5, 0xf5,
    0x00, 0x00, 0x41, 0x41, 0x00, 0x00, 0xf5, 0xf5, 0x00, 0x00,
    0x41, 0x41, 0x00, 0x00, 0xf5, 0xf5, 0x00, 0x00, 0x41, 0x41,
    0x00, 0x00
};

#define gray6_width 16
#define gray6_height 16
static u_char gray6_bits[] = {
    0x2d, 0x2d, 0xee, 0xee, 0xa5, 0xa5, 0xee, 0xee, 0x2d, 0x2d,
    0xee, 0xee, 0xa5, 0xa5, 0xee, 0xee, 0x2d, 0x2d, 0xee, 0xee,
    0xa5, 0xa5, 0xee, 0xee, 0x2d, 0x2d, 0xee, 0xee, 0xa5, 0xa5,
    0xee, 0xee
};

main(argc, argv)
int     argc;
char    *argv[];
{
    Frame       frame;
    Panel       panel;
    Server_image gray1, gray2, gray3, gray4, gray5, gray6;
    extern void exit(), which_glyph();

    xv_init(XV_INIT_ARGS, argc, argv, NULL);

    gray1 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray1_width,
        XV_HEIGHT,              gray1_height,
        SERVER_IMAGE_BITS,      gray1_bits,
        NULL);
    gray2 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray2_width,
        XV_HEIGHT,              gray2_height,
        SERVER_IMAGE_BITS,      gray2_bits,
        NULL);
    gray3 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray3_width,
        XV_HEIGHT,              gray3_height,
        SERVER_IMAGE_BITS,      gray3_bits,
        NULL);
    gray4 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray4_width,
        XV_HEIGHT,              gray4_height,
        SERVER_IMAGE_BITS,      gray4_bits,
        NULL);
    gray5 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray5_width,
        XV_HEIGHT,              gray5_height,
        SERVER_IMAGE_BITS,      gray5_bits,
        NULL);
    gray6 = (Server_image)xv_create(NULL, SERVER_IMAGE,
        XV_WIDTH,               gray6_width,
        XV_HEIGHT,              gray6_height,
        SERVER_IMAGE_BITS,      gray6_bits,
        NULL);
    frame = (Frame)xv_create(NULL, FRAME, 
	FRAME_LABEL,		argv[0],
	NULL);
    panel = (Panel)xv_create(frame, PANEL, NULL);

    (void) xv_create(panel, PANEL_BUTTON,
        PANEL_LABEL_STRING,     "quit",
        PANEL_NOTIFY_PROC,      exit,
        NULL);

    (void) xv_create(panel, PANEL_LIST,
        PANEL_LIST_ROW_HEIGHT,   16,
	PANEL_LIST_DISPLAY_ROWS,  3,
        PANEL_LIST_GLYPHS,       gray1, gray2, gray3, gray4, gray5, gray6, NULL,
        PANEL_LIST_STRINGS,      "Pattern1", "Pattern2", "Pattern3", "Pattern4", "Pattern5", "Pattern6", NULL,
        PANEL_LIST_CLIENT_DATAS, 1, 2, 3, NULL,
        PANEL_NOTIFY_PROC,       which_glyph,
        NULL);

    window_fit(panel);
    window_fit(frame);

    xv_main_loop(frame);
}

void
which_glyph(item, string, client_data, op, event)
Panel_item     item; /* panel list item */
char          *string;
caddr_t        client_data;
Panel_list_op  op;
Event         *event;
{
    printf("item = %s (#%d), op = %d\n", string, client_data, op);
}