78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
//--------------------------------------------------------------------------//
|
|
// This file is in the public domain. //
|
|
//--------------------------------------------------------------------------//
|
|
|
|
#include "compiler.h"
|
|
#include "time_header.h"
|
|
#include <stdio.h>
|
|
|
|
struct Library* DOSBase;
|
|
struct Library* UtilityBase;
|
|
struct Library* MathIeeeDoubBasBase;
|
|
struct Library* LocaleBase;
|
|
struct Device* TimerBase;
|
|
struct timerequest* TimeRequest;
|
|
|
|
int main(const int argc, char *argv[])
|
|
{
|
|
int result = 0;
|
|
DOSBase = NULL;
|
|
MathIeeeDoubBasBase = NULL;
|
|
UtilityBase = NULL;
|
|
LocaleBase = NULL;
|
|
TimerBase = NULL;
|
|
TimeRequest = NULL;
|
|
|
|
DOSBase = OpenLibrary(DOSLIB_NAME, LIB_VERSION);
|
|
if (!DOSBase) {
|
|
result = false;
|
|
}
|
|
|
|
MathIeeeDoubBasBase = OpenLibrary (MATHLIB_NAME, LIB_VERSION);
|
|
if (!MathIeeeDoubBasBase) {
|
|
result = false;
|
|
}
|
|
|
|
UtilityBase = OpenLibrary(UTILLIB_NAME, LIB_VERSION);
|
|
if (!UtilityBase) {
|
|
result = false;
|
|
} else {
|
|
if(!OpenTimer()) {
|
|
result = false;
|
|
}
|
|
}
|
|
|
|
LocaleBase = OpenLibrary(LOCALELIB_NAME, LIB_VERSION);
|
|
if (!LocaleBase) {
|
|
result = false;
|
|
}
|
|
|
|
if (LocaleBase) {
|
|
printf("Closing %s\n", LOCALELIB_NAME);
|
|
CloseLibrary(LocaleBase);
|
|
}
|
|
|
|
if (TimerBase) {
|
|
printf("Closing %s\n", TIMER_NAME);
|
|
CloseTimer();
|
|
}
|
|
|
|
if (UtilityBase) {
|
|
printf("Closing %s\n", UTILLIB_NAME);
|
|
CloseLibrary(UtilityBase);
|
|
}
|
|
|
|
if (MathIeeeDoubBasBase) {
|
|
printf("Closing %s\n", MATHLIB_NAME);
|
|
CloseLibrary(MathIeeeDoubBasBase);
|
|
}
|
|
|
|
if (DOSBase) {
|
|
printf("Closing %s\n", DOSLIB_NAME);
|
|
CloseLibrary(DOSBase);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|