372{
373 {
374
375 {
376 fstream s(
"test_file.txt", ios_base::in | ios_base::out | ios_base::binary | ios_base::trunc );
378
381 }
382
383 char b1[] = {
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x' };
384 fstream s(
"test_file.txt", ios_base::in | ios_base::out | ios_base::binary );
386
387 int chars_read = (
int)
s.rdbuf()->sgetn(
b1,
sizeof(
b1) );
392
393 char b2[10] = {
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y' };
394
397 }
398
399 {
400
401 {
402 fstream s(
"test_file.txt", ios_base::in | ios_base::out | ios_base::trunc );
404
407 }
408
409 char b1[] = {
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x',
'x' };
410 fstream s(
"test_file.txt", ios_base::in | ios_base::out );
412
413 int chars_read = (
int)
s.rdbuf()->sgetn(
b1,
sizeof(
b1) );
416
418
423
424 char b2[10] = {
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y',
'y' };
425
428
429 pos =
s.rdbuf()->pubseekoff(0, ios_base::cur);
432 }
433
434#if !defined (STLPORT) || \
435 (!defined (_STLP_NO_WCHAR_T) && defined (_STLP_USE_EXCEPTIONS))
436 {
437
439 try
440 {
442 loc = tmp;
443 }
445 {
446
447 return;
448 }
449
450 {
451 wfstream s(
"test_file.txt", ios_base::in | ios_base::out | ios_base::trunc );
455
456 s <<
L"1234567890\n";
458 }
459
460 wchar_t b1[] = {
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x',
L'x' };
461 wfstream s(
"test_file.txt", ios_base::in | ios_base::out );
465
466 int chars_read = (
int)
s.rdbuf()->sgetn(
b1,
sizeof(
b1) /
sizeof(
wchar_t) );
469
471
474 off =
s.rdbuf()->pubseekoff(-off, ios_base::cur);
476 off =
s.rdbuf()->pubseekoff(0, ios_base::beg);
478
479 wchar_t b2[10] = {
L'y',
L'y',
L'y',
L'y',
L'y',
L'y',
L'y',
L'y',
L'y',
L'y' };
480
483
484 pos =
s.rdbuf()->pubseekoff(0, ios_base::cur);
486
487 }
488#endif
489}
_Traits::pos_type pos_type
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]