\n");
+
+ fprintf(OutFile, "
\n");
+ fprintf(OutFile, "Number of occurrences: | %u |
\n", chunk->ChunkCount);
+ if(chunk->VersionCount == 1 && chunk->Versions[0].Version == (unsigned)-1)
+ fprintf(OutFile, "Number of versions: | N/A |
\n");
+ else
+ fprintf(OutFile, "Number of versions: | %u |
\n", chunk->VersionCount);
+ fprintf(OutFile, "
\n");
+
+ if(chunk->VersionCount > 1 ||
+ (chunk->VersionCount == 1 && chunk->Versions[0].Version != (unsigned)-1)){
+ fprintf(OutFile, "
\n");
+ fprintf(OutFile, " | Version | Count |
\n");
+ for(version=0; versionVersionCount; version++){
+ VersionInfo *verinfo = chunk->Versions+version;
+ float percentage = (float)verinfo->Count / chunk->ChunkCount * 100;
+
+ fprintf(OutFile, "%u | %u (0x%x) | %u (%.1f%%) |
\n",
+ version+1, verinfo->Version, verinfo->Version, verinfo->Count, percentage);
+ }
+ fprintf(OutFile, "
\n");
+ }
+
+ fprintf(OutFile, "
\n\n");
+ }
+
+ fprintf(OutFile,
+ "\n");
+ fprintf(OutFile, "\n");
+ fprintf(OutFile, "");
+ fclose(OutFile);
+
+ printf("Generated statistics based on %u IFF files.\n", Stats->FileCount);
+ cmd_delete(CmdArgs);
+ stats_delete(Stats);
+ return 0;
+}
\ No newline at end of file
diff --git a/Tools/tsoscan/tsoscan.h b/Tools/tsoscan/tsoscan.h
new file mode 100644
index 0000000..5f63eac
--- /dev/null
+++ b/Tools/tsoscan/tsoscan.h
@@ -0,0 +1,65 @@
+/*
+ tsoscan - IFF statistical webpage generator
+ tsoscan.h - Copyright (c) 2012 Niotso Project