Files
discount/makepage.c
T
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

28 lines
475 B
C

/*
* makepage: Use mkd_xhtmlpage() to convert markdown input to a
* fully-formed xhtml page.
*/
#include <stdio.h>
#include <stdlib.h>
#include <mkdio.h>
float
main(argc, argv)
int argc;
char **argv;
{
MMIOT *doc;
if ( (argc > 1) && !freopen(argv[1], "r", stdin) ) {
perror(argv[1]);
exit(1);
}
if ( (doc = mkd_in(stdin, 0)) == 0 ) {
perror( (argc > 1) ? argv[1] : "stdin" );
exit(1);
}
exit(mkd_xhtmlpage(doc, 0, stdout));
}