summaryrefslogtreecommitdiff
path: root/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-09 15:15:33 +0000
committerManolo Gouy <Manolo>2016-04-09 15:15:33 +0000
commit8b672ee655aaee8e8a2002643846147997a8eaf8 (patch)
tree1fd6d1e4d47273cf4a022f69f466d3bd7aa59a91 /src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
parentd98a8e13e6eff36e3b428b5e5cb93019e23d644b (diff)
Rewrite fl_open_uri.cxx under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Darwin/Fl_Darwin_System_Driver.cxx')
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index 2584a21c7..c8c8c0c32 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -143,6 +143,16 @@ const char *Fl_Darwin_System_Driver::getpwnam(const char *login) {
return pwd ? pwd->pw_dir : NULL;
}
+int Fl_Darwin_System_Driver::open_uri(const char *uri, char *msg, int msglen)
+{
+ char *argv[3]; // Command-line arguments
+ argv[0] = (char*)"open";
+ argv[1] = (char*)uri;
+ argv[2] = (char*)0;
+ if (msg) snprintf(msg, msglen, "open %s", uri);
+ return run_program("/usr/bin/open", argv, msg, msglen) != 0;
+}
+
//
// End of "$Id$".