ifc can be used to compile .if files into self-contained header-only C libraries, which can be used to send/receive messages that conform to the described interface.
18 lines
216 B
C
18 lines
216 B
C
#include "type.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
void type_print(const struct type *ty)
|
|
{
|
|
switch (ty->ty_id) {
|
|
case TYPE_INT:
|
|
printf("int");
|
|
break;
|
|
case TYPE_STRING:
|
|
printf("string");
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|