Don Cragun wrote:
> From: "Garrett D'Amore" <gdamore at sun.com>
> > I. Szczesniak wrote:
>   ... ... ...
> >> Could you elaborate the difference between Committed and Committed 
> >> Obsolete?
> >>
> >
> > Committed Obsolete means we can't remove it, but you're still
> > discouraged from using it in new code.  That's the case with -b -- it is
> > used to indicate a count in blocks (512 bytes), but the option was
> > removed from the POSIX standard over confusion about what was meant by a
> > "block" (is it a block of bytes, or a block of characters?)
> >
>   ... ... ...
> >
> >     -- Garrett
> 
> Garrett,
> I think you misread the tail rationale in the POSIX standard.
> SVID3 had a -b option that counted 512-byte blocks; BSD had a -b option
> that counted 1024-byte blocks.  The -b option wasn't removed from POSIX;
> it was never added in the first place due to this difference in
> behavior.

Erm... that was my fault... I thought that "-b" was defined by POSIX
long long ago. Sorry about that.

> The SVID3 and XPG3 -c options counted in bytes, but the documentation
> said it counted characters (I don't remember what the BSD tail man page
> said).  The POSIX committee briefly considered changing the -c option to
> be -b when the description of -c changed from "characters" to "bytes",
> but left it as -c because historical implementations had the -b option
> counting blocks even though it wasn't going to be specified by the
> standard.
> 
> The standard does not currently specify a way to count (multi-byte)
> characters even though this means tail output may start or end in the
> middle of a multi-byte character when using the -c option.

Is this even possible to specify characters in this case ? AFAIK the
multibyte API doesn't have a way to seek into a random position in a
file and then find the start of the next multibyte character (it works
for UTF-8 but I am not sure for older encoding systems).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

Reply via email to