From nobody Wed Oct 19 08:01:31 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MsjqH4lqvz4gDRg; Wed, 19 Oct 2022 08:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsjqH48H8z3xvg; Wed, 19 Oct 2022 08:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666166491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QhHd0cKnXqJpm/Qg8k1JnKP0Zb9L9DFT/FABOiMit5w=; b=evtYERrdX7fKgkXuiofUck72Wr7KJpCc2r3CGSSnmBfaYNyvcjKyyJOzjusD1CD9qi1c7E YhsEDihG8pT+MEKaSFJ6l/kv5SXfnYCtneLrk9N68TpI7Y7rJ9UDVLwSzXEP4qL0YGYJpR ic6S5Nsx6yzE1y+/Ai18gqWF5KJDIaWZYbYTjuhPjvOO+3r+8OdXfrbHJsKZna/h8Taw0F bTLlTFv6lZEZrOypF1fH/9L0nNJz0CAZANxeHZFCPsJROBYXuSD0iuQV34VovWC4jwyB++ QxHohSP6fDnyKsBA5m/xuQCDJ2C6ttVGt1+Ozwt9ElRG9JFf6jzUKX7czBQK2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MsjqH2v6RzSKm; Wed, 19 Oct 2022 08:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29J81Ve0060805; Wed, 19 Oct 2022 08:01:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29J81VdM060792; Wed, 19 Oct 2022 08:01:31 GMT (envelope-from git) Date: Wed, 19 Oct 2022 08:01:31 GMT Message-Id: <202210190801.29J81VdM060792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: d068b2c1ead2 - stable/13 - sort: remove unused function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d068b2c1ead2acab0d9fd93ee0cf7dd4d8366389 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666166491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QhHd0cKnXqJpm/Qg8k1JnKP0Zb9L9DFT/FABOiMit5w=; b=KhA+bB1P8k9cOIXoCrpwzwZfukCNnU30jmfdXbqlLYTl9P4jSdkT6CN3xer+YcFm992nov qjh1u6QwUgGwmNFtsaDFkidfr8jkywdZIoDkI1sIvr4Em2xFsa6XExr0xoH1KMbm4av7Tb 6g5Y4Jt4Kt1GJwc496sQOsfkW47A41nXBfd/S/gSW2CuI9PC9Rrwu7oV4V+oWa+/lxHQ7L itqD9H7xqB0aadZ5BQmvyw6m7+gdWAh/OZGMRradL6tKWQb81/J6egMFYQ6uyQE/nxjF8q dv9BRPQzxLzbvYxBM+ESBaOWI8+SWqCpicn+CVbAU9bglDSjqQQoM0btUK/Z6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666166491; a=rsa-sha256; cv=none; b=oFktUzYdSEkHFCCNGOphzgoXO61S1Ta1uR3CWHDMk2aU+52AxPflVCBdvas01wxcXZ/dFr YefYesFAfMLpmHyDRs5HnGOzP/EygcfALyW1yobmV6mp0GP8WpEm8bMydYsMMpTxQG4M6v tg78vdaoGg4ld3RhgyPtjnQ+kcXiILr4w33R9gSpw3qJfyVmRR52zJTbCBrczhcPF7dsY9 Cu6H4HEf4qvqjYIFVbXcdcMsoiBDj6Hc2kTij8OYaGQxcebXPXn7lVBWyYlwtUSdaORe4/ 5tHWOkiZ2j3Jt/JFZGFLQVRlwXR91w7Pl1D00rY4bO9ZZsFSIpQiPAUJvYU+Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d068b2c1ead2acab0d9fd93ee0cf7dd4d8366389 commit d068b2c1ead2acab0d9fd93ee0cf7dd4d8366389 Author: Baptiste Daroussin AuthorDate: 2022-10-13 07:33:12 +0000 Commit: Baptiste Daroussin CommitDate: 2022-10-19 07:59:29 +0000 sort: remove unused function (cherry picked from commit e8815fb30b340108bc4b36ab46afa31f673948d0) --- 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 129d03ad14b7..0e837c40b266 100644 --- a/usr.bin/sort/bwstring.h +++ b/usr.bin/sort/bwstring.h @@ -91,8 +91,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);