comparison tools/fanalyze.c @ 2434:0d86e7ff49e1

Print binary name and input file name when outputting -o options.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 23 Feb 2020 06:13:24 +0200
parents 2fcd8d712b1e
children 275374725598
comparison
equal deleted inserted replaced
2433:2fcd8d712b1e 2434:0d86e7ff49e1
728 DMGrepValue *node = &setGrepValues[n]; 728 DMGrepValue *node = &setGrepValues[n];
729 const DMGrepType *def = &dmGrepTypes[node->type]; 729 const DMGrepType *def = &dmGrepTypes[node->type];
730 BOOL sep = FALSE; 730 BOOL sep = FALSE;
731 731
732 if (optOffsetMode) 732 if (optOffsetMode)
733 printf("-o "); 733 {
734 printf("%s %s -o ",
735 argv[0], file->filename);
736 }
734 737
735 for (size_t offs = 0; offs + (def->bsize * node->nvalues) < file->size; offs++) 738 for (size_t offs = 0; offs + (def->bsize * node->nvalues) < file->size; offs++)
736 { 739 {
737 BOOL match = TRUE; 740 BOOL match = TRUE;
738 for (int n = 0; n < node->nvalues; n++) 741 for (int n = 0; n < node->nvalues; n++)