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

Refactor user config code #63

Merged
merged 51 commits into from
Aug 9, 2021
Merged

Refactor user config code #63

merged 51 commits into from
Aug 9, 2021

Conversation

IAmTrial
Copy link
Collaborator

@IAmTrial IAmTrial commented Aug 8, 2021

These changes rewrite the user config code to be C89 and VC6 compatible. The JSON parser is replaced with frozen, and the INI user config parser is added.

This is a requirement of #50.

IAmTrial added 30 commits August 1, 2021 00:26
Out of the existing parsers, this particular C89 parser is explicitly
compatible with VC6 and uses a syntax that is convenient to manage.
This config type will be used for accessing and setting config values.
In the D2HD releases, INI config was the format for configs before the
change to JSON. Due to being bundled with Windows, it can be used as in
case the user prefers it.
Replacement is to use the standard writer with the default config passed
in.
Adding extra quotes causes the parser to interpret quoted strings
incorrectly.
frozen does not appear to be capable of handling whitespace in JSON
keys. cJSON might be reconsidered and this commit may be reverted.
When Cel File config is added, it will use a different suffix.
@IAmTrial IAmTrial added the enhancement New feature or request label Aug 8, 2021
@IAmTrial IAmTrial added this to the Release 3.0.3.0 milestone Aug 8, 2021
@IAmTrial IAmTrial self-assigned this Aug 8, 2021
@IAmTrial IAmTrial merged commit e8cff91 into develop Aug 9, 2021
@IAmTrial IAmTrial deleted the refactor/config branch August 9, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant