This patch of my had a reversal of the check for success.  I took an
opportunity to beautify the code a little bit too.

Enjoy,
Ilya

--- ./src/LYUtils.c~    Sun Feb 18 17:27:00 2001
+++ ./src/LYUtils.c     Tue Feb 20 00:59:38 2001
@@ -7823,21 +7823,20 @@ PUBLIC int put_clip ARGS1(char *, s)
     }
 
     morph_PM();
-    if(!hab) {
-      fail:
-       DosFreeMem((PPVOID)&pByte);
-        return ret;
-    }
+    if(!hab)
+        goto fail;
 
     WinOpenClipbrd(hab);
     WinEmptyClipbrd(hab);
-    if (!WinSetClipbrdData(hab, (ULONG) pByte, CF_TEXT, CFI_POINTER))
+    if (WinSetClipbrdData(hab, (ULONG) pByte, CF_TEXT, CFI_POINTER))
        ret = 0;
     WinCloseClipbrd(hab);
     unmorph_PM();
-    if (ret != 0)
-        goto fail;
-    return 0;
+    if (ret == 0)
+       return 0;
+  fail:
+    DosFreeMem((PPVOID)&pByte);
+    return EOF;
 }
 
 static int clip_open;

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]

Reply via email to