This file is indexed.

/usr/include/styx/otab.h is in styx-dev 2.0.1-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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
/* ------------------------------------------------------------------------ */
/*                                                                          */
/* [otab.h]                 Type: Operational Table                         */
/*                                                                          */
/* Copyright (c) 1993 by D\olle, Manns                                      */
/* ------------------------------------------------------------------------ */

/* File generated by 'ctoh'. Don't change manually. */

#ifndef otab_INCL
#define otab_INCL


#include "standard.h"
#include "prim.h"      /* for primitive types */


#ifdef __cplusplus
extern "C" {
#endif


/* --------------------- Types -------------------------------------------- */

/*  
   This module implements a dynamic array as operational table data type.
   The internal element vector will be automatically resized on element
   insertion and disposal.
*/

AbstractType(OT_Tab);  /* Abstract operational table type */
AbstractType(OT_Obj);  /* Abstract table element type     */
AbstractType(OT_Objs); /* Abstract element vector type    */

#define ROW(type)      OT_Tab

/* ---------------------- Creation and basic access ------------------------- */

OT_Tab OT_create
       (                                         /* function parameter:  */
         OT_Obj (*copy)(OT_Obj obj),             /* copies an element    */
         void (*del)(OT_Obj obj),                /* frees an element     */
         c_bool (*equal)(OT_Obj lobj, OT_Obj robj) /* equality on elements */
       )
#define OT_CREATE(type,cpy,del,equ)                 \
        OT_create                                   \
        (                                           \
          (OT_Obj (*)(OT_Obj obj))             cpy, \
          (void (*)(OT_Obj obj))               del, \
          (c_bool (*)(OT_Obj lobj, OT_Obj robj)) equ  \
        )
#define OT_CREATE_ADT(type) OT_CREATE(type,primCopy,primFree,primEqual)
/** creates an operational table */
;

OT_Tab OT_cfill
       (                                          /* function parameter:    */
         OT_Obj (*copy)(OT_Obj obj),              /* copies an element      */
         void (*del)(OT_Obj obj),                 /* frees an element       */
         c_bool (*equal)(OT_Obj lobj, OT_Obj robj), /* equality on elements   */
         OT_Obj dftval,                           /* default value          */
         INT ntimes                               /* initial element number */
       )
#define OT_CFILL(type,cpy,del,equ,dft,n)            \
        OT_cfill                                    \
        (                                           \
          (OT_Obj (*)(OT_Obj obj))             cpy, \
          (void (*)(OT_Obj obj))               del, \
          (c_bool (*)(OT_Obj lobj, OT_Obj robj)) equ, \
          (OT_Obj)dft,                              \
          (n)                                       \
        )
#define OT_CFILL_ADT(type,d,n) OT_CFILL(type,primCopy,primFree,primEqual,d,n)
#define OT_INJECT_ADT(type,d) OT_CFILL(type,primCopy,primFree,primEqual,d,1)
/** creates and fills an operational table ntimes with the value 'dftval' */
;

void OT_init(OT_Tab tab)
#define OT_INIT OT_init
/* resets / initializes table 'tab' */
;

INT OT_cnt(OT_Tab tab)
#define OT_CNT OT_cnt
/* number of elements in table 'tab' */
;


/* ------------------------- Insert & Update -------------------------------- */

INT OT_t_ins(OT_Tab tab, OT_Obj obj)
#define OT_T_INS(tab,obj) OT_t_ins(tab,ABS_CAST(OT_Obj,obj))
/* inserts 'obj' as last element of table 'tab'
   result = element index
*/
;

INT OT_p_ins(OT_Tab tab, OT_Obj obj, INT nth)
#define OT_P_INS(tab,obj,nth) OT_p_ins(tab,ABS_CAST(OT_Obj,obj),nth)
/* inserts 'obj' as nth element of table 'tab' ( nth >= 1 )
   result = element index
*/
;

INT OT_s_ins
    (
      OT_Tab tab,OT_Obj obj,int (*cmp3)(OT_Obj lobj, OT_Obj robj),c_bool unique
    )
#define OT_S_INS(tab,obj,cmp3)                      \
        OT_s_ins                                    \
        (                                           \
          tab,                                      \
          ABS_CAST(OT_Obj,obj),                     \
          (int (*)(OT_Obj lobj, OT_Obj robj)) cmp3, \
          C_False                                     \
        )
#define OT_S_INS_U(tab,obj,cmp3)                    \
        OT_s_ins                                    \
        (                                           \
          tab,                                      \
          ABS_CAST(OT_Obj,obj),                     \
          (int (*)(OT_Obj lobj, OT_Obj robj)) cmp3, \
          C_True                                      \
        )
/* inserts element 'obj' in table 'tab' ( sorted )
   unique --> no insert if the element exists
   result = element index
*/
;

OT_Obj OT_upd(OT_Tab tab, INT idx, OT_Obj obj)
#define OT_UPD(type,tab,idx,obj) \
        ( ABS_CAST(type,OT_upd(tab,(idx),ABS_CAST(OT_Obj,obj))) )
/* updates table element tab[idx] with 'obj' */
;


/* --------------------------- Copy & Append ------------------------------- */

OT_Objs OT_copyV(OT_Tab tab, INT size, StdCPtr (*cfun)(OT_Obj obj))
#define OT_COPY_V(type,tab,sz,fun) \
        ( ABS_CAST(type,OT_copyV(tab,(sz),(StdCPtr (*)(OT_Obj obj)) fun)) )
/* copies elements of table 'tab' to an array
   assertion: elements of constant size
*/
;

OT_Tab OT_reverse(OT_Tab tab)
#define OT_REVERSE OT_reverse
/* reverses elements in table 'tab' ( not copied ) */
;

OT_Tab OT_copy(OT_Tab tab)
#define OT_COPY OT_copy
/* copies table 'tab' */
;

OT_Tab OT_append(OT_Tab dst, OT_Tab src)
#define OT_APPEND OT_append
/* appends table 'src' to table 'dst'; 'src' won't be removed */
;


/* -------------------------- Get / Sort & Search --------------------------- */

OT_Obj __HUGE* OT_TRICKY_objects(OT_Tab tab)
/* internal element array of table 'tab' ( use with care ! ) */
;

OT_Obj OT_get(OT_Tab tab, INT idx)
#define OT_GET(type,tab,idx)       ( ABS_CAST(type,OT_get(tab,(idx))) )
#define OT_GET_I(type,t,it,idx)    OT_GET(type,t,OT_GET(INT,it,(idx)))
#define OT_GET_small(type,tab,idx) ( (type)((long)OT_get(tab,(idx))) )
#define OT_GET_short(tab,idx)      ( (short)((long)OT_get(tab,(idx))) )
/* table element tab[idx] */
;

INT OT_l_find(OT_Tab tab, OT_Obj obj, c_bool (*cmp)(OT_Obj tobj, OT_Obj obj))
#define OT_L_FIND_EQ(tab,obj)  \
        OT_l_find(tab,ABS_CAST(OT_Obj,obj),(c_bool (*)(OT_Obj tobj, OT_Obj Obj))NULL)
#define OT_L_FIND(tab,obj,cmp) \
        OT_l_find(tab,ABS_CAST(OT_Obj,obj),(c_bool (*)(OT_Obj tobj, OT_Obj Obj)) cmp)
/* position of key element 'obj' in table 'tab' or 0 ( linear search ) */
;

OT_Tab OT_sort(OT_Tab tab, int (*cmp3)(OT_Obj lobj, OT_Obj robj))
#define OT_SORT(tab,cmp3) \
        OT_sort(tab,(int (*)(OT_Obj lobj, OT_Obj robj)) cmp3)
/* sorts table 'tab' ( quicksort method )
   result = index table
*/
;

INT OT_b_find
    (
      OT_Tab tab,OT_Tab idxtab,OT_Obj obj,int (*cmp3)(OT_Obj lobj, OT_Obj robj)
    )
#define OT_B_FIND_NI(tab,obj,cmp3)                 \
        OT_b_find                                  \
        (                                          \
          tab,(OT_Tab)NULL,ABS_CAST(OT_Obj,obj),   \
          (int (*)(OT_Obj lobj, OT_Obj robj)) cmp3 \
        )
#define OT_B_FIND(tab,itab,obj,cmp3)               \
        OT_b_find                                  \
        (                                          \
          tab,itab,ABS_CAST(OT_Obj,obj),           \
          (int (*)(OT_Obj lobj, OT_Obj robj)) cmp3 \
        )
/* position of key element 'obj' in table 'tab' or 0 ( binary search )
   Optional the index table 'idxtab' specifies the sort order.
*/
;


/* ------------------------------ Delete ------------------------------------ */

void OT_delH(OT_Tab tab)
#define OT_DEL_H OT_delH
/* removes header of table 'tab' */
;

void OT_delT(OT_Tab tab)
#define OT_DEL_T OT_delT
/* removes table 'tab' */
;

void OT_delE(OT_Tab tab, INT idx)
#define OT_DEL_E OT_delE
/* removes table element tab[idx] */
;

void OT_delES(OT_Tab tab, INT idx, INT cnt)
#define OT_DEL_ES OT_delES
/* removes 'cnt' elements from table 'tab' beginning at index 'idx' */
;

void OT_clear(OT_Tab tab)
#define OT_CLEAR OT_clear
/* clears table 'tab'; removes all elements */
;


/* ----------------------------- Printing ----------------------------------- */

void OT_print(OT_Tab tab, void (*pMbr)(OT_Obj obj), int cols, int indent)
#define OT_PRINT(tab,pMbr,cols,ind) \
        OT_print(tab,(void (*)(OT_Obj obj)) pMbr,(cols),(ind))
/* prints table 'tab' to stdout ( unsorted ) */
;

void OT_s_print
     (
       OT_Tab tab, OT_Tab idxtab, void (*pMbr)(OT_Obj obj), int cols, int indent
     )
#define OT_S_PRINT(tab,itab,pMbr,cols,ind) \
        OT_s_print(tab,itab,(void (*)(OT_Obj obj)) pMbr,(cols),(ind))
/* prints table 'tab' to stdout ( sorted ) */
;


/* -------------------- Predicates on tables & Mapping ---------------------- */

c_bool OT_equal(OT_Tab left, OT_Tab right)
#define OT_EQUAL OT_equal
/* left = right ? */
;

StdCPtr OT_map
        (                                         /* function parameter:    */
          int argcnt,                             /* number of arguments    */
          void (*fun)(OT_Obj* objs, StdCPtr any), /* element map function   */
          StdCPtr any,                            /* any additional context */
          OT_Tab tab, ...                         /* operational tables     */
        )
#define OT_MAP_F OT_map
/** executes 'fun' on each element in all tables */
;

c_bool OT_forall
     (                                         /* function parameter:    */
       int argcnt,                             /* number of arguments    */
       c_bool (*fun)(OT_Obj* objs, StdCPtr any), /* element map function   */
       StdCPtr any,                            /* any additional context */
       OT_Tab tab, ...                         /* operational tables     */
     )
#define OT_FORALL_P OT_forall
/** executes 'fun' on each element in all tables;
*  on false execution stops
*/
;

c_bool OT_exists
     (                                         /* function parameter:    */
       int argcnt,                             /* number of arguments    */
       c_bool (*fun)(OT_Obj* objs, StdCPtr any), /* element map function   */
       StdCPtr any,                            /* any additional context */
       OT_Tab tab, ...                         /* operational tables     */
     )
#define OT_EXISTS_P OT_exists
/** executes 'fun' on each element in all tables;
*  on true execution stops
*/
;


/* ------------------- Simulation of a pointer stack ------------------------ */

#define OT_NEWSTK(stk)                  stk = OT_CREATE_ADT(StdCPtr)
#define OT_EMPTYSTK(stk)                ( OT_CNT(stk) ? C_False : C_True )
#define OT_CNTSTK(stk)                  OT_CNT(stk)
#define OT_PUSH(ptr,stk)                OT_T_INS(stk,ABS_CAST(OT_Obj,ptr))
#define OT_POP(stk)                     OT_DEL_E(stk,OT_cnt(stk)-1)
#define OT_TOP(type,stk)                OT_GET(type,stk,OT_cnt(stk)-1)
#define OT_TOP_small(type,stk)          ( (type)((long)OT_get(stk,OT_cnt(stk)-1)) )
#define OT_TOP_short(stk)               ( (short)((long)OT_get(stk,OT_cnt(stk)-1)) )
#define OT_DELSTK(stk)                  OT_DEL_T(stk)


#ifdef __cplusplus
}
#endif

#endif