=================================================================== RCS file: /cvs/mandoc/mdoc_man.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -p -r1.55 -r1.56 --- mandoc/mdoc_man.c 2013/12/24 22:08:50 1.55 +++ mandoc/mdoc_man.c 2013/12/25 00:39:31 1.56 @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.55 2013/12/24 22:08:50 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.56 2013/12/25 00:39:31 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013 Ingo Schwarze * @@ -256,6 +256,7 @@ static int outflags; #define MMAN_An_split (1 << 9) /* author mode is "split" */ #define MMAN_An_nosplit (1 << 10) /* author mode is "nosplit" */ #define MMAN_PD (1 << 11) /* inter-paragraph spacing disabled */ +#define MMAN_nbrword (1 << 12) /* do not break the next word */ #define BL_STACK_MAX 32 @@ -364,6 +365,12 @@ print_word(const char *s) case (ASCII_HYPH): putchar('-'); break; + case (' '): + if (MMAN_nbrword & outflags) { + printf("\\ "); + break; + } + /* FALLTHROUGH */ default: putchar((unsigned char)*s); break; @@ -371,6 +378,7 @@ print_word(const char *s) if (TPremain) TPremain--; } + outflags &= ~MMAN_nbrword; } static void @@ -1028,6 +1036,8 @@ pre_fa(DECL_ARGS) while (NULL != n) { font_push('I'); + if (MDOC_SYNPRETTY & n->flags) + outflags |= MMAN_nbrword; print_node(meta, n); font_pop(); if (NULL != (n = n->next))