18 Commits
Author SHA1 Message Date
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 c4b97d6cf7 use mkd_free_flags() in all the demo programs 2020-04-08 12:26:13 -07:00
david parsons 2e900346a0 make the published mkd_flag_t opaque and add a new function (mkd_flags()) to generate a flag structure and return it in malloced memory 2020-03-07 19:56:22 -08:00
david parsons b9e867b574 redo the whole flags dealie as an opaque blob 2019-12-07 22:49:52 -08:00
david parsons cf74d6d218 make all instances of 'main()' be integer functions (sigh) 2018-09-16 14:41:42 -07:00
david parsons beeb569412 Correct makepage & theme to use the new set_flag() return scheme (0==success, !0==pointer to bogus flag) 2017-09-25 12:44:43 -07: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 3e8386d071 Use gethopt() for options processing in markdown(8) & makepage(8) 2017-02-02 16:12:42 -08:00
david parsons 5a35cd041e Revert the previous commit that took unistd.h out 2017-02-02 14:44:55 -08:00
Mateusz Łoskot 473e53845d Remove redundant <unistd.h> header as unused 2017-02-02 23:35:22 +01:00
david parsons 9b792090ce Tweak the show_flags() function so that if it's called verbosely
it will show synonyms for named flags.   (Calling it verbosely is
done by the `V` option, which is overloaded for verbosity when listing
flags.)
2017-01-26 23:40:04 -08:00
david parsons 55e6d15563 I was using the wrong argument for the file to make a page from.
needed to check for argc > 0 & argv[0] (after shifting argc/argv
by optind) but was checking argc > 1 & argv[1], which was something
less than useful.
2016-04-24 07:40:17 -07:00
david parsons e02a34b8ef 1) messed up the fwrite() error check in mkd_generatehtml,
2) return EOF instead of -1 on error in mkd_xhtmlpage,
3) if the mkd output fails, exit with nonzero status
2015-10-26 15:18:16 -07:00
Koen Punt 37659eb654 handle cleanup from the caller
instead of freeing the resource in mkd_xhtmlpage and mkd_dumptree, the mkd_cleanup now has to be explicitly called.
2015-10-25 15:46:53 +01: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 80c04f45e8 Change makepage so that I can feed it options
with `-Fxx`, `-fname`, or the environment variable
`MARKDOWN_FLAGS`; this means I needed to split the
options parsing code out of main.c into its own file
that can be included wherever.
2011-05-23 10:59:11 -07:00
david parsons 8ec8cb67e6 1. Add -L. and -I. to the definition for CC, so that
headers and libraries will be picked up from the
    current directory first.
2.  Add prototypes for mkd_xhtmlpage() and mkd_style()
    to mkdio.h/markdown.h (as needed)
2008-10-04 18:13:33 -07:00
David Parsons e036375cff Add a demo program for mkd_xhtmlpage(), add it to the sample programs list. 2008-10-04 13:36:17 -07:00