ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/libermyth/include/util/preprocessor.h
Revision: 1.1
Committed: Sat Sep 22 14:27:26 2007 UTC (19 years, 2 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
split up ermyth into ermyth-modules, libermyth (currently just ermyth-util) and ermyth-core

File Contents

# Content
1 /**
2 * util.h: Various utility functions.
3 *
4 * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
5 * Rights to this code are as documented in COPYING.
6 *
7 * $Id: util.h,v 1.7 2007-09-16 18:54:42 pippijn Exp $
8 */
9
10 #ifndef PREPROCESSOR_H
11 #define PREPROCESSOR_H
12
13 // Allow pasting things, even if one of the arguments is a macro itself
14 #define PASTE(A, B) DOPASTE (A, B)
15 #define DOPASTE(A, B) DODOPASTE (A, B)
16 #define DODOPASTE(A, B) A ## B
17
18 #define PASTE2(A, B) PASTE (A, B)
19 #define PASTE3(A, B, C) PASTE (PASTE (A, B), C)
20 #define PASTE4(A, B, C, D) PASTE (PASTE3 (A, B, C), D)
21 #define PASTE5(A, B, C, D, E) PASTE (PASTE4 (A, B, C, D), E)
22 #define PASTE6(A, B, C, D, E, F) PASTE (PASTE5 (A, B, C, D, E), F)
23
24 #endif