use m_strdup and m_strlen that are inlined for efficiency
[apps/madmutt.git] / lib-lib / macros.h
1 /*
2  *  This program is free software; you can redistribute it and/or modify it
3  *  under the terms of the GNU General Public License as published by the Free
4  *  Software Foundation; either version 2 of the License, or (at your option)
5  *  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 MERCHANTABILITY
9  *  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10  *  for more details.
11  *
12  *  You should have received a copy of the GNU General Public License along
13  *  with this program; if not, write to the Free Software Foundation, Inc.,
14  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  *  Copyright © 2006 Pierre Habouzit
17  */
18
19 #ifndef MUTT_LIB_LIB_MACROS_H
20 #define MUTT_LIB_LIB_MACROS_H
21
22 /*
23  * config.h must be included by source file!
24  */
25
26 #ifdef _
27 #  undef _
28 #endif
29
30 #ifdef ENABLE_NLS
31 #  include <libintl.h>
32 #define _(a)       (gettext(a))
33 #  ifdef gettext_noop
34 #    define N_(a)  gettext_noop(a)
35 #  else
36 #    define N_(a)  (a)
37 #  endif
38 #else
39 #  define _(a)     (a)
40 #  define N_(a)    (a)
41 #endif
42
43 #endif /* MUTT_LIB_LIB_MACROS_H */