Closed GoogleCodeExporter closed 8 years ago
Here's another way of defining structures.
static void lib_parse(const char* definition)
{
PicocParse("my lib", definition, strlen(definition), TRUE, TRUE, FALSE);
}
void PlatformLibraryInit()
{
lib_parse("struct tm { int hour; int minute; int second; int year; int month; int day; };");
lib_parse("struct yuv { int Y; int U; int V; };");
lib_parse("struct rgb { int R; int G; int B; };");
...
lib_parse("#define M_PI 3.1415");
lib_parse("#define ABS(a) ((a) < (0) ? -(a) : (a))");
lib_parse("#define SGN(a) ((a) > 0 ? 1 : (a) < 0 ? -1 : 0)");
}
Original comment by broscuta...@gmail.com
on 10 Mar 2013 at 1:14
I've made these changes to the wiki, thanks for the suggestions.
Original comment by zik.sale...@gmail.com
on 16 Mar 2013 at 5:37
Original issue reported on code.google.com by
jjohans...@gmail.com
on 9 Oct 2011 at 12:37