Home
last modified time | relevance | path

Searched refs:fp (Results 1 – 25 of 39) sorted by relevance

12

/stdio-common/
A Dtst-ungetc.c20 FILE *fp = NULL; in main() local
33 assert (fp != NULL) in main()
34 fputs ("bla", fp); in main()
35 fclose (fp); in main()
36 fp = NULL; in main()
39 assert (fp != NULL); in main()
52 fclose (fp); in main()
53 fp = NULL; in main()
56 assert (fp != NULL); in main()
65 if (fp != NULL) in main()
[all …]
A Dtst-unlockedio.c36 FILE *fp, *f; in do_test() local
43 flockfile (fp); in do_test()
45 f = fp; in do_test()
58 || f != fp in do_test()
83 f = fp; in do_test()
99 rewind (fp); in do_test()
101 f = fp; in do_test()
111 || f != fp in do_test()
137 f = fp; in do_test()
141 || f != fp) in do_test()
[all …]
A Dtst-fmemopen2.c36 if (fp == NULL) in do_test_with_buffer()
45 fputs (str, fp); in do_test_with_buffer()
56 rewind (fp); in do_test_with_buffer()
78 rewind (fp); in do_test_with_buffer()
90 fclose (fp); in do_test_with_buffer()
143 rewind (fp); in do_test_without_buffer()
155 fclose (fp); in do_test_without_buffer()
165 FILE *fp; in do_test_length_zero() local
191 fclose (fp); in do_test_length_zero()
222 fclose (fp); in do_test_length_zero()
[all …]
A Dtst-fmemopen3.c47 fflush (fp); in do_test_write_append()
51 fclose (fp); in do_test_write_append()
74 fflush (fp); in do_test_write_append_without_null()
79 fclose (fp); in do_test_write_append_without_null()
114 fclose (fp); in do_test_read_append()
124 fclose (fp); in do_test_read_append()
127 fclose (fp); in do_test_read_append()
139 fclose (fp); in do_test_read_append()
171 fclose (fp); in do_test_read_seek_neg()
272 fflush (fp); in do_test_write_append_2()
[all …]
A Dfxprintf.c29 if (_IO_fwide (fp, 0) <= 0) in locked_vfxprintf()
68 if (fp == NULL) in __vfxprintf()
69 fp = stderr; in __vfxprintf()
70 _IO_flockfile (fp); in __vfxprintf()
72 _IO_funlockfile (fp); in __vfxprintf()
89 if (fp == NULL) in __fxprintf_nocancel()
90 fp = stderr; in __fxprintf_nocancel()
94 _IO_flockfile (fp); in __fxprintf_nocancel()
95 int save_flags2 = fp->_flags2; in __fxprintf_nocancel()
100 fp->_flags2 = save_flags2; in __fxprintf_nocancel()
[all …]
A Dtst-rndseek.c36 ch1 = fgetc_unlocked (fp); in fp_test()
46 ch1 = fgetc (fp); in fp_test()
58 fclose (fp); in fp_test()
68 FILE *fp; in do_test() local
98 if (fp == NULL) in do_test()
104 rewind (fp); in do_test()
107 int ch0 = fgetc (fp); in do_test()
126 fp = fopen (fname, "r"); in do_test()
129 fp = fopen64 (fname, "r"); in do_test()
133 fp = fdopen (fd, "rw"); in do_test()
[all …]
A Dtest-fseek.c25 FILE *fp; in do_test() local
29 fp = fopen (TESTFILE, "w"); in do_test()
30 if (fp == NULL) in do_test()
37 putc (i, fp); in do_test()
38 if (freopen (TESTFILE, "r", fp) != fp) in do_test()
47 fseek (fp, (long) -i, SEEK_END); in do_test()
48 if ((j = getc (fp)) != 256 - i) in do_test()
53 if (fseek (fp, (long) i, SEEK_SET)) in do_test()
58 if ((j = getc (fp)) != i) in do_test()
63 if (fseek (fp, (long) i, SEEK_SET)) in do_test()
[all …]
A Dtst-fseek.c35 FILE *fp; in do_test() local
57 if (fp == NULL) in do_test()
85 else if (feof (fp)) in do_test()
303 if (fputc ('1', fp) == EOF || fputc ('2', fp) == EOF) in do_test()
412 fclose (fp); in do_test()
415 if (fp == NULL) in do_test()
438 if (fp != NULL) in do_test()
439 fclose (fp); in do_test()
442 if (fp == NULL) in do_test()
470 if (fp != NULL) in do_test()
[all …]
A Dtst-fmemopen.c48 FILE *fp; in do_test() local
59 fclose (fp); in do_test()
63 rewind (fp); in do_test()
73 fclose (fp); in do_test()
79 if (ferror (fp)) in do_test()
82 fclose (fp); in do_test()
85 if (feof (fp)) in do_test()
93 fclose (fp); in do_test()
130 fclose (fp); in do_test()
144 if (feof (fp)) in do_test()
[all …]
A Dtst-fdopen.c23 FILE *fp = NULL; in main() local
34 fp = fopen (name, "w"); in main()
35 assert (fp != NULL) in main()
37 fclose (fp); in main()
38 fp = NULL; in main()
46 fp = fdopen (fd, "r"); in main()
47 assert (fp != NULL); in main()
48 assert (getc (fp) == 'r'); in main()
49 assert (getc (fp) == ' '); in main()
52 if (fp != NULL) in main()
[all …]
A Dtst-vfprintf-width-prec-alloc.c32 FILE *fp = fopen ("/dev/null", "w"); in do_test() local
33 TEST_VERIFY_EXIT (fp != NULL); in do_test()
34 TEST_COMPARE (fprintf (fp, "%1000000000d", 1), 1000000000); in do_test()
35 TEST_COMPARE (fprintf (fp, "%.1000000000s", test_string), 4); in do_test()
36 TEST_COMPARE (fprintf (fp, "%1000000000d %1000000000d", 1, 2), 2000000001); in do_test()
37 TEST_COMPARE (fprintf (fp, "%2$.*1$s", 0x7fffffff, test_string), 4); in do_test()
A Dtst-printf-fp-free.c28 FILE *fp = fopen ("/dev/full", "w"); in do_test() local
29 TEST_VERIFY_EXIT (fp != NULL); in do_test()
31 TEST_VERIFY_EXIT (setvbuf (fp, buf, _IOFBF, sizeof buf) == 0); in do_test()
32 TEST_COMPARE (fprintf (fp, "%-1000000.65536f", 1.0), -1); in do_test()
33 fclose (fp); in do_test()
A Dtest-vfprintf.c59 FILE *fp; in do_test() local
83 fp = fdopen (fd2, "a"); in do_test()
84 if (fp == NULL) in do_test()
91 fprintf (fp, "%s", large); in do_test()
92 fprintf (fp, "%.*s", 30000, large); in do_test()
99 fprintf (fp, large); in do_test()
101 fprintf (fp, "%-1.300000000s", "hello"); in do_test()
103 if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0) in do_test()
A Dperror.c26 perror_internal (FILE *fp, const char *s, int errnum) in perror_internal() argument
39 (void) __fxprintf (fp, "%s%s%s\n", s, colon, errstring); in perror_internal()
50 FILE *fp; in perror() local
61 || (fp = fdopen (fd, "w+")) == NULL) in perror()
74 perror_internal (fp, s, errnum); in perror()
76 if (_IO_ferror_unlocked (fp)) in perror()
80 fclose (fp); in perror()
A Dtst-printf-fp-leak.c27 FILE *fp = fopen ("/dev/full", "w"); in do_test() local
28 TEST_VERIFY_EXIT (fp != NULL); in do_test()
29 TEST_COMPARE (fprintf (fp, "%.65536f", 1.0), -1); in do_test()
30 fclose (fp); in do_test()
A Dtst-put-error.c34 FILE *fp = fdopen (fd, "w"); in do_test() local
35 if (fp == NULL) in do_test()
45 setlinebuf (fp); in do_test()
49 int n = fprintf (fp, "hello world\n"); in do_test()
54 n = fprintf (fp, "hello world\n"); in do_test()
60 n = fprintf (fp, "%100s\n", "foo"); in do_test()
A Dscanf4.c11 FILE *fp = fopen ("/dev/null", "r"); in main() local
14 res = fscanf(fp, "%n", &val); in main()
23 res = fscanf(fp, ""); in main()
31 res = fscanf(fp, "BLURB"); in main()
36 fclose (fp); in main()
A Dpsiginfo.c65 if (fp == NULL) in psiginfo()
79 fprintf (fp, "%s: ", s); in psiginfo()
95 fprintf (fp, "SIGRTMIN ("); in psiginfo()
102 fprintf (fp, "SIGRTMAX ("); in psiginfo()
109 fprintf (fp, "%s (", _(desc)); in psiginfo()
181 fprintf (fp, "%s ", _(str)); in psiginfo()
183 fprintf (fp, "%d ", pinfo->si_code); in psiginfo()
187 fprintf (fp, "[%p])\n", pinfo->si_addr); in psiginfo()
189 fprintf (fp, "%ld %d %ld)\n", in psiginfo()
195 fprintf (fp, "%ld %ld)\n", in psiginfo()
[all …]
A Dbug7.c12 FILE *fp; in main() local
23 fp = fopen (filename, "w+"); in main()
24 fprintf (fp, "Hello world!\n"); in main()
25 fflush (fp); in main()
26 fseek (fp, 5L, SEEK_SET); in main()
27 if (fseek (fp, -1L, SEEK_CUR) < 0) in main()
32 fclose (fp); in main()
A Dbug22.c27 FILE *fp = fopen ("/dev/null", "w"); in do_test() local
28 if (fp == NULL) in do_test()
40 ret = fprintf (fp, "%" SN "d", 1); in do_test()
52 ret = fprintf (fp, "%." SN "d", 1); in do_test()
58 ret = fprintf (fp, "%." SN3 "d", 1); in do_test()
69 ret = fprintf (fp, "%" SN2 "d%" SN2 "d", 1, 1); in do_test()
A Dbug19.c16 FILE *fp = tmpfile (); in do_test() local
17 if (fp == NULL) in do_test()
23 FPUTS (L("7-11"), fp); in do_test()
24 rewind (fp); in do_test()
34 FSCANF (fp, L(" %i - %i %n"), &i, &j, &n); in do_test()
A Dbug24.c7 FILE *fp = fopen ("/foobar_does_no_exit", "re"); in do_test() local
8 if (fp != NULL) in do_test()
11 fclose (fp); in do_test()
A Dscanf15.c78 FILE *fp = fdopen (fd, "w+"); in main() local
79 if (fp == NULL) in main()
83 if (fputs (" 1.25s x", fp) == EOF) in main()
85 if (fseek (fp, 0, SEEK_SET) != 0) in main()
87 if (fscanf (fp, "%as%2c", &f, c) != 2) in main()
102 fclose (fp); in main()
A Dtst-fgets.c8 FILE *fp = fmemopen ((char *) "hello", 5, "r"); in do_test() local
10 char *bp = fgets (buf, sizeof (buf), fp); in do_test()
13 bp = fgets_unlocked (buf, sizeof (buf), fp); in do_test()
A Dtemptest.c10 FILE *fp; in main() local
20 fp = fopen (files[i], "w"); in main()
21 fclose (fp); in main()

Completed in 19 milliseconds

12