(import "msvcrt.dll")

(usefun "fopen" "pointer")
(usefun "fgetc" "int")
(usefun "feof" "int")
(usefun "fclose" "int")
(usefun "printf" "int")
(usefun "exit" "int")
(usefun "getchar" "int")

(defun read-the-file (fp) 
   (set ch (fgetc fp))
   (cond (not (feof fp)) (
      (printf "%c" ch)
      (read-the-file fp)
   ))
)

(printf "Hello, world!\n")

(set fp (fopen "hello2.txt" "r"))

(cond (not (feof fp)) ( 
   (read-the-file fp)
   (fclose fp)
)
   (print "not open...\n")
)
