On Tuesday, September 22, 2020 at 1:09:35 AM UTC+10, Paul S Person wrote:
> >wcl and wcl386 should either be C90-compliant
> >already, or able to be made so, as all they do is
> >read in a bunch of text files and output a binary file.
> Actually, standard compliance has more to do with recognizing keywords
> and other items than with the mechanics of reading and writing files.
My concern is whether wcl(386) call non-C90 functions.
PD-Windows doesn't provide much more than just the
C90 functions.
When I do this command:
C:\WATCOM\binnt>objdump -p wcl386.exe | grep -v reloc
I get a whole stack of non-C90 functions like:
e386 20 GetConsoleMode
e398 21 GetCurrentDirectoryA
e3b0 22 GetCurrentThreadId
none of which exist in PD-Windows:
C:\devel\pdos\src>grep Get windows.h
HANDLE WINAPI GetStdHandle(DWORD nStdHandle);
#define GetFileAttributes GetFileAttributesA
DWORD WINAPI GetFileAttributesA(
#define GetCommandLine GetCommandLineA
LPTSTR WINAPI GetCommandLineA(void);
LPTCH WINAPI GetEnvironmentStrings(void);
BOOL WINAPI GetExitCodeProcess(HANDLE hProcess, LPDWORD lpExitCode);
DWORD WINAPI GetLastError(void);
void WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
BOOL WINAPI GetConsoleScreenBufferInfo(
So how much effort would be required to restrict
wcl(386) to only use C90 functions? It should be
possible to read in text files and output a binary
file (which is all that wcl does) using purely C90
functions.
Thanks. Paul.