[Top][All Lists]

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

Inconsistencies in hello.c

From: Roland Illig
Subject: Inconsistencies in hello.c
Date: Sat, 7 Mar 2020 19:50:04 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Thunderbird/74.0

Dear Hello developers,

as the German translator of hello, I wondered why there hasn't been a
release in the last few years. While browsing through the code in
hello.c, I noticed some inconsistent spacing:

>  atexit (close_stdout);
>  parse_options(argc, argv, &greeting_msg);
>  len = strlen(greeting_msg) + 1;

It looks as if some non-GNU developer had added the calls to
parse_options and strlen and a few others. The code should follow a
single formatting style.

While here, it looks simply wrong to call mbsrtowcs inside of main. The
former is a very low-level call, while the latter should provide the
top-level overview to the reader. That's a violation of abstraction
layers. Printing a multi-byte string should be extracted into a separate
function. Since that is not even specific to Hello, it should probably
be in Gnulib.

The comment above the call to setlocale looks entirely redundant to me.
What is its purpose?

The comment "Even exiting has subtleties" is probably even more correct
than intended. What happens if main returns an exit code 7, will that 7
be shadowed by close_stdout? That would be unexpected since Hello should
report the error that occurred first.

In the "while ((optc" loop, is it really considered good style to have a
while loop with such a long body and not use any braces?

I wonder why the "translation bugs" message is suppressed for English
locales. Even these can contain typos since the spelling differs for
some words and phrases.

By the way, the line numbers in de.po 2.10 differ by a large amount from
the current source code. It's probably time to send the current version
to the Translation Project. While here, it is not obvious to me where
the i18n translations are stored. Other projects typically store them in
the po/ directory, but that directory is essentially empty.

The last entry in po/ChangeLog is from 2011. That looks unrealisticly old.

https://lists.gnu.org/archive/html/bug-hello/2019-01/msg00001.html says
that there is probably a release "sometime within a week or few". That
has not happened yet, 14 months later.

That's all for now.


reply via email to

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