version 1.13, 2000/01/09 05:06:02 |
version 1.14, 2000/03/13 23:53:41 |
|
|
#include <termsort.c> /* this C file is generated */ |
#include <termsort.c> /* this C file is generated */ |
#include <parametrized.h> /* so is this */ |
#include <parametrized.h> /* so is this */ |
|
|
MODULE_ID("$From: dump_entry.c,v 1.45 2000/01/08 22:19:05 Todd.Miller Exp $") |
MODULE_ID("$From: dump_entry.c,v 1.48 2000/03/12 02:33:01 tom Exp $") |
|
|
#define INDENT 8 |
#define INDENT 8 |
#define DISCARD(string) string = ABSENT_STRING |
#define DISCARD(string) string = ABSENT_STRING |
|
|
} |
} |
|
|
static void set_obsolete_termcaps(TERMTYPE * tp); |
static void set_obsolete_termcaps(TERMTYPE * tp); |
static void repair_acsc(TERMTYPE * tp); |
|
|
|
/* is this the index of a function key string? */ |
/* is this the index of a function key string? */ |
#define FNKEY(i) (((i)<= 65 && (i)>= 75) || ((i)<= 216 && (i)>= 268)) |
#define FNKEY(i) (((i)<= 65 && (i)>= 75) || ((i)<= 216 && (i)>= 268)) |
|
|
if (len & 1) |
if (len & 1) |
len++; |
len++; |
|
|
repair_acsc(tterm); |
|
for_each_string(j, tterm) { |
for_each_string(j, tterm) { |
i = StrIndirect(j); |
i = StrIndirect(j); |
name = ExtStrname(tterm, i, str_names); |
name = ExtStrname(tterm, i, str_names); |
|
|
} |
} |
|
|
void |
void |
compare_entry(void (*hook) (int t, int i, const char *name), TERMTYPE * tp GCC_UNUSED) |
compare_entry(void (*hook) (int t, int i, const char *name), TERMTYPE * tp GCC_UNUSED, bool quiet) |
/* compare two entries */ |
/* compare two entries */ |
{ |
{ |
int i, j; |
int i, j; |
NCURSES_CONST char *name; |
NCURSES_CONST char *name; |
|
|
(void) fputs(" comparing booleans.\n", stdout); |
if (!quiet) fputs(" comparing booleans.\n", stdout); |
for_each_boolean(j, tp) { |
for_each_boolean(j, tp) { |
i = BoolIndirect(j); |
i = BoolIndirect(j); |
name = ExtBoolname(tp, i, bool_names); |
name = ExtBoolname(tp, i, bool_names); |
|
|
if (isObsolete(outform, name)) |
if (isObsolete(outform, name)) |
continue; |
continue; |
|
|
(*hook) (BOOLEAN, i, name); |
(*hook) (CMP_BOOLEAN, i, name); |
} |
} |
|
|
(void) fputs(" comparing numbers.\n", stdout); |
if (!quiet) fputs(" comparing numbers.\n", stdout); |
for_each_number(j, tp) { |
for_each_number(j, tp) { |
i = NumIndirect(j); |
i = NumIndirect(j); |
name = ExtNumname(tp, i, num_names); |
name = ExtNumname(tp, i, num_names); |
|
|
if (isObsolete(outform, name)) |
if (isObsolete(outform, name)) |
continue; |
continue; |
|
|
(*hook) (NUMBER, i, name); |
(*hook) (CMP_NUMBER, i, name); |
} |
} |
|
|
(void) fputs(" comparing strings.\n", stdout); |
if (!quiet) fputs(" comparing strings.\n", stdout); |
for_each_string(j, tp) { |
for_each_string(j, tp) { |
i = StrIndirect(j); |
i = StrIndirect(j); |
name = ExtStrname(tp, i, str_names); |
name = ExtStrname(tp, i, str_names); |
|
|
if (isObsolete(outform, name)) |
if (isObsolete(outform, name)) |
continue; |
continue; |
|
|
(*hook) (STRING, i, name); |
(*hook) (CMP_STRING, i, name); |
} |
} |
|
|
|
/* (void) fputs(" comparing use entries.\n", stdout); */ |
|
(*hook) (CMP_USE, 0, "use"); |
|
|
} |
} |
|
|
#define NOTSET(s) ((s) == 0) |
#define NOTSET(s) ((s) == 0) |
|
|
* Convert an alternate-character-set string to canonical form: sorted and |
* Convert an alternate-character-set string to canonical form: sorted and |
* unique. |
* unique. |
*/ |
*/ |
static void |
void |
repair_acsc(TERMTYPE * tp) |
repair_acsc(TERMTYPE * tp) |
{ |
{ |
if (VALID_STRING(acs_chars)) { |
if (VALID_STRING(acs_chars)) { |