14d7100d |
1 | /* -*-c-*- |
16139d88 |
2 | * |
3 | * $Id$ |
4 | * |
5 | * Handy macros |
14d7100d |
6 | * |
7 | * (c) 2003 Straylight/Edgeware |
8 | */ |
9 | |
d4efbcd9 |
10 | /*----- Licensing notice --------------------------------------------------* |
14d7100d |
11 | * |
12 | * This file is part of the mLib utilities library. |
13 | * |
14 | * mLib is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU Library General Public License as |
16 | * published by the Free Software Foundation; either version 2 of the |
17 | * License, or (at your option) any later version. |
d4efbcd9 |
18 | * |
14d7100d |
19 | * mLib is distributed in the hope that it will be useful, |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | * GNU Library General Public License for more details. |
d4efbcd9 |
23 | * |
14d7100d |
24 | * You should have received a copy of the GNU Library General Public |
25 | * License along with mLib; if not, write to the Free |
26 | * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
27 | * MA 02111-1307, USA. |
28 | */ |
29 | |
14d7100d |
30 | #ifndef MLIB_MACROS_H |
31 | #define MLIB_MACROS_H |
32 | |
33 | #ifdef __cplusplus |
34 | extern "C" { |
35 | #endif |
36 | |
37 | /*----- Macros provided ---------------------------------------------------*/ |
38 | |
39 | #define N(v) (sizeof(v)/sizeof(*v)) |
40 | |
16139d88 |
41 | #define MLIB__STR(x) #x |
42 | #define STR(x) MLIB__STR(x) |
43 | |
44 | #define MLIB__GLUE(x, y) x##y |
45 | #define GLUE(x, y) MLIB__GLUE(x, y) |
46 | |
14d7100d |
47 | /*----- That's all, folks -------------------------------------------------*/ |
48 | |
49 | #ifdef __cplusplus |
50 | } |
51 | #endif |
52 | |
53 | #endif |