*/
#include "cstring.h"
-
-#define SET_BIT(var, pos) ((var) |= (1<<(pos)))
-#define CLEAR_BIT(var, pos) ((var) &= (~(1<<(pos))))
-#define TOGGLE_BIT(var, pos) ((var) ^= (1<<(pos)))
-#define CHECK_BIT(var, pos) ((var) & (1<<(pos)))
+#include "bitops.h"
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 {
} page_t;
typedef struct _document_t {
- line_t *title;
- line_t *author;
- line_t *date;
+ line_t *header;
page_t *page;
} document_t;
page_t *new_page();
page_t *next_page(page_t *prev);
document_t *new_document();
-int is_utf8(char ch);
-int next_nonblank(cstring_t *text, int i);
-document_t *markdown_load(FILE *input);
#endif // !defined( MARKDOWN_H )