File: defs.h

package info (click to toggle)
mcpp 2.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,544 kB
  • ctags: 28,000
  • sloc: ansic: 34,825; sh: 3,812; makefile: 120; cpp: 84; exp: 18
file content (38 lines) | stat: -rw-r--r-- 1,125 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* defs.h   */

#include    <stdio.h>

/* assert(): Enable one of these three. */
/* Note: This source doesn't use #elif directive to test preprocessor which
        can't recognize the directive.  */
#if     1   /* For the translator which can process <assert.h> properly.    */
#include    <assert.h>
#else
#if     0   /* Not to abort on error.   */
#define     assert( exp)    (exp) ? (void)0 : (void) fprintf( stderr,   \
        "Assertion failed: %s, from line %d of file %s\n",  \
        # exp, __LINE__, __FILE__)
#else
#if     0   /* For the translator which can't process <assert.h> or '#'
                operator properly.  */
#define     assert( exp)    (exp) ? 0 : fputs( "Assertion failed\n", stderr)
#endif
#endif
#endif

#ifdef  void
/*
 *  For the older compilers which can't handle prototype declarations.
 * You must append these lines in stdio.h.
 *      #undef  void
 *      #define void
 */
extern int      strcmp();
extern size_t   strlen();
extern void     exit();
#else
extern int      strcmp( const char *, const char *);
extern size_t   strlen( const char *);
extern void     exit( int);
#endif