PageRenderTime 1687ms queryFilters 0ms Sphinxql 1181ms GetByIds 310ms meta 0ms repositoryFilters 138ms languageFilters 0ms sourceFilters 40ms

354,720 results for 'printf' (1687 ms)

Source

Language

Repository

test-printf.c https://github.com/TeamBAKED/external_wpa_supplicant_8_ti.git | C | 84 lines
1/*
2 * printf format routines - test program
3 * Copyright (c) 2012, Jouni Malinen <j@w1.fi>
38	for (i = 0; i < len; i++)
39		printf(" %02x", data[i]);
40}
52		const struct test_data *test = &tests[i];
53		printf("%d:", i);
54		print_hex(test->data, test->len);
54		print_hex(test->data, test->len);
55		printf_encode(buf, sizeof(buf), test->data, test->len);
56		printf(" -> \"%s\"\n", buf);
57
58		binlen = printf_decode(bin, sizeof(bin), buf);
59		if (binlen != test->len ||
printf.c https://github.com/neilss/4.4BSD-Lite.git | C | 177 lines
32 *
33 *	@(#)printf.c	8.1 (Berkeley) 6/11/93
34 */
36/*
37 * Scaled down version of printf(3).
38 *
43 *
44 *	printf("reg=%b\n", regval, "<base><arg>*");
45 *
51 *
52 *	printf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
53 *
73#if __STDC__
74printf(const char *fmt, ...)
75#else
printf.c https://github.com/neilss/4.4BSD-Lite.git | C | 177 lines
32 *
33 *	@(#)printf.c	8.1 (Berkeley) 6/11/93
34 */
36/*
37 * Scaled down version of printf(3).
38 *
43 *
44 *	printf("reg=%b\n", regval, "<base><arg>*");
45 *
51 *
52 *	printf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
53 *
73#if __STDC__
74printf(const char *fmt, ...)
75#else
printf.c https://github.com/fjullien/orpsocv2.git | C | 747 lines
2//http://sources-redhat.mirrors.airband.net/ecos/releases/ecos-3.0b1/ecos-3.0beta1.i386linux.tar.bz2
3// File: ecos-3.0b1/packages/language/c/libc/stdio/v3_0b1/src/output/vfnprintf.cxx
4
127/*
128 * Actual printf innards.
129 *
679// Actual printf function we call, with static buffer of 512 bytes
680char PRINTFBUFFER[PRINTFBUFFER_SIZE]; // Declare a global printf buffer
681
688  
689  int str_l = vfnprintf(PRINTFBUFFER, PRINTFBUFFER_SIZE, fmt, args);
690  
718  
719  int str_l = vfnprintf(PRINTFBUFFER, PRINTFBUFFER_SIZE, fmt, args);
720  
printf.c https://bitbucket.org/VirtualReality/3p-hunspell | C | 428 lines
75   mingw does not have a function __printf__.  */
76# define libintl_printf __printf__
77#endif
88#if 0 /* not needed */
89#define asnprintf libintl_asnprintf
90#include "asnprintf.c"
299#if 0 /* not needed */
300#define asnwprintf libintl_asnwprintf
301#include "asnprintf.c"
305   /* Windows.  */
306#  define system_vswprintf _vsnwprintf
307# else
308   /* Unix.  */
309#  define system_vswprintf vswprintf
310# endif
c99-printf-1.c https://bitbucket.org/tari/prizm-gcc.git | C | 198 lines
1/* Test for printf formats.  Formats using C99 features, including cases
2   where C99 specifies some aspect of the format to be ignored or where
23  /* Valid and invalid %h, %hh, %l, %ll, %j, %z, %t, %L constructions.  */
24  printf ("%hf", d); /* { dg-warning "length" "bad use of %h" } */
25  printf ("%hF", d); /* { dg-warning "length" "bad use of %h" } */
25  printf ("%hF", d); /* { dg-warning "length" "bad use of %h" } */
26  printf ("%he", d); /* { dg-warning "length" "bad use of %h" } */
27  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
27  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hg", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%ha", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%hA", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%hA", d); /* { dg-warning "length" "bad use of %h" } */
32  printf ("%hc", i); /* { dg-warning "length" "bad use of %h" } */
33  printf ("%hs", s); /* { dg-warning "length" "bad use of %h" } */
ms_c90-printf-1.c https://bitbucket.org/tari/prizm-gcc.git | C | 185 lines
1/* Test for printf formats.  Formats using C90 features, including cases
2   where C90 specifies some aspect of the format to be ignored or where
21  /* Basic sanity checks for the different components of a format.  */
22  printf ("%d\n", i);
23  printf ("%+d\n", i);
23  printf ("%+d\n", i);
24  printf ("%3d\n", i);
25  printf ("%-3d\n", i);
25  printf ("%-3d\n", i);
26  printf ("%*d\n", i1, i);
27  printf ("%d %lu\n", i, ul);
28  /* Bogus use of width.  */
29  printf ("%5n\n", n); /* { dg-warning "width" "width with %n" } */
30  /* Valid and invalid %% constructions.  Some of the warning messages
33  */
34  printf ("%%");
35  printf ("%-%"); /* { dg-warning "format" "bogus %%" } */
c90-printf-1.c https://bitbucket.org/tari/prizm-gcc.git | C | 238 lines
1/* Test for printf formats.  Formats using C90 features, including cases
2   where C90 specifies some aspect of the format to be ignored or where
20  /* Basic sanity checks for the different components of a format.  */
21  printf ("%d\n", i);
22  printf ("%+d\n", i);
22  printf ("%+d\n", i);
23  printf ("%3d\n", i);
24  printf ("%-3d\n", i);
24  printf ("%-3d\n", i);
25  printf ("%.7d\n", i);
26  printf ("%+9.4d\n", i);
26  printf ("%+9.4d\n", i);
27  printf ("%.3ld\n", l);
28  printf ("%*d\n", i1, i);
28  printf ("%*d\n", i1, i);
29  printf ("%.*d\n", i2, i);
30  printf ("%*.*ld\n", i1, i2, l);
printf.c https://github.com/jtbattle/micropython.git | C | 300 lines
51
52int pfenv_printf(const pfenv_t *pfenv, const char *fmt, va_list args) {
53    int chrs = 0;
178                // to use pfenv_print_float with doubles then you'll need
179                // fix it to not use snprintf first. Otherwise you'll have
180                // inifinite recursion.
180                // inifinite recursion.
181#error Calling pfenv_print_float with double not supported from within printf
182#else
220
221int printf(const char *fmt, ...) {
222    va_list ap;
243
244// need this because gcc optimises printf("%c", c) -> putchar(c), and printf("a") -> putchar('a')
245int putchar(int c) {
t-printf.c https://bitbucket.org/bayger/hrt | C | 982 lines
138    {
139      printf ("wanted data doesn't match plain vsprintf\n");
140      printf ("  fmt      |%s|\n", fmt);
251            {
252              printf ("gmp_vsnprintf wrong result string\n");
253            error:
277    {
278      printf ("gmp_vasprintf wrong\n");
279      printf ("  fmt      |%s|\n", fmt);
307    {
308      printf ("gmp_obstack_vprintf wrong\n");
309      printf ("  fmt      |%s|\n", fmt);
966  tests_start ();
967  check_vfprintf_fp = fopen (CHECK_VFPRINTF_FILENAME, "w+");
968  ASSERT_ALWAYS (check_vfprintf_fp != NULL);
dfp-printf-1.c https://bitbucket.org/tari/prizm-gcc.git | C | 124 lines
1/* Test for printf formats for Decimal Floating Point types.  */
2
5/* { dg-options "-Wformat" } */
6/* { dg-skip-if "No scanf/printf dfp support" { *-*-mingw* } { "*" } { "" } } */
7
7
8extern int printf (const char *restrict, ...);
9
19
20  printf ("%Hf\n", x);
21  printf ("%HF\n", x);
21  printf ("%HF\n", x);
22  printf ("%He\n", x);
23  printf ("%HE\n", x);
23  printf ("%HE\n", x);
24  printf ("%Hg\n", x);
25  printf ("%HG\n", x);
ms_c99-printf-1.c https://bitbucket.org/tari/prizm-gcc.git | C | 110 lines
1/* Test for printf formats.  Formats using C99 features, including cases
2   where C99 specifies some aspect of the format to be ignored or where
24  /* Valid and invalid %h, %hh, %l, %j, %z, %t, %L constructions.  */
25  printf ("%hf", d); /* { dg-warning "length" "bad use of %h" } */
26  printf ("%hF", d); /* { dg-warning "unknown|format" "bad use of %hF" } */
26  printf ("%hF", d); /* { dg-warning "unknown|format" "bad use of %hF" } */
27  printf ("%he", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hg", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%ha", d); /* { dg-warning "unknown|format" "bad use of %ha" } */
32  printf ("%hA", d); /* { dg-warning "unknown|format" "bad use of %hA" } */
32  printf ("%hA", d); /* { dg-warning "unknown|format" "bad use of %hA" } */
33  printf ("%hc", i);
34  printf ("%hs", (short *)s);
tst-printf.c https://bitbucket.org/Mali_Laurent/ps50c550.git | C | 393 lines
221    char buf2[512];
222    printf ("snprintf (\"%%30s\", \"foo\") == %d, \"%.*s\"\n",
223	    snprintf (buf, sizeof (buf), "%30s", "foo"), (int) sizeof (buf),
276  printf ("printf (\"%%hhi\", %i) = %hhi\n", UCHAR_MAX + 2, UCHAR_MAX + 2);
277  printf ("printf (\"%%hi\", %i) = %hi\n", USHRT_MAX + 2, USHRT_MAX + 2);
278
278
279  printf ("printf (\"%%1$hhu\", %2$u) = %1$hhu\n",
280	  UCHAR_MAX + 2, UCHAR_MAX + 2);
281  printf ("printf (\"%%1$hu\", %2$u) = %1$hu\n", USHRT_MAX + 2, USHRT_MAX + 2);
282  printf ("printf (\"%%1$hhi\", %2$i) = %1$hhi\n",
283	  UCHAR_MAX + 2, UCHAR_MAX + 2);
283	  UCHAR_MAX + 2, UCHAR_MAX + 2);
284  printf ("printf (\"%%1$hi\", %2$i) = %1$hi\n", USHRT_MAX + 2, USHRT_MAX + 2);
285
dfp-printf-1.c https://bitbucket.org/vaporoid/gcc.git | C | 123 lines
1/* Test for printf formats for Decimal Floating Point types.  */
2
5/* { dg-options "-Wformat" } */
6/* { dg-skip-if "No scanf/printf dfp support" { *-*-mingw* } { "*" } { "" } } */
7
7
8extern int printf (const char *restrict, ...);
9
19
20  printf ("%Hf\n", x);
21  printf ("%HF\n", x);
21  printf ("%HF\n", x);
22  printf ("%He\n", x);
23  printf ("%HE\n", x);
23  printf ("%HE\n", x);
24  printf ("%Hg\n", x);
25  printf ("%HG\n", x);
c90-printf-1.c https://bitbucket.org/vaporoid/gcc.git | C | 237 lines
1/* Test for printf formats.  Formats using C90 features, including cases
2   where C90 specifies some aspect of the format to be ignored or where
20  /* Basic sanity checks for the different components of a format.  */
21  printf ("%d\n", i);
22  printf ("%+d\n", i);
22  printf ("%+d\n", i);
23  printf ("%3d\n", i);
24  printf ("%-3d\n", i);
24  printf ("%-3d\n", i);
25  printf ("%.7d\n", i);
26  printf ("%+9.4d\n", i);
26  printf ("%+9.4d\n", i);
27  printf ("%.3ld\n", l);
28  printf ("%*d\n", i1, i);
28  printf ("%*d\n", i1, i);
29  printf ("%.*d\n", i2, i);
30  printf ("%*.*ld\n", i1, i2, l);
ms_c90-printf-1.c https://bitbucket.org/vaporoid/gcc.git | C | 184 lines
1/* Test for printf formats.  Formats using C90 features, including cases
2   where C90 specifies some aspect of the format to be ignored or where
21  /* Basic sanity checks for the different components of a format.  */
22  printf ("%d\n", i);
23  printf ("%+d\n", i);
23  printf ("%+d\n", i);
24  printf ("%3d\n", i);
25  printf ("%-3d\n", i);
25  printf ("%-3d\n", i);
26  printf ("%*d\n", i1, i);
27  printf ("%d %lu\n", i, ul);
28  /* Bogus use of width.  */
29  printf ("%5n\n", n); /* { dg-warning "width" "width with %n" } */
30  /* Valid and invalid %% constructions.  Some of the warning messages
33  */
34  printf ("%%");
35  printf ("%-%"); /* { dg-warning "format" "bogus %%" } */
c99-printf-1.c https://bitbucket.org/vaporoid/gcc.git | C | 197 lines
1/* Test for printf formats.  Formats using C99 features, including cases
2   where C99 specifies some aspect of the format to be ignored or where
23  /* Valid and invalid %h, %hh, %l, %ll, %j, %z, %t, %L constructions.  */
24  printf ("%hf", d); /* { dg-warning "length" "bad use of %h" } */
25  printf ("%hF", d); /* { dg-warning "length" "bad use of %h" } */
25  printf ("%hF", d); /* { dg-warning "length" "bad use of %h" } */
26  printf ("%he", d); /* { dg-warning "length" "bad use of %h" } */
27  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
27  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hg", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%ha", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%hA", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%hA", d); /* { dg-warning "length" "bad use of %h" } */
32  printf ("%hc", i); /* { dg-warning "length" "bad use of %h" } */
33  printf ("%hs", s); /* { dg-warning "length" "bad use of %h" } */
ms_c99-printf-1.c https://bitbucket.org/vaporoid/gcc.git | C | 109 lines
1/* Test for printf formats.  Formats using C99 features, including cases
2   where C99 specifies some aspect of the format to be ignored or where
24  /* Valid and invalid %h, %hh, %l, %j, %z, %t, %L constructions.  */
25  printf ("%hf", d); /* { dg-warning "length" "bad use of %h" } */
26  printf ("%hF", d); /* { dg-warning "unknown|format" "bad use of %hF" } */
26  printf ("%hF", d); /* { dg-warning "unknown|format" "bad use of %hF" } */
27  printf ("%he", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
28  printf ("%hE", d); /* { dg-warning "length" "bad use of %h" } */
29  printf ("%hg", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
30  printf ("%hG", d); /* { dg-warning "length" "bad use of %h" } */
31  printf ("%ha", d); /* { dg-warning "unknown|format" "bad use of %ha" } */
32  printf ("%hA", d); /* { dg-warning "unknown|format" "bad use of %hA" } */
32  printf ("%hA", d); /* { dg-warning "unknown|format" "bad use of %hA" } */
33  printf ("%hc", i);
34  printf ("%hs", (short *)s);
printf.c https://github.com/indeyets/smalltalk.git | C | 1,527 lines
132spec_entry *
133register_printf_function (unsigned spec, printf_function *fmt, printf_arginfo_function *arg)
134{
447int
448do_printfv (STREAM *stream, const char *format, union printf_arg const args[])
449{
1380/**
1381 * snv_snprintfv: printf.h
1382 * @buffer: a preallocated char* buffer.
1427/**
1428 * snv_asprintf: printf.h
1429 * @result: the address of a char * variable.
1460/**
1461 * snv_vasprintf: printf.h
1462 * @result: the address of a char * variable.
t-printf.c https://bitbucket.org/thelearninglabs/uclinux-distro-tll-public.git | C | 979 lines
136    {
137      printf ("wanted data doesn't match plain vsprintf\n");
138      printf ("  fmt      |%s|\n", fmt);
249	    {
250	      printf ("gmp_vsnprintf wrong result string\n");
251	    error:
275    {
276      printf ("gmp_vasprintf wrong\n");
277      printf ("  fmt      |%s|\n", fmt);
305    {
306      printf ("gmp_obstack_vprintf wrong\n");
307      printf ("  fmt      |%s|\n", fmt);
964  tests_start ();
965  check_vfprintf_fp = fopen (CHECK_VFPRINTF_FILENAME, "w+");
966  ASSERT_ALWAYS (check_vfprintf_fp != NULL);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21