about summary refs log tree commit diff
path: root/benchtests/sprintf-source.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchtests/sprintf-source.c')
-rw-r--r--benchtests/sprintf-source.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/benchtests/sprintf-source.c b/benchtests/sprintf-source.c
new file mode 100644
index 0000000000..29ea6c6a89
--- /dev/null
+++ b/benchtests/sprintf-source.c
@@ -0,0 +1,6 @@
+/* A set of arbitrarily selected positional format specifiers.  */
+#define FORMAT1 "   %1$d: %2$c%3$c%4$c%5$c%6$c %7$20s %8$f (%9$02x)\n"
+/* A matching, but arbitrarily selected, set of non-positional format specifiers.  */
+#define FORMAT2 "   %d: %c%c%c%c%c %20s %f (%02x)\n"
+/* Sufficiently large buffer.  */
+char buf[256];