changeset 2234:ef1845cb436e

Improve help, cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jun 2019 06:06:23 +0300
parents b39eb8b44f22
children 9c4f69fcb4b1
files tools/fanalyze.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tools/fanalyze.c	Sat Jun 15 05:50:22 2019 +0300
+++ b/tools/fanalyze.c	Sat Jun 15 06:06:23 2019 +0300
@@ -1,5 +1,5 @@
 /*
- * Fanalyze - Analyze similarities between multiple files
+ * Fanalyze - Commandline tool for analyzing similarities between multiple files
  * Programmed and designed by Matti 'ccr' Hamalainen
  * (C) Copyright 2018-2019 Tecnic Software productions (TNSP)
  *
@@ -149,6 +149,11 @@
 
     fprintf(stdout,
     "\n"
+    "Fanalyze is a simplistic commandline tool to assist analysis of similarities\n"
+    "between multiple files of same format (but different content). It provides\n"
+    "automatic analysis (default operating mode), binary grep functionality (-g)\n"
+    "and offset data display (-o)\n"
+    "\n"
     "Value lists for grep function can contain wildcard '?' (or '#') which\n"
     "matches any value of the specified (or inferred) type. For example:\n"
     "-g 0x0f,7,5,?,5,?,? will match sequence of bytes 0f 07 05 ?? 05 ?? ??\n"
@@ -525,7 +530,8 @@
     size_t compBufSize = 0, totalSize = 0;
     int res;
 
-    dmInitProg("fanalyze", "File format analyzer", "0.4", NULL, NULL);
+    dmInitProg("fanalyze", "Simple tool for file format analysis",
+        "0.4", NULL, NULL);
     dmVerbosity = 1;
 
     dmInitStats(&totalStats);
@@ -682,7 +688,9 @@
             goto out;
         }
 
-        // Begin analyzing ..
+        //
+        // Basic file data comparision
+        //
         dmPrint(2, "Analyzing ..\n");
         for (int nfile = 0; nfile < nsrcFiles; nfile++)
         {
@@ -715,7 +723,9 @@
             }
         }
 
+        //
         // Display results
+        //
         for (size_t offs = 0, n = 0; offs < compBufSize; offs++)
         {
             DMCompElem *el = &compBuf[offs];