changeset 1115:03cd2f3e929d

Fixed a documentation and template error regarding dw_browse() return code. Also fixed the Windows success return code to match what is expected. And switched to using the error constants for returns.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 04 Aug 2011 21:34:53 +0000
parents e3f0528f6c16
children 36773e04245c
files mac/dw.m template/dw.c win/dw.c
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Sat Jul 30 00:48:56 2011 +0000
+++ b/mac/dw.m	Thu Aug 04 21:34:53 2011 +0000
@@ -9228,5 +9228,5 @@
 {
     NSURL *myurl = [NSURL URLWithString:[NSString stringWithUTF8String:url]];
     [[NSWorkspace sharedWorkspace] openURL:myurl];
-    return 0;
-}
+    return DW_ERROR_NONE;
+}
--- a/template/dw.c	Sat Jul 30 00:48:56 2011 +0000
+++ b/template/dw.c	Thu Aug 04 21:34:53 2011 +0000
@@ -3372,9 +3372,9 @@
  * Parameters:
  *       url: Uniform resource locator.
  * Returns:
- *       DW_ERROR_NONE (0) on success.
+ *       DW_ERROR_UNKNOWN (-1) on error; DW_ERROR_NONE (0) or a positive Process ID on success.
  */
 int dw_browse(char *url)
 {
-    return DW_ERROR_GENERAL;
+    return DW_ERROR_UNKNOWN;
 }
--- a/win/dw.c	Sat Jul 30 00:48:56 2011 +0000
+++ b/win/dw.c	Thu Aug 04 21:34:53 2011 +0000
@@ -10001,8 +10001,8 @@
 
    retcode = (int)ShellExecute(NULL, "open", browseurl, NULL, NULL, SW_SHOWNORMAL);
    if(retcode<33 && retcode != 2)
-      return -1;
-   return 1;
+      return DW_ERROR_UNKNOWN;
+   return DW_ERROR_NONE;
 }
 
 /*