Mercurial > libdvdnav.hg
diff vm/decoder.c @ 243:e75c52894630 src
* assert(0) does not always and the program (see NDEBUG)
* use abort(), where we should really terminate
* reversed return value of getbits_init (I prefer booleans)
author | mroi |
---|---|
date | Wed, 03 Mar 2004 16:50:42 +0000 |
parents | 9b1b740e3fc9 |
children | 130c10495b66 |
line wrap: on
line diff
--- a/vm/decoder.c Wed Mar 03 16:48:36 2004 +0000 +++ b/vm/decoder.c Wed Mar 03 16:50:42 2004 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort + * 2002-2004 the dvdnav project * * This file is part of libdvdnav, a DVD navigation library. It is modified * from a file originally part of the Ogle DVD player. @@ -31,7 +32,6 @@ #include <inttypes.h> #include <string.h> /* For memset */ #include "ifo_types.h" /* vm_cmd_t */ -#include <assert.h> #include "dvdnav_internal.h" @@ -49,7 +49,7 @@ (count < 0) || (start < 0) ) { fprintf(MSG_OUT, "libdvdnav: Bad call to vm_getbits. Parameter out of range\n"); - assert(0); + abort(); } /* all ones, please */ bit_mask = ~bit_mask; @@ -512,7 +512,7 @@ res = eval_special_instruction(&command, cond); if(res == -1) { fprintf(MSG_OUT, "libdvdnav: Unknown Instruction!\n"); - assert(0); + abort(); } break; case 1: /* Link/jump instructions */ @@ -566,7 +566,7 @@ break; default: /* Unknown command */ fprintf(MSG_OUT, "libdvdnav: WARNING: Unknown Command=%x\n", vm_getbits(&command, 63, 3)); - assert(0); + abort(); } /* Check if there are bits not yet examined */