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. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils