From: cuz Date: Sun, 20 Nov 2005 13:31:42 +0000 (+0000) Subject: Remove the driver before exiting X-Git-Tag: V2.12.0~195 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=245fc0b43f9fd77b888ee5a7e674754ec115386c;p=cc65 Remove the driver before exiting git-svn-id: svn://svn.cc65.org/cc65/trunk@3655 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/testcode/lib/em-test.c b/testcode/lib/em-test.c index bc0b7815b..3fe5bf280 100644 --- a/testcode/lib/em-test.c +++ b/testcode/lib/em-test.c @@ -16,6 +16,14 @@ static unsigned buf[BUF_SIZE]; +static void cleanup (void) +/* Remove the driver on exit */ +{ + em_unload (); +} + + + static void fill (register unsigned* page, register unsigned char count, register unsigned num) { register unsigned char i; @@ -58,6 +66,7 @@ int main (void) cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror)); exit (EXIT_FAILURE); } + atexit (cleanup); /* Get the number of available pages */ PageCount = em_pagecount (); @@ -100,7 +109,7 @@ int main (void) cputhex16 (I); } - /* TEST #1: em_copyfrom/em_copyto. */ + /* TEST #2: em_copyfrom/em_copyto. */ cputs ("\r\nTesting em_copyfrom/em_copyto"); /* We're filling now 384 bytes per run to test the copy routines with