Commit Graph
33 Commits
Author SHA1 Message Date
jessica parsons 5e2f73aec4 update my name to the current one 2024-03-29 23:41:29 -07:00
David Seifert 7afa5c6242 Make C99 clean
* Clang 16 (and likely GCC 14) will enforce strict C99 semantics
  and break old K&R C declarations and require correct C89
  function prototypes.

Bug: https://bugs.gentoo.org/870952
Clang: https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213/9
2022-10-27 11:08:49 -07:00
david parsons 4cdcac0d90 by request change the document type from html 4.0 to whatever the current version of html is (currently 5) 2022-06-19 17:47:30 -07:00
Yuri Chornoivan 38282592fc Fix minor typos 2020-05-01 19:58:40 +03:00
david parsons 5a4f0170ca mkd2html wasn't properly handling two arguments for input & output files. While I was at it, add the -G option to use gfm_in() to read the input file in (and preserve newlines) 2019-04-15 08:24:53 -07:00
david parsons 2be654fdeb mkd2html wasn't passing pgm to hoptusage() 2019-04-12 11:47:08 -07:00
david parsons cf74d6d218 make all instances of 'main()' be integer functions (sigh) 2018-09-16 14:41:42 -07:00
david parsons dfa77baba7 (the return from notspecial() was reversed) 2017-02-04 23:56:46 -08:00
david parsons 1c712469dd Make a new function (hoptusage()) to fabricate an uptodate usage: ...
message based on opts[] instead of relying on a hardcoded usage string.
2017-02-02 20:43:18 -08:00
david parsons eaafb13ada Add --h1-title as an option to configure.sh; this enables code that uses
the first h1 in a document as the document title (in mkd2html & theme)
2017-01-24 15:47:57 -08:00
david parsons 27eaf25b3b Fix a long standing typo in the header comment :-) 2017-01-23 16:05:48 -08:00
david parsons c422422032 Use gethopt() to process command-line options instead of doing it by hand. 2017-01-23 16:03:09 -08:00
david parsons ed64333f38 Make the horrible inline options parsing for mkd2html a teeny bit more
robust by not bothering to look for options unless there are at least
two arguments left in argv[]
2017-01-22 00:15:41 -08:00
david parsons afb2660145 Always generate a <title> for the html header, even if it doesn't contain anything 2016-12-26 20:37:16 -08:00
david parsons 196a7aea97 Revert changes that somehow worked their way into the code (patch
applied on github that was not pulled to the master.  Grr.)
2014-01-22 02:11:17 -08:00
david parsons 22fd0cb385 change domain from pell.chi.il.us to pell.portland.or.us 2014-01-08 16:15:49 -08:00
Nathan Phillip Brink 23115c7a7b Use charset=utf-8 instead of charset-utf-8 in mkd2html’s Content-Type http-equiv.
This way, user agents (tested with SeaMonkey 2.20) will actually see
and respect the indication that utf-8 should should be used instead of
its default (Western?).
2013-10-23 05:07:41 +00:00
david parsons 76d070845c Emit pages in utf-8 instead of us-ascii (simply a change to the Content-Type meta) 2013-10-22 09:27:04 -07:00
david parsons c190405204 Incorrect bounds check when walking argv[] 2013-03-27 22:30:08 -07:00
david parsons e645861ae2 Tweaks to argument handling 2012-03-07 08:40:42 -08:00
david parsons 6eacbc931b I macro if(e) into if( (e) ) if gcc or clang are detected 2012-01-24 09:53:51 -08:00
david parsons 094b09800e 1. In configure.inc, check for (and comment disapprovingly) if someone is inflicting clang on discount.
2. strip types off `main()`s so that stupid clang won't die.
2011-10-06 23:26:33 -07:00
David Parsons 8ca7a50e70 mkd_text() is now mkd_generateline(); the new
function `mkd_line()` formats a line into a string,
similarly to `mkd_toc()`, `mkd_xml()`, and so on.

There are a whole bunch of new public functions now,
so I'm pushing the version up to 1.4.0
2009-05-12 10:49:51 -07:00
david parsons 5c6115c601 1. Add the new amalloc module, which (if enabled with
--enable-amalloc) replaced malloc and its ilk with
    versions that attempt to maintain a linked list of
    allocated blocks that can be printed to stderr with
    the `adump()` function.

2.  Clean up a couple more places where I leak memory
    during the first level parse.

3.  tweak cstring.h to try to chase down places where
    the C compiler might optimize EXPAND() into producing
    broken code.
2008-04-03 11:22:07 -07:00
david parsons 41c153a48a Replace all alloca()s with malloc() 2008-03-13 16:49:46 -07:00
david parsons dd79f848b7 1. version[] -> markdown_version[]
2. clean up \-escapes so that only special characters will be escaped.
 3. Use the entity &#0; as a token break.
 4. check for the existance of goddamn gcc
2008-02-18 10:09:23 -08:00
david parsons 52bc316ff9 1. in mkdio.h, tweak the MMIOT abstract type from `void\*'' to `void''.
2. in `theme.c` ...
    1. use a keyword table instead of an inline islike() cascade.
    2. make `?theme source?` print the **basename** of the pagename, and
    3. add the new `?theme path?` to print the dirname of the pagename
3. when configuring, check for a sane (reentrant) `basename()` function.
4. when giving the package version#, say `discount` instead of `markdown`
2008-01-23 11:43:54 -08:00
David Parsons 20dc07feb2 1. lowercase tag names for better compatability with anal-retentive
newer web standards.
2. clean up the usage comment and example in the header.
2008-01-13 11:27:46 -08:00
david parsons bbbf1d03e7 In mkd2html, don't #include <libgen.h> unless the system has it.
Also in mkd2html, define a `basename()` if the system doesn't have it.
2008-01-13 01:44:41 -08:00
David Parsons 880d338ffb 1. Trim back leading spaces when returning fields from the document header.
2. `#include <string.h>` in cstring.h so we can get the prototype for
   `memmove()`
3. Update the mkd2html test program.
2008-01-13 01:40:33 -08:00
david parsons 7701fda2ee Remember how I said that the 0.9 published interface was likely to be
the official published interface for version 1.0?  I lied.
2008-01-11 15:42:13 -08:00
david parsons 3fc49328f3 Rework the published interface.
1. Officially expose mkd_compile(), mkd_cleanup(),
       mkd_generatehtml().
    2. Internally use the new Document structure, which
       hold the markup and (optionally) header information.
    3. Support ``--enable-<foo>`` during configure.sh
       * change --with-dl-tag to --enable-dl-tag.
       * add --enable-pandoc-header to support pandoc headers.
2008-01-10 12:22:39 -08:00
david parsons b73546a9bf 1. Write a sample program that uses some of the so-far-unpublished internal
interfaces to generate a complete web page.

2. Add the paragraph flow testcase to version control.
2008-01-08 22:35:16 -08:00