*oops* I forgot to add those.
[apps/madmutt.git] / lib-lib / lib-lib.h
1 /*
2  *  This program is free software; you can redistribute it and/or modify
3  *  it under the terms of the GNU General Public License as published by
4  *  the Free Software Foundation; either version 2 of the License, or (at
5  *  your option) any later version.
6  *
7  *  This program is distributed in the hope that it will be useful, but
8  *  WITHOUT ANY WARRANTY; without even the implied warranty of
9  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10  *  General Public License for more details.
11  *
12  *  You should have received a copy of the GNU General Public License
13  *  along with this program; if not, write to the Free Software
14  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
15  *  MA 02110-1301, USA.
16  *
17  *  Copyright © 2006 Pierre Habouzit
18  */
19
20 #ifndef MUTT_LIB_LIB_LIB_LIB_H
21 #define MUTT_LIB_LIB_LIB_LIB_H
22
23 #if HAVE_CONFIG_H
24 # include "../config.h"
25 #endif
26
27 #ifndef __GNUC__
28 #  define __attribute__(a)
29 #endif
30
31 /* very common and usual headers we just want to have available {{{ */
32
33 #include <assert.h>
34 #include <ctype.h>
35 #include <dirent.h>
36 #include <errno.h>
37 #include <fcntl.h>
38 #include <limits.h>
39 #include <regex.h>
40 #include <stdarg.h>
41 #include <stddef.h>
42 #include <stdio.h>
43 #include <stdlib.h>
44 #include <string.h>
45 #include <sys/stat.h>
46 #include <sys/types.h>
47 #include <sys/wait.h>
48 #include <time.h>
49 #include <wchar.h>
50 #include <wctype.h>
51
52 #ifdef HAVE_UNISTD_H
53 # include <unistd.h>
54 #endif
55
56 #if HAVE_STDINT_H
57 # include <stdint.h>
58 #elif HAVE_INTTYPES_H
59 # include <inttypes.h>
60 #endif
61
62 #ifdef HAVE_SYS_TIME_H
63 # include <sys/time.h>
64 #endif
65
66 #ifdef HAVE_LOCALE_H
67 #include <locale.h>
68 #endif
69
70 #ifndef _POSIX_PATH_MAX
71 #include <posix1_lim.h>
72 #endif
73
74 /* }}} */
75 /* useful and common macros {{{ */
76
77 #ifdef _
78 #  undef _
79 #endif
80
81 #ifdef ENABLE_NLS
82 #  include <libintl.h>
83 #define _(a)       (gettext(a))
84 #  ifdef gettext_noop
85 #    define N_(a)  gettext_noop(a)
86 #  else
87 #    define N_(a)  (a)
88 #  endif
89 #else
90 #  define _(a)     (a)
91 #  define N_(a)    (a)
92 #endif
93
94 #define TRUE 1
95 #define FALSE 0
96
97 #undef MAX
98 #undef MIN
99 #define MAX(a,b) ((a) < (b) ? (b) : (a))
100 #define MIN(a,b) ((a) < (b) ? (a) : (b))
101
102 /* }}} */
103
104 #include "mem.h"
105 #include "str.h"
106
107 #include "array.h"
108 #include "buffer.h"
109 #include "date.h"
110 #include "file.h"
111 #include "hash.h"
112 #include "list.h"
113 #include "mapping.h"
114 #include "rx.h"
115 #include "url.h"
116
117 #endif