scummvm/backends/platform/PalmOS/Src/init_mathlib.cpp
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00

29 lines
553 B
C++

#include <PalmOS.h>
#include "globals.h"
#include "init_mathlib.h"
#include "mathlib.h"
Err MathlibInit() {
Err e;
if ((e = SysLibFind(MathLibName, &MathLibRef)))
if (e == sysErrLibNotFound) // couldn't find lib
e = SysLibLoad(LibType, MathLibCreator, &MathLibRef);
if (e) return sysErrLibNotFound;
e = MathLibOpen(MathLibRef, MathLibVersion);
return e;
}
void MathlibRelease() {
UInt16 useCount;
if (MathLibRef != sysInvalidRefNum) {
MathLibClose(MathLibRef, &useCount);
if (!useCount)
SysLibRemove(MathLibRef);
}
}