last stdlib cleanups

This commit is contained in:
Araq 2019-09-20 20:22:37 +02:00 • committed by Andreas Rumpf
commit 5abe880469
31 changed files with 136 additions and 42 deletions

View file

@ -9,6 +9,8 @@
## This module implements a simple proc for opening URLs with the user's
## default browser.
##
## Unstable API.
import strutils
@ -22,8 +24,10 @@ proc openDefaultBrowser*(url: string) =
##
## Under Windows, ``ShellExecute`` is used. Under Mac OS X the ``open``
## command is used. Under Unix, it is checked if ``xdg-open`` exists and
## used if it does. Otherwise the environment variable ``BROWSER`` is
## used if it does. Otherwise the environment variable ``BROWSER`` is
## used to determine the default browser to use.
##
## This proc doesn't raise an exception on error, beware.
when defined(windows):
var o = newWideCString("open")
var u = newWideCString(url)