-/* $Id: man_macro.c,v 1.14 2009/04/12 19:45:26 kristaps Exp $ */
+/* $Id: man_macro.c,v 1.17 2009/06/18 10:53:58 kristaps Exp $ */
/*
- * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
+ * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
int *, char *, char **);
static int man_flags[MAN_MAX] = {
- 0, /* __ */
+ 0, /* br */
0, /* TH */
0, /* SH */
0, /* SS */
FL_NLINE, /* I */
FL_NLINE, /* IR */
FL_NLINE, /* RI */
- 0, /* br */
0, /* na */
FL_NLINE, /* i */
};
if (n == man->last && (FL_NLINE & man_flags[tok])) {
if (MAN_NLINE & man->flags)
- return(man_verr(man, line, ppos,
- "next-line scope already open"));
+ return(man_perr(man, line, ppos, WLNSCOPE));
man->flags |= MAN_NLINE;
return(1);
}
if (FL_TLINE & man_flags[tok]) {
if (MAN_NLINE & man->flags)
- return(man_verr(man, line, ppos,
- "next-line scope already open"));
+ return(man_perr(man, line, ppos, WLNSCOPE));
man->flags |= MAN_NLINE;
return(1);
}
if (buf[*pos])
return(1);
- if ( ! man_vwarn(m, line, *pos, "trailing spaces"))
+ if ( ! man_pwarn(m, line, *pos, WTSPACE))
return(-1);
return(1);
(*pos)++;
if (0 == buf[*pos]) {
- if ( ! man_vwarn(m, line, *pos, "unterminated quote"))
+ if ( ! man_pwarn(m, line, *pos, WTQUOTE))
return(-1);
return(1);
}
if (buf[*pos])
return(1);
- if ( ! man_vwarn(m, line, *pos, "trailing spaces"))
+ if ( ! man_pwarn(m, line, *pos, WTSPACE))
return(-1);
return(1);
}