toolchain: add a program for compiling ipc interface definitions
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.
This commit is contained in:
17
toolchain/ifc/type.c
Normal file
17
toolchain/ifc/type.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user