From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Kill man_action.c.
Date: Tue, 30 Nov 2010 10:36:28 -0500 (EST) [thread overview]
Message-ID: <201011301536.oAUFaSXE026732@krisdoz.my.domain> (raw)
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
reply other threads:[~2010-11-30 15:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201011301536.oAUFaSXE026732@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).