1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

format: format io_format_lookup() to io_format.c

This commit is contained in:
Steffen Vogel 2017-09-04 16:03:11 +02:00
parent 8ee79185ff
commit f9fb681867
2 changed files with 12 additions and 12 deletions

View file

@ -27,7 +27,6 @@
#include "io_format.h"
#include "utils.h"
#include "sample.h"
#include "plugin.h"
int io_init(struct io *io, struct io_format *fmt, int flags)
{
@ -300,14 +299,3 @@ int io_scan(struct io *io, struct sample *smps[], unsigned cnt)
return ret;
}
struct io_format * io_format_lookup(const char *name)
{
struct plugin *p;
p = plugin_lookup(PLUGIN_TYPE_IO, name);
if (!p)
return NULL;
return &p->io;
}

View file

@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "plugin.h"
#include "io_format.h"
int io_format_sscan(struct io_format *fmt, char *buf, size_t len, size_t *rbytes, struct sample *smps[], unsigned cnt, int flags)
@ -48,3 +49,14 @@ int io_format_fprint(struct io_format *fmt, FILE *f, struct sample *smps[], unsi
{
return fmt->fprint ? fmt->fprint(f, smps, cnt, flags) : -1;
}
struct io_format * io_format_lookup(const char *name)
{
struct plugin *p;
p = plugin_lookup(PLUGIN_TYPE_IO, name);
if (!p)
return NULL;
return &p->io;
}