From patchwork Tue Jul 3 15:26:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 938724 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93946-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="KOfOR3A5"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Knz74dhSz9s2R for ; Wed, 4 Jul 2018 01:26:42 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= HVOObrkaQHHb0bsQ/KDxQ7IhRMw1DT0fuLnW8XFWzG0Af6+1cMOQQm6l/8aTHxJq rG/Gh+aANMWS8/kGi5tYPm848EdpaxY1qW8vw0Bc2SgpCUPMitE2dKHQ4w1rgiEi 2/vChMtuvROGoWnX5OYipEUSEM36MR0Ih2FRHMzx0v8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=ps6Khw FT+hYNOn5LYD/X4SYRLm8=; b=KOfOR3A5zdMdXdUEcWFzxkAxhsFrAYb0gm7zzt 3PyfIzo+LaAPkVHQVixvk14ZrdiKbgo3y7ky1YoNyxFU3Z834Ohi0pyvHCLqe2tF IqK4J8ssZK63eyFLVoYBLRPAARXKuzfotgdyVoM/3AKDHi/kwQt6+b3hutx43byj ftt64= Received: (qmail 29809 invoked by alias); 3 Jul 2018 15:26:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 27817 invoked by uid 89); 3 Jul 2018 15:26:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=uns, Part, evans, Evans X-HELO: mx1.redhat.com Date: Tue, 03 Jul 2018 17:26:30 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] stdio-common/tst-printf.c: Remove part under a non-free license [BZ #23363] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20180703152630.8B8F943994575@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) The license does not allow modification. 2018-07-03 Florian Weimer * stdio-common/tst-printf.c (DEC, INT, UNS, fp_test): Remove. * stdio-common/tst-printf.sh: Adjust expected output. * LICENSES: Update. Reviewed-by: Carlos O'Donell diff --git a/LICENSES b/LICENSES index b29efe0108..0e3a9fe39b 100644 --- a/LICENSES +++ b/LICENSES @@ -372,15 +372,6 @@ Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. -Part of stdio-common/tst-printf.c is copyright C E Chew: - -(C) Copyright C E Chew - -Feel free to copy, use and distribute this software provided: - - 1. you do not pretend that you wrote it - 2. you leave this copyright notice intact. - Various long double libm functions are copyright Stephen L. Moshier: Copyright 2001 by Stephen L. Moshier diff --git a/stdio-common/tst-printf.c b/stdio-common/tst-printf.c index d73f0cc34e..70d9e584b3 100644 --- a/stdio-common/tst-printf.c +++ b/stdio-common/tst-printf.c @@ -69,77 +69,7 @@ fmtst2chk (const char *fmt) (void) printf(fmt, 4, 4, 0x12); (void) printf("'\n"); } - -/* This page is covered by the following copyright: */ -/* (C) Copyright C E Chew - * - * Feel free to copy, use and distribute this software provided: - * - * 1. you do not pretend that you wrote it - * 2. you leave this copyright notice intact. - */ - -/* - * Extracted from exercise.c for glibc-1.05 bug report by Bruce Evans. - */ - -#define DEC -123 -#define INT 255 -#define UNS (~0) - -/* Formatted Output Test - * - * This exercises the output formatting code. - */ - -static void -fp_test (void) -{ - int i, j, k, l; - char buf[7]; - char *prefix = buf; - char tp[20]; - - puts("\nFormatted output test"); - printf("prefix 6d 6o 6x 6X 6u\n"); - strcpy(prefix, "%"); - for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) { - for (k = 0; k < 2; k++) { - for (l = 0; l < 2; l++) { - strcpy(prefix, "%"); - if (i == 0) strcat(prefix, "-"); - if (j == 0) strcat(prefix, "+"); - if (k == 0) strcat(prefix, "#"); - if (l == 0) strcat(prefix, "0"); - printf("%5s |", prefix); - strcpy(tp, prefix); - strcat(tp, "6d |"); - printf(tp, DEC); - strcpy(tp, prefix); - strcat(tp, "6o |"); - printf(tp, INT); - strcpy(tp, prefix); - strcat(tp, "6x |"); - printf(tp, INT); - strcpy(tp, prefix); - strcat(tp, "6X |"); - printf(tp, INT); - strcpy(tp, prefix); - strcat(tp, "6u |"); - printf(tp, UNS); - printf("\n"); - } - } - } - } - printf("%10s\n", (char *) NULL); - printf("%-10s\n", (char *) NULL); - printf("%.8f\n", DBL_MAX); - printf("%.8f\n", -DBL_MAX); -} - static int do_test (void) { @@ -239,8 +169,8 @@ I am ready for my first lesson today."; snprintf(buf2, sizeof(buf2), "%.999999u", 10)); } - fp_test (); - + printf("%.8f\n", DBL_MAX); + printf("%.8f\n", -DBL_MAX); printf ("%e should be 1.234568e+06\n", 1234567.8); printf ("%f should be 1234567.800000\n", 1234567.8); printf ("%g should be 1.23457e+06\n", 1234567.8); diff --git a/stdio-common/tst-printf.sh b/stdio-common/tst-printf.sh index 93bfe03c6f..b543cc646c 100644 --- a/stdio-common/tst-printf.sh +++ b/stdio-common/tst-printf.sh @@ -105,27 +105,6 @@ something really insane: 1.00000000000000000000000000000000000000000000000000000 | 123456.0000| 1.2346e+05| 1.235e+05| snprintf ("%30s", "foo") == 30, " " snprintf ("%.999999u", 10) == 999999 - -Formatted output test -prefix 6d 6o 6x 6X 6u -%-+#0 |-123 |0377 |0xff |0XFF |4294967295 | - %-+# |-123 |0377 |0xff |0XFF |4294967295 | - %-+0 |-123 |377 |ff |FF |4294967295 | - %-+ |-123 |377 |ff |FF |4294967295 | - %-#0 |-123 |0377 |0xff |0XFF |4294967295 | - %-# |-123 |0377 |0xff |0XFF |4294967295 | - %-0 |-123 |377 |ff |FF |4294967295 | - %- |-123 |377 |ff |FF |4294967295 | - %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 | - %+# | -123 | 0377 | 0xff | 0XFF |4294967295 | - %+0 |-00123 |000377 |0000ff |0000FF |4294967295 | - %+ | -123 | 377 | ff | FF |4294967295 | - %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 | - %# | -123 | 0377 | 0xff | 0XFF |4294967295 | - %0 |-00123 |000377 |0000ff |0000FF |4294967295 | - % | -123 | 377 | ff | FF |4294967295 | - (null) -(null) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000 1.234568e+06 should be 1.234568e+06 @@ -225,27 +204,6 @@ something really insane: 1.00000000000000000000000000000000000000000000000000000 | 123456.0000| 1.2346e+05| 1.235e+05| snprintf ("%30s", "foo") == 30, " " snprintf ("%.999999u", 10) == 999999 - -Formatted output test -prefix 6d 6o 6x 6X 6u -%-+#0 |-123 |0377 |0xff |0XFF |4294967295 | - %-+# |-123 |0377 |0xff |0XFF |4294967295 | - %-+0 |-123 |377 |ff |FF |4294967295 | - %-+ |-123 |377 |ff |FF |4294967295 | - %-#0 |-123 |0377 |0xff |0XFF |4294967295 | - %-# |-123 |0377 |0xff |0XFF |4294967295 | - %-0 |-123 |377 |ff |FF |4294967295 | - %- |-123 |377 |ff |FF |4294967295 | - %+#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 | - %+# | -123 | 0377 | 0xff | 0XFF |4294967295 | - %+0 |-00123 |000377 |0000ff |0000FF |4294967295 | - %+ | -123 | 377 | ff | FF |4294967295 | - %#0 |-00123 |000377 |0x00ff |0X00FF |4294967295 | - %# | -123 | 0377 | 0xff | 0XFF |4294967295 | - %0 |-00123 |000377 |0000ff |0000FF |4294967295 | - % | -123 | 377 | ff | FF |4294967295 | - (null) -(null) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000 1.234568e+06 should be 1.234568e+06