/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <tic.h>
-MODULE_ID("$Id: comp_parse.c,v 1.77 2011/10/01 22:43:51 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.81 2012/02/22 22:34:31 tom Exp $")
static void sanity_check2(TERMTYPE *, bool);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
static void sanity_check(TERMTYPE *);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype) (TERMTYPE *) = sanity_check;
-static void fixup_acsc(TERMTYPE *, bool);
+static void fixup_acsc(TERMTYPE *, int);
static void
enqueue(ENTRY * ep)
if (len > MAX_NAME_SIZE)
len = MAX_NAME_SIZE;
(void) strncpy(dst, src, len);
- (void) strcpy(dst + len, "|");
+ _nc_STRCPY(dst + len, "|", MAX_NAME_SIZE);
src = dst;
}
return src;
for_entry_list(qp) {
_nc_curr_line = (int) qp->startline;
_nc_set_type(_nc_first_name(qp->tterm.term_names));
- fixup_acsc(&qp->tterm, literal);
+ /*
+ * tic overrides this function pointer to provide more verbose
+ * checking.
+ */
+ if (_nc_check_termtype2 != sanity_check2) {
+ _nc_check_termtype2(&qp->tterm, literal);
+ } else {
+ fixup_acsc(&qp->tterm, literal);
+ }
}
DEBUG(2, ("SANITY CHECK FINISHED"));
}
#define CUR tp->
static void
-fixup_acsc(TERMTYPE *tp, bool literal)
+fixup_acsc(TERMTYPE *tp, int literal)
{
if (!literal) {
if (acs_chars == 0