mirror of https://github.com/ddevault/scdoc
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
517 B
26 lines
517 B
#ifndef _SCDOC_PARSER_H
|
|
#define _SCDOC_PARSER_H
|
|
#include <stdarg.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
struct parser {
|
|
FILE *input, *output;
|
|
int line, col;
|
|
int qhead;
|
|
uint32_t queue[32];
|
|
uint32_t flags;
|
|
};
|
|
|
|
enum formatting {
|
|
FORMAT_BOLD = 1,
|
|
FORMAT_UNDERLINE = 2,
|
|
FORMAT_LAST = 4,
|
|
};
|
|
|
|
void parser_fatal(struct parser *parser, const char *err);
|
|
uint32_t parser_getch(struct parser *parser);
|
|
void parser_pushch(struct parser *parser, uint32_t ch);
|
|
int roff_macro(struct parser *p, char *cmd, ...);
|
|
|
|
#endif
|
|
|