[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: armour pierced with PGP 8 arrow

On Thu, Dec 11, 2003 at 02:01:29PM -0500, Ian Grigg wrote:
> Such as:
> Version: 1.0.0 non-commercial, upgrade to
> Version: 2.0.0-commercial
> When the line slicing behaviour is set to (about) column 42.

If I have to set my line width to 42, your mail system is so broken
that I don't need to talk to it. 72 is reasonable, and and one should 
expect lines exceeding 80 characters to be wrapped. Anything under 68 is
unreasonably small. I, for example, am using 72 character lines in my
editor (vim).

> > This isn't very complicated.  I'd be quite surprised to hear of any
> > parser that didn't do:
> > 
> > a) Find the leftmost colon-space.
> > b) The string to the left is the key.
> > c) The string to the right is the value.
> How do parsers handle the above case?  Not that it's

Do a) with strchr(3) or memchr(3) by finding a colon and then check that
the next character is a space. If it's not, abort the message. The
code is:

if (!(ptr=(uint8_t *)memchr(line, ':', sizeof(line))) || ptr[1]!=' ')

> important.

Brian M. Carlson <sandals@xxxxxxxxxxxxxxxxxxxxxxx> 0x560553e7

Attachment: signature.asc
Description: Digital signature