Category Archives: C

From the Annals of Preprocessor Hackery

Over the last few days I’ve been slowly attacking the source code for 386MAX, trying to build the entire product. One of the many problems I ran into turned out to be quite interesting. There are several (16-bit) Windows components … Continue reading

Posted in 386MAX, C, Development, Microsoft | 25 Comments

Pointedly Confusing

While working on an unrelated problem, I stumbled across very surprising (to me) behavior of a C compiler. My code was the equivalent of the following: #include <stdio.h>int arr[42];int main( void ) { printf( “%u\n”, sizeof( &arr ) ); return( … Continue reading

Posted in C, Microsoft | 9 Comments

MS C 4.0 Documentation Added

Another library expansion. This time it’s Microsoft C 4.0 documentation (1986)—because it’s not available online, is not easy to find offline, and because Jeff asked for it. MS C 4.0 was an early Microsoft compiler, implementing first glimpses of the not-yet finalized … Continue reading

Posted in C, Documentation, DOS, Microsoft | 7 Comments

UINT32_C Macro Considered Harmful

The C99 family of INTN_C and UINTN_C macros fills a real gap in the language, but it also lays extremely nasty traps for the unwary. The evolution of how the macros are defined in the C99 language standard shows that … Continue reading

Posted in C, Development | 2 Comments