Commit 41d07424 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Removal and renaming of typedefs.

parent fa85ef07
...@@ -443,7 +443,7 @@ aspect C_Decoder { ...@@ -443,7 +443,7 @@ aspect C_Decoder {
env = env.nestStruct("v"); env = env.nestStruct("v");
env.println("static void decode_" + getName() + "("); env.println("static void decode_" + getName() + "(");
env.indent(); env.indent();
env.println("labcomm_decoder_t *d,"); env.println("struct labcomm_decoder *d,");
env.println("void (*handle)("); env.println("void (*handle)(");
env.indent(); env.indent();
env.println(env.prefix + getName() + " *v,"); env.println(env.prefix + getName() + " *v,");
...@@ -637,8 +637,8 @@ aspect C_Decoder { ...@@ -637,8 +637,8 @@ aspect C_Decoder {
env.indent(); env.indent();
env.println("d,"); env.println("d,");
env.println("&labcomm_signature_" + env.prefix + getName() + ","); env.println("&labcomm_signature_" + env.prefix + getName() + ",");
env.println("(labcomm_decoder_typecast_t)decode_" + getName() + ","); env.println("(labcomm_decoder_function)decode_" + getName() + ",");
env.println("(labcomm_handler_typecast_t)handler,"); env.println("(labcomm_handler_function)handler,");
env.println("context"); env.println("context");
env.unindent(); env.unindent();
env.println(");"); env.println(");");
...@@ -700,7 +700,7 @@ aspect C_Encoder { ...@@ -700,7 +700,7 @@ aspect C_Encoder {
env = env.nestStruct("(*v)"); env = env.nestStruct("(*v)");
env.println("static int encode_" + getName() + "("); env.println("static int encode_" + getName() + "(");
env.indent(); env.indent();
env.println("labcomm_encoder_t *e,"); env.println("struct labcomm_encoder *e,");
env.println(env.prefix + getName() + " *v"); env.println(env.prefix + getName() + " *v");
env.unindent(); env.unindent();
env.println(")"); env.println(")");
...@@ -714,7 +714,7 @@ aspect C_Encoder { ...@@ -714,7 +714,7 @@ aspect C_Encoder {
// Typesafe encode wrapper // Typesafe encode wrapper
env.println("int labcomm_encode_" + env.prefix + getName() + "("); env.println("int labcomm_encode_" + env.prefix + getName() + "(");
env.println("labcomm_encoder_t *e,"); env.println("struct labcomm_encoder *e,");
env.println(env.prefix + getName() + " *v"); env.println(env.prefix + getName() + " *v");
env.unindent(); env.unindent();
env.println(")"); env.println(")");
...@@ -905,7 +905,7 @@ aspect C_Signature { ...@@ -905,7 +905,7 @@ aspect C_Signature {
env.prefix + getName() + ") = {"); env.prefix + getName() + ") = {");
env.indent(); env.indent();
env.println("LABCOMM_SAMPLE, \"" + getName() + "\","); env.println("LABCOMM_SAMPLE, \"" + getName() + "\",");
env.println("(int (*)(labcomm_signature_t *, void *))labcomm_sizeof_" + env.println("(int (*)(struct labcomm_signature *, void *))labcomm_sizeof_" +
env.prefix + getName() + ","); env.prefix + getName() + ",");
env.println("sizeof(signature_bytes_" + getName() + "),"); env.println("sizeof(signature_bytes_" + getName() + "),");
env.println("signature_bytes_"+ getName()); env.println("signature_bytes_"+ getName());
...@@ -1003,7 +1003,7 @@ aspect C_Sizeof { ...@@ -1003,7 +1003,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeofDeclaration(C_env env) { public void SampleDecl.C_emitSizeofDeclaration(C_env env) {
env.println("extern int labcomm_sizeof_" + env.prefix + getName() + env.println("extern int labcomm_sizeof_" + env.prefix + getName() +
"(labcomm_signature_t *sig, " + env.prefix + getName() + " *v);"); "(struct labcomm_signature *sig, " + env.prefix + getName() + " *v);");
} }
public int Decl.C_fixedSizeof() { public int Decl.C_fixedSizeof() {
...@@ -1064,7 +1064,7 @@ aspect C_Sizeof { ...@@ -1064,7 +1064,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeof(C_env env) { public void SampleDecl.C_emitSizeof(C_env env) {
env = env.nestStruct("(*v)"); env = env.nestStruct("(*v)");
env.println("int labcomm_sizeof_" + env.prefix + getName() + env.println("int labcomm_sizeof_" + env.prefix + getName() +
"(labcomm_signature_t *sig, " + env.prefix + getName() + " *v)"); "(struct labcomm_signature *sig, " + env.prefix + getName() + " *v)");
env.println("{"); env.println("{");
env.indent(); env.indent();
if (C_isDynamic()) { if (C_isDynamic()) {
......
...@@ -36,33 +36,33 @@ ...@@ -36,33 +36,33 @@
#define LABCOMM_VERSION "LabComm2013" #define LABCOMM_VERSION "LabComm2013"
typedef struct labcomm_sample_entry { struct labcomm_sample_entry {
struct labcomm_sample_entry *next; struct labcomm_sample_entry *next;
int index; int index;
labcomm_signature_t *signature; struct labcomm_signature *signature;
labcomm_decoder_typecast_t decoder; labcomm_decoder_function decoder;
labcomm_handler_typecast_t handler; labcomm_handler_function handler;
labcomm_encoder_function encode; labcomm_encoder_function encode;
void *context; void *context;
} labcomm_sample_entry_t; };
#ifndef LABCOMM_ENCODER_LINEAR_SEARCH #ifndef LABCOMM_ENCODER_LINEAR_SEARCH
extern labcomm_signature_t labcomm_first_signature; extern struct labcomm_signature labcomm_first_signature;
extern labcomm_signature_t labcomm_last_signature; extern struct labcomm_signature labcomm_last_signature;
#endif #endif
typedef struct labcomm_encoder_context { struct labcomm_encoder_context {
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
labcomm_sample_entry_t *sample; struct labcomm_sample_entry *sample;
int index; int index;
#else #else
labcomm_sample_entry_t *by_section; struct labcomm_sample_entry *by_section;
#endif #endif
} labcomm_encoder_context_t; };
typedef struct labcomm_decoder_context { struct labcomm_decoder_context {
labcomm_sample_entry_t *sample; struct labcomm_sample_entry *sample;
} labcomm_decoder_context_t; };
void labcomm_register_error_handler_encoder(struct labcomm_encoder *encoder, labcomm_error_handler_callback callback) void labcomm_register_error_handler_encoder(struct labcomm_encoder *encoder, labcomm_error_handler_callback callback)
{ {
...@@ -109,7 +109,7 @@ void labcomm_decoder_register_new_datatype_handler(struct labcomm_decoder *d, la ...@@ -109,7 +109,7 @@ void labcomm_decoder_register_new_datatype_handler(struct labcomm_decoder *d, la
d->on_new_datatype = on_new_datatype; d->on_new_datatype = on_new_datatype;
} }
int on_new_datatype(labcomm_decoder_t *d, labcomm_signature_t *sig) int on_new_datatype(struct labcomm_decoder *d, struct labcomm_signature *sig)
{ {
d->on_error(LABCOMM_ERROR_DEC_UNKNOWN_DATATYPE, 4, "%s(): unknown datatype '%s'\n", __FUNCTION__, sig->name); d->on_error(LABCOMM_ERROR_DEC_UNKNOWN_DATATYPE, 4, "%s(): unknown datatype '%s'\n", __FUNCTION__, sig->name);
return 0; return 0;
...@@ -141,22 +141,22 @@ void on_error_fprintf(enum labcomm_error error_id, size_t nbr_va_args, ...) ...@@ -141,22 +141,22 @@ void on_error_fprintf(enum labcomm_error error_id, size_t nbr_va_args, ...)
} }
static labcomm_sample_entry_t *get_sample_by_signature_address( static struct labcomm_sample_entry *get_sample_by_signature_address(
labcomm_sample_entry_t *head, struct labcomm_sample_entry *head,
labcomm_signature_t *signature) struct labcomm_signature *signature)
{ {
labcomm_sample_entry_t *p; struct labcomm_sample_entry *p;
for (p = head ; p && p->signature != signature ; p = p->next) { for (p = head ; p && p->signature != signature ; p = p->next) {
} }
return p; return p;
} }
static labcomm_sample_entry_t *get_sample_by_signature_value( static struct labcomm_sample_entry *get_sample_by_signature_value(
labcomm_sample_entry_t *head, struct labcomm_sample_entry *head,
labcomm_signature_t *signature) struct labcomm_signature *signature)
{ {
labcomm_sample_entry_t *p; struct labcomm_sample_entry *p;
for (p = head ; p ; p = p->next) { for (p = head ; p ; p = p->next) {
if (p->signature->type == signature->type && if (p->signature->type == signature->type &&
p->signature->size == signature->size && p->signature->size == signature->size &&
...@@ -169,11 +169,11 @@ static labcomm_sample_entry_t *get_sample_by_signature_value( ...@@ -169,11 +169,11 @@ static labcomm_sample_entry_t *get_sample_by_signature_value(
return p; return p;
} }
static labcomm_sample_entry_t *get_sample_by_index( static struct labcomm_sample_entry *get_sample_by_index(
labcomm_sample_entry_t *head, struct labcomm_sample_entry *head,
int index) int index)
{ {
labcomm_sample_entry_t *p; struct labcomm_sample_entry *p;
for (p = head ; p && p->index != index ; p = p->next) { for (p = head ; p && p->index != index ; p = p->next) {
} }
return p; return p;
...@@ -182,12 +182,12 @@ static labcomm_sample_entry_t *get_sample_by_index( ...@@ -182,12 +182,12 @@ static labcomm_sample_entry_t *get_sample_by_index(
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
static int get_encoder_index_by_search( static int get_encoder_index_by_search(
labcomm_encoder_t *e, struct labcomm_encoder *e,
labcomm_signature_t *s) struct labcomm_signature *s)
{ {
int result = 0; int result = 0;
labcomm_encoder_context_t *context = e->context; struct labcomm_encoder_context *context = e->context;
labcomm_sample_entry_t *sample = context->sample; struct labcomm_sample_entry *sample = context->sample;
while (sample) { while (sample) {
if (sample->signature == s) { break; } if (sample->signature == s) { break; }
sample = sample->next; sample = sample->next;
...@@ -201,8 +201,8 @@ static int get_encoder_index_by_search( ...@@ -201,8 +201,8 @@ static int get_encoder_index_by_search(
#else #else
static int get_encoder_index_by_section( static int get_encoder_index_by_section(
labcomm_encoder_t *e, struct labcomm_encoder *e,
labcomm_signature_t *s) struct labcomm_signature *s)
{ {
int result = -ENOENT; int result = -ENOENT;
if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) { if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) {
...@@ -214,8 +214,8 @@ static int get_encoder_index_by_section( ...@@ -214,8 +214,8 @@ static int get_encoder_index_by_section(
#endif #endif
static int get_encoder_index( static int get_encoder_index(
labcomm_encoder_t *e, struct labcomm_encoder *e,
labcomm_signature_t *s) struct labcomm_signature *s)
{ {
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
return get_encoder_index_by_search(e, s); return get_encoder_index_by_search(e, s);
...@@ -225,7 +225,7 @@ static int get_encoder_index( ...@@ -225,7 +225,7 @@ static int get_encoder_index(
} }
static void labcomm_encode_signature(struct labcomm_encoder *e, static void labcomm_encode_signature(struct labcomm_encoder *e,
labcomm_signature_t *signature) struct labcomm_signature *signature)
{ {
int i, index; int i, index;
...@@ -247,14 +247,14 @@ static void labcomm_encode_signature(struct labcomm_encoder *e, ...@@ -247,14 +247,14 @@ static void labcomm_encode_signature(struct labcomm_encoder *e,
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
static int encoder_add_signature_by_search(struct labcomm_encoder *e, static int encoder_add_signature_by_search(struct labcomm_encoder *e,
labcomm_signature_t *signature, struct labcomm_signature *signature,
labcomm_encoder_function encode) labcomm_encoder_function encode)
{ {
int result; int result;
labcomm_encoder_context_t *context = e->context; struct labcomm_encoder_context *context = e->context;
labcomm_sample_entry_t *sample; struct labcomm_sample_entry *sample;
sample = (labcomm_sample_entry_t*)malloc(sizeof(labcomm_sample_entry_t)); sample = (struct labcomm_sample_entry *)malloc(sizeof(*sample));
if (sample == NULL) { if (sample == NULL) {
result = -ENOMEM; result = -ENOMEM;
} else { } else {
...@@ -272,14 +272,14 @@ static int encoder_add_signature_by_search(struct labcomm_encoder *e, ...@@ -272,14 +272,14 @@ static int encoder_add_signature_by_search(struct labcomm_encoder *e,
#ifndef LABCOMM_ENCODER_LINEAR_SEARCH #ifndef LABCOMM_ENCODER_LINEAR_SEARCH
static int encoder_add_signature_by_section(struct labcomm_encoder *e, static int encoder_add_signature_by_section(struct labcomm_encoder *e,
labcomm_signature_t *s, struct labcomm_signature *s,
labcomm_encoder_function encode) labcomm_encoder_function encode)
{ {
int result = -ENOENT; int result = -ENOENT;
if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) { if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) {
/* Signature is in right linker section */ /* Signature is in right linker section */
labcomm_encoder_context_t *context = e->context; struct labcomm_encoder_context *context = e->context;
int index = s - &labcomm_first_signature; int index = s - &labcomm_first_signature;
if (context->by_section == NULL) { if (context->by_section == NULL) {
...@@ -302,7 +302,7 @@ out: ...@@ -302,7 +302,7 @@ out:
#endif #endif
static int encoder_add_signature(struct labcomm_encoder *e, static int encoder_add_signature(struct labcomm_encoder *e,
labcomm_signature_t *signature, struct labcomm_signature *signature,
labcomm_encoder_function encode) labcomm_encoder_function encode)
{ {
int index = -ENOENT; int index = -ENOENT;
...@@ -316,12 +316,12 @@ static int encoder_add_signature(struct labcomm_encoder *e, ...@@ -316,12 +316,12 @@ static int encoder_add_signature(struct labcomm_encoder *e,
} }
/* /*
static labcomm_sample_entry_t *encoder_get_sample_by_signature_address( static struct labcomm_sample_entry *encoder_get_sample_by_signature_address(
labcomm_encoder_t *encoder, struct labcomm_encoder *encoder,
labcomm_signature_t *s) struct labcomm_signature *s)
{ {
labcomm_sample_entry_t *result = NULL; struct labcomm_sample_entry *result = NULL;
labcomm_encoder_context_t *context = encoder->context; struct labcomm_encoder_context *context = encoder->context;
#ifndef LABCOMM_ENCODER_LINEAR_SEARCH #ifndef LABCOMM_ENCODER_LINEAR_SEARCH
if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) { if (&labcomm_first_signature <= s && s <= &labcomm_last_signature) {
...@@ -334,17 +334,17 @@ static labcomm_sample_entry_t *encoder_get_sample_by_signature_address( ...@@ -334,17 +334,17 @@ static labcomm_sample_entry_t *encoder_get_sample_by_signature_address(
} }
*/ */
labcomm_encoder_t *labcomm_encoder_new( struct labcomm_encoder *labcomm_encoder_new(
const struct labcomm_writer_action writer, const struct labcomm_writer_action writer,
void *writer_context, void *writer_context,
const struct labcomm_lock_action *lock, const struct labcomm_lock_action *lock,
void *lock_context) void *lock_context)
{ {
labcomm_encoder_t *result = malloc(sizeof(labcomm_encoder_t)); struct labcomm_encoder *result = malloc(sizeof(*result));
if (result) { if (result) {
labcomm_encoder_context_t *context; struct labcomm_encoder_context *context;
context = malloc(sizeof(labcomm_encoder_context_t)); context = malloc(sizeof(*context));
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
context->sample = NULL; context->sample = NULL;
context->index = LABCOMM_USER; context->index = LABCOMM_USER;
...@@ -369,8 +369,8 @@ labcomm_encoder_t *labcomm_encoder_new( ...@@ -369,8 +369,8 @@ labcomm_encoder_t *labcomm_encoder_new(
} }
void labcomm_internal_encoder_register( void labcomm_internal_encoder_register(
labcomm_encoder_t *e, struct labcomm_encoder *e,
labcomm_signature_t *signature, struct labcomm_signature *signature,
labcomm_encoder_function encode) labcomm_encoder_function encode)
{ {
if (signature->type == LABCOMM_SAMPLE) { if (signature->type == LABCOMM_SAMPLE) {
...@@ -394,8 +394,8 @@ void labcomm_internal_encoder_register( ...@@ -394,8 +394,8 @@ void labcomm_internal_encoder_register(
} }
int labcomm_internal_encode( int labcomm_internal_encode(
labcomm_encoder_t *e, struct labcomm_encoder *e,
labcomm_signature_t *signature, struct labcomm_signature *signature,
labcomm_encoder_function encode, labcomm_encoder_function encode,
void *value) void *value)
{ {
...@@ -415,14 +415,14 @@ no_end: ...@@ -415,14 +415,14 @@ no_end:
return result; return result;
} }
void labcomm_encoder_free(labcomm_encoder_t* e) void labcomm_encoder_free(struct labcomm_encoder* e)
{ {
e->writer.action.free(&e->writer); e->writer.action.free(&e->writer);
labcomm_encoder_context_t *context = (labcomm_encoder_context_t *) e->context; struct labcomm_encoder_context *context = (struct labcomm_encoder_context *) e->context;
#ifdef LABCOMM_ENCODER_LINEAR_SEARCH #ifdef LABCOMM_ENCODER_LINEAR_SEARCH
labcomm_sample_entry_t *entry = context->sample; struct labcomm_sample_entry *entry = context->sample;
labcomm_sample_entry_t *entry_next; struct labcomm_sample_entry *entry_next;
while (entry != NULL) { while (entry != NULL) {
entry_next = entry->next; entry_next = entry->next;
free(entry); free(entry);
...@@ -453,7 +453,7 @@ int labcomm_encoder_ioctl(struct labcomm_encoder *encoder, ...@@ -453,7 +453,7 @@ int labcomm_encoder_ioctl(struct labcomm_encoder *encoder,
int labcomm_internal_encoder_ioctl(struct labcomm_encoder *encoder, int labcomm_internal_encoder_ioctl(struct labcomm_encoder *encoder,
int action, int action,
labcomm_signature_t *signature, struct labcomm_signature *signature,
va_list va) va_list va)
{ {
int result = -ENOTSUP; int result = -ENOTSUP;
...@@ -466,8 +466,8 @@ int labcomm_internal_encoder_ioctl(struct labcomm_encoder *encoder, ...@@ -466,8 +466,8 @@ int labcomm_internal_encoder_ioctl(struct labcomm_encoder *encoder,
} }
static void collect_flat_signature( static void collect_flat_signature(
labcomm_decoder_t *decoder, struct labcomm_decoder *decoder,
labcomm_encoder_t *signature_writer) struct labcomm_encoder *signature_writer)
{ {
int type = labcomm_read_packed32(&decoder->reader); int type = labcomm_read_packed32(&decoder->reader);
if (type >= LABCOMM_USER) { if (type >= LABCOMM_USER) {
...@@ -516,16 +516,16 @@ static void collect_flat_signature( ...@@ -516,16 +516,16 @@ static void collect_flat_signature(
} }
} }
labcomm_decoder_t *labcomm_decoder_new( struct labcomm_decoder *labcomm_decoder_new(
const struct labcomm_reader_action reader, const struct labcomm_reader_action reader,
void *reader_context, void *reader_context,
const struct labcomm_lock_action *lock, const struct labcomm_lock_action *lock,
void *lock_context) void *lock_context)
{ {
labcomm_decoder_t *result = malloc(sizeof(labcomm_decoder_t)); struct labcomm_decoder *result = malloc(sizeof(*result));
if (result) { if (result) {
labcomm_decoder_context_t *context = struct labcomm_decoder_context *context =
(labcomm_decoder_context_t*)malloc(sizeof(labcomm_decoder_context_t)); (struct labcomm_decoder_context *)malloc(sizeof(*context));
context->sample = 0; context->sample = 0;
result->context = context; result->context = context;
result->reader.data = 0; result->reader.data = 0;
...@@ -545,18 +545,18 @@ labcomm_decoder_t *labcomm_decoder_new( ...@@ -545,18 +545,18 @@ labcomm_decoder_t *labcomm_decoder_new(
} }
void labcomm_internal_decoder_register( void labcomm_internal_decoder_register(
labcomm_decoder_t *d, struct labcomm_decoder *d,
labcomm_signature_t *signature, struct labcomm_signature *signature,
labcomm_decoder_typecast_t type_decoder, labcomm_decoder_function type_decoder,
labcomm_handler_typecast_t handler, labcomm_handler_function handler,
void *handler_context) void *handler_context)
{ {
labcomm_decoder_context_t *context = d->context; struct labcomm_decoder_context *context = d->context;
labcomm_sample_entry_t *sample; struct labcomm_sample_entry *sample;
sample = get_sample_by_signature_address(context->sample, sample = get_sample_by_signature_address(context->sample,
signature); signature);
if (!sample) { if (!sample) {
sample = (labcomm_sample_entry_t*)malloc(sizeof(labcomm_sample_entry_t)); sample = (struct labcomm_sample_entry *)malloc(sizeof(*sample));
sample->next = context->sample; sample->next = context->sample;
context->sample = sample; context->sample = sample;
sample->index = 0; sample->index = 0;
...@@ -567,23 +567,23 @@ void labcomm_internal_decoder_register( ...@@ -567,23 +567,23 @@ void labcomm_internal_decoder_register(
sample->context = handler_context; sample->context = handler_context;
} }
int labcomm_decoder_decode_one(labcomm_decoder_t *d) int labcomm_decoder_decode_one(struct labcomm_decoder *d)
{ {
int result; int result;
do { do {
result = d->reader.action.start(&d->reader); result = d->reader.action.start(&d->reader);
if (result > 0) { if (result > 0) {
labcomm_decoder_context_t *context = d->context; struct labcomm_decoder_context *context = d->context;
result = labcomm_read_packed32(&d->reader); result = labcomm_read_packed32(&d->reader);
if (result == LABCOMM_TYPEDEF || result == LABCOMM_SAMPLE) { if (result == LABCOMM_TYPEDEF || result == LABCOMM_SAMPLE) {
/* TODO: should the labcomm_dynamic_buffer_writer be /* TODO: should the labcomm_dynamic_buffer_writer be
a permanent part of labcomm_decoder? */ a permanent part of labcomm_decoder? */
labcomm_encoder_t *e = labcomm_encoder_new( struct labcomm_encoder *e = labcomm_encoder_new(
labcomm_dynamic_buffer_writer, NULL, NULL, NULL); labcomm_dynamic_buffer_writer, NULL, NULL, NULL);
labcomm_signature_t signature; struct labcomm_signature signature;
labcomm_sample_entry_t *entry = NULL; struct labcomm_sample_entry *entry = NULL;
int index, err; int index, err;
index = labcomm_read_packed32(&d->reader); //int index = labcomm_read_packed32(&d->reader); //int
...@@ -624,7 +624,7 @@ int labcomm_decoder_decode_one(labcomm_decoder_t *d) ...@@ -624,7 +624,7 @@ int labcomm_decoder_decode_one(labcomm_decoder_t *d)
result = -ENOENT; result = -ENOENT;
} }
} else { } else {
labcomm_sample_entry_t *entry; struct labcomm_sample_entry *entry;
entry = get_sample_by_index(context->sample, result); entry = get_sample_by_index(context->sample, result);
if (!entry) { if (!entry) {
...@@ -644,18 +644,18 @@ int labcomm_decoder_decode_one(labcomm_decoder_t *d) ...@@ -644,18 +644,18 @@ int labcomm_decoder_decode_one(labcomm_decoder_t *d)
return result; return result;
} }
void labcomm_decoder_run(labcomm_decoder_t *d) void labcomm_decoder_run(struct labcomm_decoder *d)
{ {
while (labcomm_decoder_decode_one(d) > 0) { while (labcomm_decoder_decode_one(d) > 0) {
} }
} }
void labcomm_decoder_free(labcomm_decoder_t* d)