From: Michael Göhler Date: Sun, 17 Aug 2014 20:00:49 +0000 (+0200) Subject: added/removed some markdown bits X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=e37999aeac2a6a9f9bfab16b787d57d8d93702a7;p=smdp.git added/removed some markdown bits --- diff --git a/include/markdown.h b/include/markdown.h index 4d5105c..9c29d86 100644 --- a/include/markdown.h +++ b/include/markdown.h @@ -14,13 +14,12 @@ #define CHECK_BIT(var, pos) ((var) & (1<<(pos))) enum line_bitmask { - IS_HEADER, - IS_HEADER2, + IS_H1, + IS_H2, IS_QUOTE, IS_CODE, - IS_LIST, - IS_NUMLIST, - IS_HR + IS_HR, + IS_EMPTY }; typedef struct _line_t { diff --git a/test/bits.c b/test/bits.c index 58eb687..efe6fc1 100644 --- a/test/bits.c +++ b/test/bits.c @@ -7,23 +7,23 @@ int main(int argc, char *argv[]) { int i; printf("INIT: %i\n", i); - SET_BIT(i, IS_HEADER); - printf("SET_BIT(%i): %i\n", IS_HEADER, i); + SET_BIT(i, IS_H1); + printf("SET_BIT(%i): %i\n", IS_H1, i); - printf("CHECK_BIT(%i): %i\n", IS_HEADER, CHECK_BIT(i, IS_HEADER)); + printf("CHECK_BIT(%i): %i\n", IS_H1, CHECK_BIT(i, IS_H1)); - TOGGLE_BIT(i, IS_HEADER2); - printf("TOGGLE_BIT(%i): %i\n", IS_HEADER2, i); + TOGGLE_BIT(i, IS_H2); + printf("TOGGLE_BIT(%i): %i\n", IS_H2, i); - printf("CHECK_BIT(%i): %i\n", IS_HEADER2, CHECK_BIT(i, IS_HEADER2)); + printf("CHECK_BIT(%i): %i\n", IS_H2, CHECK_BIT(i, IS_H2)); - TOGGLE_BIT(i, IS_HEADER2); - printf("TOGGLE_BIT(%i): %i\n", IS_HEADER2, i); + TOGGLE_BIT(i, IS_H2); + printf("TOGGLE_BIT(%i): %i\n", IS_H2, i); - CLEAR_BIT(i, IS_HEADER); - printf("CLEAR_BIT(%i): %i\n", IS_HEADER, i); + CLEAR_BIT(i, IS_H1); + printf("CLEAR_BIT(%i): %i\n", IS_H1, i); - printf("CHECK_BIT(%i): %i\n", IS_HEADER, CHECK_BIT(i, IS_HEADER)); - printf("CHECK_BIT(%i): %i\n", IS_HEADER2, CHECK_BIT(i, IS_HEADER2)); + printf("CHECK_BIT(%i): %i\n", IS_H1, CHECK_BIT(i, IS_H1)); + printf("CHECK_BIT(%i): %i\n", IS_H2, CHECK_BIT(i, IS_H2)); }