Date: Sun, 1 Jan 2012 22:15:38 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r229219 - head/bin/sh Message-ID: <201201012215.q01MFcKO033465@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Jan 1 22:15:38 2012 New Revision: 229219 URL: http://svn.freebsd.org/changeset/base/229219 Log: sh: Remove unused function scopyn(). Modified: head/bin/sh/mystring.c head/bin/sh/mystring.h Modified: head/bin/sh/mystring.c ============================================================================== --- head/bin/sh/mystring.c Sun Jan 1 22:11:22 2012 (r229218) +++ head/bin/sh/mystring.c Sun Jan 1 22:15:38 2012 (r229219) @@ -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. */ @@ -67,24 +66,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. */ Modified: head/bin/sh/mystring.h ============================================================================== --- head/bin/sh/mystring.h Sun Jan 1 22:11:22 2012 (r229218) +++ head/bin/sh/mystring.h Sun Jan 1 22:15:38 2012 (r229219) @@ -35,7 +35,6 @@ #include <string.h> -void scopyn(const char *, char *, int); int prefix(const char *, const char *); int number(const char *); int is_number(const char *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201012215.q01MFcKO033465>