X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/4a4657f9f40ea60d08ecfb7c12fc46e29440ff58..06e772791dc47315932f53848223fb405328c2d4:/roff_validate.c diff --git a/roff_validate.c b/roff_validate.c index 6ffc7eed..6a76a1fb 100644 --- a/roff_validate.c +++ b/roff_validate.c @@ -1,6 +1,6 @@ -/* $Id: roff_validate.c,v 1.6 2017/06/04 22:44:15 schwarze Exp $ */ +/* $Id: roff_validate.c,v 1.10 2018/08/10 20:40:45 schwarze Exp $ */ /* - * Copyright (c) 2010, 2017 Ingo Schwarze + * Copyright (c) 2010, 2017, 2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,6 +18,7 @@ #include #include +#include #include "mandoc.h" #include "roff.h" @@ -32,9 +33,12 @@ static void roff_valid_ft(ROFF_VALID_ARGS); static const roff_valid_fp roff_valids[ROFF_MAX] = { NULL, /* br */ + NULL, /* ce */ roff_valid_ft, /* ft */ NULL, /* ll */ NULL, /* mc */ + NULL, /* po */ + NULL, /* rj */ NULL, /* sp */ NULL, /* ta */ NULL, /* ti */ @@ -55,7 +59,7 @@ roff_validate(struct roff_man *man) static void roff_valid_ft(ROFF_VALID_ARGS) { - char *cp; + const char *cp; if (n->child == NULL) { man->next = ROFF_NEXT_CHILD; @@ -81,7 +85,8 @@ roff_valid_ft(ROFF_VALID_ARGS) return; break; case 'C': - if (cp[1] == 'W' && cp[2] == '\0') + if (cp[1] != '\0' && cp[2] == '\0' && + strchr("BIRW", cp[1]) != NULL) return; break; default: