From patchwork Sun Sep 18 22:16:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 57736 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC86B3858C00 for ; Sun, 18 Sep 2022 22:25:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC86B3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663539917; bh=oEXoiX9yt2ve7AvO8q7Uk/2OpCXnrSeLte5iUOVKeG0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=i1tgoteeLUu1sAyI5W2sDU4xbQ1hUjINrLJhZ1vVqO3QPixkmdzxsOzlA+sej65p1 6cLawEzsCPa/TmkMt1NLt8irOPQHLAS59G3kayk4qE/JAlIOwnfRdH4o5NkfdAxAdq ivGFQj+zqQcyguMbR8SWSf2b0u4oqWMOdTjF9ukE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 1BD363858D39 for ; Sun, 18 Sep 2022 22:24:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1BD363858D39 Received: by mail-lj1-x230.google.com with SMTP id a14so29780003ljj.8 for ; Sun, 18 Sep 2022 15:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=oEXoiX9yt2ve7AvO8q7Uk/2OpCXnrSeLte5iUOVKeG0=; b=6fJFPL7tFBdaRTxDKaTL+TXqjOCOGt9uNWYk64imiytxNOEC+lBNF+eaoslLFaFSJp GfMxZzjnx/JOnDxXEd8w2ulrzURrQt4iVt0hlsDbHKGe32VFGD18EofYQU2XzhZ+foqw m/m0JNdDby1OXasA4lUmiIK16md0jTJUt9L2uSV2Bp/TDHk1B8waa/4ojwQL5tSnQIbT 5PIRYtgqW9LbDThqnx8bLtegnJVpJLuoFmisTc1Pfst5vF4qg8VytO6RaDpDME1XL8O6 URcCGOpV5zDv79h/wv8PFe5loaS8ijTIRorwIMiyB6iOxDrztB4V6pMzov6DHxnro9+v 5BlA== X-Gm-Message-State: ACrzQf2Yp3nJiAd3pLG4FlgU2w2pBIpRxCACuuy19ei0J41qorgmPLel sjYOfc1uvZ4jIls8oANYAxU= X-Google-Smtp-Source: AMsMyM6Y1081QVetqfxlDS+dI7FkBjhpXPUz0WLXm/DQ4YS7DJ3lrUIc7JRn7cV9UKzgq+jyj55a5g== X-Received: by 2002:a2e:940b:0:b0:268:fa1c:106f with SMTP id i11-20020a2e940b000000b00268fa1c106fmr4133564ljh.101.1663539891021; Sun, 18 Sep 2022 15:24:51 -0700 (PDT) Received: from dell7760.lan ([31.169.55.19]) by smtp.googlemail.com with ESMTPSA id w10-20020a05651c118a00b0026c4c1a0b4dsm401340ljo.126.2022.09.18.15.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Sep 2022 15:24:50 -0700 (PDT) To: linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH] register_printf_speficier.3, register_printf_modifier.3, register_printf_type.3: Add new manual page and links Date: Mon, 19 Sep 2022 00:16:41 +0200 Message-Id: <20220918221640.19942-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Alex Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alex Colomar Cc: Alex Colomar , Walter Harms Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Reported-by: Walter Harms Signed-off-by: Alex Colomar --- Hello all, I wrote this manual page after on an old discussion with Walter, which I postponed too much. I had a long time ago written some using register_printf_specifier(3), and I remember having a lot of trouble using, since there's few documentation about it, if at all. I had to guess much of it. I wrote this manual page with a full example of using it (I'm sorry I have never used the other two, so I have no examples for them). But maybe this one, which is quite complete about the function it uses, will make it easier to understand the related APIs. If someone comes up with an example for the rest, I'd like to consider it (although I fear the EXAMPLES are taking too much space, but it may be worth it...). And it seems I also need some help with my own example, since I discovered there's some sort of undefined behavior in it (just run it several times and see; some work, but some do show weird stuff for the cases where with modifiers that make the number wider than unsigned int). If you find the undefined behavior, please show me. I'll continue debugging, anyway. Well, please review this page, and comment anything you don't like. Thank you very much in advance, Alex man3/register_printf_modifier.3 | 1 + man3/register_printf_speficier.3 | 439 +++++++++++++++++++++++++++++++ man3/register_printf_type.3 | 1 + 3 files changed, 441 insertions(+) create mode 100644 man3/register_printf_modifier.3 create mode 100644 man3/register_printf_speficier.3 create mode 100644 man3/register_printf_type.3 diff --git a/man3/register_printf_modifier.3 b/man3/register_printf_modifier.3 new file mode 100644 index 000000000..296a92dd3 --- /dev/null +++ b/man3/register_printf_modifier.3 @@ -0,0 +1 @@ +.so man3/register_printf_specifier.3 diff --git a/man3/register_printf_speficier.3 b/man3/register_printf_speficier.3 new file mode 100644 index 000000000..8911e293f --- /dev/null +++ b/man3/register_printf_speficier.3 @@ -0,0 +1,439 @@ +.\" Copyright (C) 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH register_printf_specifier 3 2022-09-18 "Linux man-pages (unreleased)" +.SH NAME +register_printf_specifier, +register_printf_modifier, +register_printf_type +\- define custom behavior for printf-like functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "typedef int printf_function(FILE *" stream , +.BI " const struct printf_info *" info , +.BI " const void *const *" args ); +.BI "typedef int printf_arginfo_size_function(const struct printf_info *" info , +.BI " size_t " n ", int *" argtypes ", int *" size ); +.BI "typedef void printf_va_arg_function(void *" mem ", va_list *" ap ); +.PP +.BI "int register_printf_specifier(int " spec ", printf_function " func , +.BI " printf_arginfo_size_function " arginfo ); +.BI "int register_printf_modifier(const wchar_t *" str ); +.BI "int register_printf_type(printf_va_arg_function " fct ); +.fi +.SH DESCRIPTION +These functions serve to extend and/or modify the behavior of the +.BR printf (3) +family of functions. +.SS register_printf_specifier() +This function registers a custom conversion specifier for the +.BR printf (3) +family of functions. +.PP +.I spec +is a character, +which will be used as a conversion specifier in the format string. +.PP +.I func +is a callback function that will be +executed by the +.BR printf (3) +family of functions +to format the input arguments into the output +.I stream +(transparently including the case of an output string). +.PP +.I arginfo +is a callback function that will be executed by the +.BR printf (3) +family of functions +to know how many arguments should be parsed for the custom specifier +and also their types. +.SS register_printf_modifier() +TODO +.SS register_printf_type() +TODO +.SH RETURN VALUE +.BR \%register_printf_specifier (), +.BR \%register_printf_modifier (), +and +.BR \%register_printf_type () +return zero on success, or \-1 on error. +.SS Callbacks +The callback of type +.I printf_function +should return the number of characters written, +or \-1 on error. +.PP +The callback of type +.I \%printf_arginfo_size_function +should return the number of arguments to be parsed by this specifier. +It also passes information about the type of those arguments +to the caller through +.IR argtypes . +On error, it should return \-1. +.SH ERRORS +TODO +.SH VERSIONS +.BR \%register_printf_function (3) +is an older function similar to +.BR \%register_printf_specifier, +and is now deprecated. +That function can't handle user-defined types. +.PP +.BR \%register_printf_specifier () +superseeds +.BR \%register_printf_function (3). +.SH STANDARDS +These nonstandard functions are present in glibc. +.SH EXAMPLES +The following example program registers the 'b' and 'B' specifiers +to print integers in binary format, +mirroring rules for other unsigned conversion specifiers like 'x' and 'u'. +This can be used to print in binary prior to C23. +.PP +.\" SRC BEGIN (register_printf_specifier.c) +.EX +/* This code is in the public domain */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define GROUP_SEP '_' + +struct Printf_Pad { + char ch; + int len; +}; + +static int printf_b_init(void); +static int b_printf(FILE *stream, const struct printf_info *info, + const void *const args[]); +static int b_arginf_sz(const struct printf_info *info, + size_t n, int argtypes[n], int *size); + +static uintmax_t b_value(const struct printf_info *info, + const void *arg); +static size_t b_bin_repr(char bin[UINTMAX_WIDTH], + const struct printf_info *info, const void *arg); +static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len); +static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len); +static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info); +static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, + size_t min_len); +static ssize_t b_print_number(FILE *stream, const struct printf_info *info, + const char bin[UINTMAX_WIDTH], + size_t min_len, size_t bin_len); +static char pad_ch(const struct printf_info *info); +static ssize_t pad_spaces(FILE *stream, size_t pad_len); + +int +main(void) +{ + if (printf_b_init() == \-1) + err(EXIT_FAILURE, "printf_b_init"); + + printf("....----....----....----....----\en"); + printf("%llb;\en", 0x5Ellu); + printf("%lB;\en", 0x5Elu); + printf("%b;\en", 0x5Eu); + printf("%hB;\en", 0x5Eu); + printf("%hhb;\en", 0x5Eu); + printf("%jb;\en", (uintmax_t)0x5E); + printf("%zb;\en", (size_t)0x5E); + printf("....----....----....----....----\en"); + printf("%#b;\en", 0x5Eu); + printf("%#B;\en", 0x5Eu); + printf("....----....----....----....----\en"); + printf("%10b;\en", 0x5Eu); + printf("%010b;\en", 0x5Eu); + printf("%.10b;\en", 0x5Eu); + printf("....----....----....----....----\en"); + printf("%\-10B;\en", 0x5Eu); + printf("....----....----....----....----\en"); + printf("%'B;\en", 0x5Eu); + printf("....----....----....----....----\en"); + printf("....----....----....----....----\en"); + printf("%#16.12b;\en", 0xAB); + printf("%\-#'20.12b;\en", 0xAB); + printf("%#'020B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%#020B;\en", 0xAB); + printf("%'020B;\en", 0xAB); + printf("%020B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%#021B;\en", 0xAB); + printf("%'021B;\en", 0xAB); + printf("%021B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%#022B;\en", 0xAB); + printf("%'022B;\en", 0xAB); + printf("%022B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%#023B;\en", 0xAB); + printf("%'023B;\en", 0xAB); + printf("%023B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%\-#'19.11b;\en", 0xAB); + printf("%#'019B;\en", 0xAB); + printf("%#019B;\en", 0xAB); + printf("....----....----....----....----\en"); + printf("%'019B;\en", 0xAB); + printf("%019B;\en", 0xAB); + printf("%#016b;\en", 0xAB); + printf("....----....----....----....----\en"); + + return 0; +} + +static int +printf_b_init(void) +{ + if (register_printf_specifier('b', b_printf, b_arginf_sz)) + return -1; + if (register_printf_specifier('B', b_printf, b_arginf_sz)) + return -1; + return 0; +} + +static int +b_printf(FILE *stream, const struct printf_info *info, + const void *const args[]) +{ + char bin[UINTMAX_WIDTH]; + size_t min_len, bin_len; + ssize_t len, tmp; + struct Printf_Pad pad = {0}; + + len = 0; + + min_len = b_bin_repr(bin, info, args[0]); + bin_len = b_bin_len(info, min_len); + + pad.ch = pad_ch(info); + if (pad.ch == ' ') + pad.len = b_pad_len(info, bin_len); + + /* Padding with ' ' (right aligned) */ + if ((pad.ch == ' ') && !info->left) { + tmp = pad_spaces(stream, pad.len); + if (tmp == EOF) + return EOF; + len += tmp; + } + + /* "0b"/"0B" prefix */ + if (info->alt) { + tmp = b_print_prefix(stream, info); + if (tmp == EOF) + return EOF; + len += tmp; + } + + /* Padding with '0' */ + if (pad.ch == '0') { + tmp = b_pad_zeros(stream, info, min_len); + if (tmp == EOF) + return EOF; + len += tmp; + } + + /* Print number (including leading 0s to fill precision) */ + tmp = b_print_number(stream, info, bin, min_len, bin_len); + if (tmp == EOF) + return EOF; + len += tmp; + + /* Padding with ' ' (left aligned) */ + if (info\->left) { + tmp = pad_spaces(stream, pad.len); + if (tmp == EOF) + return EOF; + len += tmp; + } + + return len; +} + +static int +b_arginf_sz([[maybe_unused]] const struct printf_info *info, + size_t n, int argtypes[n], [[maybe_unused]] int *size) +{ + if (n < 1) + return -1; + + argtypes[0] = PA_INT; + + return 1; +} + +static uintmax_t +b_value(const struct printf_info *info, const void *arg) +{ + if (info\->is_long_double) + return *(const unsigned long long *)arg; + if (info\->is_long) + return *(const unsigned long *)arg; + + /* 'h' and 'hh' are both promoted to int */ + return *(const unsigned int *)arg; +} + +static size_t +b_bin_repr(char bin[UINTMAX_WIDTH], + const struct printf_info *info, const void *arg) +{ + size_t min_len; + uintmax_t val; + + val = b_value(info, arg); + + bin[0] = '0'; + for (min_len = 0; val; min_len++) { + bin[min_len] = '0' + (val % 2); + val >>= 1; + } + + return MAX(min_len, 1); +} + +static size_t +b_bin_len(const struct printf_info *info, ptrdiff_t min_len) +{ + return MAX(info\->prec, min_len); +} + +static size_t +b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) +{ + ptrdiff_t pad_len; + + pad_len = info\->width \- bin_len; + if (info\->alt) + pad_len \-= 2; + if (info\->group) + pad_len \-= (bin_len \- 1) / 4; + + return MAX(pad_len, 0); +} + +static ssize_t +b_print_prefix(FILE *stream, const struct printf_info *info) +{ + ssize_t len; + + len = 0; + if (fputc('0', stream) == EOF) + return EOF; + len++; + if (fputc(info\->spec, stream) == EOF) + return EOF; + len++; + + return len; +} + +static ssize_t +b_pad_zeros(FILE *stream, const struct printf_info *info, + size_t min_len) +{ + size_t tmp; + ssize_t len; + + len = 0; + tmp = info\->width \- (info\->alt * 2); + if (info\->group) + tmp \-= tmp / 5 \- !(tmp % 5); + for (size_t i = tmp \- 1; i + 1 < min_len; i\-\-) { + if (fputc('0', stream) == EOF) + return EOF; + len++; + + if (!info\->group || (i % 4)) + continue; + if (fputc(GROUP_SEP, stream) == EOF) + return EOF; + len++; + } + + return len; +} + +static ssize_t +b_print_number(FILE *stream, const struct printf_info *info, + const char bin[UINTMAX_WIDTH], + size_t min_len, size_t bin_len) +{ + ssize_t len; + + len = 0; + + /* Print leading zeros to fill precision */ + for (size_t i = bin_len \- 1; i < bin_len; i\-\-) { + if (fputc('0', stream) == EOF) + return EOF; + len++; + + if (!info\->group || (i % 4)) + continue; + if (fputc(GROUP_SEP, stream) == EOF) + return EOF; + len++; + } + + /* Print number */ + for (size_t i = min_len \- 1; i < min_len; i\-\-) { + if (fputc(bin[i], stream) == EOF) + return EOF; + len++; + + if (!info\->group || (i % 4) || !i) + continue; + if (fputc(GROUP_SEP, stream) == EOF) + return EOF; + len++; + } + + return len; +} + +static char +pad_ch(const struct printf_info *info) +{ + if ((info\->prec != \-1) || (info\->pad == ' ') || info\->left) + return ' '; + return '0'; +} + +static ssize_t +pad_spaces(FILE *stream, size_t pad_len) +{ + ssize_t len; + + len = 0; + for (size_t i = pad_len; i < pad_len; i\-\-) { + if (fputc(' ', stream) == EOF) + return EOF; + len++; + } + + return len; +} +.EE +.\" SRC END +.SH SEE ALSO +TODO diff --git a/man3/register_printf_type.3 b/man3/register_printf_type.3 new file mode 100644 index 000000000..296a92dd3 --- /dev/null +++ b/man3/register_printf_type.3 @@ -0,0 +1 @@ +.so man3/register_printf_specifier.3 From patchwork Mon Sep 19 16:54:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 57756 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 76A6D3858015 for ; Mon, 19 Sep 2022 16:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76A6D3858015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663606526; bh=X7QLiXJKBsb2SB89rVCwRtd2mD9kKVy1c0l1Vm4Q9FQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=emitKMBa4EnIpnBSkpSCOBpUAqxZB5iv0bt+UXi2vUPaEq0D7e/gngsgbO581GvJE W7wYviOQNPcgK3yQmebEAqqe/wGDsu+XwFI9PAwE5vXxhZFmxalFWH28m+kJi1fCrE 3VibtTBu5Z+j6RrDSBDzmheO6qjoTQbyp+ECQc2A= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 09EBB3858D28 for ; Mon, 19 Sep 2022 16:55:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09EBB3858D28 Received: by mail-lf1-x12f.google.com with SMTP id o2so45752179lfc.10 for ; Mon, 19 Sep 2022 09:55:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=X7QLiXJKBsb2SB89rVCwRtd2mD9kKVy1c0l1Vm4Q9FQ=; b=jgMEPSFEkqlxc8kIDcMq0lULKlfGYOJcHvRCsuwFB18OSyp71DmDezQYZPccarbN54 EUlKviIbVmC/PyJt9sc+eIlfChCCVvK6DlAiw2Dc2QDwePDmucw2zxHuw0Vgd10CtbXI 8NceEZs1v01kgG58rvW9GiPAOZTqjRDU7rhR7jMGO5D8n5ICC9hCD7cIstCIR/0ROvNW lzYGUTOedbw3LCJUuIdOT/xeOlBMsy6AtQ2PzPRbjcWy3ileW6WibY59gvUVHkiEB/26 mFRvfRfxgzB0FC/OpO1lvxIPcu8Jqs4E4ayRxLQubFh6w/xhDqraQbyzCkcj9mWfhTQk Ut1g== X-Gm-Message-State: ACrzQf1n/ygpJBNUVJwI/nJWFb+0ZGWglAbH1oodTAliagCpKkWer7wC ANZ+g2jK5FGA54YlpNBGuTI= X-Google-Smtp-Source: AMsMyM5nbl55gzyhWpw4PFHHYxo0hXB94dgqvbcY87jgIFsI4LoL6G9CspObrQMcDc28lW3K8Kmvxw== X-Received: by 2002:ac2:5cc7:0:b0:497:a835:48c9 with SMTP id f7-20020ac25cc7000000b00497a83548c9mr6136354lfq.62.1663606503532; Mon, 19 Sep 2022 09:55:03 -0700 (PDT) Received: from dell7760.lan ([31.169.55.19]) by smtp.googlemail.com with ESMTPSA id m11-20020ac24acb000000b0049496855494sm5263815lfp.104.2022.09.19.09.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 09:55:03 -0700 (PDT) To: linux-man@vger.kernel.org Subject: [RFC v3 2/4] register_printf_specifier.3, register_printf_modifier.3, register_printf_type.3: Add links to printf.h(3head) Date: Mon, 19 Sep 2022 18:54:54 +0200 Message-Id: <20220919165456.28289-3-alx.manpages@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220918221640.19942-1-alx.manpages@gmail.com> References: <20220918221640.19942-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Alex Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alex Colomar Cc: Alex Colomar , "G. Branden Robinson" , Radisson97@gmx.de, libc-alpha@sourceware.org, Walter Harms Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Cc: Walter Harms Cc: Cc: "G. Branden Robinson" Cc: Signed-off-by: Alex Colomar --- man3/register_printf_modifier.3 | 1 + man3/register_printf_specifier.3 | 1 + man3/register_printf_type.3 | 1 + 3 files changed, 3 insertions(+) create mode 100644 man3/register_printf_modifier.3 create mode 100644 man3/register_printf_specifier.3 create mode 100644 man3/register_printf_type.3 diff --git a/man3/register_printf_modifier.3 b/man3/register_printf_modifier.3 new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3/register_printf_modifier.3 @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3/register_printf_specifier.3 b/man3/register_printf_specifier.3 new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3/register_printf_specifier.3 @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3/register_printf_type.3 b/man3/register_printf_type.3 new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3/register_printf_type.3 @@ -0,0 +1 @@ +.so man3head/printf.h.3head From patchwork Mon Sep 19 16:54:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 57757 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C0E93857C63 for ; Mon, 19 Sep 2022 16:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C0E93857C63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663606527; bh=SwNvvehCjAg3qxRMvcvOZou8ETYO8QonZxD2l9ju69Y=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=hLqzjbMq+6ebRWXQ4hSp1cQNl758gGG/hEB0Aa933b32hJYgXY9DZSk3un6vdpV0s bm08ehnQfTcgVkt0+YsK5C1o6bQZpH/CjdyucJk2uwEV3QpXBKw++3FhkzjnhTQQzC BHtsGdNo/F7VXotMpWPWnCSXRr4HYGOr53jyqpis= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id E20B33858D37 for ; Mon, 19 Sep 2022 16:55:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E20B33858D37 Received: by mail-lf1-x131.google.com with SMTP id i26so47941526lfp.11 for ; Mon, 19 Sep 2022 09:55:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=SwNvvehCjAg3qxRMvcvOZou8ETYO8QonZxD2l9ju69Y=; b=BLe5i9lr6Pi+tHvBL1RDfIPMY6TxomQPa6HzfQIk8sC8IlXOVtuNP8Q305x7xOVJvf ND+tz8wAdSrTGDcgx3TCiecFdCmi1VVGojPoN414N4HFw6qqg75gRlvUcPNl2eKpjkfu 0AR1XjuRSI8hJwbGzCKSg2RHdjlIHFhk4WkUEeeW45klKXhwhxL3ffftM61atxdp4OOb TQaNnC4BbZoO6cBoEmtRZziayJTUWzaam4u26wmZtHDYnFNKlY5RKMjTQrOUMO3nWBg8 ZaHioVGrQhqQoBZ3fNpOKXqYJtrfgpDk07fX8STnmLoTYbaUtNp/UBh4IoU7EYtrJ032 rsLg== X-Gm-Message-State: ACrzQf1dRDb5V4Jk87v1t+Ex5g82RTPgXLuWI0suOVgA88OFM4wac3xe egR633fn2Xny/3XB3Vmp2LM= X-Google-Smtp-Source: AMsMyM7rXJLrXyy8ixZ1du40h1S3yCzQPB2q2QODrPnYwpS0Ld/Rari1Fr+GePooqhwFcYY6N8M6Vw== X-Received: by 2002:a05:6512:6c3:b0:49a:d227:1b5b with SMTP id u3-20020a05651206c300b0049ad2271b5bmr6203034lff.386.1663606504546; Mon, 19 Sep 2022 09:55:04 -0700 (PDT) Received: from dell7760.lan ([31.169.55.19]) by smtp.googlemail.com with ESMTPSA id m11-20020ac24acb000000b0049496855494sm5263815lfp.104.2022.09.19.09.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 09:55:04 -0700 (PDT) To: linux-man@vger.kernel.org Subject: [RFC v3 3/4] printf_arginfo_size_function.3type, printf_function.3type, printf_info.3type, printf_va_arg_function.3type: Add links to printf.h(3head) Date: Mon, 19 Sep 2022 18:54:55 +0200 Message-Id: <20220919165456.28289-4-alx.manpages@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220918221640.19942-1-alx.manpages@gmail.com> References: <20220918221640.19942-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Alex Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alex Colomar Cc: Alex Colomar , "G. Branden Robinson" , Radisson97@gmx.de, libc-alpha@sourceware.org, Walter Harms Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Cc: Walter Harms Cc: Cc: "G. Branden Robinson" Cc: Signed-off-by: Alex Colomar --- man3type/printf_arginfo_size_function.3type | 1 + man3type/printf_function.3type | 1 + man3type/printf_info.3type | 1 + man3type/printf_va_arg_function.3type | 1 + 4 files changed, 4 insertions(+) create mode 100644 man3type/printf_arginfo_size_function.3type create mode 100644 man3type/printf_function.3type create mode 100644 man3type/printf_info.3type create mode 100644 man3type/printf_va_arg_function.3type diff --git a/man3type/printf_arginfo_size_function.3type b/man3type/printf_arginfo_size_function.3type new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3type/printf_arginfo_size_function.3type @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3type/printf_function.3type b/man3type/printf_function.3type new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3type/printf_function.3type @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3type/printf_info.3type b/man3type/printf_info.3type new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3type/printf_info.3type @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3type/printf_va_arg_function.3type b/man3type/printf_va_arg_function.3type new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3type/printf_va_arg_function.3type @@ -0,0 +1 @@ +.so man3head/printf.h.3head From patchwork Mon Sep 19 16:54:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 57759 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 118BC3858012 for ; Mon, 19 Sep 2022 16:56:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 118BC3858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663606581; bh=P00WhijRfH2E96H0tBil63UGxsOi+rpVPKVC/6OzbDA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ee9PMF2g6VufyLUdm0BVXVAYQZSMT0TSZQ/4snjnAeLIqphh7nOrYEOsMYhsEbwa5 RD4c1De3bWeSymdNAyjGUYsKFkVtjN7mNNVxeJeEMmDVUYUhU/ehiFmoa3NmXwxOIm IFIx2E1fIYlRvPC1hef8N30pSo8CjLTB4TLS+GVs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id B040B3858D38 for ; Mon, 19 Sep 2022 16:55:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B040B3858D38 Received: by mail-lj1-x233.google.com with SMTP id y14so4152355ljn.7 for ; Mon, 19 Sep 2022 09:55:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=P00WhijRfH2E96H0tBil63UGxsOi+rpVPKVC/6OzbDA=; b=7kdegccC38i2Hphxgj/w18QaDzyuKMlZkFesC6SYNtgFjl0WZSRkYk+of2axahuJUK YXbNRlgN4jO8YoMuXvVuBMUNwYGblOllhVIDbM3RUPKnndOogP3E4fuwzGdhf9DN3deV Uf3sHrwoCLUYWqowhNxFbiHUlj5UXT36g+LhXtB48cpuJLRHzIbMsJextTDs9DDkSkz+ 1EDeV5QGVcJfb3sjvTUkMAKPyHcjrEs2IY8qcShn506P6k0Q4XmRPIImTWVVvuEWW2cb GzABSeEZLt/wE+GmRKUBDoZ3/Ft4un+abOCxduPN3VeGtuvamu6oUb0K98hRK+JexfFk QKDA== X-Gm-Message-State: ACrzQf0dvvunZKUpJsU+BVyj+ymMEVVHBNQXlQfbYcOoNE2Q3IOU+hoV SvRAx/EPuug5lcgIIPGb8G4= X-Google-Smtp-Source: AMsMyM4pSVOiKBLYbcOX92WMYVsAq1XRAA1Ox6+KXu9UBlVnfjNAkqjt3F0ge87jZ/vd8TdYtKHmVQ== X-Received: by 2002:a2e:a601:0:b0:26c:4149:251a with SMTP id v1-20020a2ea601000000b0026c4149251amr3850720ljp.348.1663606505317; Mon, 19 Sep 2022 09:55:05 -0700 (PDT) Received: from dell7760.lan ([31.169.55.19]) by smtp.googlemail.com with ESMTPSA id m11-20020ac24acb000000b0049496855494sm5263815lfp.104.2022.09.19.09.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 09:55:04 -0700 (PDT) To: linux-man@vger.kernel.org Subject: [RFC v3 4/4] PA_CHAR.3const, PA_DOUBLE.3const, PA_FLAG_LONG.3const, PA_FLAG_LONG_DOUBLE.3const, PA_FLAG_LONG_LONG.3const, PA_FLAG_PTR.3const, PA_FLAG_SHORT.3const, PA_FLOAT.3const, PA_INT.3const, PA_LAST.3const, PA_POINTER.3const, PA_STRING.3const, PA_WCHAR.3const, PA_WSTRING.3const: Add links to printf.h(3head) Date: Mon, 19 Sep 2022 18:54:56 +0200 Message-Id: <20220919165456.28289-5-alx.manpages@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220918221640.19942-1-alx.manpages@gmail.com> References: <20220918221640.19942-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Alex Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alex Colomar Cc: Alex Colomar , "G. Branden Robinson" , Radisson97@gmx.de, libc-alpha@sourceware.org, Walter Harms Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Cc: Walter Harms Cc: Cc: "G. Branden Robinson" Cc: Signed-off-by: Alex Colomar --- man3const/PA_CHAR.3const | 1 + man3const/PA_DOUBLE.3const | 1 + man3const/PA_FLAG_LONG.3const | 1 + man3const/PA_FLAG_LONG_DOUBLE.3const | 1 + man3const/PA_FLAG_LONG_LONG.3const | 1 + man3const/PA_FLAG_PTR.3const | 1 + man3const/PA_FLAG_SHORT.3const | 1 + man3const/PA_FLOAT.3const | 1 + man3const/PA_INT.3const | 1 + man3const/PA_LAST.3const | 1 + man3const/PA_POINTER.3const | 1 + man3const/PA_STRING.3const | 1 + man3const/PA_WCHAR.3const | 1 + man3const/PA_WSTRING.3const | 1 + 14 files changed, 14 insertions(+) create mode 100644 man3const/PA_CHAR.3const create mode 100644 man3const/PA_DOUBLE.3const create mode 100644 man3const/PA_FLAG_LONG.3const create mode 100644 man3const/PA_FLAG_LONG_DOUBLE.3const create mode 100644 man3const/PA_FLAG_LONG_LONG.3const create mode 100644 man3const/PA_FLAG_PTR.3const create mode 100644 man3const/PA_FLAG_SHORT.3const create mode 100644 man3const/PA_FLOAT.3const create mode 100644 man3const/PA_INT.3const create mode 100644 man3const/PA_LAST.3const create mode 100644 man3const/PA_POINTER.3const create mode 100644 man3const/PA_STRING.3const create mode 100644 man3const/PA_WCHAR.3const create mode 100644 man3const/PA_WSTRING.3const diff --git a/man3const/PA_CHAR.3const b/man3const/PA_CHAR.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_CHAR.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_DOUBLE.3const b/man3const/PA_DOUBLE.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_DOUBLE.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLAG_LONG.3const b/man3const/PA_FLAG_LONG.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLAG_LONG.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLAG_LONG_DOUBLE.3const b/man3const/PA_FLAG_LONG_DOUBLE.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLAG_LONG_DOUBLE.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLAG_LONG_LONG.3const b/man3const/PA_FLAG_LONG_LONG.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLAG_LONG_LONG.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLAG_PTR.3const b/man3const/PA_FLAG_PTR.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLAG_PTR.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLAG_SHORT.3const b/man3const/PA_FLAG_SHORT.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLAG_SHORT.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_FLOAT.3const b/man3const/PA_FLOAT.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_FLOAT.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_INT.3const b/man3const/PA_INT.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_INT.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_LAST.3const b/man3const/PA_LAST.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_LAST.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_POINTER.3const b/man3const/PA_POINTER.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_POINTER.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_STRING.3const b/man3const/PA_STRING.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_STRING.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_WCHAR.3const b/man3const/PA_WCHAR.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_WCHAR.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head diff --git a/man3const/PA_WSTRING.3const b/man3const/PA_WSTRING.3const new file mode 100644 index 000000000..ad10bad38 --- /dev/null +++ b/man3const/PA_WSTRING.3const @@ -0,0 +1 @@ +.so man3head/printf.h.3head