Logo AND Algorithmique Numérique Distribuée

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