From patchwork Sat Apr 27 18:33:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 10920467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DED11395 for ; Sat, 27 Apr 2019 18:34:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E591A28A1F for ; Sat, 27 Apr 2019 18:34:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D405928A3C; Sat, 27 Apr 2019 18:34:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4217D28A1F for ; Sat, 27 Apr 2019 18:34:50 +0000 (UTC) Received: from localhost ([127.0.0.1]:35173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKS9w-000161-T5 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 27 Apr 2019 14:34:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKS8c-0000Gu-UD for qemu-devel@nongnu.org; Sat, 27 Apr 2019 14:33:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKS8c-00059a-49 for qemu-devel@nongnu.org; Sat, 27 Apr 2019 14:33:26 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:40776) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hKS8b-00057p-UH for qemu-devel@nongnu.org; Sat, 27 Apr 2019 14:33:26 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E42C48EA0; Sat, 27 Apr 2019 20:33:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iIZfFJaCp4rq; Sat, 27 Apr 2019 20:33:22 +0200 (CEST) Received: from function (105.251.129.77.rev.sfr.net [77.129.251.105]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 26CB13633; Sat, 27 Apr 2019 20:33:22 +0200 (CEST) Received: from samy by function with local (Exim 4.92) (envelope-from ) id 1hKS8M-0003L8-1N; Sat, 27 Apr 2019 20:33:10 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Sat, 27 Apr 2019 20:33:05 +0200 Message-Id: <20190427183307.12796-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PATCHv4 0/2] ui/curses: BSD portability fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , kamil@netbsd.org, kraxel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP BSD needs a few fixes for wide character manipulations. Difference with v1: - Fix unitialized value in error message Difference with v2: - Add cchar_t manipulation fix Difference with v3: - use mbrtowc/wcrtomb instead of mbtowc/wctomb - use MB_LEN_MAX instead of MB_CUR_MAX to avoid using a VLA. Samuel Thibault (2): ui/curses: do not assume wchar_t contains unicode ui/curses: manipulate cchar_t with standard curses functions ui/curses.c | 194 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 126 insertions(+), 68 deletions(-)