summaryrefslogtreecommitdiff
path: root/frontends/amiga/libs.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/amiga/libs.c')
-rw-r--r--frontends/amiga/libs.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 30694542c..305818076 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -23,6 +23,7 @@
#include "utils/utils.h"
#include "utils/log.h"
+#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/utility.h>
@@ -56,11 +57,11 @@
#ifdef __amigaos4__
#define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \
- LOG("Opening %s v%d", LIB, LIBVER); \
+ NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \
if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \
I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, INTERFACE, INTVER, NULL); \
if(I##PREFIX == NULL) { \
- LOG("Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \
+ NSLOG(netsurf, INFO, "Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \
AMINS_LIB_CLOSE(PREFIX) \
if(FAIL == true) { \
STRPTR error = ASPrintf("Unable to open interface %s v%d\nof %s v%ld (fatal error - not an OS4 lib?)", INTERFACE, INTVER, LIB, LIBVER); \
@@ -70,7 +71,7 @@
} \
} \
} else { \
- LOG("Failed to open %s v%d", LIB, LIBVER); \
+ NSLOG(netsurf, INFO, "Failed to open %s v%d", LIB, LIBVER); \
if(FAIL == true) { \
STRPTR error = ASPrintf("Unable to open %s v%ld (fatal error)", LIB, LIBVER); \
ami_misc_fatal_error(error); \
@@ -90,13 +91,13 @@
struct PREFIX##IFace *I##PREFIX = NULL;
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
- LOG("Opening %s v%d", CLASS, CLASSVER); \
+ NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \
if((PREFIX##Base = OpenClass(CLASS, CLASSVER, &PREFIX##Class))) { \
if(NEEDINTERFACE == true) { \
- LOG(" + interface"); \
+ NSLOG(netsurf, INFO, " + interface"); \
I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, "main", 1, NULL); \
if(I##PREFIX == NULL) { \
- LOG("Failed to get main interface v1 of %s", CLASS); \
+ NSLOG(netsurf, INFO, "Failed to get main interface v1 of %s", CLASS); \
} \
} \
} \
@@ -118,10 +119,10 @@
#else
#define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \
- LOG("Opening %s v%d", LIB, LIBVER); \
+ NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \
if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \
} else { \
- LOG("Failed to open %s v%d", LIB, LIBVER); \
+ NSLOG(netsurf, INFO, "Failed to open %s v%d", LIB, LIBVER); \
if(FAIL == true) { \
STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", LIB, LIBVER); \
ami_misc_fatal_error(error); \
@@ -137,7 +138,7 @@
struct PREFIX##Base *PREFIX##Base = NULL;
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
- LOG("Opening %s v%d", CLASS, CLASSVER); \
+ NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \
if((PREFIX##Base = OpenLibrary(CLASS, CLASSVER))) { \
PREFIX##Class = CLASSGET##_GetClass(); \
} \
@@ -219,6 +220,7 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("asl.library", 37, Asl, "main", 1, true)
AMINS_LIB_OPEN("datatypes.library", 39, DataTypes, "main", 1, true)
AMINS_LIB_OPEN("diskfont.library", 40, Diskfont, "main", 1, true)
+ AMINS_LIB_OPEN("dos.library", 37, DOS, "main", 1, true)
AMINS_LIB_OPEN("gadtools.library", 37, GadTools, "main", 1, true)
AMINS_LIB_OPEN("graphics.library", 40, Graphics, "main", 1, true)
AMINS_LIB_OPEN("icon.library", 44, Icon, "main", 1, true)
@@ -321,6 +323,7 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(Asl)
AMINS_LIB_CLOSE(DataTypes)
AMINS_LIB_CLOSE(Diskfont)
+ AMINS_LIB_CLOSE(DOS)
AMINS_LIB_CLOSE(GadTools)
AMINS_LIB_CLOSE(Graphics)
AMINS_LIB_CLOSE(Icon)