@@ -56,15 +56,10 @@ # include # include #endif #ifdef OF_AMIGAOS -# ifdef OF_AMIGAOS4 -# define __USE_INLINE__ -# define __NOLIBBASE__ -# define __NOGLOBALIFACE__ -# endif # include # include #endif #ifndef O_BINARY @@ -81,16 +76,10 @@ #endif #ifndef OF_AMIGAOS # define closeHandle(h) close(h) #else -# ifdef OF_AMIGAOS4 -extern struct ExecIFace *IExec; -static struct Library *DOSBase = NULL; -static struct DOSIFace *IDOS = NULL; -# endif - struct of_file_handle { of_file_handle_t previous, next; BPTR handle; bool append; } *firstHandle = NULL; @@ -114,18 +103,10 @@ OF_DESTRUCTOR() { for (of_file_handle_t iter = firstHandle; iter != NULL; iter = iter->next) Close(iter->handle); - -# ifdef OF_AMIGAOS4 - if (IDOS != NULL) - DropInterface((struct Interface *)IDOS); - - if (DOSBase != NULL) - CloseLibrary(DOSBase); -# endif } #endif #ifndef OF_AMIGAOS static int @@ -196,21 +177,10 @@ #ifdef OF_NINTENDO_DS if (!nitroFSInit(NULL)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif - -#ifdef OF_AMIGAOS4 - if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) - @throw [OFInitializationFailedException - exceptionWithClass: self]; - - if ((IDOS = (struct DOSIFace *) - GetInterface(DOSBase, "main", 1, NULL)) == NULL) - @throw [OFInitializationFailedException - exceptionWithClass: self]; -#endif } + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode {