update name and prototype

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6980 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-09-16 19:34:00 +00:00
parent a5497bbd0d
commit 8965505116
2 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan * Copyright (c) 1995 - 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -43,12 +43,12 @@
RCSID("$Id$"); RCSID("$Id$");
#ifndef HAVE_STRCAT_TRUNCATE #ifndef HAVE_STRLCAT
int size_t
strcat_truncate (char *dst, const char *src, size_t dst_sz) strlcat (char *dst, const char *src, size_t dst_sz)
{ {
int len = strlen(dst); size_t len = strlen(dst);
return len + strcpy_truncate (dst + len, src, dst_sz - len); return len + strcpy_truncate (dst + len, src, dst_sz - len);
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan * Copyright (c) 1995 - 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -43,12 +43,12 @@
RCSID("$Id$"); RCSID("$Id$");
#ifndef HAVE_STRCPY_TRUNCATE #ifndef HAVE_STRLCPY
int size_t
strcpy_truncate (char *dst, const char *src, size_t dst_sz) strlcpy (char *dst, const char *src, size_t dst_sz)
{ {
int n; size_t n;
char *p; char *p;
for (p = dst, n = 0; for (p = dst, n = 0;