summaryrefslogtreecommitdiff
path: root/lib/std/dialparse+posixy.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-12-04 12:14:13 -0800
committerOri Bernstein <ori@markovcorp.com>2017-12-04 12:16:15 -0800
commitecdf6cac8376af2b0b52c14025ccaa0c4c91a843 (patch)
tree11b715a7ba61a47c4cc24b7e5040d28b8a07252a /lib/std/dialparse+posixy.myr
parentebbdfc2631ac5876397ccc52453b69cfd223c95d (diff)
downloadmc-ecdf6cac8376af2b0b52c14025ccaa0c4c91a843.tar.gz
We don't need std.sleq any more.kill-sleq
Diffstat (limited to 'lib/std/dialparse+posixy.myr')
-rw-r--r--lib/std/dialparse+posixy.myr11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/std/dialparse+posixy.myr b/lib/std/dialparse+posixy.myr
index 2d0a695..be68b9f 100644
--- a/lib/std/dialparse+posixy.myr
+++ b/lib/std/dialparse+posixy.myr
@@ -3,13 +3,14 @@ use "chartype"
use "hasprefix"
use "intparse"
use "slcp"
-use "sleq"
use "strfind"
use "striter"
use "option"
use "result"
use "ipparse"
use "resolve"
+use "traits"
+use "hashfuncs"
pkg std =
pkglocal const parseport : (port : byte[:] -> option(uint16))
@@ -22,13 +23,13 @@ const parseport = {port
| `Some n: -> `Some n
| `None:
/* a small number of hardcoded ports */
- if sleq(port, "http")
+ if eq(port, "http")
-> `Some 80
- elif sleq(port, "https")
+ elif eq(port, "https")
-> `Some 443
- elif sleq(port, "ircd")
+ elif eq(port, "ircd")
-> `Some 6667
- elif sleq(port, "dns")
+ elif eq(port, "dns")
-> `Some 53
;;
;;