From patchwork Sat Mar 13 15:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1452489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=D2OSUmIn; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DyR8T66qTz9sW1 for ; Sun, 14 Mar 2021 02:15:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45F183861810; Sat, 13 Mar 2021 15:15:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45F183861810 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615648550; bh=6fDreWk4gPEapY+aFH9PQKrLRHP6GLPGx88gJVmsOeo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=D2OSUmInr2E/DStCSniV/1W5S8hXTZfXA4s4Ehx828cIUE2iSMS1TBoA4geU4Br6j Elg2lt8wJnpnFQO4ePApNqJf6HoRIkGgXxxIcQKDOYyAfhG0b1MpHBA9vmNoMZoAOU JjTDw1XP3hpHWLxRNLykYlpMT16QcUjkZ3wCsOk8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 589233857C70 for ; Sat, 13 Mar 2021 15:15:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 589233857C70 Received: by mail-wm1-x32f.google.com with SMTP id y124-20020a1c32820000b029010c93864955so17520758wmy.5 for ; Sat, 13 Mar 2021 07:15:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6fDreWk4gPEapY+aFH9PQKrLRHP6GLPGx88gJVmsOeo=; b=TJqiyjpNaWNsAY26Jto9WBjggOO1nEplrGwiBdlSVnIWmJOA8fYFGHYqElcSEejMr8 SXWvvGBsLBdcPHm6pam9wtdi4I8Iee5QeLGrO72FpuAQXdjQ0BrFNx9CYz60zeNI8K8+ cz+Ek9LUnUpZvfLiMklNr1IlpU7iynmxw/wV2+LVtvF02+HGNwxRaJ6JHmgYCZLzrg6W wljCxdBm8v4paoCp8hR1njdajvMKSEwxioc0qwwQ5P3npkZqhExm8DIj7o6xKnRjE9cw qW4bc6vgu4pKE/S0OSVAJyXMODvkDYQ/Kb7p6cMOGgFJEXSqOs2mF7FcfXQVQ/VyA7AZ lJkQ== X-Gm-Message-State: AOAM5338/p/BiTkTk7DClaERrq/JtXhlgYyCYsw9ujRsION/PFvraJlu lYAGvldUUTkPOmb/xP0u0ps= X-Google-Smtp-Source: ABdhPJznnSYpVGuJLVhjTTDgZ6xoE+HbSsU3N+ILYUWJK3J/UfxT6zxyuPqMpVYmCvjE7Kgu2dj3EQ== X-Received: by 2002:a7b:c083:: with SMTP id r3mr18155288wmh.177.1615648546512; Sat, 13 Mar 2021 07:15:46 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id j9sm6749482wmi.24.2021.03.13.07.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 07:15:46 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH] wprintf.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 13 Mar 2021 16:06:53 +0100 Message-Id: <20210313150651.163299-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, Heinrich Schuchardt Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" POSIX uses 'restrict' in *wprintf() (see [v]fwprintf(3p)). Let's use it here too. Signed-off-by: Alejandro Colomar --- Hi Michael, I found this last one, which I didn't find through the glibc sources because they have a bit of a mess with *printf() functions. I checked that POSIX requires 'restrict'. At this point, I still have a few patches about prototypes (not restrict), but I'll buffer them for now. Cheers, Alex man3/wprintf.3 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/man3/wprintf.3 b/man3/wprintf.3 index 676fe1ed7..76acfbb34 100644 --- a/man3/wprintf.3 +++ b/man3/wprintf.3 @@ -22,15 +22,17 @@ wide-character output conversion .B #include .B #include .PP -.BI "int wprintf(const wchar_t *" format ", ...);" -.BI "int fwprintf(FILE *" stream ", const wchar_t *" format ", ...);" -.BI "int swprintf(wchar_t *" wcs ", size_t " maxlen , -.BI " const wchar_t *" format ", ...);" +.BI "int wprintf(const wchar_t *restrict " format ", ...);" +.BI "int fwprintf(FILE *restrict " stream , +.BI " const wchar_t *restrict " format ", ...);" +.BI "int swprintf(wchar_t *restrict " wcs ", size_t " maxlen , +.BI " const wchar_t *restrict " format ", ...);" .PP -.BI "int vwprintf(const wchar_t *" format ", va_list " args ); -.BI "int vfwprintf(FILE *" stream ", const wchar_t *" format ", va_list " args ); -.BI "int vswprintf(wchar_t *" wcs ", size_t " maxlen , -.BI " const wchar_t *" format ", va_list " args ); +.BI "int vwprintf(const wchar_t *restrict " format ", va_list " args ); +.BI "int vfwprintf(FILE *restrict " stream , +.BI " const wchar_t *restrict " format ", va_list " args ); +.BI "int vswprintf(wchar_t *restrict " wcs ", size_t " maxlen , +.BI " const wchar_t *restrict " format ", va_list " args ); .fi .PP .RS -4