version 1.104, 2014/08/01 21:24:17 |
version 1.106, 2014/08/10 23:54:41 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
#include "config.h" |
#endif |
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
Line 43 typedef int (*v_check)(CHKARGS); |
|
Line 41 typedef int (*v_check)(CHKARGS); |
|
static int check_eq0(CHKARGS); |
static int check_eq0(CHKARGS); |
static int check_eq2(CHKARGS); |
static int check_eq2(CHKARGS); |
static int check_le1(CHKARGS); |
static int check_le1(CHKARGS); |
static int check_ge2(CHKARGS); |
|
static int check_le5(CHKARGS); |
static int check_le5(CHKARGS); |
static int check_par(CHKARGS); |
static int check_par(CHKARGS); |
static int check_part(CHKARGS); |
static int check_part(CHKARGS); |
Line 142 check_root(CHKARGS) |
|
Line 139 check_root(CHKARGS) |
|
man->meta.hasbody = 1; |
man->meta.hasbody = 1; |
|
|
if (NULL == man->meta.title) { |
if (NULL == man->meta.title) { |
mandoc_msg(MANDOCERR_TH_MISSING, man->parse, |
mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse, |
n->line, n->pos, NULL); |
n->line, n->pos, NULL); |
|
|
/* |
/* |
Line 150 check_root(CHKARGS) |
|
Line 147 check_root(CHKARGS) |
|
* implication, date and section also aren't set). |
* implication, date and section also aren't set). |
*/ |
*/ |
|
|
man->meta.title = mandoc_strdup("unknown"); |
man->meta.title = mandoc_strdup(""); |
man->meta.msec = mandoc_strdup("1"); |
man->meta.msec = mandoc_strdup(""); |
man->meta.date = man->quick ? mandoc_strdup("") : |
man->meta.date = man->quick ? mandoc_strdup("") : |
mandoc_normdate(man->parse, NULL, n->line, n->pos); |
mandoc_normdate(man->parse, NULL, n->line, n->pos); |
} |
} |
Line 189 check_##name(CHKARGS) \ |
|
Line 186 check_##name(CHKARGS) \ |
|
INEQ_DEFINE(0, ==, eq0) |
INEQ_DEFINE(0, ==, eq0) |
INEQ_DEFINE(2, ==, eq2) |
INEQ_DEFINE(2, ==, eq2) |
INEQ_DEFINE(1, <=, le1) |
INEQ_DEFINE(1, <=, le1) |
INEQ_DEFINE(2, >=, ge2) |
|
INEQ_DEFINE(5, <=, le5) |
INEQ_DEFINE(5, <=, le5) |
|
|
static int |
static int |
Line 324 post_TH(CHKARGS) |
|
Line 320 post_TH(CHKARGS) |
|
struct man_node *nb; |
struct man_node *nb; |
const char *p; |
const char *p; |
|
|
check_ge2(man, n); |
|
check_le5(man, n); |
check_le5(man, n); |
|
|
free(man->meta.title); |
free(man->meta.title); |
Line 354 post_TH(CHKARGS) |
|
Line 349 post_TH(CHKARGS) |
|
} |
} |
} |
} |
man->meta.title = mandoc_strdup(n->string); |
man->meta.title = mandoc_strdup(n->string); |
} else |
} else { |
man->meta.title = mandoc_strdup(""); |
man->meta.title = mandoc_strdup(""); |
|
mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse, |
|
nb->line, nb->pos, "TH"); |
|
} |
|
|
/* TITLE ->MSEC<- DATE SOURCE VOL */ |
/* TITLE ->MSEC<- DATE SOURCE VOL */ |
|
|
Line 363 post_TH(CHKARGS) |
|
Line 361 post_TH(CHKARGS) |
|
n = n->next; |
n = n->next; |
if (n && n->string) |
if (n && n->string) |
man->meta.msec = mandoc_strdup(n->string); |
man->meta.msec = mandoc_strdup(n->string); |
else |
else { |
man->meta.msec = mandoc_strdup(""); |
man->meta.msec = mandoc_strdup(""); |
|
mandoc_vmsg(MANDOCERR_MSEC_MISSING, man->parse, |
|
nb->line, nb->pos, "TH %s", man->meta.title); |
|
} |
|
|
/* TITLE MSEC ->DATE<- SOURCE VOL */ |
/* TITLE MSEC ->DATE<- SOURCE VOL */ |
|
|