Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move typedefs of pointer to function to their own file so that I find them when I...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 24 May 2006 09:39:56 +0000 (09:39 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 24 May 2006 09:39:56 +0000 (09:39 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2288 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/Makefile.am
include/xbt.h
include/xbt/function_types.h [new file with mode: 0644]
include/xbt/misc.h

index 01fc618..fa61c27 100644 (file)
@@ -2,6 +2,7 @@ include_HEADERS = gras.h xbt.h
 nobase_include_HEADERS = \
        xbt/misc.h \
        xbt/sysdep.h \
+       xbt/function_types.h \
        xbt/asserts.h xbt/ex.h \
        xbt/log.h \
        xbt/module.h \
@@ -10,6 +11,7 @@ nobase_include_HEADERS = \
        xbt/graph.h \
        xbt/fifo.h \
        xbt/swag.h \
+       xbt/matrix.h \
        xbt/host.h \
        xbt/config.h \
        xbt/cunit.h \
index 506f8df..8a528a4 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <xbt/misc.h>
 #include <xbt/sysdep.h>
+#include <xbt/function_types.h>
 
 #include <xbt/asserts.h>
 #include <xbt/log.h>
diff --git a/include/xbt/function_types.h b/include/xbt/function_types.h
new file mode 100644 (file)
index 0000000..10c6fe7
--- /dev/null
@@ -0,0 +1,29 @@
+/* $Id$ */
+
+/* function_type.h - classical types for pointer to function                */
+
+/* Copyright (c) 2004-2006 Martin Quinson.                                  */
+/* Copyright (c) 2004 Arnaud Legrand.                                       */
+/* All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef XBT_FUNCTION_TYPE_H
+#define XBT_FUNCTION_TYPE_H
+
+#include "xbt/misc.h"
+
+SG_BEGIN_DECL()
+
+   typedef void (void_f_ppvoid_t)(void**);
+   typedef void (void_f_pvoid_t) (void*);
+   typedef void (*void_f_void_t) (void);
+
+   typedef int  (int_f_pvoid_pvoid_t) (void*,void*);
+   
+   typedef int  (*int_f_void_t)   (void); /* FIXME: rename it to int_pf_void_t */
+
+SG_END_DECL()
+
+#endif /* XBT_MISC_H */
index 4c01db9..ef4ae2e 100644 (file)
@@ -81,17 +81,6 @@ SG_BEGIN_DECL()
 
 const char *xbt_procname(void);
 
-
-/* Generic function type */
-
-   typedef void (void_f_ppvoid_t)(void**);
-   typedef void (void_f_pvoid_t) (void*);
-   typedef void (*void_f_void_t) (void);
-
-   typedef int  (int_f_pvoid_pvoid_t) (void*,void*);
-   
-   typedef int  (*int_f_void_t)   (void); /* FIXME: rename it to int_pf_void_t */
-
 #define XBT_BACKTRACE_SIZE 10 /* FIXME: better place? Do document */
    
 SG_END_DECL()