From c16582d2ef6aeae45345aa89b14d49a560f66efc Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 30 Nov 2010 15:36:28 +0000 Subject: Kill man_action.c. --- Makefile | 6 ++-- libman.h | 2 -- man.c | 2 -- man_action.c | 99 ------------------------------------------------------------ man_macro.c | 8 ----- 5 files changed, 3 insertions(+), 114 deletions(-) delete mode 100644 man_action.c diff --git a/Makefile b/Makefile index fea183b1..d5a6eeb6 100644 --- a/Makefile +++ b/Makefile @@ -55,12 +55,12 @@ MDOCSRCS = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \ arch.c vol.c msec.c st.c MANLNS = man_macro.ln man.ln man_hash.ln man_validate.ln \ - man_action.ln man_argv.ln + man_argv.ln MANOBJS = man_macro.o man.o man_hash.o man_validate.o \ - man_action.o man_argv.o + man_argv.o MANSRCS = man_macro.c man.c man_hash.c man_validate.c \ - man_action.c man_argv.c + man_argv.c MAINLNS = main.ln mdoc_term.ln chars.ln term.ln tree.ln \ compat.ln man_term.ln html.ln mdoc_html.ln \ diff --git a/libman.h b/libman.h index fcc4d80a..d9e56d49 100644 --- a/libman.h +++ b/libman.h @@ -84,8 +84,6 @@ int man_vmsg(struct man *, enum mandocerr, int, int, const char *, ...); int man_valid_post(struct man *); int man_valid_pre(struct man *, struct man_node *); -int man_action_post(struct man *); -int man_action_pre(struct man *, struct man_node *); int man_unscope(struct man *, const struct man_node *, enum mandocerr); diff --git a/man.c b/man.c index 2a1070a7..dfd8b7d1 100644 --- a/man.c +++ b/man.c @@ -216,8 +216,6 @@ man_node_append(struct man *man, struct man_node *p) case (MAN_TEXT): if ( ! man_valid_post(man)) return(0); - if ( ! man_action_post(man)) - return(0); break; default: break; diff --git a/man_action.c b/man_action.c deleted file mode 100644 index 2868bf89..00000000 --- a/man_action.c +++ /dev/null @@ -1,99 +0,0 @@ -/* $Id$ */ -/* - * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -#include "mandoc.h" -#include "libman.h" -#include "libmandoc.h" - -struct actions { - int (*post)(struct man *); -}; - -const struct actions man_actions[MAN_MAX] = { - { NULL }, /* br */ - { NULL }, /* TH */ - { NULL }, /* SH */ - { NULL }, /* SS */ - { NULL }, /* TP */ - { NULL }, /* LP */ - { NULL }, /* PP */ - { NULL }, /* P */ - { NULL }, /* IP */ - { NULL }, /* HP */ - { NULL }, /* SM */ - { NULL }, /* SB */ - { NULL }, /* BI */ - { NULL }, /* IB */ - { NULL }, /* BR */ - { NULL }, /* RB */ - { NULL }, /* R */ - { NULL }, /* B */ - { NULL }, /* I */ - { NULL }, /* IR */ - { NULL }, /* RI */ - { NULL }, /* na */ - { NULL }, /* i */ - { NULL }, /* sp */ - { NULL }, /* nf */ - { NULL }, /* fi */ - { NULL }, /* r */ - { NULL }, /* RE */ - { NULL }, /* RS */ - { NULL }, /* DT */ - { NULL }, /* UC */ - { NULL }, /* PD */ - { NULL }, /* Sp */ - { NULL }, /* Vb */ - { NULL }, /* Ve */ - { NULL }, /* AT */ - { NULL }, /* in */ -}; - - -int -man_action_post(struct man *m) -{ - - if (MAN_ACTED & m->last->flags) - return(1); - m->last->flags |= MAN_ACTED; - - switch (m->last->type) { - case (MAN_TEXT): - /* FALLTHROUGH */ - case (MAN_ROOT): - return(1); - default: - break; - } - - if (NULL == man_actions[m->last->tok].post) - return(1); - return((*man_actions[m->last->tok].post)(m)); -} - - - - diff --git a/man_macro.c b/man_macro.c index cec6ca43..2b8bbad4 100644 --- a/man_macro.c +++ b/man_macro.c @@ -123,8 +123,6 @@ man_unscope(struct man *m, const struct man_node *n, return(0); if ( ! man_valid_post(m)) return(0); - if ( ! man_action_post(m)) - return(0); m->last = m->last->parent; assert(m->last); } @@ -133,8 +131,6 @@ man_unscope(struct man *m, const struct man_node *n, return(0); if ( ! man_valid_post(m)) return(0); - if ( ! man_action_post(m)) - return(0); m->next = MAN_ROOT == m->last->type ? MAN_NEXT_CHILD : MAN_NEXT_SIBLING; @@ -458,8 +454,6 @@ in_line_eoln(MACRO_PROT_ARGS) break; if ( ! man_valid_post(m)) return(0); - if ( ! man_action_post(m)) - return(0); } assert(m->last); @@ -470,8 +464,6 @@ in_line_eoln(MACRO_PROT_ARGS) if (m->last->type != MAN_ROOT && ! man_valid_post(m)) return(0); - if (m->last->type != MAN_ROOT && ! man_action_post(m)) - return(0); m->next = MAN_ROOT == m->last->type ? MAN_NEXT_CHILD : MAN_NEXT_SIBLING; -- cgit