From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Some minor questions... Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 29 X-Trace: /KDWjZrcPnwXqzcdaLj/QC2N0KC18Sp1TVybblEBo44XBcTHNe0MyuxWVnLOr1FATRYENpahH1rJ!3CACo/W0F1z4pO4XYr1ZeMqT8BGTUF9lw8nMkv/iHUxMg0yuX3pEjdksT/NDcyrtC+5z7D/oQ5uU!dletIhI= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Mon, 11 Sep 2000 14:48:06 GMT Distribution: world Date: Mon, 11 Sep 2000 14:48:07 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mon, 11 Sep 2000 07:57:17 GMT, AndrewJ wrote: >On Mon, 11 Sep 2000 05:53:30 GMT, "JS" 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/