<TABLE WIDTH="100%" CELLPADDING="2">
<COL CLASS="date">
<TBODY>
+ <TR>
+ <TD VALIGN="top"><SPAN CLASS="date">09-05-2010</SPAN></TD>
+ <TD VALIGN="top">
+ Fixed handling of <Q>\*(Ba</Q> escape. Backed out <SPAN
+ CLASS="flag">-fno-ign-chars</SPAN> (pointless complexity).
+ Version: <SPAN CLASS="rev">1.9.24</SPAN>.
+ </TR>
<TR>
<TD VALIGN="top"><SPAN CLASS="date">09-05-2010</SPAN></TD>
<TD VALIGN="top">
<TR>
<TD>
<DIV CLASS="foot">
- Copyright © 2008–2010 Kristaps Dzonsons, $Date: 2010/05/09 06:50:23 $
+ Copyright © 2008–2010 Kristaps Dzonsons, $Date: 2010/05/09 21:19:42 $
</DIV>
</TD>
</TR>
-/* $Id: main.c,v 1.61 2010/04/12 19:27:22 kristaps Exp $ */
+/* $Id: main.c,v 1.62 2010/05/09 21:19:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#define FL_IGN_SCOPE (1 << 0) /* Ignore scope errors. */
#define FL_NIGN_ESCAPE (1 << 1) /* Don't ignore bad escapes. */
#define FL_NIGN_MACRO (1 << 2) /* Don't ignore bad macros. */
-#define FL_NIGN_CHARS (1 << 3) /* Don't ignore bad chars. */
#define FL_IGN_ERRORS (1 << 4) /* Ignore failed parse. */
enum intt inttype; /* Input parsers... */
struct man *man;
};
#define FL_STRICT FL_NIGN_ESCAPE | \
- FL_NIGN_MACRO | \
- FL_NIGN_CHARS
+ FL_NIGN_MACRO
static int foptions(int *, char *);
static int toptions(struct curparse *, char *);
/* Defaults from mandoc.1. */
- pflags = MAN_IGN_MACRO | MAN_IGN_ESCAPE | MAN_IGN_CHARS;
+ pflags = MAN_IGN_MACRO | MAN_IGN_ESCAPE;
if (curp->fflags & FL_NIGN_MACRO)
pflags &= ~MAN_IGN_MACRO;
- if (curp->fflags & FL_NIGN_CHARS)
- pflags &= ~MAN_IGN_CHARS;
if (curp->fflags & FL_NIGN_ESCAPE)
pflags &= ~MAN_IGN_ESCAPE;
/* Defaults from mandoc.1. */
- pflags = MDOC_IGN_MACRO | MDOC_IGN_ESCAPE | MDOC_IGN_CHARS;
+ pflags = MDOC_IGN_MACRO | MDOC_IGN_ESCAPE;
if (curp->fflags & FL_IGN_SCOPE)
pflags |= MDOC_IGN_SCOPE;
pflags &= ~MDOC_IGN_ESCAPE;
if (curp->fflags & FL_NIGN_MACRO)
pflags &= ~MDOC_IGN_MACRO;
- if (curp->fflags & FL_NIGN_CHARS)
- pflags &= ~MDOC_IGN_CHARS;
return(mdoc_alloc(curp, pflags, &mdoccb));
}
toks[0] = "ign-scope";
toks[1] = "no-ign-escape";
toks[2] = "no-ign-macro";
- toks[3] = "no-ign-chars";
- toks[4] = "ign-errors";
- toks[5] = "strict";
- toks[6] = "ign-escape";
- toks[7] = NULL;
+ toks[3] = "ign-errors";
+ toks[4] = "strict";
+ toks[5] = "ign-escape";
+ toks[6] = NULL;
while (*arg) {
o = arg;
*fflags |= FL_NIGN_MACRO;
break;
case (3):
- *fflags |= FL_NIGN_CHARS;
- break;
- case (4):
*fflags |= FL_IGN_ERRORS;
break;
- case (5):
+ case (4):
*fflags |= FL_STRICT;
break;
- case (6):
+ case (5):
*fflags &= ~FL_NIGN_ESCAPE;
break;
default:
-/* $Id: man.h,v 1.27 2010/03/27 10:13:16 kristaps Exp $ */
+/* $Id: man.h,v 1.28 2010/05/09 21:19:42 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
};
#define MAN_IGN_MACRO (1 << 0)
-#define MAN_IGN_CHARS (1 << 1)
#define MAN_IGN_ESCAPE (1 << 2)
extern const char *const *man_macronames;
-/* $Id: man_validate.c,v 1.34 2010/04/03 14:12:48 kristaps Exp $ */
+/* $Id: man_validate.c,v 1.35 2010/05/09 21:19:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
if ('\t' == *p || isprint((u_char)*p))
continue;
- if (MAN_IGN_CHARS & m->pflags)
- return(man_pwarn(m, n->line, pos, WNPRINT));
- return(man_perr(m, n->line, pos, WNPRINT));
+ return(man_pwarn(m, n->line, pos, WNPRINT));
}
return(1);
-.\" $Id: mandoc.1,v 1.59 2010/04/13 05:26:49 kristaps Exp $
+.\" $Id: mandoc.1,v 1.60 2010/05/09 21:19:42 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 13 2010 $
+.Dd $Mdocdate: May 9 2010 $
.Dt MANDOC 1
.Os
.Sh NAME
scope violations.
This can seriously mangle the resulting tree.
.Pq mdoc only
-.It Fl f Ns Cm no-ign-chars
-Do not ignore disallowed characters.
.It Fl f Ns Cm no-ign-escape
Do not ignore invalid escape sequences.
.It Fl f Ns Cm no-ign-macro
Do not ignore unknown macros at the start of input lines.
.It Fl f Ns Cm strict
Implies
-.Fl f Ns Cm no-ign-escape ,
-.Fl f Ns Cm no-ign-macro ,
+.Fl f Ns Cm no-ign-escape
and
-.Fl f Ns Cm no-ign-chars .
+.Fl f Ns Cm no-ign-macro .
.El
.Ss Output Options
For the time being, only
-/* $Id: mdoc.h,v 1.74 2010/03/31 07:13:53 kristaps Exp $ */
+/* $Id: mdoc.h,v 1.75 2010/05/09 21:19:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#define MDOC_IGN_SCOPE (1 << 0) /* Ignore scope violations. */
#define MDOC_IGN_ESCAPE (1 << 1) /* Ignore bad escape sequences. */
#define MDOC_IGN_MACRO (1 << 2) /* Ignore unknown macros. */
-#define MDOC_IGN_CHARS (1 << 3) /* Ignore disallowed chars. */
/* Call-backs for parse messages. */
-/* $Id: mdoc_validate.c,v 1.70 2010/05/08 07:30:19 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.71 2010/05/09 21:19:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
static int warn_child_gt(struct mdoc *, const char *, int);
static int err_child_eq(struct mdoc *, const char *, int);
static int warn_child_eq(struct mdoc *, const char *, int);
-static int warn_print(struct mdoc *, int, int);
static int warn_count(struct mdoc *, const char *,
int, const char *, int);
static int err_count(struct mdoc *, const char *,
}
-static int
-warn_print(struct mdoc *m, int ln, int pos)
-{
-
- if (MDOC_IGN_CHARS & m->pflags)
- return(mdoc_pwarn(m, ln, pos, EPRINT));
- return(mdoc_perr(m, ln, pos, EPRINT));
-}
-
-
static inline int
warn_count(struct mdoc *m, const char *k,
int want, const char *v, int has)
for ( ; *p; p++, pos++) {
if ('\t' == *p) {
if ( ! (MDOC_LITERAL & mdoc->flags))
- if ( ! warn_print(mdoc, line, pos))
+ if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT))
return(0);
} else if ( ! isprint((u_char)*p))
- if ( ! warn_print(mdoc, line, pos))
+ if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT))
return(0);
if ('\\' != *p)