It looks like most of the remaining work for that is filling in dozens of OS/2 APIs that EMX uses at startup just so we can get to our single printf() call. :)
19 lines
396 B
C
19 lines
396 B
C
#include "native.h"
|
|
|
|
NATIVE_MODULE(msg);
|
|
|
|
static uint32 DosPutMessage(uint32 handle, uint32 msglen, const char *msg)
|
|
{
|
|
// !!! FIXME: this isn't right, but good enough for now.
|
|
fwrite(msg, msglen, 1, stdout);
|
|
fflush(stdout);
|
|
return 0;
|
|
} // DosPutMessage
|
|
|
|
NATIVE_REPLACEMENT_TABLE("msg")
|
|
NATIVE_REPLACEMENT(DosPutMessage, 5)
|
|
END_NATIVE_REPLACEMENT_TABLE()
|
|
|
|
// end of msg.c ...
|
|
|