Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do generate the header we need with flexml
[simgrid.git] / include / xbt / misc.h
1 /* $Id$ */
2
3 /* xbt.h - Public interface to the xbt (gras's toolbox)                     */
4
5 /* Copyright (c) 2004 Martin Quinson.                                       */
6 /* Copyright (c) 2004 Arnaud Legrand.                                       */
7 /* All rights reserved.                                                     */
8
9 /* This program is free software; you can redistribute it and/or modify it
10  * under the terms of the license (GNU LGPL) which comes with this package. */
11
12 #ifndef XBT_MISC_H
13 #define XBT_MISC_H
14
15 #ifndef max
16 #  define max(a, b) (((a) > (b))?(a):(b))
17 #endif
18 #ifndef min
19 #  define min(a, b) (((a) < (b))?(a):(b))
20 #endif
21
22 #define TRUE  1
23 #define FALSE 0
24
25 #define XBT_MAX_CHANNEL 10 /* FIXME: killme */
26 /*! C++ users need love */
27 #ifndef BEGIN_DECL
28 # ifdef __cplusplus
29 #  define BEGIN_DECL() extern "C" {
30 # else
31 #  define BEGIN_DECL() 
32 # endif
33 #endif
34
35 /*! C++ users need love */
36 #ifndef END_DECL
37 # ifdef __cplusplus
38 #  define END_DECL() }
39 # else
40 #  define END_DECL() 
41 # endif
42 #endif
43 /* End of cruft for C++ */
44
45 BEGIN_DECL()
46 /* Dunno where to place this: needed by config and amok */
47 typedef struct {  
48    char *name;
49    int port;
50 } xbt_host_t;
51
52 END_DECL()
53
54 #endif /* XBT_MISC_H */