Wed Nov 27 15:17:04 2002 Michael Jennings (mej)
Same as yesterday, only this time I'm *actually* going to fix the problem. >:I I should really read more carefully. While I was at it, I fixed some bad uses of BEG_STRCASECMP(). SVN revision: 6467
This commit is contained in:
parent
28dcf32708
commit
675bf268aa
|
@ -4939,3 +4939,10 @@ Tue Nov 26 17:51:34 2002 Michael Jennings (mej)
|
|||
|
||||
I need my Escreen sessions to be able to beep, so let's allow that.
|
||||
----------------------------------------------------------------------
|
||||
Wed Nov 27 15:17:04 2002 Michael Jennings (mej)
|
||||
|
||||
Same as yesterday, only this time I'm *actually* going to fix the
|
||||
problem. >:I I should really read more carefully.
|
||||
|
||||
While I was at it, I fixed some bad uses of BEG_STRCASECMP().
|
||||
----------------------------------------------------------------------
|
||||
|
|
|
@ -2518,7 +2518,7 @@ err_msg(void *xd, int err, char *msg)
|
|||
{
|
||||
#if DEBUG >= DEBUG_ESCREEN
|
||||
if (DEBUG_LEVEL >= DEBUG_ESCREEN) {
|
||||
char *sc[] = { "Copy mode", "Bell in", "Wuff" };
|
||||
char *sc[] = { "Copy mode", "Bell in" };
|
||||
int n, nsc = sizeof(sc) / sizeof(char *);
|
||||
|
||||
/* there are certain things that would make sense if we were displaying
|
||||
|
@ -2527,10 +2527,6 @@ err_msg(void *xd, int err, char *msg)
|
|||
if (strlen(msg)) {
|
||||
for (n = 0; n < nsc; n++) {
|
||||
if (!strncmp(msg, sc[n], strlen(sc[n]))) {
|
||||
if (n == 2) {
|
||||
/* Beep */
|
||||
scr_bell();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2538,11 +2534,16 @@ err_msg(void *xd, int err, char *msg)
|
|||
menu_dialog(NULL, msg, 0, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
||||
if (!BEG_STRCASECMP(msg, "Wuff")) {
|
||||
/* screen beeped, so go ahead and use our normal beep. */
|
||||
scr_bell();
|
||||
}
|
||||
|
||||
USE_VAR(xd);
|
||||
USE_VAR(err);
|
||||
USE_VAR(msg);
|
||||
return NS_SUCC;
|
||||
}
|
||||
|
||||
|
|
|
@ -1617,15 +1617,15 @@ parse_image(char *buff, void *state)
|
|||
char *allow;
|
||||
|
||||
for (; (allow = (char *) strsep(&allow_list, " ")) != NULL;) {
|
||||
if (!BEG_STRCASECMP("image", allow)) {
|
||||
if (!BEG_STRCASECMP(allow, "image")) {
|
||||
images[idx].mode |= ALLOW_IMAGE;
|
||||
} else if (!BEG_STRCASECMP("transparent", allow)) {
|
||||
} else if (!BEG_STRCASECMP(allow, "trans")) {
|
||||
images[idx].mode |= ALLOW_TRANS;
|
||||
} else if (!BEG_STRCASECMP("viewport", allow)) {
|
||||
} else if (!BEG_STRCASECMP(allow, "viewport")) {
|
||||
images[idx].mode |= ALLOW_VIEWPORT;
|
||||
} else if (!BEG_STRCASECMP("auto", allow)) {
|
||||
} else if (!BEG_STRCASECMP(allow, "auto")) {
|
||||
images[idx].mode |= ALLOW_AUTO;
|
||||
} else if (!BEG_STRCASECMP("solid", allow)) {
|
||||
} else if (!BEG_STRCASECMP(allow, "solid")) {
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Invalid mode \"%s\"\n", file_peek_path(), file_peek_line(), allow);
|
||||
}
|
||||
|
|
10
src/pixmap.c
10
src/pixmap.c
|
@ -222,15 +222,15 @@ parse_pixmap_ops(char *str)
|
|||
D_PIXMAP(("parse_pixmap_ops(str [%s]) called.\n", str));
|
||||
|
||||
for (; (token = (char *) strsep(&str, ":"));) {
|
||||
if (!BEG_STRCASECMP("tiled", token)) {
|
||||
if (!BEG_STRCASECMP(token, "tile")) {
|
||||
op |= OP_TILE;
|
||||
} else if (!BEG_STRCASECMP("hscaled", token)) {
|
||||
} else if (!BEG_STRCASECMP(token, "hscale")) {
|
||||
op |= OP_HSCALE;
|
||||
} else if (!BEG_STRCASECMP("vscaled", token)) {
|
||||
} else if (!BEG_STRCASECMP(token, "vscale")) {
|
||||
op |= OP_VSCALE;
|
||||
} else if (!BEG_STRCASECMP("scaled", token)) {
|
||||
} else if (!BEG_STRCASECMP(token, "scale")) {
|
||||
op |= OP_SCALE;
|
||||
} else if (!BEG_STRCASECMP("propscaled", token)) {
|
||||
} else if (!BEG_STRCASECMP(token, "propscale")) {
|
||||
op |= OP_PROPSCALE;
|
||||
}
|
||||
}
|
||||
|
|
24
src/term.c
24
src/term.c
|
@ -1978,11 +1978,11 @@ xterm_seq(int op, const char *str)
|
|||
if (iml->mod == NULL) {
|
||||
iml->mod = create_colormod();
|
||||
}
|
||||
if (!BEG_STRCASECMP("brightness", mod)) {
|
||||
if (!BEG_STRCASECMP(mod, "brightness")) {
|
||||
iml->mod->brightness = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("contrast", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "contrast")) {
|
||||
iml->mod->contrast = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("gamma", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "gamma")) {
|
||||
iml->mod->gamma = (int) strtol(valptr, (char **) NULL, 0);
|
||||
}
|
||||
update_cmod(iml->mod);
|
||||
|
@ -1995,11 +1995,11 @@ xterm_seq(int op, const char *str)
|
|||
if (iml->rmod == NULL) {
|
||||
iml->rmod = create_colormod();
|
||||
}
|
||||
if (!BEG_STRCASECMP("brightness", mod)) {
|
||||
if (!BEG_STRCASECMP(mod, "brightness")) {
|
||||
iml->rmod->brightness = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("contrast", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "contrast")) {
|
||||
iml->rmod->contrast = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("gamma", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "gamma")) {
|
||||
iml->rmod->gamma = (int) strtol(valptr, (char **) NULL, 0);
|
||||
}
|
||||
update_cmod(iml->rmod);
|
||||
|
@ -2012,11 +2012,11 @@ xterm_seq(int op, const char *str)
|
|||
if (iml->gmod == NULL) {
|
||||
iml->gmod = create_colormod();
|
||||
}
|
||||
if (!BEG_STRCASECMP("brightness", mod)) {
|
||||
if (!BEG_STRCASECMP(mod, "brightness")) {
|
||||
iml->gmod->brightness = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("contrast", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "contrast")) {
|
||||
iml->gmod->contrast = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("gamma", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "gamma")) {
|
||||
iml->gmod->gamma = (int) strtol(valptr, (char **) NULL, 0);
|
||||
}
|
||||
update_cmod(iml->gmod);
|
||||
|
@ -2029,11 +2029,11 @@ xterm_seq(int op, const char *str)
|
|||
if (iml->bmod == NULL) {
|
||||
iml->bmod = create_colormod();
|
||||
}
|
||||
if (!BEG_STRCASECMP("brightness", mod)) {
|
||||
if (!BEG_STRCASECMP(mod, "bright")) {
|
||||
iml->bmod->brightness = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("contrast", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "contrast")) {
|
||||
iml->bmod->contrast = (int) strtol(valptr, (char **) NULL, 0);
|
||||
} else if (!BEG_STRCASECMP("gamma", mod)) {
|
||||
} else if (!BEG_STRCASECMP(mod, "gamma")) {
|
||||
iml->bmod->gamma = (int) strtol(valptr, (char **) NULL, 0);
|
||||
}
|
||||
update_cmod(iml->bmod);
|
||||
|
|
Loading…
Reference in New Issue