diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 15:22:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 15:22:19 +0000 |
commit | a7a9c3b662c1cf6ee6766d865a9dcc58376ea2c9 (patch) | |
tree | 5c739a65041bac0ed88bd64df638e92fc2af41ef /main.c | |
parent | 730c5a1572228d1c4a1ef49a9748be04a119c1e8 (diff) | |
download | mandoc-a7a9c3b662c1cf6ee6766d865a9dcc58376ea2c9.tar.gz |
First step of adding register support. This is inspired by a significant
patch by schwarze@. This commit adds support to libroff parsing `nr'
into register set defined in regs.h. This will propogate into libmdoc
and libman in later commits.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -30,10 +30,11 @@ #include <unistd.h> #include "mandoc.h" +#include "regs.h" +#include "main.h" #include "mdoc.h" #include "man.h" #include "roff.h" -#include "main.h" #define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) @@ -450,11 +451,13 @@ fdesc(struct curparse *curp) struct man *man; struct mdoc *mdoc; struct roff *roff; + struct regset regs; man = NULL; mdoc = NULL; roff = NULL; memset(&ln, 0, sizeof(struct buf)); + memset(®s, 0, sizeof(struct regset)); /* * Two buffers: ln and buf. buf is the input file and may be @@ -537,7 +540,7 @@ fdesc(struct curparse *curp) of = 0; do { - re = roff_parseln(roff, lnn_start, + re = roff_parseln(roff, ®s, lnn_start, &ln.buf, &ln.sz, of, &of); } while (ROFF_RERUN == re); |