From: schwarze Date: Tue, 24 Dec 2013 23:04:29 +0000 (+0000) Subject: Delete the unused flag TERMP_IGNDELIM X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=072a1c5d8a72cf60ef3c3fd90fb480ff46a48387;p=openbsd Delete the unused flag TERMP_IGNDELIM and the empty callback termp_igndelim_pre(). Sort the remaining termp flags. --- diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index 94dd7bd0497..162a832a916 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.155 2013/12/24 20:45:21 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.156 2013/12/24 23:04:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013 Ingo Schwarze @@ -96,7 +96,6 @@ static int termp_fl_pre(DECL_ARGS); static int termp_fn_pre(DECL_ARGS); static int termp_fo_pre(DECL_ARGS); static int termp_ft_pre(DECL_ARGS); -static int termp_igndelim_pre(DECL_ARGS); static int termp_in_pre(DECL_ARGS); static int termp_it_pre(DECL_ARGS); static int termp_li_pre(DECL_ARGS); @@ -190,12 +189,12 @@ static const struct termact termacts[MDOC_MAX] = { { termp_quote_pre, termp_quote_post }, /* Eo */ { termp_xx_pre, NULL }, /* Fx */ { termp_bold_pre, NULL }, /* Ms */ - { termp_igndelim_pre, NULL }, /* No */ + { NULL, NULL }, /* No */ { termp_ns_pre, NULL }, /* Ns */ { termp_xx_pre, NULL }, /* Nx */ { termp_xx_pre, NULL }, /* Ox */ { NULL, NULL }, /* Pc */ - { termp_igndelim_pre, termp_pf_post }, /* Pf */ + { NULL, termp_pf_post }, /* Pf */ { termp_quote_pre, termp_quote_post }, /* Po */ { termp_quote_pre, termp_quote_post }, /* Pq */ { NULL, NULL }, /* Qc */ @@ -1783,16 +1782,6 @@ termp_xx_pre(DECL_ARGS) } -/* ARGSUSED */ -static int -termp_igndelim_pre(DECL_ARGS) -{ - - p->flags |= TERMP_IGNDELIM; - return(1); -} - - /* ARGSUSED */ static void termp_pf_post(DECL_ARGS) diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c index 7f9340661a7..0a6a2232877 100644 --- a/usr.bin/mandoc/term.c +++ b/usr.bin/mandoc/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.73 2013/12/23 02:19:57 schwarze Exp $ */ +/* $Id: term.c,v 1.74 2013/12/24 23:04:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze @@ -425,7 +425,7 @@ term_word(struct termp *p, const char *word) else p->flags |= TERMP_NOSPACE; - p->flags &= ~(TERMP_SENTENCE | TERMP_IGNDELIM); + p->flags &= ~TERMP_SENTENCE; while ('\0' != *word) { if ('\\' != *word) { diff --git a/usr.bin/mandoc/term.h b/usr.bin/mandoc/term.h index 85ac531e6d7..d890c4b7703 100644 --- a/usr.bin/mandoc/term.h +++ b/usr.bin/mandoc/term.h @@ -1,4 +1,4 @@ -/* $Id: term.h,v 1.39 2013/12/22 23:33:52 schwarze Exp $ */ +/* $Id: term.h,v 1.40 2013/12/24 23:04:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -70,17 +70,16 @@ struct termp { int flags; #define TERMP_SENTENCE (1 << 1) /* Space before a sentence. */ #define TERMP_NOSPACE (1 << 2) /* No space before words. */ -#define TERMP_NOBREAK (1 << 4) /* See term_flushln(). */ -#define TERMP_IGNDELIM (1 << 6) /* Delims like regulars. */ -#define TERMP_NONOSPACE (1 << 7) /* No space (no autounset). */ -#define TERMP_DANGLE (1 << 8) /* See term_flushln(). */ -#define TERMP_HANG (1 << 9) /* See term_flushln(). */ +#define TERMP_NONOSPACE (1 << 3) /* No space (no autounset). */ +#define TERMP_KEEP (1 << 5) /* Keep words together. */ +#define TERMP_PREKEEP (1 << 6) /* ...starting with the next one. */ +#define TERMP_SKIPCHAR (1 << 7) /* Skip the next character. */ +#define TERMP_NOBREAK (1 << 8) /* See term_flushln(). */ +#define TERMP_DANGLE (1 << 9) /* See term_flushln(). */ +#define TERMP_HANG (1 << 10) /* See term_flushln(). */ #define TERMP_NOSPLIT (1 << 11) /* See termp_an_pre/post(). */ #define TERMP_SPLIT (1 << 12) /* See termp_an_pre/post(). */ #define TERMP_ANPREC (1 << 13) /* See termp_an_pre(). */ -#define TERMP_KEEP (1 << 14) /* Keep words together. */ -#define TERMP_PREKEEP (1 << 15) /* ...starting with the next one. */ -#define TERMP_SKIPCHAR (1 << 16) /* Skip the next character. */ int *buf; /* Output buffer. */ enum termenc enc; /* Type of encoding. */ struct mchars *symtab; /* Encoded-symbol table. */