/****************************************************************************
- * 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 *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_termcap.c,v 1.74 2011/08/13 14:34:56 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.78 2012/02/22 22:34:31 tom Exp $")
NCURSES_EXPORT_VAR(char *) UP = 0;
NCURSES_EXPORT_VAR(char *) BC = 0;
same_tcname(const char *a, const char *b)
{
fprintf(stderr, "compare(%s,%s)\n", a, b);
- return !strncmp(a, b, 2);
+ return !strncmp(a, b, (size_t) 2);
}
+
#else
-#define same_tcname(a,b) !strncmp(a,b,2)
+#define same_tcname(a,b) !strncmp(a, b, (size_t) 2)
#endif
/***************************************************************************
#endif
if (j >= 0) {
result = tp->Strings[j];
- TR(TRACE_DATABASE, ("found match : %s", _nc_visbuf(result)));
+ TR(TRACE_DATABASE, ("found match %d: %s", j, _nc_visbuf(result)));
/* setupterm forces canceled strings to null */
if (VALID_STRING(result)) {
if (result == exit_attribute_mode
}
if (area != 0
&& *area != 0) {
- (void) strcpy(*area, result);
+ _nc_STRCPY(*area, result, 1024);
result = *area;
*area += strlen(*area) + 1;
}