aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-11-30 15:36:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-11-30 15:36:28 +0000
commit26da7f05bc7b6fd332991f1c1a4801a32bfe439f (patch)
treeda569706398b664a7de2ef44f360510947e951d3
parent94a8d3371b7f89fe2240182e3f4378a7b4da6b72 (diff)
downloadmandoc-26da7f05bc7b6fd332991f1c1a4801a32bfe439f.tar.gz
mandoc-26da7f05bc7b6fd332991f1c1a4801a32bfe439f.tar.zst
mandoc-26da7f05bc7b6fd332991f1c1a4801a32bfe439f.zip
Kill man_action.c.
-rw-r--r--Makefile6
-rw-r--r--libman.h4
-rw-r--r--man.c4
-rw-r--r--man_action.c99
-rw-r--r--man_macro.c10
5 files changed, 6 insertions, 117 deletions
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 da939e9c..e1a9aecc 100644
--- a/libman.h
+++ b/libman.h
@@ -1,4 +1,4 @@
-/* $Id: libman.h,v 1.43 2010/08/20 01:02:07 schwarze Exp $ */
+/* $Id: libman.h,v 1.44 2010/11/30 15:36:28 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 618aaf53..8f43f94a 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.87 2010/08/20 01:02:07 schwarze Exp $ */
+/* $Id: man.c,v 1.88 2010/11/30 15:36:28 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 344933d2..00000000
--- a/man_action.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* $Id: man_action.c,v 1.43 2010/11/30 15:24:27 kristaps Exp $ */
-/*
- * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
- *
- * 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 <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#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 d7b15131..e866d81d 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.50 2010/07/31 23:52:58 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.51 2010/11/30 15:36:28 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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;