bug-coreutils
[Top][All Lists]
Advanced

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

Re: Where can i get the design documentation for core utils?


From: Alfred M\. Szmidt
Subject: Re: Where can i get the design documentation for core utils?
Date: Sun, 11 Sep 2005 10:05:17 +0200

   Unfortunately, the source code does not always have the internal
   documentation it should, and can be quite hard to follow.  An
   excellent example of this is sort.c.

Bad example, sort.c is trivial to follow and understand.

   The problem is not confined to coreutils.  GNU libc, for instance,
   does not provide any documentation whatsoever on how it handles
   locales internally.  Locales are compiled from human-readable
   standard format to a completely undocumented internal format.  For
   some spectacularly unreadable code, look at the source for strcoll
   and strxfrm.

I just did, quite easy to follow (strcoll just calls strcoll_l, same
deal for strxfrm).  If you meant the strcoll_l/strxfrm_l functions,
you might have a point, but then, string handling of any kind in C is
hairy.  Understanding what str{coll,xfrm} do will help you understand
what the code does, and how it does it.  As for how locales are
compiled (not my turf in libc land), no idea, but I doubt that format
is "completely undocumented".

I think you are just not proficient in C to understand a bit more
complex C code, and wish to have a crutch called `internal
documentation'.

Cheers.




reply via email to

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