chiark / gitweb /
url: Allow various `safe' characters unquoted in URL strings.
[mLib] / macros.h
1 /* -*-c-*-
2  *
3  * $Id$
4  *
5  * Handy macros
6  *
7  * (c) 2003 Straylight/Edgeware
8  */
9
10 /*----- Licensing notice --------------------------------------------------* 
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.
18  * 
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.
23  * 
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
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
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
47 /*----- That's all, folks -------------------------------------------------*/
48
49 #ifdef __cplusplus
50   }
51 #endif
52
53 #endif