Skip to content

Conversation

GravisZro
Copy link

This PR combine the other 6 PRs.

  • Modernize: build system

    • add a .gitignore for build system related files
    • remove ancient makefile (resolves issue compilation issue compilation issue #6)
  • Modernize: types and declarations (Use "modern" (as of 1999) standards)

    • void instead of VOID (type standardization)
    • intptr_t instead of INT_PTR (type standardization)
    • Remove small C declarations (function declaration standardization)
      Note: support for small C compilers was already broken, so nothing is lost by removing the declarations
  • Modernize: printf statements

    • Update printf statements for printing pointers.
      • Replace x%xl with %p
      • Remove pointer casts to (unsigned long)
    • Update string literals
      • Use string literal concatenation to make a series of printf statements into just one
      • Use raw string literal for long multiline string
  • Modernize: use nullptr

    • Replace all instances of NULL with nullptr
    • Remove type casting of the null value.
  • Modernize: replace macros with inline functions

    • Make sure all macros pass in all variables used (a mesh* type varaible (aka m) needs to be passed in for several)
    • Rewrite macros as always inlined functions to ensure type correctness
  • Modernize: showme

    • Move to cpp file
    • Replace small C function declarations standard declarations
    • Make showme buildable (for systems with X11)
    • Use raw string literals for usage string literals
    • Fix errors/warnings about string literals
    • Fix a minor bug

GravisZro added 10 commits June 29, 2025 17:55
Actually use 'void' instead of "VOID"
Remove small C declarations
Note: support for these compilers was already broken, so nothing is lost
Replace INT_PTR with the intptr_t which is a standard type.
* Resolve warning about string literals being used as non-const variables
* Fix bug (testing `loaded[PART]` instead of `loaded[current_inc][PART]`)
Update printf statements for printing pointers.
* Replace `x%xl` with `%p`
* Remove pointer casts to `(unsigned long)`
* Many lines in a row print a single concatonated string, remove extra printf calls
* A large section just prints out a bunch of pre formatted text using a
  LOT of lines of printf which have been replaced with a raw string literal.
* add a .gitignore for build system related files
* remove ancient makefile (resolves issue #6)
Prepare macros to be converted into functions by including all the required
parameters for when converted.
Macros lose type information. Replace macros with inline functions.
Replace all instance of NULL with nullptr and remove all nullptr casting.
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.

1 participant