Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement reentrant mutexes in xbt_os_thread
[simgrid.git] / src / xbt / xbt_replay_trace_reader.c
index e9eaea9..0c02352 100644 (file)
@@ -3,8 +3,9 @@
 
 /* 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. */
+#include "simgrid_config.h" //For getline, keep that include first
+
 #include "gras_config.h"
-#include "simgrid_config.h" /* getline */
 #include <errno.h>
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
@@ -25,7 +26,7 @@ xbt_replay_trace_reader_t xbt_replay_trace_reader_new(const char *filename)
 {
   xbt_replay_trace_reader_t res = xbt_new0(s_xbt_replay_trace_reader_t,1);
   res->fp = fopen(filename, "r");
-  xbt_assert2(res->fp != NULL, "Cannot open %s: %s", filename,
+  xbt_assert(res->fp != NULL, "Cannot open %s: %s", filename,
       strerror(errno));
   res->filename = xbt_strdup(filename);
   return res;
@@ -44,7 +45,7 @@ const char **xbt_replay_trace_reader_get(xbt_replay_trace_reader_t reader)
   ssize_t read;
   xbt_dynar_t d;
   read = getline(&reader->line, &reader->line_len, reader->fp);
-  //INFO1("got from trace: %s",reader->line);
+  //XBT_INFO("got from trace: %s",reader->line);
   reader->linenum++;
   if (read==-1)
     return NULL; /* end of file */