@HenneNWH
ist es sinnvoll auf Fixed-width_integer_types (https://en.wikipedia.org/wiki/C_data_typ...eger_types) zu wechseln - für den Borland/Watcom bräuchte man dann eine types.h oder sowas weil diese noch keine oder nicht alle _t-Types anbieten
also
short -> int16_t
int -> int16_t
unsigned int -> uint16_t
unsigned short -> uint16_t
long -> int32_t
unsigned long -> uint32_t
oder weil z.B. char bei manchen DOS Kompilern unsigned(Watcom) ist oder manchmal signed(Borland) ist
...
oder eben die Bit8/16/32(u/s) Typen die du schon hast konsequent einsetzen
weil unter 32/64bit wäre der int-Typ ja plötzlich 32bit lang oder long ist auf einem 64bit Linux/MacOS 64bit lang
mit den _t typen könnte man das sauber prüfen mit static_asserts usw. und wäre 100% sicher auf allen Platformen
also auch Playstation, Nintendo Gameboy und PalmOS
könnte man mit search&replace oder script leichtens hin bekommen
ist es sinnvoll auf Fixed-width_integer_types (https://en.wikipedia.org/wiki/C_data_typ...eger_types) zu wechseln - für den Borland/Watcom bräuchte man dann eine types.h oder sowas weil diese noch keine oder nicht alle _t-Types anbieten
also
short -> int16_t
int -> int16_t
unsigned int -> uint16_t
unsigned short -> uint16_t
long -> int32_t
unsigned long -> uint32_t
oder weil z.B. char bei manchen DOS Kompilern unsigned(Watcom) ist oder manchmal signed(Borland) ist
...
oder eben die Bit8/16/32(u/s) Typen die du schon hast konsequent einsetzen
weil unter 32/64bit wäre der int-Typ ja plötzlich 32bit lang oder long ist auf einem 64bit Linux/MacOS 64bit lang
mit den _t typen könnte man das sauber prüfen mit static_asserts usw. und wäre 100% sicher auf allen Platformen
also auch Playstation, Nintendo Gameboy und PalmOS

könnte man mit search&replace oder script leichtens hin bekommen
Code:
| Plattform / Systemtyp | Datenmodell | short | int | long | Bemerkung |
| ------------------------------------------| ---------------------- | ----- | --- | ---- | ---------------------------------------------- |
| **MS-DOS (16-bit, z. B. Turbo/Borland C)**| **IP16** (inoffiziell) | 2 | 2 | 4 | 16-Bit-Segmentsystem, `int` = 16 Bit |
| **Windows 32-bit (Win32)** | **ILP32** | 2 | <4> | 4 | Klassisches 32-Bit-Modell |
| **Windows 64-bit (Win64)** | **LLP64** | 2 | 4 | 4 | `long` bleibt 32 Bit – nur Pointer sind 64 Bit |
| **Linux 32-bit (x86)** | **ILP32** | 2 | 4 | 4 | Wie Win32 |
| **Linux 64-bit (x86-64, ARM64)** | **LP64** | 2 | 4 |<8> | `long` wird 64 Bit |
| **macOS 64-bit (Intel/ARM)** | **LP64** | 2 | 4 |<8> | Gleich wie Linux-64-bit |

