mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 21:51:40 +02:00
zsh-workers/7950
This commit is contained in:
parent
d18c1b3ac8
commit
1b60571be1
2 changed files with 13 additions and 4 deletions
|
@ -217,6 +217,10 @@ getcols(Listcols c)
|
|||
c->cols[COL_MA] = "";
|
||||
else
|
||||
c->cols[COL_EC] = tcstr[TCSTANDOUTEND];
|
||||
lr_caplen = 0;
|
||||
if ((max_caplen = strlen(c->cols[COL_MA])) <
|
||||
(l = strlen(c->cols[COL_EC])))
|
||||
max_caplen = l;
|
||||
return;
|
||||
}
|
||||
/* We have one of the parameters, use it. */
|
||||
|
@ -230,7 +234,7 @@ getcols(Listcols c)
|
|||
for (i = 0; i < NUM_COLS; i++) {
|
||||
if (!c->cols[i])
|
||||
c->cols[i] = defcols[i];
|
||||
if ((l = (c->cols[i] ? strlen(c->cols[i]) : 0)) > max_caplen)
|
||||
if (c->cols[i] && (l = strlen(c->cols[i])) > max_caplen)
|
||||
max_caplen = l;
|
||||
}
|
||||
lr_caplen = strlen(c->cols[COL_LC]) + strlen(c->cols[COL_RC]);
|
||||
|
|
11
Src/utils.c
11
Src/utils.c
|
@ -752,9 +752,14 @@ checkmailpath(char **s)
|
|||
fprintf(shout, "You have new mail.\n");
|
||||
fflush(shout);
|
||||
} else {
|
||||
char *usav = underscore;
|
||||
VARARR(char, usav, underscorelen);
|
||||
int sl = strlen(*s);
|
||||
|
||||
underscore = *s;
|
||||
if (sl >= underscorelen) {
|
||||
zfree(underscore, underscorelen);
|
||||
underscore = (char *) zalloc(underscorelen = sl + 32);
|
||||
}
|
||||
strcpy(underscore, *s);
|
||||
HEAPALLOC {
|
||||
u = dupstring(u);
|
||||
if (! parsestr(u)) {
|
||||
|
@ -763,8 +768,8 @@ checkmailpath(char **s)
|
|||
fputc('\n', shout);
|
||||
fflush(shout);
|
||||
}
|
||||
underscore = usav;
|
||||
} LASTALLOC;
|
||||
strcpy(underscore, usav);
|
||||
}
|
||||
}
|
||||
if (isset(MAILWARNING) && st.st_atime > st.st_mtime &&
|
||||
|
|
Loading…
Reference in a new issue