Hi Binand,

  Thanks. Your [[:space:]] did the trick. I always thought the "\t" and
"\s" matched multiple white space characters ( tab or space ) and should
have been equivalent to [[:space:]]

  ----
from RFC 822

3.1.1.  LONG HEADER FIELDS

        Each header field can be viewed as a single, logical  line ...
        For convenience, the field-body  portion  of  this  conceptual
        entity  can be split into a multiple-line representation; this
        is called "folding".  The general rule is that wherever  there
        may  be  linear-white-space  (NOT  simply  LWSP-chars), a CRLF
        immediately followed by AT LEAST one LWSP-char may instead  be
        inserted.  Thus, the single line

        Unfolding  is  accomplished  by
        regarding   CRLF   immediately  followed  by  a  LWSP-char  as
        equivalent to the LWSP-char.

  ---

On Fri, 12 Jan 2001, Binand Raj S. wrote:
> 
> in_headers = true;
> while (in_headers) {
>    read (line);
>    if (matches (line, '^$'))
>       in_headers = false;
>    else if (matches (line, '^[[:alpha:]]*:'))
>       register_new_header (line);
>    else if (matches (line, '^[[:space:]]'))
>       continue_last_header (line);
>    else
>       handle_header_format_error();
> }
> should work.
   it does ;)


sreangsu


----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/LIH

Reply via email to