/* t.c -- elib test caller */ #include #include #include #define RTC printf("return to continue - ");fflush(stdout);getchar() APTR libbase; /* this name of this variable is important, * since interface routines need to access * its contents. */ /* life is simple if library routines return LONG integers */ LONG GetDown(); LONG Double(); #define DOUBARG 19 main() { LONG retval; printf("here we go\n"); libbase = (APTR) OpenLibrary("mylib.library", 0L); printf("openlib returns base: %lx\n", libbase); RTC; if (libbase) { /* test function GetDown() */ retval = GetDown(); printf("called getdown, %ld returned\n", retval); RTC; /* test function Double() */ printf("double of %d = %ld\n", DOUBARG, Double((LONG)DOUBARG)); RTC; CloseLibrary(libbase); } }