/* Opens URL */ VOID OpenURL(STRPTR uri) { #ifdef HAVE_OPENURL struct Library *OpenURLBase; if ((OpenURLBase = OpenLibrary("openurl.library",0))) { #ifdef __AMIGAOS4__ struct OpenURLIFace *IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL); if (IOpenURL) { URL_OpenA(uri,NULL); DropInterface((struct Interface*)IOpenURL); } else { /* No interface, so call it manualy */ EmulateTags(OpenURLBase, ET_Offset, -30, ET_RegisterA0, uri, ET_RegisterA1, NULL, ET_RegisterA6, OpenURLBase, ET_SaveRegs, TRUE, TAG_DONE); } #else URL_OpenA(uri,NULL); #endif CloseLibrary(OpenURLBase); } #endif }
ULONG URL_Open(STRPTR url, Tag tag1, ...) { return URL_OpenA(url, (struct TagItem *)&tag1); }