Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Preparing surf_parser to be hijacked
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 Aug 2005 19:05:23 +0000 (19:05 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 Aug 2005 19:05:23 +0000 (19:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1650 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/include/surf/surf_parse.h
src/surf/surf_parse.c

index 2cc3aee..ec325e0 100644 (file)
@@ -14,6 +14,7 @@
 #include "surfxml.h"
 
 typedef   void (*void_f_void_t)(void);
 #include "surfxml.h"
 
 typedef   void (*void_f_void_t)(void);
+typedef   int (*int_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_platform_description_fun;
 extern void_f_void_t ETag_platform_description_fun;
@@ -33,7 +34,7 @@ extern void_f_void_t ETag_argument_fun;
 
 void surf_parse_open(const char *file);
 void surf_parse_close(void);
 
 void surf_parse_open(const char *file);
 void surf_parse_close(void);
-int  surf_parse(void);
+extern int_f_void_t surf_parse;
 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);
 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);
index 1331cba..2053fb1 100644 (file)
@@ -178,11 +178,14 @@ void  surf_parse_close(void) {
   }
 }
 
   }
 }
 
-int surf_parse(void)
+
+static int __surf_parse(void)
 {
   return surf_parse_lex();
 }
 
 {
   return surf_parse_lex();
 }
 
+int_f_void_t surf_parse = __surf_parse;
+
 void surf_parse_get_double(double *value,const char *string)
 { 
   int ret = 0;
 void surf_parse_get_double(double *value,const char *string)
 { 
   int ret = 0;