version 1.371, 2020/02/27 21:43:44 |
version 1.373, 2020/04/06 10:16:17 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> |
|
* Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org> |
|
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
* |
|
* Implementation of the roff(7) parser for mandoc(1). |
*/ |
*/ |
#include "config.h" |
#include "config.h" |
|
|
Line 196 static int roff_ds(ROFF_ARGS); |
|
Line 198 static int roff_ds(ROFF_ARGS); |
|
static int roff_ec(ROFF_ARGS); |
static int roff_ec(ROFF_ARGS); |
static int roff_eo(ROFF_ARGS); |
static int roff_eo(ROFF_ARGS); |
static int roff_eqndelim(struct roff *, struct buf *, int); |
static int roff_eqndelim(struct roff *, struct buf *, int); |
static int roff_evalcond(struct roff *r, int, char *, int *); |
static int roff_evalcond(struct roff *, int, char *, int *); |
static int roff_evalnum(struct roff *, int, |
static int roff_evalnum(struct roff *, int, |
const char *, int *, int *, int); |
const char *, int *, int *, int); |
static int roff_evalpar(struct roff *, int, |
static int roff_evalpar(struct roff *, int, |
Line 1121 roff_node_transparent(struct roff_node *n) |
|
Line 1123 roff_node_transparent(struct roff_node *n) |
|
return 0; |
return 0; |
if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) |
if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) |
return 1; |
return 1; |
switch (n->tok) { |
return roff_tok_transparent(n->tok); |
|
} |
|
|
|
int |
|
roff_tok_transparent(enum roff_tok tok) |
|
{ |
|
switch (tok) { |
case ROFF_ft: |
case ROFF_ft: |
case ROFF_ll: |
case ROFF_ll: |
case ROFF_mc: |
case ROFF_mc: |