/ ReadColumn: what this routine does is to access the key buffer set */ from the corresponding section, extract from it the key value */ corresponding to this column name and convert it to buffer type. */ /
| 450 | /* corresponding to this column name and convert it to buffer type. */ |
| 451 | /***********************************************************************/ |
| 452 | void INICOL::ReadColumn(PGLOBAL) |
| 453 | { |
| 454 | PTDBINI tdbp = (PTDBINI)To_Tdb; |
| 455 | |
| 456 | if (trace(2)) |
| 457 | htrc("INI ReadColumn: col %s R%d flag=%d\n", |
| 458 | Name, tdbp->GetTdb_No(), Flag); |
| 459 | |
| 460 | /*********************************************************************/ |
| 461 | /* Get the key value from the INI file. */ |
| 462 | /*********************************************************************/ |
| 463 | switch (Flag) { |
| 464 | case 1: |
| 465 | strncpy(Valbuf, tdbp->Section, Long); // Section name |
| 466 | Valbuf[Long] = '\0'; |
| 467 | break; |
| 468 | default: |
| 469 | GetPrivateProfileString(tdbp->Section, Name, "\b", |
| 470 | Valbuf, Long + 1, tdbp->Ifile); |
| 471 | break; |
| 472 | } // endswitch Flag |
| 473 | |
| 474 | // Missing keys are interpreted as null values |
| 475 | if (!strcmp(Valbuf, "\b")) { |
| 476 | if (Nullable) |
| 477 | Value->SetNull(true); |
| 478 | |
| 479 | Value->Reset(); // Null value |
| 480 | } else |
| 481 | Value->SetValue_psz(Valbuf); |
| 482 | |
| 483 | } // end of ReadColumn |
| 484 | |
| 485 | /***********************************************************************/ |
| 486 | /* WriteColumn: what this routine does is to access the last line */ |
nothing calls this directly
no test coverage detected