From 408eb6bbe76e9e1b0651d07467ce2ba9510deb23 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 19 Jan 2011 00:27:38 +0100 Subject: c2nim: bugfix: less picky about newlines in preprocessor defines --- rod/c2nim/cpp.nim | 2 +- rod/c2nim/tests/systest.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'rod') diff --git a/rod/c2nim/cpp.nim b/rod/c2nim/cpp.nim index 5507c6116..f59c86044 100755 --- a/rod/c2nim/cpp.nim +++ b/rod/c2nim/cpp.nim @@ -16,7 +16,7 @@ proc eatNewLine(p: var TParser, n: PNode) = if p.tok.xkind == pxLineComment: skipCom(p, n) if p.tok.xkind == pxNewLine: getTok(p) - else: + elif p.tok.xkind == pxNewLine: eat(p, pxNewLine) proc skipLine(p: var TParser) = diff --git a/rod/c2nim/tests/systest.c b/rod/c2nim/tests/systest.c index 7f689c002..4ba1d9044 100755 --- a/rod/c2nim/tests/systest.c +++ b/rod/c2nim/tests/systest.c @@ -9,6 +9,15 @@ extern "C" { # endif #endif +typedef void (*callback_t) (int rc); + +int aw_callback_set (AW_CALLBACK c, callback_t callback ); +int aw_instance_callback_set (AW_CALLBACK c, callback_t callback); + +#define AW_BUILD 85 // AW 5.0 +// Limits +#define AW_MAX_AVCHANGE_PER_SECOND 10 + #private expatDll #if !defined(expatDll) -- cgit 1.4.1-2-gfad0