The branch main has been updated by bapt:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e8815fb30b340108bc4b36ab46afa31f673948d0

commit e8815fb30b340108bc4b36ab46afa31f673948d0
Author:     Baptiste Daroussin <b...@freebsd.org>
AuthorDate: 2022-10-13 07:33:12 +0000
Commit:     Baptiste Daroussin <b...@freebsd.org>
CommitDate: 2022-10-13 08:24:11 +0000

    sort: remove unused function
---
 usr.bin/sort/bwstring.c | 57 -------------------------------------------------
 usr.bin/sort/bwstring.h |  2 --
 2 files changed, 59 deletions(-)

diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c
index 52173002986f..073a1280e2c1 100644
--- a/usr.bin/sort/bwstring.c
+++ b/usr.bin/sort/bwstring.c
@@ -322,63 +322,6 @@ bwsfree(const struct bwstring *s)
                sort_free(s);
 }
 
-/*
- * Copy content of src binary string to dst.
- * If the capacity of the dst string is not sufficient,
- * then the data is truncated.
- */
-size_t
-bwscpy(struct bwstring *dst, const struct bwstring *src)
-{
-       size_t nums = BWSLEN(src);
-
-       if (nums > BWSLEN(dst))
-               nums = BWSLEN(dst);
-
-       if (mb_cur_max == 1) {
-               memcpy(dst->cdata.str, src->cdata.str, nums);
-               dst->cdata.len = nums;
-               dst->cdata.str[dst->cdata.len] = '\0';
-       } else {
-               memcpy(dst->wdata.str, src->wdata.str,
-                   SIZEOF_WCHAR_STRING(nums));
-               dst->wdata.len = nums;
-               dst->wdata.str[nums] = L'\0';
-       }
-
-       return (nums);
-}
-
-/*
- * Copy content of src binary string to dst,
- * with specified number of symbols to be copied.
- * If the capacity of the dst string is not sufficient,
- * then the data is truncated.
- */
-struct bwstring *
-bwsncpy(struct bwstring *dst, const struct bwstring *src, size_t size)
-{
-       size_t nums = BWSLEN(src);
-
-       if (nums > BWSLEN(dst))
-               nums = BWSLEN(dst);
-       if (nums > size)
-               nums = size;
-
-       if (mb_cur_max == 1) {
-               memcpy(dst->cdata.str, src->cdata.str, nums);
-               dst->cdata.len = nums;
-               dst->cdata.str[nums] = '\0';
-       } else {
-               memcpy(dst->wdata.str, src->wdata.str,
-                   SIZEOF_WCHAR_STRING(nums));
-               dst->wdata.len = nums;
-               dst->wdata.str[nums] = L'\0';
-       }
-
-       return (dst);
-}
-
 /*
  * Copy content of src binary string to dst,
  * with specified number of symbols to be copied.
diff --git a/usr.bin/sort/bwstring.h b/usr.bin/sort/bwstring.h
index 09a0dbf2fac2..122503fb9f44 100644
--- a/usr.bin/sort/bwstring.h
+++ b/usr.bin/sort/bwstring.h
@@ -97,8 +97,6 @@ struct bwstring *bwsdup(const struct bwstring *s);
 struct bwstring *bwssbdup(const wchar_t *str, size_t size);
 struct bwstring *bwscsbdup(const unsigned char *str, size_t size);
 void bwsfree(const struct bwstring *s);
-size_t bwscpy(struct bwstring *dst, const struct bwstring *src);
-struct bwstring *bwsncpy(struct bwstring *dst, const struct bwstring *src, 
size_t size);
 struct bwstring *bwsnocpy(struct bwstring *dst, const struct bwstring *src, 
size_t offset, size_t size);
 int bwscmp(const struct bwstring *bws1, const struct bwstring *bws2, size_t 
offset);
 int bwsncmp(const struct bwstring *bws1, const struct bwstring *bws2, size_t 
offset, size_t len);

Reply via email to