Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new string readers and writers for reader/memreader/writer/mwriter #400

Open
katajakasa opened this issue Oct 18, 2021 · 0 comments

Comments

@katajakasa
Copy link
Member

katajakasa commented Oct 18, 2021

Since libshadowdive is now part of openomf, we could start using the string wrapper in libsd operations too. To begin with, we should add these functions to the reader/memreader/writer/memwriter to make operating on strings easier.

To writer/memwriter:

  • Add function to write an omf2097 null padded string type from str object
  • Add function to write an omf2097 not-padded string type from str object

To reader/memreader:

  • Add function to read an omf2097 null padded string type to str object
  • Add function to read an omf2097 not-padded string type to str object

This thing should really have unit-tests also. Perhaps create a static test file that contains data known good (check with hex editor) and then test reader against that. Then write a second file with writer, and test that produced file matches the existing test file bit-for-bit.

There is some ready made code here: https://github.com/omf2097/openomf/pull/364/files -- it is not tested though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants