xlog-discussion
[Top][All Lists]
Advanced

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

Re: [Xlog-discussion] RE: Hold your (xlog-) horses - suggestion


From: Tomi Manninen
Subject: Re: [Xlog-discussion] RE: Hold your (xlog-) horses - suggestion
Date: Tue, 8 Jan 2002 02:27:21 +0200 (EET)

On Tue, 8 Jan 2002, Stephane Fillod wrote:

> > Joop, wouldn't '\n' serve as a bit more natural field separator? Just a 
> > thought...
> 
> Yes, this may be more natural, but this would prevent some fields like the
> comment being on multiple lines.

Is that something that is really needed? Gmfsk doesn't allow multiple line 
comments but of course some other program might.

> So, why not using '\0' one would say?
> Well, because there's this damn glib g_strsplit function that reserves the
> '\0' for the end of the string. After all, it's just about aesthetic, and
> I'm pretty sure '\1' will do the job as well :)

My point was actually mostly about aesthetics which I tend to overstress
at times... Another thing was that it would make a debug printf() much
easier to implement if needed. :)

Oh, by the way, the "specification" should imho also state that the
message length (msgsz param of msgsnd() and consequently the return value
of msgrcv()) should match the actual message (terminating NUL character
included).

As it happens, with the above it would actually be possible to implement
your own strsplit that uses '\0'. But that's probably too much trouble and
no gain...

-- 
Tomi Manninen           Internet:  address@hidden
OH2BNS                  AX.25:     address@hidden
KP20ME04                Amprnet:   address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]