2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-01-19 04:22:12 +00:00

4 Commits

Author SHA1 Message Date
Alexander Grund
a0327e0b74 Update license headers
Use the more concise format omitting the reference to the license file
and refer to the URL only.
2022-07-13 12:35:54 +02:00
Alexander Grund
4ac0ca57b1 Refactor iostream and test
- Init cin/cout/clog as early as possible using compiler specific attributes
- Set unitbuf for cerr as required by standard
- Move the streambuf out into own header and make the read/write function (to console) mockable
- Split test into small, named functions
2021-04-23 15:03:38 +02:00
Alexander Grund
87e3f5d85f Fix fseek and ftell on MinGW
Use fseeko and ftello on MinGW as fseeki64/ftelli64 behaves wrongly
The following code returns 4 after the first fgetc instead of 1 and the seek sets the file pointer at actual position 4 instead of not touching it so the following fgetc skips characters

        FILE* f = std::fopen(filename, "r");
        std::cout << "PosBeforeSeek " << _ftelli64(f) << "\n";
        std::cout << "Seek" << _fseeki64(f, 0, SEEK_CUR) << "\n";
        std::cout << "PosAfterSeek " << _ftelli64(f) << "\n";
        std::cout << "'" << char(std::fgetc(f)) << "'\n";
        std::cout << "PosAfterFGetC " << _ftelli64(f) << "\n";
        std::cout << "PosBeforeSeek " << _ftelli64(f) << "\n";
        std::cout << "Seek" << _fseeki64(f, 0, SEEK_CUR) << "\n";
        std::cout << "PosAfterSeek " << _ftelli64(f) << "\n";
        std::cout << "'" << char(std::fgetc(f)) << "'\n";
        std::cout << "PosAfterFGetC " << _ftelli64(f) << "\n";
        std::fclose(f);
2021-03-21 14:34:55 +01:00
Alexander Grund
ebefd3729e Move configure check files into config folder 2020-09-24 16:05:41 +02:00