From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id C8626383B81E for ; Mon, 5 Jul 2021 19:07:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8626383B81E Received: by mail-wr1-x431.google.com with SMTP id i8so23278700wrc.0 for ; Mon, 05 Jul 2021 12:07:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ISIchPNl+YAz1RNYCTqTtySqPfrYk7XnL0DhUdeZWXI=; b=sbW0hMOlAnws5TS4hhHgr6fN7eSSuq4HEvl8d9cdLh/Rw1Dqzz14DVWbWcyxslKkMz bXMgrEVLtzCmVBfCPajc1fD29DhNkemdSPBMAWqh2cUAE3zucLBHDX4ZkFDIUUwfXa8p Zp/ciQVw+hVNr0tk14BTDbt5cxxw/DrgD7qh75b6ghLZWALmHXMMD5JOVps/UWXKu8W+ EAik207GUfnkJP4D02hFhQBqS8/6cTjJ33wXhFoTNWDj+S5LVMNBiZxD902XLiBkI9hi eOayY+aK0cbRlCG+flaFBnh7lHMC5+0rDfvkFl9iz4tQ5YKw3MubCt++M3CwMY11TBKW KlVQ== X-Gm-Message-State: AOAM5322Y/rcwS0QiBQk+op1x7Lwx1RxEkM/oD/Oc4V1GuPEmGdGDQc1 aay2OC5slhf+RFUofWyo8EE= X-Google-Smtp-Source: ABdhPJxp5XPK7+x6Yfp7BCom+RH96BX+6kkvM+akEB9WY3Tbh5Hup4Fn1Hcmk5vdEJ5qwR1Hq9zYrQ== X-Received: by 2002:adf:ef87:: with SMTP id d7mr17333835wro.204.1625512068968; Mon, 05 Jul 2021 12:07:48 -0700 (PDT) Received: from [10.8.0.150] ([195.53.121.100]) by smtp.gmail.com with ESMTPSA id e15sm14202943wrp.29.2021.07.05.12.07.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 12:07:48 -0700 (PDT) Subject: Re: new:mbrtoc32.3: convert from to c32 To: Bruno Haible , libc-alpha@sourceware.org, linux-man@vger.kernel.org, Peter Radisson References: <8295983.X7ISPF4pOe@omega> From: "Alejandro Colomar (man-pages)" Message-ID: <8f538e31-a730-0fcb-1d6b-c28e9fc164dd@gmail.com> Date: Mon, 5 Jul 2021 21:07:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <8295983.X7ISPF4pOe@omega> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2021 19:07:52 -0000 Hello Bruno, On 7/4/21 12:26 PM, Bruno Haible wrote: >> mbrtoc32, c32rtomb \- convert between multibyte sequence and 32-bit wide character > > I would suggest two separate man pages for these functions. > Rationale: > It is rare that some code uses mbrtoc32 and c32rtomb in the same function. > (Basically, functions that do input call mbrtoc32, and functions that do > output call c32rtomb.) And the description of mbrtoc32 is a bit complex. Okay. Indeed, the *wc* functions are documented separately. > >> Are there any important differences compared to the already-documented >> and C99-compliant mbrtowc(3) and wcrtomb(3)? I mean, apart from the >> types of the parameters. > > No for c32rtomb, but yes for mbrtoc32: mbrtowc has the special return > values (size_t)-1 and (size_t)-2, whereas mbrtoc32 also has the special > return value (size_t)-3. Although, on glibc currently this special > return value (size_t)-3 cannot occur. But IMO the man page should > mention it nevertheless, otherwise people write code that is not > future-proof. Thanks for those details! Regards, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/