Mail Archives: djgpp/1994/06/05/03:24:21
There is an error in the docs of setmode() library function. The docs say that
it returns ZERO on success, while actually it returns the PREVIOUS MODE SETTING.
This is Borland problem, because their setmode() (which is eventually called by
GO32 on behalf of DJGPP program) works this way. It can be clearly seen e.g. by
stepping into Borland setmode() with Turbo Debugger. Borland C 3.1 docs were
corrected to specify the actual behavior. I would suggest to correct the docs
in DJGPP libcref.info file, too.
The above means that if you want to test for setmode()'s success, you should
write:
if (setmode (....) == -1)
error-action;
else
ok-action;
Eli Zaretskii
- Raw text -