/* markdown: a C implementation of John Gruber's Markdown markup language. * * Copyright (C) 2007 David L Parsons. * The redistribution terms are provided in the COPYRIGHT file that must * be distributed with this source code. */ #include "config.h" #include #include #include #include #include #include #include "cstring.h" #include "markdown.h" #include "amalloc.h" #include "tags.h" static int need_to_setup = 1; static int need_to_initrng = 1; void mkd_initialize() { if ( need_to_initrng ) { need_to_initrng = 0; INITRNG(time(0)); } if ( need_to_setup ) { need_to_setup = 0; mkd_prepare_tags(); } } void mkd_shlib_destructor() { if ( !need_to_setup ) { need_to_setup = 1; mkd_deallocate_tags(); } }