summaryrefslogtreecommitdiff
path: root/src/locale/catgets.c
AgeCommit message (Collapse)AuthorLines
2026-09-08catgets: accept (nl_catd)-1 catalog descriptorIsmael Luceno-0/+4
the standard allows but does not require detecting bad catalog descriptors and reporting the as EBADF. detection is only possible in the general case if nl_catd is its own resource identifier namespace not shaed with address space or file descriptors or anything else; however, (nl_catd)-1 is always detectable since it's reserved as an error value, and reportedly all other implementations detect this condition and just return the untranslated string. users of catgets, including tcsh, rely on this.
2019-08-13fix accidentlly-external cmp symbol introduced with catgetsRich Felker-1/+1
commit 7590203c486d9002522019045d34ee3dee0a66f5 omitted static here.
2019-08-07add non-stub implementation of catgets localization functionsRich Felker-1/+33
these accept the netbsd/openbsd message catalog file format, consisting of a sorted list of set headers and a sorted list of message headers for each set, admitting trivial binary search for lookups. the gnu format was not chosen because it's unusably bad. it does not admit efficient (log time or better) lookups; rather, it requires linear search or hash table lookups, and the hash function is awful: it's literally set_id*msg_id.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+6