To build discount, untar your selected tarball, cd into the directory it creates, then do
configure.sh
to generate your Makefiles. After doing this, amake
should give you a functional stack of programs and libraries.Discount builds, for me, on MacOS 10.12, FreeBSD 4.8, NetBSD 8, Minix 3, and Debian Linux (dunno which version, but it’s a
systemd
joint that’s running a 3.10 kernel.) It may build on SLS Linux and Windows with mingw, but I’m not sure about that.
There was a decade-old bug in my paranoid malloc where I was using acalloc to grab the raw data buffer for amalloc, thus initializing it to null and hiding a bunch of places where I wasn’t null-terminating a string.
3.0.1.2 corrects that, and adds a new #define – COMPLETE(x)
, which adds a
null terminator to a Cstring – that I’m using to explicitly null terminate
strings instead of EXPAND(s) = 0; S(s)--;
, which is enough extra code so I
might forget it.
And of course there were a bunch of new strings that I forgot to terminate in version 3.0.1 …
3.0.1.1 corrects that defect. Sigh.
Whew, where do I begin?
mkd_flag_t
structure and replaced it with
a blob, the old flags are now a pointer and using the mkd_flag_isset()
,
mkd_set_flag()
, and mkd_clr_flag()
functions I introduced during
the end of the run for version 2.x.x is now mandatory unless you’re
fond of core dumps.{...}
bracketed
block immediately after the link. As before, I couldn’t figure out a
way to export just a patch from github, so I worked it into the code
using their original code as a reference.isspace()
by putting in a version that dumped core if the input
character was outside the ranges of EOF or 0x00..0xff (I deliberately
use the word broken because it broke the principle of least surprise,
which either nobody cares about or is trying maliciously to stop people
from using C anymore.) Fortunately could patch around this misbehavior
by detecting it in configure.sh
and telling the compiler (clang and gcc;
dunno about other compilers) to make the default character unsigned.Version 2,x.x releases are still available and can be found in the archives.