awwx.ws

read-headers0

read headers terminated by an empty line

http://awwx.ws/read-headers0.arc:

(def read-headers ((o s (stdin)))
  (accum a
    (whiler line (readline s) blank
      (a line))))

Returns the list of headers read from the input stream (one per line), and the input stream is left at the position following the empty line (at the beginning of the body).

Prerequisites

This hack depends on arc3.1 and readline1.

License

Same as Arc.

Contact me

Twitter: awwx
Email: andrew.wilcox [at] gmail.com