1 /*
2 * ReactOS log2lines
3 * Written by Jan Roeloffzen
4 *
5 * - Statistics
6 */
7
8 #include <stdio.h>
9 #include <string.h>
10
11 #include "version.h"
12 #include "options.h"
13 #include "util.h"
14 #include "log2lines.h"
15
16 void
stat_print(FILE * outFile,PSUMM psumm)17 stat_print(FILE *outFile, PSUMM psumm)
18 {
19 if (outFile)
20 {
21 clilog(outFile, "*** LOG2LINES SUMMARY ***\n");
22 clilog(outFile, "Translated: %d\n", psumm->translated);
23 clilog(outFile, "Reverted: %d\n", psumm->undo);
24 clilog(outFile, "Retranslated: %d\n", psumm->redo);
25 clilog(outFile, "Skipped: %d\n", psumm->skipped);
26 clilog(outFile, "Differ: %d\n", psumm->diff);
27 clilog(outFile, "Differ (function/source): %d\n", psumm->majordiff);
28 clilog(outFile, "Revision conflicts: %d\n", psumm->revconflicts);
29 clilog(outFile, "Regression candidates: %d\n", psumm->regfound);
30 clilog(outFile, "Offset error: %d\n", psumm->offset_errors);
31 clilog(outFile, "Total: %d\n", psumm->total);
32 clilog(outFile, "-------------------------------\n");
33 clilog(outFile, "Log2lines version: " LOG2LINES_VERSION "\n");
34 clilog(outFile, "Directory: %s\n", opt_dir);
35 clilog(outFile, "Passed options: %s\n", opt_scanned);
36 clilog(outFile, "-------------------------------\n");
37 }
38 }
39
40 void
stat_clear(PSUMM psumm)41 stat_clear(PSUMM psumm)
42 {
43 memset(psumm, 0, sizeof(SUMM));
44 }
45
46 /* EOF */
47