Diff of /libs/gtdrag/gtdrag.c [4fea5c] .. [261749]  Maximize  Restore

Switch to side-by-side view

--- a/libs/gtdrag/gtdrag.c
+++ b/libs/gtdrag/gtdrag.c
@@ -8,15 +8,6 @@
 
 #include "gtdrag_includes.h"
 
-
-struct ExecBase *SysBase;
-struct IntuitionBase *IntuitionBase;
-struct Library *DOSBase;
-struct GfxBase *GfxBase;
-struct Library *UtilityBase;
-struct Library *LayersBase;
-struct Library *GadToolsBase;
-struct Library *CyberGfxBase;
 
 struct MinList applist;
 struct MinList gadlist;
@@ -32,46 +23,6 @@
 struct MsgPort *dmport;
 struct SignalSemaphore ListSemaphore;
 struct Hook iffstreamHook,renderHook,treeHook;
-
-
-void PRIVATE GTD_Exit(void)
-{
-  if (dmport)
-  {
-    struct IntuiMessage *msg;
-
-    while(msg = (APTR)GetMsg(dmport))
-      FreeDropMessage(msg);
-    DeleteMsgPort(dmport);
-  }
-  CloseLibrary(CyberGfxBase);
-  CloseLibrary(GadToolsBase);
-  CloseLibrary(DOSBase);
-  CloseLibrary(IntuitionBase);
-  CloseLibrary((struct Library *)GfxBase);
-  CloseLibrary(LayersBase);
-  CloseLibrary(UtilityBase);
-}
-
-
-int PRIVATE GTD_Init(void)
-{
-  SysBase = *(struct ExecBase **)4;
-  IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",37);
-  DOSBase = OpenLibrary("dos.library",37L);
-  GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",37);
-  GadToolsBase = OpenLibrary("gadtools.library",37);
-  LayersBase = OpenLibrary("layers.library",37);
-  UtilityBase = OpenLibrary("utility.library",37);
-  CyberGfxBase = OpenLibrary("cybergraphics.library",41);
-
-  if (IntuitionBase && GfxBase && GadToolsBase && LayersBase && UtilityBase)
-  {
-    if (dmport = CreateMsgPort())
-      return(TRUE);
-  }
-  return(FALSE);
-}
 
 
 int PRIVATE CountNodes(struct List *l)
@@ -109,13 +60,13 @@
   struct MsgPort *iport;
   struct InputEvent *ie;
 
-  if (iport = CreatePort(NULL,NULL))
+  if ((iport = CreatePort(NULL,0)) != 0)
   {
-    if (ie = AllocMem(sizeof(struct InputEvent),MEMF_PUBLIC | MEMF_CLEAR))
+    if ((ie = AllocMem(sizeof(struct InputEvent),MEMF_PUBLIC | MEMF_CLEAR)) != 0)
     {
-      if (ireq = (struct IOStdReq *)CreateExtIO(iport,sizeof(struct IOStdReq)))
+      if ((ireq = (struct IOStdReq *)CreateExtIO(iport,sizeof(struct IOStdReq))) != 0)
       {
-        if (!OpenDevice("input.device",NULL,(struct IORequest *)ireq,NULL))
+        if ((!OpenDevice("input.device",0,(struct IORequest *)ireq,0)) != 0)
         {
           ie->ie_NextEvent = NULL;
           ie->ie_Class = IECLASS_RAWMOUSE;
@@ -139,5 +90,3 @@
     DeletePort(iport);
   }
 }
-
-

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks