Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_markdown.c File Reference
#include "nilorea/n_log.h"
#include "nilorea/n_markdown.h"
#include <string.h>
Include dependency graph for ex_markdown.c:

Go to the source code of this file.

Macros

#define CHECK(cond, msg)
#define IA   N_MARKDOWN_INLINE_ALL

Functions

static void cell_text (const n_markdown_block *b, size_t row, size_t col, char *out, size_t cap)
static void flow_text (const n_markdown_inline *inl, char *out, size_t cap)
int main (void)
static n_markdown_doc parse (const char *s)
static n_markdown_doc parse_ex (const char *s, unsigned flags)

Variables

static int failures = 0

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond,
msg )
Value:
do { \
if (!(cond)) { \
n_log(LOG_ERR, "FAIL: %s", (msg)); \
failures++; \
} \
} while (0)
static int failures
Definition ex_atlas.c:51
#define LOG_ERR
error conditions
Definition n_log.h:100

Definition at line 35 of file ex_markdown.c.

◆ IA

#define IA   N_MARKDOWN_INLINE_ALL
Examples
ex_markdown.c.

Referenced by main().

Function Documentation

◆ cell_text()

void cell_text ( const n_markdown_block * b,
size_t row,
size_t col,
char * out,
size_t cap )
static
Examples
ex_markdown.c.

Definition at line 73 of file ex_markdown.c.

References flow_text(), n_markdown_block::items, n_markdown_block::n_cols, n_markdown_block::n_items, and row().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flow_text()

void flow_text ( const n_markdown_inline * inl,
char * out,
size_t cap )
static
Examples
ex_markdown.c.

Definition at line 58 of file ex_markdown.c.

References n_markdown_inline::n_spans, n_markdown_inline::spans, and n_markdown_span::text.

Referenced by cell_text(), and main().

Here is the caller graph for this function:

◆ main()

◆ parse()

n_markdown_doc parse ( const char * s)
static

Definition at line 44 of file ex_markdown.c.

References n_markdown_parse().

Here is the call graph for this function:

◆ parse_ex()

n_markdown_doc parse_ex ( const char * s,
unsigned flags )
static
Examples
ex_markdown.c.

Definition at line 51 of file ex_markdown.c.

References n_markdown_parse_ex().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ failures

int failures = 0
static

Definition at line 33 of file ex_markdown.c.