diff options
Diffstat (limited to 'src/evemu.c')
-rw-r--r-- | src/evemu.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/evemu.c b/src/evemu.c index f37ad05..80257c6 100644 --- a/src/evemu.c +++ b/src/evemu.c @@ -56,6 +56,16 @@ static void copy_bits(unsigned char *mask, const unsigned long *bits, int bytes) } } +/** + * evemu_new() - allocate a new evemu device + * @name: wanted input device name (or NULL to leave empty) + * + * This function allocates a new evemu device structure and + * initializes all fields to zero. If name is non-null and the length + * is sane, it is copied to the device name. + * + * Returns NULL in case of memory failure. + */ struct evemu_device *evemu_new(const char *name) { struct evemu_device *dev = calloc(1, sizeof(struct evemu_device)); @@ -69,6 +79,12 @@ struct evemu_device *evemu_new(const char *name) return dev; } +/** + * evemu_delete() - free and allocated evemu device + * @dev: the device to free + * + * The device pointer is invalidated by this call. + */ void evemu_delete(struct evemu_device *dev) { free(dev); |