unexpose undefined part of the API, included strlcat

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14926 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-04-24 18:57:16 +00:00
parent a6a96fbc46
commit 7e40ed10e4
7 changed files with 98 additions and 65 deletions

View File

@@ -21,7 +21,7 @@
** Unix system-dependant routines for editline library.
*/
#include <config.h>
#include "editline.h"
#include "edit_locl.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
@@ -83,10 +83,10 @@ rl_ttyset(int Reset)
#endif /* HAVE_TERMIOS_H */
void
rl_add_slash(char *path, char *p)
rl_add_slash(char *path, char *p, size_t len)
{
struct stat Sb;
if (stat(path, &Sb) >= 0)
strcat(p, S_ISDIR(Sb.st_mode) ? "/" : " ");
strlcat(p, S_ISDIR(Sb.st_mode) ? "/" : " ", len);
}