Thu Jul 11 20:39:28 2002 Michael Jennings (mej)

Addition to last fix.  Also, we're going to specify error messages
that *should* be shown and ignore others, not show all but a select
few.  This helps with the status line issue.


SVN revision: 6338
This commit is contained in:
Michael Jennings 2002-07-12 00:44:42 +00:00
parent aa959247eb
commit ba78b88603
3 changed files with 26 additions and 17 deletions

View File

@ -4767,3 +4767,9 @@ Thu Jul 11 20:03:23 2002 Michael Jennings (mej)
Each side of an || must have a valid shell command.
----------------------------------------------------------------------
Thu Jul 11 20:39:28 2002 Michael Jennings (mej)
Addition to last fix. Also, we're going to specify error messages
that *should* be shown and ignore others, not show all but a select
few. This helps with the status line issue.
----------------------------------------------------------------------

View File

@ -2513,26 +2513,29 @@ expire_buttons(void *xd, int n)
static int
err_msg(void *xd, int err, char *msg)
{
char *sc[] = { "Copy mode", "Bell in", "Wuff, Wuff!!" };
int n, nsc = sizeof(sc) / sizeof(char *);
#if DEBUG >= DEBUG_ESCREEN
if (DEBUG_LEVEL >= DEBUG_ESCREEN) {
char *sc[] = { "Copy mode", "Bell in", "Wuff, Wuff!!" };
int n, nsc = sizeof(sc) / sizeof(char *);
/* there are certain things that would make sense if we were displaying
a status-line; they do not, however, warrant an alert-box, so we drop
them here. */
USE_VAR(xd);
USE_VAR(err);
if (strlen(msg)) {
for (n = 0; n < nsc; n++) {
if (!strncmp(msg, sc[n], strlen(sc[n]))) {
break;
/* there are certain things that would make sense if we were displaying
a status-line; they do not, however, warrant an alert-box, so we drop
them here. */
if (strlen(msg)) {
for (n = 0; n < nsc; n++) {
if (!strncmp(msg, sc[n], strlen(sc[n]))) {
break;
}
}
if (n >= nsc) {
menu_dialog(NULL, msg, 0, NULL, NULL);
}
}
if (n >= nsc) {
menu_dialog(NULL, msg, 0, NULL, NULL);
}
}
#endif
USE_VAR(xd);
USE_VAR(err);
USE_VAR(msg);
return NS_SUCC;
}

View File

@ -1003,7 +1003,7 @@ ns_make_call(_ns_sess * sess)
tmp = screen = ns_make_call_el(NS_SCREEN_CALL, NS_SCREEN_OPTS, sess->rsrc);
#endif
if (sess->backend == NS_MODE_NEGOTIATE) {
int r, l = strlen(NS_SCREEM_CALL) + (scream ? strlen(scream) : 0) + (screen ? strlen(screen) : 0) - 3;
int r, l = strlen(NS_SCREEM_CALL) + (scream ? strlen(scream) : 1) + (screen ? strlen(screen) : 1) - 3;
if ((screem = MALLOC(l))) {
r = snprintf(screem, l, NS_SCREEM_CALL, scream ? scream : ":", screen ? screen : ":");