]> AND Public Git Repository - simgrid.git/blobdiff - tools/tesh/tesh.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a way to the tesh syntax to log at CRITICAL level (to ease output grepping)
[simgrid.git] / tools / tesh / tesh.c
index 98a6d14da5f93aafbbf55d6051e718e5425ec0f9..3ad2a7609bc4384274959c31e5e8cb7989273442 100644 (file)
@@ -74,6 +74,9 @@ static void handle_line(const char * filepos, char *line) {
   case 'p':
     INFO2("[%s] %s",filepos,line+2);
     break;
+  case 'P':
+    CRITICAL2("[%s] %s",filepos,line+2);
+    break;
 
   default:
     ERROR2("[%s] Syntax error: %s",filepos, line);
@@ -83,7 +86,7 @@ static void handle_line(const char * filepos, char *line) {
 }
 
 static void handle_suite(const char* filename, FILE* IN) {
-  int len;
+  size_t len;
   char * line = NULL;
   int line_num=0;
   char file_pos[256];
@@ -93,7 +96,7 @@ static void handle_suite(const char* filename, FILE* IN) {
 
   rctx = rctx_new();
 
-  while (getline(&line,(size_t*) &len, IN) != -1) {
+  while (getline(&line, &len, IN) != -1) {
     line_num++;
 
     /* Count the line length while checking wheather it's blank */