Date: Sat, 02 Jun 2012 06:20:25 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r236917 - in soc2012/jhagewood/mdocml: . mdocml-1.12.1 Message-ID: <20120602062025.F134A106566C@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhagewood Date: Sat Jun 2 06:20:25 2012 New Revision: 236917 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=236917 Log: Modified: soc2012/jhagewood/mdocml/hagewood-mdocml.patch soc2012/jhagewood/mdocml/mdocml-1.12.1/man_html.c soc2012/jhagewood/mdocml/mdocml-1.12.1/man_term.c soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_html.c soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_term.c soc2012/jhagewood/mdocml/mdocml-1.12.1/roff.c Modified: soc2012/jhagewood/mdocml/hagewood-mdocml.patch ============================================================================== --- soc2012/jhagewood/mdocml/hagewood-mdocml.patch Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/hagewood-mdocml.patch Sat Jun 2 06:20:25 2012 (r236917) @@ -1,6 +1,6 @@ diff -rupN mdocml-1.12.1-orig/libmandoc.h mdocml-1.12.1/libmandoc.h --- mdocml-1.12.1-orig/libmandoc.h 2012-06-01 05:35:15.000000000 -0400 -+++ mdocml-1.12.1/libmandoc.h 2012-06-01 05:35:16.000000000 -0400 ++++ mdocml-1.12.1/libmandoc.h 2012-06-02 06:16:40.000000000 -0400 @@ -31,6 +31,7 @@ enum rofferr { enum regs { @@ -9,9 +9,63 @@ REG__MAX }; +diff -rupN mdocml-1.12.1-orig/man_html.c mdocml-1.12.1/man_html.c +--- mdocml-1.12.1-orig/man_html.c 2012-06-01 05:35:15.000000000 -0400 ++++ mdocml-1.12.1/man_html.c 2012-06-02 06:13:49.000000000 -0400 +@@ -27,6 +27,7 @@ + #include <string.h> + + #include "mandoc.h" ++#include "libmandoc.h" + #include "out.h" + #include "html.h" + #include "man.h" +@@ -134,7 +135,8 @@ print_bvspace(struct html *h, const stru + if (MAN_ROOT == n->parent->type || MAN_RS != n->parent->tok) + if (NULL == n->prev) + return; +- ++ if (REG_ns) ++ return; + print_otag(h, TAG_P, 0, NULL); + } + +diff -rupN mdocml-1.12.1-orig/man_term.c mdocml-1.12.1/man_term.c +--- mdocml-1.12.1-orig/man_term.c 2012-06-01 05:35:15.000000000 -0400 ++++ mdocml-1.12.1/man_term.c 2012-06-02 06:14:07.000000000 -0400 +@@ -28,6 +28,7 @@ + #include <string.h> + + #include "mandoc.h" ++#include "libmandoc.h" + #include "out.h" + #include "man.h" + #include "term.h" +@@ -455,13 +456,14 @@ pre_sp(DECL_ARGS) + len = n->child ? a2height(p, n->child->string) : 1; + break; + } +- +- if (0 == len) +- term_newln(p); +- for (i = 0; i < len; i++) +- term_vspace(p); +- +- return(0); ++ if (!REG_ns) ++ { ++ if (0 == len) ++ term_newln(p); ++ for (i = 0; i < len; i++) ++ term_vspace(p); ++ } ++ return(0); + } + + diff -rupN mdocml-1.12.1-orig/mdoc_html.c mdocml-1.12.1/mdoc_html.c --- mdocml-1.12.1-orig/mdoc_html.c 2012-06-01 05:35:15.000000000 -0400 -+++ mdocml-1.12.1/mdoc_html.c 2012-06-01 05:54:40.000000000 -0400 ++++ mdocml-1.12.1/mdoc_html.c 2012-06-02 06:08:47.000000000 -0400 @@ -28,6 +28,7 @@ #include <unistd.h> @@ -20,25 +74,58 @@ #include "out.h" #include "html.h" #include "mdoc.h" -@@ -767,9 +768,12 @@ mdoc_xr_pre(MDOC_ARGS) +@@ -1614,27 +1615,29 @@ mdoc_pp_pre(MDOC_ARGS) static int - mdoc_ns_pre(MDOC_ARGS) + mdoc_sp_pre(MDOC_ARGS) { -- -- if ( ! (MDOC_LINE & n->flags)) -- h->flags |= HTML_NOSPACE; -+ if(!REG_ns) +- struct roffsu su; +- struct htmlpair tag; ++ if (!REG_ns) + { -+ if ( ! (MDOC_LINE & n->flags)) -+ h->flags |= HTML_NOSPACE; -+ return(1); ++ struct roffsu su; ++ struct htmlpair tag; ++ ++ SCALE_VS_INIT(&su, 1); ++ ++ if (MDOC_sp == n->tok) { ++ if (NULL != (n = n->child)) ++ if ( ! a2roffsu(n->string, &su, SCALE_VS)) ++ SCALE_VS_INIT(&su, atoi(n->string)); ++ } else ++ su.scale = 0; + +- SCALE_VS_INIT(&su, 1); +- +- if (MDOC_sp == n->tok) { +- if (NULL != (n = n->child)) +- if ( ! a2roffsu(n->string, &su, SCALE_VS)) +- SCALE_VS_INIT(&su, atoi(n->string)); +- } else +- su.scale = 0; +- +- bufinit(h); +- bufcat_su(h, "height", &su); +- PAIR_STYLE_INIT(&tag, h); +- print_otag(h, TAG_DIV, 1, &tag); +- +- /* So the div isn't empty: */ +- print_text(h, "\\~"); ++ bufinit(h); ++ bufcat_su(h, "height", &su); ++ PAIR_STYLE_INIT(&tag, h); ++ print_otag(h, TAG_DIV, 1, &tag); + +- return(0); ++ /* So the div isn't empty: */ ++ print_text(h, "\\~"); + } - return(1); ++ return(0); + } diff -rupN mdocml-1.12.1-orig/mdoc_term.c mdocml-1.12.1/mdoc_term.c --- mdocml-1.12.1-orig/mdoc_term.c 2012-06-01 05:35:15.000000000 -0400 -+++ mdocml-1.12.1/mdoc_term.c 2012-06-01 05:35:16.000000000 -0400 ++++ mdocml-1.12.1/mdoc_term.c 2012-06-02 06:05:44.000000000 -0400 @@ -29,6 +29,7 @@ #include <string.h> @@ -47,25 +134,29 @@ #include "out.h" #include "term.h" #include "mdoc.h" -@@ -1147,9 +1148,12 @@ termp_an_post(DECL_ARGS) - static int - termp_ns_pre(DECL_ARGS) - { +@@ -1882,12 +1883,13 @@ termp_sp_pre(DECL_ARGS) + len = 1; + break; + } +- +- if (0 == len) +- term_newln(p); +- for (i = 0; i < len; i++) +- term_vspace(p); - -- if ( ! (MDOC_LINE & n->flags)) -- p->flags |= TERMP_NOSPACE; + if (!REG_ns) + { -+ if ( ! (MDOC_LINE & n->flags)) -+ p->flags |= TERMP_NOSPACE; -+ return(1); ++ if (0 == len) ++ term_newln(p); ++ for (i = 0; i < len; i++) ++ term_vspace(p); + } - return(1); + return(0); } diff -rupN mdocml-1.12.1-orig/roff.c mdocml-1.12.1/roff.c --- mdocml-1.12.1-orig/roff.c 2012-06-01 05:35:15.000000000 -0400 -+++ mdocml-1.12.1/roff.c 2012-06-01 05:43:57.000000000 -0400 ++++ mdocml-1.12.1/roff.c 2012-06-02 06:18:39.000000000 -0400 @@ -55,6 +55,7 @@ enum rofft { ROFF_ns, ROFF_ps, @@ -125,7 +216,7 @@ +roff_rs(ROFF_ARGS) +{ + /* Sets no-space register to 0. */ -+ r->regs[(int)REG_ns].set = 0; ++ roff_regunset(r, REG_ns); + return(ROFF_IGN); +} + Modified: soc2012/jhagewood/mdocml/mdocml-1.12.1/man_html.c ============================================================================== --- soc2012/jhagewood/mdocml/mdocml-1.12.1/man_html.c Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/mdocml-1.12.1/man_html.c Sat Jun 2 06:20:25 2012 (r236917) @@ -27,6 +27,7 @@ #include <string.h> #include "mandoc.h" +#include "libmandoc.h" #include "out.h" #include "html.h" #include "man.h" @@ -134,7 +135,8 @@ if (MAN_ROOT == n->parent->type || MAN_RS != n->parent->tok) if (NULL == n->prev) return; - + if (REG_ns) + return; print_otag(h, TAG_P, 0, NULL); } Modified: soc2012/jhagewood/mdocml/mdocml-1.12.1/man_term.c ============================================================================== --- soc2012/jhagewood/mdocml/mdocml-1.12.1/man_term.c Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/mdocml-1.12.1/man_term.c Sat Jun 2 06:20:25 2012 (r236917) @@ -28,6 +28,7 @@ #include <string.h> #include "mandoc.h" +#include "libmandoc.h" #include "out.h" #include "man.h" #include "term.h" @@ -455,13 +456,14 @@ len = n->child ? a2height(p, n->child->string) : 1; break; } - - if (0 == len) - term_newln(p); - for (i = 0; i < len; i++) - term_vspace(p); - - return(0); + if (!REG_ns) + { + if (0 == len) + term_newln(p); + for (i = 0; i < len; i++) + term_vspace(p); + } + return(0); } Modified: soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_html.c ============================================================================== --- soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_html.c Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_html.c Sat Jun 2 06:20:25 2012 (r236917) @@ -768,12 +768,9 @@ static int mdoc_ns_pre(MDOC_ARGS) { - if(!REG_ns) - { - if ( ! (MDOC_LINE & n->flags)) - h->flags |= HTML_NOSPACE; - return(1); - } + + if ( ! (MDOC_LINE & n->flags)) + h->flags |= HTML_NOSPACE; return(1); } @@ -1618,27 +1615,29 @@ static int mdoc_sp_pre(MDOC_ARGS) { - struct roffsu su; - struct htmlpair tag; - - SCALE_VS_INIT(&su, 1); + if (!REG_ns) + { + struct roffsu su; + struct htmlpair tag; - if (MDOC_sp == n->tok) { - if (NULL != (n = n->child)) - if ( ! a2roffsu(n->string, &su, SCALE_VS)) - SCALE_VS_INIT(&su, atoi(n->string)); - } else - su.scale = 0; + SCALE_VS_INIT(&su, 1); - bufinit(h); - bufcat_su(h, "height", &su); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_DIV, 1, &tag); + if (MDOC_sp == n->tok) { + if (NULL != (n = n->child)) + if ( ! a2roffsu(n->string, &su, SCALE_VS)) + SCALE_VS_INIT(&su, atoi(n->string)); + } else + su.scale = 0; - /* So the div isn't empty: */ - print_text(h, "\\~"); + bufinit(h); + bufcat_su(h, "height", &su); + PAIR_STYLE_INIT(&tag, h); + print_otag(h, TAG_DIV, 1, &tag); - return(0); + /* So the div isn't empty: */ + print_text(h, "\\~"); + } + return(0); } Modified: soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_term.c ============================================================================== --- soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_term.c Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/mdocml-1.12.1/mdoc_term.c Sat Jun 2 06:20:25 2012 (r236917) @@ -1148,12 +1148,9 @@ static int termp_ns_pre(DECL_ARGS) { - if (!REG_ns) - { - if ( ! (MDOC_LINE & n->flags)) - p->flags |= TERMP_NOSPACE; - return(1); - } + + if ( ! (MDOC_LINE & n->flags)) + p->flags |= TERMP_NOSPACE; return(1); } @@ -1886,12 +1883,13 @@ len = 1; break; } - - if (0 == len) - term_newln(p); - for (i = 0; i < len; i++) - term_vspace(p); - + if (!REG_ns) + { + if (0 == len) + term_newln(p); + for (i = 0; i < len; i++) + term_vspace(p); + } return(0); } Modified: soc2012/jhagewood/mdocml/mdocml-1.12.1/roff.c ============================================================================== --- soc2012/jhagewood/mdocml/mdocml-1.12.1/roff.c Sat Jun 2 05:46:04 2012 (r236916) +++ soc2012/jhagewood/mdocml/mdocml-1.12.1/roff.c Sat Jun 2 06:20:25 2012 (r236917) @@ -1288,7 +1288,7 @@ roff_rs(ROFF_ARGS) { /* Sets no-space register to 0. */ - r->regs[(int)REG_ns].set = 0; + roff_regunset(r, REG_ns); return(ROFF_IGN); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120602062025.F134A106566C>