diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-12-30 11:08:14 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-12-30 11:08:14 +0000 |
commit | 5ca44d1c915a0e0c87f8f347e61f7bfa65d609af (patch) | |
tree | 319eb1471eaf8c0c9cfc606e7cb8987ca9167507 /contrib/ncurses/progs/dump_entry.c | |
parent | 01b82453a3d0c6d76d4afc340c07cfc2be4a6b7a (diff) | |
download | src-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.tar.gz src-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.zip |
Import ncurses 5.6-20071222 snapshot onto the vender branch
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=174993
Diffstat (limited to 'contrib/ncurses/progs/dump_entry.c')
-rw-r--r-- | contrib/ncurses/progs/dump_entry.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/contrib/ncurses/progs/dump_entry.c b/contrib/ncurses/progs/dump_entry.c index 0a3cb38059cd..6320f3c1cf9f 100644 --- a/contrib/ncurses/progs/dump_entry.c +++ b/contrib/ncurses/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include <parametrized.h> /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.79 2006/09/30 20:18:15 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.81 2007/08/25 20:05:35 tom Exp $") #define INDENT 8 #define DISCARD(string) string = ABSENT_STRING @@ -352,14 +352,17 @@ version_filter(PredType type, PredIdx idx) } break; +#define is_termcap(type) (idx < (int) sizeof(type##_from_termcap) && \ + type##_from_termcap[idx]) + case V_BSD: /* BSD */ switch (type) { case BOOLEAN: - return bool_from_termcap[idx]; + return is_termcap(bool); case NUMBER: - return num_from_termcap[idx]; + return is_termcap(num); case STRING: - return str_from_termcap[idx]; + return is_termcap(str); } break; } @@ -788,11 +791,11 @@ fmt_entry(TERMTYPE *tterm, * Much more work should be done on this to support dumping termcaps. */ if (tversion == V_HPUX) { - if (memory_lock) { + if (VALID_STRING(memory_lock)) { (void) sprintf(buffer, "meml=%s", memory_lock); WRAP_CONCAT; } - if (memory_unlock) { + if (VALID_STRING(memory_unlock)) { (void) sprintf(buffer, "memu=%s", memory_unlock); WRAP_CONCAT; } @@ -1223,7 +1226,7 @@ repair_acsc(TERMTYPE *tp) bool fix_needed = FALSE; for (n = 0, source = 0; acs_chars[n] != 0; n++) { - target = acs_chars[n]; + target = UChar(acs_chars[n]); if (source >= target) { fix_needed = TRUE; break; @@ -1235,7 +1238,7 @@ repair_acsc(TERMTYPE *tp) if (fix_needed) { memset(mapped, 0, sizeof(mapped)); for (n = 0; acs_chars[n] != 0; n++) { - source = acs_chars[n]; + source = UChar(acs_chars[n]); if ((target = (unsigned char) acs_chars[n + 1]) != 0) { mapped[source] = target; n++; |