X11 USE_XPM lint
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $NHDT-Date: 1524689304 2018/04/25 20:48:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $ */
|
/* $NHDT-Date: 1546081295 2018/12/29 11:01:35 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.12 $ */
|
||||||
/* Copyright (c) 2017 by Pasi Kallinen */
|
/* Copyright (c) 2017 by Pasi Kallinen */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -27,10 +27,11 @@ static unsigned char
|
|||||||
pix_to_colormap(pix)
|
pix_to_colormap(pix)
|
||||||
pixel pix;
|
pixel pix;
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned long i;
|
||||||
|
|
||||||
for (i = 0; i < header.ncolors; i++) {
|
for (i = 0; i < header.ncolors; i++) {
|
||||||
if (pix.r == ColorMap[CM_RED][i] && pix.g == ColorMap[CM_GREEN][i]
|
if (pix.r == ColorMap[CM_RED][i]
|
||||||
|
&& pix.g == ColorMap[CM_GREEN][i]
|
||||||
&& pix.b == ColorMap[CM_BLUE][i])
|
&& pix.b == ColorMap[CM_BLUE][i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -129,7 +130,8 @@ static int
|
|||||||
xpm_write(fp)
|
xpm_write(fp)
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
{
|
{
|
||||||
int i, j, n;
|
unsigned long i, j;
|
||||||
|
unsigned n;
|
||||||
|
|
||||||
if (header.ncolors > 64) {
|
if (header.ncolors > 64) {
|
||||||
Fprintf(stderr, "Sorry, only configured for up to 64 colors\n");
|
Fprintf(stderr, "Sorry, only configured for up to 64 colors\n");
|
||||||
@@ -144,7 +146,7 @@ FILE *fp;
|
|||||||
header.ncolors, 1 /* char per color */);
|
header.ncolors, 1 /* char per color */);
|
||||||
for (i = 0; i < header.ncolors; i++)
|
for (i = 0; i < header.ncolors; i++)
|
||||||
Fprintf(fp, "\"%c c #%02x%02x%02x\",\n",
|
Fprintf(fp, "\"%c c #%02x%02x%02x\",\n",
|
||||||
i + '0', /* just one char per color */
|
(char) (i + '0'), /* just one char per color */
|
||||||
x11_colormap[i][0], x11_colormap[i][1], x11_colormap[i][2]);
|
x11_colormap[i][0], x11_colormap[i][1], x11_colormap[i][2]);
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
@@ -179,7 +181,9 @@ char **argv;
|
|||||||
header.per_row = TILES_PER_ROW;
|
header.per_row = TILES_PER_ROW;
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
Fprintf(stderr, "usage: %s txt_file1 [txt_file2 ...] [-grayscale txt_fileN]\n", argv[0]);
|
Fprintf(stderr,
|
||||||
|
"usage: %s txt_file1 [txt_file2 ...] [-grayscale txt_fileN]\n",
|
||||||
|
argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 winX.c $NHDT-Date: 1539392992 2018/10/13 01:09:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */
|
/* NetHack 3.6 winX.c $NHDT-Date: 1546081304 2018/12/29 11:01:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.71 $ */
|
||||||
/* Copyright (c) Dean Luick, 1992 */
|
/* Copyright (c) Dean Luick, 1992 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1440,16 +1440,16 @@ static XtResource resources[] = {
|
|||||||
sizeof(XtRPixel), XtOffset(AppResources *, pilemark_color), XtRString,
|
sizeof(XtRPixel), XtOffset(AppResources *, pilemark_color), XtRString,
|
||||||
nhStr("Green") },
|
nhStr("Green") },
|
||||||
#ifdef GRAPHIC_TOMBSTONE
|
#ifdef GRAPHIC_TOMBSTONE
|
||||||
{ nhStr("tombstone"), "Tombstone", XtRString, sizeof(String),
|
{ nhStr("tombstone"), nhStr("Tombstone"), XtRString, sizeof(String),
|
||||||
XtOffset(AppResources *, tombstone), XtRString, "rip.xpm" },
|
XtOffset(AppResources *, tombstone), XtRString, nhStr("rip.xpm") },
|
||||||
{ nhStr("tombtext_x"), "Tombtext_x", XtRInt, sizeof(int),
|
{ nhStr("tombtext_x"), nhStr("Tombtext_x"), XtRInt, sizeof(int),
|
||||||
XtOffset(AppResources *, tombtext_x), XtRString, "155" },
|
XtOffset(AppResources *, tombtext_x), XtRString, nhStr("155") },
|
||||||
{ nhStr("tombtext_y"), "Tombtext_y", XtRInt, sizeof(int),
|
{ nhStr("tombtext_y"), nhStr("Tombtext_y"), XtRInt, sizeof(int),
|
||||||
XtOffset(AppResources *, tombtext_y), XtRString, "78" },
|
XtOffset(AppResources *, tombtext_y), XtRString, nhStr("78") },
|
||||||
{ nhStr("tombtext_dx"), "Tombtext_dx", XtRInt, sizeof(int),
|
{ nhStr("tombtext_dx"), nhStr("Tombtext_dx"), XtRInt, sizeof(int),
|
||||||
XtOffset(AppResources *, tombtext_dx), XtRString, "0" },
|
XtOffset(AppResources *, tombtext_dx), XtRString, nhStr("0") },
|
||||||
{ nhStr("tombtext_dy"), "Tombtext_dy", XtRInt, sizeof(int),
|
{ nhStr("tombtext_dy"), nhStr("Tombtext_dy"), XtRInt, sizeof(int),
|
||||||
XtOffset(AppResources *, tombtext_dy), XtRString, "13" },
|
XtOffset(AppResources *, tombtext_dy), XtRString, nhStr("13") },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 wintext.c $NHDT-Date: 1543622533 2018/12/01 00:02:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.16 $ */
|
/* NetHack 3.6 wintext.c $NHDT-Date: 1546081305 2018/12/29 11:01:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $ */
|
||||||
/* Copyright (c) Dean Luick, 1992 */
|
/* Copyright (c) Dean Luick, 1992 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ boolean blocking;
|
|||||||
#ifdef GRAPHIC_TOMBSTONE
|
#ifdef GRAPHIC_TOMBSTONE
|
||||||
if (text_info->is_rip) {
|
if (text_info->is_rip) {
|
||||||
Widget rip = create_ripout_widget(XtParent(wp->w));
|
Widget rip = create_ripout_widget(XtParent(wp->w));
|
||||||
XtSetArg(args[num_args], XtNfromVert, rip);
|
XtSetArg(args[num_args], nhStr(XtNfromVert), rip);
|
||||||
num_args++;
|
num_args++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -533,7 +533,7 @@ calculate_rip_text(int how, time_t when)
|
|||||||
static void
|
static void
|
||||||
rip_exposed(w, client_data, widget_data)
|
rip_exposed(w, client_data, widget_data)
|
||||||
Widget w;
|
Widget w;
|
||||||
XtPointer client_data; /* unused */
|
XtPointer client_data UNUSED;
|
||||||
XtPointer widget_data; /* expose event from Window widget */
|
XtPointer widget_data; /* expose event from Window widget */
|
||||||
{
|
{
|
||||||
XExposeEvent *event = (XExposeEvent *) widget_data;
|
XExposeEvent *event = (XExposeEvent *) widget_data;
|
||||||
|
|||||||
Reference in New Issue
Block a user