From 32b1f88e194a7ac657b583ea1dc30abfb1436fb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Fri, 26 Nov 2010 11:30:28 +0000 Subject: [PATCH] Dynamically sort the millisecond columns The time columns containing the millisecond could not be sorted properly if formatted with a dot as the separator. Thanks to igora100 for pointing out the problem. --- html.c | 7 +++++-- topuser.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/html.c b/html.c index 1ee5751..6f6e5ee 100644 --- a/html.c +++ b/html.c @@ -356,8 +356,11 @@ void htmlrel(void) if (SortTableJs[0]) fprintf(fp_ou," sorttable_customkey=\"%"PRId64"\"",(int64_t)nnelap); fprintf(fp_ou,">%s",buildtime(nnelap)); } - if((UserReportFields & USERREPORTFIELDS_MILISEC) != 0) - fprintf(fp_ou,"%s",fixnum2(nnelap,1)); + if((UserReportFields & USERREPORTFIELDS_MILISEC) != 0) { + fputs("%s",fixnum2(nnelap,1)); + } if((UserReportFields & USERREPORTFIELDS_PTIME) != 0) { perc2=(tnelap) ? nnelap * 100. / tnelap : 0.; fprintf(fp_ou,"%3.2lf%%",perc2); diff --git a/topuser.c b/topuser.c index 2ecb87c..9d26956 100644 --- a/topuser.c +++ b/topuser.c @@ -341,8 +341,11 @@ void topuser(void) if (SortTableJs[0]) fprintf(fp_top3," sorttable_customkey=\"%"PRId64"\"",(int64_t)tnelap); fprintf(fp_top3,">%s",buildtime(tnelap)); } - if((TopUserFields & TOPUSERFIELDS_MILISEC) != 0) - fprintf(fp_top3,"%s",fixnum2(tnelap,1)); + if((TopUserFields & TOPUSERFIELDS_MILISEC) != 0) { + fputs("%s",fixnum2(tnelap,1)); + } if((TopUserFields & TOPUSERFIELDS_PTIME) != 0) { perc2=(ttnelap) ? elap * 100. / ttnelap : 0.; fprintf(fp_top3,"%3.2lf%%",perc2); -- 2.47.2