"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "flags.c" between
discount-2.2.4.tar.bz2 and discount-2.2.6.tar.bz2

About: Discount is an implementation of the "Markdown" markup language (written in C).

flags.c  (discount-2.2.4.tar.bz2):flags.c  (discount-2.2.6.tar.bz2)
#include <stdio.h> #include <stdio.h>
#include "markdown.h" #include "markdown.h"
struct flagnames { struct flagnames {
DWORD flag; mkd_flag_t flag;
char *name; char *name;
}; };
static struct flagnames flagnames[] = { static struct flagnames flagnames[] = {
{ MKD_NOLINKS, "!LINKS" }, { MKD_NOLINKS, "!LINKS" },
{ MKD_NOIMAGE, "!IMAGE" }, { MKD_NOIMAGE, "!IMAGE" },
{ MKD_NOPANTS, "!PANTS" }, { MKD_NOPANTS, "!PANTS" },
{ MKD_NOHTML, "!HTML" }, { MKD_NOHTML, "!HTML" },
{ MKD_STRICT, "STRICT" }, { MKD_STRICT, "STRICT" },
{ MKD_TAGTEXT, "TAGTEXT" }, { MKD_TAGTEXT, "TAGTEXT" },
skipping to change at line 45 skipping to change at line 45
{ MKD_FENCEDCODE, "FENCEDCODE" }, { MKD_FENCEDCODE, "FENCEDCODE" },
{ MKD_IDANCHOR, "IDANCHOR" }, { MKD_IDANCHOR, "IDANCHOR" },
{ MKD_GITHUBTAGS, "GITHUBTAGS" }, { MKD_GITHUBTAGS, "GITHUBTAGS" },
{ MKD_URLENCODEDANCHOR, "URLENCODEDANCHOR" }, { MKD_URLENCODEDANCHOR, "URLENCODEDANCHOR" },
{ MKD_LATEX, "LATEX" }, { MKD_LATEX, "LATEX" },
{ MKD_EXPLICITLIST, "EXPLICITLIST" }, { MKD_EXPLICITLIST, "EXPLICITLIST" },
}; };
#define NR(x) (sizeof x/sizeof x[0]) #define NR(x) (sizeof x/sizeof x[0])
void void
mkd_flags_are(FILE *f, DWORD flags, int htmlplease) mkd_flags_are(FILE *f, mkd_flag_t flags, int htmlplease)
{ {
int i; int i;
int not, set, even=1; int not, set, even=1;
char *name; char *name;
if ( htmlplease ) if ( htmlplease )
fprintf(f, "<table class=\"mkd_flags_are\">\n"); fprintf(f, "<table class=\"mkd_flags_are\">\n");
for (i=0; i < NR(flagnames); i++) { for (i=0; i < NR(flagnames); i++) {
set = flags & flagnames[i].flag; set = flags & flagnames[i].flag;
name = flagnames[i].name; name = flagnames[i].name;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)