@@ -461,14 +461,13 @@ bool IONAME(SetAdvance)(
461
461
462
462
bool IONAME (SetBlank)(Cookie cookie, const char *keyword, std::size_t length) {
463
463
IoStatementState &io{*cookie};
464
- ConnectionState &connection{io.GetConnectionState ()};
465
464
static const char *keywords[]{" NULL" , " ZERO" , nullptr };
466
465
switch (IdentifyValue (keyword, length, keywords)) {
467
466
case 0 :
468
- connection. modes .editingFlags &= ~blankZero;
467
+ io. mutableModes () .editingFlags &= ~blankZero;
469
468
return true ;
470
469
case 1 :
471
- connection. modes .editingFlags |= blankZero;
470
+ io. mutableModes () .editingFlags |= blankZero;
472
471
return true ;
473
472
default :
474
473
io.GetIoErrorHandler ().SignalError (IostatErrorInKeyword,
@@ -480,14 +479,13 @@ bool IONAME(SetBlank)(Cookie cookie, const char *keyword, std::size_t length) {
480
479
bool IONAME (SetDecimal)(
481
480
Cookie cookie, const char *keyword, std::size_t length) {
482
481
IoStatementState &io{*cookie};
483
- ConnectionState &connection{io.GetConnectionState ()};
484
482
static const char *keywords[]{" COMMA" , " POINT" , nullptr };
485
483
switch (IdentifyValue (keyword, length, keywords)) {
486
484
case 0 :
487
- connection. modes .editingFlags |= decimalComma;
485
+ io. mutableModes () .editingFlags |= decimalComma;
488
486
return true ;
489
487
case 1 :
490
- connection. modes .editingFlags &= ~decimalComma;
488
+ io. mutableModes () .editingFlags &= ~decimalComma;
491
489
return true ;
492
490
default :
493
491
io.GetIoErrorHandler ().SignalError (IostatErrorInKeyword,
@@ -498,17 +496,16 @@ bool IONAME(SetDecimal)(
498
496
499
497
bool IONAME (SetDelim)(Cookie cookie, const char *keyword, std::size_t length) {
500
498
IoStatementState &io{*cookie};
501
- ConnectionState &connection{io.GetConnectionState ()};
502
499
static const char *keywords[]{" APOSTROPHE" , " QUOTE" , " NONE" , nullptr };
503
500
switch (IdentifyValue (keyword, length, keywords)) {
504
501
case 0 :
505
- connection. modes .delim = ' \' ' ;
502
+ io. mutableModes () .delim = ' \' ' ;
506
503
return true ;
507
504
case 1 :
508
- connection. modes .delim = ' "' ;
505
+ io. mutableModes () .delim = ' "' ;
509
506
return true ;
510
507
case 2 :
511
- connection. modes .delim = ' \0 ' ;
508
+ io. mutableModes () .delim = ' \0 ' ;
512
509
return true ;
513
510
default :
514
511
io.GetIoErrorHandler ().SignalError (IostatErrorInKeyword,
@@ -519,8 +516,7 @@ bool IONAME(SetDelim)(Cookie cookie, const char *keyword, std::size_t length) {
519
516
520
517
bool IONAME (SetPad)(Cookie cookie, const char *keyword, std::size_t length) {
521
518
IoStatementState &io{*cookie};
522
- ConnectionState &connection{io.GetConnectionState ()};
523
- connection.modes .pad =
519
+ io.mutableModes ().pad =
524
520
YesOrNo (keyword, length, " PAD" , io.GetIoErrorHandler ());
525
521
return true ;
526
522
}
@@ -570,27 +566,26 @@ bool IONAME(SetRec)(Cookie cookie, std::int64_t rec) {
570
566
571
567
bool IONAME (SetRound)(Cookie cookie, const char *keyword, std::size_t length) {
572
568
IoStatementState &io{*cookie};
573
- ConnectionState &connection{io.GetConnectionState ()};
574
569
static const char *keywords[]{" UP" , " DOWN" , " ZERO" , " NEAREST" , " COMPATIBLE" ,
575
570
" PROCESSOR_DEFINED" , nullptr };
576
571
switch (IdentifyValue (keyword, length, keywords)) {
577
572
case 0 :
578
- connection. modes .round = decimal::RoundUp;
573
+ io. mutableModes () .round = decimal::RoundUp;
579
574
return true ;
580
575
case 1 :
581
- connection. modes .round = decimal::RoundDown;
576
+ io. mutableModes () .round = decimal::RoundDown;
582
577
return true ;
583
578
case 2 :
584
- connection. modes .round = decimal::RoundToZero;
579
+ io. mutableModes () .round = decimal::RoundToZero;
585
580
return true ;
586
581
case 3 :
587
- connection. modes .round = decimal::RoundNearest;
582
+ io. mutableModes () .round = decimal::RoundNearest;
588
583
return true ;
589
584
case 4 :
590
- connection. modes .round = decimal::RoundCompatible;
585
+ io. mutableModes () .round = decimal::RoundCompatible;
591
586
return true ;
592
587
case 5 :
593
- connection. modes .round = executionEnvironment.defaultOutputRoundingMode ;
588
+ io. mutableModes () .round = executionEnvironment.defaultOutputRoundingMode ;
594
589
return true ;
595
590
default :
596
591
io.GetIoErrorHandler ().SignalError (IostatErrorInKeyword,
@@ -601,16 +596,15 @@ bool IONAME(SetRound)(Cookie cookie, const char *keyword, std::size_t length) {
601
596
602
597
bool IONAME (SetSign)(Cookie cookie, const char *keyword, std::size_t length) {
603
598
IoStatementState &io{*cookie};
604
- ConnectionState &connection{io.GetConnectionState ()};
605
599
static const char *keywords[]{
606
600
" PLUS" , " SUPPRESS" , " PROCESSOR_DEFINED" , nullptr };
607
601
switch (IdentifyValue (keyword, length, keywords)) {
608
602
case 0 :
609
- connection. modes .editingFlags |= signPlus;
603
+ io. mutableModes () .editingFlags |= signPlus;
610
604
return true ;
611
605
case 1 :
612
606
case 2 : // processor default is SS
613
- connection. modes .editingFlags &= ~signPlus;
607
+ io. mutableModes () .editingFlags &= ~signPlus;
614
608
return true ;
615
609
default :
616
610
io.GetIoErrorHandler ().SignalError (IostatErrorInKeyword,
0 commit comments