Deutsch English Français Italiano |
<uve674$32826$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Chris Ahlstrom <OFeem1987@teleworm.us> Newsgroups: comp.os.linux.advocacy Subject: Re: GNU/Linux is the Empowerment of the PC. So What Do You Do? Date: Sat, 13 Apr 2024 10:52:18 -0400 Organization: None Lines: 67 Message-ID: <uve674$32826$1@dont-email.me> References: <uuun8r$9j84$1@solani.org> <17c417d563439fed$44$3121036$802601b3@news.usenetexpress.com> <uuvhaq$921c$1@solani.org> <17c43fa6cd7d5d2d$59197$3716115$802601b3@news.usenetexpress.com> <uv15ob$au8o$1@solani.org> <noaa1j9a6sotdd3p3k7fiere1jlrv2ksjd@4ax.com> <uv3m0i$9rl4$1@dont-email.me> <uv75pm$189rd$1@dont-email.me> <uv77vu$18mn2$1@dont-email.me> <l7oniiF3q2nU1@mid.individual.net> <uv8m57$1mgad$1@dont-email.me> <uv8sbv$1nvo2$1@dont-email.me> <uv9fh9$1s89v$2@dont-email.me> <2fkg1j1bq7291jl07o13s32l9r2abd3t7c@4ax.com> <uvb7on$2bjoi$2@dont-email.me> <uvbc9g$2c2fr$1@dont-email.me> <uvbn68$2etra$1@dont-email.me> <l7ted1Fpem6U1@mid.individual.net> <uvc1aa$2h40t$1@dont-email.me> <uvcfk9$2k2he$1@dont-email.me> Reply-To: OFeem1987@teleworm.us Injection-Date: Sat, 13 Apr 2024 16:52:21 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6d65c5800a683851d97a4d16e4320571"; logging-data="3219526"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cjLSE0FlVeEqPPV3lBpAG" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:z8uHG9U/bCJ69aX9CNTm7M8uX9Q= X-User-Agent: Microsoft Outl00k, Usenet K00k Editions X-Mutt: The most widely-used MUA X-Slrn: Why use anything else? Bytes: 4074 vallor wrote this copyrighted missive and expects royalties: > On Fri, 12 Apr 2024 15:16:26 -0400, Chris Ahlstrom <OFeem1987@teleworm.us> > wrote in <uvc1aa$2h40t$1@dont-email.me>: > >> rbowman wrote this copyrighted missive and expects royalties: >> >>> On Fri, 12 Apr 2024 12:23:37 -0400, DFS wrote: >>> >>>> It's common knowledge MS used the BSD FOSS TCP/IP code, but they wrote >>>> their own brand new implementation 16 frickin' years ago. That's >>>> sixteen. >>> >>> And winsock.h still is a little strange. >> >> All windows headers are bloated monstrosities. Ya better just include >> the massive universe of <windows.h> :-D > > That doesn't sound very POSIX, but I might be biased (see domain name). > >> On the other hand, GNU code is full of IFs ANDs BUTs and MAYBEs. >> >> Jesus the gettext headers and code are ... obtuse. > > But how often do you have to go into those? Don't you just enable > a feature macro and Bob's your uncle? I want to parse .mo files without using the GNU API for that. First you have to figure out what the code does. There's the rub. Let's say you want to figure out how a function like ngettext() works. You find two files: intl/ngettext.c and src/ngettext.c. In the first one, #ifdef _LIBC then NGETTEXT is defiend as __ngettext, otherwise it is defined as libintl_ngettext. Then GETTEXT (const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); } where DCNGETTEXT is defined as __dcngettext or libintl_dcngettext. Also __ngettext is a "weak_alias" for ngettext, or maybe vice versa. Now we look in intl/dcngettext.c and find macros similar to the above. And then DCNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category) { return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); } At this point I want to kick Ulrich Drepper's ass! In dcigettext.c we find more macros and finally the dcigettext() function. It's chock full of conditional macros, uses some lock/unlock code and indirection galore. About 460 lines of crappily-indented code. Supported by a number of other functions loaded with pointer arguments, including another 400+ liner. You bet your roots toots it's tons of fun! -- Avoid reality at all costs.