|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * fail.c 00003 * Copyright (C) 1998 A.J. van Os 00004 * 00005 * Description: 00006 * An alternative form of assert() 00007 */ 00008 00009 #include <stdlib.h> 00010 #include "antiword.h" 00011 00012 #if !defined(NDEBUG) 00013 void 00014 __fail(char *szExpression, char *szFilename, int iLineNumber) 00015 { 00016 if (szExpression == NULL || szFilename == NULL) { 00017 werr(1, "Internal error: no expression"); 00018 } 00019 #if defined(DEBUG) 00020 fprintf(stderr, "%s[%3d]: Internal error in '%s'\n", 00021 szFilename, iLineNumber, szExpression); 00022 #endif /* DEBUG */ 00023 werr(1, "Internal error in '%s' in file %s at line %d", 00024 szExpression, szFilename, iLineNumber); 00025 } /* end of __fail */ 00026 #endif /* !NDEBUG */
|
© Nokia 2009 |