From nobody Thu Oct 13 08:24:20 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 4Mp2cP0Y9Dz4fQ8c; Thu, 13 Oct 2022 08:24:21 +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 4Mp2cP01tXz3qLy; Thu, 13 Oct 2022 08:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665649461; 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=V97HGX67HnNuXQe3glAeEmxZlPz6bNxEWSGoZ5lDuCw=; b=MOBqZ5WeU7g/hTRwOQpl0Ny4jx1/rXJxB4aYS7X/S/9b3MA2uQgpYKqb63A7t0DbiERj2i Vg9eu3pzhyibr1XDQRBRyOge8tgaXEm/OHeRY/TbjrFtNLHuQk9Cx5v752prNIoWMm3ndZ DohP/ZVCnWgdQPHNdTw0SeDJFTEI/Og1Mnk+tCbQRNghv9CcraMs8VCwGGd3WDaab1ctmd XzvZ4BJMro1Ew4asPEP1/14FlbryBtAvH2EBhmNNszZq8loxVwdS5k8PPVn4Ef1i9R2nOl 3rtJOg/RvUafd+aVob2iqgVQg8TpZyRr64IGk5Syw1ZpdqTD13u3JY4i/7DgWw== 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 4Mp2cN6BpDzMcy; Thu, 13 Oct 2022 08:24:20 +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 29D8OK5f075610; Thu, 13 Oct 2022 08:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29D8OKUs075609; Thu, 13 Oct 2022 08:24:20 GMT (envelope-from git) Date: Thu, 13 Oct 2022 08:24:20 GMT Message-Id: <202210130824.29D8OKUs075609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e8815fb30b34 - main - 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/main X-Git-Reftype: branch X-Git-Commit: e8815fb30b340108bc4b36ab46afa31f673948d0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665649461; 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=V97HGX67HnNuXQe3glAeEmxZlPz6bNxEWSGoZ5lDuCw=; b=uanVRfCzNVrwj77TG1dzApdpBBGIR8i3uUNeKRTxWpT4hICRcHXr2mPGGUhXIkfisDgJ6C YLYULqLdadc0JHCfh3S99yXje/mn9tL50zdef6ZQnoI0fqYcHrujqTat8N9zvIUMgq8moW WNY0baaBJVu4RoGhYm1vaGNEJfKXUm6p+e8krAFtdkopvo7EkONZriczvLrupd4QBDD8e+ bzgXykZAGzUKLwuFXsgcwAxTYfDiQx+3f3kYzTliSM+5jp+mFbSynagTvjjJ0rncW03MXr vJCTa6qPeQWlEcI/425docjlvFxVzo0hs2PUeX2EbscqjGoIQZAOL0wlaTP77A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665649461; a=rsa-sha256; cv=none; b=HFbHCuP/NvfDuvxeRQdm+la7315rwKtvO14uJmEkfMFa38qXM5qHofOKLnBCP/ejNYSsCm Br0Nd9XqfUnE2Ip4U9G8NLtnw1tRtzfQWGpNGdT43BesjqBhnwRLZJmdDVobL7O+Fw/mNE hGUECJix3TnR2p1e8FZNnjhu7R5+aFJG8+lvCHTmdw+kuF0VPse4jWGXaykthZeKmiL1kU Xew3+2yIFCKkhO1J0qdHWzTNZp2A256fpuufDEqhu6/Vv/WZJXghDdygfyWI/xm97omJVk P13Jp/dWFmgaWwS6d86nvGTVE0EvvVO1LsoutGghK6zU5XAxLLwF8qnApOqNKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e8815fb30b340108bc4b36ab46afa31f673948d0 commit e8815fb30b340108bc4b36ab46afa31f673948d0 Author: Baptiste Daroussin AuthorDate: 2022-10-13 07:33:12 +0000 Commit: Baptiste Daroussin 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);