Skip to content

Conversation

@beutlich
Copy link
Member

@beutlich beutlich commented Nov 17, 2020

This PR superseds #3631 and fixes reading of text files with EOL=LF on Windows. It also adds unit tests for these functions.

I decided to duplicate the code of function readLine (from ModelicaIO) since we have no concept how to deal with utility functions that are shared between different C libraries. (I also did so once in the past by duplicating function transpose between ModelicaIO and ModelicaStandardTables C libraries.)

@beutlich beutlich added bug Critical/severe issue L: C-Sources Issue addresses Modelica/Resources/C-Sources labels Nov 17, 2020
@beutlich beutlich added this to the MSL4.1.0 milestone Nov 17, 2020
@beutlich beutlich self-assigned this Nov 17, 2020
@beutlich beutlich force-pushed the fix-eol-read branch 3 times, most recently from e8a412e to 6b26876 Compare November 17, 2020 21:55
Copy link
Member

@sjoelund sjoelund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a Windows machine to test this on and as far as I can see, the mingw test only compiles the code and does not run tests. Perhaps we should run this through wine or something in the future.

@beutlich
Copy link
Member Author

I tested and debugged locally on my Win machine. I hope that @HansOlsson can also test on Win.

@beutlich beutlich requested review from HansOlsson and removed request for HansOlsson November 28, 2020 16:36
Copy link
Contributor

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to build on Windows, and the test-case triggering the original issue worked;
so it looks good.

@beutlich beutlich merged commit 678b8b6 into modelica:master Dec 13, 2020
@beutlich beutlich deleted the fix-eol-read branch December 13, 2020 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Critical/severe issue L: C-Sources Issue addresses Modelica/Resources/C-Sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants