# HG changeset patch # User Matti Hamalainen # Date 1560567983 -10800 # Node ID ef1845cb436e1b878bc98006b08b339a0c35abbf # Parent b39eb8b44f2227667d9acf6637045ee57afb6a69 Improve help, cosmetics. diff -r b39eb8b44f22 -r ef1845cb436e tools/fanalyze.c --- 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];