This file is indexed.

/usr/include/GTGOTF_Structs.h is in libgtg-dev 0.2-2+dfsg-2build1.

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
/**
 *  \file GTGOTF_Structs.h
 *  \version 0.1
 *  \brief
 *  OTF_Structs gives the global types and functions needed to have the OTF implementation.
 *
 *  \authors
 *    Developers are : \n
 *        Francois Rue      - francois.rue@labri.fr \n
 *        Francois Trahay   - francois.trahay@labri.fr \n
 *        Johnny   Jazeix   - jazeix@enseirb-matmeca.fr \n
 *        Kevin    Coulomb  - kevin.coulomb@gmail.com \n
 *        Mathieu  Faverge  - faverge@labri.fr \n
 *        Olivier  Lagrasse - lagrasse@enseirb-matmeca.fr \n
 *
 */
#ifndef _GTG_OTF_STRUCTS_H_
#define _GTG_OTF_STRUCTS_H_

#include <stdint.h>
#include "GTGList.h"
#include "GTGStack.h"

/* todo: remove this */
#define MAX_PROCESS 64

/*! StateTypes */
typedef struct StateType { /* Func group */
    char           *name;
    char           *alias;
    int             groupId;
    int             id;
    struct gtg_list token;	/* stored in the stateTypes list */
} StateType_t;

/*! States */
typedef struct State {
    int             value;
    int             cont;
    int             stateType;
    gtg_stack token;	/* stored in the states list */
} State_t;

/* ContainerTypes */
typedef struct ContainerType {
    char           *name;
    char           *alias;
    int             id;
    struct gtg_list token;	/* stored in the ctType list */
} ContainerType_t;

/*! Containers */
typedef struct Container {
    char            *name;
    char            *alias;
    int             ctType;
    int             id;
    struct gtg_list token;	/* stored in the conts list */
    State_t state_stack;
} Container_t;

/*! EntityValue, contains the name of the functions/states */
typedef struct EntityValue {
    char           *name;
    char           *alias;
    int             groupId;
    int             id;
    struct gtg_list token;	/* not used */
} EntityValue_t;

/*! Events/Markers */
typedef struct EventType {
    char           *name;
    char           *alias;
    int             contType;
    int             id;
    struct gtg_list token;	/* stored in the eventTypes list */
} EventType_t;

/*! Links/Messages */
typedef struct LinkType {
    char           *name;
    char           *alias;
    int             contType;
    int             srcType;
    int             destType;
    int             id;
    struct gtg_list token;	/* stored in the linkTypes lisk */
} LinkType_t;

typedef struct Link {
    varPrec time;
    int src;
} Link_t;


/*! Variables/Counters */
typedef struct VariableType {
    char           *name;
    char           *alias;
    int             contType;
    int             id;
    struct gtg_list token;	/* stored in the variableTypes list */
} VariableType_t;

typedef struct Variable {
    int             parent;
    int             type;
    uint64_t        value;
    int             id;
    struct gtg_list token;	/* stored in the variables list */
} Variable_t;

struct otf_color {
    char *colorID;
    uint8_t red;
    uint8_t green;
    uint8_t blue;
};

typedef struct otf_color* otf_color_t;

#define ContainerType_NIL 0
#define Container_NIL     0
#define StateType_NIL     0
#define State_NIL         0
#define EntityValue_NIL   0
#define EventType_NIL     0
#define LinkType_NIL      0
#define VariableType_NIL  0
#define Variable_NIL      0

#define init_ContainerType(var)\
  do {				  \
    (var).name  = NULL;		  \
    (var).alias = NULL;		  \
    (var).id    = ContainerType_NIL;		  \
    GTG_LIST_INIT(&(var).token);  \
  }while(0)

#define init_Container(var)			\
  do {						\
    (var).name   = NULL;			\
    (var).alias  = NULL;			\
    (var).ctType = ContainerType_NIL;		\
    (var).id     = Container_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
    GTG_STACK_INIT(&(var).state_stack.token);	\
  }while(0)

#define init_StateType(var)		  \
  do {					  \
    (var).name    = NULL;		  \
    (var).alias   = NULL;		  \
    (var).groupId = 0;			  \
    (var).id      = StateType_NIL;	  \
    GTG_LIST_INIT(&(var).token);	  \
  }while(0)

#define init_EntityValue(var)			\
  do {						\
    (var).name    = NULL;			\
    (var).alias   = NULL;			\
    (var).groupId = 0;				\
    (var).id      = EntityValue_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
  }while(0)

#define init_EventType(var)			\
  do {						\
    (var).name     = NULL;			\
    (var).alias   = NULL;			\
    (var).contType = ContainerType_NIL;		\
    (var).id       = EventType_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
  }while(0)

#define init_LinkType(var)			\
  do {						\
    (var).name     = NULL;			\
    (var).alias   = NULL;			\
    (var).contType = ContainerType_NIL;		\
    (var).srcType  = ContainerType_NIL;		\
    (var).destType = ContainerType_NIL;		\
    (var).id       = LinkType_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
  }while(0)

#define init_VariableType(var)			\
  do {						\
    (var).name     = NULL;			\
    (var).alias    = NULL;			\
    (var).contType = ContainerType_NIL;		\
    (var).id       = VariableType_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
  }while(0)

#define init_Variable(var)			\
  do {						\
    (var).parent = Container_NIL;		\
    (var).parent = VariableType_NIL;		\
    (var).value  = 0;				\
    (var).id     = Variable_NIL;		\
    GTG_LIST_INIT(&(var).token);		\
  }while(0)

#define init_State(var)				\
  do {						\
    (var).value   = EntityValue_NIL;		\
    (var).cont    = Container_NIL;		\
    (var).stateType = StateType_NIL;		\
    GTG_STACK_INIT(&(var).token);		\
  }while(0)


#define alloc_struct(ptr, type, list_head)				\
  do {									\
    ptr = (type*) malloc(sizeof(type));				\
    GTG_LIST_INIT(&(ptr->token));					\
    ptr->id = (gtg_list_entry((list_head)->prev, type, token)->id) + 1;	\
    gtg_list_add_tail(&(ptr->token), list_head);			\
  } while(0)

#define alloc_init_struct(type, ptr, list_head, _name_, _alias_)	\
  do {									\
  alloc_struct(ptr, type, list_head);					\
  (ptr)->name = (char *)malloc(sizeof(char)*(strlen(_name_)+1));	\
  strcpy((ptr)->name, _name_);						\
  (ptr)->alias = (char *)malloc(sizeof(char)*(strlen(_alias_)+1));	\
  strcpy((ptr)->alias, _alias_);					\
  }while(0)

#define alloc_Variable(_ptr_, _id_, _parent_, _type_, _value_)	\
  do {								\
    (_ptr_) = (Variable_t*) malloc(sizeof(Variable_t));		\
    init_Variable(*(_ptr_));					\
    (_ptr_)->id = _id_;						\
    (_ptr_)->parent = _parent_;					\
    (_ptr_)->type = _type_;					\
    (_ptr_)->value = _value_;					\
  }while(0)

#define alloc_State(_ptr_, _value_, _cont_, _stateType_)	\
  do {								\
    _ptr_ = (State_t*) malloc(sizeof(State_t));			\
    init_State(*(_ptr_));					\
    (_ptr_)->value = _value_;					\
    (_ptr_)->cont = _cont_;					\
    (_ptr_)->stateType = _stateType_;				\
  }while(0)

#define free_struct(_type_, _list_head_)\
  do{\
    _type_ *ptr, *tmp;					\
    gtg_list_for_each_entry_safe(ptr, tmp, &(_list_head_).token, token) {	\
    gtg_list_del(&(ptr->token));\
    free(ptr->name);\
    free(ptr->alias);\
    free(ptr);\
  }\
  }while(0)

#endif /* _GTG_OTF_STRUCTS_H_ */