A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
obey our coding standards and cosmetics
[simgrid.git]
/
src
/
xbt
/
xbt_log_layout_format.c
diff --git
a/src/xbt/xbt_log_layout_format.c
b/src/xbt/xbt_log_layout_format.c
index
2be99a6
..
b8c3a53
100644
(file)
--- a/
src/xbt/xbt_log_layout_format.c
+++ b/
src/xbt/xbt_log_layout_format.c
@@
-1,6
+1,6
@@
/* layout_simple - a dumb log layout */
/* layout_simple - a dumb log layout */
-/* Copyright (c) 2007-201
7
. The SimGrid Team. */
+/* Copyright (c) 2007-201
8
. The SimGrid Team. */
/* 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. */
/* 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. */
@@
-11,9
+11,14
@@
#include "xbt/sysdep.h"
#include <stdio.h>
#include "xbt/sysdep.h"
#include <stdio.h>
-extern const char *xbt_log_priority_names[8];
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
-
static double format_begin_of_time = -1
;
+
extern const char *xbt_log_priority_names[8]
;
#define ERRMSG \
"Unknown %%%c sequence in layout format (%s).\n" \
#define ERRMSG \
"Unknown %%%c sequence in layout format (%s).\n" \
@@
-148,7
+153,7
@@
static int xbt_log_layout_format_doit(xbt_log_layout_t l, xbt_log_event_t ev, co
show_double(MSG_get_clock());
break;
case 'r': /* application age; LOG4J compliant */
show_double(MSG_get_clock());
break;
case 'r': /* application age; LOG4J compliant */
- show_double(MSG_get_clock()
- format_begin_of_time
);
+ show_double(MSG_get_clock());
break;
case 'm': { /* user-provided message; LOG4J compliant */
int sz;
break;
case 'm': { /* user-provided message; LOG4J compliant */
int sz;
@@
-188,8
+193,5
@@
xbt_log_layout_t xbt_log_layout_format_new(char *arg)
res->free_ = &xbt_log_layout_format_free;
res->data = xbt_strdup((char *) arg);
res->free_ = &xbt_log_layout_format_free;
res->data = xbt_strdup((char *) arg);
- if (format_begin_of_time < 0)
- format_begin_of_time = MSG_get_clock();
-
return res;
}
return res;
}