Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate MSG_clean
[simgrid.git] / examples / msg / properties / msg_prop.c
index 63f1e5f..2347d0c 100644 (file)
@@ -32,12 +32,12 @@ int alice(int argc, char *argv[]);
 int bob(int argc, char *argv[]);
 int carole(int argc, char *argv[]);
 int forwarder(int argc, char *argv[]);
-MSG_error_t test_all(const char *platform_file,
+msg_error_t test_all(const char *platform_file,
                      const char *application_file);
 
 static void test_host(const char*hostname) 
 {
-  m_host_t thehost = MSG_get_host_by_name(hostname);
+  msg_host_t thehost = MSG_get_host_by_name(hostname);
   xbt_dict_t props = MSG_host_get_properties(thehost);
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
@@ -109,7 +109,7 @@ int bob(int argc, char *argv[])
 }
 
 /** Test function */
-MSG_error_t test_all(const char *platform_file,
+msg_error_t test_all(const char *platform_file,
                      const char *application_file)
 {
   MSG_function_register("alice", alice);
@@ -126,16 +126,15 @@ MSG_error_t test_all(const char *platform_file,
 /** Main function */
 int main(int argc, char *argv[])
 {
-  MSG_error_t res = MSG_OK;
+  msg_error_t res = MSG_OK;
 
-  MSG_global_init(&argc, argv);
+  MSG_init(&argc, argv);
   if (argc < 3) {
     printf("Usage: %s platform_file deployment_file\n", argv[0]);
     printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
     exit(1);
   }
   res = test_all(argv[1], argv[2]);
-  MSG_clean();
 
   if (res == MSG_OK)
     return 0;