Review the code for proper use of localized strings. Fix display code to
always output them as utf8. Recreate the localization template with the
strings currently in use. Convert all existing .po files to utf8. Run
msgmerge on all .po files to update strings to match the new template.
Due to my lack of experience in using gettext and subsequent avoidance
of messing with it, the localization data has not been updated in quite
some time and most strings have become obsolete. This unfortunately has
resulted in wasted effort from some translators, most recently @J0hsHH
and @Strahinja, to whom I can only offer an apology and an invitation to
review their translations.
Stop reading or creating the html_entities config file. libxml
htmlEntityLookup already knows about all the entities, so there is no
reason to make the user type them in manually.
The old format consisted of |-separated lines, one per feed. OPML is the
usual standard for RSS feed lists, and snownews included the opml2snow
utility to convert to and from it. This commit converts urls format to
native OPML, removing the need for the utility. The file is also renamed
from urls to urls.opml.
snownews kept configuration in ~/.snownews and the feed cache in
~/.snownews/cache. This commit moves configuration to ~/.config/snownews
and the cache to ~/.local/share/snownews, conforming to the XDG basedir
specification. snownews will migrate old settings to the new location.
Replace the custom HTTP client with a libcurl dependency. This
considerably increases snownews capabilities. Most importantly,
https feeds are now supported without using external downloaders.
A lot of code supporting the old HTTP client became obsolete
and was removed, including the direct zlib dependency.
This mainly changes the indentation level from 8 to 4 spaces,
because I have difficulty working with the wide indents.
There should be no non-whitespace changes here.
This was used only to report http errors. These are already
printed as part of feed status, and on the status bar after
the error occured. This commit changes to syslog calls.
Move all global struct definitions to main.h
Merge all global settings into struct settings
Prefix all global variables with _ to emphasize they are global
Reduce variable scope
Make functions static when possible
Make vars const when possible
Make vars unsigned when possible
Use bool type from stdbool.h
Rename some confusingly named variables (i.e. tmp, tmp2)
Prefer stack storage to same-scope malloc/free
Prefer enums for constants
Prefer sprintf to strcat and other tricks
Simplify redundant blocks
Simplify strtok flow
Remove unnecessary parentheses and braces
Replace some magic constants with clearer alternatives
Remove libm dependency (log10 in about.c)
Make highlight logic in interface.c more consistent
Fix wrong item being hashed in digcalc
Remove clear to reduce flicker
Use = {} for zero-initializing
Use calloc instead of malloc/manual zeroing
Make MainQuit be called with an error in a signal handler
Fix file opening modes to match intended use
Read and display error log in window instead of using pager
Remove non-ascii characters from setup.c; replace with hex codes
Recommended header wording copied from https://www.gnu.org/licenses/gpl-howto.html
The only two changes are to use the project name, Snownews,
instead of "this program", to clarify that the entire project is
under the GPL license, rather than only the file with the header.
The second change is to replace snail mail address with the license
URL. It is unreasonable to expect users to send an actual letter to
a US address if the user is in, say, Germany. Postage is expensive.