=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.232 retrieving revision 1.236 diff -u -p -r1.232 -r1.236 --- mandoc/mdoc_macro.c 2019/01/07 07:26:29 1.232 +++ mandoc/mdoc_macro.c 2025/06/13 13:22:27 1.236 @@ -1,7 +1,7 @@ -/* $Id: mdoc_macro.c,v 1.232 2019/01/07 07:26:29 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.236 2025/06/13 13:22:27 schwarze Exp $ */ /* + * Copyright (c) 2010, 2012-2021 Ingo Schwarze * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010, 2012-2019 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,6 +26,9 @@ #include #include +#if DEBUG_MEMORY +#include "mandoc_dbg.h" +#endif #include "mandoc.h" #include "roff.h" #include "mdoc.h" @@ -61,7 +64,7 @@ static void rew_pending(struct roff_man *, const struct roff_node *); static const struct mdoc_macro mdoc_macros[MDOC_MAX - MDOC_Dd] = { - { in_line_eoln, MDOC_PROLOGUE }, /* Dd */ + { in_line_eoln, MDOC_PROLOGUE | MDOC_JOIN }, /* Dd */ { in_line_eoln, MDOC_PROLOGUE }, /* Dt */ { in_line_eoln, MDOC_PROLOGUE }, /* Os */ { blk_full, MDOC_PARSED | MDOC_JOIN }, /* Sh */ @@ -200,6 +203,7 @@ static const struct mdoc_macro mdoc_macros[MDOC_MAX - { in_line_eoln, MDOC_JOIN }, /* %Q */ { in_line_eoln, 0 }, /* %U */ { phrase_ta, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ta */ + { in_line_eoln, 0 }, /* Tg */ }; @@ -444,8 +448,7 @@ dword(struct roff_man *mdoc, int line, int col, const if (d == DELIM_MAX) d = mdoc_isdelim(p); - if (may_append && - ! (mdoc->flags & (MDOC_SYNOPSIS | MDOC_KEEP | MDOC_SMOFF)) && + if (may_append && ! (mdoc->flags & (MDOC_KEEP | MDOC_SMOFF)) && d == DELIM_NONE && mdoc->last->type == ROFFT_TEXT && mdoc_isdelim(mdoc->last->string) == DELIM_NONE) { roff_word_append(mdoc, p); @@ -1509,6 +1512,11 @@ in_line_eoln(MACRO_PROT_ARGS) if (n->tok == MDOC_Nm) rew_last(mdoc, n->parent); } + +#if DEBUG_MEMORY + if (tok == MDOC_Dt) + mandoc_dbg_name(buf); +#endif if (buf[*pos] == '\0' && (tok == MDOC_Fd || *roff_name[tok] == '%')) {