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 tag is part of the content module for RSS specification, available
at https://web.resource.org/rss/1.0/modules/content/. The specification
has never been officially approved and is still listed as a draft, but
some sites (such as hackaday) use it instead of putting item text into
the description tag like everyone else does. Closes#52.
This implements straightforward UTF8 to wchar_t to charcell drawing,
sufficient to display languages without nonspacing characters. Those are
all european languages, chinese, and japanese. Languages requiring
multiple characters per cell or complex layout rules are not supported
and can not be supported without a full layout engine, which I am not
qualified to write. Closes#33.
Non-ascii characters must be escaped in XML elements, so that's what
snownews was doing, resulting in unicode strings being converted to HTML
char codes. In the original feed, these are wrapped in a CDATA element,
which is what this commit does, reducing cache file size.
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.
Filters and the browser may write error messages to stderr, which
garbles the curses display. This commit redirects stderr descriptor to
/tmp/snownews.log. If no errors are printed, the log file remains empty
and snownews will delete it on exit. Fixes#31
Accept repository from #kouya, the original author, who no longer has the
time to maintain it. State in the README that the project is once again
being actively maintained. Update maintainer link in the crash printout.
* Add DESTDIR support. Closes issue #39
* Install directories separately from files.
install command on primitive platforms like BSD does not
support the -D flag, so destination directories must be
created separately. Fixes issues #36 and #49
* Add installdirs target.
In addition to the above, installdirs target conforms to
GNU makefile conventions.
* Make CFLAGS and LDFLAGS overridable in the Makefile.
This is done the same way as with DESTDIR, using make CFLAGS=-w,
which will override CFLAGS for this one build. CFLAGS variable in
the Config.mk now contains only the optional flags, the warnings,
and the cflags variable that Makefile uses appends CFLAGS so
that it can override hardcoded flags in Config.mk. Note that
configure does not look at CFLAGS environment variable; this is
only for running make. This closes issue #43
* Check for pkg-config not being installed and don't call it then.
I didn't check for empty output of which when I wrote this last.
Should detect no pkg-config properly now and fall back to
default subs. Fixes issues #35 and #41
Normally rand is only used in santa_hunta, where rng quality is
unimportant. If /dev/random is unavailable, however, rand is
used during digest authentication, where it is important.
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.
Use pkg-config to get libraries and cflags
More dir options for configure
configure behaves more like autoconf
config.status remembers configure flags
Separate builddir
Automatic dependency generation
Wildcard source discovery
Dependency based installation
uninstall target
Fix openssl MD5 hash calculations; context struct is private
and must be created with helper functions.
Add -Wextra to compile flags and fix all warnings.