Use strlcat, rather than strmcat, in make_status(). Remove a block of unused
ifdefed out code. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@414 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -798,17 +798,6 @@ void make_status(Window *win)
|
|||||||
(*ptr == ALL_OFF) || (*ptr == BOLD_TOG) ||
|
(*ptr == ALL_OFF) || (*ptr == BOLD_TOG) ||
|
||||||
(*ptr == BLINK_TOG))
|
(*ptr == BLINK_TOG))
|
||||||
*cp++ = *ptr++;
|
*cp++ = *ptr++;
|
||||||
#if 0
|
|
||||||
else if (*ptr == 9) /* TAB */
|
|
||||||
{
|
|
||||||
fillchar[0] = ' ';
|
|
||||||
fillchar[1] = 0;
|
|
||||||
do
|
|
||||||
*cp++ = ' ';
|
|
||||||
while (++(*prc) % 8);
|
|
||||||
ptr++;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* So it is a printable character.
|
* So it is a printable character.
|
||||||
* Or maybe its a tab. ;-)
|
* Or maybe its a tab. ;-)
|
||||||
@@ -849,8 +838,8 @@ void make_status(Window *win)
|
|||||||
|
|
||||||
numf = win->screen->co - pr_lhs - pr_rhs -1;
|
numf = win->screen->co - pr_lhs - pr_rhs -1;
|
||||||
while (numf-- >= 0)
|
while (numf-- >= 0)
|
||||||
strmcat(lhs_buffer, lhs_fillchar,
|
strlcat(lhs_buffer, lhs_fillchar,
|
||||||
BIG_BUFFER_SIZE);
|
sizeof lhs_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -861,13 +850,13 @@ void make_status(Window *win)
|
|||||||
int chars = win->screen->co - pr_lhs - 1;
|
int chars = win->screen->co - pr_lhs - 1;
|
||||||
|
|
||||||
while (chars-- >= 0)
|
while (chars-- >= 0)
|
||||||
strmcat(lhs_buffer, lhs_fillchar,
|
strlcat(lhs_buffer, lhs_fillchar,
|
||||||
BIG_BUFFER_SIZE);
|
sizeof lhs_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(buffer, lhs_buffer);
|
strcpy(buffer, lhs_buffer);
|
||||||
strmcat(buffer, rhs_buffer, BIG_BUFFER_SIZE);
|
strlcat(buffer, rhs_buffer, sizeof buffer);
|
||||||
strmcat(buffer, ALL_OFF_STR, BIG_BUFFER_SIZE);
|
strlcat(buffer, ALL_OFF_STR, sizeof buffer);
|
||||||
new_free(&str);
|
new_free(&str);
|
||||||
|
|
||||||
do_hook(STATUS_UPDATE_LIST, "%d %d %s",
|
do_hook(STATUS_UPDATE_LIST, "%d %d %s",
|
||||||
|
|||||||
Reference in New Issue
Block a user