<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fail.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<h1>examples/PIPS/antiword/src/fail.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * fail.c</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998 A.J. van Os</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
<a name="l00006"></a>00006 <span class="comment"> * An alternative form of assert()</span>
<a name="l00007"></a>00007 <span class="comment"> */</span>
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="preprocessor">#include <stdlib.h></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include "antiword.h"</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#if !defined(NDEBUG)</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="keywordtype">void</span>
<a name="l00014"></a>00014 __fail(<span class="keywordtype">char</span> *szExpression, <span class="keywordtype">char</span> *szFilename, <span class="keywordtype">int</span> iLineNumber)
<a name="l00015"></a>00015 {
<a name="l00016"></a>00016 <span class="keywordflow">if</span> (szExpression == NULL || szFilename == NULL) {
<a name="l00017"></a>00017 werr(1, <span class="stringliteral">"Internal error: no expression"</span>);
<a name="l00018"></a>00018 }
<a name="l00019"></a>00019 <span class="preprocessor">#if defined(DEBUG)</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span> fprintf(stderr, <span class="stringliteral">"%s[%3d]: Internal error in '%s'\n"</span>,
<a name="l00021"></a>00021 szFilename, iLineNumber, szExpression);
<a name="l00022"></a>00022 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
<a name="l00023"></a>00023 werr(1, <span class="stringliteral">"Internal error in '%s' in file %s at line %d"</span>,
<a name="l00024"></a>00024 szExpression, szFilename, iLineNumber);
<a name="l00025"></a>00025 } <span class="comment">/* end of __fail */</span>
<a name="l00026"></a>00026 <span class="preprocessor">#endif </span><span class="comment">/* !NDEBUG */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>