Lines Matching refs:shared
44 struct shared struct
87 } *shared; argument
102 TEST_VERIFY (fp == shared->fp); in method_finish()
103 ++shared->calls; in method_finish()
104 ++shared->calls_finish; in method_finish()
111 TEST_VERIFY (fp == shared->fp); in method_overflow()
112 ++shared->calls; in method_overflow()
113 ++shared->calls_overflow; in method_overflow()
114 shared->value = ch; in method_overflow()
115 return shared->return_value; in method_overflow()
122 TEST_VERIFY (fp == shared->fp); in method_underflow()
123 ++shared->calls; in method_underflow()
124 ++shared->calls_underflow; in method_underflow()
125 return shared->return_value; in method_underflow()
132 TEST_VERIFY (fp == shared->fp); in method_uflow()
133 ++shared->calls; in method_uflow()
134 ++shared->calls_uflow; in method_uflow()
135 return shared->return_value; in method_uflow()
142 TEST_VERIFY (fp == shared->fp); in method_pbackfail()
143 ++shared->calls; in method_pbackfail()
144 ++shared->calls_pbackfail; in method_pbackfail()
145 shared->value = ch; in method_pbackfail()
146 return shared->return_value; in method_pbackfail()
153 TEST_VERIFY (fp == shared->fp); in method_xsputn()
154 ++shared->calls; in method_xsputn()
155 ++shared->calls_xsputn; in method_xsputn()
158 if (n > sizeof (shared->buffer)) in method_xsputn()
159 to_copy = sizeof (shared->buffer); in method_xsputn()
160 memcpy (shared->buffer, data, to_copy); in method_xsputn()
161 shared->buffer_length = to_copy; in method_xsputn()
169 TEST_VERIFY (fp == shared->fp); in method_xsgetn()
170 ++shared->calls; in method_xsgetn()
171 ++shared->calls_xsgetn; in method_xsgetn()
179 TEST_VERIFY (fp == shared->fp); in method_seekoff()
180 ++shared->calls; in method_seekoff()
181 ++shared->calls_seekoff; in method_seekoff()
182 return shared->return_value; in method_seekoff()
189 TEST_VERIFY (fp == shared->fp); in method_seekpos()
190 ++shared->calls; in method_seekpos()
191 ++shared->calls_seekpos; in method_seekpos()
192 return shared->return_value; in method_seekpos()
199 TEST_VERIFY (fp == shared->fp); in method_setbuf()
200 ++shared->calls; in method_setbuf()
201 ++shared->calls_setbuf; in method_setbuf()
209 TEST_VERIFY (fp == shared->fp); in method_sync()
210 ++shared->calls; in method_sync()
211 ++shared->calls_sync; in method_sync()
212 return shared->return_value; in method_sync()
219 TEST_VERIFY (fp == shared->fp); in method_doallocate()
220 ++shared->calls; in method_doallocate()
221 ++shared->calls_doallocate; in method_doallocate()
222 return shared->return_value; in method_doallocate()
229 TEST_VERIFY (fp == shared->fp); in method_read()
230 ++shared->calls; in method_read()
231 ++shared->calls_read; in method_read()
232 return shared->return_value; in method_read()
239 TEST_VERIFY (fp == shared->fp); in method_write()
240 ++shared->calls; in method_write()
241 ++shared->calls_write; in method_write()
242 return shared->return_value; in method_write()
249 TEST_VERIFY (fp == shared->fp); in method_seek()
250 ++shared->calls; in method_seek()
251 ++shared->calls_seek; in method_seek()
252 return shared->return_value; in method_seek()
259 TEST_VERIFY (fp == shared->fp); in method_close()
260 ++shared->calls; in method_close()
261 ++shared->calls_close; in method_close()
262 return shared->return_value; in method_close()
269 TEST_VERIFY (fp == shared->fp); in method_stat()
270 ++shared->calls; in method_stat()
271 ++shared->calls_stat; in method_stat()
272 return shared->return_value; in method_stat()
279 TEST_VERIFY (fp == shared->fp); in method_showmanyc()
280 ++shared->calls; in method_showmanyc()
281 ++shared->calls_showmanyc; in method_showmanyc()
282 return shared->return_value; in method_showmanyc()
289 TEST_VERIFY (fp == shared->fp); in method_imbue()
290 ++shared->calls; in method_imbue()
291 ++shared->calls_imbue; in method_imbue()
355 fprintf_ptr (shared->fp, " "); in without_compatibility_fprintf()
363 fputc (' ', shared->fp); in without_compatibility_fputc()
371 fgetc (shared->fp); in without_compatibility_fgetc()
379 fflush (shared->fp); in without_compatibility_fflush()
387 shared->fp = &file.f; in check_for_termination()
388 shared->return_value = -1; in check_for_termination()
389 shared->calls = 0; in check_for_termination()
398 TEST_COMPARE (shared->calls, 0); in check_for_termination()
412 TEST_COMPARE (fprintf_ptr (shared->fp, "A%sCD", "B"), 4); in with_compatibility_fprintf()
413 TEST_COMPARE (shared->calls, 3); in with_compatibility_fprintf()
414 TEST_COMPARE (shared->calls_xsputn, 3); in with_compatibility_fprintf()
415 TEST_COMPARE_BLOB (shared->buffer, shared->buffer_length, in with_compatibility_fprintf()
422 shared->return_value = '@'; in with_compatibility_fputc()
423 TEST_COMPARE (fputc ('@', shared->fp), '@'); in with_compatibility_fputc()
424 TEST_COMPARE (shared->calls, 1); in with_compatibility_fputc()
425 TEST_COMPARE (shared->calls_overflow, 1); in with_compatibility_fputc()
426 TEST_COMPARE (shared->value, '@'); in with_compatibility_fputc()
432 shared->return_value = 'X'; in with_compatibility_fgetc()
433 TEST_COMPARE (fgetc (shared->fp), 'X'); in with_compatibility_fgetc()
434 TEST_COMPARE (shared->calls, 1); in with_compatibility_fgetc()
435 TEST_COMPARE (shared->calls_uflow, 1); in with_compatibility_fgetc()
441 TEST_COMPARE (fflush (shared->fp), 0); in with_compatibility_fflush()
442 TEST_COMPARE (shared->calls, 1); in with_compatibility_fflush()
443 TEST_COMPARE (shared->calls_sync, 1); in with_compatibility_fflush()
452 *shared = (struct shared) in check_call()
459 shared->fp = &file.f; in check_call()
460 if (shared->initially_disabled) in check_call()
461 _IO_init (shared->fp, file.f._flags); in check_call()
477 shared = support_shared_allocate (sizeof (*shared)); in run_tests()
478 shared->initially_disabled = initially_disabled; in run_tests()
493 support_shared_free (shared); in run_tests()
494 shared = NULL; in run_tests()