From 8e54450ca4b5b772f57607f6935d27b1cd80d232 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 12 Feb 2013 16:51:56 +0100 Subject: [PATCH] [DEV] start reading ok --- Makefile | 4 ++++ main.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b186278..f276dbe 100755 --- a/Makefile +++ b/Makefile @@ -96,3 +96,7 @@ package: all @#cp -vf data/*.xml package/$(PROG_NAME)/usr/share/edn/ @cd package; dpkg-deb --build $(PROG_NAME) +install: + sudo cp -fv hexViewer /usr/bin/hexViewer + + diff --git a/main.c b/main.c index 97b8208..452284e 100755 --- a/main.c +++ b/main.c @@ -220,6 +220,9 @@ void OpenFiles(void) } if (fileProp[0].slotSize == fileProp[1].slotSize) { setSlotSize(fileProp[0].slotSize); + if (fileProp[0].slotSize>0) { + setSlotDisplayMode(true); + } } else { printf("Error The 2 files has not the same header slotSize properties header ... \n"); } @@ -227,10 +230,16 @@ void OpenFiles(void) setTypeSize(fileProp[0].typeSize); setType(fileProp[0].type); setSlotSize(fileProp[0].slotSize); + if (fileProp[0].slotSize>0) { + setSlotDisplayMode(true); + } } else if (fileProp[1].fileBasicOffset!=0) { setTypeSize(fileProp[1].typeSize); setType(fileProp[1].type); setSlotSize(fileProp[1].slotSize); + if (fileProp[1].slotSize>0) { + setSlotDisplayMode(true); + } } int32_t sizeElement=1; showTypeSize_te tmpType = getTypeSize(); @@ -317,9 +326,9 @@ int main (int argc, char**argv) } int32_t idError = findFirstDiff(); - int minSizeFile = (fileProp[0].size