sed: remove unused strnacpy()
This commit is contained in:
parent
403b047a30
commit
dd395693d4
13
sed.c
13
sed.c
@ -122,7 +122,6 @@ static void push(Vec *v, void *p);
|
||||
static void stracat(String *dst, char *src);
|
||||
static void strnacat(String *dst, char *src, size_t n);
|
||||
static void stracpy(String *dst, char *src);
|
||||
static void strnacpy(String *dst, char *src, size_t n);
|
||||
|
||||
/* Cleanup and errors */
|
||||
static void usage(void);
|
||||
@ -342,18 +341,6 @@ stracpy(String *dst, char *src)
|
||||
strcpy(dst->str, src);
|
||||
}
|
||||
|
||||
static void
|
||||
strnacpy(String *dst, char *src, size_t n)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
len = strlen(src);
|
||||
len = strlen(dst->str) + MIN(n, len) + 1;
|
||||
if (dst->cap < len)
|
||||
resize((void **)&dst->str, &dst->cap, 1, len * 2, NULL);
|
||||
estrlcpy(dst->str, src, len);
|
||||
}
|
||||
|
||||
static void
|
||||
leprintf(char *s)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user