summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-03-19 20:31:29 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-04-15 19:43:52 -0400
commit965bc251c1d8391e672f277686254299627d4e3c (patch)
treeefc7e9715a0453270a0ef4e21c04a6943972ebaa /util
parentc131d277ef061716b97e27cccc094bf1c0ae222f (diff)
Referring to the xterm FAQ
https://invisible-island.net/xterm/xterm.faq.html#building_it I would like to add an optional feature which makes the String typedef "const" if _CONST_X_STRING is defined. Modifying the Intrinsic.h header is only a partial solution because the library has not been modified to take advantage of this (if it had, most of the const-warnings from gcc would go away). This change modifies the header file as well as the makestrs.c program which generates Shell.h and StringDefs.h so that they use String-casts rather than char*-casts (reducing the warnings seen when compiling with Xt's header files). Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'util')
-rw-r--r--util/makestrs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/makestrs.c b/util/makestrs.c
index e626dee..774faa4 100644
--- a/util/makestrs.c
+++ b/util/makestrs.c
@@ -151,7 +151,7 @@ static void IntelABIWriteHeader (FILE *f, File *phile)
externrefstr, conststr ? conststr : fileprotstr, t->name);
for (te = t->tableent; te; te = te->next) {
(void) fprintf (f,
- "#ifndef %s%s\n#define %s%s ((char*)&%s[%lu])\n#endif\n",
+ "#ifndef %s%s\n#define %s%s ((String)&%s[%lu])\n#endif\n",
prefixstr, te->left, prefixstr, te->left, t->name,
(unsigned long) te->offset);
}
@@ -230,7 +230,7 @@ static void DefaultWriteHeader (FILE *f, File *phile)
for (t = phile->table; t; t = t->next) {
for (te = t->tableent; te; te = te->next) {
(void) fprintf (f,
- "#ifndef %s%s\n#define %s%s ((char*)&%s[%lu])\n#endif\n",
+ "#ifndef %s%s\n#define %s%s ((String)&%s[%lu])\n#endif\n",
prefixstr, te->left, prefixstr, te->left, phile->table->name,
(unsigned long) te->offset);
}