mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
2deb870e60
FossilOrigin-Name: 7a7f047431c56d94272e54fe7380ab427a76ef8b067fcdf1131bf5d0d0952d7f
27 lines
393 B
Text
27 lines
393 B
Text
# Gopher
|
|
|
|
RETRO has Gopher support via `gopher:get`.
|
|
|
|
Takes:
|
|
|
|
destination
|
|
server name
|
|
port
|
|
selector
|
|
|
|
Returns:
|
|
|
|
number of characters read
|
|
|
|
~~~
|
|
{{
|
|
'Gopher var
|
|
:identify
|
|
@Gopher n:zero? [
|
|
#5 io:scan-for dup n:negative?
|
|
[ drop 'IO_DEVICE_TYPE_0005_NOT_FOUND s:put nl ]
|
|
[ !Gopher ] choose ] if ;
|
|
---reveal---
|
|
:gopher:get identify #0 @Gopher io:invoke ;
|
|
}}
|
|
~~~
|