From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5QFacls030077 for ; Sat, 26 Jun 2010 11:36:38 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o5QFacau021968; Sat, 26 Jun 2010 11:36:38 -0400 (EDT) Date: Sat, 26 Jun 2010 11:36:38 -0400 (EDT) Message-Id: <201006261536.o5QFacau021968@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Churn-ish check-in getting mdoc_parseln() and man_parseln() to X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept a const struct regset pointer. No functionality. Modified Files: -------------- mdocml: libman.h libmdoc.h main.c man.3 man.c man.h man_html.c man_term.c mdoc.3 mdoc.c mdoc.h mdoc_html.c mdoc_term.c regs.h term.c tree.c Revision Data ------------- Index: libman.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libman.h,v retrieving revision 1.36 retrieving revision 1.37 diff -Llibman.h -Llibman.h -u -p -r1.36 -r1.37 --- libman.h +++ libman.h @@ -17,6 +17,7 @@ #ifndef LIBMAN_H #define LIBMAN_H +#include "regs.h" #include "man.h" enum man_next { Index: main.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v retrieving revision 1.90 retrieving revision 1.91 diff -Lmain.c -Lmain.c -u -p -r1.90 -r1.91 --- main.c +++ main.c @@ -562,9 +562,9 @@ fdesc(struct curparse *curp) /* Lastly, push down into the parsers themselves. */ - if (man && ! man_parseln(man, lnn_start, ln.buf, of)) + if (man && ! man_parseln(man, ®s, lnn_start, ln.buf, of)) goto bailout; - if (mdoc && ! mdoc_parseln(mdoc, lnn_start, ln.buf, of)) + if (mdoc && ! mdoc_parseln(mdoc, ®s, lnn_start, ln.buf, of)) goto bailout; } Index: man.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.h,v retrieving revision 1.37 retrieving revision 1.38 diff -Lman.h -Lman.h -u -p -r1.37 -r1.38 --- man.h +++ man.h @@ -108,7 +108,9 @@ struct man; void man_free(struct man *); struct man *man_alloc(void *, int, mandocmsg); void man_reset(struct man *); -int man_parseln(struct man *, int, char *, int); +int man_parseln(struct man *, + const struct regset *, + int, char *, int); int man_endparse(struct man *); const struct man_node *man_node(const struct man *); Index: mdoc.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.h,v retrieving revision 1.91 retrieving revision 1.92 diff -Lmdoc.h -Lmdoc.h -u -p -r1.91 -r1.92 --- mdoc.h +++ mdoc.h @@ -336,7 +336,9 @@ struct mdoc; void mdoc_free(struct mdoc *); struct mdoc *mdoc_alloc(void *, int, mandocmsg); void mdoc_reset(struct mdoc *); -int mdoc_parseln(struct mdoc *, int, char *, int); +int mdoc_parseln(struct mdoc *, + const struct regset *, + int, char *, int); const struct mdoc_node *mdoc_node(const struct mdoc *); const struct mdoc_meta *mdoc_meta(const struct mdoc *); int mdoc_endparse(struct mdoc *); Index: man.3 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.3,v retrieving revision 1.18 retrieving revision 1.19 diff -Lman.3 -Lman.3 -u -p -r1.18 -r1.19 --- man.3 +++ man.3 @@ -29,6 +29,7 @@ .Nd man macro compiler library .Sh SYNOPSIS .In mandoc.h +.In regs.h .In man.h .Vt extern const char * const * man_macronames; .Ft "struct man *" @@ -42,7 +43,12 @@ .Ft "const struct man_node *" .Fn man_node "const struct man *man" .Ft int -.Fn man_parseln "struct man *man" "int line" "char *buf" +.Fo man_parseln +.Fa "struct man *man" +.Fa "const struct regset *regs" +.Fa "int line" +.Fa "char *buf" +.Fc .Ft void .Fn man_reset "struct man *man" .Sh DESCRIPTION Index: term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v retrieving revision 1.149 retrieving revision 1.150 diff -Lterm.c -Lterm.c -u -p -r1.149 -r1.150 --- term.c +++ term.c @@ -31,8 +31,6 @@ #include "chars.h" #include "out.h" #include "term.h" -#include "man.h" -#include "mdoc.h" #include "main.h" static void spec(struct termp *, const char *, size_t); Index: man_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v retrieving revision 1.37 retrieving revision 1.38 diff -Lman_html.c -Lman_html.c -u -p -r1.37 -r1.38 --- man_html.c +++ man_html.c @@ -29,6 +29,7 @@ #include "mandoc.h" #include "out.h" #include "html.h" +#include "regs.h" #include "man.h" #include "main.h" Index: libmdoc.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libmdoc.h,v retrieving revision 1.53 retrieving revision 1.54 diff -Llibmdoc.h -Llibmdoc.h -u -p -r1.53 -r1.54 --- libmdoc.h +++ libmdoc.h @@ -17,6 +17,7 @@ #ifndef LIBMDOC_H #define LIBMDOC_H +#include "regs.h" #include "mdoc.h" enum mdoc_next { Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.85 retrieving revision 1.86 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.85 -r1.86 --- mdoc_html.c +++ mdoc_html.c @@ -30,6 +30,7 @@ #include "mandoc.h" #include "out.h" #include "html.h" +#include "regs.h" #include "mdoc.h" #include "main.h" Index: man.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.c,v retrieving revision 1.76 retrieving revision 1.77 diff -Lman.c -Lman.c -u -p -r1.76 -r1.77 --- man.c +++ man.c @@ -28,6 +28,7 @@ #include #include "mandoc.h" +#include "regs.h" #include "libman.h" #include "libmandoc.h" @@ -124,7 +125,8 @@ man_endparse(struct man *m) int -man_parseln(struct man *m, int ln, char *buf, int offs) +man_parseln(struct man *m, const struct regset *regs, + int ln, char *buf, int offs) { if (MAN_HALT & m->flags) Index: regs.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/regs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregs.h -Lregs.h -u -p -r1.1 -r1.2 --- regs.h +++ regs.h @@ -24,10 +24,6 @@ enum regs { REG__MAX }; -/* - * Registers are passed into libmdoc and libman. They refer to some - * sort of external state. - */ struct regset { union { int i; /* integer value */ Index: mdoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v retrieving revision 1.146 retrieving revision 1.147 diff -Lmdoc.c -Lmdoc.c -u -p -r1.146 -r1.147 --- mdoc.c +++ mdoc.c @@ -29,6 +29,7 @@ #include #include "mandoc.h" +#include "regs.h" #include "libmdoc.h" #include "libmandoc.h" @@ -229,7 +230,8 @@ mdoc_endparse(struct mdoc *m) * the macro (mdoc_pmacro()) or text parser (mdoc_ptext()). */ int -mdoc_parseln(struct mdoc *m, int ln, char *buf, int offs) +mdoc_parseln(struct mdoc *m, const struct regset *regs, + int ln, char *buf, int offs) { if (MDOC_HALT & m->flags) Index: man_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v retrieving revision 1.77 retrieving revision 1.78 diff -Lman_term.c -Lman_term.c -u -p -r1.77 -r1.78 --- man_term.c +++ man_term.c @@ -28,6 +28,7 @@ #include "mandoc.h" #include "out.h" +#include "regs.h" #include "man.h" #include "term.h" #include "chars.h" Index: mdoc.3 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.3,v retrieving revision 1.41 retrieving revision 1.42 diff -Lmdoc.3 -Lmdoc.3 -u -p -r1.41 -r1.42 --- mdoc.3 +++ mdoc.3 @@ -29,6 +29,7 @@ .Nd mdoc macro compiler library .Sh SYNOPSIS .In mandoc.h +.In regs.h .In mdoc.h .Vt extern const char * const * mdoc_macronames; .Vt extern const char * const * mdoc_argnames; @@ -43,7 +44,12 @@ .Ft "const struct mdoc_node *" .Fn mdoc_node "const struct mdoc *mdoc" .Ft int -.Fn mdoc_parseln "struct mdoc *mdoc" "int line" "char *buf" +.Fo mdoc_parseln +.Fa "struct mdoc *mdoc" +.Fa "const struct regset *regs" +.Fa "int line" +.Fa "char *buf" +.Fc .Ft int .Fn mdoc_reset "struct mdoc *mdoc" .Sh DESCRIPTION Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.157 retrieving revision 1.158 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.157 -r1.158 --- mdoc_term.c +++ mdoc_term.c @@ -30,6 +30,7 @@ #include "mandoc.h" #include "out.h" #include "term.h" +#include "regs.h" #include "mdoc.h" #include "chars.h" #include "main.h" Index: tree.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tree.c,v retrieving revision 1.21 retrieving revision 1.22 diff -Ltree.c -Ltree.c -u -p -r1.21 -r1.22 --- tree.c +++ tree.c @@ -24,6 +24,7 @@ #include #include "mandoc.h" +#include "regs.h" #include "mdoc.h" #include "man.h" #include "main.h" -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv