aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/tst-printf.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-03 18:29:16 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-07-03 18:29:16 +0200
commit5a357506659f9a00fcf5bc9c5d8fc676175c89a7 (patch)
tree27cf45c5af1219503b1563402f7f2aa06ffb56c6 /stdio-common/tst-printf.c
parent7279af007c420a9d5f88a6909d11e7cb712c16a4 (diff)
downloadglibc-5a357506659f9a00fcf5bc9c5d8fc676175c89a7.tar
glibc-5a357506659f9a00fcf5bc9c5d8fc676175c89a7.tar.gz
glibc-5a357506659f9a00fcf5bc9c5d8fc676175c89a7.tar.bz2
glibc-5a357506659f9a00fcf5bc9c5d8fc676175c89a7.zip
stdio-common/tst-printf.c: Remove part under a non-free license [BZ #23363]
The license does not allow modification. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'stdio-common/tst-printf.c')
-rw-r--r--stdio-common/tst-printf.c74
1 files changed, 2 insertions, 72 deletions
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);