mirror of
https://github.com/Orc/discount.git
synced 2026-10-10 23:44:07 +03:00
* 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
41 lines
610 B
C
41 lines
610 B
C
#include <stdio.h>
|
|
#include <mkdio.h>
|
|
#include <stdlib.h>
|
|
|
|
void
|
|
say(char *what)
|
|
{
|
|
fputs(what,stdout);
|
|
fflush(stdout);
|
|
}
|
|
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
mkd_flag_t *flags = mkd_flags();
|
|
|
|
|
|
say("check flag functions: ");
|
|
say("set ");
|
|
mkd_set_flag_num(flags, MKD_DLDISCOUNT);
|
|
|
|
say("set(0) ");
|
|
mkd_set_flag_num(0, MKD_DLDISCOUNT);
|
|
|
|
say("clear ");
|
|
mkd_clr_flag_num(flags, MKD_DLDISCOUNT);
|
|
|
|
say("clear(0) ");
|
|
mkd_clr_flag_num(0, MKD_DLDISCOUNT);
|
|
|
|
say("copy ");
|
|
(void)mkd_copy_flags(flags);
|
|
|
|
say("copy(0) ");
|
|
(void)mkd_copy_flags(0);
|
|
|
|
say("ok\n");
|
|
exit(0);
|
|
}
|