* mdocml: basic tag support for function names; written at YYC
@ 2015-07-25 14:18 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-07-25 14:18 UTC (permalink / raw)
To: source
Log Message:
-----------
basic tag support for function names; written at YYC
Modified Files:
--------------
mdocml:
mdoc_term.c
Revision Data
-------------
Index: mdoc_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_term.c,v
retrieving revision 1.321
retrieving revision 1.322
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.321 -r1.322
--- mdoc_term.c
+++ mdoc_term.c
@@ -251,6 +251,7 @@ static const struct termact termacts[MDO
{ termp_ll_pre, NULL }, /* ll */
};
+static int fn_prio;
void
terminal_mdoc(void *arg, const struct roff_man *mdoc)
@@ -1364,7 +1365,7 @@ termp_sh_pre(DECL_ARGS)
* when the previous section was empty.
*/
if (n->prev == NULL ||
- MDOC_Sh != n->prev->tok ||
+ n->prev->tok != MDOC_Sh ||
(n->prev->body != NULL &&
n->prev->body->child != NULL))
term_vspace(p);
@@ -1374,8 +1375,16 @@ termp_sh_pre(DECL_ARGS)
break;
case ROFFT_BODY:
p->offset = term_len(p, p->defindent);
- if (SEC_AUTHORS == n->sec)
+ switch (n->sec) {
+ case SEC_DESCRIPTION:
+ fn_prio = 0;
+ break;
+ case SEC_AUTHORS:
p->flags &= ~(TERMP_SPLIT|TERMP_NOSPLIT);
+ break;
+ default:
+ break;
+ }
break;
default:
break;
@@ -1471,6 +1480,11 @@ termp_fn_pre(DECL_ARGS)
term_word(p, n->string);
term_fontpop(p);
+ if (n->sec == SEC_DESCRIPTION) {
+ if ( ! tag_get(n->string, 0, ++fn_prio))
+ tag_put(n->string, 0, fn_prio, p->line);
+ }
+
if (pretty) {
term_flushln(p);
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG);
@@ -1823,6 +1837,7 @@ termp_sp_pre(DECL_ARGS)
break;
default:
len = 1;
+ fn_prio = 0;
break;
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-25 14:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-25 14:18 mdocml: basic tag support for function names; written at YYC schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).