about summary refs log tree commit diff stats
path: root/adapter
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-21 23:33:09 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-21 23:33:09 +0100
commit6ae8b1bbb0f172cb8c096b3e6792fc3766dbdb2d (patch)
tree8d246ea5c25d1252403644d4544259e19ba31656 /adapter
parent2e1f31470dd0bd092f2ebcbda9ddcdaa3067beb7 (diff)
downloadchawan-6ae8b1bbb0f172cb8c096b3e6792fc3766dbdb2d.tar.gz
gopher2html: do not use streams
Diffstat (limited to 'adapter')
-rw-r--r--adapter/format/gopher2html.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/adapter/format/gopher2html.nim b/adapter/format/gopher2html.nim
index 1004cc2c..a88acf53 100644
--- a/adapter/format/gopher2html.nim
+++ b/adapter/format/gopher2html.nim
@@ -2,7 +2,6 @@
 # Gopher directory -> HTML converter for Chawan.
 
 import std/os
-import std/streams
 import std/strutils
 
 include ../gophertypes
@@ -53,10 +52,9 @@ proc main() =
 </HEAD>
 <BODY>
 <H1>Index of """ & escapedURL & """</H1>""")
-  let ins = newFileStream(stdin)
   var ispre = false
-  while not ins.atEnd:
-    let line = ins.readLine()
+  while not stdin.endOfFile:
+    let line = stdin.readLine()
     if line.len == 0:
       break # invalid
     let tc = line[0]