mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
sh: Remove unused function scopyn().
This commit is contained in:
parent
63dab8eed9
commit
f6d3a9b03f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229219
bin/sh
@ -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.
|
||||
*/
|
||||
|
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user