xdf_add_evttype(3)

xdf_add_evttype3

Adds a type of event

Usage

#include <xdfio.h>

int xdf_add_evttype(struct xdf* xdf, int code, const char* desc);

Overview

xdf_add_evttype() adds an event type specified by combination of code and the event description desc to the file referenced by the handle xdf opened for writing. If there is no description associated with the event type, desc should be set to NULL.

If an event type with the same combination has been already added, no new type will be added and the previous type will be returned.

Return value

The function returns the event type in case of success. Otherwise -1 is returned and errno is set appropriately.

Errors

EINVAL

xdf is NULL

ENOMEM

The system is unable to allocate resources.

EPERM

The file referenced by xdf has not been opened for writing or its file format does not support events.

Releases

Unchanged in 7 releases since Debian 7 (Wheezy).

  1. 7–13

From libxdffileio-dev 0.3-4+b2 in Debian 13 (Trixie). Parsed by carta from the page's man source.