ncurses/ncurses-5.6-20070812-comphash.patch
Miroslav Lichvar afc9706767 - fix comp_hash string output
- avoid comparing padding in cchar_t structure
- remove gawk from buildrequires
2007-10-04 15:39:24 +00:00

36 lines
1.1 KiB
Diff

Index: ncurses/tinfo/comp_hash.c
Prereq: 1.32
--- ncurses-5.6-20070812+/ncurses/tinfo/comp_hash.c 2007-08-12 00:40:27.000000000 +0000
+++ ncurses-5.6-20070818/ncurses/tinfo/comp_hash.c 2007-08-18 21:42:25.000000000 +0000
@@ -50,7 +50,7 @@
#define DEBUG(level, params) /*nothing */
#endif
-MODULE_ID("$Id: comp_hash.c,v 1.32 2007/08/12 00:40:27 tom Exp $")
+MODULE_ID("$Id: comp_hash.c,v 1.33 2007/08/18 21:42:25 tom Exp $")
static int hash_function(const char *);
@@ -299,17 +299,17 @@
int len = 0;
int nxt;
- printf("static const char %s_names_text[] = \"\\\n", root_name);
+ printf("static const char %s_names_text[] = \\\n", root_name);
for (n = 0; n < CAPTABSIZE; n++) {
- nxt = strlen(name_table[n].nte_name) + 2;
+ nxt = strlen(name_table[n].nte_name) + 5;
if (nxt + len > 72) {
printf("\\\n");
len = 0;
}
- printf("%s\\0", name_table[n].nte_name);
+ printf("\"%s\\0\" ", name_table[n].nte_name);
len += nxt;
}
- printf("\";\n\n");
+ printf(";\n\n");
len = 0;
printf("static name_table_data const %s_names_data[] =\n",