wmail: define debug macros as empty if debug is not enabled.
[dockapps.git] / wmail / src / common.h
bloba7441d6950a65a287e61be713e12b5eb973e84c3
1 ///////////////////////////////////////////////////////////////////////////////
2 // common.h
3 // common defines and typedefs, part of wmail
4 //
5 // Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions
10 // are met:
11 // 1. Redistributions of source code must retain the above copyright
12 // notice, this list of conditions, and the following disclaimer.
13 // 2. Redistributions in binary form must reproduce the above copyright
14 // notice, this list of conditions, and the following disclaimer in the
15 // documentation and/or other materials provided with the distribution.
16 // 3. The name of the author may not be used to endorse or promote products
17 // derived from this software without specific prior written permission.
19 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef _COMMON_H_fdda99de15ce3f21ce7faf607a5b4985_
32 #define _COMMON_H_fdda99de15ce3f21ce7faf607a5b4985_
35 ///////////////////////////////////////////////////////////////////////////////
36 // defines
38 // X display to open
39 #define WMAIL_DISPLAY ""
41 // ticker scroll frame rate per seconds
42 #define WMAIL_FPS 60
44 // default mail check interval in seconds
45 #define WMAIL_CHECK_INTERVAL 1
47 // default client-button command
48 #define WMAIL_CLIENT_CMD "xterm -e mail"
50 // filename of the checksum-file
51 #define WMAIL_CHECKSUM_FILE ".wmail-cksums"
53 // filename of the config-file
54 #define WMAIL_RC_FILE ".wmailrc"
56 #define WMAIL_NAME "wmail"
57 #define WMAIL_VERSION "wmail v2.0 (C) 2000~2002 Sven Geisenhainer <sveng@informatik.uni-jena.de>"
59 #define WMAIL_READSTATUS "O"
61 ///////////////////////////////////////////////////////////////////////////////
62 // typedefs
64 #if !defined(__cplusplus) && !defined(c_plusplus)
65 typedef enum {
66 false = 0,
67 true = 1
68 } bool;
69 #endif
72 ///////////////////////////////////////////////////////////////////////////////
73 // prototypes
75 void ABORT( const char *fmt, ... );
76 void WARNING( const char *fmt, ... );
77 char *MakePathName( const char *dir, const char *file );
79 #ifdef DEBUG
81 void TRACE( const char *fmt, ... );
82 #define ASSERT( EXPR ) ((void)(EXPR ? 0 : ABORT( "%s(%i): Assertion failed: \"%s\"\n", __FILE__, __LINE__, #EXPR )))
83 #define VERIFY( EXPR ) ASSERT( EXPR )
85 #else
87 #define TRACE( fmt... )
88 #define ASSERT( EXPR )
89 #define VERIFY( EXPR )
91 #endif
93 #endif