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

Split the display code, fix #28 #23

Closed
wants to merge 4 commits into from

Conversation

illwieckz
Copy link
Contributor

The code is just unmaintainable, both standard, raw, xml and json display logic is in qstat.c which is wrong.

This PR split standard, raw, xml, and json display logic in dedicated c-files, create needed h-files for them, and create a h-file for templating display too to avoid redeclarations (the template code was just copy pasting some qstat.h lines, and qstat.h were copypasting some template definitions).

must be merged right after #13 and before #25 and others

@illwieckz illwieckz changed the title Split the display code. Split the display code Jul 6, 2015
@illwieckz illwieckz changed the title Split the display code Split the display code, fix #28 Jul 6, 2015
Steve Teuber and others added 4 commits April 13, 2016 18:19
- add json support to games added since Steve Teuber's patches
- use xform_names instead of name_xforms since Steven Hartland's refactoring
- use xform_printf() instead of fprintf() for json output
- remove commented out code
- use %s for a const switch seems a bit wasteful, fixing it
- do not use inline tests
- explicitely test pointers with NULL
- escape lone backslash character too
- RFC 4627 says: “JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.”
- iterator limit now match malloc in protocol listing
- use singl-hyphen -json-protocols and -json-version options
@stevenh
Copy link
Contributor

stevenh commented Nov 27, 2016

Not fully used, but the requirement to split out JSON was included in #53

@stevenh stevenh closed this Nov 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants