source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Kill man_action.c.
@ 2010-11-30 15:36 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-11-30 15:36 UTC (permalink / raw)
  To: source

Log Message:
-----------
Kill man_action.c.

Modified Files:
--------------
    mdocml:
        Makefile
        libman.h
        man.c
        man_macro.c

Removed Files:
-------------
    mdocml:
        man_action.c

Revision Data
-------------
--- 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));
-}
-
-
-
-
Index: man.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -Lman.c -Lman.c -u -p -r1.87 -r1.88
--- man.c
+++ man.c
@@ -216,8 +216,6 @@ man_node_append(struct man *man, struct 
 	case (MAN_TEXT):
 		if ( ! man_valid_post(man))
 			return(0);
-		if ( ! man_action_post(man))
-			return(0);
 		break;
 	default:
 		break;
Index: libman.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libman.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -Llibman.h -Llibman.h -u -p -r1.43 -r1.44
--- libman.h
+++ libman.h
@@ -84,8 +84,6 @@ int		  man_vmsg(struct man *, enum mando
 			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);
 
Index: Makefile
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/Makefile,v
retrieving revision 1.294
retrieving revision 1.295
diff -LMakefile -LMakefile -u -p -r1.294 -r1.295
--- Makefile
+++ Makefile
@@ -55,12 +55,12 @@ MDOCSRCS   = mdoc_macro.c mdoc.c mdoc_ha
 	     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 \
Index: man_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_macro.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lman_macro.c -Lman_macro.c -u -p -r1.50 -r1.51
--- man_macro.c
+++ man_macro.c
@@ -123,8 +123,6 @@ man_unscope(struct man *m, const struct 
 			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 
 		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);
@@ -469,8 +463,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 ?
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-30 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-30 15:36 mdocml: Kill man_action.c kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).