ctype tweaks
None of these explains the Windows assertion failure. end.c - post-3.6.0 options.c - in #else block of #if win32 winmenu.c - X11
This commit is contained in:
@@ -1678,7 +1678,7 @@ boolean ask;
|
||||
pfx = !strncmpi(buf, "the ", 3) ? 0
|
||||
: !strncmpi(buf, "an ", 3) ? 1
|
||||
: !strncmpi(buf, "a ", 2) ? 2
|
||||
: !isdigit(buf[2]) ? 4 : 0;
|
||||
: !digit(buf[2]) ? 4 : 0;
|
||||
if (class_header)
|
||||
++pfx;
|
||||
Sprintf(buftoo, "%*s%s", pfx, "", buf);
|
||||
|
||||
@@ -2207,12 +2207,13 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CHANGE_COLOR
|
||||
if (match_optname(opts, "palette", 3, TRUE)
|
||||
#ifdef MAC
|
||||
|| match_optname(opts, "hicolor", 3, TRUE)
|
||||
#endif
|
||||
) {
|
||||
) {
|
||||
int color_number, color_incr;
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -2227,17 +2228,16 @@ boolean tinitial, tfrom_file;
|
||||
}
|
||||
color_number = CLR_MAX + 4; /* HARDCODED inverse number */
|
||||
color_incr = -1;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (negated) {
|
||||
bad_negation("palette", FALSE);
|
||||
return;
|
||||
}
|
||||
color_number = 0;
|
||||
color_incr = 1;
|
||||
#ifdef MAC
|
||||
}
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
op = string_for_opt(opts, TRUE);
|
||||
if (!alternative_palette(op))
|
||||
@@ -2264,8 +2264,8 @@ boolean tinitial, tfrom_file;
|
||||
#else
|
||||
rgb <<= 8;
|
||||
#endif
|
||||
tmp = *(pt++);
|
||||
if (isalpha(tmp)) {
|
||||
tmp = *pt++;
|
||||
if (isalpha((uchar) tmp)) {
|
||||
tmp = (tmp + 9) & 0xf; /* Assumes ASCII... */
|
||||
} else {
|
||||
tmp &= 0xf; /* Digits in ASCII too... */
|
||||
@@ -2277,9 +2277,8 @@ boolean tinitial, tfrom_file;
|
||||
rgb += tmp;
|
||||
}
|
||||
}
|
||||
if (*pt == '/') {
|
||||
if (*pt == '/')
|
||||
pt++;
|
||||
}
|
||||
change_color(color_number, rgb, reverse);
|
||||
color_number += color_incr;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include "hack.h"
|
||||
#include "winX.h"
|
||||
#include <ctype.h>
|
||||
|
||||
static void FDECL(menu_select, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(invert_line, (struct xwindow *, x11_menu_item *, int, long));
|
||||
@@ -251,7 +250,7 @@ Cardinal *num_params;
|
||||
select_none(wp);
|
||||
} else if (ch == '\n' || ch == '\r') {
|
||||
; /* accept */
|
||||
} else if (isdigit(ch)) {
|
||||
} else if (digit(ch)) {
|
||||
/* special case: '0' is also the default ball class */
|
||||
if (ch == '0' && !menu_info->counting
|
||||
&& index(menu_info->curr_menu.gacc, ch))
|
||||
|
||||
Reference in New Issue
Block a user