Skip to content

Conversation

@chipbarnaby
Copy link
Contributor

@chipbarnaby chipbarnaby commented Sep 29, 2023

Description

Various changes to generalize code to build OK in both 32 and 64 bit.

  • Changed many LI (and ULI) to INT (UINT). INT is always 32 bit. LI is 32 or 64. For general working integers, 32 is sufficient. Some changed to size_t as appropriate (size_t is 32 or 64 bits). Some internal (non-cnrecs.def) code changed to built-in type int. File offsets changed to built-in type long to match library IO function arg types.
  • Eliminated many INT etc. casts in printf-ish args. SIs are now implicitly promoted to 32 bits, cast is unnecessary.
  • Changed some char * to const char *. More needed.
  • Eliminated comments on some #includes that attempted to document why the include was needed. These comments are a maintenance hassle and thus generally unreliable. For example,
      #include "cnglob.h"  // LI
  • Generalized expression code to be (more) aware of INTs. Added TYINT re internal data type tracking.
  • Generalized cvpak.cpp conversion code re data type changes. Reworked limit checking code.
  • Eliminated some C-style top-of-function declarations w/o initialization in favor of declaration-with-initialization within appropriate scope.
  • Changed some integer types (e.g. SI) to bool in boolean contexts. Need to more fully support bool.
  • Clarified use of "long" in comments -- stated actual bit size or built-in type as appropriate.
  • Temporary regression testing framework for 64-bit build

@chipbarnaby chipbarnaby marked this pull request as draft September 29, 2023 14:46
@nealkruis nealkruis marked this pull request as ready for review September 29, 2023 21:51
@nealkruis nealkruis merged commit d3a747f into main Oct 3, 2023
@nealkruis nealkruis deleted the 64-bit-debug branch October 3, 2023 18:04
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.

3 participants