From 43890065593eb8a371e0985117ebd2d3fd7ad8c1 Mon Sep 17 00:00:00 2001 From: jilles Date: Wed, 15 Feb 2012 21:52:14 +0000 Subject: [PATCH] MFC r229219: sh: Remove unused function scopyn(). git-svn-id: svn://svn.freebsd.org/base/stable/9@231784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- bin/sh/mystring.c | 19 ------------------- bin/sh/mystring.h | 1 - 2 files changed, 20 deletions(-) diff --git a/bin/sh/mystring.c b/bin/sh/mystring.c index 53d703d55..67617ec04 100644 --- a/bin/sh/mystring.c +++ b/bin/sh/mystring.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); * * equal(s1, s2) Return true if strings are equal. * scopy(from, to) Copy a string. - * scopyn(from, to, n) Like scopy, but checks for overflow. * number(s) Convert a string of digits to an integer. * is_number(s) Return true if s is a string of digits. */ @@ -66,24 +65,6 @@ char nullstr[1]; /* zero length string */ */ -/* - * scopyn - copy a string from "from" to "to", truncating the string - * if necessary. "To" is always nul terminated, even if - * truncation is performed. "Size" is the size of "to". - */ - -void -scopyn(const char *from, char *to, int size) -{ - - while (--size > 0) { - if ((*to++ = *from++) == '\0') - return; - } - *to = '\0'; -} - - /* * prefix -- see if pfx is a prefix of string. */ diff --git a/bin/sh/mystring.h b/bin/sh/mystring.h index 1b27a1b00..5a6e3d8a4 100644 --- a/bin/sh/mystring.h +++ b/bin/sh/mystring.h @@ -35,7 +35,6 @@ #include -void scopyn(const char *, char *, int); int prefix(const char *, const char *); int number(const char *); int is_number(const char *); -- 2.45.0