started an official API to the C runtime

This commit is contained in:
kr.angelov
2012-12-12 11:25:58 +00:00
parent f39466f787
commit 1376df457d
15 changed files with 329 additions and 173 deletions

View File

@@ -4,11 +4,16 @@
#include <gu/file.h>
#include <gu/utf8.h>
int main(void) {
int main(int argc, char* argv[]) {
if (argc != 1) {
fprintf(stderr, "usage: %s pgf\n", argv[0]);
return 1;
}
char* filename = argv[1];
GuPool* pool = gu_new_pool();
GuExn* err = gu_exn(NULL, type, pool);
GuIn* in = gu_file_in(stdin, pool);
PgfPGF* pgf = pgf_read(in, pool, err);
PgfPGF* pgf = pgf_read(filename, pool, err);
int status = 0;
if (!gu_ok(err)) {
fprintf(stderr, "Reading PGF failed\n");