1XDF_ADD_EVTTYPE(3) xdffileio library manual XDF_ADD_EVTTYPE(3)
2
3
4
6 xdf_add_evttype - Adds a type of event
7
9 #include <xdfio.h>
10
11 int xdf_add_evttype(struct xdf* xdf, int code, const char* desc);
12
14 xdf_add_evttype() adds an event type specified by combination of code
15 and the event description desc to the file referenced by the handle xdf
16 opened for writing. If there is no description associated with the
17 event type, desc should be set to NULL.
18
19 If an event type with the same combination has been already added, no
20 new type will be added and the previous type will be returned.
21
23 The function returns the event type in case of success. Otherwise -1 is
24 returned and errno is set appropriately.
25
27 EINVAL xdf is NULL
28
29 ENOMEM The system is unable to allocate resources.
30
31 EPERM The file referenced by xdf has not been opened for writing or
32 its file format does not support events.
33
35 xdf_add_event(3)
36
37
38
39
40
41EPFL 2010 XDF_ADD_EVTTYPE(3)