From: alegrand Date: Mon, 20 Mar 2006 12:20:38 +0000 (+0000) Subject: factoring + some functions go public X-Git-Tag: v3.3~3403 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1f52318591180440dacf81c39dbec45ab670a4ab factoring + some functions go public git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1955 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/gras/timer.h b/include/gras/timer.h index a05fc1acfd..7a38129ad3 100644 --- a/include/gras/timer.h +++ b/include/gras/timer.h @@ -37,8 +37,6 @@ SG_BEGIN_DECL() * @{ */ - typedef void (*void_f_void_t)(void); - void gras_timer_delay(double delay, void_f_void_t action); void gras_timer_repeat(double interval, void_f_void_t action); diff --git a/include/surf/surf_parse.h b/include/surf/surf_parse.h index 423f0e3fbc..cdc6aa1274 100644 --- a/include/surf/surf_parse.h +++ b/include/surf/surf_parse.h @@ -11,6 +11,44 @@ #include "surf/surfxml.h" #include "xbt/misc.h" +/* Entry-point of the surfxml parser. */ extern int_f_void_t surf_parse; +/* Hook for the different tags. They can be redefined at will whereas + the versions without the _fun can't. */ + +extern void_f_void_t STag_platform_description_fun; +extern void_f_void_t ETag_platform_description_fun; +extern void_f_void_t STag_cpu_fun; +extern void_f_void_t ETag_cpu_fun; +extern void_f_void_t STag_network_link_fun; +extern void_f_void_t ETag_network_link_fun; +extern void_f_void_t STag_route_fun; +extern void_f_void_t ETag_route_fun; +extern void_f_void_t STag_route_element_fun; +extern void_f_void_t ETag_route_element_fun; +extern void_f_void_t STag_process_fun; +extern void_f_void_t ETag_process_fun; +extern void_f_void_t STag_argument_fun; +extern void_f_void_t ETag_argument_fun; + +void surf_parse_open(const char *file); +void surf_parse_close(void); +void surf_parse_reset_parser(void); +void surf_parse_get_double(double *value,const char *string); + +/* Prototypes of the functions offered by flex */ +int surf_parse_lex(void); +int surf_parse_get_lineno(void); +FILE *surf_parse_get_in(void); +FILE *surf_parse_get_out(void); +int surf_parse_get_leng(void); +char *surf_parse_get_text(void); +void surf_parse_set_lineno(int line_number); +void surf_parse_set_in(FILE * in_str); +void surf_parse_set_out(FILE * out_str); +int surf_parse_get_debug(void); +void surf_parse_set_debug(int bdebug); +int surf_parse_lex_destroy(void); + #endif diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 03257f5f88..ffb11e323c 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -89,6 +89,7 @@ const char *xbt_procname(void); 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*); diff --git a/src/include/surf/surf_parse_private.h b/src/include/surf/surf_parse_private.h index f1461031f0..d6500447a8 100644 --- a/src/include/surf/surf_parse_private.h +++ b/src/include/surf/surf_parse_private.h @@ -13,42 +13,6 @@ #include "surf/surf_parse.h" #include "surf/trace_mgr.h" -typedef void (*void_f_void_t)(void); - -extern void_f_void_t STag_platform_description_fun; -extern void_f_void_t ETag_platform_description_fun; -extern void_f_void_t STag_cpu_fun; -extern void_f_void_t ETag_cpu_fun; -extern void_f_void_t STag_network_link_fun; -extern void_f_void_t ETag_network_link_fun; -extern void_f_void_t STag_route_fun; -extern void_f_void_t ETag_route_fun; -extern void_f_void_t STag_route_element_fun; -extern void_f_void_t ETag_route_element_fun; -extern void_f_void_t STag_process_fun; -extern void_f_void_t ETag_process_fun; -extern void_f_void_t STag_argument_fun; -extern void_f_void_t ETag_argument_fun; - - -void surf_parse_open(const char *file); -void surf_parse_close(void); -void surf_parse_reset_parser(void); -void surf_parse_get_double(double *value,const char *string); void surf_parse_get_trace(tmgr_trace_t *trace, const char *string); -/* Prototypes of the functions offered by flex */ -int surf_parse_lex(void); -int surf_parse_get_lineno(void); -FILE *surf_parse_get_in(void); -FILE *surf_parse_get_out(void); -int surf_parse_get_leng(void); -char *surf_parse_get_text(void); -void surf_parse_set_lineno(int line_number); -void surf_parse_set_in(FILE * in_str); -void surf_parse_set_out(FILE * out_str); -int surf_parse_get_debug(void); -void surf_parse_set_debug(int bdebug); -int surf_parse_lex_destroy(void); - #endif