Mail Archives: djgpp/2000/09/11/11:00:18.1
On Mon, 11 Sep 2000 07:57:17 GMT, AndrewJ
<luminous-is AT REMOVE DOT home DOT com> wrote:
>On Mon, 11 Sep 2000 05:53:30 GMT, "JS" <jmszczap82 AT adelphia DOT net> wrote:
>
>>Secondly, when setting up a program, is it ever necessary to check the
>>allegro_init, install_timer, and install_keyboard functions to see if they
>>initialised properly?
>
>You should check the return values of all functions (within reason), regardless
>of whether they are libc functions or external library functions.
allegro_init() will exit() to the caller if it can't initialize the
system. install_timer() and install_keyboard() are also guaranteed
to work on all DOS, POSIX, and Win32 platforms (which is what Allegro
runs under).
But set_gfx_mode() and the load_*() are a different matter entirely
(the VESA driver may not be available, the user may not be running
with enough permissions *cough*NT*cough*, 404, etc). Anything that
says in the docs that it _can_ fail should be checked.
--
MS (n) 1. A debilitating and surprisingly widespread affliction
that renders the sufferer barely able to perform the simplest
task. 2. A disease, multiple sclerosis (see).
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -