2018-11-22 16:43:41 +01:00
|
|
|
# Gopher
|
|
|
|
|
|
|
|
RETRO has Gopher support via `gopher:get`.
|
|
|
|
|
|
|
|
Takes:
|
|
|
|
|
|
|
|
destination
|
|
|
|
server name
|
|
|
|
port
|
|
|
|
selector
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
|
|
|
number of characters read
|
|
|
|
|
|
|
|
~~~
|
2018-11-23 21:38:46 +01:00
|
|
|
{{
|
2019-12-09 20:37:26 +01:00
|
|
|
'Gopher var
|
2018-11-23 21:38:46 +01:00
|
|
|
:identify
|
2020-11-19 20:33:47 +01:00
|
|
|
@Gopher n:zero? 0; drop
|
2018-11-23 21:38:46 +01:00
|
|
|
#5 io:scan-for dup n:negative?
|
|
|
|
[ drop 'IO_DEVICE_TYPE_0005_NOT_FOUND s:put nl ]
|
2020-11-19 20:33:47 +01:00
|
|
|
[ !Gopher ] choose ;
|
2019-12-09 20:37:26 +01:00
|
|
|
---reveal---
|
|
|
|
:gopher:get identify #0 @Gopher io:invoke ;
|
2018-11-23 21:38:46 +01:00
|
|
|
}}
|
2018-11-22 16:43:41 +01:00
|
|
|
~~~
|