From 91f96895b59fdd084301de4855db3517575d1773 Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 24 May 2006 09:39:56 +0000 Subject: [PATCH 1/1] Move typedefs of pointer to function to their own file so that I find them when I want to git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2288 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/Makefile.am | 2 ++ include/xbt.h | 1 + include/xbt/function_types.h | 29 +++++++++++++++++++++++++++++ include/xbt/misc.h | 11 ----------- 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 include/xbt/function_types.h diff --git a/include/Makefile.am b/include/Makefile.am index 01fc6182e0..fa61c2783a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -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 \ diff --git a/include/xbt.h b/include/xbt.h index 506f8df7c0..8a528a4cfe 100644 --- a/include/xbt.h +++ b/include/xbt.h @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/include/xbt/function_types.h b/include/xbt/function_types.h new file mode 100644 index 0000000000..10c6fe7501 --- /dev/null +++ b/include/xbt/function_types.h @@ -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 */ diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 4c01db9087..ef4ae2e409 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -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() -- 2.20.1