[Forensics-changes] [SCM] debian-forensics/guymager branch, pristine-tar, updated. v0.4.1-1-7-gdac7fa9

Julien Valroff julien at kirya.net
Sat Jan 7 15:20:36 UTC 2012


The following commit has been merged in the pristine-tar branch:
commit dac7fa9c192fb8aa4e47aadbc684ba81377bd37f
Author: Julien Valroff <julien at kirya.net>
Date:   Sat Jan 7 16:12:28 2012 +0100

    Clean pristine-tar branch

diff --git a/aaff.cpp b/aaff.cpp
deleted file mode 100644
index b153ad2..0000000
--- a/aaff.cpp
+++ /dev/null
@@ -1,355 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Multithreaded AFF (AAFF = Avanced AFF)
-// ****************************************************************************
-
-#include "common.h"
-#include "compileinfo.h"
-
-#include <netinet/in.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <zlib.h>
-
-#include <QString>
-
-#include "util.h"
-#include "config.h"
-#include "aaff.h"
-
-// -----------------
-//  AFF definitions
-// -----------------
-
-#define AFF_GID_LENGTH   16
-#define AFF_SEGARG_U64   2  // Used as argument for segments that contain a 64 bit unsigned in the data field
-
-#define AFF_HEADER                    "AFF10\r\n"
-#define AFF_SEGMENT_HEADER_MAGIC      "AFF"
-#define AFF_SEGMENT_FOOTER_MAGIC      "ATT"
-#define AFF_BADSECTOR_HEADER          "BAD SECTOR"
-#define AFF_FILE_TYPE                 "AFF"
-
-#define AFF_SEGNAME_BADFLAG           "badflag"
-#define AFF_SEGNAME_AFFLIB_VERSION    "afflib_version"
-#define AFF_SEGNAME_FILETYPE          "aff_file_type"
-#define AFF_SEGNAME_GID               "image_gid"
-#define AFF_SEGNAME_SECTORS           "devicesectors"
-#define AFF_SEGNAME_SECTORSIZE        "sectorsize"
-#define AFF_SEGNAME_IMAGESIZE         "imagesize"
-#define AFF_SEGNAME_PAGESIZE          "pagesize"
-#define AFF_SEGNAME_BADSECTORS        "badsectors"
-#define AFF_SEGNAME_MD5               "md5"
-#define AFF_SEGNAME_SHA256            "sha256"
-#define AFF_SEGNAME_DURATION          "acquisition_seconds"
-#define AFF_SEGNAME_PAGE              "page"
-
-#define AFF_PAGEFLAGS_UNCOMPRESSED    0x0000
-#define AFF_PAGEFLAGS_COMPRESSED_ZLIB 0x0001
-#define AFF_PAGEFLAGS_COMPRESSED_ZERO 0x0033    // Compressed, Zero and MaxCompression
-
-typedef struct
-{
-   char         Magic[4];
-   unsigned int NameLen;
-   unsigned int DataLen;
-   unsigned int Argument;          // Named "flags" in original aff source, named "arg" in afinfo output.
-} t_AffSegmentHeader;
-
-// Between header and footer lie the segment name and the data
-
-typedef struct
-{
-   char         Magic[4];
-   unsigned int SegmentLen;
-} t_AffSegmentFooter;
-
-
-// ------------------
-//  Aaff definitions
-// ------------------
-
-typedef struct _t_Aaff
-{
-   FILE               *pFile;
-   unsigned long long   PagesWritten;
-
-   t_AffSegmentHeader   SegmentHeader;  // Optimisation: This header and this footer only need to be
-   t_AffSegmentFooter   SegmentFooter;  // allocated and initialised once, and can be used again and again
-} t_Aaff;
-
-#define AAFF_MD5_LEN                16
-#define AAFF_SHA256_LEN             32
-#define AAFF_BADSECTORMARKER_MAXLEN 65536
-unsigned char AaffBadSectorMarker[AAFF_BADSECTORMARKER_MAXLEN];
-
-// ----------------
-//  Error handling
-// ----------------
-
-#define CHK_FWRITE(Fn)                    \
-   if ((Fn) != 1)                         \
-      CHK (ERROR_AAFF_CANNOT_WRITE_FILE)
-
-
-// -------------------
-//  Utility functions
-// -------------------
-
-static bool AaffIsZero (unsigned char *pData, int DataLen)
-{
-   long long *pBuff    = (long long *)pData;
-   const int   CmpSize = sizeof (long long);   // 64 bit operations for optimal performance on amd64 processors
-
-   while (DataLen >= CmpSize)
-   {
-      if (*pBuff++)
-        return false;
-      DataLen -= CmpSize;
-   }
-
-   pData = (unsigned char *) pBuff;
-   while (DataLen--)
-   {
-      if (*pData++)
-         return false;
-   }
-
-   return true;
-}
-
-// -------------------
-//  Segment functions
-// -------------------
-
-static APIRET AaffWriteSegment (t_pAaff pAaff, const char *pName, unsigned int Argument, const unsigned char *pData, unsigned int DataLen)
-{
-   int NameLen0 = strlen(pName);
-
-   pAaff->SegmentHeader.NameLen    = htonl(NameLen0);
-   pAaff->SegmentHeader.DataLen    = htonl(DataLen);
-   pAaff->SegmentHeader.Argument   = htonl(Argument);
-   pAaff->SegmentFooter.SegmentLen = htonl(sizeof(t_AffSegmentHeader) + sizeof(t_AffSegmentFooter) + NameLen0 + DataLen);
-
-   CHK_FWRITE(fwrite (&pAaff->SegmentHeader, sizeof(t_AffSegmentHeader), 1, pAaff->pFile))
-   CHK_FWRITE(fwrite (pName, NameLen0, 1, pAaff->pFile))
-   if (pData && DataLen)
-      CHK_FWRITE(fwrite (pData, DataLen, 1, pAaff->pFile))
-   CHK_FWRITE(fwrite (&pAaff->SegmentFooter, sizeof(t_AffSegmentFooter), 1, pAaff->pFile))
-
-   return NO_ERROR;
-}
-
-APIRET AaffWriteSegmentStr (t_pAaff pAaff, const char *pName, unsigned int Argument, const char *pStr)
-{
-   CHK (AaffWriteSegment (pAaff, pName, Argument, (const unsigned char *) pStr, strlen (pStr)))
-   return NO_ERROR;
-}
-
-static APIRET AaffWriteSegmentArg (t_pAaff pAaff, const char *pName, unsigned int Argument)
-{
-   CHK (AaffWriteSegment (pAaff, pName, Argument, NULL, 0))
-   return NO_ERROR;
-}
-
-static APIRET AaffWriteSegmentU64 (t_pAaff pAaff, const char *pName, unsigned long long Value)
-{
-   unsigned int Data[2];
-
-   Data[0] = htonl ((unsigned int)(Value &  0xFFFFFFFF));
-   Data[1] = htonl ((unsigned int)(Value >> 32));
-
-   CHK (AaffWriteSegment (pAaff, pName, AFF_SEGARG_U64, (unsigned char *)&Data[0], sizeof(Data)))
-
-   return NO_ERROR;
-}
-
-static APIRET AaffWriteSegmentGID (t_pAaff pAaff)
-{
-   unsigned char GID[AFF_GID_LENGTH];
-   int           i;
-
-   for (i=0; i<AFF_GID_LENGTH; i++)
-      GID[i] = (unsigned char) random();
-
-   CHK (AaffWriteSegment (pAaff, AFF_SEGNAME_GID, 0, GID, AFF_GID_LENGTH))
-
-   return NO_ERROR;
-}
-
-
-// ---------------
-//  API functions
-// ---------------
-
-APIRET AaffOpen (t_pAaff *ppAaff, const char *pFilename, unsigned long long DeviceSize, unsigned int SectorSize, unsigned int PageSize)
-{
-   t_pAaff pAaff;
-   char     Buff[512];
-
-   // Open file and intialise
-   // -----------------------
-   if (SectorSize > AAFF_BADSECTORMARKER_MAXLEN)
-      CHK (ERROR_AAFF_SECTORSIZE_TOO_BIG)
-
-   *ppAaff = NULL;
-   pAaff = (t_pAaff) UTIL_MEM_ALLOC(sizeof(t_Aaff));
-   if (pAaff == NULL)
-      CHK (ERROR_AAFF_MEMALLOC_FAILED)
-
-   pAaff->pFile = fopen64 (pFilename, "w");
-   if (pAaff->pFile == NULL)
-   {
-      UTIL_MEM_FREE (pAaff);
-      CHK (ERROR_AAFF_CANNOT_CREATE_FILE)
-   }
-   *ppAaff = pAaff;
-
-   CHK_FWRITE(fwrite (AFF_HEADER, sizeof(AFF_HEADER), 1, pAaff->pFile))
-
-   pAaff->PagesWritten = 0;
-   memset (&pAaff->SegmentHeader, 0, sizeof (t_AffSegmentHeader));
-   memset (&pAaff->SegmentFooter, 0, sizeof (t_AffSegmentFooter));
-   strcpy (&pAaff->SegmentHeader.Magic[0], AFF_SEGMENT_HEADER_MAGIC);
-   strcpy (&pAaff->SegmentFooter.Magic[0], AFF_SEGMENT_FOOTER_MAGIC);
-
-   // Write standard segments
-   // -----------------------
-   snprintf (&Buff[0], sizeof(Buff), "aaff module of Guymager %s", pCompileInfoVersion);
-   CHK (AaffWriteSegmentGID (pAaff))
-   if CONFIG (AffMarkBadSectors)
-      CHK (AaffWriteSegment (pAaff, AFF_SEGNAME_BADFLAG       , 0, AaffBadSectorMarker, SectorSize))
-   CHK (AaffWriteSegmentStr (pAaff, AFF_SEGNAME_AFFLIB_VERSION, 0, &Buff[0]))
-   CHK (AaffWriteSegmentStr (pAaff, AFF_SEGNAME_FILETYPE      , 0, AFF_FILE_TYPE))
-   CHK (AaffWriteSegmentArg (pAaff, AFF_SEGNAME_PAGESIZE      , PageSize))
-   CHK (AaffWriteSegmentArg (pAaff, AFF_SEGNAME_SECTORSIZE    , SectorSize))
-   CHK (AaffWriteSegmentU64 (pAaff, AFF_SEGNAME_SECTORS       , DeviceSize / SectorSize))
-   CHK (AaffWriteSegmentU64 (pAaff, AFF_SEGNAME_IMAGESIZE     , DeviceSize))
-
-   return NO_ERROR;
-}
-
-APIRET AaffClose (t_pAaff pAaff, unsigned long long BadSectors, unsigned char *pMD5, unsigned char *pSHA256, int Duration)
-{
-   CHK (AaffWriteSegmentU64 (pAaff, AFF_SEGNAME_BADSECTORS  , BadSectors))
-   CHK (AaffWriteSegment    (pAaff, AFF_SEGNAME_MD5         , 0, pMD5   , AAFF_MD5_LEN   ))
-   CHK (AaffWriteSegment    (pAaff, AFF_SEGNAME_SHA256      , 0, pSHA256, AAFF_SHA256_LEN))
-   CHK (AaffWriteSegmentArg (pAaff, AFF_SEGNAME_DURATION    , Duration))
-
-   if (fflush (pAaff->pFile))
-   {
-      (void) fclose (pAaff->pFile);
-      CHK (ERROR_AAFF_CANNOT_FLUSH_FILE)
-   }
-
-   if (fclose (pAaff->pFile))
-      CHK (ERROR_AAFF_CANNOT_CLOSE_FILE)
-
-   return NO_ERROR;
-}
-
-APIRET AaffPreprocess (t_pAaffPreprocess *ppPreprocess, unsigned char *pDataIn, unsigned int DataLenIn, unsigned char *pDataOut, unsigned int DataLenOut)
-{
-   t_pAaffPreprocess pPreProcess;
-   int                rc;
-   uLongf             LenOut;
-
-   *ppPreprocess = NULL;
-   pPreProcess = (t_pAaffPreprocess) UTIL_MEM_ALLOC(sizeof(t_AaffPreprocess));
-   if (pPreProcess == NULL)
-      CHK (ERROR_AAFF_MEMALLOC_FAILED)
-   *ppPreprocess = pPreProcess;
-   pPreProcess->Zero       = false;
-   pPreProcess->Compressed = false;
-
-   // Check if zero
-   // -------------
-   pPreProcess->Zero = AaffIsZero (pDataIn, DataLenIn);
-   if (pPreProcess->Zero)
-      return NO_ERROR;
-
-   // Try compression
-   // ---------------
-   LenOut = DataLenOut;
-   rc = compress2 ((Bytef *)pDataOut, &LenOut, (Bytef *)pDataIn, DataLenIn, CONFIG (AffCompression));
-   pPreProcess->DataLenOut = LenOut;
-   if (rc != Z_OK)
-   {
-      if (rc != Z_BUF_ERROR)    // Do not log this one (the destination buffer was too small for the compressed result)
-         LOG_ERROR ("compress2 returned %d", rc)
-      return NO_ERROR;
-   }
-
-   pPreProcess->Compressed = (LenOut < DataLenIn);
-
-   return NO_ERROR;
-}
-
-APIRET AaffWrite (t_pAaff pAaff, t_pAaffPreprocess pPreprocess, unsigned char *pData, unsigned int DataLen)
-{
-   char SegmentName[64];
-
-   snprintf (&SegmentName[0], sizeof(SegmentName), "%s%llu", AFF_SEGNAME_PAGE, pAaff->PagesWritten++);
-
-   if (pPreprocess->Zero)
-   {
-      int Len = htonl(DataLen);
-      CHK (AaffWriteSegment (pAaff, &SegmentName[0], AFF_PAGEFLAGS_COMPRESSED_ZERO, (unsigned char *) &Len, 4))
-   }
-   else if (pPreprocess->Compressed)
-      CHK (AaffWriteSegment (pAaff, &SegmentName[0], AFF_PAGEFLAGS_COMPRESSED_ZLIB, pData, pPreprocess->DataLenOut))
-   else
-      CHK (AaffWriteSegment (pAaff, &SegmentName[0], AFF_PAGEFLAGS_UNCOMPRESSED   , pData, DataLen))
-
-   UTIL_MEM_FREE (pPreprocess);
-
-   return NO_ERROR;
-}
-
-APIRET AaffCopyBadSectorMarker (unsigned char *pBuffer, unsigned int Len)
-{
-   if (Len > AAFF_BADSECTORMARKER_MAXLEN)
-      CHK (ERROR_AAFF_SECTORSIZE_TOO_BIG)
-
-   memcpy (pBuffer, &AaffBadSectorMarker[0], Len);
-
-   return NO_ERROR;
-}
-
-// -----------------------
-//  Module initialisation
-// -----------------------
-
-APIRET AaffInit (void)
-{
-   int i;
-
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_MEMALLOC_FAILED   ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_CANNOT_CREATE_FILE))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_CANNOT_WRITE_FILE ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_CANNOT_CLOSE_FILE ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_CANNOT_FLUSH_FILE ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_SECTORSIZE_TOO_BIG))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_AAFF_COMPRESSION_FAILED))
-
-   srandom (time (0));
-
-   for (i=0; i<AAFF_BADSECTORMARKER_MAXLEN; i++)
-      AaffBadSectorMarker[i] = (char)random();
-   strcpy ((char *)AaffBadSectorMarker, AFF_BADSECTOR_HEADER);
-
-   return NO_ERROR;
-}
-
-APIRET AaffDeInit (void)
-{
-   return NO_ERROR;
-}
-
diff --git a/aaff.h b/aaff.h
deleted file mode 100644
index 75e319a..0000000
--- a/aaff.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Multithreaded AFF (AAFF = Avanced AFF)
-// ****************************************************************************
-
-#ifndef __AAFF_H__
-#define __AAFF_H__
-
-typedef struct _t_Aaff *t_pAaff;
-
-typedef struct
-{
-   bool Zero;         // Tells AafWrite that all data is 0
-   bool Compressed;   // Tells AafWrite whether the data should be written compressed or uncompresed
-   int  DataLenOut;   // If Compressed is true: The size of the compressed data
-} t_AaffPreprocess, *t_pAaffPreprocess;
-
-#define AAFF_SEGNAME_COMMAND_LINE "acquisition_commandline"
-#define AAFF_SEGNAME_MACADDR      "acquisition_macaddr"
-#define AAFF_SEGNAME_DATE	       "acquisition_date"        // Format: YYYY-MM-DD HH:MM:SS TZT
-#define AAFF_SEGNAME_DEVICE	    "acquisition_device"
-#define AAFF_SEGNAME_MODEL		    "device_model"
-#define AAFF_SEGNAME_SN		       "device_sn"
-
-// ------------------------------------
-//              Functions
-// ------------------------------------
-
-APIRET AaffOpen       (t_pAaff *ppAaff, const char *pFilename, unsigned long long DeviceSize, unsigned int SectorSize, unsigned int PageSize);
-APIRET AaffPreprocess (t_pAaffPreprocess *ppPreprocess, unsigned char *pDataIn, unsigned int DataLenIn, unsigned char *pDataOut, unsigned int DataLenOut);
-APIRET AaffWrite      (t_pAaff   pAaff, t_pAaffPreprocess pPreprocess, unsigned char *pData, unsigned int DataLen);
-APIRET AaffClose      (t_pAaff   pAaff, unsigned long long BadSectors, unsigned char *pMD5, unsigned char *pSHA256, int Duration);
-
-APIRET AaffWriteSegmentStr (t_pAaff pAaff, const char *pName, unsigned int Argument, const char *pStr);
-
-APIRET AaffCopyBadSectorMarker (unsigned char *pBuffer, unsigned int Len);
-
-APIRET AaffInit   (void);
-APIRET AaffDeInit (void);
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_AAFF_MEMALLOC_FAILED   = ERROR_BASE_AAFF + 1,
-   ERROR_AAFF_CANNOT_CREATE_FILE,
-   ERROR_AAFF_CANNOT_WRITE_FILE,
-   ERROR_AAFF_CANNOT_CLOSE_FILE,
-   ERROR_AAFF_CANNOT_FLUSH_FILE,
-   ERROR_AAFF_SECTORSIZE_TOO_BIG,
-   ERROR_AAFF_COMPRESSION_FAILED,
-};
-
-#endif
-
-
diff --git a/common.h b/common.h
deleted file mode 100644
index 292b1ee..0000000
--- a/common.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Standard include file
-// ****************************************************************************
-
-#ifndef __COMMON_H__
-#define __COMMON_H__
-
-// GNU C lib definitions
-// ---------------------
-#ifndef _LARGEFILE_SOURCE
-   #define _LARGEFILE_SOURCE 1
-#endif
-
-#ifndef _FILE_OFFSET_BITS
-   #define _FILE_OFFSET_BITS 64
-#endif
-
-#ifndef _GNU_SOURCE
-   #define _GNU_SOURCE 1
-#endif
-
-#ifndef _THREAD_SAFE
-   #define _THREAD_SAFE 1
-#endif
-
-#ifndef _STDIO_H
-   #include <stdio.h>
-#endif
-
-#include "toolglobalid.h"
-#include "error/toolerror.h"
-#include "log/toollog.h"
-#include "tooltypes.h"
-
-#include "modules.h"
-#include "error.h"
-
-#define QSTR_TO_PSZ(QStr) (QStr).toAscii().constData()
-
-
-extern void *pOffsetOfNullPointer;
-#define OFFSET_OF(Type, Element)                            \
-   ((unsigned int) &(((Type*)pOffsetOfNullPointer)->Element))
-
-#endif
-
-
-class t_Device;                      // As t_Device is the core structure of guymager and as it is needed
-typedef t_Device       *t_pDevice;   // all the time, it is easiest to declare it here (eventhough I don't
-typedef t_Device const *t_pcDevice;  // like that style too much, but we won't change C++ at this time).
-
-
-#define EWF_MULTITHREADED_COMPRESSION_CHUNK_SIZE       32768
-
diff --git a/compileinfo.h b/compileinfo.h
deleted file mode 100644
index 0fef085..0000000
--- a/compileinfo.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-// This external constant allows other modules to access the compilation
-// timestamp. The constant itself is instantiated in compileinfo.cpp which is
-// generated automatically when calling make.
-// See .pro file as well.
-// ****************************************************************************
-
-extern const char *pCompileInfoTimestamp;
-extern const char *pCompileInfoVersion;
-
diff --git a/compileinfo.sh b/compileinfo.sh
deleted file mode 100755
index 16430ff..0000000
--- a/compileinfo.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-echo '// Automatically generated file. See project file and compileinfo.sh for further information.'
-date '+const char *pCompileInfoTimestamp = "%Y-%m-%d-%H.%M.%S";'
-head -n 1 debian/changelog | awk '{
-                                    Version = $2
-                                    gsub ("\\(", "", Version)
-                                    gsub ("\\)", "", Version)
-                                    print "const char *pCompileInfoVersion   = \"" Version "\";"}'
-
-
diff --git a/config.cpp b/config.cpp
deleted file mode 100644
index 5465f79..0000000
--- a/config.cpp
+++ /dev/null
@@ -1,1172 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Application configuration data
-// ****************************************************************************
-
-#include "common.h"
-
-#include <limits.h>
-#include "proc/sysinfo.h"  // Required in order to get smp_num_cpus for finding out the number of CPUs in the system
-
-#include <qcolor.h>
-#include <qfont.h>
-
-#include "libewf.h"
-
-#include "cfg/toolcfg.h"
-#include "sysinfo/toolsysinfo.h"
-#include "file.h"
-
-#include "qtutil.h"
-#include "config.h"
-
-// ------------------------------------
-//              Constants
-// ------------------------------------
-
-static const char * CMDLINE_OPTION_LOG = "LOG";
-static const char * CMDLINE_OPTION_CFG = "CFG";
-
-static const char * DEFAULT_LOG_FILENAME  = "/var/log/guymager.log";
-static const char * DEFAULT_CFG_FILENAME  = "/etc/guymager/guymager.cfg";
-static const char * TEMPLATE_CFG_FILENAME = "template.cfg";
-
-static const char * CFG_SECTION_GUYMAGER = "GUYMAGER";
-
-static const unsigned char CONFIG_DUMMY_FILL = 0xAA;
-
-static const int CFG_MAX_COMPRESSIONTHREADS = 16;
-
-// ------------------------------------
-//          Type definitions
-// ------------------------------------
-
-
-typedef struct
-{
-   t_CfgData                   CfgData;
-   t_CfgBuffFont               CfgBuffFont;
-   t_CfgBuffColor              CfgBuffColor;
-   t_CfgBuffLocalDevice        CfgBuffLocalDevice;
-   t_CfgBuffDeviceInfoCommand  CfgBuffDeviceInfoCommand;
-   t_CfgBuffDlgAcquireField    CfgBuffDlgAcquireField;
-   t_CfgBuffDlgAcquireRule     CfgBuffDlgAcquireRule;
-   QFont  *                    FontArr [FONTOBJECT_COUNT];
-   QColor *                    ColorArr[COLOR_COUNT];
-   QStringList                 LocalDevices;
-   QStringList                 DeviceInfoCommands;
-   t_CfgDlgAcquireFields       DlgAcquireFields;
-   t_CfgDlgAcquireRules        DlgAcquireRules;
-   QStringList                 DlgAcquireFieldNames;
-} t_CfgLocal;
-
-// ------------------------------------
-//          Global variables
-// ------------------------------------
-
-static t_CfgLocal CfgLocal;
-
-
-// ------------------------------------
-//             Prototypes
-// ------------------------------------
-
-// Start and SaveAndNext prototypes are declared here, as the declaration in the proper header files
-// would require too manu include files for CONFIG.CPP and too much unnecessary recompilation.
-
-
-static APIRET CfgFontStart        (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgFontSaveAndNext                    (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgFontEnd                                             (t_pcchar *ppErrorText);
-
-static APIRET CfgColorStart       (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgColorSaveAndNext                   (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgColorEnd                                            (t_pcchar *ppErrorText);
-
-static APIRET CfgLocalDeviceStart       (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgLocalDeviceSaveAndNext                   (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgLocalDeviceEnd                                            (t_pcchar *ppErrorText);
-
-static APIRET CfgDeviceInfoCommandStart       (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDeviceInfoCommandSaveAndNext                   (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDeviceInfoCommandEnd                                            (t_pcchar *ppErrorText);
-
-static APIRET CfgDlgAcquireFieldStart       (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDlgAcquireFieldSaveAndNext                   (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDlgAcquireFieldEnd                                            (t_pcchar *ppErrorText);
-
-static APIRET CfgDlgAcquireRuleStart       (t_pchar pTableId, long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDlgAcquireRuleSaveAndNext                   (long *pBaseAddr, t_pcchar *ppErrorText);
-static APIRET CfgDlgAcquireRuleEnd                                            (t_pcchar *ppErrorText);
-
-static APIRET CfgIniLang (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText);
-static APIRET CfgIniCPUs (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText);
-static APIRET CfgIniMem  (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText);
-static APIRET CfgIniFifo (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText);
-
-// ------------------------------------
-//     Configuration parameter table
-// ------------------------------------
-
-static t_ToolCfgSet SetArrBoolean[] =
-{
-   // Name in cfg file  Corresponding value
-   // --------------------------------------
-   {  "YES"           , true          },
-   {  "ON"            , true          },
-   {  "TRUE"          , true          },
-   {  "1"             , true          },
-   {  "ENABLED"       , true          },
-   {  "ACTIVATED"     , true          },
-   {  "NO"            , false         },
-   {  "OFF"           , false         },
-   {  "FALSE"         , false         },
-   {  "0"             , false         },
-   {  "DISABLED"      , false         },
-   {  "DEACTIVATED"   , false         },
-   {   NULL           , 0             }
-};
-
-static t_ToolCfgSet SetArrStartupSize[] =
-{
-   // Name in cfg file  Corresponding value
-   // -------------------------------------------
-   {  "STANDARD"      , CFG_STARTUPSIZE_STANDARD  },
-   {  "FULLSCREEN"    , CFG_STARTUPSIZE_FULLSCREEN},
-   {  "MAXIMIZED"     , CFG_STARTUPSIZE_MAXIMIZED },
-   {  "MAXIMISED"     , CFG_STARTUPSIZE_MAXIMIZED },
-   {  "MANUAL"        , CFG_STARTUPSIZE_MANUAL    },
-   {   NULL           , 0                         }
-};
-
-static t_ToolCfgSet SetArrNumberStyle[] =
-{
-   // Name in cfg file  Corresponding value
-   // -------------------------------------------
-   {  "LOCALE"        , CFG_NUMBERSTYLE_LOCALE       },
-   {  "DECIMALCOMMA"  , CFG_NUMBERSTYLE_DECIMAL_COMMA},
-   {  "DECIMALPOINT"  , CFG_NUMBERSTYLE_DECIMAL_POINT},
-   {   NULL           , 0                            }
-};
-
-static t_ToolCfgSet SetArrEntryMode[] =
-{
-   // Name in cfg file  Corresponding value
-   // -------------------------------------------
-   {  "HIDE"          , CFG_ENTRYMODE_HIDE       },
-   {  "SHOWDEFAULT"   , CFG_ENTRYMODE_SHOWDEFAULT},
-   {  "SHOWLAST"      , CFG_ENTRYMODE_SHOWLAST   },
-   {   NULL           , 0                        }
-};
-
-static t_ToolCfgSet SetArrFontObject[] =
-{
-   // Name in cfg file   Corresponding value
-   // --------------------------------------------
-   {  "Menu"           , FONTOBJECT_MENU           },
-   {  "DialogDefault"  , FONTOBJECT_DIALOGDEFAULT  },
-   {   NULL            , 0                         }
-};
-
-static t_ToolCfgSet SetArrColor[] =
-{
-   // Name in cfg file          Corresponding value
-   // ---------------------------------------------------------
-   {  "LocalDevices"          , COLOR_LOCALDEVICES            },
-   {  "StateIdle"             , COLOR_STATE_IDLE              },
-   {  "StateAcquire"          , COLOR_STATE_ACQUIRE           },
-   {  "StateAcquirePaused"    , COLOR_STATE_ACQUIRE_PAUSED    },
-   {  "StateVerify"           , COLOR_STATE_VERIFY            },
-   {  "StateVerifyPaused"     , COLOR_STATE_VERIFY_PAUSED     },
-   {  "StateCleanup"          , COLOR_STATE_CLEANUP           },
-   {  "StateFinished"         , COLOR_STATE_FINISHED          },
-   {  "StateFinishedBadVerify", COLOR_STATE_FINISHED_BADVERIFY},
-   {  "StateAbortedUser"      , COLOR_STATE_ABORTED_USER      },
-   {  "StateAbortedOther"     , COLOR_STATE_ABORTED_OTHER     },
-   {   NULL                   , 0                             }
-};
-
-
-static t_ToolCfgSet SetArrEwfFormat[] =
-{
-   // Name in cfg file   Corresponding value
-   // ------------------------------------------
-   {  "Encase1",         LIBEWF_FORMAT_ENCASE1},
-   {  "Encase2",         LIBEWF_FORMAT_ENCASE2},
-   {  "Encase3",         LIBEWF_FORMAT_ENCASE3},
-   {  "Encase4",         LIBEWF_FORMAT_ENCASE4},
-   {  "Encase5",         LIBEWF_FORMAT_ENCASE5},
-   {  "Encase6",         LIBEWF_FORMAT_ENCASE6},
-   {  "Smart"  ,         LIBEWF_FORMAT_SMART  },
-   {  "FTK"    ,         LIBEWF_FORMAT_FTK    },
-   {  "Linen5" ,         LIBEWF_FORMAT_LINEN5 },
-   {  "Linen6" ,         LIBEWF_FORMAT_LINEN6 },
-   {  "LVF"    ,         LIBEWF_FORMAT_LVF    },
-   {   NULL    ,         0                    }
-};
-
-
-static t_ToolCfgSet SetArrFormat[] =
-{
-   // Name in cfg file   Corresponding value
-   // ------------------------------------------
-   {  "DD"     ,         t_File::DD },
-   {  "EWF"    ,         t_File::EWF},
-   {  "AFF"    ,         t_File::AFF},
-   {   NULL    ,         0          }
-};
-
-
-static t_ToolCfgSet SetArrEwfCompression[] =
-{
-   // Name in cfg file  Corresponding value
-   // ----------------------------------------
-   {  "None",           LIBEWF_COMPRESSION_NONE},
-   {  "Fast",           LIBEWF_COMPRESSION_FAST},
-   {  "Best",           LIBEWF_COMPRESSION_BEST},
-   {   NULL ,           0                      }
-};
-
-#define CONFIG_COMPRESSIONTHREADS_AUTO -1
-static t_ToolCfgSet SetArrCompressionThreads[] =
-{
-   // Name in cfg file  Corresponding value
-   // ----------------------------------------
-   {  "Auto",           CONFIG_COMPRESSIONTHREADS_AUTO},
-   {   "0",              0  },  // Do not remove, this value will force guymager to use the non-paralellised functions of libewf
-   {   "1",              1  },
-   {   "2",              2  },
-   {   "3",              3  },
-   {   "4",              4  },
-   {   "5",              5  },
-   {   "6",              6  },
-   {   "7",              7  },
-   {   "8",              8  },
-   {   "9",              9  },
-   {  "10",             10  },
-   {  "11",             11  },
-   {  "12",             12  },
-   {  "13",             13  },
-   {  "14",             14  },
-   {  "15",             15  },
-   {  "16",             16  },
-   {   NULL ,            0  }
-};
-
-
-#define ELT(Elt)      ((long) &CfgLocal.CfgData.Elt)
-#define ELT_SIZ(Elt)  ELT(Elt), (sizeof (CfgLocal.CfgData.Elt)-1)                      // for strings only, thus substract 1 byte (for terminating 0)
-#define INIARR(Arr)   ((t_pToolCfgSet) (t_pvoid)&Arr)
-
-
-//lint -e545     Suspicious use of &
-
-static t_ToolCfgParamDesc CfgParamDescArr[] =
-{
-   // Assignment             CallOn       ParameterName                      Type             DestinationAddress                                Len      Min      Max  SetArray
-   // see t_CfgAssignment    InitFn       in cfg file                        see t_CfgType    type is t_uint                                                           (CFGTYPE_SET only)
-   // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-   {CFGASSIGN_CMD          , NULL       , {CMDLINE_OPTION_LOG              , CFGTYPE_NULL   , 0                                  ,                0,       0,       0, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_CMD          , NULL       , {CMDLINE_OPTION_CFG              , CFGTYPE_NULL   , 0                                  ,                0,       0,       0, NULL                            }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, CfgIniLang , {"Language"                      , CFGTYPE_STRING , ELT_SIZ(Language)                  ,                         0,       0, NULL                            }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"StartupSize"                   , CFGTYPE_SET    , ELT(StartupSize)                   ,                0,       0,       0, INIARR(SetArrStartupSize)       }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"StartupSizeManualX"            , CFGTYPE_INTEGER, ELT(StartupSizeManualX            ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"StartupSizeManualY"            , CFGTYPE_INTEGER, ELT(StartupSizeManualY            ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"StartupSizeManualDx"           , CFGTYPE_INTEGER, ELT(StartupSizeManualDx           ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"StartupSizeManualDy"           , CFGTYPE_INTEGER, ELT(StartupSizeManualDy           ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FileDialogSize"                , CFGTYPE_SET    , ELT(FileDialogSize)                ,                0,       0,       0, INIARR(SetArrStartupSize)       }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FileDialogSizeManualDx"        , CFGTYPE_INTEGER, ELT(FileDialogSizeManualDx        ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FileDialogSizeManualDy"        , CFGTYPE_INTEGER, ELT(FileDialogSizeManualDy        ),                0,       0,    3000, NULL                            }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"NumberStyle"                   , CFGTYPE_SET    , ELT(NumberStyle)                   ,                0,       0,       0, INIARR(SetArrNumberStyle)       }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"ScreenRefreshInterval"         , CFGTYPE_INTEGER, ELT(ScreenRefreshInterval         ),                0,       1, 8640000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"UseFileDialogFromQt"           , CFGTYPE_SET    , ELT(UseFileDialogFromQt)           ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"DefaultFormat"                 , CFGTYPE_SET    , ELT(DefaultFormat)                 ,                0,       0,       0, INIARR(SetArrFormat)            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"EwfFormat"                     , CFGTYPE_SET    , ELT(EwfFormat     )                ,                0,       0,       0, INIARR(SetArrEwfFormat     )    }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"EwfCompression"                , CFGTYPE_SET    , ELT(EwfCompression)                ,                0,       0,       0, INIARR(SetArrEwfCompression)    }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"AffCompression"                , CFGTYPE_INTEGER, ELT(AffCompression)                ,                0,       1,       9, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"AffMarkBadSectors"             , CFGTYPE_SET    , ELT(AffMarkBadSectors)             ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"EwfSegmentSize"                , CFGTYPE_INTEGER, ELT(EwfSegmentSize)                ,                0,       1,    2047, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"SpecialFilenameChars"          , CFGTYPE_STRING , ELT_SIZ(SpecialFilenameChars)      ,                         0,       0, NULL                            }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"ScanUsingDbusHal"              , CFGTYPE_SET    , ELT(ScanUsingDbusHal)              ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"ScanInterval"                  , CFGTYPE_INTEGER, ELT(ScanInterval                  ),                0,       1, 8640000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"CommandGetSerialNumber"        , CFGTYPE_STRING , ELT_SIZ(CommandGetSerialNumber    ),                         0,       0, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FifoBlockSizeDD"               , CFGTYPE_INTEGER, ELT(FifoBlockSizeDD               ),                0,       0,99999999, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FifoBlockSizeEWF"              , CFGTYPE_INTEGER, ELT(FifoBlockSizeEWF              ),                0,       0,99999999, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"FifoBlockSizeAFF"              , CFGTYPE_INTEGER, ELT(FifoBlockSizeAFF              ),                0,       0,99999999, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, CfgIniMem  , {"FifoMaxMem"                    , CFGTYPE_INTEGER, ELT(FifoMaxMem                    ),                0,       0, 1000000, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, CfgIniFifo , {"FifoMaxEntries"                , CFGTYPE_INTEGER, ELT(FifoMaxEntries                ),                0,       0, 9999999, NULL                            }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"UseSeparateHashThread"         , CFGTYPE_SET    , ELT(UseSeparateHashThread)         ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, CfgIniCPUs , {"CompressionThreads"            , CFGTYPE_SET    , ELT(CompressionThreads)            ,                0,       0,    1024, INIARR(SetArrCompressionThreads)}, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"SignalHandling"                , CFGTYPE_SET    , ELT(SignalHandling)                ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"WriteToDevNull"                , CFGTYPE_SET    , ELT(WriteToDevNull)                ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"UseMemWatch"                   , CFGTYPE_SET    , ELT(UseMemWatch)                   ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"VerboseLibewf"                 , CFGTYPE_SET    , ELT(VerboseLibewf)                 ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {"CheckEwfData"                  , CFGTYPE_SET    , ELT(CheckEwfData)                  ,                0,       0,       0, INIARR(SetArrBoolean)           }, CFG_FILLUP_FORLINT},
-
-   {CFGASSIGN_BOTH_MULTIPLE, NULL       , {NULL                            ,(t_ToolCfgType)0,                                   0,                0,       0,       0, 0                               }, CFG_FILLUP_FORLINT}
-};
-
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                             TABLE: Languages
-// ----------------------------------------------------------------------------------------------------------------------
-
-//static t_pCfgBuffLanguage pLanguage = NULL;
-//#undef  ELT
-//#undef  ELT_SIZ
-//#define ELT_SIZ(Elt)  (long)&pLanguage->Elt, sizeof (pLanguage->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-//
-//static t_ToolCfgDataDesc CfgDescArrLanguage [] =
-//{
-//   // ParameterName   Type (see       DestinationOfs     Len  Min Max  SetArray
-//   // in cfg file     t_ToolCfgType)  type is long                     (CFGTYPE_SET only)
-//   // -----------------------------------------------------------------------------------
-//   {  "Code",         CFGTYPE_STRING , ELT_SIZ(Code)        ,   0,  0, NULL       },
-//   {  "Name",         CFGTYPE_STRING , ELT_SIZ(AsciiName)   ,   0,  0, NULL       },
-//   {  NULL  ,         CFGTYPE_NULL   , 0,                  0,   0,  0, NULL       }
-//};
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: Fonts
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffFont pFont0 = NULL;
-#undef  ELT
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pFont0->Elt)
-#define ELT_SIZ(Elt)  (long)&pFont0->Elt, sizeof (pFont0->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-
-static t_ToolCfgDataDesc CfgDescArrFont[] =
-{
-   // ParameterName Type (see       DestinationOfs   Len  Min  Max  SetArray
-   // in cfg file   t_ToolCfgType)  type is long                    (CFGTYPE_SET only)
-   // --------------------------------------------------------------------------------
-   {  "Object",     CFGTYPE_SET    , ELT(Object)  ,    0,   0,   0, SetArrFontObject},
-   {  "Family",     CFGTYPE_STRING , ELT_SIZ(Family)    ,   0,   0, NULL            },
-   {  "Size",       CFGTYPE_INTEGER, ELT(Size)    ,    0,   0, 100, NULL            },
-   {  "Weight",     CFGTYPE_INTEGER, ELT(Weight)  ,    0,   0, 100, NULL            },
-   {  "Italic",     CFGTYPE_SET    , ELT(Italic)  ,    0,   0,   0, SetArrBoolean   },
-   {  NULL  ,       CFGTYPE_NULL   , 0            ,    0,   0,   0, NULL            }
-};
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: Colors
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffColor pColor0 = NULL;
-#undef  ELT
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pColor0->Elt)
-
-static t_ToolCfgDataDesc CfgDescArrColor[] =
-{
-   // ParameterName Type (see       DestinationOfs   Len  Min  Max  SetArray
-   // in cfg file   t_ToolCfgType)  type is long                    (CFGTYPE_SET only)
-   // --------------------------------------------------------------------------------
-   {  "Color",      CFGTYPE_SET    , ELT(Color)   ,    0,   0,   0, SetArrColor     },
-   {  "R",          CFGTYPE_INTEGER, ELT(R)       ,    0,   0, 255, NULL            },
-   {  "G",          CFGTYPE_INTEGER, ELT(G)       ,    0,   0, 255, NULL            },
-   {  "B",          CFGTYPE_INTEGER, ELT(B)       ,    0,   0, 255, NULL            },
-   {  NULL  ,       CFGTYPE_NULL   , 0            ,    0,   0,   0, NULL            }
-};
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: LocalDevices
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffLocalDevice pLoc0 = NULL;
-#undef  ELT
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pLoc0->Elt)
-#define ELT_SIZ(Elt)  (long)&pLoc0->Elt, sizeof (pLoc0->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-
-static t_ToolCfgDataDesc CfgDescArrLocalDevice[] =
-{
-   // ParameterName Type (see       DestinationOfs   Len  Min  Max  SetArray
-   // in cfg file   t_ToolCfgType)  type is long                    (CFGTYPE_SET only)
-   // --------------------------------------------------------------------------------
-   {  "Device",     CFGTYPE_STRING , ELT_SIZ(Device)    ,   0,   0, NULL            },
-   {  NULL  ,       CFGTYPE_NULL   , 0            ,    0,   0,   0, NULL            }
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: DeviceInfoCommands
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffDeviceInfoCommand pCmd0 = NULL;
-#undef  ELT                               //lint !e750: local macro 'ELT' not referenced
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pCmd0->Elt)
-#define ELT_SIZ(Elt)  (long)&pCmd0->Elt, sizeof (pCmd0->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-
-static t_ToolCfgDataDesc CfgDescArrDeviceInfoCommand[] =
-{
-   // ParameterName Type (see       DestinationOfs   Len  Min  Max  SetArray
-   // in cfg file   t_ToolCfgType)  type is long                    (CFGTYPE_SET only)
-   // --------------------------------------------------------------------------------
-   {  "Command",    CFGTYPE_STRING , ELT_SIZ(Command)   ,   0,   0, NULL            },
-   {  NULL  ,       CFGTYPE_NULL   , 0            ,    0,   0,   0, NULL            }
-};
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: DlgAcquireField
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffDlgAcquireField pFld0 = NULL;
-#undef  ELT                               //lint !e750: local macro 'ELT' not referenced
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pFld0->Elt)
-#define ELT_SIZ(Elt)  (long)&pFld0->Elt, sizeof (pFld0->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-
-static t_ToolCfgDataDesc CfgDescArrDlgAcquireField[] =
-{
-   // ParameterName   Type (see        DestinationOfs    Len  Min  Max  SetArray
-   // in cfg file     t_ToolCfgType)   type is long                     (CFGTYPE_SET only)
-   // ------------------------------------------------------------------------------------
-   {  "FieldName"   , CFGTYPE_STRING , ELT_SIZ(FieldName)   ,   0,   0, NULL           },
-   {  "EntryMode"   , CFGTYPE_SET    , ELT(EntryMode)   ,  0,   0,   0, SetArrEntryMode},
-   {  "DefaultValue", CFGTYPE_STRING , ELT_SIZ(DefaultValue),   0,   0, NULL           },
-   {  NULL          , CFGTYPE_NULL   , 0                ,  0,   0,   0, NULL           }
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                               TABLE: DlgAcquireRule
-// ----------------------------------------------------------------------------------------------------------------------
-
-static t_pCfgBuffDlgAcquireRule pFil0 = NULL;
-#undef  ELT                               //lint !e750: local macro 'ELT' not referenced
-#undef  ELT_SIZ
-#define ELT(Elt)     ((long)&pFil0->Elt)
-#define ELT_SIZ(Elt)  (long)&pFil0->Elt, sizeof (pFil0->Elt)-1  // for strings only, thus substract 1 byte (for terminating 0)
-
-static t_ToolCfgDataDesc CfgDescArrDlgAcquireRule[] =
-{
-   // ParameterName           Type (see        DestinationOfs        Len  Min  Max  SetArray
-   // in cfg file             t_ToolCfgType)   type is long                        (CFGTYPE_SET only)
-   // -----------------------------------------------------------------------------------------------
-   {  "TriggerFieldName"    , CFGTYPE_STRING , ELT_SIZ(TriggerFieldName),   0,   0, NULL           },
-   {  "DestinationFieldName", CFGTYPE_STRING , ELT_SIZ(DestFieldName)   ,   0,   0, NULL           },
-   {  "Value"               , CFGTYPE_STRING , ELT_SIZ(Value)           ,   0,   0, NULL           },
-   {  NULL                  , CFGTYPE_NULL   , 0                   ,   0,   0,   0, NULL           }
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-//                                                      Table descriptor
-// ----------------------------------------------------------------------------------------------------------------------
-
-#undef  ELT       //lint !e750: local macro 'ELT' not referenced
-#undef  ELT_SIZ
-
-static t_ToolCfgTableDesc CfgTableDescArr[] =
-{
-   // Tabletype            StartFn                        SaveAndNextFn                       EndFn                       pDataDescArray
-   // -----------------------------------------------------------------------------------------------------------------------------------------------------
-//   {"Languages"         , &LanguageStart              , &LanguageSaveAndNext              , LanguageEnd              , &CfgDescArrLanguage          [0]},
-   {"Fonts"              , &CfgFontStart               , &CfgFontSaveAndNext               , CfgFontEnd               , &CfgDescArrFont              [0]},
-   {"Colors"             , &CfgColorStart              , &CfgColorSaveAndNext              , CfgColorEnd              , &CfgDescArrColor             [0]},
-   {"LocalDevices"       , &CfgLocalDeviceStart        , &CfgLocalDeviceSaveAndNext        , CfgLocalDeviceEnd        , &CfgDescArrLocalDevice       [0]},
-   {"DeviceInfoCommands" , &CfgDeviceInfoCommandStart  , &CfgDeviceInfoCommandSaveAndNext  , CfgDeviceInfoCommandEnd  , &CfgDescArrDeviceInfoCommand [0]},
-   {"DlgAcquireField"    , &CfgDlgAcquireFieldStart    , &CfgDlgAcquireFieldSaveAndNext    , CfgDlgAcquireFieldEnd    , &CfgDescArrDlgAcquireField   [0]},
-   {"DlgAcquireRule"     , &CfgDlgAcquireRuleStart     , &CfgDlgAcquireRuleSaveAndNext     , CfgDlgAcquireRuleEnd     , &CfgDescArrDlgAcquireRule    [0]},
-   {NULL                 , NULL                        , NULL                              , NULL                     , NULL                            }
-};
-
-//lint +e545     Suspicious use of &
-
-// ------------------------------------
-//              Functions
-// ------------------------------------
-
-t_pCfgData CfgGetpData (void)
-{
-   return &CfgLocal.CfgData;
-}
-
-APIRET CfgReadConfiguration (t_pcchar pCfgFileName)
-{
-   t_ToolSysInfoMacAddr  MacAddr;
-   QString               DeskModel;
-   QString               MacAddrSectionName;
-   APIRET                rc;
-
-   // Section name for MAC address (MACADDR_11BB33CC55DD)
-   // ---------------------------------------------------
-   rc = ToolSysInfoGetMacAddr (&MacAddr);
-   if (rc == TOOLSYSINFO_ERROR_NO_ADDR)
-   {
-      LOG_INFO ("MAC network hardware address: none found")
-   }
-   else
-   {
-      CHK (rc)
-      LOG_INFO ("MAC network hardware address: %s", &MacAddr.AddrStr[0])
-      MacAddrSectionName  = "MACADDR_";
-      MacAddrSectionName += &MacAddr.AddrStr[0];
-      CHK (ToolCfgAddGlobalSectionName (QSTR_TO_PSZ(MacAddrSectionName)))
-   }
-   CHK (ToolCfgAddGlobalSectionName (CFG_SECTION_GUYMAGER))
-   CHK (ToolCfgScanConfiguration (pCfgFileName, "", &CfgParamDescArr[0], &CfgTableDescArr[0]))
-   CHK (ToolCfgLogConfiguration (CfgParamDescArr))
-
-   return NO_ERROR;
-}
-
-// ----------------------------------
-//       CallOnInit functions
-// ----------------------------------
-
-APIRET CfgIniLang (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText)
-{
-   QString Language = CONFIG(Language);
-
-   *ppErrorText = NULL;
-   if (Language.compare ("AUTO", Qt::CaseInsensitive) == 0)
-   {
-      QString LocaleName = QLocale::system().name();
-      QString Language = LocaleName.split('_')[0];
-      snprintf (CONFIG(Language), sizeof(CONFIG(Language)), "%s", QSTR_TO_PSZ(Language));
-
-      LOG_INFO ("Parameter %s set to 'AUTO', switching to language '%s'", pCfgParamDesc->DataDesc.pName, CONFIG(Language))
-   }
-   return NO_ERROR;
-}
-
-APIRET CfgIniCPUs (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText)
-{
-   t_pcchar pParamName;
-
-   *ppErrorText = NULL;
-   pParamName = pCfgParamDesc->DataDesc.pName;
-
-   if (CONFIG (CompressionThreads) == CONFIG_COMPRESSIONTHREADS_AUTO)
-   {
-      LOG_INFO ("Parameter %s set to AUTO; %ld CPUs detected", pParamName, smp_num_cpus)
-      CONFIG (CompressionThreads) = smp_num_cpus;
-      if (smp_num_cpus > CFG_MAX_COMPRESSIONTHREADS)
-      {
-         CONFIG (CompressionThreads) = CFG_MAX_COMPRESSIONTHREADS;
-         LOG_INFO ("Maximum value for %s is %d", pParamName, CFG_MAX_COMPRESSIONTHREADS)
-      }
-      LOG_INFO ("Setting %s to %d.", pParamName, CONFIG (CompressionThreads))
-   }
-
-   return NO_ERROR;
-}
-
-APIRET CfgIniMem (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText)
-{
-   t_pcchar pParamName;
-
-   *ppErrorText = NULL;
-   pParamName = pCfgParamDesc->DataDesc.pName;
-
-   meminfo();
-   if (CONFIG (FifoMaxMem) == 0)
-   {
-      CONFIG (FifoMaxMem) = std::max (1, (int)(kb_main_total / (6*1024))); // Use one sixth of the available mem, convert KB to MB
-      LOG_INFO ("Parameter %s set to 0 (auto); %lu MB of RAM detected.", pParamName, kb_main_total/1024)
-      LOG_INFO ("Setting %s to %d.", pParamName, CONFIG (FifoMaxMem))
-   }
-
-   return NO_ERROR;
-}
-
-APIRET CfgIniFifo (t_pToolCfgParamDesc pCfgParamDesc, t_pchar *ppErrorText)
-{
-   t_pcchar pParamName;
-
-   *ppErrorText = NULL;
-   pParamName = pCfgParamDesc->DataDesc.pName;
-
-   meminfo();
-   if (CONFIG (FifoMaxEntries) == 0)
-   {
-      CONFIG (FifoMaxEntries) = 8;
-      LOG_INFO ("Parameter %s set to 0 (auto); setting it to %d.", pParamName, CONFIG (FifoMaxEntries))
-   }
-
-   return NO_ERROR;
-}
-
-// ----------------------------------
-//  LOG and CFG command line options
-// ----------------------------------
-
-APIRET CfgGetLogFileName (t_pcchar *ppLogFileName, bool *pDefaultUsed)
-{
-   APIRET rc;
-   bool   Def;
-
-   Def = false;
-   rc = ToolCfgGetCmdLineOption (CMDLINE_OPTION_LOG, ppLogFileName);
-   if (rc == TOOLCFG_ERROR_CMDLINE_OPTION_NOT_FOUND)
-   {
-      *ppLogFileName = DEFAULT_LOG_FILENAME;
-      Def = true;
-   }
-   else
-   {
-      CHK (rc)
-   }
-   if (pDefaultUsed)
-      *pDefaultUsed = Def;
-
-   return NO_ERROR;
-}
-
-APIRET CfgGetCfgFileName (t_pcchar *ppCfgFileName, bool *pDefaultUsed)
-{
-   APIRET    rc;
-   bool      Def;
-   t_pcchar pVersion;
-
-   Def = false;
-   rc = ToolCfgGetCmdLineOption (CMDLINE_OPTION_CFG, ppCfgFileName);  // Try to get the configuration file name
-   if (rc == TOOLCFG_ERROR_CMDLINE_OPTION_NOT_FOUND)
-   {
-      *ppCfgFileName = DEFAULT_CFG_FILENAME;                          // Use default if not found
-      Def = true;
-   }
-   else
-   {
-      CHK (rc)
-      if(strcasecmp(*ppCfgFileName, "template") == 0)
-      {
-          pVersion = "Version unknown";
-          CHK (ToolCfgBuildTemplate (TEMPLATE_CFG_FILENAME, pVersion, CFG_SECTION_GUYMAGER, &CfgParamDescArr[0], &CfgTableDescArr[0]))
-          return ERROR_CFG_ONLY_TEMPLATE_GENERATED;
-      }
-   }
-   if (pDefaultUsed)
-      *pDefaultUsed = Def;
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//                Fonts
-// ------------------------------------
-
-static APIRET CfgFontStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   *pBaseAddr = (long) &CfgLocal.CfgBuffFont;
-   *ppErrorText = NULL;
-   return NO_ERROR;
-}
-
-static APIRET CfgFontSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   t_pCfgBuffFont pCfg;
-   QFont         *pFont;
-   QFont        **ppFontDest;
-//   QFontInfo     *pFontInfo;
-   const char      *pObjectName;
-
-   pCfg = &CfgLocal.CfgBuffFont;
-   pFont = new QFont (pCfg->Family, pCfg->Size, pCfg->Weight, (bool)pCfg->Italic);
-   ppFontDest = &CfgLocal.FontArr[pCfg->Object];
-   if (*ppFontDest)            // This might happen if a fonts figures more
-      delete *ppFontDest;      // than once in the configuration
-   *ppFontDest = pFont;
-
-   CHK (ToolCfgGetSetString (&SetArrFontObject[0], pCfg->Object, &pObjectName))
-
-   LOG_INFO ("Font object %15s: Requested: %20s Size %2d Weight %2d %-8s",
-              pObjectName,
-              pCfg->Family, pCfg->Size, pCfg->Weight,
-              pCfg->Italic ? "Italic" : "NoItalic")
-//   pFontInfo = new QFontInfo (*pFont);
-//   LOG_INFO ("                             Returned : %20s Size %2d Weight %2d %-8s PixelSize %d %s %s %s",
-//              pFontInfo->family    ().toAscii().constData(),
-//              pFontInfo->pointSize (),
-//              pFontInfo->weight    (),
-//              pFontInfo->italic    () ? "Italic" : "NoItalic",
-//
-//              pFontInfo->pixelSize (),
-//              pFontInfo->fixedPitch() ? "FixedPitch" : "NoFixedPitch",
-//              pFontInfo->rawMode   () ? "RawMode"    : "NoRawMode"   ,
-//              pFontInfo->exactMatch() ? "ExactMatch" : "NoxactMatch" );
-//   delete pFontInfo;
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffFont;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgFontEnd (t_pcchar *ppErrorText)
-{
-   const char *pObjectName;
-   int          i;
-
-   *ppErrorText = NULL;
-   for (i=0; i<FONTOBJECT_COUNT; i++)
-   {
-      if (CfgLocal.FontArr[i] == NULL)
-      {
-         CHK (ToolCfgGetSetString (&SetArrFontObject[0], i, &pObjectName))
-//         CHK (CfgFontGetObjectName (i, &pObjectName))
-         LOG_INFO ("Font settings for object '%s' are missing", pObjectName)
-         *ppErrorText = "The table is incomplete, some fonts are missing";
-      }
-   }
-
-   return NO_ERROR;
-}
-
-QFont *CfgGetpFont (t_CfgFontObject Object)
-{
-   if ((Object >= 0) && (Object < FONTOBJECT_COUNT))   //lint !e568: non-negative quantity is never less than zero
-        return (CfgLocal.FontArr[Object]);
-   else return NULL;
-}
-
-static APIRET CfgDestroyFonts (void)
-{
-   int i;
-
-   for (i=0; i<FONTOBJECT_COUNT; i++)
-   {
-      if (CfgLocal.FontArr[i])
-         delete CfgLocal.FontArr[i];
-   }
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//               Colors
-// ------------------------------------
-
-static APIRET CfgColorStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   int i;
-
-   for (i=0; i<COLOR_COUNT; i++)
-      CfgLocal.ColorArr[i] = NULL;
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffColor;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgColorSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   t_pCfgBuffColor pCfg;
-   QColor         *pColor;
-
-   pCfg = &CfgLocal.CfgBuffColor;
-   pColor = new QColor (pCfg->R, pCfg->G, pCfg->B);
-   CfgLocal.ColorArr[pCfg->Color] = pColor;
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffColor;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgColorEnd (t_pcchar *ppErrorText)
-{
-   const char *pName;
-   int          i;
-
-   *ppErrorText = NULL;
-   for (i=0; i<COLOR_COUNT; i++)
-   {
-      if (CfgLocal.ColorArr[i] == NULL)
-      {
-         CHK (ToolCfgGetSetString (&SetArrColor[0], i, &pName))
-         LOG_INFO ("Color settings for object '%s' are missing", pName)
-         *ppErrorText = "The table is incomplete, some colors are missing";
-      }
-   }
-
-   return NO_ERROR;
-}
-
-const QColor *CfgGetpColor (t_CfgColor Color)
-{
-   if (Color == COLOR_DEFAULT)
-   {
-      return &QtUtilColorDefault;
-   }
-   else
-   {
-      if ((Color >= 0) && (Color < COLOR_COUNT))          //lint !e568: non-negative quantity is never less than zero
-           return (CfgLocal.ColorArr[Color]);
-      else return NULL;
-   }
-}
-
-static APIRET CfgDestroyColors (void)
-{
-   int i;
-
-   for (i=0; i<COLOR_COUNT; i++)
-   {
-      if (CfgLocal.ColorArr[i])
-         delete CfgLocal.ColorArr[i];
-   }
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//            LocalDevices
-// ------------------------------------
-
-static APIRET CfgLocalDeviceStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   CfgLocal.LocalDevices.clear();
-   *pBaseAddr = (long) &CfgLocal.CfgBuffLocalDevice;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgLocalDeviceSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   QString Device;
-
-   Device = CfgLocal.CfgBuffLocalDevice.Device;
-
-   if (CfgLocal.LocalDevices.contains (Device))
-   {
-      *ppErrorText = "This device figures twice in the table of local devices";
-   }
-   else
-   {
-      CfgLocal.LocalDevices.append (Device);
-      *ppErrorText = NULL;
-   }
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffLocalDevice;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgLocalDeviceEnd (t_pcchar *ppErrorText)
-{
-   *ppErrorText = NULL;
-   return NO_ERROR;
-}
-
-APIRET CfgGetLocalDevices (QStringList **ppLocalDevices)
-{
-   *ppLocalDevices = &CfgLocal.LocalDevices;
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//         DeviceInfoCommands
-// ------------------------------------
-
-static APIRET CfgDeviceInfoCommandStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   CfgLocal.DeviceInfoCommands.clear();
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDeviceInfoCommand;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDeviceInfoCommandSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   QString Command;
-
-   Command = CfgLocal.CfgBuffDeviceInfoCommand.Command;
-
-   if (CfgLocal.DeviceInfoCommands.contains (Command))
-   {
-      *ppErrorText = "This command figures twice in the table DeviceInfoCommands";
-   }
-   else
-   {
-      CfgLocal.DeviceInfoCommands.append (Command);
-      *ppErrorText = NULL;
-   }
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDeviceInfoCommand;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDeviceInfoCommandEnd (t_pcchar *ppErrorText)
-{
-   *ppErrorText = NULL;
-   return NO_ERROR;
-}
-
-APIRET CfgGetDeviceInfoCommands (QStringList **ppDeviceInfoCommands)
-{
-   *ppDeviceInfoCommands = &CfgLocal.DeviceInfoCommands;
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//           DlgAcquireField
-// ------------------------------------
-
-static APIRET CfgInitializeDlgAcquireFieldNames (void)
-{
-   if (CfgLocal.DlgAcquireFieldNames.count() == 0)
-   {
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_EWF_CASENUMBER;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_EWF_EVIDENCENUMBER;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_EWF_EXAMINER;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_EWF_DESCRIPTION;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_EWF_NOTES;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_DEST_IMAGEFILENAME;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_DEST_INFODIRECTORY;
-      CfgLocal.DlgAcquireFieldNames += CFG_DLGACQUIRE_DEST_INFOFILENAME;
-   }
-   return NO_ERROR;
-}
-
-static APIRET CfgDestroyDlgAcquireFields (void)
-{
-   for (int i=0; i<CfgLocal.DlgAcquireFields.count(); i++)
-      delete CfgLocal.DlgAcquireFields[i];
-
-   CfgLocal.DlgAcquireFields.clear();
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireFieldStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   CHK (CfgInitializeDlgAcquireFieldNames ())
-   CHK (CfgDestroyDlgAcquireFields())
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDlgAcquireField;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireFieldSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   t_pCfgBuffDlgAcquireField pBuff;
-   t_pCfgDlgAcquireField     pField;
-
-   *ppErrorText = NULL;
-   pBuff = &CfgLocal.CfgBuffDlgAcquireField;
-
-   if (strcmp(pBuff->FieldName, CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY_ALT) == 0)  // For compatibility. Treat the old, common (image and info)
-      strcpy (pBuff->FieldName, CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY);           // directory name just like the new image directory name
-
-   if (CfgLocal.DlgAcquireFieldNames.contains(pBuff->FieldName))
-   {
-      for (int i=0; i<CfgLocal.DlgAcquireFields.count(); i++)
-      {
-         if (CfgLocal.DlgAcquireFields[i]->FieldName == pBuff->FieldName)
-         {
-            *ppErrorText = "This field name figures twice in the table";
-            return NO_ERROR;
-         }
-      }
-      pField = new (t_CfgDlgAcquireField);
-      pField->FieldName    = pBuff->FieldName;
-      pField->EntryMode    = pBuff->EntryMode;
-      pField->DefaultValue = pBuff->DefaultValue;
-      pField->pLineEdit    = NULL;
-      pField->EwfField = pField->FieldName.startsWith (CFG_DLGACQUIRE_EWF_FIELDID, Qt::CaseInsensitive);
-      pField->DstField = pField->FieldName.startsWith (CFG_DLGACQUIRE_DST_FIELDID, Qt::CaseInsensitive);
-      pField->DirField = pField->FieldName.contains   (CFG_DLGACQUIRE_DIR_FIELDID, Qt::CaseInsensitive);
-
-      CfgLocal.DlgAcquireFields.append (pField);
-   }
-   else
-   {
-      *ppErrorText = "Unknown field name";
-   }
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDlgAcquireField;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireFieldEnd (t_pcchar *ppErrorText)
-{
-   bool Found = true;
-
-   *ppErrorText = NULL;
-
-   for (int i=0; i<CfgLocal.DlgAcquireFieldNames.count() && Found; i++)
-   {
-      Found = false;
-      for (int j=0; j<CfgLocal.DlgAcquireFields.count() && !Found; j++)
-         Found = (CfgLocal.DlgAcquireFields[j]->FieldName.compare(CfgLocal.DlgAcquireFieldNames[i], Qt::CaseInsensitive) == 0);
-      if (!Found)
-      {
-         LOG_INFO ("No entry for field %s found", QSTR_TO_PSZ(CfgLocal.DlgAcquireFieldNames[i]))
-         *ppErrorText = "ENDTABLE statement reached, but some table entries are missing (see log output above)";
-      }
-   }
-
-   return NO_ERROR;
-}
-
-APIRET CfgGetDlgAcquireFields (t_pCfgDlgAcquireFields *ppDlgAcquireFields)
-{
-   *ppDlgAcquireFields = &CfgLocal.DlgAcquireFields;
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//            DlgAcquireRule
-// ------------------------------------
-
-static APIRET CfgDestroyDlgAcquireRules (void)
-{
-   for (int i=0; i<CfgLocal.DlgAcquireRules.count(); i++)
-      delete CfgLocal.DlgAcquireRules[i];
-
-   CfgLocal.DlgAcquireRules.clear();
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireRuleStart (t_pchar /*pTableId*/, long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   CHK (CfgInitializeDlgAcquireFieldNames ())
-   CHK (CfgDestroyDlgAcquireRules ())
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDlgAcquireRule;
-   *ppErrorText = NULL;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireRuleSaveAndNext (long *pBaseAddr, t_pcchar *ppErrorText)
-{
-   t_pCfgBuffDlgAcquireRule pBuff;
-   t_pCfgDlgAcquireRule     pRule;
-
-   *ppErrorText = NULL;
-   pBuff = &CfgLocal.CfgBuffDlgAcquireRule;
-
-   if (!CfgLocal.DlgAcquireFieldNames.contains(pBuff->TriggerFieldName))
-   {
-      printf ("\n%s", pBuff->TriggerFieldName);
-      *ppErrorText = "Unknown trigger field name";
-   }
-   else if (!CfgLocal.DlgAcquireFieldNames.contains(pBuff->DestFieldName))
-   {
-      *ppErrorText = "Unknown destination field name";
-   }
-   else
-   {
-      pRule = new (t_CfgDlgAcquireRule);
-      pRule->TriggerFieldName = pBuff->TriggerFieldName;
-      pRule->DestFieldName    = pBuff->DestFieldName;
-      pRule->Value            = pBuff->Value;
-      CfgLocal.DlgAcquireRules.append (pRule);
-   }
-
-   *pBaseAddr = (long) &CfgLocal.CfgBuffDlgAcquireRule;
-
-   return NO_ERROR;
-}
-
-static APIRET CfgDlgAcquireRuleEnd (t_pcchar *ppErrorText)
-{
-   *ppErrorText = NULL;
-   return NO_ERROR;
-}
-
-APIRET CfgGetDlgAcquireRules (t_pCfgDlgAcquireRules *ppDlgAcquireRules)
-{
-   *ppDlgAcquireRules = &CfgLocal.DlgAcquireRules;
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//          Unicode translation
-// ------------------------------------
-
-APIRET ConfigTranslateUnicodeEscape (char *pSrc, QString *pDest)
-{
-   char *pCh;
-   int    UnicodeChar;
-   int    Digit;
-
-   for (pCh=pSrc; *pCh != '\0'; pCh++)
-   {
-      if (*pCh == '\\')
-      {
-         pCh++;
-         if (*pCh == '\\')
-         {
-            (*pDest) += *pCh;
-         }
-         else
-         {
-            UnicodeChar = 0;
-            while (*pCh != ';')
-            {
-               if      (*pCh >= 'a')  Digit = *pCh - 'a' +10;
-               else if (*pCh >= 'A')  Digit = *pCh - 'A' +10;
-               else                   Digit = *pCh - '0';
-               UnicodeChar = UnicodeChar*16 + Digit;
-               pCh++;
-            }
-            (*pDest) += QChar (UnicodeChar);
-         }
-      }
-      else
-      {
-         (*pDest) += *pCh;
-      }
-   }
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//       Module initialisation
-// ------------------------------------
-
-APIRET CfgInit (void)
-{
-   t_pCfgData pCfgData;
-   int         i;
-
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_CFG_ONLY_TEMPLATE_GENERATED))
-
-//   CHK (MEM_REGISTER_MEMID ())
-
-   pCfgData = &CfgLocal.CfgData;
-   memset (pCfgData, CONFIG_DUMMY_FILL, sizeof (t_CfgData));
-
-   for (i=0; i<FONTOBJECT_COUNT; i++) CfgLocal.FontArr [i] = NULL;
-   for (i=0; i<COLOR_COUNT     ; i++) CfgLocal.ColorArr[i] = NULL;
-
-   return NO_ERROR;
-}
-
-APIRET CfgDeInit (void)
-{
-   CHK (CfgDestroyFonts            ())
-   CHK (CfgDestroyColors           ())
-   CHK (CfgDestroyDlgAcquireFields ())
-   CHK (CfgDestroyDlgAcquireRules  ())
-
-   return NO_ERROR;
-}
-
diff --git a/config.h b/config.h
deleted file mode 100644
index 97673ac..0000000
--- a/config.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-
-#ifndef __CONFIG_H__
-#define __CONFIG_H__
-
-#define CONFIG(Param)             ( CfgGetpData ()->Param)
-#define CONFIG_COLOR(Color)       (*CfgGetpColor(Color))
-#define CONFIG_FONT(FontObject)   (*CfgGetpFont (FontObject ))
-
-typedef enum
-{
-   CFG_STARTUPSIZE_STANDARD,
-   CFG_STARTUPSIZE_FULLSCREEN,
-   CFG_STARTUPSIZE_MAXIMIZED,
-   CFG_STARTUPSIZE_MANUAL,
-} t_CfgStartupSize;
-
-typedef enum
-{
-   CFG_NUMBERSTYLE_LOCALE,
-   CFG_NUMBERSTYLE_DECIMAL_COMMA,
-   CFG_NUMBERSTYLE_DECIMAL_POINT
-} t_CfgNumberStyle;
-
-typedef enum
-{
-   CFG_ENTRYMODE_HIDE,
-   CFG_ENTRYMODE_SHOWDEFAULT,
-   CFG_ENTRYMODE_SHOWLAST
-} t_CfgEntryMode;
-
-const int CFG_MAX_LANGUAGE_LEN      =    8;
-const int CFG_MAX_FONT_FAMILY_LEN   =   63;
-const int CFG_MAX_PATH_LEN          = 1024;
-const int CFG_MAX_TITLEID_LEN       =   31;
-const int CFG_MAX_MENU_NAME_LEN     =  255;
-const int CFG_MAX_LANGUAGE_CODE_LEN =    5;
-const int CFG_MAX_FIELDNAME_LEN     =  255;
-const int CFG_MAX_MISC_LEN          =  255;
-
-class QColor; //lint !e763
-class QFont;  //lint !e763
-
-typedef enum
-{
-   FONTOBJECT_MENU=0,                 // must start with 0, as it is used for addressing an array
-   FONTOBJECT_DIALOGDEFAULT,
-
-   FONTOBJECT_COUNT
-} t_CfgFontObject;
-
-typedef enum
-{
-   COLOR_LOCALDEVICES=0,
-   COLOR_STATE_IDLE,
-   COLOR_STATE_ACQUIRE,
-   COLOR_STATE_ACQUIRE_PAUSED,
-   COLOR_STATE_VERIFY,
-   COLOR_STATE_VERIFY_PAUSED,
-   COLOR_STATE_CLEANUP,
-   COLOR_STATE_FINISHED,
-   COLOR_STATE_FINISHED_BADVERIFY,
-   COLOR_STATE_ABORTED_USER,
-   COLOR_STATE_ABORTED_OTHER,
-
-   COLOR_COUNT,
-   COLOR_DEFAULT  // Not really a color, but used for specifying, that a widget should switch to its default color (grey for a button, for instance)
-} t_CfgColor;
-
-
-// ATTENTION: The data of the following structure is filled in by the CFG tool. As this
-// one doesn't know about 'bool' (it's written in ANSI C), bool MUST not be used here.
-// ------------------------------------------------------------------------------------
-#define bool "Do not use bool, take int instead"
-typedef struct
-{
-   char                 Language[CFG_MAX_LANGUAGE_LEN+1];
-
-   t_CfgStartupSize     StartupSize;
-   int                  StartupSizeManualX;
-   int                  StartupSizeManualY;
-   int                  StartupSizeManualDx;
-   int                  StartupSizeManualDy;
-
-   t_CfgStartupSize     FileDialogSize;
-   int                  FileDialogSizeManualDx;
-   int                  FileDialogSizeManualDy;
-
-   t_CfgNumberStyle     NumberStyle;
-   int                  ScreenRefreshInterval;
-   int                  UseFileDialogFromQt;
-
-   int                  ScanUsingDbusHal;
-   int                  ScanInterval;
-   char                 CommandGetSerialNumber[CFG_MAX_PATH_LEN+1];
-
-   int                  DefaultFormat;
-   int                  EwfFormat;
-   int                  EwfCompression;
-   int                  AffCompression;
-   int                  AffMarkBadSectors;
-   int                  EwfSegmentSize;
-   char                 SpecialFilenameChars[CFG_MAX_MISC_LEN+1];
-
-   int                  FifoBlockSizeDD;
-   int                  FifoBlockSizeEWF;
-   int                  FifoBlockSizeAFF;
-   int                  FifoMaxMem;
-   int                  FifoMaxEntries;
-   int                  UseSeparateHashThread;
-   int                  CompressionThreads;
-   int                  SignalHandling;
-   int                  WriteToDevNull;
-   int                  UseMemWatch;
-   int                  VerboseLibewf;
-   int                  CheckEwfData;
-} t_CfgData, *t_pCfgData;
-#undef bool
-
-
-typedef struct
-{
-   char      Code      [CFG_MAX_LANGUAGE_CODE_LEN+1];
-   char      AsciiName [CFG_MAX_MENU_NAME_LEN    +1];
-} t_CfgBuffLanguage, *t_pCfgBuffLanguage;
-
-typedef struct
-{
-   t_CfgFontObject Object;
-   char            Family[CFG_MAX_FONT_FAMILY_LEN+1];
-   int             Size;
-   int             Weight;
-   int             Italic;
-} t_CfgBuffFont, *t_pCfgBuffFont;
-
-typedef struct
-{
-   t_CfgColor Color;
-   int        R;
-   int        G;
-   int        B;
-} t_CfgBuffColor, *t_pCfgBuffColor;
-
-typedef struct
-{
-   char Device [CFG_MAX_PATH_LEN+1];
-} t_CfgBuffLocalDevice, *t_pCfgBuffLocalDevice;
-
-typedef struct
-{
-   char Command [CFG_MAX_PATH_LEN+1];
-} t_CfgBuffDeviceInfoCommand, *t_pCfgBuffDeviceInfoCommand;
-
-
-// DlgAcquire fields and rules
-// ---------------------------
-
-#define CFG_DLGACQUIRE_EWF_FIELDID    "Ewf"
-#define CFG_DLGACQUIRE_DST_FIELDID    "Dest"
-#define CFG_DLGACQUIRE_DIR_FIELDID    "Directory"
-
-#define CFG_DLGACQUIRE_EWF_CASENUMBER          QT_TRANSLATE_NOOP("t_DlgAcquire", "EwfCaseNumber"     )
-#define CFG_DLGACQUIRE_EWF_EVIDENCENUMBER      QT_TRANSLATE_NOOP("t_DlgAcquire", "EwfEvidenceNumber" )
-#define CFG_DLGACQUIRE_EWF_EXAMINER            QT_TRANSLATE_NOOP("t_DlgAcquire", "EwfExaminer"       )
-#define CFG_DLGACQUIRE_EWF_DESCRIPTION         QT_TRANSLATE_NOOP("t_DlgAcquire", "EwfDescription"    )
-#define CFG_DLGACQUIRE_EWF_NOTES               QT_TRANSLATE_NOOP("t_DlgAcquire", "EwfNotes"          )
-#define CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY     QT_TRANSLATE_NOOP("t_DlgAcquire", "DestImageDirectory")
-#define CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY_ALT QT_TRANSLATE_NOOP("t_DlgAcquire", "DestDirectory"     ) // Alternate name for compatibility with old Guymager versions
-#define CFG_DLGACQUIRE_DEST_IMAGEFILENAME      QT_TRANSLATE_NOOP("t_DlgAcquire", "DestImageFilename" )
-#define CFG_DLGACQUIRE_DEST_INFODIRECTORY      QT_TRANSLATE_NOOP("t_DlgAcquire", "DestInfoDirectory" )
-#define CFG_DLGACQUIRE_DEST_INFOFILENAME       QT_TRANSLATE_NOOP("t_DlgAcquire", "DestInfoFilename"  )
-
-
-typedef struct
-{
-   char            FieldName   [CFG_MAX_FIELDNAME_LEN+1];
-   t_CfgEntryMode  EntryMode;
-   char            DefaultValue[CFG_MAX_MISC_LEN     +1];
-} t_CfgBuffDlgAcquireField, *t_pCfgBuffDlgAcquireField;
-
-typedef struct
-{
-   char TriggerFieldName[CFG_MAX_FIELDNAME_LEN+1];
-   char DestFieldName   [CFG_MAX_FIELDNAME_LEN+1];
-   char Value           [CFG_MAX_MISC_LEN     +1];
-} t_CfgBuffDlgAcquireRule, *t_pCfgBuffDlgAcquireRule;
-
-class t_DlgAcquireLineEdit;
-class t_CfgDlgAcquireField
-{
-   public:
-      QString                FieldName;
-      t_CfgEntryMode         EntryMode;
-      QString                DefaultValue;
-      QString                LastEnteredValue; // not set by config, used by DlgAcquire
-      bool                   EwfField;         // This field is part of the EWF fields
-      bool                   DstField;         // This field is part of the fields for entering the image/info destination
-      bool                   DirField;         // This is a directory field with a browse button
-      t_DlgAcquireLineEdit *pLineEdit;
-};
-typedef t_CfgDlgAcquireField       *t_pCfgDlgAcquireField;
-typedef QList<t_pCfgDlgAcquireField> t_CfgDlgAcquireFields;
-typedef t_CfgDlgAcquireFields      *t_pCfgDlgAcquireFields;
-
-class t_CfgDlgAcquireRule
-{
-   public:
-      QString TriggerFieldName;
-      QString DestFieldName;
-      QString Value;
-};
-typedef t_CfgDlgAcquireRule        *t_pCfgDlgAcquireRule;
-typedef QList<t_pCfgDlgAcquireRule> t_CfgDlgAcquireRules;
-typedef t_CfgDlgAcquireRules       *t_pCfgDlgAcquireRules;
-
-QFont        *CfgGetpFont    (t_CfgFontObject Object);
-const QColor *CfgGetpColor   (t_CfgColor      Color );
-APIRET CfgGetLocalDevices        (QStringList **ppLocalDevices);
-APIRET CfgGetDeviceInfoCommands  (QStringList **ppDeviceInfoCommands);
-APIRET CfgGetDlgAcquireFields    (t_pCfgDlgAcquireFields *ppDlgAcquireFields);
-APIRET CfgGetDlgAcquireRules     (t_pCfgDlgAcquireRules  *ppDlgAcquireRules);
-
-
-APIRET CfgInit        (void);
-APIRET CfgDeInit      (void);
-
-t_pCfgData CfgGetpData(void);
-
-APIRET CfgGetLogFileName    (t_pcchar *ppLogFileName, bool *pDefaultUsed);
-APIRET CfgGetCfgFileName    (t_pcchar *ppCfgFileName, bool *pDefaultUsed);
-APIRET CfgReadConfiguration (t_pcchar   pCfgFileName);
-
-APIRET ConfigTranslateUnicodeEscape (char *pSrc, QString *pDest);
-
-void CfgFontPrint (void);
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_CFG_ONLY_TEMPLATE_GENERATED = ERROR_BASE_CFG + 1,
-};
-
-
-#endif
-
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 47f24b1..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,6 +0,0 @@
-guymager (0.4.1-1) unstable; urgency=low
-
-  * Initial release (Closes: #479014).
-  * Packaging based on work by upstream author Guy Voncken.
-
- -- Michael Prokop <mika at debian.org>  Wed, 19 Aug 2009 10:34:10 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100644
index c403171..0000000
--- a/debian/control
+++ /dev/null
@@ -1,22 +0,0 @@
-Source: guymager
-Section: x11
-Priority: optional
-Maintainer: Debian Forensics <forensics-devel at lists.alioth.debian.org>
-Uploaders: Michael Prokop <mika at debian.org>
-Build-Depends: debhelper (>= 5), libewf-dev (>=20080501), libguytools1-dev,
- libparted-dev, libproc-dev, libqt4-dev, libssl-dev
-Standards-Version: 3.8.3
-Homepage: http://guymager.sourceforge.net/
-Vcs-git: git://git.grml.org/guymager.git
-Vcs-Browser: http://git.grml.org/?p=guymager.git
-
-Package: guymager
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
-Recommends: hdparm, smartmontools
-Description: Forensic imaging tool based on Qt
- The forensic imager contained in this package, guymager, was designed to
- support different image file formats, to be most user-friendly and to run
- really fast. It has a high speed multi-threaded engine using parallel
- compression for best performance on multi-processor and hyper-threading
- machines.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 810eaae..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,86 +0,0 @@
-This package was debianised by Guy Voncken <vogu00 at gmail.com>
-and Michel Prokop <mika at debian.org>
-
-Upstream Author: Guy Voncken <vogu00 at gmail.com>
-
-Copyright: © Copyright 2007++ by Guy Voncken
-
-License:
-
-   This package is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This package is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this package; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-
-Legal information for md5.{c,h}:
-Upstream Author:
-
-    L. Peter Deutsch <ghost at aladdin.com>
-
-Copyright:
-
-    Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
-
-License:
-
-    This software is provided 'as-is', without any express or implied
-    warranty.  In no event will the authors be held liable for any damages
-    arising from the use of this software.
-
-    Permission is granted to anyone to use this software for any purpose,
-    including commercial applications, and to alter it and redistribute it
-    freely, subject to the following restrictions:
-
-    1. The origin of this software must not be misrepresented; you must not
-       claim that you wrote the original software. If you use this software
-       in a product, an acknowledgment in the product documentation would be
-       appreciated but is not required.
-    2. Altered source versions must be plainly marked as such, and must not be
-       misrepresented as being the original software.
-    3. This notice may not be removed or altered from any source distribution.
-
-
-Legal information for memwatch.{c,h}:
-Upstream Author:
-
-   Johan Lindh
-
-Copyright:
-
-   Copyright (C) 1992-2003 Johan Lindh
-
-License:
-
-   Licensed under the GPLv2.
-
-
-Legal information for sha256.cpp:
-Upstream Author:
-
-   Christophe Devine
-
-Copyright:
-
-   Copyright (C) 2001-2003  Christophe Devine
-
-License:
-
-   Licensed under the GPLv2.
-
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL-2'.
-
-The Debian packaging is © 2008 by Guy Voncken <vogu00 at gmail.com>
-and © 2009 by Michael Prokop <mika at debian.org>
-and is licensed under the GPL, see above.
diff --git a/debian/guymager.install b/debian/guymager.install
deleted file mode 100644
index 8707c71..0000000
--- a/debian/guymager.install
+++ /dev/null
@@ -1,4 +0,0 @@
-guymager      /usr/bin
-splash.png    /usr/share/guymager
-guymager_*.qm /usr/share/guymager
-guymager.cfg  /etc/guymager
diff --git a/debian/guymager.manpages b/debian/guymager.manpages
deleted file mode 100644
index dcb740a..0000000
--- a/debian/guymager.manpages
+++ /dev/null
@@ -1 +0,0 @@
-manuals/guymager.1
diff --git a/debian/guymager.menu b/debian/guymager.menu
deleted file mode 100644
index 638810c..0000000
--- a/debian/guymager.menu
+++ /dev/null
@@ -1,3 +0,0 @@
-?package(guymager):needs="X11" section="Applications/System/Security"\
-  title="guymager" command="/usr/bin/guymager"\
-  hints="Imaging"
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index f5d3b2b..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	qmake-qt4 DEFINES+="SPLASH_DIR=\'\\\"/usr/share/guymager\\\"\' LANGUAGE_DIR=\'\\\"/usr/share/guymager\\\"\' LANGUAGE_DIR_QT=\'\\\"/usr/share/qt4/translations\\\"\'"
-	touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
-	dh_testdir
-	$(MAKE)
-	lrelease guymager.pro
-	cd manuals  && ./rebuild.sh && cd -
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-	# dpkg-buildpackage starts with cleaning, so we have to be sure that there's a
-	# Makefile (and thus call qmake-qt4):
-	qmake-qt4
-
-	$(MAKE) clean
-	# remove leftover files:
-	rm -f guymager
-	rm -f compileinfo.cpp
-	rm -f guymager_de.qm guymager_en.qm guymager_fr.qm guymager_it.qm guymager_nl.qm
-	rm -f Makefile
-	rm -f manuals/guymager.1
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs
-	dh_installdocs
-	dh_installmenu
-	dh_installman
-	dh_install
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/device.cpp b/device.cpp
deleted file mode 100644
index 7d8f159..0000000
--- a/device.cpp
+++ /dev/null
@@ -1,592 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The DeviceList represents the central data structure of
-//                  the application. Its contents are displayed in the main
-//                  window.
-// ****************************************************************************
-
-#include <float.h>
-
-#include <QString>
-#include <QList>
-
-#include "toolconstants.h"
-
-#include "common.h"
-#include "config.h"
-#include "mainwindow.h"
-#include "main.h"
-
-// ---------------------------
-//         t_Device
-// ---------------------------
-
-static const int DEVICE_MIN_RUNNING_SECONDS = 20;  // The minmum number of acquisition seconds before any estimation can be made
-
-void t_Device::Initialise (void)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DEVICE_SERNR_MATCH_MODEL_MISMATCH ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DEVICE_SERNR_MATCH_LENGTH_MISMATCH))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DEVICE_BAD_STATE                  ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DEVICE_BAD_ABORTREASON            ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DEVICE_NOT_CLEAN                  ))
-      Initialised = true;
-   }
-
-//   this->SerialNumber      = QString();
-//   this->LinuxDevice       = QString();
-//   this->Model             = QString();
-   this->Local                = false;
-   this->SectorSize           = 0;
-   this->SectorSizePhys       = 0;
-   this->Size                 = 0;
-   this->Removable            = false;
-
-   this->State                = Idle;
-//   this->Acquisition.Message       = QString();
-   this->AbortRequest         = false;
-   this->AbortReason          = None;
-   this->DeleteAfterAbort     = false;
-   this->pFifoRead            = NULL;
-   this->pThreadRead          = NULL;
-   this->pFileSrc             = NULL;
-   this->CurrentReadPos       = 0;
-//   this->BadSectors
-//   this->BadSectorsVerify
-   this->FallbackMode         = false;
-   this->StartTimestamp       = QDateTime();
-   this->StartTimestampVerify = QDateTime();
-   this->StopTimestamp        = QDateTime();
-
-   this->pThreadWrite         = NULL;
-   this->CurrentWritePos      = 0;
-   this->CurrentVerifyPos     = 0;
-   this->pFifoWrite           = NULL;
-
-   this->pThreadHash          = NULL;
-   this->pFifoHashIn          = NULL;
-   this->pFifoHashOut         = NULL;
-   memset (&this->MD5Digest         , 0, sizeof(this->MD5Digest         ));
-   memset (&this->MD5DigestVerify   , 0, sizeof(this->MD5DigestVerify   ));
-   memset (&this->SHA256Digest      , 0, sizeof(this->SHA256Digest      ));
-   memset (&this->SHA256DigestVerify, 0, sizeof(this->SHA256DigestVerify));
-
-   this->pFifoCompressIn      = NULL;
-   this->pFifoCompressOut     = NULL;
-   this->FifoMaxBlocks        = 0;
-   this->FifoBlockSize        = 0;
-
-//   this->Acquisition.Path          = QString();
-//   this->Acquisition.ImageFilename = QString();
-//   this->Acquisition.InfoFilename  = QString();
-   this->Acquisition.Format        = t_File::NotSet;
-   this->Acquisition.CalcHashes    = false;
-   this->Acquisition.VerifySource  = false;
-//   this->Acquisition.CaseNumber    = QString();
-//   this->Acquisition.EvidenceNumber= QString();
-//   this->Acquisition.Examiner      = QString();
-//   this->Acquisition.Description   = QString();
-//   this->Acquisition.Notes         = QString();
-
-   this->Info.SetDevice(this);
-
-   this->PrevTimestamp     = QTime();
-   this->PrevSpeed         = 0.0;
-   this->Checked           = false;
-}
-
-void t_Device::InitialiseDeviceSpecific (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                                         quint64 SectorSize, quint64 SectorSizePhys, quint64 Size)
-{                                        //lint !e578: Declaration of symbol 'Xxx' hides symbol 't_Device::Xxx'
-   this->SerialNumber   = SerialNumber;
-   this->LinuxDevice    = LinuxDevice;
-//   this->LinuxDevice    = "/data/virtualbox/knoppicilin.iso";
-   this->Model          = Model;
-
-   this->SectorSize     = SectorSize;
-   this->SectorSizePhys = SectorSizePhys;
-   this->Size           = Size;
-//   this->Size           = std::min (10737418240ULL, Size;  // For faster testing (we make guymager believe that the device is smaller)
-//   this->Size           = std::min (1073741824ULL, Size);  // For faster testing (we make guymager believe that the device is smaller)
-}
-
-t_Device::t_Device (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                    quint64 SectorSize, quint64 SectorSizePhys, quint64 Size)
-{                   //lint !e578: Declaration of symbol 'Xxx' hides symbol 't_Device::Xxx'
-   Initialise ();
-   InitialiseDeviceSpecific (SerialNumber, LinuxDevice, Model, SectorSize, SectorSizePhys, Size);
-}
-
-t_Device::t_Device (const QString &SerialNumber, const PedDevice *pPedDev)
-{                   //lint !e578: Declaration of symbol 'Xxx' hides symbol 't_Device::Xxx'
-   Initialise ();
-   InitialiseDeviceSpecific (SerialNumber, pPedDev->path, pPedDev->model,
-                                           (quint64) pPedDev->sector_size, (quint64) pPedDev->phys_sector_size,
-                                           (quint64) pPedDev->length * (quint64) pPedDev->sector_size);
-}
-
-t_Device::~t_Device()
-{
-   if (pThreadRead   || pFifoRead    ||
-       pThreadHash   || pFifoHashIn  ||
-       pThreadWrite  || pFifoHashOut ||
-       pFileSrc      || pFifoWrite )
-      CHK_EXIT (ERROR_DEVICE_NOT_CLEAN)
-
-   pThreadRead  = NULL; pFifoRead    = NULL;
-   pThreadHash  = NULL; pFifoHashIn  = NULL;
-   pThreadWrite = NULL; pFifoHashOut = NULL;
-   pFileSrc     = NULL; pFifoWrite   = NULL;
-}
-
-bool t_Device::HasHashThread (void) const
-{
-   return Acquisition.CalcHashes && CONFIG (UseSeparateHashThread);
-}
-
-bool t_Device::HasCompressionThreads (void) const
-{
-   return (CONFIG (CompressionThreads) > 0) && ((Acquisition.Format == t_File::EWF) ||
-                                                (Acquisition.Format == t_File::AFF));
-}
-
-
-//lint -save -e818 pDevice could have declared as pointing to const
-
-QVariant t_Device::GetSerialNumber (t_pDevice pDevice)
-{
-   return pDevice->SerialNumber;
-}
-
-QVariant t_Device::GetLinuxDevice (t_pDevice pDevice)
-{
-   return pDevice->LinuxDevice;
-}
-
-QVariant t_Device::GetModel (t_pDevice pDevice)
-{
-   return pDevice->Model;
-}
-
-QVariant t_Device::GetState (t_pDevice pDevice)
-{
-   QString State;
-
-   switch (pDevice->State)
-   {
-      case Idle        : if (pDevice->Local)
-                             State = t_MainWindow::tr("Local device");
-                         else State = t_MainWindow::tr("Idle");
-                         break;
-      case Acquire      : State = t_MainWindow::tr("Acquisition running" ); break;
-      case Verify       : State = t_MainWindow::tr("Verification running"); break;
-      case AcquirePaused: State = t_MainWindow::tr("Device disconnected, acquisition paused" ); break;
-      case VerifyPaused : State = t_MainWindow::tr("Device disconnected, verification paused"); break;
-      case Cleanup      : State = t_MainWindow::tr("Cleanup" ); break;
-      case Finished     : if (pDevice->Acquisition.VerifySource)
-                          {
-                             if (HashMD5Match   (&pDevice->MD5Digest   , &pDevice->MD5DigestVerify   ) &&
-                                 HashSHA256Match(&pDevice->SHA256Digest, &pDevice->SHA256DigestVerify))
-                                  State = t_MainWindow::tr("Finished - hashes verified & ok"      );
-                             else State = t_MainWindow::tr("Finished - hash verification mismatch");
-                          }
-                          else
-                          {
-                             State = t_MainWindow::tr("Finished");
-                          }
-                          break;
-      case Aborted : switch (pDevice->AbortReason)
-                     {
-                        case t_Device::None                : State = t_MainWindow::tr("Aborted - Error: Reason is 'none'" ); break;
-                        case t_Device::UserRequest         : State = t_MainWindow::tr("Aborted by user" );                   break;
-                        case t_Device::ThreadWriteFileError: State = t_MainWindow::tr("Aborted - Image file write error" );  break;
-                        case t_Device::ThreadReadFileError : State = t_MainWindow::tr("Aborted - Device read error" );       break;
-                        default                            : CHK_EXIT (ERROR_DEVICE_BAD_ABORTREASON)
-                     }
-                     break;
-      default      : CHK_EXIT (ERROR_DEVICE_BAD_STATE)
-   }
-   if (pDevice->State != Aborted)
-   {
-      QString Msg;
-      CHK_EXIT (pDevice->GetMessage (Msg))
-      if (!Msg.isEmpty())
-         State += " - " + Msg;
-   }
-
-   return State;
-}
-
-QVariant t_Device::GetSectorSize (t_pDevice pDevice)
-{
-   return pDevice->SectorSize;
-}
-
-QVariant t_Device::GetSectorSizePhys (t_pDevice pDevice)
-{
-   return pDevice->SectorSizePhys;
-}
-
-QVariant t_Device::GetSize (t_pDevice pDevice)
-{
-   return pDevice->Size;
-}
-
-
-QVariant t_Device::GetSizeHumanFrac (t_pDevice pDevice, bool SI, int FracLen, int UnitThreshold)
-{
-   QString      SizeHuman;
-   const char *pUnit;
-   double       Sz;
-   double       Divisor;
-
-   if (SI)
-        Divisor = 1000.0;
-   else Divisor = 1024.0;
-
-   if (UnitThreshold == AutoUnitThreshold)
-      UnitThreshold = (int) Divisor;
-
-   Sz = pDevice->Size;
-   pUnit = "Byte";
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "kB" : "KiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "MB" : "MiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "GB" : "GiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "TB" : "TiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "PB" : "PiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "EB" : "EiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "ZB" : "ZiB"; }
-   if (Sz >= UnitThreshold) { Sz = Sz / Divisor; pUnit = SI ? "YB" : "YiB"; }
-
-   if (FracLen == AutoFracLen)
-   {
-      if      (Sz >= 100) FracLen = 0;
-      else if (Sz >= 10 ) FracLen = 1;
-      else                FracLen = 2;
-   }
-   SizeHuman = MainGetpNumberLocale()->toString (Sz, 'f', FracLen) + pUnit;
-
-   return SizeHuman;
-}
-
-QVariant t_Device::GetSizeHuman (t_pDevice pDevice)
-{
-   return GetSizeHumanFrac (pDevice, true, 1);
-}
-
-QVariant t_Device::GetBadSectorCount (t_pDevice pDevice)
-{
-   if (!pDevice->StartTimestamp.isNull())
-        return pDevice->GetBadSectorCount (false);
-   else return "";
-}
-
-static void DeviceGetProgress (t_pDevice pDevice, quint64 *pCurrent=NULL, quint64 *pTotal=NULL)
-{
-   quint64 Current, Total;
-
-   if (pDevice->Acquisition.VerifySource)
-   {
-      Total = 2 * pDevice->Size;
-      if (pDevice->StartTimestampVerify.isNull())
-           Current = pDevice->GetCurrentWritePos ();
-      else Current = pDevice->GetCurrentVerifyPos() + pDevice->Size;
-   }
-   else
-   {
-      Total   = pDevice->Size;
-      Current = pDevice->GetCurrentWritePos();
-   }
-   if (pTotal  ) *pTotal   = Total;
-   if (pCurrent) *pCurrent = Current;
-}
-
-QVariant t_Device::GetProgress (t_pDevice pDevice)
-{
-   quint64 Current, Total;
-
-   if (!pDevice->StartTimestamp.isNull())
-   {
-      DeviceGetProgress (pDevice, &Current, &Total);
-      return (double) Current / Total;
-   }
-
-   return -DBL_MAX;
-}
-
-QVariant t_Device::GetCurrentSpeed (t_pDevice pDevice)
-{
-   QString Result;
-   QTime   Now;
-   double  MBs;
-   double  Speed;
-   int     MilliSeconds;
-   quint64 CurrentPos;
-
-   if ((pDevice->State == Acquire) ||  // Don't display anything if no acquisition is running
-       (pDevice->State == Verify ))
-   {
-      Now = QTime::currentTime();
-      DeviceGetProgress (pDevice, &CurrentPos);
-      if (!pDevice->PrevTimestamp.isNull())
-      {
-         MilliSeconds = pDevice->PrevTimestamp.msecsTo (Now); // As this fn is called within 1s-interval, time_t would not be precise enough
-         if (MilliSeconds > 0)
-         {
-            MBs   = (double) (CurrentPos - pDevice->PrevPos) / BYTES_PER_MEGABYTE;
-            Speed = (1000.0*MBs) / MilliSeconds;
-            pDevice->PrevSpeed = (pDevice->PrevSpeed + Speed) / 2.0;
-         }
-         Result = MainGetpNumberLocale()->toString (pDevice->PrevSpeed, 'f', 2);
-      }
-      pDevice->PrevTimestamp = Now;
-      pDevice->PrevPos       = CurrentPos;
-   }
-
-   return Result;
-}
-
-QVariant t_Device::GetAverageSpeed (t_pDevice pDevice)
-{
-   QLocale Locale;
-   QString Result;
-   double  MBs;
-   int     Seconds;
-   quint64 CurrentPos;
-
-   if (pDevice->StartTimestamp.isNull())
-      return QString();
-
-   if (pDevice->StopTimestamp.isNull()) // As long as the stop timestamp is Null, the acquisition is still running
-        Seconds = pDevice->StartTimestamp.secsTo (QDateTime::currentDateTime());
-   else Seconds = pDevice->StartTimestamp.secsTo (pDevice->StopTimestamp);
-
-   if ((pDevice->StopTimestamp.isNull()) && (Seconds < DEVICE_MIN_RUNNING_SECONDS))
-      return "--";
-
-   DeviceGetProgress (pDevice, &CurrentPos);
-   MBs = ((double) CurrentPos) / BYTES_PER_MEGABYTE;
-   Result = Locale.toString (MBs/Seconds, 'f', 2);
-
-   return Result;
-}
-
-QVariant t_Device::GetRemaining (t_pDevice pDevice)
-{
-   QString Result;
-   char    Buff[10];
-   int     TotalSeconds;
-   time_t  Now;
-   int     hh, mm, ss;
-   quint64 Current, Total;
-
-   if ((pDevice->State == Acquire) || // Don't display anything if no acquisition is running
-       (pDevice->State == Verify ))
-   {
-      time (&Now);
-      TotalSeconds = pDevice->StartTimestamp.secsTo (QDateTime::currentDateTime());
-      if (TotalSeconds < DEVICE_MIN_RUNNING_SECONDS)
-      {
-         Result = "--";
-      }
-      else
-      {
-         DeviceGetProgress (pDevice, &Current, &Total);
-         ss  = (int) ((double)Total / Current * TotalSeconds); // Estimated total time
-         ss -= TotalSeconds;                                    // Estimated remaining time
-         hh = ss / SECONDS_PER_HOUR;   ss %= SECONDS_PER_HOUR;
-         mm = ss / SECONDS_PER_MINUTE; ss %= SECONDS_PER_MINUTE;
-         snprintf (Buff, sizeof(Buff), "%02d:%02d:%02d", hh, mm, ss);
-         Result = Buff;
-      }
-   }
-
-   return Result;
-}
-
-static inline int DeviceFifoUsage (t_pFifo pFifo)
-{
-   int Usage;
-   CHK_EXIT (pFifo->Usage(Usage))
-   return Usage;
-}
-
-QVariant t_Device::GetFifoStatus (t_pDevice pDevice)
-{
-   QString Result;
-
-   if ((pDevice->State == Acquire) ||  // Don't display anything if no acquisition is running
-       (pDevice->State == Verify ))
-   {
-      if (!pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         Result = QString ("r %1 w") .arg (DeviceFifoUsage(pDevice->pFifoRead));
-      }
-      else if (!pDevice->HasHashThread() && pDevice->HasCompressionThreads())
-      {
-         Result = QString ("r %1 c %2 w") .arg (DeviceFifoUsage(pDevice->pFifoRead      ))
-                                          .arg (DeviceFifoUsage(pDevice->pFifoCompressOut));
-      }
-      else if (pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         Result = QString ("r %1 m %2 w") .arg (DeviceFifoUsage(pDevice->pFifoRead   ))
-                                          .arg (DeviceFifoUsage(pDevice->pFifoHashOut));
-      }
-      else if (pDevice->HasHashThread() && pDevice->HasCompressionThreads())
-      {
-         Result = QString ("r %1 h %2 c %3 w") .arg (DeviceFifoUsage(pDevice->pFifoRead       ))
-                                               .arg (DeviceFifoUsage(pDevice->pFifoHashOut    ))
-                                               .arg (DeviceFifoUsage(pDevice->pFifoCompressOut));
-      }
-   }
-
-   return Result;
-}
-
-
-//lint -restore
-
-
-// ---------------------------
-//        t_DeviceList
-// ---------------------------
-
-t_DeviceList::t_DeviceList(void)
-   :QList<t_pDevice>()
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      qRegisterMetaType<t_pDeviceList>("t_pDeviceList");
-   }
-}
-
-t_DeviceList::~t_DeviceList()
-{
-   int i;
-
-   for (i=0; i<count(); i++)
-      delete at(i);
-}
-
-t_pDevice t_DeviceList::AppendNew (const QString &SerialNumber, const PedDevice *pPedDev)
-{
-   t_pDevice pDev;
-
-   pDev = new t_Device (SerialNumber, pPedDev);
-   append (pDev);
-
-   return pDev;
-}
-
-t_pDevice t_DeviceList::AppendNew (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                                   quint64 SectorSize, quint64 SectorSizePhys, quint64 Size)
-{
-   t_pDevice pDev;
-
-   pDev = new t_Device (SerialNumber, LinuxDevice, Model, SectorSize, SectorSizePhys, Size);
-   append (pDev);
-
-   return pDev;
-}
-
-//t_pDevice t_DeviceList::SearchLinuxDevice  (const QString &LinuxDevice)
-//{
-//   t_pDevice pDev;
-//   int        i;
-//
-//   for (i=0; i<count(); i++)
-//   {
-//      pDev = at(i);
-//      if (pDev->LinuxDevice == LinuxDevice)
-//         return pDev;
-//   }
-//   return NULL;
-//}
-//
-//t_pDevice t_DeviceList::SearchSerialNumber (const QString &SerialNumber)
-//{
-//   t_pDevice pDev;
-//   int        i;
-//
-//   for (i=0; i<count(); i++)
-//   {
-//      pDev = at(i);
-//      if (pDev->SerialNumber == SerialNumber)
-//         return pDev;
-//   }
-//   return NULL;
-//}
-
-APIRET t_DeviceList::MatchDevice (t_pcDevice pDevCmp, t_pDevice &pDevMatch)
-{
-   bool Found = false;
-   int  i;
-
-   for (i=0; (i<count()) && !Found; i++)
-   {
-      pDevMatch = at(i);
-      if (pDevMatch->SerialNumber.isEmpty())
-      {
-         Found = (pDevCmp->SerialNumber.isEmpty() && (pDevMatch->State != t_Device::AcquirePaused) &&
-                                                     (pDevMatch->State != t_Device::VerifyPaused ) &&
-                                                     (pDevMatch->Model == pDevCmp->Model         ) &&
-                                                     (pDevMatch->Size  == pDevCmp->Size          ));
-      }
-      else
-      {
-//         Found = (pDevMatch->SerialNumber == pDevCmp->SerialNumber);
-//         if (Found)
-//         {                                                                                            // If the serial numbers match, the whole
-//            if (pDevMatch->Model != pDevCmp->Model) return ERROR_DEVICE_SERNR_MATCH_MODEL_MISMATCH;   // rest must match as well. Otherwise,
-//            if (pDevMatch->Size  != pDevCmp->Size ) return ERROR_DEVICE_SERNR_MATCH_LENGTH_MISMATCH;  // something very strange is going on...
-//         }
-
-// The comparision above cannot be used, because there are certain devices, that behave as if 2 devices aer connected when
-// plugged in - with the same serial number!! Example: I once had a memory stick from Intuix, that reported 2 devices: The
-// memory stick itself and a CD-Rom memory stick itself and a CD-Rom containing device drivers for some strange OS. Both
-// devices had the same serial number. That's why the check now also includes the size and the model.
-
-         Found = ((pDevMatch->SerialNumber == pDevCmp->SerialNumber) &&
-                  (pDevMatch->Size         == pDevCmp->Size )        &&
-                  (pDevMatch->Model        == pDevCmp->Model));
-      }
-   }
-
-   if (!Found)
-      pDevMatch = NULL;
-
-   return NO_ERROR;
-}
-
-const char *t_Device::StateStr (void)
-{
-   const char *pStr;
-   switch (State)
-   {
-      case Idle         : pStr = "Idle";            break;
-      case Acquire      : pStr = "Acquire";         break;
-      case AcquirePaused: pStr = "AcquirePaused";   break;
-      case Verify       : pStr = "Verify";          break;
-      case VerifyPaused : pStr = "VerifyPaused";    break;
-      case Cleanup      : pStr = "Cleanup";         break;
-      case Finished     : pStr = "Finished";        break;
-      case Aborted      : pStr = "Aborte";          break;
-      default           : pStr = "Unknown";
-   }
-
-   return pStr;
-}
-
diff --git a/device.h b/device.h
deleted file mode 100644
index 9e9bdc7..0000000
--- a/device.h
+++ /dev/null
@@ -1,302 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-
-#ifndef __DEVICE_H__
-#define __DEVICE_H__
-
-#include "hash.h"
-
-
-#include <parted/parted.h>
-#include <QMetaType>
-#include <QReadWriteLock>
-#include <QMutex>
-#include <QTime>
-
-#include "fifo.h"
-#include "info.h"
-#include "file.h"
-
-class t_ThreadRead;
-class t_ThreadHash;
-class t_ThreadCompress;
-class t_ThreadWrite;
-
-#define DEVICE_DEFAULT_SECTOR_SIZE ((size_t)512)
-
-class t_Device
-{
-   public:
-
-      typedef enum
-      {
-         Idle,
-         Acquire,
-         AcquirePaused,
-         Verify,
-         VerifyPaused,
-         Cleanup,
-         Finished,
-         Aborted
-      } t_State;
-
-      typedef enum
-      {
-         None,
-         UserRequest,
-         ThreadWriteFileError,
-         ThreadReadFileError
-      } t_AbortReason;
-
-      static const int AutoFracLen       = -1;   // Use up to 2 digits after decimal point (min. 3 significant digits)
-      static const int AutoUnitThreshold = -1;
-
-      class t_Acquisition
-      {
-         public:
-            QString         ImagePath;        // Always end with /
-            QString         InfoPath;         // Always end with /
-            QString         ImageFilename;    // Image filename, without extension
-            QString         InfoFilename;     // Info filename, without extension
-            t_File::Format  Format;
-            bool            CalcHashes;
-            bool            VerifySource;
-            QString         CaseNumber;
-            QString         EvidenceNumber;
-            QString         Examiner;
-            QString         Description;
-            QString         Notes;
-      };
-
-   public:
-      t_Device (const QString &SerialNumber=QString(), const PedDevice *pPedDev=NULL);
-      t_Device (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                                             quint64 SectorSize, quint64 SectorSizePhys, quint64 Size=0);
-     ~t_Device ();
-
-      static QVariant GetSerialNumber        (t_pDevice pDevice);
-      static QVariant GetLinuxDevice         (t_pDevice pDevice);
-      static QVariant GetModel               (t_pDevice pDevice);
-      static QVariant GetState               (t_pDevice pDevice);
-      static QVariant GetSectorSize          (t_pDevice pDevice);
-      static QVariant GetSectorSizePhys      (t_pDevice pDevice);
-      static QVariant GetBadSectorCount      (t_pDevice pDevice);
-      static QVariant GetBadSectorCountVerify(t_pDevice pDevice);
-      static QVariant GetSize                (t_pDevice pDevice);
-      static QVariant GetSizeHuman           (t_pDevice pDevice);
-      static QVariant GetSizeHumanFrac       (t_pDevice pDevice, bool SI=true, int FracLen=AutoFracLen, int UnitThreshold=AutoUnitThreshold);
-      static QVariant GetProgress            (t_pDevice pDevice);
-      static QVariant GetCurrentSpeed        (t_pDevice pDevice);
-      static QVariant GetAverageSpeed        (t_pDevice pDevice);
-      static QVariant GetRemaining           (t_pDevice pDevice);
-      static QVariant GetFifoStatus          (t_pDevice pDevice);
-
-      inline void SetCurrentWritePos (quint64 Pos)
-      {
-         SemCurrentWritePos.lockForWrite ();
-         CurrentWritePos = Pos;
-         SemCurrentWritePos.unlock ();
-      }
-
-      inline void IncCurrentWritePos (int Inc)
-      {
-         SemCurrentWritePos.lockForWrite ();
-         CurrentWritePos += Inc; //lint !e737 Loss of sign
-         SemCurrentWritePos.unlock ();
-      }
-
-      inline quint64 GetCurrentWritePos (void)
-      {
-         quint64 Pos;
-         SemCurrentWritePos.lockForRead ();
-         Pos = CurrentWritePos;
-         SemCurrentWritePos.unlock ();
-         return Pos;
-      }
-
-      inline void SetCurrentVerifyPos (quint64 Pos)
-      {
-         SemCurrentVerifyPos.lockForWrite ();
-         CurrentVerifyPos = Pos;
-         SemCurrentVerifyPos.unlock ();
-      }
-
-      inline void IncCurrentVerifyPos (int Inc)
-      {
-         SemCurrentVerifyPos.lockForWrite ();
-         CurrentVerifyPos += Inc; //lint !e737 Loss of sign
-         SemCurrentVerifyPos.unlock ();
-      }
-
-      inline quint64 GetCurrentVerifyPos (void)
-      {
-         quint64 Pos;
-         SemCurrentVerifyPos.lockForRead ();
-         Pos = CurrentVerifyPos;
-         SemCurrentVerifyPos.unlock ();
-         return Pos;
-      }
-
-      inline void AddBadSector (quint64 Sector)
-      {
-         SemBadSectors.lock ();
-         if (State == Acquire)
-              BadSectors      .append(Sector);
-         else BadSectorsVerify.append(Sector);
-         SemBadSectors.unlock ();
-      }
-
-      APIRET GetBadSectors (QList<quint64> &BadSectorsCopy, bool Verify)
-      {
-         SemBadSectors.lock ();
-         if (Verify)
-              BadSectorsCopy = BadSectorsVerify;
-         else BadSectorsCopy = BadSectors;
-         SemBadSectors.unlock ();
-         return NO_ERROR;
-      }
-
-      quint64 GetBadSectorCount (bool Verify)
-      {
-         quint64 Count;
-         SemBadSectors.lock ();
-         if (Verify)
-              Count = BadSectorsVerify.count();  //lint !e732 Loss of sign
-         else Count = BadSectors      .count();  //lint !e732 Loss of sign
-         SemBadSectors.unlock ();
-         return Count;
-      }
-
-      APIRET ClearBadSectors (void)
-      {
-         SemBadSectors.lock ();
-         BadSectorsVerify.clear();
-         BadSectors      .clear();
-         SemBadSectors.unlock ();
-         return NO_ERROR;
-      }
-
-      APIRET GetMessage (QString &MessageCopy)
-      {
-         SemMessage.lock ();
-         MessageCopy = Message;
-         SemMessage.unlock ();
-         return NO_ERROR;
-      }
-
-      APIRET SetMessage (const QString &NewMessage)
-      {
-         SemMessage.lock ();
-         Message = NewMessage;
-         SemMessage.unlock ();
-         return NO_ERROR;
-      }
-
-      bool HasHashThread         (void) const;
-      bool HasCompressionThreads (void) const;
-      const char *StateStr (void);
-
-   private:
-      void Initialise (void);
-      void InitialiseDeviceSpecific (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                                    quint64 SectorSize, quint64 SectorSizePhys, quint64 Size);
-
-   public:  QString                   SerialNumber;
-            QString                   Model;
-            QString                   LinuxDevice;      // for instance /dev/hda
-            bool                      Local;            // it's a local device (cannot be acquired)
-            quint64                   SectorSize;
-            quint64                   SectorSizePhys;
-            quint64                   Size;
-            bool                      Removable;
-
-            t_State                   State;
-   private: QString                   Message;          // Used by the threads to communicate messages displayed in spreadsheet field "state"
-   public:  bool                      AbortRequest;
-            t_AbortReason             AbortReason;
-            bool                      DeleteAfterAbort;
-
-            t_Acquisition             Acquisition;
-            t_Info                    Info;             // Must only be used if Aqcuisition.InfoFilename is valid!
-
-            FILE                    *pFileSrc;
-            quint64                   CurrentReadPos;   // Accessed from different threads, but never at the same time. During acquisition, it is exclusively accessed by the read threads. Using a mutex would be nicer, but could decrease performance.
-   private: quint64                   CurrentVerifyPos; // Accessed concurrently, use appropriate functions
-   private: quint64                   CurrentWritePos;  // Accessed concurrently, use appropriate functions
-   private: QList<quint64>            BadSectors;       // Accessed concurrently, use appropriate functions
-   private: QList<quint64>            BadSectorsVerify; // Accessed concurrently, use appropriate functions
-   public:  bool                      FallbackMode;     // Set if an error occurs while reading a large block. If set, sectors are read individually until the next large block boundary.
-            QDateTime                 StartTimestamp;
-            QDateTime                 StartTimestampVerify;
-            QDateTime                 StopTimestamp;
-
-   public:  t_ThreadRead            *pThreadRead;
-            t_ThreadHash            *pThreadHash;
-            t_ThreadWrite           *pThreadWrite;
-            QList<t_ThreadCompress *> ThreadCompressList;
-
-   public:  t_pFifo                  pFifoRead;         // Pointers to the Fifos used by the different
-            t_pFifo                  pFifoHashIn;       // threads. Some of them point to the same Fifos,
-            t_pFifo                  pFifoHashOut;      // for instance pFifoRead and pFifoHashIn.
-            t_pFifo                  pFifoWrite;
-            t_pFifoCompressIn        pFifoCompressIn;
-            t_pFifoCompressOut       pFifoCompressOut;
-            int                       FifoMaxBlocks;
-            unsigned int              FifoBlockSize;
-
-
-            t_HashMD5Digest           MD5Digest;
-            t_HashMD5Digest           MD5DigestVerify;
-            t_HashSHA256Digest        SHA256Digest;
-            t_HashSHA256Digest        SHA256DigestVerify;
-
-   public:  quint64                   PrevPos;          // Some variables for
-            QTime                     PrevTimestamp;    // the current speed
-            double                    PrevSpeed;        // calculation.
-            bool                      Checked;          // Helper variable for matching algorithm in SlotScanFinished, not used elsewhere.
-
-   private: QReadWriteLock            SemCurrentWritePos;
-   private: QReadWriteLock            SemCurrentVerifyPos;
-   private: QMutex                    SemBadSectors;
-   private: QMutex                    SemMessage;
-};
-
-class t_DeviceList: public QList<t_pDevice>
-{
-   public:
-      t_DeviceList (void);
-     ~t_DeviceList ();
-
-      t_pDevice AppendNew (const QString &SerialNumber, const PedDevice *pPedDev);
-      t_pDevice AppendNew (const QString &SerialNumber, const QString &LinuxDevice, const QString &Model,
-                           quint64 SectorSize, quint64 SectorSizePhys, quint64 Size=0);
-      APIRET MatchDevice (t_pcDevice pDevCmp, t_pDevice &pDeviceMatch);
-};
-
-typedef t_DeviceList *t_pDeviceList;
-
-Q_DECLARE_METATYPE(t_pDeviceList); //lint !e19 Useless declaration
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_DEVICE_SERNR_MATCH_MODEL_MISMATCH = ERROR_BASE_DEVICE + 1,
-   ERROR_DEVICE_SERNR_MATCH_LENGTH_MISMATCH,
-   ERROR_DEVICE_BAD_STATE,
-   ERROR_DEVICE_BAD_ABORTREASON,
-   ERROR_DEVICE_NOT_CLEAN
-};
-
-
-#endif
-
diff --git a/devicelistmodel.h b/devicelistmodel.h
deleted file mode 100644
index 280cbda..0000000
--- a/devicelistmodel.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Provides all information for displaying the DeviceList on
-//                  screen
-// ****************************************************************************
-
-
-
-#ifndef __DEVICELISTMODEL_H__
-#define __DEVICELISTMODEL_H__
-
-#include <QObject>
-#include <QList>
-#include <QAbstractTableModel>
-
-#include "device.h"
-
-
-class t_DeviceListModel: public QAbstractTableModel
-{
-   Q_OBJECT
-
-   public:
-      t_DeviceListModel ();
-      t_DeviceListModel (t_pDeviceList pDeviceList);
-
-      int  rowCount    (const QModelIndex & parent= QModelIndex()) const;
-      int  columnCount (const QModelIndex & parent= QModelIndex()) const;
-
-      QVariant data       (const QModelIndex &Index, int Role) const;
-      QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
-   public slots:
-      void SlotRefresh (void);
-//      void SlotUpdate  (void);
-
-   private:
-      enum
-      {
-         DATATYPE_QSTRING,
-         DATATYPE_INT32,
-         DATATYPE_INT64,
-         DATATYPE_DEVICE_STATE,
-         DATATYPE_ACQUIRE_STATE,
-      };
-
-      typedef QVariant (* t_pGetDataFn) (t_pDevice pDevice);
-
-      typedef struct
-      {
-         QString       Name;         // The column name as displayed in the table header
-         t_pGetDataFn pGetDataFn;
-         int           DisplayType;  // One of the display type as defined in t_ItemDelegate
-         int           Alignment;    // Use Qt::AlignLeft, Qt::AlignRight, ...
-         int           MinWidth;     // Set to 0 for default width
-      } t_ColAssoc;
-
-      QList<t_ColAssoc> ColAssocList;
-
-      t_pDeviceList poDeviceList;
-};
-
-#endif
diff --git a/dlgabort.cpp b/dlgabort.cpp
deleted file mode 100644
index 936a4d9..0000000
--- a/dlgabort.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Dialog that is opened when aborting an acquisition
-// ****************************************************************************
-
-#include "dlgabort.h"
-
-
-
-// -----------------------------
-//           Constants
-// -----------------------------
-
-
-// -----------------------------
-//           Classes
-// -----------------------------
-
-class t_DlgAbortLocal
-{
-   public:
-      QCheckBox *pCheckBoxDelete;
-};
-
-t_DlgAbort::t_DlgAbort (void)
-{
-   CHK_EXIT (ERROR_DLGABORT_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_DlgAbort::t_DlgAbort (t_pcDevice pDevice, QWidget *pParent, Qt::WFlags Flags)
-   :QDialog (pParent, Flags)
-{
-   static bool Initialised = false;
-   QString     Text;
-   bool        Acquisition;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGABORT_CONSTRUCTOR_NOT_SUPPORTED))
-      Initialised = true;
-   }
-
-   pOwn = new t_DlgAbortLocal;
-
-   Acquisition = ((pDevice->State == t_Device::Acquire) ||
-                  (pDevice->State == t_Device::AcquirePaused));
-   if (Acquisition)
-        Text = tr ("Do you want to abort the acquisition of %1?" ) .arg(pDevice->LinuxDevice);
-   else Text = tr ("Do you want to abort the verification of %1?") .arg(pDevice->LinuxDevice);
-
-   QVBoxLayout *pMainLayout  = new QVBoxLayout ();
-   QHBoxLayout *pButtonLayout= new QHBoxLayout ();
-   QLabel      *pLabel       = new QLabel      (Text, this);
-   QPushButton *pButtonOk    = new QPushButton (QObject::tr("Ok"    ), this);
-   QPushButton *pButtonCancel= new QPushButton (QObject::tr("Cancel"), this);
-   pOwn->pCheckBoxDelete     = new QCheckBox   (tr("Delete partial image files"), this);
-   pOwn->pCheckBoxDelete->setChecked (Acquisition);
-
-   pMainLayout->addWidget   (pLabel);
-   pMainLayout->addWidget   (pOwn->pCheckBoxDelete);
-   pMainLayout->addLayout   (pButtonLayout);
-   pButtonLayout->addWidget (pButtonOk);
-   pButtonLayout->addWidget (pButtonCancel);
-
-   setLayout (pMainLayout);
-   setWindowTitle (tr("Abort?", "Dialog title"));
-
-   CHK_QT_EXIT (connect (pButtonOk    , SIGNAL (released()), this, SLOT(accept())))
-   CHK_QT_EXIT (connect (pButtonCancel, SIGNAL (released()), this, SLOT(reject())))
-}
-
-
-t_DlgAbort::~t_DlgAbort ()
-{
-   delete pOwn;
-}
-
-
-APIRET t_DlgAbort::Show (t_pcDevice pDevice, bool &Abort, bool &Delete)
-{
-   t_DlgAbort *pDlg;
-   int          Result;
-
-   pDlg = new t_DlgAbort (pDevice);
-   pDlg->setModal  (true);
-   Result = pDlg->exec();
-   Abort  = (Result == QDialog::Accepted);
-   Delete = (Abort && pDlg->pOwn->pCheckBoxDelete->isChecked());
-   delete pDlg;
-
-   return NO_ERROR;
-}
-
diff --git a/dlgabort.h b/dlgabort.h
deleted file mode 100644
index 2cc6de9..0000000
--- a/dlgabort.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Dialog that is opened when aborting an acquisition
-// ****************************************************************************
-
-
-#ifndef __DLGABORT_H__
-#define __DLGABORT_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-class t_DlgAbortLocal;
-
-class t_DlgAbort: public QDialog
-{
-   Q_OBJECT
-
-   public:
-      t_DlgAbort ();
-      t_DlgAbort (t_pcDevice pDevice, QWidget *pParent=NULL, Qt::WFlags Flags=0);
-     ~t_DlgAbort ();
-
-      static APIRET Show (t_pcDevice pDevice, bool &Abort, bool &Delete);
-
-   private:
-      t_DlgAbortLocal *pOwn;
-};
-
-enum
-{
-   ERROR_DLGABORT_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_DLGABORT + 1,
-};
-
-#endif
-
diff --git a/dlgacquire.cpp b/dlgacquire.cpp
deleted file mode 100644
index 925b56c..0000000
--- a/dlgacquire.cpp
+++ /dev/null
@@ -1,697 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Acquisition dialog
-// ****************************************************************************
-
-#include <QtGui>
-
-#include "common.h"
-#include "compileinfo.h"
-#include "config.h"
-#include "qtutil.h"
-#include "main.h"
-#include "dlgdirsel.h"
-#include "dlgacquire.h"
-#include "dlgacquire_private.h"
-
-// -----------------------------
-//           Constants
-// -----------------------------
-
-const char *DLG_ACQUIRE_DEFAULT_EMPTY_FILENAME  = "Out";  // Default image file name if - after removing special chars - the file name is empty.
-const char *DLGACQUIRE_PROPERTY_SENDER_LINEEDIT = "SenderLineEdit";
-
-// -----------------------------
-//           Classes
-// -----------------------------
-
-class t_DlgAcquireLocal
-{
-   public:
-      QRadioButton    *pRadioButtonFormatDD;
-      QRadioButton    *pRadioButtonFormatEWF;
-      QRadioButton    *pRadioButtonFormatAFF;
-
-      QList<QWidget*>   EwfWidgetsList;                  // Used to comfortably enable / disable EWF related entry fields and labels
-
-      QCheckBox       *pCheckBoxCalcHashes;
-      QCheckBox       *pCheckBoxVerifySource;
-
-      QPushButton     *pButtonOk;
-      QPushButton     *pButtonCancel;
-
-      QFileDialog     *pDlg;
-
-      t_pDevice        pDevice;
-};
-
-static t_File::Format DlgAcquireLastUsedFormat = t_File::NotSet;  // For remembering the format that was used for the last acquisition
-
-// -----------------------------
-//    Field utility functions
-// -----------------------------
-
-static t_pCfgDlgAcquireField DlgAcquireGetField (const QString &Name)
-{
-   t_pCfgDlgAcquireFields pDlgAcquireFields;
-   t_pCfgDlgAcquireField  pDlgAcquireField;
-   int i;
-
-   CHK_EXIT (CfgGetDlgAcquireFields (&pDlgAcquireFields))
-
-   for (i=0; i<pDlgAcquireFields->count(); i++)
-   {
-      pDlgAcquireField = pDlgAcquireFields->at(i);
-      if (pDlgAcquireField->FieldName.compare(Name, Qt::CaseInsensitive)==0)
-         return pDlgAcquireField;
-   }
-   LOG_ERROR ("DlgAcquire field %s not found", QSTR_TO_PSZ(Name))
-   return NULL;
-}
-
-
-static t_pDlgAcquireLineEdit DlgAcquireGetLineEdit (const QString &Name)
-{
-   return DlgAcquireGetField(Name)->pLineEdit;
-}
-
-
-static APIRET DlgAcquireResolveSpecialSequences (t_pDevice pDevice, bool ConsiderFields, const QString &In, QString &Out)
-{
-   t_pCfgDlgAcquireFields pDlgAcquireFields;
-   t_pCfgDlgAcquireField  pDlgAcquireField;
-   QDateTime               Now = QDateTime::currentDateTime();
-   int                     i;
-   QString                 Search;
-
-   // Replace date/time values
-   // ------------------------
-   Out = In;
-   Out.replace ("%d%"   , Now.toString("d"   ));  // Special sequences
-   Out.replace ("%dd%"  , Now.toString("dd"  ));
-   Out.replace ("%ddd%" , Now.toString("ddd" ));
-   Out.replace ("%dddd%", Now.toString("dddd"));
-   Out.replace ("%M%"   , Now.toString("M"   ));
-   Out.replace ("%MM%"  , Now.toString("MM"  ));
-   Out.replace ("%MMM%" , Now.toString("MMM" ));
-   Out.replace ("%MMMM%", Now.toString("MMMM"));
-   Out.replace ("%yy%"  , Now.toString("yy"  ));
-   Out.replace ("%yyyy%", Now.toString("yyyy"));
-   Out.replace ("%h%"   , Now.toString("h"   ));
-   Out.replace ("%hh%"  , Now.toString("hh"  ));
-   Out.replace ("%m%"   , Now.toString("m"   ));
-   Out.replace ("%mm%"  , Now.toString("mm"  ));
-   Out.replace ("%s%"   , Now.toString("s"   ));
-   Out.replace ("%ss%"  , Now.toString("ss"  ));
-   Out.replace ("%AP%"  , Now.toString("AP"  ));
-   Out.replace ("%ap%"  , Now.toString("ap"  ));
-
-   // Replace device values
-   // ---------------------
-   QString SizeHuman = t_Device::GetSizeHumanFrac (pDevice, true, 0, 10000).toString();
-   SizeHuman.replace (MainGetpNumberLocale()->groupSeparator(), "");
-
-   Out.replace ("%serial%" , pDevice->SerialNumber);
-   Out.replace ("%model%"  , pDevice->Model       );
-   Out.replace ("%size%"   , SizeHuman            );
-   Out.replace ("%version%", pCompileInfoVersion  );
-
-   // Replace field values
-   // --------------------
-   if (ConsiderFields)
-   {
-      CHK_EXIT (CfgGetDlgAcquireFields (&pDlgAcquireFields))
-      for (i=0; i<pDlgAcquireFields->count(); i++)
-      {
-         pDlgAcquireField = pDlgAcquireFields->at(i);
-         Search = "%" + pDlgAcquireField->FieldName + "%";
-         Out.replace (Search, pDlgAcquireField->pLineEdit->text());
-      }
-   }
-
-   return NO_ERROR;
-}
-
-
-static APIRET DlgAcquireGetFieldValue (t_pDevice pDevice, t_pCfgDlgAcquireField pDlgAcquireField, QString &Set)
-{
-   switch (pDlgAcquireField->EntryMode)
-   {
-      case CFG_ENTRYMODE_HIDE:
-      case CFG_ENTRYMODE_SHOWLAST:
-         Set = pDlgAcquireField->LastEnteredValue;
-         if (Set.isNull())
-         {
-            Set = pDlgAcquireField->DefaultValue;
-            CHK (DlgAcquireResolveSpecialSequences (pDevice, false, pDlgAcquireField->DefaultValue, Set))
-         }
-         break;
-
-      case CFG_ENTRYMODE_SHOWDEFAULT:
-         Set = pDlgAcquireField->DefaultValue;
-         CHK (DlgAcquireResolveSpecialSequences (pDevice, false, pDlgAcquireField->DefaultValue, Set))
-         break;
-
-      default:
-         CHK (ERROR_DLGACQUIRE_INVALID_ENTRYMODE)
-   }
-
-   return NO_ERROR;
-}
-
-// -----------------------------
-//         t_DlgAcquire
-// -----------------------------
-
-APIRET t_DlgAcquire::AddField (t_pDevice pDevice, t_pCfgDlgAcquireField pField, QGridLayout *pLayout, int *pRow)
-{
-   t_pDlgAcquireLineEdit  pLineEdit     = NULL;
-   QLabel                *pLabel        = NULL;
-   QPushButton           *pButtonBrowse = NULL;
-   QString                 Set;
-   QSize                   MinButtonSize;
-
-   pLabel    = new QLabel (tr(QSTR_TO_PSZ(pField->FieldName)), this);
-   pLineEdit = new t_DlgAcquireLineEdit (this, pField->FieldName);
-   if ((pField->DirField) && (pField->EntryMode != CFG_ENTRYMODE_HIDE))
-      pButtonBrowse = new QPushButton (tr("...", "The directory browse button"), this);
-
-   pField->pLineEdit = pLineEdit;
-   if (pField->EntryMode == CFG_ENTRYMODE_HIDE)
-   {
-      pLabel   ->hide();
-      pLineEdit->hide();
-   }
-   else
-   {
-      if (pButtonBrowse)
-      {
-         pLayout->addWidget (pLabel       , *pRow, 0);
-         pLayout->addWidget (pButtonBrowse, *pRow, 1);
-         MinButtonSize = pButtonBrowse->minimumSize();
-         MinButtonSize.setWidth(20);
-         pButtonBrowse->setSizePolicy (QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred));   // Allow to shrink horizontal size below preferred minimum
-         pButtonBrowse->setMinimumSize(MinButtonSize);
-      }
-      else
-      {
-         pLayout->addWidget (pLabel, *pRow, 0, 1, 2);        // if there's no button then use the first 2 columns for the label
-      }
-      pLayout->addWidget (pLineEdit, *pRow, 2);
-      if (pField->EwfField)
-      {
-         pOwn->EwfWidgetsList.append (pLabel   );
-         pOwn->EwfWidgetsList.append (pLineEdit);
-      }
-      (*pRow)++;
-   }
-   CHK_EXIT (DlgAcquireGetFieldValue (pDevice, pField, Set))
-   if (pField->DirField)
-   {
-      pLineEdit->setReadOnly (true);
-      if (!Set.endsWith ("/"))
-         Set += "/";
-   }
-   pLineEdit->setText (Set);
-   CHK_QT_EXIT (connect (pLineEdit, SIGNAL (SignalTextEdited (t_DlgAcquireLineEdit *, const QString &)),
-                              this, SLOT   (SlotTextEdited   (t_DlgAcquireLineEdit *, const QString &))))
-   if (pButtonBrowse)
-   {
-      (void) pButtonBrowse->setProperty (DLGACQUIRE_PROPERTY_SENDER_LINEEDIT, qVariantFromValue ((void *)pLineEdit));
-      CHK_QT_EXIT (connect (pButtonBrowse, SIGNAL (released()), this, SLOT(SlotBrowse())))
-   }
-
-   if (pField->DstField)
-      CHK_QT_EXIT (connect (pLineEdit, SIGNAL (textChanged(const QString &)), this, SLOT(UpdateButtonState(const QString &))))
-
-   return NO_ERROR;
-}
-
-
-t_DlgAcquire::t_DlgAcquire ()
-{
-   CHK_EXIT (ERROR_DLGACQUIRE_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_DlgAcquire::t_DlgAcquire (t_pDevice pDevice, QWidget *pParent, Qt::WFlags Flags)
-   :QDialog (pParent, Flags)
-{
-   static bool             Initialised = false;
-   t_pCfgDlgAcquireFields pDlgAcquireFields;
-   t_pCfgDlgAcquireField  pDlgAcquireField;
-   QVBoxLayout           *pLayout;
-   QLabel                *pLabel;
-   QString                 DefaultFilename;
-   QString                 Path;
-   QString                 Str;
-   QString                 ButtonTextDD;
-   QString                 ButtonTextEWF;
-   QString                 ButtonTextAFF;
-   QString                 Set;
-   int                     Row;
-   int                     i;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGACQUIRE_CONSTRUCTOR_NOT_SUPPORTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGACQUIRE_UNKNOWN_FILEDIALOG_SIZE))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGACQUIRE_INVALID_ENTRYMODE))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGACQUIRE_INVALID_FORMAT))
-   }
-
-   setWindowTitle (tr ("Acquisition parameters for %1", "Dialog title, %1 is the device (for instance /dev/hdc)") .arg(pDevice->LinuxDevice));
-
-   pOwn    = new t_DlgAcquireLocal;
-   pOwn->pDevice = pDevice;
-
-   pLayout = new QVBoxLayout (this);
-   setLayout (pLayout);
-
-//   pLayout->addWidget (new QLabel(("<b>" + tr("Acquisition parameters for %1") + "</b>") .arg(pDevice->LinuxDevice) , this));
-
-   // Format box (with EWF fields)
-   // ----------------------------
-   QGroupBox   *pGroupBoxFormat = new QGroupBox (tr("File format"), this);
-   QVBoxLayout *pLayoutFormat   = new QVBoxLayout;
-   QGridLayout *pLayoutEwf      = new QGridLayout ();
-
-   pGroupBoxFormat->setLayout (pLayoutFormat);
-   pLayout->addWidget (pGroupBoxFormat);
-   pLayout->addStretch (1);
-
-   CHK_EXIT (t_File::GetFormatDescription (t_File::DD , Str))            ButtonTextDD  = "&" + Str;
-   CHK_EXIT (t_File::GetFormatDescription (t_File::EWF, Str))            ButtonTextEWF = "&" + Str;
-   CHK_EXIT (t_File::GetFormatDescription (t_File::AFF, Str))            ButtonTextAFF = "&" + Str;
-   CHK_EXIT (t_File::GetFormatExtension   (t_File::DD , NULL, &Str))     ButtonTextDD += " " + tr("(file extension %1)") .arg (Str);
-   CHK_EXIT (t_File::GetFormatExtension   (t_File::EWF, NULL, &Str))     ButtonTextEWF+= " " + tr("(file extension %1)") .arg (Str);
-   CHK_EXIT (t_File::GetFormatExtension   (t_File::AFF, NULL, &Str))     ButtonTextAFF+= " " + tr("(file extension %1)") .arg (Str);
-
-   pOwn->pRadioButtonFormatDD  = new QRadioButton (ButtonTextDD , this);
-   pOwn->pRadioButtonFormatEWF = new QRadioButton (ButtonTextEWF, this);
-   pOwn->pRadioButtonFormatAFF = new QRadioButton (ButtonTextAFF, this);
-
-   pLayoutFormat->addWidget  (pOwn->pRadioButtonFormatDD );
-   pLayoutFormat->addWidget  (pOwn->pRadioButtonFormatEWF);
-   pLayoutFormat->addWidget  (pOwn->pRadioButtonFormatAFF);
-   pLayoutFormat->addLayout  (pLayoutEwf);
-
-   CHK_EXIT (CfgGetDlgAcquireFields (&pDlgAcquireFields))
-
-   Row = 0;
-   for (i=0; i<pDlgAcquireFields->count(); i++)
-   {
-      pDlgAcquireField = pDlgAcquireFields->at(i);
-      if (pDlgAcquireField->EwfField)
-         CHK_EXIT (AddField (pDevice, pDlgAcquireField, pLayoutEwf, &Row))
-   }
-   pLayoutEwf->setColumnMinimumWidth (0, 20);
-
-   // Destination box
-   // ---------------
-   QGroupBox   *pGroupBoxDest = new QGroupBox(tr("Destination"), this);
-   QGridLayout *pLayoutDest   = new QGridLayout ();
-   pGroupBoxDest->setLayout (pLayoutDest);
-   pLayout->addWidget (pGroupBoxDest);
-   pLayout->addStretch (1);
-
-   Row = 0;
-   if (CONFIG(WriteToDevNull))
-   {
-      pLabel = new QLabel(tr("Configuration flag WriteToDevNull is set!"), this);
-      pLayoutDest->addWidget (pLabel, Row++, 0);
-   }
-   //lint -restore
-
-   for (i=0; i<pDlgAcquireFields->count(); i++)
-   {
-      pDlgAcquireField = pDlgAcquireFields->at(i);
-      if (pDlgAcquireField->DstField)
-         CHK_EXIT (AddField (pDevice, pDlgAcquireField, pLayoutDest, &Row))
-   }
-
-   // Hash
-   // ----
-   QGroupBox   *pGroupBoxHash = new QGroupBox(tr("Hash computation"), this);
-   QGridLayout *pLayoutHash   = new QGridLayout ();
-   pGroupBoxHash->setLayout (pLayoutHash);
-   pLayout->addWidget (pGroupBoxHash);
-   pLayout->addStretch (1);
-
-   pOwn->pCheckBoxCalcHashes   = new QCheckBox (tr("Calculate hashes (MD5 and SHA-256)"), this);
-   pOwn->pCheckBoxVerifySource = new QCheckBox (tr("Re-read source after acquisition for verification (takes twice as long)"), this);
-   pLayoutHash->addWidget (pOwn->pCheckBoxCalcHashes  , 0, 0);
-   pLayoutHash->addWidget (pOwn->pCheckBoxVerifySource, 1, 0);
-
-   // Dialog buttons
-   // --------------
-   QHBoxLayout *pLayoutButtons = new QHBoxLayout ();
-   pLayout->addLayout (pLayoutButtons);
-
-   pOwn->pButtonOk     = new QPushButton (QObject::tr("Ok"    ), this);
-   pOwn->pButtonCancel = new QPushButton (QObject::tr("Cancel"), this);
-   pLayoutButtons->addWidget (pOwn->pButtonOk    );
-   pLayoutButtons->addWidget (pOwn->pButtonCancel);
-   pOwn->pButtonOk->setDefault (true);
-
-   // Set other defaults
-   // ------------------
-   if (DlgAcquireLastUsedFormat == t_File::NotSet)
-      DlgAcquireLastUsedFormat = (t_File::Format) CONFIG (DefaultFormat);
-
-   switch (DlgAcquireLastUsedFormat)
-   {
-      case t_File::DD : pOwn->pRadioButtonFormatDD ->setChecked (true); break;
-      case t_File::EWF: pOwn->pRadioButtonFormatEWF->setChecked (true); break;
-      case t_File::AFF: pOwn->pRadioButtonFormatAFF->setChecked (true); break;
-      default         : CHK_EXIT (ERROR_DLGACQUIRE_INVALID_FORMAT)
-   }
-   pOwn->pCheckBoxCalcHashes->setChecked (true);
-
-   UpdateCheckboxState (pOwn->pCheckBoxCalcHashes->isChecked() ? Qt::Checked : Qt::Unchecked);
-   UpdateButtonState   ();
-
-   // Connections
-   // -----------
-   CHK_QT_EXIT (connect (pOwn->pCheckBoxCalcHashes, SIGNAL (stateChanged(int)), this, SLOT(UpdateCheckboxState(int))))
-
-   CHK_QT_EXIT (connect (pOwn->pRadioButtonFormatDD , SIGNAL (released()), this, SLOT(UpdateFieldState())))
-   CHK_QT_EXIT (connect (pOwn->pRadioButtonFormatEWF, SIGNAL (released()), this, SLOT(UpdateFieldState())))
-   CHK_QT_EXIT (connect (pOwn->pRadioButtonFormatAFF, SIGNAL (released()), this, SLOT(UpdateFieldState())))
-
-   CHK_QT_EXIT (connect (pOwn->pButtonOk    , SIGNAL (released()), this, SLOT(SlotAccept())))
-   CHK_QT_EXIT (connect (pOwn->pButtonCancel, SIGNAL (released()), this, SLOT(reject    ())))
-}
-
-void t_DlgAcquire::UpdateCheckboxState (int State)
-{
-   pOwn->pCheckBoxVerifySource->setEnabled (State == Qt::Checked);
-}
-
-void t_DlgAcquire::UpdateButtonState (const QString & /*NewText*/)
-{
-   t_pCfgDlgAcquireFields pFields;
-   t_pCfgDlgAcquireField  pField;
-   bool                    Enabled=true;
-   int                     i;
-
-   CHK_EXIT (CfgGetDlgAcquireFields (&pFields))
-
-   for (i=0; i<pFields->count() && Enabled; i++)
-   {
-      pField = pFields->at(i);
-      if (pField->DstField)
-         Enabled = !pField->pLineEdit->text().isEmpty();
-   }
-
-   pOwn->pButtonOk->setEnabled (Enabled);
-}
-
-void t_DlgAcquire::UpdateFieldState (void)
-{
-   QWidget *pWidget;
-   bool      Enabled;
-   int       i;
-
-   Enabled = (pOwn->pRadioButtonFormatEWF->isChecked() ||
-              pOwn->pRadioButtonFormatAFF->isChecked());
-   for (i = 0;
-        i < pOwn->EwfWidgetsList.count();
-        i++)
-   {
-      pWidget = pOwn->EwfWidgetsList.at(i);
-      pWidget->setEnabled (Enabled);
-   }
-}
-
-void t_DlgAcquire::SlotBrowse (void)
-{
-   t_pDlgAcquireLineEdit pLineEdit;
-   QString                Path;
-   bool                   OkPressed;
-
-   pLineEdit = (t_pDlgAcquireLineEdit) sender()->property (DLGACQUIRE_PROPERTY_SENDER_LINEEDIT).value<void *>();
-
-   if (CONFIG(UseFileDialogFromQt))
-   {
-      Path = QFileDialog::getExistingDirectory(this, tr("Select destination directory", "Dialog title"), pLineEdit->text(), QFileDialog::ShowDirsOnly);
-      OkPressed = !Path.isNull();
-   }
-   else
-   {
-      Path = pLineEdit->text();
-      t_DlgDirSel Dlg (&Path, this);
-
-      switch (CONFIG(FileDialogSize))
-      {
-         case CFG_STARTUPSIZE_STANDARD  :                       break;
-         case CFG_STARTUPSIZE_FULLSCREEN: Dlg.showFullScreen(); break;
-         case CFG_STARTUPSIZE_MAXIMIZED : Dlg.showMaximized (); break;
-         case CFG_STARTUPSIZE_MANUAL    : CHK_EXIT (QtUtilSetGeometryCentered (&Dlg, CONFIG(FileDialogSizeManualDx), CONFIG(FileDialogSizeManualDy))); break;
-         default                        : CHK_EXIT (ERROR_DLGACQUIRE_UNKNOWN_FILEDIALOG_SIZE)
-      }
-      OkPressed = (Dlg.exec() == QDialog::Accepted);
-   }
-
-   if (OkPressed)
-   {
-      if (!Path.endsWith ("/"))
-         Path += "/";
-      pLineEdit->setText (Path); // setText doesn't emit a textEdited signal (that's completely right  in order to prevent endless
-      pLineEdit->TextUpdated (); // update signals) and so we have the LineEdit emit a SignalTextEdit, thus triggering field updates.
-   }
-}
-
-void t_DlgAcquire::SlotTextEdited (t_pDlgAcquireLineEdit pLineEdit, const QString &/*NewVal*/)
-{
-   t_pCfgDlgAcquireRules pDlgAcquireRules;
-   t_pCfgDlgAcquireRule  pDlgAcquireRule;
-   t_pDlgAcquireLineEdit pLineEditDest;
-   int                    i;
-   QString                Set;
-
-//   printf ("\nNewVal in %s: %s", QSTR_TO_PSZ(pLineEdit->Name), QSTR_TO_PSZ(NewVal));
-
-   CHK_EXIT (CfgGetDlgAcquireRules (&pDlgAcquireRules))
-
-   for (i=0; i<pDlgAcquireRules->count(); i++)
-   {
-      pDlgAcquireRule = pDlgAcquireRules->at(i);
-      if (pDlgAcquireRule->TriggerFieldName.compare (pLineEdit->Name, Qt::CaseInsensitive) == 0)
-      {
-         pLineEditDest = DlgAcquireGetLineEdit (pDlgAcquireRule->DestFieldName);
-
-         CHK_EXIT (DlgAcquireResolveSpecialSequences (pOwn->pDevice, true, pDlgAcquireRule->Value, Set))
-         pLineEditDest->setText(Set);
-      }
-   }
-}
-
-static APIRET DlgAcquireCheckFilename (const QString &In, bool &Clean, QString &Out)
-{
-   unsigned char Ch;
-   int           i;
-   bool          Ok;
-   QString       SpecialChars = CONFIG (SpecialFilenameChars);
-
-   Clean = true;
-   Out   = "";
-   for (i=0; i<In.length(); i++)
-   {
-      Ch = In[i].toAscii();
-      Ok = ((Ch >= '0') && (Ch <= '9')) ||
-           ((Ch >= 'a') && (Ch <= 'z')) ||
-           ((Ch >= 'A') && (Ch <= 'Z')) ||
-            (Ch == '_') || SpecialChars.contains(Ch);
-      if (Ok)
-           Out += Ch;
-      else Clean = false;
-   }
-   if (Out.isEmpty())
-      Out = DLG_ACQUIRE_DEFAULT_EMPTY_FILENAME;
-
-   return NO_ERROR;
-}
-
-
-APIRET t_DlgAcquire::CheckWriteAccess (const QString &Path, const QString &Filename, bool &Ok)
-{
-   FILE       *pFile;
-   const char *pStr = "Test file created by Guymager for checking write access.\r\nYou may delete this file";
-   const int    StrLen = strlen (pStr);
-   QString      TestFileName = Path + Filename + ".test";
-   int          wr;
-
-   pFile = fopen (QSTR_TO_PSZ(TestFileName), "w");
-   Ok = (pFile != NULL);
-   if (!Ok)
-   {
-      LOG_INFO ("Opening test file %s failed.", QSTR_TO_PSZ(TestFileName))
-   }
-   else
-   {
-      if ((wr = fprintf (pFile, "%s", pStr)) != StrLen)
-      {
-         Ok = false;
-         LOG_INFO ("Writing to test file %s failed, %d of %d bytes written.", QSTR_TO_PSZ(TestFileName), wr, StrLen)
-      }
-
-      if (fclose (pFile) != 0)
-      {
-         Ok = false;
-         LOG_INFO ("Closing test file %s failed", QSTR_TO_PSZ(TestFileName))
-      }
-
-      if (!QFile::remove (TestFileName))
-      {
-         Ok = false;
-         LOG_INFO ("Removing the test file %s failed.", QSTR_TO_PSZ(TestFileName))
-      }
-   }
-
-   if (!Ok)
-      QMessageBox::information (this, tr ("Access denied", "Dialog title"),
-                                      tr ("Guymager cannot write to the directory"
-                                          "\n\t%1"
-                                          "\nThis may be due to insufficient access rights. Please choose another directory.")
-                                          .arg(Path), QMessageBox::Ok);
-   return NO_ERROR;
-}
-
-
-void t_DlgAcquire::SlotAccept (void)
-{
-   t_Device::t_Acquisition      Acquisition;
-   t_pDlgAcquireLineEdit       pLineEditDestImageFilename;
-   t_pDlgAcquireLineEdit       pLineEditDestInfoFilename ;
-   QMessageBox::StandardButton  Button;
-   QString                      ImageFilenameCorrected;
-   QString                      InfoFilenameCorrected;
-   bool                         ImageFilenameClean;
-   bool                         InfoFilenameClean;
-
-   CHK_EXIT (GetParameters (Acquisition, false))
-
-   // Check for strange characters in filenames
-   // -----------------------------------------
-
-   pLineEditDestImageFilename = DlgAcquireGetField (CFG_DLGACQUIRE_DEST_IMAGEFILENAME)->pLineEdit;
-   pLineEditDestInfoFilename  = DlgAcquireGetField (CFG_DLGACQUIRE_DEST_INFOFILENAME )->pLineEdit;
-
-   CHK_EXIT (DlgAcquireCheckFilename (pLineEditDestImageFilename->text(), ImageFilenameClean, ImageFilenameCorrected))
-   CHK_EXIT (DlgAcquireCheckFilename (pLineEditDestInfoFilename ->text(), InfoFilenameClean,  InfoFilenameCorrected ))
-
-   if (!ImageFilenameClean || !InfoFilenameClean)
-   {
-      LOG_INFO ("Unallowed characters in filenames found")
-      Button = QMessageBox::question (this, tr ("Special characters", "Dialog title"),
-                                            tr ("The filenames contain special characters which are not allowed. Guymager suggests the "
-                                                "following changes:"
-                                                "\n\tImage filename: %1"
-                                                "\n\tInfo filename: %2"
-                                                "\nDo you accept these changes?") .arg(ImageFilenameCorrected) .arg(InfoFilenameCorrected),
-                                                QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
-      if (Button == QMessageBox::Yes)
-      {
-         LOG_INFO ("User accepts filename changes")
-         pLineEditDestImageFilename->setText(ImageFilenameCorrected);
-         pLineEditDestInfoFilename ->setText(InfoFilenameCorrected );
-      }
-      else
-      {
-         LOG_INFO ("User rejects filename changes")
-         return;
-      }
-   }
-
-   // Check if file can be created on destination path
-   // ------------------------------------------------
-   bool Ok;
-
-   CHK_EXIT (t_DlgAcquire::CheckWriteAccess (Acquisition.InfoPath , Acquisition.InfoFilename , Ok))
-   if (Ok)
-      CHK_EXIT (t_DlgAcquire::CheckWriteAccess (Acquisition.ImagePath, Acquisition.ImageFilename, Ok))
-   if (!Ok)
-      return;
-
-   // Check if image file already exists
-   // ----------------------------------
-
-   QDir    Dir (Acquisition.ImagePath);
-   QString ExtensionImage;
-   bool    Empty;
-   QString NameFilter;
-
-   CHK_EXIT (t_File::GetFormatExtension (Acquisition.Format, &ExtensionImage))
-   NameFilter = Acquisition.ImageFilename + ExtensionImage;
-   Empty = Dir.entryInfoList (QStringList(NameFilter), QDir::Files, QDir::Name).isEmpty();
-   if (Empty)
-   {
-      Dir.setPath (Acquisition.InfoPath);
-      NameFilter = Acquisition.InfoFilename + t_File::pExtensionInfo;
-      Empty = Dir.entryInfoList (QStringList(NameFilter), QDir::Files, QDir::Name).isEmpty();
-   }
-
-   if (!Empty)
-   {
-      LOG_INFO ("Images files already exist")
-      Button = QMessageBox::question (this, tr ("Images files exist", "Dialog title"),
-                                            tr ("The image files already exist. Do you want to overwrite them?"),
-                                                QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
-      if (Button == QMessageBox::Yes)
-      {
-         LOG_INFO ("User accepts to overwrite existing image")
-      }
-      else
-      {
-         LOG_INFO ("User rejects to overwrite existing image")
-         return;
-      }
-   }
-   accept();
-}
-
-
-APIRET t_DlgAcquire::GetParameters (t_Device::t_Acquisition &Acquisition, bool RememberLastUsedValues)
-{
-   t_pCfgDlgAcquireField pDlgAcquireField;
-
-   Acquisition.CalcHashes   = pOwn->pCheckBoxCalcHashes  ->isChecked();
-   Acquisition.VerifySource = pOwn->pCheckBoxVerifySource->isChecked();
-   if      (pOwn->pRadioButtonFormatDD ->isChecked()) Acquisition.Format = t_File::DD;
-   else if (pOwn->pRadioButtonFormatEWF->isChecked()) Acquisition.Format = t_File::EWF;
-   else                                               Acquisition.Format = t_File::AFF;
-   if (RememberLastUsedValues)
-      DlgAcquireLastUsedFormat = Acquisition.Format;
-
-   #define COPY_VALUE(Acq, FieldName)                    \
-      pDlgAcquireField = DlgAcquireGetField (FieldName); \
-      Acq = pDlgAcquireField->pLineEdit->text();         \
-      if (RememberLastUsedValues)                        \
-         pDlgAcquireField->LastEnteredValue = Acq;
-
-   COPY_VALUE (Acquisition.CaseNumber    , CFG_DLGACQUIRE_EWF_CASENUMBER     )
-   COPY_VALUE (Acquisition.EvidenceNumber, CFG_DLGACQUIRE_EWF_EVIDENCENUMBER )
-   COPY_VALUE (Acquisition.Examiner      , CFG_DLGACQUIRE_EWF_EXAMINER       )
-   COPY_VALUE (Acquisition.Description   , CFG_DLGACQUIRE_EWF_DESCRIPTION    )
-   COPY_VALUE (Acquisition.Notes         , CFG_DLGACQUIRE_EWF_NOTES          )
-   COPY_VALUE (Acquisition.ImagePath     , CFG_DLGACQUIRE_DEST_IMAGEDIRECTORY)
-   COPY_VALUE (Acquisition.ImageFilename , CFG_DLGACQUIRE_DEST_IMAGEFILENAME )
-   COPY_VALUE (Acquisition.InfoPath      , CFG_DLGACQUIRE_DEST_INFODIRECTORY )
-   COPY_VALUE (Acquisition.InfoFilename  , CFG_DLGACQUIRE_DEST_INFOFILENAME  )
-   #undef COPY_VALUE
-
-   return NO_ERROR;
-}
-
-t_DlgAcquire::~t_DlgAcquire ()
-{
-   delete pOwn;
-}
-
diff --git a/dlgacquire.h b/dlgacquire.h
deleted file mode 100644
index 94ffcca..0000000
--- a/dlgacquire.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Acquisition dialog
-// ****************************************************************************
-
-
-#ifndef __DLGACQUIRE_H__
-#define __DLGACQUIRE_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-#ifndef __CONFIG_H__
-   class   t_CfgDlgAcquireField;
-   typedef t_CfgDlgAcquireField *t_pCfgDlgAcquireField;
-#endif
-
-class t_DlgAcquireLineEdit;
-class t_DlgAcquireLocal;
-
-class t_DlgAcquire: public QDialog
-{
-   Q_OBJECT
-
-   public:
-      t_DlgAcquire ();
-      t_DlgAcquire (t_pDevice pDevice, QWidget *pParent=NULL, Qt::WFlags Flags=0);
-     ~t_DlgAcquire ();
-
-      APIRET GetParameters (t_Device::t_Acquisition &Acquisition, bool RememberLastUsedValues=true);
-   private:
-      APIRET AddField         (t_pDevice pDevice, t_pCfgDlgAcquireField pField, QGridLayout *pLayout, int *pRow);
-      APIRET CheckWriteAccess (const QString &Path, const QString &Filename, bool &Ok);
-
-   private slots:
-      void UpdateCheckboxState (int State);
-      void UpdateButtonState   (const QString & NewText = QString());
-      void UpdateFieldState    (void);
-      void SlotBrowse          (void);
-      void SlotAccept          (void);
-      void SlotTextEdited      (t_DlgAcquireLineEdit *pLineEdit, const QString &NewVal);
-
-   private:
-      t_DlgAcquireLocal *pOwn;
-};
-
-enum
-{
-   ERROR_DLGACQUIRE_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_DLGACQUIRE + 1,
-   ERROR_DLGACQUIRE_UNKNOWN_FILEDIALOG_SIZE,
-   ERROR_DLGACQUIRE_INVALID_ENTRYMODE,
-   ERROR_DLGACQUIRE_INVALID_FORMAT
-};
-
-#endif
-
diff --git a/dlgacquire_private.h b/dlgacquire_private.h
deleted file mode 100644
index 7f1a792..0000000
--- a/dlgacquire_private.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Private definitions of acquisition dialog
-// ****************************************************************************
-
-
-#ifndef __DLGACQUIRE_PRIVATE_H__
-#define __DLGACQUIRE_PRIVATE_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-class   t_DlgAcquireLineEdit;
-typedef t_DlgAcquireLineEdit *t_pDlgAcquireLineEdit;
-
-class   t_DlgAcquireLineEdit: public QLineEdit
-{
-   Q_OBJECT
-
-   public:
-      t_DlgAcquireLineEdit (QWidget *pParent, const QString &Name)
-         :QLineEdit (pParent)
-      {
-         this->Name = Name;
-         CHK_QT_EXIT (connect (this, SIGNAL (textEdited     (const QString &)),
-                               this, SLOT   (SlotTextEdited (const QString &))))
-
-      }
-
-     ~t_DlgAcquireLineEdit() {}
-
-     void TextUpdated (void)
-     {
-        emit SignalTextEdited (this, text());
-     }
-
-   public:
-      QString Name;
-
-   private slots:
-      void SlotTextEdited (const QString &Text)
-      {
-         emit SignalTextEdited (this, Text);
-      }
-
-   signals:
-      void SignalTextEdited (t_DlgAcquireLineEdit *pDlgAcquireLineEdit, const QString &Text);
-};
-
-#endif
-
diff --git a/dlgdirsel.cpp b/dlgdirsel.cpp
deleted file mode 100644
index 7c60a45..0000000
--- a/dlgdirsel.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Directory selection dialog
-// ****************************************************************************
-
-#include <QtGui>
-
-#include "common.h"
-#include "dlgmessage.h"
-#include "dlgdirsel.h"
-#include "dlgdirsel_private.h"
-
-// -----------------------------
-//           Constants
-// -----------------------------
-
-
-// -----------------------------
-//           Classes
-// -----------------------------
-
-class t_DlgDirSelLocal
-{
-   public:
-      QDirModel   *pModel;
-      t_TreeView  *pTree;
-      QPushButton *pButtonOk;
-      QPushButton *pButtonCancel;
-      QString     *pPath;
-};
-
-t_DlgDirSel::t_DlgDirSel ()
-{
-   CHK_EXIT (ERROR_DLGDIRSEL_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_DlgDirSel::t_DlgDirSel (QString *pPath, QWidget *pParent, Qt::WFlags Flags)
-   :QDialog (pParent, Flags)
-{
-   QVBoxLayout *pLayout;
-   static bool   Initialised = false;
-   QModelIndex   IndexCurrentDir;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGDIRSEL_CONSTRUCTOR_NOT_SUPPORTED))
-   }
-
-   pOwn         = new t_DlgDirSelLocal;
-   pOwn->pTree  = new t_TreeView (this);
-   pOwn->pModel = new QDirModel  (this);
-   pOwn->pModel->setReadOnly (false);
-   pOwn->pTree ->setModel(pOwn->pModel);
-   pOwn->pPath  = pPath;
-
-   IndexCurrentDir = pOwn->pModel->index(*pPath);
-   pOwn->pTree->setCurrentIndex (IndexCurrentDir);
-   pOwn->pTree->setExpanded     (IndexCurrentDir, true);
-   pOwn->pTree->scrollTo        (IndexCurrentDir);
-   pOwn->pTree->setColumnWidth  (0, 300);
-
-   setWindowTitle (tr ("Select destination directory", "Dialog title"));
-   pLayout = new QVBoxLayout (this);
-   setLayout (pLayout);
-
-   pLayout->addWidget (pOwn->pTree);
-
-
-   // Dialog buttons
-   // --------------
-
-   QHBoxLayout *pLayoutButtons = new QHBoxLayout ();
-   pLayout->addLayout (pLayoutButtons);
-
-   pOwn->pButtonOk     = new QPushButton (QObject::tr("Ok"    ), this);
-   pOwn->pButtonCancel = new QPushButton (QObject::tr("Cancel"), this);
-   pLayoutButtons->addWidget (pOwn->pButtonOk    );
-   pLayoutButtons->addWidget (pOwn->pButtonCancel);
-   pOwn->pButtonOk->setDefault (true);
-
-   CHK_QT_EXIT (connect (pOwn->pButtonOk    , SIGNAL (released()), this, SLOT(SlotAccept())))
-   CHK_QT_EXIT (connect (pOwn->pButtonCancel, SIGNAL (released()), this, SLOT(reject    ())))
-   CHK_QT_EXIT (connect (pOwn->pTree, SIGNAL(SignalCurrentChanged (const QModelIndex &)),
-                         this       , SLOT  (SlotCurrentChanged   (const QModelIndex &))))
-
-
-   pOwn->pTree->setContextMenuPolicy(Qt::CustomContextMenu);
-   CHK_QT_EXIT (connect(pOwn->pTree, SIGNAL(customContextMenuRequested(const QPoint &)),
-                        this       , SLOT  (SlotContextMenu           (const QPoint &))))
-}
-
-void t_DlgDirSel::SlotCurrentChanged (const QModelIndex &Current)
-{
-   bool Enable;
-
-   Enable = pOwn->pModel->isDir (Current);
-   pOwn->pButtonOk->setEnabled(Enable);
-}
-
-void t_DlgDirSel::SlotContextMenu (const QPoint &Position)
-{
-   QMenu        Menu;
-   QAction      ActionNewDir (tr("New directory"), this);
-   QAction      ActionRmDir  (tr("Remove directory"), this);
-   QAction    *pAction;
-   QModelIndex  CurrentIndex;
-
-   CurrentIndex = pOwn->pTree->indexAt (Position);
-   if (CurrentIndex.isValid() && pOwn->pModel->isDir (CurrentIndex))
-   {
-      Menu.addAction (&ActionNewDir);
-      Menu.addAction (&ActionRmDir);
-
-      pAction = Menu.exec (pOwn->pTree->mapToGlobal (Position));
-
-      if (pAction == &ActionNewDir)
-      {
-         pOwn->pModel->mkdir (CurrentIndex, tr("NewDirectory", "Name of the new directory that will be created"));
-      }
-      else if (pAction == &ActionRmDir)
-      {
-         bool Success = pOwn->pModel->rmdir (CurrentIndex);
-         if (!Success)
-            CHK_EXIT (t_DlgMessage::Show ("Cannot be removed", "Only empty directories can be removed", false))
-      }
-   }
-}
-
-
-void t_DlgDirSel::SlotAccept (void)
-{
-   QModelIndex IndexCurrent;
-
-   IndexCurrent = pOwn->pTree->currentIndex();
-   *(pOwn->pPath) = pOwn->pModel->filePath (IndexCurrent);
-
-   accept();
-}
-
-
-t_DlgDirSel::~t_DlgDirSel ()
-{
-   delete pOwn->pModel;
-   delete pOwn->pTree;
-   delete pOwn;
-}
-
diff --git a/dlgdirsel.h b/dlgdirsel.h
deleted file mode 100644
index a2c4715..0000000
--- a/dlgdirsel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Directory selection dialog
-// ****************************************************************************
-
-
-#ifndef __DLGDIRSEL_H__
-#define __DLGDIRSEL_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-
-class t_DlgDirSelLocal;
-
-class t_DlgDirSel: public QDialog
-{
-   Q_OBJECT
-
-   public:
-      t_DlgDirSel ();
-      t_DlgDirSel (QString *pPath, QWidget *pParent=NULL, Qt::WFlags Flags=0);
-     ~t_DlgDirSel ();
-
-   private:
-      t_DlgDirSelLocal *pOwn;
-
-   private slots:
-      void SlotAccept         (void);
-      void SlotCurrentChanged (const QModelIndex &Current);
-      void SlotContextMenu    (const QPoint &Position);
-};
-
-enum
-{
-   ERROR_DLGDIRSEL_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_DLGDIRSEL + 1,
-};
-
-#endif
-
diff --git a/dlgdirsel_private.h b/dlgdirsel_private.h
deleted file mode 100644
index 81fabe1..0000000
--- a/dlgdirsel_private.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Private definitions of directory selection dialog
-// ****************************************************************************
-
-
-#ifndef __DLGDIRSEL_PRIVATE_H__
-#define __DLGDIRSEL_PRIVATE_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-class t_TreeView: public QTreeView
-{
-   Q_OBJECT
-
-   public:
-      t_TreeView (QWidget *pParent=NULL)
-         :QTreeView (pParent)
-      {
-      }
-
-     ~t_TreeView (void)
-      {
-      }
-
-   protected:
-      virtual void currentChanged (const QModelIndex &Current, const QModelIndex &Previous)
-      {
-         QTreeView::currentChanged (Current, Previous);
-         emit SignalCurrentChanged (Current);
-      }
-
-   signals:
-      void SignalCurrentChanged (const QModelIndex &Current);
-};
-
-#endif
-
diff --git a/dlgmessage.cpp b/dlgmessage.cpp
deleted file mode 100644
index cabdd8b..0000000
--- a/dlgmessage.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different message boxes we need all the time
-// ****************************************************************************
-
-#include "dlgmessage.h"
-
-// -----------------------------
-//           Constants
-// -----------------------------
-
-const int DLGMESSAGE_MAX_SCREEN_PERCENTAGE = 80;  // When opening the dialog, do not use more than 80% of the screen width / height
-
-// -----------------------------
-//           Classes
-// -----------------------------
-
-class t_DlgMessageLocal
-{
-   public:
-      QVBoxLayout *pLayout;
-      QTextEdit   *pTextBox;
-      QPushButton *pButtonClose;
-};
-
-t_DlgMessage::t_DlgMessage ()
-{
-   CHK_EXIT (ERROR_DLGMESSAGE_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_DlgMessage::t_DlgMessage (const QString &Title, const QString &Message, bool Monospaced, QWidget *pParent, Qt::WFlags Flags)
-   :QDialog (pParent, Flags)
-{
-   static bool Initialised = false;
-   QSize       MaxSize;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGMESSAGE_CONSTRUCTOR_NOT_SUPPORTED))
-   }
-
-   pOwn = new t_DlgMessageLocal;
-
-   pOwn->pLayout      = new QVBoxLayout ();
-   if (Monospaced)
-        pOwn->pTextBox = new QTextEdit ("<pre>" + Message + "</pre>", this); // Use "pre" in order to have the text displayed in monospaced font and with CRLF interpreted the way we want
-   else pOwn->pTextBox = new QTextEdit (          Message           , this);
-   pOwn->pButtonClose = new QPushButton (tr("Close"), this);
-
-   pOwn->pLayout->addWidget (pOwn->pTextBox    );
-   pOwn->pLayout->addWidget (pOwn->pButtonClose);
-
-   pOwn->pTextBox->setReadOnly (true);
-   pOwn->pTextBox->zoomIn ();
-
-   setLayout (pOwn->pLayout);
-   setWindowTitle (Title);
-
-   CHK_QT_EXIT (connect (pOwn->pButtonClose, SIGNAL (released()), this, SLOT(accept())))
-}
-
-void t_DlgMessage::AdjustGeometry (void)
-{
-   int X, Y;
-   int Dx, Dy;
-
-   // Trying to adjust the size of the dialog to size of the text inside. Not easy, as Qt doesn't provide the right functions for
-   // doing so. Important: AdjustSize must be called after the dialog has been showed in order have QTextBox calculated all scroll
-   // bar values.
-   Dx  = pOwn->pTextBox->horizontalScrollBar()->maximum();     // See source code of QAbstractScrollArea: The scroll bar range is the full
-   Dy  = pOwn->pTextBox->verticalScrollBar  ()->maximum();     // scroll area width minus the window area displayed. So, we, take the
-   Dx += pOwn->pTextBox->viewport()->width ();                 // scroll bar range and add the viewport size.
-   Dy += pOwn->pTextBox->viewport()->height();
-   Dx += pOwn->pTextBox->verticalScrollBar  ()->height();      // Scrollbars need some place as well...
-   Dy += pOwn->pTextBox->horizontalScrollBar()->height();
-   Dx += frameGeometry().width () - pOwn->pTextBox->width ();  // Add the space surrounding the Textbox required by the dialog
-   Dy += frameGeometry().height() - pOwn->pTextBox->height();
-
-   Dx = std::min (Dx, (DLGMESSAGE_MAX_SCREEN_PERCENTAGE * QApplication::desktop()->width ()) / 100);  // Limit to a certain amount
-   Dy = std::min (Dy, (DLGMESSAGE_MAX_SCREEN_PERCENTAGE * QApplication::desktop()->height()) / 100);  // of the available screen space
-
-   X = (QApplication::desktop()->width  () - Dx) / 2;
-   Y = (QApplication::desktop()->height () - Dy) / 2;
-   setGeometry (X, Y, Dx, Dy);
-}
-
-t_DlgMessage::~t_DlgMessage ()
-{
-   delete pOwn;
-}
-
-APIRET t_DlgMessage::Show (const QString &Title, const QString &Message, bool Monospaced)
-{
-   t_DlgMessage *pDlg;
-
-   pDlg = new t_DlgMessage (Title, Message, Monospaced);
-   pDlg->setModal      (true);
-   pDlg->show          ();
-   pDlg->AdjustGeometry();
-   pDlg->exec          ();
-   delete pDlg;
-
-   return NO_ERROR;
-}
-
diff --git a/dlgmessage.h b/dlgmessage.h
deleted file mode 100644
index c14d28f..0000000
--- a/dlgmessage.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different message boxes we need all the time
-// ****************************************************************************
-
-
-#ifndef __DLGMESSAGE_H__
-#define __DLGMESSAGE_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-class t_DlgMessageLocal;
-
-class t_DlgMessage: public QDialog
-{
-   Q_OBJECT
-
-   public:
-      t_DlgMessage ();
-      t_DlgMessage (const QString &Title, const QString &Message, bool Monospaced=false, QWidget *pParent=NULL, Qt::WFlags Flags=0);
-     ~t_DlgMessage ();
-
-      void AdjustGeometry (void);
-
-      static APIRET Show (const QString &Title, const QString &Message, bool Monospaced=false);
-
-   private:
-      t_DlgMessageLocal *pOwn;
-};
-
-enum
-{
-   ERROR_DLGMESSAGE_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_DLGMESSAGE + 1,
-};
-
-#endif
-
diff --git a/dlgwait.cpp b/dlgwait.cpp
deleted file mode 100644
index 818a5a7..0000000
--- a/dlgwait.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Wait dialog
-// ****************************************************************************
-
-#include "dlgwait.h"
-
-// -----------------------------
-//           Constants
-// -----------------------------
-
-
-// -----------------------------
-//           Classes
-// -----------------------------
-
-class t_DlgWaitLocal
-{
-   public:
-      QLabel *pLabel;
-};
-
-t_DlgWait::t_DlgWait ()
-{
-   CHK_EXIT (ERROR_DLGWAIT_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_DlgWait::t_DlgWait (const QString &Title, const QString &Message, QWidget *pParent, Qt::WFlags Flags)
-   :QDialog (pParent, Flags)
-{
-   static bool Initialised = false;
-   QSize       MaxSize;
-   QVBoxLayout *pLayout;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_DLGWAIT_CONSTRUCTOR_NOT_SUPPORTED))
-   }
-
-   pOwn = new t_DlgWaitLocal;
-
-   pLayout = new QVBoxLayout ();
-   pOwn->pLabel = new QLabel (Message, this);
-
-   pLayout->addWidget (pOwn->pLabel);
-
-   setLayout (pLayout);
-   setWindowTitle (Title);
-
-//   CHK_QT_EXIT (connect (pOwn->pButtonClose, SIGNAL (released()), this, SLOT(accept())))
-}
-
-APIRET t_DlgWait::setLabelText (const QString &Text)
-{
-   pOwn->pLabel->setText (Text);
-
-   return NO_ERROR;
-}
-
-t_DlgWait::~t_DlgWait ()
-{
-   delete pOwn->pLabel;
-   delete pOwn;
-}
-
-APIRET t_DlgWait::Show (const QString &Title, const QString &Message)
-{
-   t_DlgWait *pDlg;
-
-   pDlg = new t_DlgWait (Title, Message);
-   pDlg->setModal      (true);
-   pDlg->show          ();
-   pDlg->exec          ();
-   delete pDlg;
-
-   return NO_ERROR;
-}
-
diff --git a/dlgwait.h b/dlgwait.h
deleted file mode 100644
index 21ab2d8..0000000
--- a/dlgwait.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Wait dialog
-// ****************************************************************************
-
-
-#ifndef __DLGWAIT_H__
-#define __DLGWAIT_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-class t_DlgWaitLocal;
-
-class t_DlgWait: public QDialog
-{
-   Q_OBJECT
-
-   public:
-      t_DlgWait ();
-      t_DlgWait (const QString &Title, const QString &Message, QWidget *pParent=NULL, Qt::WFlags Flags=0);
-     ~t_DlgWait ();
-
-      static APIRET Show (const QString &Title, const QString &Message);
-      APIRET setLabelText (const QString &Text);
-
-   private:
-      t_DlgWaitLocal *pOwn;
-};
-
-enum
-{
-   ERROR_DLGWAIT_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_DLGWAIT + 1,
-};
-
-#endif
-
diff --git a/error.cpp b/error.cpp
deleted file mode 100644
index 74ab7e3..0000000
--- a/error.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Error handling utilities
-// ****************************************************************************
-
-
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include <QtGui>
-
-#include "common.h"
-#include "qtutil.h"
-
-
-// -----------------------
-//     Constants
-// -----------------------
-
-static const int EXIT_SLEEP_BEFORE_EXIT = 3000; // ms
-
-// -----------------------
-//     Local variables
-// -----------------------
-
-static int ErrorPopupCounter = 0;
-
-
-// -----------------------
-//       Functions
-// -----------------------
-
-void ErrorExit (int ExitCode)
-{
-   LOG_ERROR ("Exiting GUYMAGER with code %d", ExitCode)
-   printf ("\n\n");
-
-   (void) QtUtilSleep (EXIT_SLEEP_BEFORE_EXIT); // Quite often, the last messages of the slave cannot be
-   exit (ExitCode);
-}
-
-
-void ErrorPopupExit (const char *pFileName, const char *pFunctionName, int LineNr, APIRET ec, const char *pMsg)
-{
-   const char *pErr;
-   QString      MsgTxt;
-
-   if (ErrorPopupCounter < 3)   // If there are already several windows, then they are most probably generated by a timer and we risk
-   {                    // to fill up the screen without being able to click them all away. So, we simply exit here.
-      ErrorPopupCounter++;
-      (void) ToolErrorCheck (pFileName, pFunctionName, LineNr, ec);
-      pErr = ToolErrorMessage(ec);
-      if (pMsg)
-           MsgTxt = QString(pMsg) + QString("\n") + QString(pErr);
-      else MsgTxt = pErr;
-      (void) QMessageBox::critical (0, "Internal error", MsgTxt);
-   }
-   ErrorExit ();
-}
-
-APIRET ErrorInit (void)
-{
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QT_UNSUCCESSFUL))
-   return NO_ERROR;
-}
-
-APIRET ErrorDeInit (void)
-{
-   return NO_ERROR;
-}
-
-
diff --git a/error.h b/error.h
deleted file mode 100644
index 9a95904..0000000
--- a/error.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Error handling utilities
-// ****************************************************************************
-
-#ifndef __ERROR_H__
-#define __ERROR_H__
-
-// -----------------------
-//       Exit codes
-// -----------------------
-
-static const int EXIT_NO_ERROR        = 0;
-static const int EXIT_INTERNAL_ERROR  = 1;
-static const int EXIT_QT_FATAL        = 2;
-static const int EXIT_SIGNAL_RECEIVED = 3;
-
-// -----------------------
-//      Prototypes
-// -----------------------
-
-void ErrorExit (int ExitCode = EXIT_INTERNAL_ERROR);
-void ErrorPopupExit (const char *pFileName, const char *pFunctionName, int LineNr, APIRET ec, const char *pMsg);
-
-APIRET ErrorInit   (void);
-APIRET ErrorDeInit (void);
-
-// -----------------------
-//  Error handling macros
-// -----------------------
-
-
-#define CHK_QT(Func)                                              \
-   {                                                              \
-      if (Func == 0)                                              \
-      {                                                           \
-         (void)ToolErrorCheck (__FFL__, ERROR_QT_UNSUCCESSFUL);   \
-         return ERROR_QT_UNSUCCESSFUL;                            \
-      }                                                           \
-   }
-
-
-#define CHK_QT_POPUP(Func)                                        \
-   {                                                              \
-      if (Func == 0)                                              \
-         ErrorPopupExit (__FFL__, ERROR_QT_UNSUCCESSFUL, "Qt returned FALSE");  \
-   }
-
-
-#define CHK_QT_EXIT(Func)                                         \
-   {                                                              \
-      if (Func == 0)                                              \
-      {                                                           \
-         (void)ToolErrorCheck (__FFL__, ERROR_QT_UNSUCCESSFUL);   \
-         exit (EXIT_QT_FATAL);                                    \
-      }                                                           \
-   }
-
-
-
-#define CHK_EXIT(Func)                        \
-   {                                          \
-      APIRET ec;                              \
-      /*lint -save -e506 -e774 -e1551*/       \
-      if ((ec = Func) != NO_ERROR)            \
-      {                                       \
-         (void)ToolErrorCheck (__FFL__, ec);  \
-         ErrorExit ();                        \
-      }                                       \
-      /*lint -restore */                      \
-   }
-
-
-#define CHK_EXIT_POPUP_MSG(Func,pMsg)         \
-/*lint -save -e506 -e774*/   /*Warning 506: Constant value Boolean; Info 774: Boolean within 'if' always evaluates to True */ \
-   {                                          \
-      APIRET ec;                              \
-      if ((ec = Func) != NO_ERROR)            \
-         ErrorPopupExit (__FFL__, ec, pMsg);  \
-   }                                          \
-/*lint -restore*/
-
-
-#define CHK_EXIT_POPUP(Func)                  \
-   CHK_POPUP_MSG(Func,NULL)                   \
-
-
-#define CHK_EXIT_POPUP_CONST(ec)              \
-      ErrorPopupExit (__FFL__, ec, NULL);
-
-
-
-#endif
diff --git a/fifo.cpp b/fifo.cpp
deleted file mode 100644
index 10427d3..0000000
--- a/fifo.cpp
+++ /dev/null
@@ -1,501 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The central queues for pipelined data processing
-// ****************************************************************************
-
-#include "QSemaphore"
-#include "QMutex"
-
-#include "util.h"
-#include "fifo.h"
-
-class t_FifoStdLocal
-{
-   public:
-      QQueue<t_pFifoBlock>  Queue;
-      int                   MaxBlocks;
-      QSemaphore          *pSemEmptyBlocks;
-      QSemaphore          *pSemUsedBlocks;
-      QMutex              *pMutexQueue;
-};
-
-
-static QMutex  MutexGlobal;
-static quint64 Allocs   =0;
-static quint64 Frees    =0;
-static qint64  Allocated=0;  // let's use signed, so we can detect underruns
-
-
-// We use ANSI C malloc/free for the FIFO blocks, as we want to be sure that it's fast
-
-
-APIRET t_Fifo::Create (t_pFifoBlock &pBlock, unsigned int BufferSize)
-{
-   int TotalSize;
-
-   TotalSize = BufferSize + sizeof(t_FifoBlock);
-   pBlock = (t_pFifoBlock) UTIL_MEM_ALLOC (TotalSize);
-   if (pBlock == NULL)
-      CHK_CONST (ERROR_FIFO_MALLOC_FAILED)
-//   memset (pBlock, 0xAA, sizeof(t_FifoBlock) + BufferSize);
-   pBlock->MagicStart         = FIFO_MAGIC_START;
-   pBlock->BufferSize         = BufferSize;
-   pBlock->DataSize           = 0;
-   pBlock->LastBlock          = false;
-
-   pBlock->EwfPreprocessed    = false;
-   pBlock->EwfDataSize        = 0;
-   pBlock->EwfCompressionUsed = 0;
-   pBlock->EwfChunkCRC        = 0;
-   pBlock->EwfWriteCRC        = 0;
-
-   pBlock->pAaffPreprocess    = NULL;
-
-   pBlock->Nr                 = FIFO_NR_NOTSET;
-
-   //lint -save e826 suspicious ptr to ptr conversion
-   FIFO_SET_MAGIC_END (pBlock)
-   //lint -restore
-
-   MutexGlobal.lock();
-   Allocs++;
-   Allocated += TotalSize;
-   MutexGlobal.unlock();
-
-   return NO_ERROR;
-}
-
-unsigned int t_Fifo::GetCompressionOptimisedBufferSize (int CompressionBlockSize)
-{
-   return CompressionBlockSize + 4096 - sizeof(t_FifoBlock);
-}
-
-APIRET t_Fifo::CreateCompressionOptimised (t_pFifoBlock &pBlock, int CompressionBlockSize)
-{
-   CHK (Create (pBlock, GetCompressionOptimisedBufferSize (CompressionBlockSize)))
-
-   return NO_ERROR;
-}
-
-//lint -save -e661 -e826 -esym(613,pBlock) Possible access of out-of-bounds pointer, suspicious ptr to ptr conversion, possible use of NULL pointer
-APIRET t_Fifo::Destroy (t_pFifoBlock &pBlock)
-{
-   int TotalSize;
-
-   if (pBlock == NULL)
-      CHK (ERROR_FIFO_DOUBLE_FREE)
-
-   if (pBlock->MagicStart != FIFO_MAGIC_START)
-   {
-      LOG_ERROR ("Broken start magic: %08X", pBlock->MagicStart);
-      CHK (ERROR_FIFO_START_CORRUPTED)
-   }
-
-   if (FIFO_GET_MAGIC_END(pBlock) != FIFO_MAGIC_END)
-   {
-      LOG_ERROR ("Broken end magic: %08X", FIFO_GET_MAGIC_END(pBlock));
-      CHK (ERROR_FIFO_END_CORRUPTED)
-   }
-   TotalSize = pBlock->BufferSize + sizeof(t_FifoBlock);
-
-//   memset (pBlock, 0xBB, TotalSize);
-   UTIL_MEM_FREE (pBlock);
-   pBlock = NULL;
-
-   MutexGlobal.lock();
-   Frees++;
-   Allocated -= TotalSize;
-   if (Allocated < 0)
-   {
-      LOG_ERROR ("Memory underrun");
-      MutexGlobal.unlock();
-      CHK (ERROR_FIFO_END_CORRUPTED)
-   }
-   MutexGlobal.unlock();
-
-   return NO_ERROR;
-}
-//lint -restore
-
-t_FifoStd::t_FifoStd (int MaxBlocks)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_MALLOC_FAILED  ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_DOUBLE_FREE    ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_EMPTY          ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_END_CORRUPTED  ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_START_CORRUPTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FIFO_MEMORY_UNDERUN ))
-      Initialised = true;
-   }
-   pOwn = new t_FifoStdLocal;
-   pOwn->MaxBlocks = MaxBlocks;
-
-   pOwn->pSemEmptyBlocks = new QSemaphore (MaxBlocks);
-   pOwn->pSemUsedBlocks  = new QSemaphore (0);
-   pOwn->pMutexQueue     = new QMutex     ();
-}
-
-t_FifoStd::~t_FifoStd ()
-{
-   t_pFifoBlock pBlock;
-
-   while (!pOwn->Queue.isEmpty())
-   {
-      CHK_EXIT (t_FifoStd::Get (pBlock))
-      if (pBlock)
-         CHK_EXIT (Destroy (pBlock))
-   }
-
-   delete pOwn->pSemEmptyBlocks;
-   delete pOwn->pSemUsedBlocks;
-   delete pOwn->pMutexQueue;
-   delete pOwn;
-}
-
-APIRET t_FifoStd::Insert (t_pFifoBlock pBlock)
-{
-   pOwn->pSemEmptyBlocks->acquire();
-   pOwn->pMutexQueue->lock();
-   pOwn->Queue.enqueue (pBlock);
-   pOwn->pMutexQueue->unlock();
-   pOwn->pSemUsedBlocks->release();
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoStd::InsertDummy (void)
-{
-   CHK (Insert (NULL));
-   return NO_ERROR;
-}
-
-APIRET t_FifoStd::Get (t_pFifoBlock &pBlock)
-{
-   pOwn->pSemUsedBlocks->acquire();
-   if (pOwn->Queue.isEmpty())
-      CHK (ERROR_FIFO_EMPTY)
-   pOwn->pMutexQueue->lock();
-   pBlock = pOwn->Queue.dequeue();
-   pOwn->pMutexQueue->unlock();
-   pOwn->pSemEmptyBlocks->release();
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoStd::Count (int &Cnt)
-{
-   pOwn->pMutexQueue->lock();
-   Cnt = pOwn->Queue.count();
-   pOwn->pMutexQueue->unlock();
-   return NO_ERROR;
-}
-
-APIRET t_FifoStd::Usage (int &Percent)
-{
-   int Cnt;
-
-   Count(Cnt);
-   Percent = (100LL * Cnt) / pOwn->MaxBlocks;
-   return NO_ERROR;
-}
-
-
-// Qt provides no possibility for waking threads waiting for semaphores. This fn wakes a potential
-// thread hanging in t_FifoStd::Get by inserting a NULL element into the Fifo. Threads hanging in
-// t_FifoStd::Insert are woken by removing a block from the Fifo. Of course, this method is not really
-// clean, as it not only wakes threads but manipulates the data in the Fifo... the threads accessing
-// the Fifo must be able to cope with this.
-// By the way: A non-blocking semaphore could be implemented manually by putting QSemaphore::tryAcquire
-// together with a msleep(0) in to loop. But this solution turned out to be non-optimal in performance.
-
-APIRET t_FifoStd::WakeWaitingThreads (void)
-{
-   t_pFifoBlock pBlock;
-   bool          WouldBlock;
-
-   WouldBlock = !pOwn->pSemUsedBlocks->tryAcquire();
-   if (WouldBlock)                         // If this access would block there might be a thread waiting in "Get"
-        CHK (Insert (NULL))
-   else pOwn->pSemUsedBlocks->release();
-
-   WouldBlock = !pOwn->pSemEmptyBlocks->tryAcquire();
-   if (WouldBlock)                         // If this access would block there might be a thread waiting in "Insert"
-   {
-      CHK (Get (pBlock))
-      if (pBlock)
-         CHK (t_Fifo::Destroy (pBlock))
-   }
-   else
-   {
-      pOwn->pSemEmptyBlocks->release();
-   }
-
-   return NO_ERROR;
-}
-
-
-
-// ----------------------------------------------------------------------------------------
-//                                       FIFO Compress In
-// ----------------------------------------------------------------------------------------
-
-class t_FifoCompressLocal   // used as well for t_FifoCompressOut
-{
-   public:
-      t_pFifoStd *ppFifoArr;
-      int           FifoArrLen;
-      int           TotalMaxBlocks;    // Sum of MaxBlocks of all FIFOs
-      QMutex      *pMutexQueue;
-      int           NextSubFifoNr;
-};
-
-static APIRET FifoCompressInit (t_FifoCompressLocal **ppOwn, int SubFifos, int MaxBlocks)
-{
-   *ppOwn = new t_FifoCompressLocal;
-   (*ppOwn)->TotalMaxBlocks = SubFifos * MaxBlocks;
-   (*ppOwn)->FifoArrLen     = SubFifos;
-   (*ppOwn)->ppFifoArr      = (t_pFifoStd *) UTIL_MEM_ALLOC ((size_t)SubFifos * sizeof(t_pFifoStd));
-
-   for (int i=0; i<SubFifos; i++)
-      (*ppOwn)->ppFifoArr[i] = new t_FifoStd (MaxBlocks);
-
-   (*ppOwn)->NextSubFifoNr = 0;
-   (*ppOwn)->pMutexQueue   = new QMutex();
-
-   return NO_ERROR;
-}
-
-static APIRET FifoCompressDeInit (t_FifoCompressLocal *pOwn)
-{
-   for (int i=0; i<pOwn->FifoArrLen; i++)
-      delete (pOwn->ppFifoArr[i]);
-
-   UTIL_MEM_FREE (pOwn->ppFifoArr);
-   delete pOwn->pMutexQueue;
-   delete pOwn;
-
-   return NO_ERROR;
-}
-
-t_FifoCompressIn::t_FifoCompressIn (void)
-{
-   pOwn=NULL;   //lint -esym(613,t_FifoCompressIn::pOwn)  Prevent lint from telling us about possible null pointers in the following code
-   CHK_EXIT (ERROR_FIFO_CONSTRUCTOR_NOT_SUPPORTED)
-}
-
-t_FifoCompressIn::t_FifoCompressIn (int SubFifos, int MaxBlocks)
-{
-   CHK_EXIT (FifoCompressInit (&pOwn, SubFifos, MaxBlocks))
-}
-
-t_FifoCompressIn::~t_FifoCompressIn ()
-{
-   CHK_EXIT (FifoCompressDeInit (pOwn))
-}
-
-APIRET t_FifoCompressIn::GetSubFifo (int SubFifoNr, t_pFifoStd &pFifo)
-{
-   pFifo = pOwn->ppFifoArr[SubFifoNr];
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressIn::Insert (t_pFifoBlock pBlock)
-{
-   t_pFifoStd pFifo;
-
-   pOwn->pMutexQueue->lock();
-      CHK (GetSubFifo (pOwn->NextSubFifoNr++, pFifo))
-      if (pOwn->NextSubFifoNr == pOwn->FifoArrLen)
-         pOwn->NextSubFifoNr = 0;
-   pOwn->pMutexQueue->unlock();
-
-   CHK (pFifo->Insert (pBlock))
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressIn::InsertDummy (void)
-{
-   for (int i=0; i< pOwn->FifoArrLen; i++)
-      CHK (Insert (NULL))
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressIn::Get (t_pFifoBlock &/*pBlock*/)
-{
-   return ERROR_FIFO_FUNCTION_NOT_IMPLEMENTED;
-}
-
-APIRET t_FifoCompressIn::Count (int &Cnt)
-{
-   t_pFifoStd pFifo;
-   int         SubCnt;
-
-   Cnt = 0;
-//   pOwn->pMutexQueue->lock();                           // Do not use semaphores here because of the deadlock risk.
-      for (int i=0; i<pOwn->FifoArrLen; i++)              // As a consequence, the count might be slightly wrong if
-      {                                                   // other threads are inserting and deleting in parallel,
-         CHK (GetSubFifo (i, pFifo))                      // but that does no harm.
-         CHK (pFifo->Count (SubCnt))
-         Cnt += SubCnt;
-      }
-//   pOwn->pMutexQueue->unlock();
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressIn::Usage (int &Percent)
-{
-   int Cnt;
-
-   Count(Cnt);
-   Percent = (100LL * Cnt) / pOwn->TotalMaxBlocks;
-   Percent = std::min (Percent, 100); // In some cases, the usage could be above 100% (see remarks for t_FifoCompressIn::Count); so we limit to 100
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressIn::WakeWaitingThreads (void)
-{
-   t_pFifoStd pFifo;
-
-   for (int i=0; i< pOwn->FifoArrLen; i++)
-   {
-      CHK (GetSubFifo (i, pFifo))
-      CHK (pFifo->WakeWaitingThreads())
-   }
-
-   return NO_ERROR;
-}
-
-
-// ----------------------------------------------------------------------------------------
-//                                       FIFO Compress Out
-// ----------------------------------------------------------------------------------------
-
-t_FifoCompressOut::t_FifoCompressOut (void)
-{
-   pOwn = NULL;   //lint -esym(613,t_FifoCompressOut::pOwn)  Prevent lint from telling us about possible null pointers in the following code
-   CHK_EXIT (ERROR_FIFO_CONSTRUCTOR_NOT_SUPPORTED)
-}
-
-t_FifoCompressOut::t_FifoCompressOut (int SubFifos, int MaxBlocks)
-{
-   CHK_EXIT (FifoCompressInit (&pOwn, SubFifos, MaxBlocks))
-}
-
-t_FifoCompressOut::~t_FifoCompressOut ()
-{
-   CHK_EXIT (FifoCompressDeInit (pOwn))
-}
-
-APIRET t_FifoCompressOut::GetSubFifo (int SubFifoNr, t_pFifoStd &pFifo)
-{
-   pFifo = pOwn->ppFifoArr[SubFifoNr];
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::Insert (t_pFifoBlock /*pBlock*/)
-{
-   return ERROR_FIFO_FUNCTION_NOT_IMPLEMENTED;
-}
-
-APIRET t_FifoCompressOut::InsertDummy (void)
-{
-   return ERROR_FIFO_FUNCTION_NOT_IMPLEMENTED;
-}
-
-APIRET t_FifoCompressOut::InsertDummy (int SubFifoNr)
-{
-   t_pFifoStd pFifo;
-
-   CHK (GetSubFifo (SubFifoNr, pFifo))
-   CHK (pFifo->Insert (NULL))
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::Get (t_pFifoBlock &pBlock)
-{
-   t_pFifoStd pFifo;
-
-   pOwn->pMutexQueue->lock();
-      CHK (GetSubFifo (pOwn->NextSubFifoNr++, pFifo))
-      if (pOwn->NextSubFifoNr == pOwn->FifoArrLen)
-         pOwn->NextSubFifoNr = 0;
-   pOwn->pMutexQueue->unlock();
-
-   CHK (pFifo->Get (pBlock));
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::Count (int &Cnt)
-{
-   t_pFifoStd pFifo;
-   int         SubCnt;
-
-   Cnt = 0;
-//   pOwn->pMutexQueue->lock();
-      for (int i=0; i<pOwn->FifoArrLen; i++)
-      {
-         CHK (GetSubFifo (i, pFifo))
-         CHK (pFifo->Count (SubCnt))
-         Cnt += SubCnt;
-      }
-//   pOwn->pMutexQueue->unlock();
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::Usage (int &Percent)
-{
-   int Cnt;
-
-   Count(Cnt);
-   Percent = (100LL * Cnt) / pOwn->TotalMaxBlocks;
-   Percent = std::min (Percent, 100); // In some cases, the usage could be above 100% (see remarks for t_FifoCompressIn::Count); so we limit to 100
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::WakeWaitingThreads (int SubFifoNr)
-{
-   t_pFifoStd pFifo;
-
-   CHK (GetSubFifo (SubFifoNr, pFifo))
-   CHK (pFifo->WakeWaitingThreads())
-
-   return NO_ERROR;
-}
-
-APIRET t_FifoCompressOut::WakeWaitingThreads (void)
-{
-   for (int i=0; i<pOwn->FifoArrLen; i++)
-      CHK (WakeWaitingThreads (i))
-
-   return NO_ERROR;
-}
-
-APIRET FifoGetStatistics (quint64 &AllocCalls, quint64 &FreeCalls, qint64 &AllocatedMemory)
-{
-   MutexGlobal.lock();
-   AllocCalls      = Allocs;
-   FreeCalls       = Frees;
-   AllocatedMemory = Allocated;
-   MutexGlobal.unlock();
-
-   return NO_ERROR;
-}
-
diff --git a/fifo.h b/fifo.h
deleted file mode 100644
index f7edc14..0000000
--- a/fifo.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-
-
-#ifndef __FIFO_H__
-#define __FIFO_H__
-
-#include <QQueue>
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifndef _LIBEWF_H
-   #include <libewf.h>
-#endif
-
-#include "aaff.h"
-
-
-class t_FifoStdLocal;
-class t_FifoCompressLocal;
-
-const int     FIFO_MAGIC_START = (int)0x0BADCAFE;
-const int     FIFO_MAGIC_END   = (int)0xDEADBEEF;
-const quint64 FIFO_NR_NOTSET   = Q_UINT64_C (0xFFFFFFFFFFFFFFFF);
-
-typedef struct
-{
-   int                 MagicStart;
-   unsigned int        BufferSize;            // The size of the buffer, might be something bigger than needed in order to optimise memory management (see memo.txt)
-   unsigned int        DataSize;              // The size of the original, uncompressed data (the actual data in the buffer might be compressed)
-   bool                LastBlock;             // Only set for the last data block - this flag is used in AFF compression, where the last block must be treated differently
-   bool                EwfPreprocessed;       // This block contains data preprocessed for libewf and the following EwfXxx vars contain valid data for ewflib
-   size_t              EwfDataSize;           // For libewf
-   int8_t              EwfCompressionUsed;    // For libewf
-   uint32_t            EwfChunkCRC;           // For libewf
-   int8_t              EwfWriteCRC;           // For libewf
-
-   t_pAaffPreprocess  pAaffPreprocess;
-
-   qulonglong          Nr;                    // Set to FIFO_NR_NOTSET if nr is not known yet
-   unsigned char       Buffer[];              //lint !e1501  Has zero size
-   int                 MagicEnd;              // Do not reference MagicEnd in this structure, use the macros below instead!
-} t_FifoBlock, *t_pFifoBlock;
-
-#define FIFO_SET_MAGIC_END(pFifoBlock)  *((int *)&(pFifoBlock->Buffer[pFifoBlock->BufferSize])) = FIFO_MAGIC_END;
-#define FIFO_GET_MAGIC_END(pFifoBlock) (*((int *)&(pFifoBlock->Buffer[pFifoBlock->BufferSize])))
-
-class t_Fifo
-{
-   public:
-      virtual ~t_Fifo  (void) {};
-
-      static  APIRET CreateCompressionOptimised (t_pFifoBlock &pBlock, int CompressionBlockSize);
-      static  APIRET Create                     (t_pFifoBlock &pBlock, unsigned int BufferSize);
-      static  APIRET Destroy                    (t_pFifoBlock &pBlock);
-
-      static  unsigned int GetCompressionOptimisedBufferSize (int CompressionBlockSize);
-
-      virtual APIRET Insert             (t_pFifoBlock  pBlock) = 0;
-      virtual APIRET InsertDummy        (void)                 = 0;
-      virtual APIRET Get                (t_pFifoBlock &pBlock) = 0;
-      virtual APIRET Count              (int &Count)           = 0;
-      virtual APIRET Usage              (int &Usage)           = 0;
-      virtual APIRET WakeWaitingThreads (void)                 = 0;
-};
-
-typedef t_Fifo *t_pFifo;
-
-class t_FifoStd: public t_Fifo
-{
-   public:
-      t_FifoStd (int MaxBlocks=128);
-     ~t_FifoStd ();
-
-      APIRET Insert             (t_pFifoBlock  pBlock);
-      APIRET InsertDummy        (void);
-      APIRET Get                (t_pFifoBlock &pBlock);
-      APIRET Count              (int &Count);
-      APIRET Usage              (int &Percent);
-      APIRET WakeWaitingThreads (void);
-
-   private:
-      t_FifoStdLocal *pOwn;
-};
-
-typedef t_FifoStd *t_pFifoStd;
-
-class t_FifoCompressIn: public t_Fifo
-{
-   public:
-      t_FifoCompressIn (void);
-      t_FifoCompressIn (int SubFifos, int MaxBlocks=128);
-     ~t_FifoCompressIn ();
-
-      APIRET Insert             (t_pFifoBlock  pBlock);
-      APIRET InsertDummy        (void);
-      APIRET Get                (t_pFifoBlock &pBlock);
-      APIRET Count              (int &Count);
-      APIRET Usage              (int &Percent);
-      APIRET WakeWaitingThreads (void);
-
-      APIRET GetSubFifo         (int SubFifoNr, t_pFifoStd &pFifo);
-
-   private:
-      t_FifoCompressLocal *pOwn;
-};
-
-class t_FifoCompressOut: public t_Fifo
-{
-   public:
-      t_FifoCompressOut (void);
-      t_FifoCompressOut (int SubFifos, int MaxBlocks=128);
-      virtual ~t_FifoCompressOut ();
-
-      APIRET Insert             (t_pFifoBlock  pBlock);
-      APIRET InsertDummy        (void);
-      APIRET Get                (t_pFifoBlock &pBlock);
-      APIRET Count              (int &Count);
-      APIRET Usage              (int &Percent);
-      APIRET WakeWaitingThreads (void);
-
-      APIRET GetSubFifo         (int SubFifoNr, t_pFifoStd &pFifo);
-      APIRET WakeWaitingThreads (int SubFifoNr);
-      APIRET InsertDummy        (int SubFifoNr);
-
-   private:
-      t_FifoCompressLocal *pOwn;
-};
-
-typedef t_FifoCompressIn  *t_pFifoCompressIn;
-typedef t_FifoCompressOut *t_pFifoCompressOut;
-
-
-APIRET FifoGetStatistics (quint64 &AllocCalls, quint64 &FreeCalls, qint64 &AllocatedMemory);
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-   #ifdef __MODULES_H__
-      enum
-      {
-         ERROR_FIFO_MALLOC_FAILED = ERROR_BASE_FIFO + 1,
-         ERROR_FIFO_DOUBLE_FREE,
-         ERROR_FIFO_EMPTY,
-         ERROR_FIFO_END_CORRUPTED,
-         ERROR_FIFO_START_CORRUPTED,
-         ERROR_FIFO_MEMORY_UNDERUN,
-         ERROR_FIFO_FUNCTION_NOT_IMPLEMENTED,
-         ERROR_FIFO_CONSTRUCTOR_NOT_SUPPORTED
-      };
-   #endif
-
-#endif
-
diff --git a/file.cpp b/file.cpp
deleted file mode 100644
index 4c3fbc2..0000000
--- a/file.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Everything related to file names, extension names, paths...
-// ****************************************************************************
-
-
-#include "common.h"
-
-#include <QtCore>
-
-#include "libewf.h"
-
-#include "device.h"
-#include "config.h"
-//#include "dlgwait.h"
-
-
-const char *t_File::pExtensionInfo     = ".info";
-
-
-APIRET t_File::Init (void)
-{
-   static bool Initialised=false;
-
-   if (Initialised)
-   {
-      CHK_EXIT (ERROR_FILE_ONLY_CAN_BE_INSTANTIATED_ONCE)
-   }
-   else
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FILE_ONLY_CAN_BE_INSTANTIATED_ONCE))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FILE_INVALID_FORMAT))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_FILE_INVALID_EWF_FORMAT))
-      Initialised = true;
-   }
-   return NO_ERROR;
-}
-
-APIRET t_File::GetFormatDescription (t_Format F, QString &Str)
-{
-   QString SubFormat;
-   switch (F)
-   {
-      case DD:
-         Str = QObject::tr("Linux dd raw image");
-         break;
-      case EWF:
-         switch (CONFIG(EwfFormat))
-         {
-            case LIBEWF_FORMAT_ENCASE1: SubFormat="Encase1"; break;
-            case LIBEWF_FORMAT_ENCASE2: SubFormat="Encase2"; break;
-            case LIBEWF_FORMAT_ENCASE3: SubFormat="Encase3"; break;
-            case LIBEWF_FORMAT_ENCASE4: SubFormat="Encase4"; break;
-            case LIBEWF_FORMAT_ENCASE5: SubFormat="Encase5"; break;
-            case LIBEWF_FORMAT_FTK    : SubFormat="FTK"    ; break;
-            case LIBEWF_FORMAT_SMART  : SubFormat="Smart"  ; break;
-            case LIBEWF_FORMAT_LVF    : SubFormat="LVF"    ; break;
-            case LIBEWF_FORMAT_LINEN5 : SubFormat="Linen5" ; break;
-            default                   : CHK (ERROR_FILE_INVALID_EWF_FORMAT)
-         }
-         Str = QObject::tr("Expert Witness Format, sub-format %1") .arg(SubFormat);
-         break;
-      case AFF:
-         Str = QObject::tr("Advanced forensic image");
-         break;
-      default:  CHK (ERROR_FILE_INVALID_FORMAT)
-   }
-   return NO_ERROR;
-}
-
-APIRET t_File::GetFormatExtension (t_Format F, QString *pExtWildCards, QString *pExtHumanReadable)
-{
-   QString Wild, Human;
-
-   switch (F)
-   {
-      case DD:
-         Wild = ".dd";
-         Human = Wild;
-         break;
-      case EWF:
-         switch (CONFIG(EwfFormat))
-         {
-            case LIBEWF_FORMAT_ENCASE1:
-            case LIBEWF_FORMAT_ENCASE2:
-            case LIBEWF_FORMAT_ENCASE3:
-            case LIBEWF_FORMAT_ENCASE4:
-            case LIBEWF_FORMAT_ENCASE5:
-            case LIBEWF_FORMAT_LINEN5 :
-            case LIBEWF_FORMAT_FTK    : Wild=".E??"; Human=".Exx"; break;
-            case LIBEWF_FORMAT_SMART  : Wild=".s??"; Human=".sxx"; break;
-            case LIBEWF_FORMAT_LVF    : Wild=".l??"; Human=".lxx"; break;
-            default                   : CHK (ERROR_FILE_INVALID_EWF_FORMAT)
-         }
-         break;
-      case AFF:
-         Wild = ".aff";
-         Human = Wild;
-         break;
-      default:  CHK (ERROR_FILE_INVALID_FORMAT)
-   }
-
-   if (pExtWildCards    ) *pExtWildCards     = Wild;
-   if (pExtHumanReadable) *pExtHumanReadable = Human;
-
-   return NO_ERROR;
-}
-
diff --git a/file.h b/file.h
deleted file mode 100644
index a9da738..0000000
--- a/file.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Everything related to file names, extension names, paths,
-//                  etc
-// ****************************************************************************
-
-
-#ifndef __FILE_H__
-#define __FILE_H__
-
-#include <QtGui> //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-namespace t_File
-{
-   typedef enum
-   {
-      NotSet,
-      DD,
-      EWF,
-      AFF
-   } Format, t_Format;
-
-   extern const char *pExtensionInfo;
-
-
-   APIRET GetFormatDescription (t_Format F, QString &Str);
-   APIRET GetFormatExtension   (t_Format F, QString *pExtWildcards, QString *pExtHumanReadable=NULL);
-   APIRET Init                 (void);
-}
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-   #ifdef __MODULES_H__
-      enum
-      {
-         ERROR_FILE_ONLY_CAN_BE_INSTANTIATED_ONCE = ERROR_BASE_FILE + 1,
-         ERROR_FILE_INVALID_FORMAT,
-         ERROR_FILE_INVALID_EWF_FORMAT
-      };
-   #endif
-
-#endif
-
-
diff --git a/guymager.cfg b/guymager.cfg
deleted file mode 100644
index 3ba33b6..0000000
--- a/guymager.cfg
+++ /dev/null
@@ -1,506 +0,0 @@
-REM ****************************************************************************
-REM  Project:        GUYMAGER
-REM ****************************************************************************
-REM  Programmer:     Guy Voncken
-REM                  Police Grand-Ducale
-REM                  Service de Police Judiciaire
-REM                  Section Nouvelles Technologies
-REM ****************************************************************************
-REM  Main configuration file
-REM ****************************************************************************
-
-REM ATTENTION
-REM ---------
-REM Do not edit this file; put all your changes into /etc/guymager/local.cfg instead!
-REM See the notes at the end of this file.
-
-SECTION GUYMAGER
-
-REM How this configuration file works
-REM ---------------------------------
-
-
-REM guymager user interface
-REM -----------------------
-REM
-REM The parameter Language contains the language code (for example 'de', 'fr', 'en'). If Guymager doesn't
-REM find the corresponding language file it switches to english instead. Contact the author of Guymager if
-REM your language is missing. The language files are named guymager_xx.qm, where xx is the language code.
-REM If you installed a Debian package, they can be found in directory /usr/share/guymager.
-REM
-REM The StartupXxx parameters configure the position and size of the main guymager window at startup.
-REM StartupSize can be set to one of the following:
-REM    STANDARD                 Let the X-Wndow manager choose what it thinks is best
-REM    MAXIMISED or MAXIMIZED   Maximum size
-REM    FULLSCREEN               Maximum size and take away the title bar
-REM    MANUAL                   Use the values specified for StartupSizeManualX, StartupSizeManualY,
-REM                             StartupSizeManualDx and StartupSizeManualDy.
-REM The final result always slightly depends on the X-Window manager in use. For instance, there might be
-REM window managers that can't distinguish MAXIMISED and FULLSCREEN.
-REM
-REM The dialog that appears when chooosing the image destination path can be adjusted in a similar way by
-REM of the parameters FileDialogSize, FileDialogSizeManualDx, FileDialogSizeManualDy. Unfortunately, this
-REM only works when using the alternative file dialog, not the Qt file dialog (see UseFileDialogFromQt
-REM below).
-REM
-REM NumberStyle influences the way how numbers are displayed in guymager. There 3 possible values:
-REM    Locale        Use the value of the system LOCALE to determine the format (set the LANG environment
-REM                  correctly).
-REM    DecimalComma  The format would look like 78.234,56 (normal format)
-REM    DecimalPoint  The format would look like 78,234.56 (unusual american format)
-REM Remark: Using Locale, more differences are possible. Thus, with the environment variable LANG set to
-REM fr_FR, the number would be displayed as 78 234,56 (space as thousands separator). Setting NumberStyle
-REM to something else than Locale is not recommended (you may use it if you are too lazy to set up your
-REM LANG variable correctly).
-REM
-REM ScreenRefreshInterval   [ms] Some screen fields (speed, remaining time, ...) are refreshed regularly.
-REM                         ScreenRefreshInterval specifies how often this should occur.
-REM
-REM UseFileDialogFromQt     When set to Yes, guymager uses the standard Qt file/directory selection dialogs.
-REM                         There once was a Qt version with a bug in its dialog and an alternative dialog
-REM                         was quickly added to guymager. The bug should have gone by now and this
-REM                         configuration parameter should be set to Yes (the Qt dialogs are better then
-REM                         the alternative programmed by the author of guymager).
-REM                         Adjusting the dialog size (see configuration parameters FileDialogSize,
-REM                         FileDialogSizeManualDx and FileDialogSizeManualDy) only works with the
-REM                         alternative dialog.
-
-Language='auto'
-
-StartupSize = MANUAL
-StartupSizeManualX  = 130
-StartupSizeManualY  = 250
-StartupSizeManualDx = 1000
-StartupSizeManualDy = 500
-
-FileDialogSize = MANUAL
-FileDialogSizeManualDx = 800
-FileDialogSizeManualDy = 500
-
-NumberStyle=Locale
-
-ScreenRefreshInterval = 1500
-
-UseFileDialogFromQt = Yes
-
-
-REM Table Fonts
-REM Not in use yet. Will be used later on for adjusting the fonts used by guymager.
-
-TABLE Fonts <TableName>
-   REM Object          Family           Size   Weight Italic
-   REM ------------------------------------------------------------------------------------------
-       Menu           'Arial'           10     75     no
-       DialogDefault  'Arial'           10     75     no
-ENDTABLE
-
-
-REM Table Colors
-REM The table contains color settings for different items on the screen:
-REM    LocalDevices        Color to be used for marking local devices (i.e. devices with serial numbers found in
-REM                        configuration table LocalDevices, see above) in the user interface. The whole row gets
-REM                        this color.
-REM All other entries refer to the colored dot of the acquisition state field for reflecting the current state:
-REM    StateIdle              Nothing has been done with this device yet.
-REM    StateAcquire           Acquisition running
-REM    StateAcquirePaused     Acquisition interrupted (device cannot be accessed any longer)
-REM    StateVerify            Verfication running
-REM    StateVerifyPaused      Verfication interrupted (device cannot be accessed any longer)
-REM    StateCleanup           Acquisition has been aborted by user and Guymager is removing partial files
-REM    StateFinished          Finished successfully
-REM    StateFinishedBadVerify Finished, but the MD5 check while re-reading the source after acquisition failed.
-REM                           This state only can occur if MD5 verification was switched on in the acquisition dialog.
-REM    StateAbortedUser       Acquisition or verification aborted by user. Not an error, as it is the user's wish.
-REM    StateAbortedOther      Acquisition or verification aborted for some other reason (for instance, if writing to
-REM                           the destination fails). This is an error.
-
-TABLE Colors None
-   REM Color                   R   G   B
-   REM -----------------------------------
-       LocalDevices           255 197 189
-       StateIdle              255 255 255
-       StateAcquire           78  132 255
-       StateAcquirePaused     255 174   0
-       StateVerify            78  132 255
-       StateVerifyPaused      255 174   0
-       StateCleanup           228   0 255
-       StateFinished           54 255   0
-       StateFinishedBadVerify 255  30   0
-       StateAbortedUser       255 255 255
-       StateAbortedOther      255  30   0
-ENDTABLE
-
-
-REM Image creation
-REM --------------
-REM
-REM EwfFormat             The EWF format (alias E01 format) differs depending on which software created
-REM                       it. With this parameter, you can control which style guymager should follow.
-REM                       Possible values are: Encase1, Encase2, Encase3, Encase4, Encase5, Encase6, Smart,
-REM                       FTK, Linen5, Linen6 and LVF. See libewf for more information.
-REM
-REM EwfCompression        The compression level for EWF images. Possible values are: None, Fast, Best.
-REM                       See ewflib for more information.
-REM
-REM AffCompression        The compression level for AFF images. Valid range: 1 - 9. A value of 1 results in a
-REM                       fast, minimal compression and 9 in a slow, high compression.
-REM                       See aff documentation for more information.
-REM
-REM AffMarkBadSectors     Aff supports a possibility for marking bad sectors. If this parameter is enabled and
-REM                       a bad sector is encountered, then the bad sector is written with a special content to
-REM                       the image ("BAD SECTOR\0" followed by 501 random bytes). If this parameter is disabled,
-REM                       then bad sectors are replaced by 512 zero bytes.
-REM                       This parameter only influences images in AFF format.
-REM
-REM EwfSegmentSize        The max. size of the segments in MB. 640MB is a good choice, as the segments
-REM                       fit good on CDs as well as on DVDs. See ewflib for more information. The maximum
-REM                       value is 2047.
-REM
-REM SpecialFilenameChars  By default, guymager only allows the characters a-z, A-Z, 0-9 and _ to figure
-REM                       in the image filenames. If you wannt to allow special chars and you are sure
-REM                       that your destination file system can handle them, you might add them to
-REM                       the parameter SpecialFilenameChars. Example: SpecialFilenameChars = '.- '
-REM                       would allow you to use the characters . and - as well as spaces.
-
-EwfFormat             = Encase5
-EwfCompression        = FAST
-AffCompression        = 1
-AffMarkBadSectors     = TRUE
-EwfSegmentSize        = 640
-SpecialFilenameChars  = ''
-
-REM Acquisition dialog
-REM ------------------
-
-REM DefaultFormat  This parameter decides, which forensic format should be chosen by default for the
-REM                first acquisition after starting Guymager. For subsequent acquisitions, the format
-REM                of the previous acquisition will be selected by default.
-REM                Possible values are DD, AFF and EWF.
-
-DefaultFormat = EWF
-
-REM The parameters below all refer to the acquisition dialog entry fields. Let us explain the different
-REM fields first. There are 5 fields defined by the EWF file format, their names are self-explaining:
-REM    EwfCaseNumber
-REM    EwfEvidenceNumber
-REM    EwfExaminer
-REM    EwfDescription
-REM    EwfNotes
-REM Guymager uses these fields when choosing the EWF or the AFF format. When choosing the dd format, they
-REM are of no use and decativated.
-REM
-REM There are 4 other important entry fields in the acquisition dialog:
-REM    DestImageDirectory  The directory that will be used for storing the image files
-REM    DestInfoDirectory   The directory that will be used for storing the info file
-REM    DestImageFilename   The filename of the image files (without the extension)
-REM    DestInfoFilename    The filename of the info file (without the extension)
-REM
-REM For each one of these fields, there is an entry in configuration table DlgAcquireField. It has the
-REM following structure:
-REM    FieldName    The name of the field, as indicated above
-REM
-REM    EntryMode    Determine the bevahiour of each field; the following entry modes are available:
-REM                    Hide         The corresponding field is not shown in the acquisition dialog.
-REM                                 Nevertheless, it exists and it is always set to its default value
-REM                                 (see below). This mode useful if a certain EWF field always should
-REM                                 be filled in with the same standard value.
-REM
-REM                    ShowDefault  The field is visible in the acquisiton dialog and it is automatically
-REM                                 filled in with the default value.
-REM
-REM                    ShowLast     The field is shown in the acquisiton dialog. When the acquisition
-REM                                 dialog is opened for the first time after guymager startup, the field
-REM                                 is filled in with the default value. On subsequent acquisition dialog
-REM                                 appearances, the field contains the value entered previously (which
-REM                                 may still be the default value, if it was not edited).
-REM
-REM    DefaultValue The default value for the field. It may contain any text you like. Guymager knows
-REM                 several special sequences, that will be replaced automatically:
-REM                    %d%       the day as number without a leading zero (1 to 31)
-REM                    %dd%      the day as number with a leading zero (01 to 31)
-REM                    %ddd%     the abbreviated localized day name (e.g. 'Mon' to 'Sun')
-REM                    %dddd%    the long localized day name (e.g. 'Monday' to 'Sunday')
-REM                    %M%       the month as number without a leading zero (1-12)
-REM                    %MM%      the month as number with a leading zero (01-12)
-REM                    %MMM%     the abbreviated localized month name (e.g. 'Jan' to 'Dec')
-REM                    %MMMM%    the long localized month name (e.g. 'January' to 'December')
-REM                    %yy%      the year as two digit number (00-99)
-REM                    %yyyy%    the year as four digit number
-REM
-REM                    %h%       the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
-REM                    %hh%      the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
-REM                    %m%       the minute without a leading zero (0 to 59)
-REM                    %mm%      the minute with a leading zero (00 to 59)
-REM                    %s%       the second without a leading zero (0 to 59)
-REM                    %ss%      the second with a leading zero (00 to 59)
-REM                    %z%       the milliseconds without leading zeroes (0 to 999)
-REM                    %zzz%     the milliseconds with leading zeroes (000 to 999)
-REM                    %AP%      use AM/PM display. %AP% will be replaced by either "AM" or "PM".
-REM                    %ap%      use am/pm display. %ap% will be replaced by either "am" or "pm".
-REM
-REM                    %serial%  the serial number of the device
-REM                    %model%   the model name of the device
-REM                    %size%    the device's size in human readable format (e.g. '247G', '32M')
-REM                    %version% guymager software version
-REM                 Remark: The date/time sequences have been copied from Trolltech's Qt documentation.
-REM
-REM Note that all the 8 fields must by contained exactely once in the configuration table DlgAcquireField.
-REM *** EXAMPLE A ***
-REM    TABLE DlgAcquireField NoName
-REM       REM Field               Entry        Default
-REM       REM name                mode         value
-REM       REM -------------------------------------------------------------------------
-REM           ...
-REM           'EwfNotes'          Hide         'Acquisition done by guymager %version%'
-REM           ...
-REM    ENDTABLE
-REM The field EwfNotes would not be shown in the acquisition dialog. As it has a default value, it would always
-REM be initialised with that string. The special sequence %version% would be replaced and the string written to
-REM the EWF image files would be sometheing like  'Acquisition done by guymager 0.3.1'
-REM
-REM *** EXAMPLE B **
-REM    TABLE DlgAcquireField NoName
-REM       REM Field               Entry        Default
-REM       REM name                mode         value
-REM       REM -------------------------------------------------------------------------
-REM           ...
-REM           'EwfExaminer'       Show         'Marc Murrsky acquired it on %d%. %MMMM% %yyyy%'
-REM           ...
-REM    ENDTABLE
-REM With this setting, the acquisition dialog would open up with the examiner field preset to
-REM something similar to 'Marc Murrsky acquired it on 5. December 2007'
-
-TABLE DlgAcquireField NoName
-   REM Field                Entry        Default
-   REM name                 mode         value
-   REM -------------------------------------------------------------------------
-       'EwfCaseNumber'      ShowLast     ''
-       'EwfEvidenceNumber'  ShowDefault  ''
-       'EwfExaminer'        ShowLast     ''
-       'EwfDescription'     ShowDefault  ''
-       'EwfNotes'           ShowDefault  '%serial%'
-       'DestImageDirectory' ShowLast     ''
-       'DestInfoDirectory'  Hide         ''
-       'DestImageFilename'  ShowDefault  ''
-       'DestInfoFilename'   ShowDefault  ''
-ENDTABLE
-
-REM There is a another configuration table, DlgAcquireRule, which allows to copy the contents of some
-REM fields automatically to others while typing. The entries in this table are processed one after the
-REM other everytime you hit a key in any of the 8 fields.
-REM
-REM    TriggerFieldName     The trigger field is field where the action happens (i.e. which has the focus
-REM                         while you are typing). If the trigger field name doesn't match, the the line
-REM                         is ignored. If it matches, we have a trigger and Guymager does what the rest
-REM                         of the line says.
-REM
-REM    DestinationFieldName On trigger, this field will be filled in with the value indicated in column
-REM                         Value.
-REM
-REM    Value                The string to be written to the field DestinationFieldName if there's a trigger.
-REM                         The value may contain the same special sequences than the ones described
-REM                         above. Additionally, there are special sequences for referring to other fields.
-REM                         These are constructed by putting the field name between two percent signs (for
-REM                         example '%EwfNotes%')
-REM
-REM *** Example A ***
-REM The info filename should always be the same than the image filename, i.e. when typing in the field
-REM for the image filename, the contents should automatically be copied to the field for the info
-REM filename:
-REM    TABLE DlgAcquireRule NoName
-REM       REM Trigger             Destination        Value
-REM       REM field name          field name
-REM       REM ----------------------------------------------------------------------
-REM           'DestImageFilename' 'DestInfoFilename' '%DestImageFilename%'
-REM    ENDTABLE
-REM Read the entry like this: Everytime a key in DestImageFilename is hit, refresh DestInfoFilename with the
-REM value %DestImageFilename%, which would be interpreted as a special sequence and corresponds to the
-REM contents of DestImageFilename.
-REM It still would be possible to edit the info filename separately and thus different image and info
-REM filenames.
-REM
-REM *** Example B ***
-REM Like example A, but do the same when editing te info filename; when typing in it, the image filename
-REM should be changed to the new name typed for the info file:
-REM    TABLE DlgAcquireRule NoName
-REM       REM Trigger            Destination         Value
-REM       REM field name         field name
-REM       REM ---------------------------------------------------------------------
-REM           'DestInfoFilename' 'DestImageFilename' '%DestImageFilename%'
-REM    ENDTABLE
-REM
-REM *** Example C ***
-REM Set the info field to the examiner name, the case name plus the date:
-REM    TABLE DlgAcquireRule NoName
-REM       REM Trigger         Destination  Value
-REM       REM field name      field name
-REM       REM ----------------------------------------------------------------------------------------------
-REM           'EwfExaminer'   'EwfNotes'   'Acquired by %EwfExaminer for case %EwfCaseNumber% on %d%.%MM%.%yyyy%'
-REM           'EwfCaseNumber' 'EwfNotes'   'Acquired by %EwfExaminer for case %EwfCaseNumber% on %d%.%MM%.%yyyy%'
-REM    ENDTABLE
-REM Note that we have to enter the same value twice here, as we have 2 triggers.
-
-TABLE DlgAcquireRule NoName
-   REM Trigger              Destination         Value
-   REM field name           field name
-   REM ----------------------------------------------------------------------
-       'DestImageDirectory' 'DestInfoDirectory' '%DestImageDirectory%'
-       'DestImageFilename'  'DestInfoFilename'  '%DestImageFilename%'
-ENDTABLE
-
-
-
-
-REM guymager internals
-REM ==================
-REM
-REM Device list scanning
-REM --------------------
-REM Guymager knows 2 methods for getting the list of the available memory devices: The old one, that uses libparted
-REM and the new one one that uses DBUS/HAL. Select the method you want with the configuration parameter ScanUsingDbusHal:
-REM
-REM ScanUsingDbusHal = 1    Use the new method (recommended).
-REM
-REM ScanUsingDbusHal = 0    Use the old method. It was observed that the internal scan function hung while an acquisition
-REM                         was running. This leads to the problem that the devices shown in guymager possibly cannot be
-REM                         updated while an acquisition is running. When using this method, the command specified in
-REM                         configuration parameter CommandGetSerialNumber (see below) is used for finding the serial
-REM                         number of each device (not really elegant). Again, ScanUsingDbusHal = 1 is the recommended way.
-REM
-REM CommandGetSerialNumber  is used to extract the serial number from a device when setting ScanUsingDbusHal to 0 (not
-REM                         recommended). The placeholder %dev in the command string will be replaced by the device
-REM                         (/dev/hda or /dev/sdc for instance). Examples:
-REM                            CommandGetSerialNumber = 'bash -c "smartctl -i %dev | grep -i serial | awk ''{print $3 $4 $5 $6 $7 $8 $9}'' "'
-REM                            CommandGetSerialNumber = 'bash -c "hdparm -I %dev | grep -i ''Serial Number'' | awk ''{print $3 $4 $5 $6 $7 $8 $9}'' "'
-REM
-REM ScanInterval            [s] Speficies how often an automatic device scan (for detecting newly connected devices)
-REM                         should launched. Keep in mind, that the device scan can be launched as well manually.
-REM
-
-ScanUsingDbusHal        = 1
-CommandGetSerialNumber  = 'bash -c "smartctl -i %dev | grep -i serial | awk ''{print $3 $4 $5 $6 $7 $8 $9}'' "'
-ScanInterval            = 6000
-
-
-REM Other settings
-REM --------------
-REM Block sizes: Guymager works internally with threads for doing the different jobs (read, hash calculation, compression,
-REM write) and forwards the data in blocks through fifos from one thread to another. The block size may be adjusted individually
-REM for the different forensic formats. There's only one exception: When using EWF with mult-threaded compression the block size
-REM is 32768 bytes (32KB).
-REM It is recommended to use a multiple of kilobytes or megabytes for the block sizes, because the block size corresponds to size
-REM of the data read at once from the source drive and most drive's caches perform best with such "round" numbers. So, if you want to work
-REM with a block size of 10 kilobyte, specify 10240 (instead of 10000).
-REM
-REM FifoBlockSizeDD         The block size for dd images (in bytes). Recommended value: 262144 (256K).
-REM
-REM FifoBlockSizeEWF        The block size for dd images (in bytes). Recommended value: 32768 (32K).
-REM
-REM FifoBlockSizeAFF        The block size for dd images (in bytes). Recommended value: 10485760 (10MB).
-REM
-REM
-REM FifoMaxMem and FifoMaxEntries  Both parameters control the amount of memory used for the internal fifo queues. In different
-REM                         ways. FifoMaxMem sets an upper limit per acquisition in MB. FifoMaxEntries indicates how many data
-REM                         blocks may be waiting in a queue; this number, multiplied by the block size and the number of queues
-REM                         leads to a memory size. Guymager finally uses the smallest of both memory sizes.
-REM                         The fifo memory should be big enough to buffer temporary throughput variations of the different threads.
-REM                         Too large fifos only consume memory and are of no help.
-REM                         Be aware that using wrong parameters may lead to memory overflows and stopping Guymager in the middle
-REM                         of an acquisition.
-REM                         It is recommended to set both values to 0 for automatic memory usage calculation.
-REM
-REM UseSeparatehashThread   The hash calculation can be done in a separate thread or in the read thread (i.e. the thread reading
-REM                         the data from the source). Using a separate thread led to a slight performance advantage on the
-REM                         developer's machine.
-REM
-REM CompressionThreads      The number of threads for parallel compression. The recommended value is the number of processors.
-REM                         This parameter has a significant performance influence when working with compressed file format
-REM                         (EWF format). It has no impact on other formats (dd).
-REM                         Set to AUTO will use the number of CPUs installed in the system (recommended).
-REM                         Set to 0 for disabling multi-threaded compression and build EWF file the conventional way.
-REM
-
-FifoBlockSizeDD  = 262144
-FifoBlockSizeEWF = 32768
-FifoBlockSizeAFF = 10485760
-FifoMaxMem       = 0
-FifoMaxEntries   = 0
-
-UseSeparatehashThread = Yes
-CompressionThreads    = AUTO
-
-
-REM Debug settings
-REM --------------
-REM SignalHandling          For debug purpose only. Switch off SignalHandling only when working with debuggers (gdb).
-REM                         Recommended value: Enabled.
-REM
-REM WriteToDevNull          For debug purpose only. Writes image to /dev/null instead of the indicated file. This switch can
-REM                         be used for performance tests. Only used when creating a dd images.
-REM
-REM UseMemWatch             For debug purpose only. Uses the memwatch malloc/free functions for finding dynamic memory problems.
-REM                         Creates a file named memwatch.log when enabled in the directory where guymager is started. MemWatch
-REM                         may slow down guymager significantly.
-REM
-REM VerboseLibewf           For debug purpose only. Have libewf output internal messages to stderr.
-REM
-REM CheckEwfData            For debug purpose only. When using the EWF format and working with separate compression thread(s),
-REM                         Guymager does a special check on the data if this parameter is set. The check is done just before
-REM                         passing the data to the EWF library function that writes it to the image. It checks if the data can
-REM                         be uncompressed correctly, if the lengths match and if the CRC is ok.
-
-SignalHandling = Enabled
-WriteToDevNull = false
-UseMemWatch    = false
-VerboseLibewf  = false
-CheckEwfData   = false
-
-
-REM Device info commands
-REM --------------------
-REM In order to get a complete set of information for each acquired drives, guymager executes several standard Linux
-REM commands. These commands are contained in the list named DeviceInfoCommands, see below. They are executed when
-REM    - selecting the "Info" menu point for a device (results are shown in a dialog window)
-REM    - starting an acquisition (results are written to the .info file)
-REM They are executed in the order they appear. The string %dev will be replaced by the corresponding device path
-REM (i.e. /dev/hdb for instance). Examples for interesting commands:
-REM      'bash -c "smartctl -s on %dev ; smartctl -a %dev"'  -- for switching SMART interface on and showing SMART info
-REM      'bash -c "hdparm -I %dev"'                          -- for showing other identification info
-
-TABLE DeviceInfoCommands NoName
-   REM Command
-   REM -------------------------------------------
-   'bash -c "search="`basename %dev`: H..t P.......d A..a de.....d" && dmesg | grep -A3 "$search" || echo "No kernel HPA messages for %dev""'
-   'bash -c "smartctl -s on %dev ; smartctl -a %dev"'
-   'bash -c "hdparm -I %dev"'
-   REM 'bash -c disk_stat %dev'
-ENDTABLE
-
-
-
-REM Table LocalDevices
-REM The local devices may be entered here. Guymager will not allow to acquire these devices. The table allows for
-REM entering the Linux device path as well as the serial number. Examples:
-REM    '/dev/hda'
-REM    'S042J10XC57542'
-
-
-TABLE LocalDevices NoName
-   REM Device
-   REM -------------------------------------------
-
-ENDTABLE
-
-
-REM At the of this configuration, we include a local configuration file. All entries in the local
-REM configuration file will override the ones above.
-
-REM If ever you want to cange the settings above, don't do directly here, as all your changes would be
-REM gone when installing a new version of guymager.
-REM Edit /etc/guymager/local.cfg instead.
-
-INCLUDE_OPTIONAL /etc/guymager/local.cfg
-INCLUDE_OPTIONAL ./local.cfg
-
-ENDSECTION
-
diff --git a/guymager.pro b/guymager.pro
deleted file mode 100644
index 2247a31..0000000
--- a/guymager.pro
+++ /dev/null
@@ -1,158 +0,0 @@
-# ****************************************************************************
-#  Project:        GUYMAGER
-# ****************************************************************************
-#  Programmer:     Guy Voncken
-#                  Police Grand-Ducale
-#                  Service de Police Judiciaire
-#                  Section Nouvelles Technologies
-# ****************************************************************************
-#  Qt project file
-# ****************************************************************************
-
-# Command line configuration options
-# ----------------------------------
-# These options are thought to behave like the classical ./configure options, i.e. they
-# allow for using different paths and such things. Currently, there's only one pre-compiler
-# definition:
-#    SPLASH_DIR      Defines where to look for the splash image (splash.png)
-#                    Example:
-#                       qmake DEFINES+="SPLASH_DIR=\'\\\"/usr/share/guymager\\\"\'"
-#                    Remark: The backslash-tick-quote-nightmare comes from the fact,
-#                    that bash eats some part of, qmake some more and finally again
-#                    bash when Makefile calls g++.
-#
-#    LANGUAGE_DIR    Tells Guymager where to look for the language files. Usually the
-#                    same than SPLASH_DIR.
-#
-#    LANGUAGE_DIR_QT The location of Qt's language files (i.e. the files qhere Qt
-#                    stores language dependent texts fot its dialogs, messages, etc.)
-#                    On a Debian system, this usually is /usr/share/qt4/translations.
-#                    qmake DEFINES+="LANGUAGE_DIR_QT=\'\\\"/usr/share/qt4/translations\\\"\'"
-
-
-
-TEMPLATE = app
-CONFIG   = qt release warn_on qdbus
-TARGET   = guymager
-MOC_DIR  = ./moc
-
-INCLUDEPATH += /usr/include/libguytools1
-
-# LIBEWF_VERSION only must be defined for compiling with libewf before 20080309
-# Newer libewf version already include this macro in file definitions.h.
-# DEFINES += LIBEWF_VERSION=20071111
-
-# Add compile time information
-# ----------------------------
-# Compile time information is written to compileinfo.cpp by means of the date command. The command in QMAKE_PRE_LINK ensures that
-# compileinfo.cpp is rewritten and compiled whenever a new exe needs to be created. In order not to get a qmake error because of
-# the missing compileinfo.o (the very first time when it is compiled), the line starting with 'DummyResult' creates a dummy
-# compileinfo.o whenever qmake is called.
-
-#QMAKE_PRE_LINK  = echo \'// Automatically generated file. See project file for further information.\' > compileinfo.cpp
-#QMAKE_PRE_LINK += && date \'+const char *pCompileInfoTimestamp = \"%Y-%m-%d-%H.%M.%S\";\' >> compileinfo.cpp
-
-QMAKE_PRE_LINK  = ./compileinfo.sh > compileinfo.cpp
-QMAKE_PRE_LINK += && $(CXX) -c $(CXXFLAGS) compileinfo.cpp
-
-DummyResult = $$system(echo DummyCompileInfoPunktO > compileinfo.o)
-OBJECTS += compileinfo.o
-
-
-SOURCES += aaff.cpp
-SOURCES += config.cpp
-SOURCES += device.cpp
-SOURCES += dlgabort.cpp
-SOURCES += dlgacquire.cpp
-SOURCES += dlgdirsel.cpp
-SOURCES += dlgmessage.cpp
-SOURCES += dlgwait.cpp
-SOURCES += error.cpp
-SOURCES += fifo.cpp
-SOURCES += file.cpp
-SOURCES += hash.cpp
-SOURCES += info.cpp
-SOURCES += infofield.cpp
-SOURCES += itemdelegate.cpp
-SOURCES += main.cpp
-SOURCES += mainwindow.cpp
-SOURCES += md5.c
-SOURCES += memwatch.c
-SOURCES += qtutil.cpp
-#SOURCES += sha256.cpp
-SOURCES += table.cpp
-SOURCES += threadcompress.cpp
-SOURCES += threadhash.cpp
-SOURCES += threadread.cpp
-SOURCES += threadscan.cpp
-SOURCES += threadwrite.cpp
-SOURCES += util.cpp
-
-HEADERS += config.h
-HEADERS += devicelistmodel.h
-HEADERS += dlgabort.h
-HEADERS += dlgacquire.h
-HEADERS += dlgacquire_private.h
-HEADERS += dlgdirsel.h
-HEADERS += dlgdirsel_private.h
-HEADERS += dlgmessage.h
-HEADERS += dlgwait.h
-HEADERS += infofield.h
-HEADERS += itemdelegate.h
-HEADERS += mainwindow.h
-HEADERS += memwatch.h
-HEADERS += table.h
-HEADERS += threadcompress.h
-HEADERS += threadhash.h
-HEADERS += threadread.h
-HEADERS += threadscan.h
-HEADERS += threadwrite.h
-HEADERS += util.h
-
-QMAKE_CXXFLAGS_WARN_ON += -fmessage-length=0     # Tell g++ not to split messages into different lines
-QMAKE_CXXFLAGS_WARN_ON += -fno-strict-aliasing   # Avoid strange error messages when using QVarLengthArray
-QMAKE_CXXFLAGS_RELEASE += -ggdb
-QMAKE_CFLAGS_RELEASE   += -ggdb
-QMAKE_LFLAGS_RELEASE   += -ggdb -rdynamic    # -rdynamic is necessary in order to have the backtrace handler in toolsignal show all information
-
-# -----------------------------------------------------------------------------------------------------------------
-# sha256.cpp, which contains part of manually optimised assembler code, runs faster when compiling with -O1 option.
-# As qmake does not allow to specify individual compiler options for files, we add an "extra compiler" statement
-# here in order to compile the file correctly. At the same time, grep removes out the silly "matching constraint"
-# warning spit out by g++.
-# The pipe to cat at the end of the compile gives us an exit code 0, as grep may return values <> 0 depending
-# whether there is an output or not. The disadvantage is, that compile errrors cannot be detected by make (Tests
-# have been made with the PIPESTATUS variable, but that didn't work).
-# -----------------------------------------------------------------------------------------------------------------
-FAST_ASM_FILES    = sha256.cpp
-FAST_ASM_CXXFLAGS = $$QMAKE_CXXFLAGS_RELEASE $$QMAKE_CXXFLAGS_WARN_ON
-FAST_ASM_CXXFLAGS -= -O0
-FAST_ASM_CXXFLAGS -= -O2
-FAST_ASM_CXXFLAGS -= -O3
-FAST_ASM_CXXFLAGS += -O1
-fastasm.name = Compile file containing inline assembler statements with -O1 option for faster code
-fastasm.input = FAST_ASM_FILES
-fastasm.output = ${QMAKE_FILE_BASE}.o
-fastasm.commands = g++ -c $$FAST_ASM_CXXFLAGS ${QMAKE_FILE_IN} -o  ${QMAKE_FILE_BASE}.o 2>&1 | grep -vE \"matching constraint does not allow a register|In function |At global scope:\"  | cat
-QMAKE_EXTRA_COMPILERS += fastasm
-
-
-LIBS += -lguytoollog
-LIBS += -lguytoolerror
-LIBS += -lguytoolcfg
-LIBS += -lguytoolsignal
-LIBS += -lguytoolsysinfo
-LIBS += -lproc
-LIBS += -lewf
-# For static linking on Debian Etch
-# LIBS += /usr/lib/libparted.a
-LIBS += -lparted
-
-#LIBS += -lz
-
-TRANSLATIONS  = guymager_en.ts
-TRANSLATIONS += guymager_de.ts
-TRANSLATIONS += guymager_fr.ts
-TRANSLATIONS += guymager_it.ts
-TRANSLATIONS += guymager_nl.ts
-
diff --git a/guymager_de.ts b/guymager_de.ts
deleted file mode 100644
index ed1bbfd..0000000
--- a/guymager_de.ts
+++ /dev/null
@@ -1,984 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1" language="de">
-<context>
-    <name>QObject</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Missing root rights</source>
-        <comment>Dialog title</comment>
-        <translation>Keine Root-Rechte</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Guymager needs to be started with root rights in order to perform acquisitions. You are not root and thus won't be able to acquire devices.
-Continue anyway?</source>
-        <translation>Guymager muss mit Root-Rechten gestartet werden um Akquisitionen ausführen zu können. Sie haben keine Root-Rechte und daher werden Sie keine Geräte akquirieren können.
-Trotzdem fortfahren?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Deleting %1</source>
-        <translation>Lösche %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Ok</source>
-        <translation>Ok</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Cancel</source>
-        <translation>Abbruch</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Linux dd raw image</source>
-        <translation>Linux dd-Image</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Expert Witness Format, sub-format %1</source>
-        <translation>EWF-Format, Unterformat %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Advanced forensic image</source>
-        <translation>AFF format</translation>
-    </message>
-</context>
-<context>
-    <name>t_DeviceListModel</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Serial
-nr.</source>
-        <comment>Column on main screen</comment>
-        <translation>Serien-
-nummer</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Linux
-device</source>
-        <comment>Column on main screen</comment>
-        <translation>Linux
-Gerät</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Model</source>
-        <comment>Column on main screen</comment>
-        <translation>Modell</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Size</source>
-        <comment>Column on main screen</comment>
-        <translation>Größe</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Bad
-sectors</source>
-        <comment>Column on main screen</comment>
-        <translation>Defekte
-Sektoren</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Progress</source>
-        <comment>Column on main screen</comment>
-        <translation>Fortschritt</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Average
-Speed
-[MB/s]</source>
-        <comment>Column on main screen</comment>
-        <translation>Mittlere
-Geschw.
-[MB/s]</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Time
-remaining</source>
-        <comment>Column on main screen</comment>
-        <translation>Restzeit</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>FIFO queues
-usage
-[%]</source>
-        <comment>Column on main screen</comment>
-        <translation>FIFO-
-Belegung
-[%]</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>State</source>
-        <comment>Column on main screen</comment>
-        <translation>Status</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAbort</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Do you want to abort the acquisition of %1?</source>
-        <translation>Möchten Sie die Akquisition von %1 abbrechen?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Delete partial image files</source>
-        <translation>Partielle Image-Dateien löschen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Do you want to abort the verification of %1?</source>
-        <translation>Möchten Sie die Verifizierung von %1 abbrechen?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Abort?</source>
-        <comment>Dialog title</comment>
-        <translation>Abbrechen?</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAcquire</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>EwfCaseNumber</source>
-        <translation>Fallnummer</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>EwfEvidenceNumber</source>
-        <translation>Asservatennummer</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>EwfExaminer</source>
-        <translation>Bearbeiter</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>EwfDescription</source>
-        <translation>Beschreibung</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>EwfNotes</source>
-        <translation>Notizen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>DestDirectory</source>
-        <translation>Zielverzeichnis</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>DestImageFilename</source>
-        <translation>Image-Dateiname (ohne Endung)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>DestInfoFilename</source>
-        <translation>Info-Dateiname (ohne Endung)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>File format</source>
-        <translation>Dateiformat</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Destination</source>
-        <translation>Ziel</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Configuration flag WriteToDevNull is set!</source>
-        <translation>Konfigurationsparameter WriteToDevNull ist gesetzt!</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Hash computation</source>
-        <translation>Hash-Berechnung</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Calculate MD5 hash</source>
-        <translation type="obsolete">MD5-Hash berechnen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation>Zielverzeichnis auswählen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>The filenames contain special characters which are not allowed. Guymager suggests the following changes:
-<byte value="x9"/>Image filename: %1
-<byte value="x9"/>Info filename: %2
-Do you accept these changes?</source>
-        <translation>Die Dateinamen enthalten unerlaubte Sonderzeichen. Guymager schlägt stattdessen folgende Namen vor:
-<byte value="x9"/>Image-Dateiname: %1
-<byte value="x9"/>Info-Dateiname: %2
-Sind Sie mit diesen Änderungen einverstanden?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(file extension %1)</source>
-        <translation>(Datei-Endung %1)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Special characters</source>
-        <comment>Dialog title</comment>
-        <translation>Sonderzeichen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Verify MD5 hash (re-read source after acquisition, takes twice as long)</source>
-        <translation type="obsolete">MD5-Hash verifizieren (erneutes Lesen des Quellmediums nach Akquisition, benötigt die doppelte Zeit)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>DestImageDirectory</source>
-        <translation>Image-Verzeichnis</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>DestInfoDirectory</source>
-        <translation>Info-Verzeichnis</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>...</source>
-        <comment>The directory browse button</comment>
-        <translation>...</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquisition parameters for %1</source>
-        <comment>Dialog title, %1 is the device (for instance /dev/hdc)</comment>
-        <translation>Akquisitionsparameter für %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Calculate hashes (MD5 and SHA-256)</source>
-        <translation>Hash-Werte berechnen (MD5 und SHA-256)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Re-read source after acquisition for verification (takes twice as long)</source>
-        <translation>Quellmedium nach Akquisition erneut lesen und verifizieren (benötigt die doppelte Zeit)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Images files exist</source>
-        <comment>Dialog title</comment>
-        <translation>Image-Dateien existieren bereits</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>The image files already exist. Do you want to overwrite them?</source>
-        <translation>Die Image-Dateien existieren bereits. Möchten Sie sie überschreiben?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Access denied</source>
-        <comment>Dialog title</comment>
-        <translation>Kein Zugriff</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Guymager cannot write to the directory
-<byte value="x9"/>%1
-This may be due to insufficient access rights. Please choose another directory.</source>
-        <translation>Der Schreibzugriff auf das Verzeichnis
-<byte value="x9"/>%1
-schlug fehl. Dies könnte an unzureichenden Zugriffsrechten liegen. Bitte wählen Sie ein anderes Verzeichnis.</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgDirSel</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>New directory</source>
-        <translation>Neues Verzeichnis</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Remove directory</source>
-        <translation>Verzeichnis entfernen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation>Zielverzeichnis auswählen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>NewDirectory</source>
-        <comment>Name of the new directory that will be created</comment>
-        <translation>NeuesVerzeichnis</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgMessage</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Close</source>
-        <translation>Schliessen</translation>
-    </message>
-</context>
-<context>
-    <name>t_Info</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Command executed: %1</source>
-        <translation>Ausgeführter Befehl: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>No information can be displayed as a timeout occured while executing the command.</source>
-        <translation>Der Befehl benötigte zu lange; keine Informationen vorhanden.</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Information returned:</source>
-        <translation>Ausgabe:</translation>
-    </message>
-</context>
-<context>
-    <name>t_InfoField</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Size</source>
-        <translation>Größe</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Sector size</source>
-        <translation>Sektorgröße</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Sector size physical</source>
-        <translation type="obsolete">Physikalische Sektorgröße</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Image file</source>
-        <translation>Image-Datei</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Info file</source>
-        <translation>Info-Datei</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Current speed</source>
-        <translation>Aktuelle Geschwindigkeit</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>bytes</source>
-        <translation>Bytes</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 verification</source>
-        <translation type="obsolete">MD5-Verifizierung</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>on</source>
-        <comment>Display that MD5 verification is on</comment>
-        <translation type="obsolete">ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>off</source>
-        <comment>Display that MD5 verification is off</comment>
-        <translation type="obsolete">aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 calculation</source>
-        <translation type="obsolete">MD5-Berechnung</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>on</source>
-        <comment>Display that MD5 calculation is on</comment>
-        <translation type="obsolete">ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>off</source>
-        <comment>Display that MD5 calculation is off</comment>
-        <translation type="obsolete">aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Hash calculation</source>
-        <translation>Hash-Berechnung</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Source verification</source>
-        <translation>Verifikation Quellmedium</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>on</source>
-        <comment>Display that hash calculation is on</comment>
-        <translation>ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>off</source>
-        <comment>Display that hash calculation is off</comment>
-        <translation>aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>on</source>
-        <comment>Display that source verification is on</comment>
-        <translation>ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>off</source>
-        <comment>Display that source verification is off</comment>
-        <translation>aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Started</source>
-        <comment>Start timestamp and running time</comment>
-        <translation>Läuft seit</translation>
-    </message>
-</context>
-<context>
-    <name>t_MainWindow</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Local device</source>
-        <translation>Lokales Gerät</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Idle</source>
-        <translation>--</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Cleanup</source>
-        <translation>Aufräumen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished</source>
-        <translation>Fertig</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted - Error: Reason is 'none'</source>
-        <translation>Abbruch - Fehler "Reason none"</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted by user</source>
-        <translation>Abbruch durch Benutzer</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted - Image file write error</source>
-        <translation>Abbruch - Image-Schreibfehler</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted - Device read error</source>
-        <translation>Abbruch - Lesefehler</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>&Rescan</source>
-        <translation>&Auffrischen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>F5</source>
-        <translation>F5</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Rescan devices and update list</source>
-        <translation>Geräte neu einlesen und Liste auffrischen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>There are active acquisitions. Do you really want to abort them and quit?</source>
-        <translation>GUYMAGER hat noch Akquisitionen laufen. Möchten Sie diese abbrechen und das Programm verlassen?</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Debug information</source>
-        <translation>Debug-Informationen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>About GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation>Über GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>GUYMAGER is a Linux-based forensic imaging tool
-
-Version: %1
-Compilation timestamp: %2
-Compiled with gcc %3
-Using libewf %4
-Using libguytools %5</source>
-        <translation>GUYMAGER is ein Linux-basierter, forensischer Imager
-
-Version: %1
-Zeitstempel der Kompilation: %2
-Kompiliert mit gcc %3
-Benutzt libewf %4
-Benutzt libguytools %5</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>About Qt</source>
-        <comment>Dialog title</comment>
-        <translation>Über Qt</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Exit GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation>GUYMAGER verlassen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>&Devices</source>
-        <translation>&Geräte</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>&Misc</source>
-        <comment>Menu entry</comment>
-        <translation>&Verschiedenes</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Debug</source>
-        <comment>Menu entry</comment>
-        <translation>Debug</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>&Help</source>
-        <comment>Menu entry</comment>
-        <translation>&Hilfe</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>About &GUYMAGER</source>
-        <comment>Menu entry</comment>
-        <translation>Über &GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>About &Qt</source>
-        <comment>Menu entry</comment>
-        <translation>Über &Qt</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquisition running</source>
-        <translation>Akquisition läuft</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Verification running</source>
-        <translation>Verifikation läuft</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Device disconnected, acquisition paused</source>
-        <translation>Gerät abgeschaltet, Akquisition unterbrochen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Device disconnected, verification paused</source>
-        <translation>Gerät abgeschaltet, Verifikation unterbrochen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished - MD5 verified & ok</source>
-        <translation type="obsolete">Fertig - MD5-Verifikation ok</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished - MD5 verification mismatch</source>
-        <translation type="obsolete">Fertig - MD5-Verifizierung schlug fehl</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished - hashes verified & ok</source>
-        <translation>Fertig - Hash-Verifikation ok</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished - hash verification mismatch</source>
-        <translation>Fertig - Hash-Verifikation schlug fehl</translation>
-    </message>
-</context>
-<context>
-    <name>t_Table</name>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Local Device - cannot be acquired</source>
-        <translation>Lokales Gerät - kann nicht akquiriert werden</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquire</source>
-        <comment>Context menu</comment>
-        <translation>Akquisition starten</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Abort acquisition</source>
-        <comment>Context menu</comment>
-        <translation>Akquisition abbrechen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Info</source>
-        <comment>Context menu</comment>
-        <translation>Info</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Device info</source>
-        <comment>Dialog title</comment>
-        <translation>Geräte-Informationen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>GUYMAGER ACQUISITION INFO FILE</source>
-        <comment>Info file</comment>
-        <translation>GUYMAGER INFO-DATEI ZUR AKQUISITION</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Guymager</source>
-        <comment>Info file</comment>
-        <translation>Guymager</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Device information</source>
-        <comment>Info file</comment>
-        <translation>Geräte-Informationen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Image</source>
-        <comment>Info file</comment>
-        <translation>Image</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Finished successfully</source>
-        <comment>Info file</comment>
-        <translation>Erfolgreich beendet</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(with %1 bad sectors)</source>
-        <comment>Info file, may be appended to 'finished successfully' message</comment>
-        <translation>(mit %1 defekten Sektoren)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted by user</source>
-        <comment>Info file</comment>
-        <translation>Abbruch durch Benutzer</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted because of image write error</source>
-        <comment>Info file</comment>
-        <translation>Abbruch wegen Fehler beim Schreiben der Image-Datei</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Aborted, strange reason (%1)</source>
-        <comment>Info file</comment>
-        <translation>Abbruch, unbekannter Grund (%1)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Strange state (%1)</source>
-        <comment>Info file</comment>
-        <translation>Unbekannter Zustand (%1)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>State: %1</source>
-        <comment>Info file</comment>
-        <translation>Status: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>During verification, %1 bad sectors have been encountered. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation>Während der MD5-Verifizierung wurden %1 defekte Sektoren festgestellt. Die Sektor-Nummern sind:</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation>Während der Akquisition wurden %1 defekte Sektoren festgestellt. Die Sektor-Nummern sind:</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>No bad sectors encountered during verification.</source>
-        <comment>Info file</comment>
-        <translation>Bei der Verifizierung wurden keine defekte Sektoren entdeckt.</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>No bad sectors encountered during acquisition.</source>
-        <comment>Info file</comment>
-        <translation>Bei der Akquisition wurden keine defekte Sektoren entdeckt.</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(during acquisition)</source>
-        <comment>Info file</comment>
-        <translation>(während der Akquisition)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(during MD5 verification)</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">(während der MD5-Verifizierung)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(ISO format YYYY-MM-DD HH:MM:SS)</source>
-        <translation>(ISO-Format JJJJ-MM-TT SS:MM:ss)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquisition aborted before start of verification</source>
-        <translation>Akquisition vor Beginn der MD5-Verifizierung abgebrochen</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Linux device:: %1</source>
-        <comment>Info file</comment>
-        <translation>Linux-Gerät:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Device size:: %1 (%2)</source>
-        <comment>Info file</comment>
-        <translation>Grösse:: %1 (%2)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Image format:: %1 - file extension is %2</source>
-        <comment>Info file</comment>
-        <translation>Image-Format:: %1 - mit Datei-Endung %2</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquisition started:: %1</source>
-        <comment>Info file</comment>
-        <translation>Beginn Akquisition:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Verification started:: %1</source>
-        <comment>Info file</comment>
-        <translation>Beginn MD5-Verifikation:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Ended:: %1 (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Ende:: %1 (%2 Stunden, %3 Minuten und %4 Sekunden)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Geschwindigkeit Akquisition:: %1 MByte/s (%2 Stunden, %3 Minuten und %4 Sekunden)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>--</source>
-        <comment>Info file</comment>
-        <translation>--</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation>MD5-Hash:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation>MD5-Hash verifiziert:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Compilation timestamp:: %1</source>
-        <comment>Info file</comment>
-        <translation>Zeitstempel der Kompilation:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Compiled with:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Kompiliert mit:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>libewf version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version libewf:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>libguytools version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version libguytools:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Geschwindigkeit MD5-Verifizierung:: %1 MByte/s (%2 Stunden, %3 Minuten und %4 Sekunden)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Both hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation type="obsolete">Beide Hash-Werte sind identisch. Das Gerät lieferte die gleichen Daten während der Akquisition und der Verifikation.</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>The hash values differ. The device didn't deliver the same data during acquisition and verification. Maybe you try to acquire the device once again. Check as well if the defect sector list was the same during acquisition and verification (see above).</source>
-        <translation>Die Hash-Werte sind verschieden. Das Gerät lieferte unterschiedliche Daten während der Akquisition und der Verifikation. Versuchen Sie ev. eine weitere Akquisition. Überprüfen Sie, ob die Liste der defekten Sektoren für Akquisition und Verifikation gleich ist (siehe oben).</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 calculation:: on</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">MD5-Berechnung:: ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 calculation:: off</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">MD5-Berechnung:: aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 verification:: on</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">MD5-Verifizierung:: ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>MD5 verification:: off</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">MD5-Verifizierung:: aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Image path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Image-Pfad und Datei:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Info  path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Info-Pfad und Datei:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Hash calculation:: on</source>
-        <comment>Info file</comment>
-        <translation>Hash-Berechnung:: ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Hash calculation:: off</source>
-        <comment>Info file</comment>
-        <translation>Hash-Berechnung:: aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Source verification:: on</source>
-        <comment>Info file</comment>
-        <translation>Verifikation Quellmedium:: ein</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>Source verification:: off</source>
-        <comment>Info file</comment>
-        <translation>Verifikation Quellmedium:: aus</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>(during source verification)</source>
-        <comment>Info file</comment>
-        <translation>(während der Verifikation des Quellmediums)</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>SHA256 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation>SHA256-Hash:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>SHA256 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation>SHA256-Hash verifiziert:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="137915676"/>
-        <source>The hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation>Die Hash-Werte sind identisch. Das Gerät lieferte die gleichen Daten während der Akquisition und der Verifikation.</translation>
-    </message>
-</context>
-</TS>
diff --git a/guymager_en.ts b/guymager_en.ts
deleted file mode 100644
index 2ad0090..0000000
--- a/guymager_en.ts
+++ /dev/null
@@ -1,722 +0,0 @@
-<!DOCTYPE TS><TS>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Guymager needs to be started with root rights in order to perform acquisitions. You are not root and thus won't be able to acquire devices.
-Continue anyway?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Deleting %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Missing root rights</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cancel</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux dd raw image</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Expert Witness Format, sub-format %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Advanced forensic image</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DeviceListModel</name>
-    <message>
-        <source>Serial
-nr.</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux
-device</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Model</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Size</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Bad
-sectors</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Progress</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Average
-Speed
-[MB/s]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Time
-remaining</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>FIFO queues
-usage
-[%]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAbort</name>
-    <message>
-        <source>Do you want to abort the acquisition of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Delete partial image files</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Do you want to abort the verification of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort?</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAcquire</name>
-    <message>
-        <source>File format</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Destination</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Configuration flag WriteToDevNull is set!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash computation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The filenames contain special characters which are not allowed. Guymager suggests the following changes:
-<byte value="x9"/>Image filename: %1
-<byte value="x9"/>Info filename: %2
-Do you accept these changes?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfCaseNumber</source>
-        <translation>Case number</translation>
-    </message>
-    <message>
-        <source>EwfEvidenceNumber</source>
-        <translation>Evidence number</translation>
-    </message>
-    <message>
-        <source>EwfExaminer</source>
-        <translation>Examiner</translation>
-    </message>
-    <message>
-        <source>EwfDescription</source>
-        <translation>Description</translation>
-    </message>
-    <message>
-        <source>EwfNotes</source>
-        <translation>Notes</translation>
-    </message>
-    <message>
-        <source>DestDirectory</source>
-        <translation>Directory</translation>
-    </message>
-    <message>
-        <source>DestImageFilename</source>
-        <translation>Image filename (without extension)</translation>
-    </message>
-    <message>
-        <source>DestInfoFilename</source>
-        <translation>Info filename (without extension)</translation>
-    </message>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(file extension %1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Special characters</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestImageDirectory</source>
-        <translation>Image directory</translation>
-    </message>
-    <message>
-        <source>DestInfoDirectory</source>
-        <translation>Info directory</translation>
-    </message>
-    <message>
-        <source>...</source>
-        <comment>The directory browse button</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition parameters for %1</source>
-        <comment>Dialog title, %1 is the device (for instance /dev/hdc)</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Calculate hashes (MD5 and SHA-256)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Re-read source after acquisition for verification (takes twice as long)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Images files exist</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The image files already exist. Do you want to overwrite them?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Access denied</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager cannot write to the directory
-<byte value="x9"/>%1
-This may be due to insufficient access rights. Please choose another directory.</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgDirSel</name>
-    <message>
-        <source>New directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Remove directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>NewDirectory</source>
-        <comment>Name of the new directory that will be created</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgMessage</name>
-    <message>
-        <source>Close</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Info</name>
-    <message>
-        <source>Command executed: %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No information can be displayed as a timeout occured while executing the command.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Information returned:</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_InfoField</name>
-    <message>
-        <source>Size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Sector size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Current speed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>bytes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that hash calculation is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that hash calculation is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that source verification is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that source verification is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Started</source>
-        <comment>Start timestamp and running time</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_MainWindow</name>
-    <message>
-        <source>Local device</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Idle</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cleanup</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Error: Reason is 'none'</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Image file write error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Device read error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Rescan</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>F5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Rescan devices and update list</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There are active acquisitions. Do you really want to abort them and quit?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER is a Linux-based forensic imaging tool
-
-Version: %1
-Compilation timestamp: %2
-Compiled with gcc %3
-Using libewf %4
-Using libguytools %5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About Qt</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Exit GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Devices</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Misc</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Help</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &GUYMAGER</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &Qt</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, acquisition paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, verification paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hashes verified & ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hash verification mismatch</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Table</name>
-    <message>
-        <source>Local Device - cannot be acquired</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquire</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort acquisition</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device info</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER ACQUISITION INFO FILE</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device information</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished successfully</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(with %1 bad sectors)</source>
-        <comment>Info file, may be appended to 'finished successfully' message</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted because of image write error</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted, strange reason (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Strange state (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During verification, %1 bad sectors have been encountered. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during verification.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during acquisition.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during acquisition)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(ISO format YYYY-MM-DD HH:MM:SS)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition aborted before start of verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux device:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device size:: %1 (%2)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image format:: %1 - file extension is %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Ended:: %1 (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>--</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compilation timestamp:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compiled with:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libewf version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libguytools version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values differ. The device didn't deliver the same data during acquisition and verification. Maybe you try to acquire the device once again. Check as well if the defect sector list was the same during acquisition and verification (see above).</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info  path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during source verification)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-</TS>
diff --git a/guymager_fr.ts b/guymager_fr.ts
deleted file mode 100644
index 9c1d431..0000000
--- a/guymager_fr.ts
+++ /dev/null
@@ -1,986 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1" language="fr">
-<context>
-    <name>QObject</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Ok</source>
-        <translation>Ok</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Cancel</source>
-        <translation>Annuler</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Linux dd raw image</source>
-        <translation>Image brute Linux dd </translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Expert Witness Format, sub-format %1</source>
-        <translation>Format EWF, sous-format %1 </translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Missing root rights</source>
-        <comment>Dialog title</comment>
-        <translation>Droits «root»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Guymager needs to be started with root rights in order to perform acquisitions. You are not root and thus won't be able to acquire devices.
-Continue anyway?</source>
-        <translation>Guymager doit être lancé comme «root» pour pouvoir effectuer des acquisitions.
-Continuer quand-même?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Deleting %1</source>
-        <translation>Efface %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Advanced forensic image</source>
-        <translation>Format AFF</translation>
-    </message>
-</context>
-<context>
-    <name>t_DeviceListModel</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Serial
-nr.</source>
-        <comment>Column on main screen</comment>
-        <translation>Nº de
-série</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Linux
-device</source>
-        <comment>Column on main screen</comment>
-        <translation>Média
-Linux</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Model</source>
-        <comment>Column on main screen</comment>
-        <translation>Modèle</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Size</source>
-        <comment>Column on main screen</comment>
-        <translation>Capa-
-cité</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Bad
-sectors</source>
-        <comment>Column on main screen</comment>
-        <translation>Mauvais
-secteurs</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Progress</source>
-        <comment>Column on main screen</comment>
-        <translation>Progrès</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Average
-Speed
-[MB/s]</source>
-        <comment>Column on main screen</comment>
-        <translation>Vitesse
-moyenne
-[MB/s]</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Time
-remaining</source>
-        <comment>Column on main screen</comment>
-        <translation>Temps
-restant</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>FIFO queues
-usage
-[%]</source>
-        <comment>Column on main screen</comment>
-        <translation>Utilisation
-des FIFOs
-[%]</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>State</source>
-        <comment>Column on main screen</comment>
-        <translation>Etat</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAbort</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Do you want to abort the acquisition of %1?</source>
-        <translation>Voulez vous abandonner l'acquisition de %1?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Delete partial image files</source>
-        <translation>Effacer les images partiellement écrits?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Do you want to abort the verification of %1?</source>
-        <translation>Voulez vous abandonner la vérification de %1?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Abort?</source>
-        <comment>Dialog title</comment>
-        <translation>Abandonner?</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAcquire</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>EwfCaseNumber</source>
-        <translation>Numéro d'affaire</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>EwfEvidenceNumber</source>
-        <translation>No. de pièce</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>EwfExaminer</source>
-        <translation>Examinateur</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>EwfDescription</source>
-        <translation>Description</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>EwfNotes</source>
-        <translation>Notes</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>DestDirectory</source>
-        <translation>Répertoire</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>DestImageFilename</source>
-        <translation>Nom du fichier image</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>DestInfoFilename</source>
-        <translation>Nom du fichier info</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>File format</source>
-        <translation>Format fichier</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(file extension %1)</source>
-        <translation>(extension %1)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Destination</source>
-        <translation>Destination</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Configuration flag WriteToDevNull is set!</source>
-        <translation>Paramètre de configuration WriteToDevNull activé!</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Hash computation</source>
-        <translation>Calculation de valeurs «hash»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Calculate MD5 hash</source>
-        <translation type="obsolete">Calculer «hash MD5»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation>Sélectionner le répertoire de destination</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Special characters</source>
-        <comment>Dialog title</comment>
-        <translation>Charactères spéciaux</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>The filenames contain special characters which are not allowed. Guymager suggests the following changes:
-<byte value="x9"/>Image filename: %1
-<byte value="x9"/>Info filename: %2
-Do you accept these changes?</source>
-        <translation>Les noms de fichiers contiennent des charactères spéciaux qui ne peuvent être utilisés. Guymager vous propose de modifier les nom comme suit:
-<byte value="x9"/>Nom du fichier image: %1
-<byte value="x9"/>Nom du fichier info: %2
-Acceptez-vous ces changement?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Verify MD5 hash (re-read source after acquisition, takes twice as long)</source>
-        <translation type="obsolete">Vérifier «hash MD5» (relire média après acquisition, prend le double du temps)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>DestImageDirectory</source>
-        <translation>Répertoire image</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>DestInfoDirectory</source>
-        <translation>Répertoire info</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>...</source>
-        <comment>The directory browse button</comment>
-        <translation>...</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquisition parameters for %1</source>
-        <comment>Dialog title, %1 is the device (for instance /dev/hdc)</comment>
-        <translation>Paramètres d'acquisition pour %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Calculate hashes (MD5 and SHA-256)</source>
-        <translation>Caculer valeurs «hash» (MD5 et SHA-256)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Re-read source after acquisition for verification (takes twice as long)</source>
-        <translation>Relire média après acquisition pour verification (prend le double du temps)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Images files exist</source>
-        <comment>Dialog title</comment>
-        <translation>Fichier image existe</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>The image files already exist. Do you want to overwrite them?</source>
-        <translation>Des fichiers image de ce nom existent déjà. Voulez vous les réécrire?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Access denied</source>
-        <comment>Dialog title</comment>
-        <translation>Accès refusé</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Guymager cannot write to the directory
-<byte value="x9"/>%1
-This may be due to insufficient access rights. Please choose another directory.</source>
-        <translation>Guymager n'a pu écrire dans le répertoire
-<byte value="x9"/>%1
-,possiblement à cause de droits d'accès insuffisants. Veuillez choisir un autre répertoire.</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgDirSel</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation>Sélectionner le répertoire de destination</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>New directory</source>
-        <translation>Nouveau répertoire</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Remove directory</source>
-        <translation>Effacer répertoire</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>NewDirectory</source>
-        <comment>Name of the new directory that will be created</comment>
-        <translation>Nom du nouveau répertoire à créer</translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgMessage</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Close</source>
-        <translation>Fermer</translation>
-    </message>
-</context>
-<context>
-    <name>t_Info</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Command executed: %1</source>
-        <translation>Commande  exécutée: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>No information can be displayed as a timeout occured while executing the command.</source>
-        <translation>Aucune information n'est disponible suite au dépassement du temps d'exécution maximal.</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Information returned:</source>
-        <translation>Information retournée:</translation>
-    </message>
-</context>
-<context>
-    <name>t_InfoField</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Size</source>
-        <translation>Capacité</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Sector size</source>
-        <translation>Capacité secteur</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Sector size physical</source>
-        <translation type="obsolete">Capacité secteur physique</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Image file</source>
-        <translation>Nom du fichier image</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Info file</source>
-        <translation>Nom du fichier info</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Current speed</source>
-        <translation>Vitesse actuelle</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>bytes</source>
-        <translation>octets</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 verification</source>
-        <translation type="obsolete">Vérification «hash MD5»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>on</source>
-        <comment>Display that MD5 verification is on</comment>
-        <translation type="obsolete">oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>off</source>
-        <comment>Display that MD5 verification is off</comment>
-        <translation type="obsolete">non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 calculation</source>
-        <translation type="obsolete">Calculation «hash MD5»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>on</source>
-        <comment>Display that MD5 calculation is on</comment>
-        <translation type="obsolete">oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>off</source>
-        <comment>Display that MD5 calculation is off</comment>
-        <translation type="obsolete">non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Hash calculation</source>
-        <translation>Calculer valeurs «hash»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Source verification</source>
-        <translation>Relire et vérifier media</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>on</source>
-        <comment>Display that hash calculation is on</comment>
-        <translation>oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>off</source>
-        <comment>Display that hash calculation is off</comment>
-        <translation>non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>on</source>
-        <comment>Display that source verification is on</comment>
-        <translation>oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>off</source>
-        <comment>Display that source verification is off</comment>
-        <translation>non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Started</source>
-        <comment>Start timestamp and running time</comment>
-        <translation>Démarré</translation>
-    </message>
-</context>
-<context>
-    <name>t_MainWindow</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Local device</source>
-        <translation>Média local</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Idle</source>
-        <translation>Libre</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Cleanup</source>
-        <translation>Nettoyage</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished</source>
-        <translation>Fini</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted - Error: Reason is 'none'</source>
-        <translation>Abandon - raison «none»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted by user</source>
-        <translation>Abandonné par l'utilisateur</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted - Image file write error</source>
-        <translation>Abandon - erreur d'écriture</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted - Device read error</source>
-        <translation>Abandon - erreur grave de lecture </translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>&Rescan</source>
-        <translation>&Actualiser</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>F5</source>
-        <translation>F5</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Rescan devices and update list</source>
-        <translation>Actualiser la liste des médias connectés</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>&Devices</source>
-        <translation>&Médias</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>&Misc</source>
-        <comment>Menu entry</comment>
-        <translation>&Divers</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Debug</source>
-        <comment>Menu entry</comment>
-        <translation>Debug</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>&Help</source>
-        <comment>Menu entry</comment>
-        <translation>&Aide</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>About &GUYMAGER</source>
-        <comment>Menu entry</comment>
-        <translation>A propos de &GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>About &Qt</source>
-        <comment>Menu entry</comment>
-        <translation>A propos de &Qt</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Exit GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation>Quitter GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>There are active acquisitions. Do you really want to abort them and quit?</source>
-        <translation>Il y a toujours des acquisitions en cours. Voulez-vous vraiment quitter le programme?</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Debug information</source>
-        <translation>Information «debug»</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>About GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation>A propos de GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>GUYMAGER is a Linux-based forensic imaging tool
-
-Version: %1
-Compilation timestamp: %2
-Compiled with gcc %3
-Using libewf %4
-Using libguytools %5</source>
-        <translation>GUYMAGER est un outil d'acquisition forensique basé sur Linux
-
-Version: %1
-Date et heure de compilation: %2
-Compilé avec gcc %3
-Utilise libewf %4
-Utilise libguytools %5</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>About Qt</source>
-        <comment>Dialog title</comment>
-        <translation>A propos de Qt</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquisition running</source>
-        <translation>Acquisition en cours</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Verification running</source>
-        <translation>Vérification en cours</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Device disconnected, acquisition paused</source>
-        <translation>Média déconnecté, acquisition suspendue</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Device disconnected, verification paused</source>
-        <translation>Média déconnecté, vérification suspendue</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished - MD5 verified & ok</source>
-        <translation type="obsolete">Fini - Vérification MD5 réussie</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished - MD5 verification mismatch</source>
-        <translation type="obsolete">Fini - Différences pour vérification MD5 </translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished - hashes verified & ok</source>
-        <translation>Fini - Vérification «hash» réussie</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished - hash verification mismatch</source>
-        <translation>Fini - Vérification «hash» échouée</translation>
-    </message>
-</context>
-<context>
-    <name>t_Table</name>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquire</source>
-        <comment>Context menu</comment>
-        <translation>Acquisition</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Abort acquisition</source>
-        <comment>Context menu</comment>
-        <translation>Abandon de l'acquisition</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Info</source>
-        <comment>Context menu</comment>
-        <translation>Info</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Local Device - cannot be acquired</source>
-        <translation>Média local - ne peut être acquéré</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Device info</source>
-        <comment>Dialog title</comment>
-        <translation>Info média</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>GUYMAGER ACQUISITION INFO FILE</source>
-        <comment>Info file</comment>
-        <translation>FICHIER D'INFORMATION POUR ACQUISITION GUYMAGER</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Guymager</source>
-        <comment>Info file</comment>
-        <translation>Guymager</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Device information</source>
-        <comment>Info file</comment>
-        <translation>Information média</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Image</source>
-        <comment>Info file</comment>
-        <translation>Image</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Finished successfully</source>
-        <comment>Info file</comment>
-        <translation>Fini avec succées</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(with %1 bad sectors)</source>
-        <comment>Info file, may be appended to 'finished successfully' message</comment>
-        <translation>(avec %1 mauvais secteurs)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted by user</source>
-        <comment>Info file</comment>
-        <translation>Abandonné par l'utilisateur</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted because of image write error</source>
-        <comment>Info file</comment>
-        <translation>Abandonné à cause d'une erreur d'écriture</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Aborted, strange reason (%1)</source>
-        <comment>Info file</comment>
-        <translation>Abandonné pour une raison inconnue (%1)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Strange state (%1)</source>
-        <comment>Info file</comment>
-        <translation>Etat inconnu (%1)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>State: %1</source>
-        <comment>Info file</comment>
-        <translation>Etat: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>During verification, %1 bad sectors have been encountered. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation>Pendant la vérification, %1 mauvais secteurs ont été rencontrés. Leurs numéros sont les suivants:</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation>Pendant l'acquisition, %1 mauvais secteurs ont été rencontrés. Leurs numéros sont les suivants:</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>No bad sectors encountered during verification.</source>
-        <comment>Info file</comment>
-        <translation>Aucun mauvais secteur n'a été renconté pendant la vérification.</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>No bad sectors encountered during acquisition.</source>
-        <comment>Info file</comment>
-        <translation>Aucun mauvais secteur n'a été renconté pendant l'acquisition.</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(during acquisition)</source>
-        <comment>Info file</comment>
-        <translation>(pendant l'acquisition)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(during MD5 verification)</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">(pendant la vérification)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(ISO format YYYY-MM-DD HH:MM:SS)</source>
-        <translation>(format ISO AAAA-MM-JJ HH:MM:SS)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquisition aborted before start of verification</source>
-        <translation>Acquisition abandonnée avant de commencer vérification</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Linux device:: %1</source>
-        <comment>Info file</comment>
-        <translation>Média Linux:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Device size:: %1 (%2)</source>
-        <comment>Info file</comment>
-        <translation>Capacité:: %1 (%2)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Image format:: %1 - file extension is %2</source>
-        <comment>Info file</comment>
-        <translation>Format de l'image:: %1 - l'extension fichier est %2</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquisition started:: %1</source>
-        <comment>Info file</comment>
-        <translation>Début de l'acquisition:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Verification started:: %1</source>
-        <comment>Info file</comment>
-        <translation>Début de la vérification:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Ended:: %1 (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Fin:: %1 (%2 heures, %3 minutes et %4 secondes)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Vitesse de l'acquisition:: %1 MByte/s (%2 heures, %3 minutes et %4 secondes)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>--</source>
-        <comment>Info file</comment>
-        <translation>--</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation>Hash MD5:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation>Hash MD5 vérifié:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Compilation timestamp:: %1</source>
-        <comment>Info file</comment>
-        <translation>Date et heure de compilation:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Compiled with:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Compilé avec gcc:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>libewf version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>libguytools version:: %1</source>
-        <comment>Info file</comment>
-        <translation>Version libguytools:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation>Vitesse de la vérification:: %1 MByte/s (%2 heures, %3 minutes et %4 secondes)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Both hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation type="obsolete">Les deux hash MD5 sont identiques. Le média fournissait les mêmes données pendant l'acquisition et la vérification.</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>The hash values differ. The device didn't deliver the same data during acquisition and verification. Maybe you try to acquire the device once again. Check as well if the defect sector list was the same during acquisition and verification (see above).</source>
-        <translation>Les valeurs hash MD5 diffèrent. Le média ne fournissait pas les mêmes données pendant l'acquisition et la vérification. Vous aimeriez peut-être relancer l'acquisition. Veuillez aussi vérifier si la liste des mauvais secteurs est la même pour l'acquisition comme pour la vérification (voir en haut).</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 calculation:: on</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">Calculer hash MD5:: oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 calculation:: off</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">Calculer hash MD5: non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 verification:: on</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">Vérification hash MD5:: oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>MD5 verification:: off</source>
-        <comment>Info file</comment>
-        <translation type="obsolete">Vérification hash MD5:: non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Image path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Répertoire et fichier image:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Info  path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation>Répertoire et fichier info:: %1 %2</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Hash calculation:: on</source>
-        <comment>Info file</comment>
-        <translation>Calculer valeurs hash:: oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Hash calculation:: off</source>
-        <comment>Info file</comment>
-        <translation>Calculer valeurs hash:: non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Source verification:: on</source>
-        <comment>Info file</comment>
-        <translation>Relire et vérifier media:: oui</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>Source verification:: off</source>
-        <comment>Info file</comment>
-        <translation>Relire et vérifier media:: non</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>(during source verification)</source>
-        <comment>Info file</comment>
-        <translation>(pendant la vérification)</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>SHA256 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation>SHA256 hash:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>SHA256 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation>SHA256 hash vérifié:: %1</translation>
-    </message>
-    <message>
-        <location filename="" line="1879"/>
-        <source>The hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation>Les valeurs hash sont identiques. Le média fournissait les mêmes données pendant l'acquisition et la vérification.</translation>
-    </message>
-</context>
-</TS>
diff --git a/guymager_it.ts b/guymager_it.ts
deleted file mode 100644
index 90b8d32..0000000
--- a/guymager_it.ts
+++ /dev/null
@@ -1,722 +0,0 @@
-<!DOCTYPE TS><TS>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cancel</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux dd raw image</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Expert Witness Format, sub-format %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Missing root rights</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager needs to be started with root rights in order to perform acquisitions. You are not root and thus won't be able to acquire devices.
-Continue anyway?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Deleting %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Advanced forensic image</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DeviceListModel</name>
-    <message>
-        <source>Serial
-nr.</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux
-device</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Model</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Size</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Bad
-sectors</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Progress</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Average
-Speed
-[MB/s]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Time
-remaining</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>FIFO queues
-usage
-[%]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAbort</name>
-    <message>
-        <source>Do you want to abort the acquisition of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Delete partial image files</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Do you want to abort the verification of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort?</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAcquire</name>
-    <message>
-        <source>EwfCaseNumber</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfEvidenceNumber</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfExaminer</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfDescription</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfNotes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestImageFilename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestInfoFilename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>File format</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(file extension %1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Destination</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Configuration flag WriteToDevNull is set!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash computation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Special characters</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The filenames contain special characters which are not allowed. Guymager suggests the following changes:
-<byte value="x9"/>Image filename: %1
-<byte value="x9"/>Info filename: %2
-Do you accept these changes?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestImageDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestInfoDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>...</source>
-        <comment>The directory browse button</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition parameters for %1</source>
-        <comment>Dialog title, %1 is the device (for instance /dev/hdc)</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Calculate hashes (MD5 and SHA-256)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Re-read source after acquisition for verification (takes twice as long)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Images files exist</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The image files already exist. Do you want to overwrite them?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Access denied</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager cannot write to the directory
-<byte value="x9"/>%1
-This may be due to insufficient access rights. Please choose another directory.</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgDirSel</name>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>New directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Remove directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>NewDirectory</source>
-        <comment>Name of the new directory that will be created</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgMessage</name>
-    <message>
-        <source>Close</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Info</name>
-    <message>
-        <source>Command executed: %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No information can be displayed as a timeout occured while executing the command.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Information returned:</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_InfoField</name>
-    <message>
-        <source>Size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Sector size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Current speed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>bytes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that hash calculation is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that hash calculation is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that source verification is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that source verification is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Started</source>
-        <comment>Start timestamp and running time</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_MainWindow</name>
-    <message>
-        <source>Local device</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Idle</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cleanup</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Error: Reason is 'none'</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Image file write error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Device read error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Rescan</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>F5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Rescan devices and update list</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Devices</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Misc</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Help</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &GUYMAGER</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &Qt</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Exit GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There are active acquisitions. Do you really want to abort them and quit?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER is a Linux-based forensic imaging tool
-
-Version: %1
-Compilation timestamp: %2
-Compiled with gcc %3
-Using libewf %4
-Using libguytools %5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About Qt</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, acquisition paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, verification paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hashes verified & ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hash verification mismatch</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Table</name>
-    <message>
-        <source>Acquire</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort acquisition</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Local Device - cannot be acquired</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device info</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER ACQUISITION INFO FILE</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device information</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished successfully</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(with %1 bad sectors)</source>
-        <comment>Info file, may be appended to 'finished successfully' message</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted because of image write error</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted, strange reason (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Strange state (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During verification, %1 bad sectors have been encountered. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during verification.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during acquisition.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during acquisition)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(ISO format YYYY-MM-DD HH:MM:SS)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition aborted before start of verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux device:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device size:: %1 (%2)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image format:: %1 - file extension is %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Ended:: %1 (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>--</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compilation timestamp:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compiled with:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libewf version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libguytools version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values differ. The device didn't deliver the same data during acquisition and verification. Maybe you try to acquire the device once again. Check as well if the defect sector list was the same during acquisition and verification (see above).</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info  path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during source verification)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-</TS>
diff --git a/guymager_nl.ts b/guymager_nl.ts
deleted file mode 100644
index 48a5668..0000000
--- a/guymager_nl.ts
+++ /dev/null
@@ -1,722 +0,0 @@
-<!DOCTYPE TS><TS>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cancel</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux dd raw image</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Expert Witness Format, sub-format %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Advanced forensic image</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Missing root rights</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager needs to be started with root rights in order to perform acquisitions. You are not root and thus won't be able to acquire devices.
-Continue anyway?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Deleting %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DeviceListModel</name>
-    <message>
-        <source>Serial
-nr.</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux
-device</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Model</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Size</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Bad
-sectors</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Progress</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Average
-Speed
-[MB/s]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Time
-remaining</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>FIFO queues
-usage
-[%]</source>
-        <comment>Column on main screen</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAbort</name>
-    <message>
-        <source>Do you want to abort the acquisition of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Do you want to abort the verification of %1?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Delete partial image files</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort?</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgAcquire</name>
-    <message>
-        <source>EwfCaseNumber</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfEvidenceNumber</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfExaminer</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfDescription</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>EwfNotes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestImageDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestImageFilename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestInfoDirectory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DestInfoFilename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>...</source>
-        <comment>The directory browse button</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition parameters for %1</source>
-        <comment>Dialog title, %1 is the device (for instance /dev/hdc)</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>File format</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(file extension %1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Destination</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Configuration flag WriteToDevNull is set!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash computation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Calculate hashes (MD5 and SHA-256)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Re-read source after acquisition for verification (takes twice as long)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Special characters</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The filenames contain special characters which are not allowed. Guymager suggests the following changes:
-<byte value="x9"/>Image filename: %1
-<byte value="x9"/>Info filename: %2
-Do you accept these changes?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Images files exist</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The image files already exist. Do you want to overwrite them?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Access denied</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager cannot write to the directory
-<byte value="x9"/>%1
-This may be due to insufficient access rights. Please choose another directory.</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgDirSel</name>
-    <message>
-        <source>Select destination directory</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>New directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Remove directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>NewDirectory</source>
-        <comment>Name of the new directory that will be created</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_DlgMessage</name>
-    <message>
-        <source>Close</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Info</name>
-    <message>
-        <source>Command executed: %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No information can be displayed as a timeout occured while executing the command.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Information returned:</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_InfoField</name>
-    <message>
-        <source>Size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Sector size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Current speed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>bytes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that hash calculation is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that hash calculation is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>on</source>
-        <comment>Display that source verification is on</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>off</source>
-        <comment>Display that source verification is off</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Started</source>
-        <comment>Start timestamp and running time</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_MainWindow</name>
-    <message>
-        <source>Local device</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Idle</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification running</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, acquisition paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device disconnected, verification paused</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Cleanup</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hashes verified & ok</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished - hash verification mismatch</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Error: Reason is 'none'</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Image file write error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted - Device read error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Rescan</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>F5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Rescan devices and update list</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Devices</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Misc</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>&Help</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &GUYMAGER</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About &Qt</source>
-        <comment>Menu entry</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Exit GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There are active acquisitions. Do you really want to abort them and quit?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About GUYMAGER</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER is a Linux-based forensic imaging tool
-
-Version: %1
-Compilation timestamp: %2
-Compiled with gcc %3
-Using libewf %4
-Using libguytools %5</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>About Qt</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>t_Table</name>
-    <message>
-        <source>Acquire</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Abort acquisition</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info</source>
-        <comment>Context menu</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Local Device - cannot be acquired</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device info</source>
-        <comment>Dialog title</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>GUYMAGER ACQUISITION INFO FILE</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Guymager</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compilation timestamp:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Compiled with:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libewf version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>libguytools version:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device information</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Linux device:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Device size:: %1 (%2)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Info  path and file name:: %1 %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Image format:: %1 - file extension is %2</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Hash calculation:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: on</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Source verification:: off</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During verification, %1 bad sectors have been encountered. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during verification.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>No bad sectors encountered during acquisition.</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>--</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Finished successfully</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(with %1 bad sectors)</source>
-        <comment>Info file, may be appended to 'finished successfully' message</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted by user</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during acquisition)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(during source verification)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted because of image write error</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Aborted, strange reason (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Strange state (%1)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>State: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>MD5 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>SHA256 hash verified:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values are identical. The device delivered the same data during acquisition and verification.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The hash values differ. The device didn't deliver the same data during acquisition and verification. Maybe you try to acquire the device once again. Check as well if the defect sector list was the same during acquisition and verification (see above).</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>(ISO format YYYY-MM-DD HH:MM:SS)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition aborted before start of verification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification started:: %1</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Ended:: %1 (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)</source>
-        <comment>Info file</comment>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-</TS>
diff --git a/hash.cpp b/hash.cpp
deleted file mode 100644
index bc7d63a..0000000
--- a/hash.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Hash wrapper functions for uniform hash interface
-// ****************************************************************************
-
-
-#include "common.h"
-
-#include <QtCore>
-#include "hash.h"
-
-
-// ------------------------------------
-//             MD5 Functions
-// ------------------------------------
-
-APIRET HashMD5Init (t_pHashContextMD5 pContext)
-{
-   #ifdef USE_MD5_FROM_OPENSSL
-      (void) MD5_Init (pContext);    // strange, man page says that MD5_Init returns void, but header file says it's int
-   #else
-      md5_init (pContext);
-   #endif
-
-   return NO_ERROR;
-}
-
-APIRET HashMD5Append (t_pHashContextMD5 pContext, void *pData, int DataLen)
-{
-   #ifdef USE_MD5_FROM_OPENSSL
-      (void) MD5_Update (pContext, pData, (unsigned long) DataLen); // Same remark as for MD5_Init
-   #else
-      md5_append (pContext, (md5_byte_t *)pData, DataLen);
-   #endif
-
-   return NO_ERROR;
-}
-
-APIRET HashMD5Digest (t_pHashContextMD5 pContext, t_pHashMD5Digest pDigest)
-{
-   #ifdef USE_MD5_FROM_OPENSSL
-      (void) MD5_Final (&pDigest->Buff[0], pContext); // Same remark as for MD5_Init
-   #else
-      md5_finish (pContext, (md5_byte_t *)&pDigest->Buff[0]);
-   #endif
-
-   return NO_ERROR;
-}
-
-APIRET HashMD5DigestStr (t_pHashMD5Digest pDigest, QString &Str)
-{
-   Str.clear();
-   for (int i=0; i<HASH_MD5_DIGEST_LENGTH; i++)
-      Str += QString ("%1") .arg ((int)(pDigest->Buff[i]), 2, 16, QChar('0'));
-   return NO_ERROR;
-}
-
-bool HashMD5Match (t_pHashMD5Digest pDigest1, t_pHashMD5Digest pDigest2)
-{
-   return (memcmp (pDigest1, pDigest2, sizeof(t_HashMD5Digest)) == 0);
-}
-
-// ------------------------------------
-//           SHA256 Functions
-// ------------------------------------
-
-APIRET HashSHA256Init (t_pHashContextSHA256 pContext)
-{
-   sha256_starts (pContext);
-   return NO_ERROR;
-}
-
-APIRET HashSHA256Append (t_pHashContextSHA256 pContext, void *pData, int DataLen)
-{
-   sha256_update (pContext, (unsigned char *)pData, DataLen);
-   return NO_ERROR;
-}
-
-APIRET HashSHA256Digest (t_pHashContextSHA256 pContext, t_pHashSHA256Digest pDigest)
-{
-   sha256_finish (pContext, (unsigned char *)pDigest);
-   return NO_ERROR;
-}
-
-APIRET HashSHA256DigestStr (t_pHashSHA256Digest pDigest, QString &Str)
-{
-   Str.clear();
-   for (int i=0; i<HASH_SHA256_DIGEST_LENGTH; i++)
-      Str += QString ("%1") .arg ((int)(pDigest->Buff[i]), 2, 16, QChar('0'));
-   return NO_ERROR;
-}
-
-bool HashSHA256Match (t_pHashSHA256Digest pDigest1, t_pHashSHA256Digest pDigest2)
-{
-   return (memcmp (pDigest1, pDigest2, sizeof(t_HashMD5Digest)) == 0);
-}
-
-
-// ------------------------------------
-//       Module initialisation
-// ------------------------------------
-
-APIRET HashInit (void)
-{
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_HASH_))
-
-   return NO_ERROR;
-}
-
-APIRET HashDeInit (void)
-{
-   return NO_ERROR;
-}
-
diff --git a/hash.h b/hash.h
deleted file mode 100644
index 75a907c..0000000
--- a/hash.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Hash wrapper functions for uniform hash interface
-// ****************************************************************************
-
-#ifndef __HASH_H__
-#define __HASH_H__
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifdef USE_MD5_FROM_OPENSSL   // Only for test purposes; It is strongly recommended to use the local md5 functions in order to avoid an OpenSSL dependency
-   #include <openssl/md5.h>
-   typedef MD5_CTX t_HashContextMD5;
-#else
-   #include "md5.h"
-   typedef md5_state_t t_HashContextMD5;
-#endif
-typedef t_HashContextMD5 *t_pHashContextMD5;
-
-#include "sha256.h"
-typedef sha256_context  t_HashContextSHA256;
-typedef sha256_context *t_pHashContextSHA256;
-
-
-
-class QString;
-
-const int HASH_MD5_DIGEST_LENGTH    = 16;
-const int HASH_SHA256_DIGEST_LENGTH = 32;
-
-typedef struct
-{
-   unsigned char Buff[HASH_MD5_DIGEST_LENGTH];
-} t_HashMD5Digest, *t_pHashMD5Digest;
-
-typedef struct
-{
-   unsigned char Buff[HASH_SHA256_DIGEST_LENGTH];
-} t_HashSHA256Digest, *t_pHashSHA256Digest;
-
-APIRET HashMD5Init      (t_pHashContextMD5 pContext);
-APIRET HashMD5Append    (t_pHashContextMD5 pContext, void *pData, int DataLen);
-APIRET HashMD5Digest    (t_pHashContextMD5 pContext, t_pHashMD5Digest pDigest);
-APIRET HashMD5DigestStr (t_pHashMD5Digest pDigest, QString &Str);
-bool   HashMD5Match     (t_pHashMD5Digest pDigest1, t_pHashMD5Digest pDigest2);
-
-APIRET HashSHA256Init      (t_pHashContextSHA256 pContext);
-APIRET HashSHA256Append    (t_pHashContextSHA256 pContext, void *pData, int DataLen);
-APIRET HashSHA256Digest    (t_pHashContextSHA256 pContext, t_pHashSHA256Digest pDigest);
-APIRET HashSHA256DigestStr (t_pHashSHA256Digest pDigest, QString &Str);
-bool   HashSHA256Match     (t_pHashSHA256Digest pDigest1, t_pHashSHA256Digest pDigest2);
-
-
-APIRET HashInit   (void);
-APIRET HashDeInit (void);
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_HASH_ = ERROR_BASE_HASH + 1,
-};
-
-#endif
-
-
diff --git a/info.cpp b/info.cpp
deleted file mode 100644
index f9fb146..0000000
--- a/info.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Information about the acquisition, creates the info file
-// ****************************************************************************
-
-#include <errno.h>
-
-#include <QtCore>
-
-#include "common.h"
-
-#include "qtutil.h"
-#include "device.h"
-#include "config.h"
-
-const char *pInfoDefaultColSep = "::";
-const char *pInfoDefaultColSepReplace = ":";
-
-
-class t_InfoLocal
-{
-   public:
-      t_pcDevice  pDevice;
-      QMutex       Mutex;
-      QString      ColSep;
-      QString      ColSepReplace;
-      QStringList  TableRows;
-};
-
-
-t_Info::t_Info (t_pcDevice pDevice)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_INFO_FILE_CREATE_FAILED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_INFO_FILE_OPEN_FAILED  ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_INFO_FILE_WRITE_FAILED ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_INFO_FILE_CLOSE_FAILED ))
-
-      Initialised = true;
-   }
-   pOwn = new t_InfoLocal;
-   SetDevice (pDevice);
-   CHK_EXIT (InitTable (pInfoDefaultColSep, pInfoDefaultColSepReplace))
-}
-
-t_Info::~t_Info ()
-{
-   delete pOwn;
-}
-
-void t_Info::SetDevice (t_pcDevice pDevice)
-{
-   pOwn->pDevice = pDevice;
-}
-
-QString t_Info::FullFileName ()
-{
-   return pOwn->pDevice->Acquisition.InfoPath + pOwn->pDevice->Acquisition.InfoFilename + t_File::pExtensionInfo;
-}
-
-
-APIRET t_Info::Create (void)
-{
-   FILE *pFile;
-
-   pOwn->Mutex.lock();
-      pFile = fopen (QSTR_TO_PSZ(FullFileName()), "w");
-      if (pFile == NULL)
-      {
-          pOwn->Mutex.unlock();
-          LOG_ERROR ("File %s cannot be opened. errno=%d '%s'", QSTR_TO_PSZ(FullFileName()), errno, ToolErrorTranslateErrno (errno))
-          return ERROR_INFO_FILE_CREATE_FAILED;
-      }
-      if (fclose (pFile))
-      {
-          pOwn->Mutex.unlock();
-          return ERROR_INFO_FILE_CLOSE_FAILED;
-      }
-   pOwn->Mutex.unlock();
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::vWrite (const char *pFormat, va_list pArguments)
-{
-   FILE *pFile;
-   int    Ret;
-
-   pOwn->Mutex.lock();
-      pFile = fopen (QSTR_TO_PSZ(FullFileName()), "a");
-
-      if (pFile == NULL)
-      {
-          pOwn->Mutex.unlock();
-          return ERROR_INFO_FILE_OPEN_FAILED;
-      }
-
-      Ret = vfprintf (pFile, pFormat, pArguments);
-      if (Ret < 0)
-      {
-          pOwn->Mutex.unlock();
-          return ERROR_INFO_FILE_WRITE_FAILED;
-      }
-
-      Ret = fclose (pFile);
-   pOwn->Mutex.unlock();
-
-   if (Ret < 0)
-       return ERROR_INFO_FILE_CLOSE_FAILED;
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::Write (const char *pFormat, ...)
-{
-   va_list VaList;  //lint -esym(530,VaList) not initialised
-
-   va_start (VaList, pFormat);
-   CHK (vWrite (pFormat, VaList))
-   va_end (VaList);
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::Write (const QString &Text)
-{
-   CHK (Write ("%s", QSTR_TO_PSZ(Text)))
-   return NO_ERROR;
-}
-
-APIRET t_Info::WriteLn (const QString &Text)
-{
-   CHK (Write ("\r\n%s", QSTR_TO_PSZ(Text)))
-   return NO_ERROR;
-}
-
-APIRET t_Info::Title (const QString &Text)
-{
-   int Len;
-
-   CHK (WriteLn (Text))
-   CHK (WriteLn ())
-   Len = Text.length();
-   for (int i=0; i<Len; i++)
-      CHK (Write ("="))
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::WriteDeviceInfo (void)
-{
-   QString DeviceInfo;
-
-   CHK (GetDeviceInfo (pOwn->pDevice, false, DeviceInfo))
-
-   CHK (Write (DeviceInfo))
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::GetDeviceInfo (t_pcDevice pDevice, bool RichText, QString &Info)
-{
-   QStringList *pDeviceInfoCommands;
-   QString       Command;
-   QString       Result;
-   APIRET        rc;
-   int           i;
-
-   CHK (CfgGetDeviceInfoCommands (&pDeviceInfoCommands))
-   for (i = 0; i < pDeviceInfoCommands->size(); i++)
-   {
-      Command = pDeviceInfoCommands->at(i);
-
-      Command.replace ("%dev", pDevice->LinuxDevice, Qt::CaseInsensitive);
-      if (i>0)
-         Info += "\r\n\r\n";
-      if (RichText)
-         Info += "<b>";
-      Info += tr("Command executed: %1") .arg(Command);
-
-      rc = QtUtilProcessCommand (Command, Result);
-      if (rc == ERROR_QTUTIL_COMMAND_TIMEOUT)
-      {
-         Info += "\r\n" + tr("No information can be displayed as a timeout occured while executing the command.");
-         if (RichText)
-            Info += "</b>";
-      }
-      else
-      {
-         CHK(rc)
-         Info += "\r\n" + tr("Information returned:");
-         if (RichText)
-              Info += "</b>";
-         else Info += "\r\n----------------------------------------------------------------------------------------------------";
-         Result.replace ("\n\r", "\n");      // Make sure that every new line of the result
-         Result.replace ("\r\n", "\n");      // has a CRLF (for Wind compatibility) and that
-         Result.replace ("\n", "\r\n   ");   // the result lines are indented by 3 spaces.
-         Result = Result.trimmed();
-         Info += "\r\n   "  + Result;
-         CHK (rc)
-      }
-   }
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::InitTable (const QString &ColSep, const QString &ColSepReplace)
-{
-   pOwn->ColSep        = ColSep;
-   pOwn->ColSepReplace = ColSepReplace;
-   pOwn->TableRows.clear();
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::AddRow (const QString &Row)
-{
-   pOwn->TableRows.append (Row);
-
-   return NO_ERROR;
-}
-
-APIRET t_Info::WriteTable (void)
-{
-   QStringList ColList;
-   QList<int>  ColWidth;
-   int         r, c;
-
-   // Calculate column widths
-   // -----------------------
-   for (r=0; r<pOwn->TableRows.count(); r++)
-   {
-      ColList = pOwn->TableRows[r].split (pOwn->ColSep);
-      for (c=0; c<ColList.count(); c++)
-      {
-         if (c >= ColWidth.count())
-            ColWidth.append (0);
-         ColWidth[c] = std::max (ColWidth[c], ColList[c].length());
-      }
-   }
-
-   // Write to info
-   // -------------
-   for (r=0; r<pOwn->TableRows.count(); r++)
-   {
-      WriteLn ();
-      ColList = pOwn->TableRows[r].split (pOwn->ColSep);
-      for (c=0; c<ColList.count(); c++)
-      {
-         Write (ColList[c].leftJustified (ColWidth[c]));
-         if (c<ColList.count()-1)
-            Write (pOwn->ColSepReplace);
-      }
-   }
-   pOwn->TableRows.clear();
-
-   return NO_ERROR;
-}
-
-
diff --git a/info.h b/info.h
deleted file mode 100644
index 6eafd22..0000000
--- a/info.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Information about the acquisition, creates the info file
-// ****************************************************************************
-
-
-#ifndef __INFO_H__
-#define __INFO_H__
-
-
-
-class t_InfoLocal;
-
-class t_Info: public QObject
-{
-   public:
-      t_Info (t_pcDevice pDevice=NULL);
-     ~t_Info (void);
-
-      void   SetDevice  (t_pcDevice pDevice);
-      APIRET Create     (void);
-      APIRET vWrite     (const char *pFormat, va_list pArguments);
-      APIRET Write      (const char *pFormat, ...) __attribute__ ((format (printf, 2, 3))); // Non-static class functions have implicit this argument, thus we start counting the parameters for __attribute__ at 2, not 1 (see GNU C-Lib Function-Atttributes.html)
-      APIRET Write      (const QString &Text);
-      APIRET WriteLn    (const QString &Text=QString());
-      APIRET Title      (const QString &Text);
-      APIRET InitTable  (const QString &ColSep, const QString &ColSepReplace);
-      APIRET AddRow     (const QString &Row);
-      APIRET WriteTable (void);
-
-      APIRET WriteDeviceInfo (void);
-
-      static APIRET GetDeviceInfo (t_pcDevice pDevice, bool RichText, QString &Info);
-
-   private:
-      QString FullFileName (void);
-
-   private:
-      t_InfoLocal *pOwn;
-};
-
-typedef t_Info *t_pInfo;
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-   #ifdef __MODULES_H__
-      enum
-      {
-         ERROR_INFO_FILE_CREATE_FAILED  = ERROR_BASE_INFO + 1,
-         ERROR_INFO_FILE_OPEN_FAILED,
-         ERROR_INFO_FILE_WRITE_FAILED,
-         ERROR_INFO_FILE_CLOSE_FAILED,
-      };
-   #endif
-
-#endif
-
diff --git a/infofield.cpp b/infofield.cpp
deleted file mode 100644
index 32dc749..0000000
--- a/infofield.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The info field area
-// ****************************************************************************
-
-#include <QtGui>
-
-#include "toolconstants.h"
-
-#include "common.h"
-#include "main.h"
-#include "infofield.h"
-
-class t_InfoFieldLocal
-{
-   public:
-      QLabel *pLabelParams;
-      QLabel *pLabelValues;
-};
-
-t_InfoField::t_InfoField ()
-{
-   CHK_EXIT (ERROR_INFOFIELD_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-t_InfoField::t_InfoField (QWidget *pParent)
-   :QFrame (pParent)
-{
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_INFOFIELD_CONSTRUCTOR_NOT_SUPPORTED))
-
-   setFrameStyle ((int)QFrame::Panel | (int)QFrame::Sunken);
-   pOwn = new t_InfoFieldLocal;
-
-   QHBoxLayout *pLayout = new QHBoxLayout (this);
-   pOwn->pLabelParams = new QLabel (this);
-   pOwn->pLabelValues = new QLabel (this);
-   pLayout->addWidget (pOwn->pLabelParams);
-   pLayout->addWidget (pOwn->pLabelValues);
-   pLayout->addStretch();
-
-   pOwn->pLabelParams->setText (         tr("Size")
-                                + "\n" + tr("Sector size")
-                                + "\n" + tr("Image file")
-                                + "\n" + tr("Info file")
-                                + "\n" + tr("Current speed")
-                                + "\n" + tr("Started", "Start timestamp and running time")
-                                + "\n" + tr("Hash calculation")
-                                + "\n" + tr("Source verification"));
-}
-
-t_InfoField::~t_InfoField ()
-{
-   delete pOwn->pLabelParams;
-   delete pOwn->pLabelValues;
-   delete pOwn;
-}
-
-void t_InfoField::SlotShowInfo (t_pDevice pDevice)
-{
-   QString StrValue, StrSpeed, Format;
-   quint64 Size;
-
-   if (pDevice)
-   {
-      // Size
-      // ----
-      Size = t_Device::GetSize (pDevice).toULongLong();
-      StrValue = MainGetpNumberLocale()->toString(Size) + " " + tr("bytes");
-      StrValue += " ("  + t_Device::GetSizeHumanFrac (pDevice, false).toString();
-      StrValue += " / " + t_Device::GetSizeHumanFrac (pDevice, true ).toString() + ")";
-
-      // Sector size
-      // -----------
-      quint64 SectorSize     = t_Device::GetSectorSize    (pDevice).toULongLong();
-      quint64 SectorSizePhys = t_Device::GetSectorSizePhys(pDevice).toULongLong();
-      StrValue += "\n" + MainGetpNumberLocale()->toString(SectorSize);
-      if (SectorSize != SectorSizePhys)
-         StrValue += " / " + MainGetpNumberLocale()->toString(SectorSizePhys);
-
-      // Image/Info file
-      // ---------------
-      if (pDevice->Acquisition.Format == t_File::NotSet)
-      {
-         StrValue += "\n\n";
-      }
-      else
-      {
-         CHK_EXIT (t_File::GetFormatExtension   (pDevice->Acquisition.Format, NULL, &Format))
-         StrValue += "\n" + pDevice->Acquisition.ImagePath + pDevice->Acquisition.ImageFilename + QSTR_TO_PSZ(Format);
-         StrValue += "\n" + pDevice->Acquisition.InfoPath  + pDevice->Acquisition.InfoFilename  + t_File::pExtensionInfo;
-      }
-
-      // Speed
-      // -----
-      StrSpeed = t_Device::GetCurrentSpeed  (pDevice).toString();
-      if (!StrSpeed.isEmpty())
-         StrSpeed += " MB/s";
-      StrValue += "\n" + StrSpeed;
-
-      // Running time
-      // ------------
-      if (pDevice->Acquisition.Format == t_File::NotSet)
-      {
-         StrValue += "\n";
-      }
-      else
-      {
-         int Hours, Minutes, Seconds;
-
-         StrValue += "\n" + pDevice->StartTimestamp.toString ("d. MMMM hh:mm:ss");
-
-         if ((pDevice->State == t_Device::Acquire) ||  // Don't display anything if no acquisition is running
-             (pDevice->State == t_Device::Verify ))
-              Seconds = pDevice->StartTimestamp.secsTo (QDateTime::currentDateTime());
-         else Seconds = pDevice->StartTimestamp.secsTo (pDevice->StopTimestamp);
-         Hours    = Seconds / SECONDS_PER_HOUR  ; Seconds -= Hours   * SECONDS_PER_HOUR;
-         Minutes  = Seconds / SECONDS_PER_MINUTE; Seconds -= Minutes * SECONDS_PER_MINUTE;
-
-         StrValue += QString(" (%1:%2:%3)") .arg(Hours,2,10,QChar('0')) .arg(Minutes,2,10,QChar('0')) .arg(Seconds,2,10,QChar('0'));
-      }
-
-      // Hash
-      // ----
-      if (pDevice->Acquisition.CalcHashes)
-           StrValue += "\n" + tr("on" , "Display that hash calculation is on");
-      else StrValue += "\n" + tr("off", "Display that hash calculation is off");
-
-      // Source verification
-      // -------------------
-      if (pDevice->Acquisition.VerifySource)
-           StrValue += "\n" + tr("on" , "Display that source verification is on");
-      else StrValue += "\n" + tr("off", "Display that source verification is off");
-   }
-   pOwn->pLabelValues->setText (StrValue);
-}
-
diff --git a/infofield.h b/infofield.h
deleted file mode 100644
index 079b36c..0000000
--- a/infofield.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The info field area 
-// ****************************************************************************
-
-
-
-#ifndef __INFOFIELD_H__
-#define __INFOFIELD_H__
-
-#include <QtGui>      //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-class t_InfoFieldLocal;
-
-class t_InfoField: public QFrame
-{
-   Q_OBJECT
-
-   public:
-      t_InfoField ();
-      t_InfoField (QWidget *pParent);
-     ~t_InfoField ();
-
-   public slots:
-      void SlotShowInfo (t_pDevice pDevice);
-
-   private:
-      t_InfoFieldLocal *pOwn;
-};
-
-typedef t_InfoField *t_pInfoField;
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-   #ifdef __MODULES_H__
-      enum
-      {
-         ERROR_INFOFIELD_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_INFOFIELD + 1,
-         
-      };
-   #endif
-
-#endif
diff --git a/itemdelegate.cpp b/itemdelegate.cpp
deleted file mode 100644
index e1fe7f6..0000000
--- a/itemdelegate.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         t_ItemDelegate is responsible for displaying the cells
-//                  in t_Table.
-// ****************************************************************************
-
-#include <QtGui>
-
-#include "common.h"
-#include "itemdelegate.h"
-
-#include <device.h>
-#include <config.h>
-
-class t_ItemDelegateLocal
-{
-   public:
-};
-
-t_ItemDelegate::t_ItemDelegate (QObject *pParent)
-   : QItemDelegate (pParent)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_ITEMDELEGATE_BAD_DISPLAY_TYPE))
-      Initialised = true;
-   }
-
-   pOwn = new t_ItemDelegateLocal;
-}
-
-t_ItemDelegate::~t_ItemDelegate ()
-{
-   delete pOwn;
-}
-
-// PaintDefaults: default background & cursor painting
-// ---------------------------------------------------
-void t_ItemDelegate::PaintDefaults (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index, QColor &ColorPen) const
-{
-   QPalette::ColorGroup ColorGroup;
-   QRect                BarRect;
-
-   ColorGroup = Option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
-   if (ColorGroup == QPalette::Normal && !(Option.state & QStyle::State_Active))
-       ColorGroup = QPalette::Inactive;
-
-   if (Option.state & QStyle::State_Selected)
-   {
-      pPainter->fillRect (Option.rect, Option.palette.brush (ColorGroup, QPalette::Highlight));
-      ColorPen = Option.palette.color (ColorGroup, QPalette::HighlightedText);
-   }
-   else
-   {
-      QVariant Variant = Index.data (Qt::BackgroundRole);
-      pPainter->fillRect (Option.rect, Variant.value<QBrush>());
-      ColorPen = Option.palette.color (ColorGroup, QPalette::Text);
-   }
-}
-
-void t_ItemDelegate::PaintProgress (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const
-{
-   QRect  BarRect;
-   QColor ColorPen;
-   double ProgressFactor;
-
-   pPainter->save();
-   PaintDefaults (pPainter, Option, Index, ColorPen);
-
-   ProgressFactor = Index.data (Qt::DisplayRole).toDouble();
-   if (ProgressFactor >= 0.0)
-   {
-      BarRect = Option.rect;
-      BarRect.adjust (10, 20, -10, -4);
-      pPainter->setBrush (Qt::NoBrush);
-      pPainter->setPen   (ColorPen);
-      pPainter->drawRect (BarRect);
-      pPainter->drawText (Option.rect, Qt::AlignHCenter | Qt::AlignCenter, QString ("%1%") .arg ((int)(ProgressFactor*100)) );
-
-      pPainter->setBrush (ColorPen);
-      pPainter->setPen   (Qt::NoPen);
-      BarRect.setWidth ((int) (BarRect.width() * ProgressFactor));
-      pPainter->drawRect (BarRect);
-
-   }
-   pPainter->restore  ();
-}
-
-static void ItemDelegateStateCircleParams (const QStyleOptionViewItem &Option, int *pCenterDistance, int *pDiameter=NULL)
-{
-   int Diameter;
-
-   Diameter = Option.rect.height() / 2;
-   if (pCenterDistance) *pCenterDistance = (Diameter * 3) / 4;
-   if (pDiameter      ) *pDiameter = Diameter;
-}
-
-void t_ItemDelegate::PaintState (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const
-{
-   QRect                BarRect;
-   QColor               ColorPen;
-   QString              StateStr;
-   QStyleOptionViewItem OptionModified (Option);
-   QRect              *pDrawRect;
-   int                  CircleDiameter;
-   int                  CircleCenterDistance;
-   t_CfgColor           CircleColor;
-   QRect                CircleRect;
-   t_pDevice           pDevice;
-
-   pPainter->save();
-   PaintDefaults (pPainter, Option, Index, ColorPen);
-
-   pDevice = (t_pDevice) Index.data(DeviceRole).value<void *>();
-
-   switch (pDevice->State)
-   {
-      case t_Device::Idle         : CircleColor = COLOR_STATE_IDLE;           break;
-      case t_Device::Acquire      : CircleColor = COLOR_STATE_ACQUIRE;        break;
-      case t_Device::AcquirePaused: CircleColor = COLOR_STATE_ACQUIRE_PAUSED; break;
-      case t_Device::Verify       : CircleColor = COLOR_STATE_VERIFY;         break;
-      case t_Device::VerifyPaused : CircleColor = COLOR_STATE_VERIFY_PAUSED;  break;
-      case t_Device::Cleanup      : CircleColor = COLOR_STATE_CLEANUP;        break;
-      case t_Device::Finished     : if (pDevice->Acquisition.VerifySource && (!HashMD5Match   (&pDevice->MD5Digest   , &pDevice->MD5DigestVerify   ) ||
-                                                                              !HashSHA256Match(&pDevice->SHA256Digest, &pDevice->SHA256DigestVerify)))
-                                         CircleColor = COLOR_STATE_FINISHED_BADVERIFY;
-                                    else CircleColor = COLOR_STATE_FINISHED;
-                                    break;
-      case t_Device::Aborted      : if (pDevice->AbortReason==t_Device::UserRequest)
-                                         CircleColor = COLOR_STATE_ABORTED_USER;
-                                    else CircleColor = COLOR_STATE_ABORTED_OTHER;
-                                    break;
-      default:                      CircleColor = COLOR_STATE_IDLE;
-   }
-
-   // Draw circle and text
-   // --------------------
-   if (!pDevice->Local)
-   {
-      pPainter->setBrush (QBrush (CONFIG_COLOR(CircleColor)));
-
-      ItemDelegateStateCircleParams (Option, &CircleCenterDistance, &CircleDiameter);
-
-      pDrawRect = &OptionModified.rect;
-      CircleRect.setSize    (QSize (CircleDiameter, CircleDiameter));
-      CircleRect.moveCenter (QPoint(pDrawRect->left() + CircleCenterDistance,
-                                    pDrawRect->top () - 1 + pDrawRect->height()/2));
-      pPainter->setPen      (ColorPen);
-      pPainter->drawEllipse (CircleRect);
-
-      pDrawRect->setLeft (OptionModified.rect.left() + 2*CircleCenterDistance); // Shift text origin to the right of the circle
-   }
-
-   QItemDelegate::paint (pPainter, OptionModified, Index);
-
-   pPainter->restore  ();
-}
-
-void t_ItemDelegate::paint (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const
-{
-   int DisplayType;
-
-   DisplayType = Index.data(t_ItemDelegate::DisplayTypeRole).toInt();
-   switch (DisplayType)
-   {
-      case DISPLAYTYPE_STANDARD: QItemDelegate::paint (pPainter, Option, Index); break;
-      case DISPLAYTYPE_PROGRESS: PaintProgress        (pPainter, Option, Index); break;
-      case DISPLAYTYPE_STATE:    PaintState           (pPainter, Option, Index); break;
-
-      default:
-         CHK_EXIT (ERROR_ITEMDELEGATE_BAD_DISPLAY_TYPE)
-   }
-
-}
-
-QSize t_ItemDelegate::sizeHint (const QStyleOptionViewItem &Option, const QModelIndex &Index) const
-{
-   int   DisplayType;
-   int   MinColWidth;
-   int   StateCircleCenterDistance;
-   QSize SizeHint;
-
-   DisplayType = Index.data(t_ItemDelegate::DisplayTypeRole).toInt();
-   switch (DisplayType)
-   {
-      case DISPLAYTYPE_STANDARD: MinColWidth = Index.data (t_ItemDelegate::MinColWidthRole).toInt();
-                                 return QItemDelegate::sizeHint (Option, Index).expandedTo (QSize(MinColWidth, 0));
-
-      case DISPLAYTYPE_PROGRESS: return QSize (10, 10); // Dummy size; Anyway, as the column title is bigger that width will be used.
-
-      case DISPLAYTYPE_STATE   : MinColWidth  = Index.data (t_ItemDelegate::MinColWidthRole).toInt();
-                                 ItemDelegateStateCircleParams (Option, &StateCircleCenterDistance);
-                                 SizeHint = QItemDelegate::sizeHint (Option, Index);
-                                 SizeHint.rwidth() += 2 * StateCircleCenterDistance;
-                                 return SizeHint.expandedTo (QSize(MinColWidth, 0));
-
-      default:                   CHK_EXIT (ERROR_ITEMDELEGATE_BAD_DISPLAY_TYPE)
-   }
-
-   return QSize();
-}
-
diff --git a/itemdelegate.h b/itemdelegate.h
deleted file mode 100644
index d1838c3..0000000
--- a/itemdelegate.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         t_ItemDelegate is responsible for displaying the cells
-//                  in t_Table.
-// ****************************************************************************
-
-#ifndef __ITEMDELEGATE_H__
-#define __ITEMDELEGATE_H__
-
-#include <QtGui>  //lint !e537 repeated include
-
-
-class t_ItemDelegateLocal;
-
-class t_ItemDelegate: public QItemDelegate
-{
-   Q_OBJECT
-
-   public:
-      static const int DisplayTypeRole = Qt::UserRole;   // Extension to Qt::ItemDataRole; when QModelIndex::data is called with this role, it is expected to return one of the enums below
-      static const int RowNrRole       = Qt::UserRole+1; // To find out the screen row nr / list row nr lookup
-      static const int MinColWidthRole = Qt::UserRole+2; // To get the minimum desired column width as defined in t_ColAssoc;
-      static const int DeviceRole      = Qt::UserRole+3; // To get pDevice
-
-      enum
-      {
-         DISPLAYTYPE_STANDARD = 0,  // Use the standard QItemDelegate functions for displaying this cell
-         DISPLAYTYPE_PROGRESS,      // The value returned is between 0 and 100 and should be displayed as a percentage bar
-         DISPLAYTYPE_STATE          // Special drawing for the status bar
-      };
-
-   protected:
-      void PaintDefaults (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index, QColor &ColorPen) const;
-      void PaintProgress (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const;
-      void PaintState    (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const;
-
-   public:
-      t_ItemDelegate (QObject *pParent=NULL);
-     ~t_ItemDelegate ();
-
-      virtual void  paint    (QPainter *pPainter, const QStyleOptionViewItem &Option, const QModelIndex &Index) const;
-      virtual QSize sizeHint (                    const QStyleOptionViewItem &Option, const QModelIndex &Index) const;
-
-   private:
-      t_ItemDelegateLocal *pOwn;
-};
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-#ifdef __MODULES_H__
-   enum
-   {
-      ERROR_ITEMDELEGATE_BAD_DISPLAY_TYPE = ERROR_BASE_ITEMDELEGATE + 1,
-   };
-#endif
-
-#endif
-
-
diff --git a/main.cpp b/main.cpp
deleted file mode 100644
index e681fd7..0000000
--- a/main.cpp
+++ /dev/null
@@ -1,531 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The main programm function, responsible for intialisation,
-//                  main window creation, entering the message loop and
-//                  deinitialisation.
-// ****************************************************************************
-
-#include <limits.h>
-#include <signal.h>
-#include <locale.h>
-#include <pwd.h>
-#include "proc/sysinfo.h"  // Required in order to get the amount of memory installed
-
-#include <QApplication>
-#include <QtGui>
-
-#include "common.h"
-
-#define MEMWATCH
-#define MEMWATCH_NOCPP
-#include "memwatch.h"
-#undef malloc   // These have been defined in memwatch.h. We must undefine them
-#undef free     // in order to be able to access std::malloc and std::free
-
-#include "toolconstants.h"
-#include "signal/toolsignal.h"
-#include "sysinfo/toolsysinfo.h"
-#include "cfg/toolcfg.h"
-
-#include "libewf.h"
-
-#include "compileinfo.h"
-#include "config.h"
-#include "device.h"
-#include "qtutil.h"
-#include "hash.h"
-#include "aaff.h"
-#include "mainwindow.h"
-#include "main.h"
-
-
-// ------------------------------------
-//                Macros
-// ------------------------------------
-
-
-// ------------------------------------
-//              Constants
-// ------------------------------------
-
-static const int MAIN_MAX_ERROR_CODES       = 1000;
-static const int MAIN_SHOW_SPLASH_TIME      =  500;  // ms
-static const int MAIN_PROCESSEVENTS_MAXTIME = 1000;
-
-enum
-{
-   ERROR_MAIN_UNKNOWN_STARTUP_SIZE = ERROR_BASE_MAIN + 1,
-   ERROR_MAIN_INVALID_WINDOW_SIZE,
-   ERROR_MAIN_LIBEWF_VERSION_MISMATCH
-};
-
-#define MAIN_SPLASH_PIXMAP             "splash.png"
-#define MAIN_LANGUAGE_FILENAME         "guymager_"
-#define MAIN_LANGUAGE_FILENAME_DEFAULT "guymager_en"
-#define MAIN_LANGUAGE_FILENAME_QT      "qt_"
-#define MAIN_DEFAULT_MISCFILES_DIR     "/usr/share/guymager/"
-#define MAIN_DEFAULT_LANGUAGE_DIR_QT   "/usr/share/qt4/translations/"
-
-// ------------------------------------
-//   Application-wide global variables
-// ------------------------------------
-
-
-// ------------------------------------
-//          Type definitions
-// ------------------------------------
-
-typedef struct                // Objects that exist only once for the whole application
-{
-   QApplication  *pApp;
-   QLocale       *pNumberLocale; // The QLocale for number conversions
-   t_Log         *pLog;
-   t_MainWindow  *pMainWindow;
-   t_pDeviceList  pDeviceList;
-   bool            CriticalInitDone;
-   char          *pCommandLine;
-} t_MainLocal;
-
-static t_MainLocal MainLocal;
-
-// ------------------------------------
-//       Signal & error handling
-// ------------------------------------
-
-static void MainLogMemMessage (int Ch)
-{
-    printf ("%c", Ch);
-}
-
-static void MainLogQtMessage (QtMsgType MsgType, const char *pMsg)
-{
-   const char *pMsgType;
-
-   switch (MsgType)
-   {
-      case QtDebugMsg:   pMsgType = "Qt debug";   break;
-      case QtWarningMsg: pMsgType = "Qt warning"; break;
-      case QtFatalMsg:   pMsgType = "Qt fatal";   break;
-      default:           pMsgType = "Qt message of unknown type:"; break;
-   }
-   LOG_INFO ("%s: %s", pMsgType, pMsg)
-   printf ("\n%s: %s", pMsgType, pMsg);
-
-   if (MsgType == QtFatalMsg)
-      ErrorExit (EXIT_QT_FATAL);
-}
-
-
-// MainSignalHandler: Called by ToolSignal whenever a signal is caught
-static void MainSignalHandler (int Signal)
-{
-   printf ("\n");
-   printf ("%c[1;37;41m", ASCII_ESC);  // white on red
-   printf ("Signal no. %d received: %s", Signal, strsignal(Signal));
-   printf ("%c[0m"      , ASCII_ESC);  // standard
-
-   if (MainLocal.CriticalInitDone)
-      LOG_ERROR ("Signal no. %d received: %s", Signal, strsignal(Signal));
-
-   if (Signal != SIGSEGV)
-      ErrorExit (EXIT_SIGNAL_RECEIVED);
-}
-
-// MainSignalLog: Called by ToolSignal for doing log output
-static void MainSignalLog (bool Error, int /*ThreadNr*/, const char *pFileName, const char *pFunction, int LineNr, const char *pFormat, va_list pArguments)
-{
-   t_Log::t_Level Level;
-
-   if (Error)
-        Level = t_Log::Error;
-   else Level = t_Log::Info;
-
-   t_Log::vEntry (Level, pFileName, pFunction, LineNr, pFormat, pArguments);
-}
-
-static APIRET MainWindowAdjustSize (t_MainWindow *pMainWindow)
-{
-   int ScreenDx, ScreenDy;
-
-   switch (CONFIG(StartupSize))
-   {
-      case CFG_STARTUPSIZE_STANDARD  : pMainWindow->show();           break;
-      case CFG_STARTUPSIZE_FULLSCREEN: pMainWindow->showFullScreen(); break;
-      case CFG_STARTUPSIZE_MAXIMIZED : pMainWindow->showMaximized (); break;
-      case CFG_STARTUPSIZE_MANUAL    : pMainWindow->setGeometry (CONFIG (StartupSizeManualX ), CONFIG (StartupSizeManualY),
-                                                                 CONFIG (StartupSizeManualDx), CONFIG (StartupSizeManualDy));
-                                       pMainWindow->show();           break;
-      default                        : CHK_CONST (ERROR_MAIN_UNKNOWN_STARTUP_SIZE)
-   }
-
-   ScreenDx = QApplication::desktop()->width ();
-   ScreenDy = QApplication::desktop()->height();
-
-   if ((MainLocal.pMainWindow->width () > ScreenDx) ||
-       (MainLocal.pMainWindow->height() > ScreenDy))
-   {
-      LOG_ERROR ("The window manager gave the application a size that's too big: %d x %d (maximum size is %d x %d)",
-                  MainLocal.pMainWindow->width (), MainLocal.pMainWindow->height(), ScreenDx, ScreenDy)
-//      CHK_CONST (ERROR_MAIN_INVALID_WINDOW_SIZE)
-   }
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//           Main program
-// ------------------------------------
-
-APIRET MainPocessEvents (void)
-{
-   QCoreApplication::processEvents (QEventLoop::AllEvents, MAIN_PROCESSEVENTS_MAXTIME);
-   return NO_ERROR;
-}
-
-static APIRET MainGo (int argc, char *argv[])
-{
-   QSplashScreen *pSplashScreen = NULL;
-   QPixmap       *pSplashPixmap;
-   QString         Uname;
-   const char    *pLogFileName;
-   const char    *pCfgFileName;
-   bool            DefaultUsed;
-   APIRET          Err = NO_ERROR;
-   APIRET          rc;
-   int             RetCode;
-//   const char    *pLibEwfVersionCompiled;
-   const char    *pLibEwfVersionInstalled;
-   const char    *pLibGuyToolsVersionInstalled;
-   quint64         FifoAllocs;
-   quint64         FifoFrees;
-   qint64          FifoRemaining;
-   qint64          FifoAllocated;
-   uid_t           UserIdReal;
-   uid_t           UserIdEffective;
-   struct passwd *pUser; // Attention, structure only exists once! Do not define multiple pointers to it
-   QMessageBox::StandardButton  Button;
-
-
-   // Initialise Error / Cfg / Log, open log file
-   // -------------------------------------------
-
-   MainLocal.CriticalInitDone = false;
-   CHK_EXIT (ToolErrorInit              (MAIN_MAX_ERROR_CODES))
-   CHK_EXIT (ErrorInit())
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE   (ERROR_MAIN_UNKNOWN_STARTUP_SIZE   ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE   (ERROR_MAIN_INVALID_WINDOW_SIZE    ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE   (ERROR_MAIN_LIBEWF_VERSION_MISMATCH))
-
-   CHK_EXIT (ToolErrorSetLogFn          (&t_Log::vEntryError))
-   CHK_EXIT (ToolCfgInit                (argc, argv))
-   CHK_EXIT (CfgGetLogFileName          (&pLogFileName, &DefaultUsed))
-   if (DefaultUsed)
-      printf ("\nUsing default log file name %s", pLogFileName);
-   MainLocal.pLog = new t_Log (pLogFileName, Err);
-   CHK_EXIT (Err)
-   LOG_INFO ("=================================================== Starting GUYMAGER ===================================================")
-   LOG_INFO ("Version: %s", pCompileInfoVersion)
-   LOG_INFO ("Compile timestamp: %s", pCompileInfoTimestamp)
-   CHK_EXIT (ToolSysInfoUname (Uname))
-   LOG_INFO ("System: %s", QSTR_TO_PSZ(Uname))
-
-   t_Log::GetLibGuyToolsVersion (&pLibGuyToolsVersionInstalled);
-   pLibEwfVersionInstalled = libewf_get_version();
-   LOG_INFO ("Libguytools version installed on this PC: %s", pLibGuyToolsVersionInstalled)
-   LOG_INFO ("Libewf      version installed on this PC: %s", pLibEwfVersionInstalled)
-   meminfo();
-   LOG_INFO ("Total amount of memory installed: %lu KB", kb_main_total)
-
-//   pLibEwfVersionCompiled = LIBEWF_VERSION_STRING;
-//
-//   LOG_INFO ("Compiled for libewf version:         %s", pLibEwfVersionCompiled)
-//   if (strcmp (pLibEwfVersionInstalled, pLibEwfVersionCompiled))
-//   {
-//      LOG_ERROR ("Libewf version mismatch")
-//      CHK_CONST (ERROR_MAIN_LIBEWF_VERSION_MISMATCH)
-//   }
-
-   // Initialise QApplication
-   // -----------------------
-   QApplication::setDesktopSettingsAware (false);
-   QApplication::setColorSpec (QApplication::ManyColor);
-   MainLocal.pApp = new QApplication(argc, argv);         // Create QApplication here, so the following Init functions
-   qInstallMsgHandler (MainLogQtMessage);                 // may use Qt functions, for instance for building pixmaps, fonts, ...
-   CHK (ToolSysInfoInit ())
-
-   // Check Cfg file
-   // --------------
-//   CHK (ToolCfgUseAdjustedCommandLine (MainLocal.pApp->argc(), MainLocal.pApp->argv()))
-   CHK (ToolCfgUseAdjustedCommandLine (QApplication::argc(), QApplication::argv()))
-   CHK (ToolCfgSetLogFn (&t_Log::vEntryInfo))
-   CHK (CfgInit())
-   rc = CfgGetCfgFileName (&pCfgFileName, &DefaultUsed);
-   if (rc == ERROR_CFG_ONLY_TEMPLATE_GENERATED)
-   {
-      printf ("\nTemplate configuration file has been written");
-      return NO_ERROR;
-   }
-   if (DefaultUsed)
-      printf ("\nUsing default cfg file name %s", pCfgFileName);
-
-   // Show splashscreen and read cfg file
-   // -----------------------------------
-   QString SplashFile = MAIN_SPLASH_PIXMAP;
-
-   #ifdef SPLASH_DIR
-      QString SplashDir = SPLASH_DIR;
-
-      if (!SplashDir.endsWith ("/"))
-         SplashDir += "/";
-      SplashFile = SplashDir + SplashFile;
-   #endif
-
-   pSplashPixmap = new QPixmap (SplashFile);
-   if (pSplashPixmap->isNull())
-   {
-      LOG_INFO ("Pixmap %s not found, no splashscreen will be shown.", MAIN_SPLASH_PIXMAP)
-   }
-   else
-   {
-      pSplashScreen = new QSplashScreen (*pSplashPixmap);
-      pSplashScreen->show();
-      QApplication::processEvents ();
-      CHK_EXIT (QtUtilSleep (MAIN_SHOW_SPLASH_TIME))
-   }
-   CHK (CfgReadConfiguration (pCfgFileName))
-
-   // Language selection
-   // ------------------
-   QTranslator TranslatorQt;
-   QTranslator TranslatorGuymager;
-   QString     LangNameQt= QString(MAIN_LANGUAGE_FILENAME_QT) + CONFIG(Language);
-   QString     LangName  = QString(MAIN_LANGUAGE_FILENAME   ) + CONFIG(Language);
-   QString     LangDirQt = MAIN_DEFAULT_LANGUAGE_DIR_QT;
-   QString     LangDir   = MAIN_DEFAULT_MISCFILES_DIR;
-   QString     TryName, TryDir;
-   bool        Found;
-
-   #ifdef LANGUAGE_DIR_QT
-      LangDirQt = LANGUAGE_DIR_QT;
-   #endif
-   #ifdef LANGUAGE_DIR
-      LangDir = LANGUAGE_DIR;
-   #endif
-
-   if (!LangDirQt.endsWith ("/")) LangDirQt += "/";
-   if (!LangDir  .endsWith ("/")) LangDir   += "/";
-
-
-   // Select correct Qt language file. We only try once. If this does not
-   // succeed, Qt automatically uses its english language file.
-
-   if (TranslatorQt.load (LangNameQt, LangDirQt))
-   {
-      LOG_INFO ("Using Qt language file %s in %s", QSTR_TO_PSZ(LangNameQt), QSTR_TO_PSZ(LangDirQt))
-      MainLocal.pApp->installTranslator(&TranslatorQt);
-   }
-   else
-   {
-      LOG_INFO ("Qt language file %s not found in %s, using no Qt language file.", QSTR_TO_PSZ(LangNameQt), QSTR_TO_PSZ(LangDirQt))
-   }
-
-   // Load Guymager language file. We try everal times with different directories and names.
-   TryName = LangName;
-   TryDir  = LangDir;
-
-   Found = TranslatorGuymager.load (TryName, TryDir);
-   if (!Found)
-   {
-      LOG_INFO ("Language file %s not found in %s", QSTR_TO_PSZ(TryName), QSTR_TO_PSZ(TryDir))
-      TryDir = ".";
-      Found = TranslatorGuymager.load (TryName, TryDir);
-   }
-   if (!Found)
-   {
-      LOG_INFO ("Language file %s not found in %s", QSTR_TO_PSZ(TryName), QSTR_TO_PSZ(TryDir))
-      TryDir  = LangDir;
-      TryName = MAIN_LANGUAGE_FILENAME_DEFAULT;
-      Found = TranslatorGuymager.load (TryName, TryDir);
-   }
-   if (!Found)
-   {
-      LOG_INFO ("Language file %s not found in %s", QSTR_TO_PSZ(TryName), QSTR_TO_PSZ(TryDir))
-      TryDir = ".";
-      Found = TranslatorGuymager.load (TryName, TryDir);
-   }
-   if (Found)
-   {
-      LOG_INFO ("Using language file %s in %s.", QSTR_TO_PSZ(TryName), QSTR_TO_PSZ(TryDir))
-      MainLocal.pApp->installTranslator (&TranslatorGuymager);
-   }
-   else
-   {
-      LOG_INFO ("Language file %s not found in %s. Not using any language file.", QSTR_TO_PSZ(TryName), QSTR_TO_PSZ(TryDir))
-   }
-
-   // Check real and effective user ID
-   // --------------------------------
-   UserIdReal      = getuid ();
-   UserIdEffective = geteuid();
-   pUser = getpwuid (UserIdReal);      LOG_INFO ("User real     : %d - %s", UserIdReal     , pUser ? pUser->pw_name : "name not found")
-   pUser = getpwuid (UserIdEffective); LOG_INFO ("User effective: %d - %s", UserIdEffective, pUser ? pUser->pw_name : "name not found")
-
-   if (UserIdEffective == 0)
-   {
-      LOG_INFO ("Running with root rights")
-   }
-   else
-   {
-      LOG_INFO ("Running with non-root rights, asking user...")
-      Button = QMessageBox::question (NULL, QObject::tr ("Missing root rights", "Dialog title"),
-                                            QObject::tr ("Guymager needs to be started with root rights in order to perform acquisitions. "
-                                                         "You are not root and thus won't be able to acquire devices.\nContinue anyway?"),
-                                                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
-      if (Button == QMessageBox::Yes)
-      {
-         LOG_INFO ("User continues anyway")
-      }
-      else
-      {
-         LOG_INFO ("User doesn't want to continue. Exiting now.")
-         return NO_ERROR;
-      }
-   }
-
-   // Initialise MemWatch
-   // -------------------
-   if (CONFIG(UseMemWatch))
-      mwSetOutFunc (MainLogMemMessage);
-
-   // Initialise signal handler
-   // -------------------------
-   if (CONFIG (SignalHandling))
-      CHK_EXIT (ToolSignalInit (MainSignalLog, MainSignalHandler, NULL))
-
-   // Critical initialisation phase done, CFG, ERROR and LOG operational now
-   // ----------------------------------------------------------------------
-   MainLocal.CriticalInitDone = true;
-
-   CHK (HashInit    ())
-   CHK (QtUtilInit  ())
-   CHK (t_File::Init())
-   CHK (AaffInit    ())
-
-   switch (CONFIG(NumberStyle))
-   {
-      case CFG_NUMBERSTYLE_DECIMAL_COMMA: MainLocal.pNumberLocale = new QLocale("de_DE"); break;
-      case CFG_NUMBERSTYLE_DECIMAL_POINT: MainLocal.pNumberLocale = new QLocale("C"    ); break;
-      case CFG_NUMBERSTYLE_LOCALE       : MainLocal.pNumberLocale = new QLocale(       ); break;
-      default: CHK_CONST (ERROR_MAIN_INVALID_WINDOW_SIZE)
-   }
-
-   // Initialise libewf
-   // -----------------
-	libewf_set_notify_values (stderr, CONFIG (VerboseLibewf) ? 1 : 0);
-
-   // Create central data structures
-   // ------------------------------
-   MainLocal.pDeviceList = new t_DeviceList;
-
-   // Create main window, remove splashscreen and enter main loop
-   // -----------------------------------------------------------
-
-   MainLocal.pMainWindow = new t_MainWindow (MainLocal.pDeviceList);
-   CHK (MainWindowAdjustSize (MainLocal.pMainWindow))
-
-   if (pSplashScreen)
-   {
-      pSplashScreen->finish (MainLocal.pMainWindow);
-      delete pSplashScreen;
-   }
-
-   RetCode = QApplication::exec();
-   CHK (RetCode)
-   CHK (FifoGetStatistics (FifoAllocs, FifoFrees, FifoAllocated))
-   FifoRemaining = FifoAllocs - FifoFrees;
-   LOG_INFO ("FIFO buffer statistics: %llu allocated - %llu freed = %lld remaining (%lld bytes)", FifoAllocs, FifoFrees, FifoRemaining, FifoAllocated)
-
-
-   // Deinitialise and exit the program
-   // ---------------------------------
-   delete MainLocal.pMainWindow;
-   delete MainLocal.pDeviceList;
-   delete MainLocal.pNumberLocale;
-   MainLocal.pMainWindow   = NULL;
-   MainLocal.pDeviceList   = NULL;
-   MainLocal.pNumberLocale = NULL;
-
-   CHK (AaffDeInit  ())
-   CHK (QtUtilDeInit())
-   CHK (HashDeInit  ())
-   CHK (CfgDeInit   ())
-
-   delete MainLocal.pApp;
-
-   if (CONFIG (SignalHandling))
-      CHK (ToolSignalDeInit ())
-
-   CHK_EXIT (ErrorDeInit())
-
-   LOG_INFO ("=================================================== GUYMAGER ended normally ===================================================")
-   delete MainLocal.pLog;
-
-   return NO_ERROR;
-}
-
-APIRET MainGetCommandLine (char **ppCommandLine)
-{
-   *ppCommandLine = MainLocal.pCommandLine;
-   return NO_ERROR;
-}
-
-QLocale *MainGetpNumberLocale (void)
-{
-   return MainLocal.pNumberLocale;
-}
-
-int main (int argc, char *argv[])
-{
-   APIRET rc;
-   int    i;
-   int    Len=0;
-
-   setbuf(stdout, NULL);
-   setbuf(stderr, NULL);
-   setlocale (LC_ALL, "");
-
-   memset (&MainLocal, 0, sizeof(MainLocal));
-
-   // Copy the whole command line (for documentation purposes)
-   // --------------------------------------------------------
-   for (i=0; i<argc; i++)
-      Len += strlen (argv[i])+1;
-
-   MainLocal.pCommandLine = (char *) malloc (Len);
-   MainLocal.pCommandLine[0] = '\0';
-
-   for (i=0; i<argc; i++)
-   {
-      if (i)
-         strcat (MainLocal.pCommandLine, " ");
-      strcat (MainLocal.pCommandLine, argv[i]);
-   }
-
-   rc = MainGo (argc, argv);
-
-   free (MainLocal.pCommandLine);
-
-   printf ("\n");
-   if (rc == TOOLCFG_ERROR_CONFIG_ERROR)
-        printf ("Error in configuration file. See log file for details.\n");
-   else CHK_EXIT (rc)
-
-   return rc;
-}
-
diff --git a/main.h b/main.h
deleted file mode 100644
index fd306dc..0000000
--- a/main.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Main
-// ****************************************************************************
-
-
-APIRET   MainPocessEvents     (void);
-APIRET   MainGetCommandLine   (char **ppCommandLine);
-QLocale *MainGetpNumberLocale (void);
-
diff --git a/mainwindow.cpp b/mainwindow.cpp
deleted file mode 100644
index 7ec93b3..0000000
--- a/mainwindow.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The main application window including menu and central
-//                  widget
-// ****************************************************************************
-
-
-#include <QtGui>
-
-#include "common.h"
-
-#include "libewf.h"
-
-#include "config.h"
-#include "compileinfo.h"
-#include "devicelistmodel.h"
-#include "itemdelegate.h"
-#include "mainwindow.h"
-#include "threadscan.h"
-#include "qtutil.h"
-#include "infofield.h"
-#include "table.h"
-#include "dlgmessage.h"
-
-
-// -----------------------------
-//            Constants
-// -----------------------------
-
-const int MAINWINDOW_WAIT_FOR_THREADS_TO_ABORT = 5000;
-
-
-// -----------------------------
-//  Table model for device list
-// -----------------------------
-
-t_DeviceListModel::t_DeviceListModel ()
-{
-   CHK_EXIT (ERROR_MAINWINDOW_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 Not initialised
-
-t_DeviceListModel::t_DeviceListModel (t_pDeviceList pDeviceList)
-         : QAbstractTableModel()
-{
-   t_ColAssoc ColAssoc;
-
-   poDeviceList = pDeviceList;
-
-   #define COL_ASSOC(Str, pDataFn, Display, Align, MinDx)  \
-      ColAssoc.Name        = Str;            \
-      ColAssoc.pGetDataFn  = pDataFn;        \
-      ColAssoc.DisplayType = Display;        \
-      ColAssoc.Alignment   = Align;          \
-      ColAssoc.MinWidth    = MinDx;          \
-      ColAssocList.append (ColAssoc);
-   #define LEFT   (Qt::AlignLeft    | Qt::AlignVCenter)
-   #define RIGHT  (Qt::AlignRight   | Qt::AlignVCenter)
-   #define CENTER (Qt::AlignHCenter | Qt::AlignVCenter)
-
-      COL_ASSOC (tr("Serial\nnr."            , "Column on main screen"), t_Device::GetSerialNumber  , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT  ,   0)
-      COL_ASSOC (tr("Linux\ndevice"          , "Column on main screen"), t_Device::GetLinuxDevice   , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT  ,   0)
-      COL_ASSOC (tr("Model"                  , "Column on main screen"), t_Device::GetModel         , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT  ,   0)
-      COL_ASSOC (tr("State"                  , "Column on main screen"), t_Device::GetState         , t_ItemDelegate::DISPLAYTYPE_STATE   , LEFT  , 200)
-      COL_ASSOC (tr("Size"                   , "Column on main screen"), t_Device::GetSizeHuman     , t_ItemDelegate::DISPLAYTYPE_STANDARD, RIGHT ,   0)
-      COL_ASSOC (tr("Bad\nsectors"           , "Column on main screen"), t_Device::GetBadSectorCount, t_ItemDelegate::DISPLAYTYPE_STANDARD, RIGHT ,   0)
-      COL_ASSOC (tr("Progress"               , "Column on main screen"), t_Device::GetProgress      , t_ItemDelegate::DISPLAYTYPE_PROGRESS, LEFT  ,   0)
-      COL_ASSOC (tr("Average\nSpeed\n[MB/s]" , "Column on main screen"), t_Device::GetAverageSpeed  , t_ItemDelegate::DISPLAYTYPE_STANDARD, RIGHT ,   0)
-      COL_ASSOC (tr("Time\nremaining"        , "Column on main screen"), t_Device::GetRemaining     , t_ItemDelegate::DISPLAYTYPE_STANDARD, CENTER,   0)
-      COL_ASSOC (tr("FIFO queues\nusage\n[%]", "Column on main screen"), t_Device::GetFifoStatus    , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT  ,   0)
-//      COL_ASSOC (tr("Sector\nsize\nlog."    , "Column on main screen"), t_Device::GetSectorSize    , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT, 0      )
-//      COL_ASSOC (tr("Sector\nsize\nphys."   , "Column on main screen"), t_Device::GetSectorSizePhys, t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT, 0      )
-//      COL_ASSOC (tr("Current\nSpeed\n[MB/s]", "Column on main screen"), t_Device::GetCurrentSpeed  , t_ItemDelegate::DISPLAYTYPE_STANDARD, LEFT, 0      )
-   #undef COL_ASSOC
-   #undef LEFT
-   #undef RIGHT
-   #undef CENTER
-}
-
-int t_DeviceListModel::rowCount (const QModelIndex & /*parent*/) const
-{
-   return poDeviceList->count();
-}
-
-int t_DeviceListModel::columnCount (const QModelIndex & /*parent*/) const
-{
-   return ColAssocList.count();
-}
-
-void t_DeviceListModel::SlotRefresh (void)
-{
-   static int LastCount=0;
-
-   if (poDeviceList->count() != LastCount)
-        reset();
-   else emit dataChanged (index(0,0), index(rowCount()-1, columnCount()-1) );
-   LastCount = poDeviceList->count();
-}
-
-//void t_DeviceListModel::SlotUpdate (void)
-//{
-//   emit dataChanged (index(0,0), index(rowCount()-1, columnCount()-1) );
-//}
-
-QVariant t_DeviceListModel::data(const QModelIndex &Index, int Role) const
-{
-   t_DeviceListModel::t_pGetDataFn pGetDataFn;
-   t_pDevice                       pDev;
-   QString                          Ret;
-   QString                          Text;
-   QVariant                         Value;
-
-   if (!Index.isValid() && (Role == t_ItemDelegate::RowNrRole))  // For correct handling of the click events in the table
-      return -1;
-
-   if (Index.isValid() && (Index.column() < columnCount()) &&
-                          (Index.row   () < rowCount   ()))
-   {
-      if (Index.column() >= ColAssocList.count())
-         CHK_EXIT (ERROR_MAINWINDOW_INVALID_COLUMN)
-      switch (Role)
-      {
-         case t_ItemDelegate::DisplayTypeRole: Value = ColAssocList[Index.column()].DisplayType; break;
-         case t_ItemDelegate::MinColWidthRole: Value = ColAssocList[Index.column()].MinWidth;    break;
-         case Qt::TextAlignmentRole          : Value = ColAssocList[Index.column()].Alignment;   break;
-
-         case t_ItemDelegate::RowNrRole:
-            Value = Index.row();
-            break;
-         case t_ItemDelegate::DeviceRole:
-            pDev = poDeviceList->at(Index.row());
-            Value = qVariantFromValue ((void *)pDev);
-            break;
-         case Qt::BackgroundRole:
-            pDev = poDeviceList->at(Index.row());
-            if (pDev->Local)
-                 Value = QBrush (CONFIG_COLOR(COLOR_LOCALDEVICES));
-            else Value = QVariant();
-            break;
-         case Qt::DisplayRole:
-            if (Index.column() >= ColAssocList.count())
-               CHK_EXIT (ERROR_MAINWINDOW_INVALID_COLUMN)
-            pDev = poDeviceList->at(Index.row());
-            pGetDataFn = ColAssocList[Index.column()].pGetDataFn;
-            Value = (*pGetDataFn) (pDev);
-            break;
-         case Qt::SizeHintRole:
-            break;  // See t_ItemDelegate::sizeHint for column width calculation
-         default:
-            break;
-      }
-   }
-   return Value;
-}
-
-QVariant t_DeviceListModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
-   if (role != Qt::DisplayRole)
-      return QVariant();
-
-   if (orientation == Qt::Horizontal)
-      return ColAssocList[section].Name;
-   else
-      return QString("Row %1").arg(section);
-}
-
-// -----------------------------
-//          Main window
-// -----------------------------
-
-class t_MainWindowLocal
-{
-   public:
-      t_DeviceList          *pDeviceList;
-      t_DeviceListModel     *pDeviceListModel;
-      QSortFilterProxyModel *pProxyModel;   // Inserted between pDeviceListModel and pTable, provides sorting functionality
-      QWidget               *pCentralWidget;
-      t_pTable               pTable;
-      t_pInfoField           pInfoField;
-      t_ThreadScan          *pThreadScan;
-      QAction               *pActionRescan;
-      t_ThreadScanWorker    *pScanWorker;
-      QTimer                *pTimerRefresh;
-};
-
-static APIRET MainWindowRegisterErrorCodes (void)
-{
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_MAINWINDOW_CONSTRUCTOR_NOT_SUPPORTED))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_MAINWINDOW_INVALID_COLUMN))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_MAINWINDOW_INVALID_DATATYPE))
-
-   return NO_ERROR;
-}
-
-APIRET t_MainWindow::CreateMenu (void)
-{
-   QMenuBar *pMenuBar = menuBar();
-   QToolBar *pToolBar;
-   QMenu    *pMenu;
-
-   // Actions
-   // -------
-   pOwn->pActionRescan = new QAction (tr("&Rescan"), this);
-   pOwn->pActionRescan->setShortcut  (tr("F5"));
-   pOwn->pActionRescan->setToolTip   (tr("Rescan devices and update list"));
-
-   // Menu
-   // ----
-   pMenu = pMenuBar->addMenu (tr("&Devices"));
-   pMenu->addAction (pOwn->pActionRescan);
-
-   pMenu = pMenuBar->addMenu (tr("&Misc", "Menu entry"));
-   pMenu->addAction (tr("Debug", "Menu entry"), this, SLOT(SlotDebug()));
-
-   pMenu = pMenuBar->addMenu (tr("&Help", "Menu entry"));
-   pMenu->addAction (tr("About &GUYMAGER", "Menu entry"), this, SLOT(SlotAboutGuymager()));  //lint !e64 !e119 Lint reports about type mismatches and
-   pMenu->addAction (tr("About &Qt"      , "Menu entry"), this, SLOT(SlotAboutQt      ()));  //lint !e64 !e119 too many arguments, Lint is probably wrong
-
-
-   // Toolbar
-   // -------
-   pToolBar = addToolBar (QString());
-   pToolBar->addAction (pOwn->pActionRescan);
-
-   return NO_ERROR;
-}
-
-
-t_MainWindow::t_MainWindow(void)
-{
-   CHK_EXIT (ERROR_MAINWINDOW_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 pOwn not initialised
-
-t_MainWindow::t_MainWindow (t_pDeviceList pDeviceList, QWidget *pParent, Qt::WFlags Flags)
-   :QMainWindow (pParent, Flags)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (MainWindowRegisterErrorCodes())
-      Initialised = true;
-   }
-
-   pOwn = new t_MainWindowLocal;
-   pOwn->pDeviceList = pDeviceList;
-
-   CHK_EXIT (CreateMenu ())
-   setWindowTitle ("GUYMAGER");
-
-   // Create models and view according do the following layering:
-   //    TableView        -> GUI
-   //    ProxyModel       -> Provides sorting
-   //    DeviceListModel  -> Describes data access
-   //    DeviceList       -> Contains data
-   // -----------------------------------------------------------
-   pOwn->pCentralWidget = new QWidget (this);
-   QVBoxLayout *pLayout = new QVBoxLayout (pOwn->pCentralWidget);
-
-   pOwn->pTable                      = new t_Table (pOwn->pCentralWidget, pDeviceList);
-   pOwn->pDeviceListModel            = new t_DeviceListModel     (pDeviceList);
-   pOwn->pProxyModel                 = new QSortFilterProxyModel (pOwn->pCentralWidget);
-   pOwn->pProxyModel->setSourceModel (pOwn->pDeviceListModel);
-   pOwn->pTable     ->setModel       (pOwn->pProxyModel);
-
-   pOwn->pInfoField = new t_InfoField (pOwn->pCentralWidget);
-
-   pLayout->addWidget (pOwn->pTable);
-   pLayout->addWidget (pOwn->pInfoField);
-
-   CHK_QT_EXIT (connect (pOwn->pTable->horizontalHeader(), SIGNAL(sectionClicked      (int      )), pOwn->pTable    , SLOT(sortByColumn  (int      ))))
-   CHK_QT_EXIT (connect (pOwn->pTable                    , SIGNAL(SignalDeviceSelected(t_pDevice)), pOwn->pInfoField, SLOT (SlotShowInfo (t_pDevice))))
-
-   setCentralWidget (pOwn->pCentralWidget);
-
-   // Start the device scan thread
-   // ----------------------------
-
-   pOwn->pThreadScan = new t_ThreadScan ();
-   CHK_EXIT (pOwn->pThreadScan->Start (&pOwn->pScanWorker))
-   CHK_QT_EXIT (connect (pOwn->pActionRescan, SIGNAL (triggered ()),          pOwn->pScanWorker, SLOT (SlotRescan ())))
-   CHK_QT_EXIT (connect (pOwn->pScanWorker  , SIGNAL (SignalScanFinished (t_pDeviceList)), this, SLOT (SlotScanFinished (t_pDeviceList))))
-   QTimer::singleShot (300, pOwn->pScanWorker, SLOT(SlotRescan()));  // pOwn->pScanWorker->SlotRescan must not be called directly as it would be called from the
-                                                                     // wrong thread! Using the signal/slot connection makes it behave correctly (see
-                                                                     // Qt_AutoConnection, which is the default for connecting signals and slots).
-
-   // Screen refresh timer
-   // --------------------
-   pOwn->pTimerRefresh = new QTimer(this);
-   CHK_QT_EXIT (connect (pOwn->pTimerRefresh, SIGNAL(timeout()), this, SLOT(SlotRefresh())))
-   pOwn->pTimerRefresh->start (CONFIG(ScreenRefreshInterval));
-}
-
-void t_MainWindow::SlotRefresh (void)
-{
-   t_pDevice pDevice;
-
-   pOwn->pDeviceListModel->SlotRefresh();
-   CHK_EXIT (pOwn->pTable->GetDeviceUnderCursor (pDevice))
-   pOwn->pInfoField->SlotShowInfo (pDevice);
-}
-
-// SlotScanFinished provides us with the new device list. Now, our current device list needs to be updated. The rules are:
-//  (1) For devices, who are in both lists:
-//        Set the state of the device in the current list to Connected. Thus, devices that were temporarly disconnected
-//        will become connected again.
-//  (2) For devices, that only exist in the current list (but no longer in the new list):
-//        a) delete from the current list if there was no acquisition running
-//        b) switch to disconnected if there was an acquisition running, thus giving the user a chance to continue to acquistion
-//           on another device (for instance, if the hard disk had been unpligged from firewrie and plugged to USB)
-//  (3) For devices, that only exist in the new list:
-//        Add to the current list
-// Remark: Is it quite tricky to compare the devices from both lists, as there devices without a serial number. See
-// t_DeviceList::MatchDevice for details.
-
-void t_MainWindow::SlotScanFinished (t_pDeviceList pNewDeviceList)
-{
-   t_pDeviceList pDeviceList;
-   t_pDevice     pDev, pNewDev;
-   int            i;
-
-   pDeviceList = pOwn->pDeviceList;
-   for (i=0; i<pDeviceList->count(); i++)
-   {
-      pDev = pDeviceList->at (i);
-      pDev->Checked = false;  // Checked is used to remember which devices we have seen and which ones not
-   }
-
-   for (i=0; i<pNewDeviceList->count(); i++)
-   {
-      pNewDev = pNewDeviceList->at (i);
-      CHK_EXIT (pDeviceList->MatchDevice (pNewDev, pDev))
-//      LOG_INFO ("Result of match for %s: %s", QSTR_TO_PSZ (pNewDev->LinuxDevice), pDev ? "Match" : "NoMatch")
-
-      if (pDev)
-      {
-         pDev->Checked = true;
-         if ((pDev->State == t_Device::AcquirePaused) ||
-             (pDev->State == t_Device::VerifyPaused))
-         {
-            LOG_INFO ("Switching %s to connected again", QSTR_TO_PSZ(pNewDev->LinuxDevice))
-            pDev->LinuxDevice = pNewDev->LinuxDevice;    // Linux may choose a new path when reconnecting the device
-            if (pDev->State == t_Device::AcquirePaused)  // (1)
-                 pDev->State = t_Device::Acquire;
-            else pDev->State = t_Device::Verify;
-         }
-      }
-      else
-      {
-         pNewDev->Checked = true;
-         pNewDeviceList->removeAt (i--);                 // (3)
-         pDeviceList->append (pNewDev);
-      }
-   }
-
-   for (i=0; i<pDeviceList->count(); i++)
-   {
-      pDev = pDeviceList->at (i);
-      if (!pDev->Checked)
-      {
-         switch (pDev->State)
-         {
-            case t_Device::Acquire      : pDev->State = t_Device::AcquirePaused; break;  // (2b)
-            case t_Device::Verify       : pDev->State = t_Device::VerifyPaused ; break;  // (2b)
-            case t_Device::AcquirePaused: break;
-            case t_Device::VerifyPaused : break;
-            default                     : pDeviceList->removeAt (i--);                   // (2a)
-                                          delete pDev;
-         }
-      }
-   }
-
-   delete pNewDeviceList;
-
-   pOwn->pDeviceListModel->SlotRefresh();
-   pOwn->pTable->resizeColumnsToContents();
-}
-
-void t_MainWindow::closeEvent (QCloseEvent *pEvent)
-{
-   QMessageBox::StandardButton  Button;
-   t_pDevice                   pDevice;
-   bool                         AcquisitionsActive=false;
-   int                          i;
-
-   LOG_INFO ("User exits application")
-   for (i=0; (i<pOwn->pDeviceList->count()) && (!AcquisitionsActive); i++)
-   {
-      pDevice = pOwn->pDeviceList->at(i);
-      AcquisitionsActive = (pDevice->State == t_Device::Acquire)       ||
-                           (pDevice->State == t_Device::Verify )       ||
-                           (pDevice->State == t_Device::Cleanup)       ||
-                           (pDevice->State == t_Device::AcquirePaused) ||
-                           (pDevice->State == t_Device::VerifyPaused );
-   }
-
-   if (AcquisitionsActive)
-   {
-      LOG_INFO ("Some acquisitions still active - ask user if he really wants to quit")
-      Button = QMessageBox::question (this, tr ("Exit GUYMAGER", "Dialog title"), tr("There are active acquisitions. Do you really want to abort them and quit?"),
-                                      QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
-      if (Button == QMessageBox::Yes)
-      {  // stop acquisitions
-         LOG_INFO ("User confirms abortion in order to quit")
-         CHK_EXIT (pOwn->pTable->AbortAllAcquisitions ())
-         CHK_EXIT (QtUtilSleep (MAINWINDOW_WAIT_FOR_THREADS_TO_ABORT))
-      }
-      else
-      {
-         LOG_INFO ("User cancels exit request")
-         pEvent->ignore();
-      }
-   }
-}
-
-void t_MainWindow::SlotDebug (void)
-{
-   QString DebugInfo;
-   quint64 FifoAllocs, FifoFrees;
-   qint64  FifoRemaining;
-   qint64  FifoAllocated;
-
-   CHK_EXIT (FifoGetStatistics (FifoAllocs, FifoFrees, FifoAllocated))
-   FifoRemaining = FifoAllocs - FifoFrees;
-   DebugInfo  = "FIFO Buffers";
-   DebugInfo += QString ("\n   %1 allocated") .arg(FifoAllocs   , 10);
-   DebugInfo += QString ("\n   %1 released" ) .arg(FifoFrees    , 10);
-   DebugInfo += QString ("\n   %1 remaining") .arg(FifoRemaining, 10);
-   DebugInfo += QString ("\n   %1 MB"       ) .arg((double)FifoAllocated / (1024.0*1024.0), 10, 'f', 1);
-
-   CHK_EXIT (t_DlgMessage::Show (tr("Debug information"), DebugInfo, true))
-}
-
-void t_MainWindow::SlotAboutGuymager (void)
-{
-   const char *pLibGuyToolsVersionInstalled;
-   const char *pLibEwfVersionInstalled;
-
-   t_Log::GetLibGuyToolsVersion (&pLibGuyToolsVersionInstalled);
-
-   pLibEwfVersionInstalled = libewf_get_version ();
-
-   QMessageBox::about(this, tr("About GUYMAGER", "Dialog title"),
-                            tr("GUYMAGER is a Linux-based forensic imaging tool\n\n"
-                               "Version: %1\n"
-                               "Compilation timestamp: %2\n"
-                               "Compiled with gcc %3\n"
-                               "Using libewf %4\n"
-                               "Using libguytools %5")
-                               .arg(pCompileInfoVersion)
-                               .arg(pCompileInfoTimestamp)
-                               .arg(__VERSION__)
-                               .arg(pLibEwfVersionInstalled)
-                               .arg(pLibGuyToolsVersionInstalled));
-}
-
-void t_MainWindow::SlotAboutQt (void)
-{
-   QMessageBox::aboutQt (this, tr("About Qt", "Dialog title"));
-}
-
-t_MainWindow::~t_MainWindow ()
-{
-   CHK_EXIT (pOwn->pThreadScan->Stop ())
-   delete pOwn->pTable;
-   delete pOwn->pProxyModel;
-   delete pOwn->pDeviceListModel;
-   delete pOwn;
-}
-
diff --git a/mainwindow.h b/mainwindow.h
deleted file mode 100644
index 4113b55..0000000
--- a/mainwindow.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-
-
-#ifndef __MAINWINDOW_H__
-#define __MAINWINDOW_H__
-
-#include <QtGui>  //lint !e537 repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-#ifndef __DEVICE_H__
-   #include "device.h"
-#endif
-
-class t_MainWindowLocal;
-
-class t_MainWindow: public QMainWindow
-{
-   Q_OBJECT
-
-   public:
-      t_MainWindow (void);
-      t_MainWindow (t_pDeviceList pDeviceList, QWidget *pParent = 0, Qt::WFlags Flags = 0);
-     ~t_MainWindow ();
-
-   private:
-      APIRET CreateMenu (void);
-
-   protected:
-      void closeEvent (QCloseEvent *pEvent);
-
-   private slots:
-      void SlotDebug         (void);
-      void SlotAboutGuymager (void);
-      void SlotAboutQt       (void);
-      void SlotScanFinished  (t_pDeviceList);
-      void SlotRefresh       ();
-
-   private:
-      t_MainWindowLocal *pOwn;
-};
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_MAINWINDOW_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_MAINWINDOW + 1,
-   ERROR_MAINWINDOW_INVALID_COLUMN,
-   ERROR_MAINWINDOW_INVALID_DATATYPE
-};
-
-
-#endif
-
diff --git a/manuals/guymager_body.1 b/manuals/guymager_body.1
deleted file mode 100644
index 27a7cfe..0000000
--- a/manuals/guymager_body.1
+++ /dev/null
@@ -1,54 +0,0 @@
-.SH NAME
-guymager \- a forensic acquisition program
-.SH SYNOPSIS
-.B guymager
-[\fBlog=\fIlog_file\fR]
-[\fBcfg=\fIconfiguration_file\fR]
-[options]
-.SH DESCRIPTION
-Guymager is a Qt-based forensic imager. It is capable of producing image files in EWF
-and dd format. Its main strenghs are the easy user interface, the extended acquisition
-info file and the high imaging speed.
-.PP
-The internal structure is based on separate threads for reading, MD5 calculation, writing
-and includes a parallelised compression engine, thus making full usage of multi\-processor
-and hyper\-threading machines.
-.PP
-Guymager should be run with root privileges, as other users do not have access to physical
-devices normally.
-.SH OPTIONS
-.TP
-.BI log= "log_file"
-By default, guymager uses /var/log/guymager.log as its log file. This option allows for
-specifying a different file.
-.TP
-.BI cfg= "configuration_file"
-The default configuration file is /etc/guymager/guymager.cfg. This option allows for
-specifying a different file. Guymager creates a template configuration file when the
-option
-.B \-cfg=template.cfg
-is given.
-.P
-All other configuration options may be specified on the command line and/or in the
-configuration file. See /etc/guymager/guymager.cfg for a description of all possible
-options. In case an option is specified in the configuration file and on the command
-line, the command line dominates.
-.SH EXAMPLES
-.TP
-Write all log entries to ./my.log:
-.B guymager
-log=my.log
-.TP
-Create a template configuration file
-.B guymager
-cfg=template.cfg
-.TP
-Read the configuration from my.cfg and use 4 threads for parallelised compression:
-.B guymager
-cfg=my.cfg CompressionThreads=4
-.P
-See /etc/guymager/guymager.cfg for details about option CompressionThreads and all
-other options as well.
-.SH AUTHOR
-Guy Voncken (vogu00 (at) gmail.com)
-
diff --git a/manuals/preview.sh b/manuals/preview.sh
deleted file mode 100755
index a6e64f8..0000000
--- a/manuals/preview.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-./rebuild.sh
-nroff -man guymager.1 | less
-
diff --git a/manuals/rebuild.sh b/manuals/rebuild.sh
deleted file mode 100755
index 8aead6d..0000000
--- a/manuals/rebuild.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-TH_Date=`date '+%Y-%m-%d'`
-TH_Source=`head -n 1 ../debian/changelog | awk '{
-                                                  Version = $2
-                                                  gsub ("\\\\(", "", Version)
-                                                  gsub ("\\\\)", "", Version)
-                                                  print Version}'`
-
-echo .TH guymager 1  "\"$TH_Date\" \"version $TH_Source\" \"guymager manual pages\"" > guymager.1
-cat guymager_body.1 >> guymager.1
-
diff --git a/md5.c b/md5.c
deleted file mode 100644
index 1c9606e..0000000
--- a/md5.c
+++ /dev/null
@@ -1,398 +0,0 @@
-// This file has been copied 1:1 from the source of the Debian fdupes package into Guymager.
-// Only have been added this comment and the following include, no other changes.
-
-#include <string.h>
-
-
-/*
-  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  L. Peter Deutsch
-  ghost at aladdin.com
-
- */
-/*$Id: md5.c $ */
-/*
-  Independent implementation of MD5 (RFC 1321).
-
-  This code implements the MD5 Algorithm defined in RFC 1321.
-  It is derived directly from the text of the RFC and not from the
-  reference implementation.
-
-  The original and principal author of md5.c is L. Peter Deutsch
-  <ghost at aladdin.com>.  Other authors are noted in the change history
-  that follows (in reverse chronological order):
-
-  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
-  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
-  1999-05-03 lpd Original version.
- */
-
-#include "md5.h"
-
-#ifdef TEST
-/*
- * Compile with -DTEST to create a self-contained executable test program.
- * The test program should print out the same values as given in section
- * A.5 of RFC 1321, reproduced below.
- */
-#include <string.h>
-main()
-{
-    static const char *const test[7] = {
-	"", /*d41d8cd98f00b204e9800998ecf8427e*/
-	"a", /*0cc175b9c0f1b6a831c399e269772661*/
-	"abc", /*900150983cd24fb0d6963f7d28e17f72*/
-	"message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/
-	"abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/
-	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
-				/*d174ab98d277d9f5a5611c2c9f419d9f*/
-	"12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/
-    };
-    int i;
-
-    for (i = 0; i < 7; ++i) {
-	md5_state_t state;
-	md5_byte_t digest[16];
-	int di;
-
-	md5_init(&state);
-	md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i]));
-	md5_finish(&state, digest);
-	printf("MD5 (\"%s\") = ", test[i]);
-	for (di = 0; di < 16; ++di)
-	    printf("%02x", digest[di]);
-	printf("\n");
-    }
-    return 0;
-}
-#endif /* TEST */
-
-
-/*
- * For reference, here is the program that computed the T values.
- */
-#if 0
-#include <math.h>
-main()
-{
-    int i;
-    for (i = 1; i <= 64; ++i) {
-	unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i)));
-	printf("#define T%d 0x%08lx\n", i, v);
-    }
-    return 0;
-}
-#endif
-/*
- * End of T computation program.
- */
-#define T1 0xd76aa478
-#define T2 0xe8c7b756
-#define T3 0x242070db
-#define T4 0xc1bdceee
-#define T5 0xf57c0faf
-#define T6 0x4787c62a
-#define T7 0xa8304613
-#define T8 0xfd469501
-#define T9 0x698098d8
-#define T10 0x8b44f7af
-#define T11 0xffff5bb1
-#define T12 0x895cd7be
-#define T13 0x6b901122
-#define T14 0xfd987193
-#define T15 0xa679438e
-#define T16 0x49b40821
-#define T17 0xf61e2562
-#define T18 0xc040b340
-#define T19 0x265e5a51
-#define T20 0xe9b6c7aa
-#define T21 0xd62f105d
-#define T22 0x02441453
-#define T23 0xd8a1e681
-#define T24 0xe7d3fbc8
-#define T25 0x21e1cde6
-#define T26 0xc33707d6
-#define T27 0xf4d50d87
-#define T28 0x455a14ed
-#define T29 0xa9e3e905
-#define T30 0xfcefa3f8
-#define T31 0x676f02d9
-#define T32 0x8d2a4c8a
-#define T33 0xfffa3942
-#define T34 0x8771f681
-#define T35 0x6d9d6122
-#define T36 0xfde5380c
-#define T37 0xa4beea44
-#define T38 0x4bdecfa9
-#define T39 0xf6bb4b60
-#define T40 0xbebfbc70
-#define T41 0x289b7ec6
-#define T42 0xeaa127fa
-#define T43 0xd4ef3085
-#define T44 0x04881d05
-#define T45 0xd9d4d039
-#define T46 0xe6db99e5
-#define T47 0x1fa27cf8
-#define T48 0xc4ac5665
-#define T49 0xf4292244
-#define T50 0x432aff97
-#define T51 0xab9423a7
-#define T52 0xfc93a039
-#define T53 0x655b59c3
-#define T54 0x8f0ccc92
-#define T55 0xffeff47d
-#define T56 0x85845dd1
-#define T57 0x6fa87e4f
-#define T58 0xfe2ce6e0
-#define T59 0xa3014314
-#define T60 0x4e0811a1
-#define T61 0xf7537e82
-#define T62 0xbd3af235
-#define T63 0x2ad7d2bb
-#define T64 0xeb86d391
-
-static void
-md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
-{
-    md5_word_t
-	a = pms->abcd[0], b = pms->abcd[1],
-	c = pms->abcd[2], d = pms->abcd[3];
-    md5_word_t t;
-
-#ifndef ARCH_IS_BIG_ENDIAN
-# define ARCH_IS_BIG_ENDIAN 1	/* slower, default implementation */
-#endif
-#if ARCH_IS_BIG_ENDIAN
-
-    /*
-     * On big-endian machines, we must arrange the bytes in the right
-     * order.  (This also works on machines of unknown byte order.)
-     */
-    md5_word_t X[16];
-    const md5_byte_t *xp = data;
-    int i;
-
-    for (i = 0; i < 16; ++i, xp += 4)
-	X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
-
-#else  /* !ARCH_IS_BIG_ENDIAN */
-
-    /*
-     * On little-endian machines, we can process properly aligned data
-     * without copying it.
-     */
-    md5_word_t xbuf[16];
-    const md5_word_t *X;
-
-    if (!((data - (const md5_byte_t *)0) & 3)) {
-	/* data are properly aligned */
-	X = (const md5_word_t *)data;
-    } else {
-	/* not aligned */
-	memcpy(xbuf, data, 64);
-	X = xbuf;
-    }
-#endif
-
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
-
-    /* Round 1. */
-    /* Let [abcd k s i] denote the operation
-       a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
-#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
-#define SET(a, b, c, d, k, s, Ti)\
-  t = a + F(b,c,d) + X[k] + Ti;\
-  a = ROTATE_LEFT(t, s) + b
-    /* Do the following 16 operations. */
-    SET(a, b, c, d,  0,  7,  T1);
-    SET(d, a, b, c,  1, 12,  T2);
-    SET(c, d, a, b,  2, 17,  T3);
-    SET(b, c, d, a,  3, 22,  T4);
-    SET(a, b, c, d,  4,  7,  T5);
-    SET(d, a, b, c,  5, 12,  T6);
-    SET(c, d, a, b,  6, 17,  T7);
-    SET(b, c, d, a,  7, 22,  T8);
-    SET(a, b, c, d,  8,  7,  T9);
-    SET(d, a, b, c,  9, 12, T10);
-    SET(c, d, a, b, 10, 17, T11);
-    SET(b, c, d, a, 11, 22, T12);
-    SET(a, b, c, d, 12,  7, T13);
-    SET(d, a, b, c, 13, 12, T14);
-    SET(c, d, a, b, 14, 17, T15);
-    SET(b, c, d, a, 15, 22, T16);
-#undef SET
-
-     /* Round 2. */
-     /* Let [abcd k s i] denote the operation
-          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
-#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
-  t = a + G(b,c,d) + X[k] + Ti;\
-  a = ROTATE_LEFT(t, s) + b
-     /* Do the following 16 operations. */
-    SET(a, b, c, d,  1,  5, T17);
-    SET(d, a, b, c,  6,  9, T18);
-    SET(c, d, a, b, 11, 14, T19);
-    SET(b, c, d, a,  0, 20, T20);
-    SET(a, b, c, d,  5,  5, T21);
-    SET(d, a, b, c, 10,  9, T22);
-    SET(c, d, a, b, 15, 14, T23);
-    SET(b, c, d, a,  4, 20, T24);
-    SET(a, b, c, d,  9,  5, T25);
-    SET(d, a, b, c, 14,  9, T26);
-    SET(c, d, a, b,  3, 14, T27);
-    SET(b, c, d, a,  8, 20, T28);
-    SET(a, b, c, d, 13,  5, T29);
-    SET(d, a, b, c,  2,  9, T30);
-    SET(c, d, a, b,  7, 14, T31);
-    SET(b, c, d, a, 12, 20, T32);
-#undef SET
-
-     /* Round 3. */
-     /* Let [abcd k s t] denote the operation
-          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define SET(a, b, c, d, k, s, Ti)\
-  t = a + H(b,c,d) + X[k] + Ti;\
-  a = ROTATE_LEFT(t, s) + b
-     /* Do the following 16 operations. */
-    SET(a, b, c, d,  5,  4, T33);
-    SET(d, a, b, c,  8, 11, T34);
-    SET(c, d, a, b, 11, 16, T35);
-    SET(b, c, d, a, 14, 23, T36);
-    SET(a, b, c, d,  1,  4, T37);
-    SET(d, a, b, c,  4, 11, T38);
-    SET(c, d, a, b,  7, 16, T39);
-    SET(b, c, d, a, 10, 23, T40);
-    SET(a, b, c, d, 13,  4, T41);
-    SET(d, a, b, c,  0, 11, T42);
-    SET(c, d, a, b,  3, 16, T43);
-    SET(b, c, d, a,  6, 23, T44);
-    SET(a, b, c, d,  9,  4, T45);
-    SET(d, a, b, c, 12, 11, T46);
-    SET(c, d, a, b, 15, 16, T47);
-    SET(b, c, d, a,  2, 23, T48);
-#undef SET
-
-     /* Round 4. */
-     /* Let [abcd k s t] denote the operation
-          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
-#define I(x, y, z) ((y) ^ ((x) | ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
-  t = a + I(b,c,d) + X[k] + Ti;\
-  a = ROTATE_LEFT(t, s) + b
-     /* Do the following 16 operations. */
-    SET(a, b, c, d,  0,  6, T49);
-    SET(d, a, b, c,  7, 10, T50);
-    SET(c, d, a, b, 14, 15, T51);
-    SET(b, c, d, a,  5, 21, T52);
-    SET(a, b, c, d, 12,  6, T53);
-    SET(d, a, b, c,  3, 10, T54);
-    SET(c, d, a, b, 10, 15, T55);
-    SET(b, c, d, a,  1, 21, T56);
-    SET(a, b, c, d,  8,  6, T57);
-    SET(d, a, b, c, 15, 10, T58);
-    SET(c, d, a, b,  6, 15, T59);
-    SET(b, c, d, a, 13, 21, T60);
-    SET(a, b, c, d,  4,  6, T61);
-    SET(d, a, b, c, 11, 10, T62);
-    SET(c, d, a, b,  2, 15, T63);
-    SET(b, c, d, a,  9, 21, T64);
-#undef SET
-
-     /* Then perform the following additions. (That is increment each
-        of the four registers by the value it had before this block
-        was started.) */
-    pms->abcd[0] += a;
-    pms->abcd[1] += b;
-    pms->abcd[2] += c;
-    pms->abcd[3] += d;
-}
-
-void
-md5_init(md5_state_t *pms)
-{
-    pms->count[0] = pms->count[1] = 0;
-    pms->abcd[0] = 0x67452301;
-    pms->abcd[1] = 0xefcdab89;
-    pms->abcd[2] = 0x98badcfe;
-    pms->abcd[3] = 0x10325476;
-}
-
-void
-md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
-{
-    const md5_byte_t *p = data;
-    int left = nbytes;
-    int offset = (pms->count[0] >> 3) & 63;
-    md5_word_t nbits = (md5_word_t)(nbytes << 3);
-
-    if (nbytes <= 0)
-	return;
-
-    /* Update the message length. */
-    pms->count[1] += nbytes >> 29;
-    pms->count[0] += nbits;
-    if (pms->count[0] < nbits)
-	pms->count[1]++;
-
-    /* Process an initial partial block. */
-    if (offset) {
-	int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
-
-	memcpy(pms->buf + offset, p, copy);
-	if (offset + copy < 64)
-	    return;
-	p += copy;
-	left -= copy;
-	md5_process(pms, pms->buf);
-    }
-
-    /* Process full blocks. */
-    for (; left >= 64; p += 64, left -= 64)
-	md5_process(pms, p);
-
-    /* Process a final partial block. */
-    if (left)
-	memcpy(pms->buf, p, left);
-}
-
-void
-md5_finish(md5_state_t *pms, md5_byte_t digest[16])
-{
-    static const md5_byte_t pad[64] = {
-	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-    };
-    md5_byte_t data[8];
-    int i;
-
-    /* Save the length before padding. */
-    for (i = 0; i < 8; ++i)
-	data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
-    /* Pad to 56 bytes mod 64. */
-    md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
-    /* Append the length. */
-    md5_append(pms, data, 8);
-    for (i = 0; i < 16; ++i)
-	digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
-}
diff --git a/md5.h b/md5.h
deleted file mode 100644
index 38a0a2a..0000000
--- a/md5.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file has been copied 1:1 from the source of the Debian fdupes package into Guymager.
-// Only has been added this comment, no other changes.
-
-/*
-  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  L. Peter Deutsch
-  ghost at aladdin.com
-
- */
-/*$Id: md5.h $ */
-/*
-  Independent implementation of MD5 (RFC 1321).
-
-  This code implements the MD5 Algorithm defined in RFC 1321.
-  It is derived directly from the text of the RFC and not from the
-  reference implementation.
-
-  The original and principal author of md5.h is L. Peter Deutsch
-  <ghost at aladdin.com>.  Other authors are noted in the change history
-  that follows (in reverse chronological order):
-
-  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
-  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
-	added conditionalization for C++ compilation from Martin
-	Purschke <purschke at bnl.gov>.
-  1999-05-03 lpd Original version.
- */
-
-#ifndef md5_INCLUDED
-#  define md5_INCLUDED
-
-/*
- * This code has some adaptations for the Ghostscript environment, but it
- * will compile and run correctly in any environment with 8-bit chars and
- * 32-bit ints.  Specifically, it assumes that if the following are
- * defined, they have the same meaning as in Ghostscript: P1, P2, P3,
- * ARCH_IS_BIG_ENDIAN.
- */
-
-typedef unsigned char md5_byte_t; /* 8-bit byte */
-typedef unsigned int md5_word_t; /* 32-bit word */
-
-/* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
-    md5_word_t count[2];	/* message length in bits, lsw first */
-    md5_word_t abcd[4];		/* digest buffer */
-    md5_byte_t buf[64];		/* accumulate block */
-} md5_state_t;
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Initialize the algorithm. */
-#ifdef P1
-void md5_init(P1(md5_state_t *pms));
-#else
-void md5_init(md5_state_t *pms);
-#endif
-
-/* Append a string to the message. */
-#ifdef P3
-void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes));
-#else
-void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
-#endif
-
-/* Finish the message and return the digest. */
-#ifdef P2
-void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16]));
-#else
-void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
-#endif
-
-#ifdef __cplusplus
-}  /* end extern "C" */
-#endif
-
-#endif /* md5_INCLUDED */
-
-
-
-
diff --git a/memwatch.c b/memwatch.c
deleted file mode 100644
index 08c5f39..0000000
--- a/memwatch.c
+++ /dev/null
@@ -1,2664 +0,0 @@
-/*
-** MEMWATCH.C
-** Nonintrusive ANSI C memory leak / overwrite detection
-** Copyright (C) 1992-2003 Johan Lindh
-** All rights reserved.
-** Version 2.71
-
-	This file is part of MEMWATCH.
-
-    MEMWATCH is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    MEMWATCH is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with MEMWATCH; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-**
-** 920810 JLI   [1.00]
-** 920830 JLI   [1.10 double-free detection]
-** 920912 JLI   [1.15 mwPuts, mwGrab/Drop, mwLimit]
-** 921022 JLI   [1.20 ASSERT and VERIFY]
-** 921105 JLI   [1.30 C++ support and TRACE]
-** 921116 JLI   [1.40 mwSetOutFunc]
-** 930215 JLI   [1.50 modified ASSERT/VERIFY]
-** 930327 JLI   [1.51 better auto-init & PC-lint support]
-** 930506 JLI   [1.55 MemWatch class, improved C++ support]
-** 930507 JLI   [1.60 mwTest & CHECK()]
-** 930809 JLI   [1.65 Abort/Retry/Ignore]
-** 930820 JLI   [1.70 data dump when unfreed]
-** 931016 JLI   [1.72 modified C++ new/delete handling]
-** 931108 JLI   [1.77 mwSetAssertAction() & some small changes]
-** 940110 JLI   [1.80 no-mans-land alloc/checking]
-** 940328 JLI   [2.00 version 2.0 rewrite]
-**              Improved NML (no-mans-land) support.
-**              Improved performance (especially for free()ing!).
-**              Support for 'read-only' buffers (checksums)
-**              ^^ NOTE: I never did this... maybe I should?
-**              FBI (free'd block info) tagged before freed blocks
-**              Exporting of the mwCounter variable
-**              mwBreakOut() localizes debugger support
-**              Allocation statistics (global, per-module, per-line)
-**              Self-repair ability with relinking
-** 950913 JLI   [2.10 improved garbage handling]
-** 951201 JLI   [2.11 improved auto-free in emergencies]
-** 960125 JLI   [X.01 implemented auto-checking using mwAutoCheck()]
-** 960514 JLI   [2.12 undefining of existing macros]
-** 960515 JLI   [2.13 possibility to use default new() & delete()]
-** 960516 JLI   [2.20 suppression of file flushing on unfreed msgs]
-** 960516 JLI   [2.21 better support for using MEMWATCH with DLL's]
-** 960710 JLI   [X.02 multiple logs and mwFlushNow()]
-** 960801 JLI   [2.22 merged X.01 version with current]
-** 960805 JLI   [2.30 mwIsXXXXAddr() to avoid unneeded GP's]
-** 960805 JLI   [2.31 merged X.02 version with current]
-** 961002 JLI   [2.32 support for realloc() + fixed STDERR bug]
-** 961222 JLI   [2.40 added mwMark() & mwUnmark()]
-** 970101 JLI   [2.41 added over/underflow checking after failed ASSERT/VERIFY]
-** 970113 JLI   [2.42 added support for PC-Lint 7.00g]
-** 970207 JLI   [2.43 added support for strdup()]
-** 970209 JLI   [2.44 changed default filename to lowercase]
-** 970405 JLI   [2.45 fixed bug related with atexit() and some C++ compilers]
-** 970723 JLI   [2.46 added MW_ARI_NULLREAD flag]
-** 970813 JLI   [2.47 stabilized marker handling]
-** 980317 JLI   [2.48 ripped out C++ support; wasn't working good anyway]
-** 980318 JLI   [2.50 improved self-repair facilities & SIGSEGV support]
-** 980417 JLI	[2.51 more checks for invalid addresses]
-** 980512 JLI	[2.52 moved MW_ARI_NULLREAD to occur before aborting]
-** 990112 JLI	[2.53 added check for empty heap to mwIsOwned]
-** 990217 JLI	[2.55 improved the emergency repairs diagnostics and NML]
-** 990224 JLI	[2.56 changed ordering of members in structures]
-** 990303 JLI	[2.57 first maybe-fixit-for-hpux test]
-** 990516 JLI	[2.58 added 'static' to the definition of mwAutoInit]
-** 990517 JLI	[2.59 fixed some high-sensitivity warnings]
-** 990610 JLI	[2.60 fixed some more high-sensitivity warnings]
-** 990715 JLI	[2.61 changed TRACE/ASSERT/VERIFY macro names]
-** 991001 JLI	[2.62 added CHECK_BUFFER() and mwTestBuffer()]
-** 991007 JLI	[2.63 first shot at a 64-bit compatible version]
-** 991009 JLI	[2.64 undef's strdup() if defined, mwStrdup made const]
-** 000704 JLI	[2.65 added some more detection for 64-bits]
-** 010502 JLI   [2.66 incorporated some user fixes]
-**              [mwRelink() could print out garbage pointer (thanks mac at phobos.ca)]
-**				[added array destructor for C++ (thanks rdasilva at connecttel.com)]
-**				[added mutex support (thanks rdasilva at connecttel.com)]
-** 010531 JLI	[2.67 fix: mwMutexXXX() was declared even if MW_HAVE_MUTEX was not defined]
-** 010619 JLI	[2.68 fix: mwRealloc() could leave the mutex locked]
-** 020918 JLI	[2.69 changed to GPL, added C++ array allocation by Howard Cohen]
-** 030212 JLI	[2.70 mwMalloc() bug for very large allocations (4GB on 32bits)]
-** 030520 JLI	[2.71 added ULONG_LONG_MAX as a 64-bit detector (thanks Sami Salonen)]
-*/
-
-#define __MEMWATCH_C 1
-
-#ifdef MW_NOCPP
-#define MEMWATCH_NOCPP
-#endif
-#ifdef MW_STDIO
-#define MEMWATCH_STDIO
-#endif
-
-/***********************************************************************
-** Include files
-***********************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <time.h>
-#include <limits.h>
-#include "memwatch.h"
-
-#ifndef toupper
-#include <ctype.h>
-#endif
-
-#if defined(WIN32) || defined(__WIN32__)
-#define MW_HAVE_MUTEX 1
-#include <windows.h>
-#endif
-
-#if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H)
-#define MW_HAVE_MUTEX 1
-#include <pthread.h>
-#endif
-
-/***********************************************************************
-** Defines & other weird stuff
-***********************************************************************/
-
-/*lint -save -e767 */
-#define VERSION     "2.71"         /* the current version number */
-#define CHKVAL(mw)  (0xFE0180L^(long)mw->count^(long)mw->size^(long)mw->line)
-#define FLUSH()     mwFlush()
-#define TESTS(f,l)  if(mwTestAlways) (void)mwTestNow(f,l,1)
-#define PRECHK      0x01234567L
-#define POSTCHK     0x76543210L
-#define mwBUFFER_TO_MW(p) ( (mwData*) (void*) ( ((char*)p)-mwDataSize-mwOverflowZoneSize ) )
-/*lint -restore */
-
-#define MW_NML      0x0001
-
-#ifdef _MSC_VER
-#define COMMIT "c"  /* Microsoft C requires the 'c' to perform as desired */
-#else
-#define COMMIT ""   /* Normal ANSI */
-#endif /* _MSC_VER */
-
-#ifdef __cplusplus
-#define CPPTEXT "++"
-#else
-#define CPPTEXT ""
-#endif /* __cplusplus */
-
-#ifdef MEMWATCH_STDIO
-#define mwSTDERR stderr
-#else
-#define mwSTDERR mwLog
-#endif
-
-#ifdef MW_HAVE_MUTEX
-#define MW_MUTEX_INIT()		mwMutexInit()
-#define MW_MUTEX_TERM()		mwMutexTerm()
-#define MW_MUTEX_LOCK()		mwMutexLock()
-#define MW_MUTEX_UNLOCK()	mwMutexUnlock()
-#else
-#define MW_MUTEX_INIT()
-#define MW_MUTEX_TERM()
-#define MW_MUTEX_LOCK()
-#define MW_MUTEX_UNLOCK()
-#endif
-
-/***********************************************************************
-** If you really, really know what you're doing,
-** you can predefine these things yourself.
-***********************************************************************/
-
-#ifndef mwBYTE_DEFINED
-# if CHAR_BIT != 8
-#  error need CHAR_BIT to be 8!
-# else
-typedef unsigned char mwBYTE;
-#  define mwBYTE_DEFINED 1
-# endif
-#endif
-
-#if defined(ULONGLONG_MAX) || defined(ULLONG_MAX) || defined(_UI64_MAX) || defined(ULONG_LONG_MAX)
-# define mw64BIT 1
-# define mwROUNDALLOC_DEFAULT 8
-#else
-# if UINT_MAX <= 0xFFFFUL
-#  define mw16BIT 1
-#  define mwROUNDALLOC_DEFAULT	2
-# else
-#  if ULONG_MAX > 0xFFFFFFFFUL
-#   define mw64BIT 1
-#   define mwROUNDALLOC_DEFAULT	8
-#  else
-#   define mw32BIT 1
-#   define mwROUNDALLOC_DEFAULT	4
-#  endif
-# endif
-#endif
-
-/* mwROUNDALLOC is the number of bytes to */
-/* round up to, to ensure that the end of */
-/* the buffer is suitable for storage of */
-/* any kind of object */
-#ifndef mwROUNDALLOC
-# define mwROUNDALLOC mwROUNDALLOC_DEFAULT
-#endif
-
-#ifndef mwDWORD_DEFINED
-#if ULONG_MAX == 0xFFFFFFFFUL
-typedef unsigned long mwDWORD;
-#define mwDWORD_DEFINED "unsigned long"
-#endif
-#endif
-
-#ifndef mwDWORD_DEFINED
-#if UINT_MAX == 0xFFFFFFFFUL
-typedef unsigned int mwDWORD;
-#define mwDWORD_DEFINED "unsigned int"
-#endif
-#endif
-
-#ifndef mwDWORD_DEFINED
-#if USHRT_MAX == 0xFFFFFFFFUL
-typedef unsigned short mwDWORD;
-#define mwDWORD_DEFINED "unsigned short"
-#endif
-#endif
-
-#ifndef mwBYTE_DEFINED
-#error "can't find out the correct type for a 8 bit scalar"
-#endif
-
-#ifndef mwDWORD_DEFINED
-#error "can't find out the correct type for a 32 bit scalar"
-#endif
-
-/***********************************************************************
-** Typedefs & structures
-***********************************************************************/
-
-/* main data holding area, precedes actual allocation */
-typedef struct mwData_ mwData;
-struct mwData_ {
-    mwData*     prev;   /* previous allocation in chain */
-    mwData*     next;   /* next allocation in chain */
-    const char* file;   /* file name where allocated */
-    long        count;  /* action count */
-    long        check;  /* integrity check value */
-#if 0
-    long        crc;    /* data crc value */
-#endif
-    size_t      size;   /* size of allocation */
-    int         line;   /* line number where allocated */
-    unsigned    flag;   /* flag word */
-    };
-
-/* statistics structure */
-typedef struct mwStat_ mwStat;
-struct mwStat_ {
-    mwStat*     next;   /* next statistic buffer */
-    const char* file;
-    long        total;  /* total bytes allocated */
-    long        num;    /* total number of allocations */
-    long        max;    /* max allocated at one time */
-    long        curr;   /* current allocations */
-    int         line;
-    };
-
-/* grabbing structure, 1K in size */
-typedef struct mwGrabData_ mwGrabData;
-struct mwGrabData_ {
-    mwGrabData* next;
-    int         type;
-    char        blob[ 1024 - sizeof(mwGrabData*) - sizeof(int) ];
-    };
-
-typedef struct mwMarker_ mwMarker;
-struct mwMarker_ {
-    void *host;
-    char *text;
-    mwMarker *next;
-    int level;
-    };
-
-#if defined(WIN32) || defined(__WIN32__)
-typedef HANDLE          mwMutex;
-#endif
-
-#if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H)
-typedef pthread_mutex_t mwMutex;
-#endif
-
-/***********************************************************************
-** Static variables
-***********************************************************************/
-
-static int      mwInited =      0;
-static int      mwInfoWritten = 0;
-static int      mwUseAtexit =   0;
-static FILE*    mwLog =         NULL;
-static int      mwFlushing =    0;
-static int      mwStatLevel =   MW_STAT_DEFAULT;
-static int      mwNML =         MW_NML_DEFAULT;
-static int      mwFBI =         0;
-static long     mwAllocLimit =  0L;
-static int      mwUseLimit =    0;
-
-static long     mwNumCurAlloc = 0L;
-static mwData*  mwHead = 		NULL;
-static mwData*  mwTail = 		NULL;
-static int		mwDataSize =	0;
-static unsigned char mwOverflowZoneTemplate[] = "mEmwAtch";
-static int		mwOverflowZoneSize = mwROUNDALLOC;
-
-static void     (*mwOutFunction)(int) = NULL;
-static int      (*mwAriFunction)(const char*) = NULL;
-static int      mwAriAction = MW_ARI_ABORT;
-
-static char     mwPrintBuf[MW_TRACE_BUFFER+8];
-
-static unsigned long mwCounter = 0L;
-static long     mwErrors =      0L;
-
-static int      mwTestFlags =   0;
-static int      mwTestAlways =  0;
-
-static FILE*    mwLogB1 =       NULL;
-static int      mwFlushingB1 =  0;
-
-static mwStat*  mwStatList = NULL;
-static long     mwStatTotAlloc = 0L;
-static long     mwStatMaxAlloc = 0L;
-static long     mwStatNumAlloc = 0L;
-static long     mwStatCurAlloc = 0L;
-static long     mwNmlNumAlloc = 0L;
-static long     mwNmlCurAlloc = 0L;
-
-static mwGrabData* mwGrabList = NULL;
-static long     mwGrabSize = 0L;
-
-static void *   mwLastFree[MW_FREE_LIST];
-static const char *mwLFfile[MW_FREE_LIST];
-static int      mwLFline[MW_FREE_LIST];
-static int      mwLFcur = 0;
-
-static mwMarker* mwFirstMark = NULL;
-
-static FILE*    mwLogB2 =       NULL;
-static int      mwFlushingB2 =  0;
-
-#ifdef MW_HAVE_MUTEX
-static mwMutex	mwGlobalMutex;
-#endif
-
-/***********************************************************************
-** Static function declarations
-***********************************************************************/
-
-static void     mwAutoInit( void );
-static FILE*    mwLogR( void );
-static void     mwLogW( FILE* );
-static int      mwFlushR( void );
-static void     mwFlushW( int );
-static void     mwFlush( void );
-static void     mwIncErr( void );
-static void     mwUnlink( mwData*, const char* file, int line );
-static int      mwRelink( mwData*, const char* file, int line );
-static int      mwIsHeapOK( mwData *mw );
-static int      mwIsOwned( mwData* mw, const char* file, int line );
-static int      mwTestBuf( mwData* mw, const char* file, int line );
-static void     mwDefaultOutFunc( int );
-static void     mwWrite( const char* format, ... );
-static void     mwLogFile( const char* name );
-static size_t   mwFreeUp( size_t, int );
-static const void *mwTestMem( const void *, unsigned, int );
-static int      mwStrCmpI( const char *s1, const char *s2 );
-static int      mwTestNow( const char *file, int line, int always_invoked );
-static void     mwDropAll( void );
-static const char *mwGrabType( int type );
-static unsigned mwGrab_( unsigned kb, int type, int silent );
-static unsigned mwDrop_( unsigned kb, int type, int silent );
-static int      mwARI( const char* text );
-static void     mwStatReport( void );
-static mwStat*  mwStatGet( const char*, int, int );
-static void     mwStatAlloc( size_t, const char*, int );
-static void     mwStatFree( size_t, const char*, int );
-static int		mwCheckOF( const void * p );
-static void		mwWriteOF( void * p );
-static char		mwDummy( char c );
-#ifdef MW_HAVE_MUTEX
-static void		mwMutexInit( void );
-static void		mwMutexTerm( void );
-static void		mwMutexLock( void );
-static void		mwMutexUnlock( void );
-#endif
-
-/***********************************************************************
-** System functions
-***********************************************************************/
-
-void mwInit( void ) {
-    time_t tid;
-
-    if( mwInited++ > 0 ) return;
-
-	MW_MUTEX_INIT();
-
-    /* start a log if none is running */
-    if( mwLogR() == NULL ) mwLogFile( "memwatch.log" );
-    if( mwLogR() == NULL ) {
-        int i;
-        char buf[32];
-        /* oops, could not open it! */
-        /* probably because it's already open */
-        /* so we try some other names */
-        for( i=1; i<100; i++ ) {
-            sprintf( buf, "memwat%02d.log", i );
-            mwLogFile( buf );
-            if( mwLogR() != NULL ) break;
-            }
-        }
-
-    /* initialize the statistics */
-    mwStatList = NULL;
-    mwStatTotAlloc = 0L;
-    mwStatCurAlloc = 0L;
-    mwStatMaxAlloc = 0L;
-    mwStatNumAlloc = 0L;
-	mwNmlCurAlloc = 0L;
-	mwNmlNumAlloc = 0L;
-
-	/* calculate the buffer size to use for a mwData */
-	mwDataSize = sizeof(mwData);
-	while( mwDataSize % mwROUNDALLOC ) mwDataSize ++;
-
-    /* write informational header if needed */
-    if( !mwInfoWritten ) {
-        mwInfoWritten = 1;
-        (void) time( &tid );
-        mwWrite(
-            "\n============="
-            " MEMWATCH " VERSION " Copyright (C) 1992-1999 Johan Lindh "
-            "=============\n");
-        mwWrite( "\nStarted at %s\n", ctime( &tid ) );
-
-/**************************************************************** Generic */
-		mwWrite( "Modes: " );
-#ifdef mwNew
-        mwWrite( "C++ " );
-#endif /* mwNew */
-#ifdef __STDC__
-        mwWrite( "__STDC__ " );
-#endif /* __STDC__ */
-#ifdef mw16BIT
-		mwWrite( "16-bit " );
-#endif
-#ifdef mw32BIT
-		mwWrite( "32-bit " );
-#endif
-#ifdef mw64BIT
-		mwWrite( "64-bit " );
-#endif
-		mwWrite( "mwDWORD==(" mwDWORD_DEFINED ")\n" );
-		mwWrite( "mwROUNDALLOC==%d sizeof(mwData)==%d mwDataSize==%d\n",
-			mwROUNDALLOC, sizeof(mwData), mwDataSize );
-/**************************************************************** Generic */
-
-/************************************************************ Microsoft C */
-#ifdef _MSC_VER
-        mwWrite( "Compiled using Microsoft C" CPPTEXT
-            " %d.%02d\n", _MSC_VER / 100, _MSC_VER % 100 );
-#endif /* _MSC_VER */
-/************************************************************ Microsoft C */
-
-/************************************************************** Borland C */
-#ifdef __BORLANDC__
-        mwWrite( "Compiled using Borland C"
-#ifdef __cplusplus
-            "++ %d.%01d\n", __BCPLUSPLUS__/0x100, (__BCPLUSPLUS__%0x100)/0x10 );
-#else
-            " %d.%01d\n", __BORLANDC__/0x100, (__BORLANDC__%0x100)/0x10 );
-#endif /* __cplusplus */
-#endif /* __BORLANDC__ */
-/************************************************************** Borland C */
-
-/************************************************************** Watcom C */
-#ifdef __WATCOMC__
-        mwWrite( "Compiled using Watcom C %d.%02d ",
-            __WATCOMC__/100, __WATCOMC__%100 );
-#ifdef __FLAT__
-        mwWrite( "(32-bit flat model)" );
-#endif /* __FLAT__ */
-        mwWrite( "\n" );
-#endif /* __WATCOMC__ */
-/************************************************************** Watcom C */
-
-        mwWrite( "\n" );
-        FLUSH();
-        }
-
-    if( mwUseAtexit ) (void) atexit( mwAbort );
-    return;
-    }
-
-void mwAbort( void ) {
-    mwData *mw;
-    mwMarker *mrk;
-    char *data;
-    time_t tid;
-    int c, i, j;
-	int errors;
-
-    tid = time( NULL );
-    mwWrite( "\nStopped at %s\n", ctime( &tid) );
-
-    if( !mwInited )
-        mwWrite( "internal: mwAbort(): MEMWATCH not initialized!\n" );
-
-    /* release the grab list */
-    mwDropAll();
-
-    /* report mwMarked items */
-    while( mwFirstMark ) {
-        mrk = mwFirstMark->next;
-        mwWrite( "mark: %p: %s\n", mwFirstMark->host, mwFirstMark->text );
-        free( mwFirstMark->text );
-        free( mwFirstMark );
-        mwFirstMark = mrk;
-        mwErrors ++;
-        }
-
-    /* release all still allocated memory */
-	errors = 0;
-    while( mwHead != NULL && errors < 3 ) {
-		if( !mwIsOwned(mwHead, __FILE__, __LINE__ ) ) {
-			if( errors < 3 )
-			{
-				errors ++;
-				mwWrite( "internal: NML/unfreed scan restarting\n" );
-				FLUSH();
-				mwHead = mwHead;
-				continue;
-			}
-			mwWrite( "internal: NML/unfreed scan aborted, heap too damaged\n" );
-			FLUSH();
-			break;
-			}
-        mwFlushW(0);
-        if( !(mwHead->flag & MW_NML) ) {
-            mwErrors++;
-            data = ((char*)mwHead)+mwDataSize;
-            mwWrite( "unfreed: <%ld> %s(%d), %ld bytes at %p ",
-                mwHead->count, mwHead->file, mwHead->line, (long)mwHead->size, data+mwOverflowZoneSize );
-            if( mwCheckOF( data ) ) {
-                mwWrite( "[underflowed] ");
-                FLUSH();
-                }
-            if( mwCheckOF( (data+mwOverflowZoneSize+mwHead->size) ) ) {
-                mwWrite( "[overflowed] ");
-                FLUSH();
-                }
-            mwWrite( " \t{" );
-            j = 16; if( mwHead->size < 16 ) j = (int) mwHead->size;
-            for( i=0;i<16;i++ ) {
-                if( i<j ) mwWrite( "%02X ",
-                    (unsigned char) *(data+mwOverflowZoneSize+i) );
-                else mwWrite( ".. " );
-                }
-            for( i=0;i<j;i++ ) {
-                c = *(data+mwOverflowZoneSize+i);
-                if( c < 32 || c > 126 ) c = '.';
-                mwWrite( "%c", c );
-                }
-            mwWrite( "}\n" );
-			mw = mwHead;
-			mwUnlink( mw, __FILE__, __LINE__ );
-            free( mw );
-            }
-        else {
-            data = ((char*)mwHead) + mwDataSize + mwOverflowZoneSize;
-            if( mwTestMem( data, mwHead->size, MW_VAL_NML ) ) {
-                mwErrors++;
-                mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n",
-                    mwHead->count, data + mwOverflowZoneSize, mwHead->file, mwHead->line );
-                FLUSH();
-                }
-			mwNmlNumAlloc --;
-			mwNmlCurAlloc -= mwHead->size;
-			mw = mwHead;
-			mwUnlink( mw, __FILE__, __LINE__ );
-            free( mw );
-            }
-        }
-
-	if( mwNmlNumAlloc ) mwWrite("internal: NoMansLand block counter %ld, not zero\n", mwNmlNumAlloc );
-	if( mwNmlCurAlloc ) mwWrite("internal: NoMansLand byte counter %ld, not zero\n", mwNmlCurAlloc );
-
-    /* report statistics */
-    mwStatReport();
-    FLUSH();
-
-    mwInited = 0;
-    mwHead = mwTail = NULL;
-    if( mwErrors )
-        fprintf(mwSTDERR,"MEMWATCH detected %ld anomalies\n",mwErrors);
-    mwLogFile( NULL );
-    mwErrors = 0;
-
-    MW_MUTEX_TERM();
-
-    }
-
-void mwTerm( void ) {
-    if( mwInited == 1 )
-    {
-        mwAbort();
-        return;
-    }
-    if( !mwInited )
-        mwWrite("internal: mwTerm(): MEMWATCH has not been started!\n");
-    else
-        mwInited --;
-    }
-
-void mwStatistics( int level )
-{
-    mwAutoInit();
-    if( level<0 ) level=0;
-    if( mwStatLevel != level )
-    {
-		mwWrite( "statistics: now collecting on a %s basis\n",
-			level<1?"global":(level<2?"module":"line") );
-	    mwStatLevel = level;
-	}
-}
-
-void mwAutoCheck( int onoff ) {
-    mwAutoInit();
-    mwTestAlways = onoff;
-    if( onoff ) mwTestFlags = MW_TEST_ALL;
-    }
-
-void mwSetOutFunc( void (*func)(int) ) {
-    mwAutoInit();
-    mwOutFunction = func;
-    }
-
-static void mwWriteOF( void *p )
-{
-	int i;
-	unsigned char *ptr;
-	ptr = (unsigned char*) p;
-	for( i=0; i<mwOverflowZoneSize; i++ )
-	{
-		*(ptr+i) = mwOverflowZoneTemplate[i%8];
-	}
-	return;
-}
-
-static int mwCheckOF( const void *p )
-{
-	int i;
-	const unsigned char *ptr;
-	ptr = (const unsigned char *) p;
-	for( i=0; i<mwOverflowZoneSize; i++ )
-	{
-		if( *(ptr+i) != mwOverflowZoneTemplate[i%8] )
-			return 1; /* errors found */
-	}
-	return 0; /* no errors */
-}
-
-int mwTest( const char *file, int line, int items ) {
-    mwAutoInit();
-    mwTestFlags = items;
-    return mwTestNow( file, line, 0 );
-    }
-
-/*
-** Returns zero if there are no errors.
-** Returns nonzero if there are errors.
-*/
-int mwTestBuffer( const char *file, int line, void *p ) {
-    mwData* mw;
-
-    mwAutoInit();
-
-    /* do the quick ownership test */
-    mw = (mwData*) mwBUFFER_TO_MW( p );
-
-    if( mwIsOwned( mw, file, line ) ) {
-        return mwTestBuf( mw, file, line );
-		}
-	return 1;
-	}
-
-void mwBreakOut( const char* cause ) {
-    fprintf(mwSTDERR, "breakout: %s\n", cause);
-    mwWrite("breakout: %s\n", cause );
-    return;
-    }
-
-/*
-** 981217 JLI: is it possible that ->next is not always set?
-*/
-void * mwMark( void *p, const char *desc, const char *file, unsigned line ) {
-    mwMarker *mrk;
-    unsigned n, isnew;
-    char *buf;
-    int tot, oflow = 0;
-    char wherebuf[128];
-
-    mwAutoInit();
-    TESTS(NULL,0);
-
-    if( desc == NULL ) desc = "unknown";
-    if( file == NULL ) file = "unknown";
-
-    tot = sprintf( wherebuf, "%.48s called from %s(%d)", desc, file, line );
-    if( tot >= (int)sizeof(wherebuf) ) { wherebuf[sizeof(wherebuf)-1] = 0; oflow = 1; }
-
-    if( p == NULL ) {
-        mwWrite("mark: %s(%d), no mark for NULL:'%s' may be set\n", file, line, desc );
-        return p;
-        }
-
-	if( mwFirstMark != NULL && !mwIsReadAddr( mwFirstMark, sizeof( mwMarker ) ) )
-	{
-		mwWrite("mark: %s(%d), mwFirstMark (%p) is trashed, can't mark for %s\n",
-			file, line, mwFirstMark, desc );
-		return p;
-	}
-
-    for( mrk=mwFirstMark; mrk; mrk=mrk->next )
-	{
-		if( mrk->next != NULL && !mwIsReadAddr( mrk->next, sizeof( mwMarker ) ) )
-		{
-			mwWrite("mark: %s(%d), mark(%p)->next(%p) is trashed, can't mark for %s\n",
-				file, line, mrk, mrk->next, desc );
-			return p;
-		}
-		if( mrk->host == p ) break;
-	}
-
-    if( mrk == NULL ) {
-        isnew = 1;
-        mrk = (mwMarker*) malloc( sizeof( mwMarker ) );
-        if( mrk == NULL ) {
-            mwWrite("mark: %s(%d), no mark for %p:'%s', out of memory\n", file, line, p, desc );
-            return p;
-            }
-		mrk->next = NULL;
-        n = 0;
-        }
-    else {
-        isnew = 0;
-        n = strlen( mrk->text );
-        }
-
-    n += strlen( wherebuf );
-    buf = (char*) malloc( n+3 );
-    if( buf == NULL ) {
-        if( isnew ) free( mrk );
-        mwWrite("mark: %s(%d), no mark for %p:'%s', out of memory\n", file, line, p, desc );
-        return p;
-        }
-
-    if( isnew ) {
-        memcpy( buf, wherebuf, n+1 );
-        mrk->next = mwFirstMark;
-        mrk->host = p;
-        mrk->text = buf;
-        mrk->level = 1;
-        mwFirstMark = mrk;
-        }
-    else {
-        strcpy( buf, mrk->text );
-        strcat( buf, ", " );
-        strcat( buf, wherebuf );
-        free( mrk->text );
-        mrk->text = buf;
-        mrk->level ++;
-        }
-
-    if( oflow ) {
-        mwIncErr();
-        mwTrace( " [WARNING: OUTPUT BUFFER OVERFLOW - SYSTEM UNSTABLE]\n" );
-        }
-    return p;
-    }
-
-void* mwUnmark( void *p, const char *file, unsigned line ) {
-    mwMarker *mrk, *prv;
-    mrk = mwFirstMark;
-    prv = NULL;
-    while( mrk ) {
-        if( mrk->host == p ) {
-            if( mrk->level < 2 ) {
-                if( prv ) prv->next = mrk->next;
-                else mwFirstMark = mrk->next;
-                free( mrk->text );
-                free( mrk );
-                return p;
-                }
-            mrk->level --;
-            return p;
-            }
-        prv = mrk;
-        mrk = mrk->next;
-        }
-    mwWrite("mark: %s(%d), no mark found for %p\n", file, line, p );
-    return p;
-    }
-
-
-/***********************************************************************
-** Abort/Retry/Ignore handlers
-***********************************************************************/
-
-static int mwARI( const char *estr ) {
-    char inbuf[81];
-    int c;
-    fprintf(mwSTDERR, "\n%s\nMEMWATCH: Abort, Retry or Ignore? ", estr);
-    (void) fgets(inbuf,sizeof(inbuf),stdin);
-	for( c=0; inbuf[c] && inbuf[c] <= ' '; c++ ) ;
-    c = inbuf[c];
-    if( c == 'R' || c == 'r' ) {
-        mwBreakOut( estr );
-        return MW_ARI_RETRY;
-        }
-    if( c == 'I' || c == 'i' ) return MW_ARI_IGNORE;
-    return MW_ARI_ABORT;
-    }
-
-/* standard ARI handler (exported) */
-int mwAriHandler( const char *estr ) {
-    mwAutoInit();
-    return mwARI( estr );
-    }
-
-/* used to set the ARI function */
-void mwSetAriFunc( int (*func)(const char *) ) {
-    mwAutoInit();
-    mwAriFunction = func;
-    }
-
-/***********************************************************************
-** Allocation handlers
-***********************************************************************/
-
-void* mwMalloc( size_t size, const char* file, int line) {
-    size_t needed;
-    mwData *mw;
-    char *ptr;
-    void *p;
-
-    mwAutoInit();
-
-	MW_MUTEX_LOCK();
-
-    TESTS(file,line);
-
-    mwCounter ++;
-    needed = mwDataSize + mwOverflowZoneSize*2 + size;
-    if( needed < size )
-    {
-    	/* theoretical case: req size + mw overhead exceeded size_t limits */
-    	return NULL;
-    }
-
-    /* if this allocation would violate the limit, fail it */
-    if( mwUseLimit && ((long)size + mwStatCurAlloc > mwAllocLimit) ) {
-        mwWrite( "limit fail: <%ld> %s(%d), %ld wanted %ld available\n",
-            mwCounter, file, line, (long)size, mwAllocLimit - mwStatCurAlloc );
-        mwIncErr();
-        FLUSH();
-		MW_MUTEX_UNLOCK();
-        return NULL;
-        }
-
-    mw = (mwData*) malloc( needed );
-    if( mw == NULL ) {
-        if( mwFreeUp(needed,0) >= needed ) {
-            mw = (mwData*) malloc(needed);
-            if( mw == NULL ) {
-                mwWrite( "internal: mwFreeUp(%u) reported success, but malloc() fails\n", needed );
-                mwIncErr();
-                FLUSH();
-                }
-            }
-        if( mw == NULL ) {
-            mwWrite( "fail: <%ld> %s(%d), %ld wanted %ld allocated\n",
-                mwCounter, file, line, (long)size, mwStatCurAlloc );
-            mwIncErr();
-            FLUSH();
-			MW_MUTEX_UNLOCK();
-            return NULL;
-            }
-        }
-
-    mw->count = mwCounter;
-    mw->prev = NULL;
-    mw->next = mwHead;
-    mw->file = file;
-    mw->size = size;
-    mw->line = line;
-    mw->flag = 0;
-    mw->check = CHKVAL(mw);
-
-    if( mwHead ) mwHead->prev = mw;
-    mwHead = mw;
-    if( mwTail == NULL ) mwTail = mw;
-
-    ptr = ((char*)mw) + mwDataSize;
-	mwWriteOF( ptr ); /* '*(long*)ptr = PRECHK;' */
-    ptr += mwOverflowZoneSize;
-    p = ptr;
-    memset( ptr, MW_VAL_NEW, size );
-    ptr += size;
-    mwWriteOF( ptr ); /* '*(long*)ptr = POSTCHK;' */
-
-    mwNumCurAlloc ++;
-    mwStatCurAlloc += (long) size;
-    mwStatTotAlloc += (long) size;
-    if( mwStatCurAlloc > mwStatMaxAlloc )
-        mwStatMaxAlloc = mwStatCurAlloc;
-    mwStatNumAlloc ++;
-
-    if( mwStatLevel ) mwStatAlloc( size, file, line );
-
-	MW_MUTEX_UNLOCK();
-    return p;
-    }
-
-void* mwRealloc( void *p, size_t size, const char* file, int line) {
-    int oldUseLimit, i;
-    mwData *mw;
-    char *ptr;
-
-    mwAutoInit();
-
-    if( p == NULL ) return mwMalloc( size, file, line );
-    if( size == 0 ) { mwFree( p, file, line ); return NULL; }
-
-	MW_MUTEX_LOCK();
-
-    /* do the quick ownership test */
-    mw = (mwData*) mwBUFFER_TO_MW( p );
-    if( mwIsOwned( mw, file, line ) ) {
-
-		/* if the buffer is an NML, treat this as a double-free */
-		if( mw->flag & MW_NML )
-		{
-            mwIncErr();
-			if( *((unsigned char*)(mw)+mwDataSize+mwOverflowZoneSize) != MW_VAL_NML )
-			{
-				mwWrite( "internal: <%ld> %s(%d), no-mans-land MW-%p is corrupted\n",
-					mwCounter, file, line, mw );
-			}
-			goto check_dbl_free;
-		}
-
-        /* if this allocation would violate the limit, fail it */
-        if( mwUseLimit && ((long)size + mwStatCurAlloc - (long)mw->size > mwAllocLimit) ) {
-            TESTS(file,line);
-            mwCounter ++;
-            mwWrite( "limit fail: <%ld> %s(%d), %ld wanted %ld available\n",
-                mwCounter, file, line, (unsigned long)size - mw->size, mwAllocLimit - mwStatCurAlloc );
-            mwIncErr();
-            FLUSH();
-			MW_MUTEX_UNLOCK();
-            return NULL;
-            }
-
-        /* fake realloc operation */
-        oldUseLimit = mwUseLimit;
-        mwUseLimit = 0;
-        ptr = (char*) mwMalloc( size, file, line );
-        if( ptr != NULL ) {
-            if( size < mw->size )
-                memcpy( ptr, p, size );
-            else
-                memcpy( ptr, p, mw->size );
-            mwFree( p, file, line );
-            }
-        mwUseLimit = oldUseLimit;
-		MW_MUTEX_UNLOCK();
-        return (void*) ptr;
-        }
-
-    /* Unknown pointer! */
-
-    /* using free'd pointer? */
-check_dbl_free:
-    for(i=0;i<MW_FREE_LIST;i++) {
-        if( mwLastFree[i] == p ) {
-            mwIncErr();
-            mwWrite( "realloc: <%ld> %s(%d), %p was"
-                " freed from %s(%d)\n",
-                mwCounter, file, line, p,
-                mwLFfile[i], mwLFline[i] );
-            FLUSH();
-			MW_MUTEX_UNLOCK();
-            return NULL;
-            }
-        }
-
-    /* some weird pointer */
-    mwIncErr();
-    mwWrite( "realloc: <%ld> %s(%d), unknown pointer %p\n",
-        mwCounter, file, line, p );
-    FLUSH();
-	MW_MUTEX_UNLOCK();
-    return NULL;
-    }
-
-char *mwStrdup( const char* str, const char* file, int line ) {
-    size_t len;
-    char *newstring;
-
-	MW_MUTEX_LOCK();
-
-    if( str == NULL ) {
-        mwIncErr();
-        mwWrite( "strdup: <%ld> %s(%d), strdup(NULL) called\n",
-            mwCounter, file, line );
-        FLUSH();
-		MW_MUTEX_UNLOCK();
-        return NULL;
-        }
-
-    len = strlen( str ) + 1;
-    newstring = (char*) mwMalloc( len, file, line );
-    if( newstring != NULL ) memcpy( newstring, str, len );
-	MW_MUTEX_UNLOCK();
-    return newstring;
-    }
-
-void mwFree( void* p, const char* file, int line ) {
-    int i;
-    mwData* mw;
-    char buffer[ sizeof(mwData) + (mwROUNDALLOC*3) + 64 ];
-
-    /* this code is in support of C++ delete */
-    if( file == NULL ) {
-        mwFree_( p );
-		MW_MUTEX_UNLOCK();
-        return;
-        }
-
-    mwAutoInit();
-
-	MW_MUTEX_LOCK();
-    TESTS(file,line);
-    mwCounter ++;
-
-    /* on NULL free, write a warning and return */
-    if( p == NULL ) {
-        mwWrite( "NULL free: <%ld> %s(%d), NULL pointer free'd\n",
-            mwCounter, file, line );
-        FLUSH();
-		MW_MUTEX_UNLOCK();
-        return;
-        }
-
-    /* do the quick ownership test */
-    mw = (mwData*) mwBUFFER_TO_MW( p );
-
-    if( mwIsOwned( mw, file, line ) ) {
-        (void) mwTestBuf( mw, file, line );
-
-		/* if the buffer is an NML, treat this as a double-free */
-		if( mw->flag & MW_NML )
-		{
-			if( *(((unsigned char*)mw)+mwDataSize+mwOverflowZoneSize) != MW_VAL_NML )
-			{
-				mwWrite( "internal: <%ld> %s(%d), no-mans-land MW-%p is corrupted\n",
-					mwCounter, file, line, mw );
-			}
-			goto check_dbl_free;
-		}
-
-        /* update the statistics */
-        mwNumCurAlloc --;
-        mwStatCurAlloc -= (long) mw->size;
-        if( mwStatLevel ) mwStatFree( mw->size, mw->file, mw->line );
-
-        /* we should either free the allocation or keep it as NML */
-        if( mwNML ) {
-            mw->flag |= MW_NML;
-			mwNmlNumAlloc ++;
-			mwNmlCurAlloc += (long) mw->size;
-            memset( ((char*)mw)+mwDataSize+mwOverflowZoneSize, MW_VAL_NML, mw->size );
-            }
-        else {
-            /* unlink the allocation, and enter the post-free data */
-            mwUnlink( mw, file, line );
-            memset( mw, MW_VAL_DEL,
-                mw->size + mwDataSize+mwOverflowZoneSize+mwOverflowZoneSize );
-            if( mwFBI ) {
-                memset( mw, '.', mwDataSize + mwOverflowZoneSize );
-                sprintf( buffer, "FBI<%ld>%s(%d)", mwCounter, file, line );
-                strncpy( (char*)(void*)mw, buffer, mwDataSize + mwOverflowZoneSize );
-                }
-            free( mw );
-            }
-
-        /* add the pointer to the last-free track */
-        mwLFfile[ mwLFcur ] = file;
-        mwLFline[ mwLFcur ] = line;
-        mwLastFree[ mwLFcur++ ] = p;
-        if( mwLFcur == MW_FREE_LIST ) mwLFcur = 0;
-
-		MW_MUTEX_UNLOCK();
-        return;
-        }
-
-    /* check for double-freeing */
-check_dbl_free:
-    for(i=0;i<MW_FREE_LIST;i++) {
-        if( mwLastFree[i] == p ) {
-            mwIncErr();
-            mwWrite( "double-free: <%ld> %s(%d), %p was"
-                " freed from %s(%d)\n",
-                mwCounter, file, line, p,
-                mwLFfile[i], mwLFline[i] );
-            FLUSH();
-			MW_MUTEX_UNLOCK();
-            return;
-            }
-        }
-
-    /* some weird pointer... block the free */
-    mwIncErr();
-    mwWrite( "WILD free: <%ld> %s(%d), unknown pointer %p\n",
-        mwCounter, file, line, p );
-    FLUSH();
-	MW_MUTEX_UNLOCK();
-    return;
-    }
-
-void* mwCalloc( size_t a, size_t b, const char *file, int line ) {
-    void *p;
-    size_t size = a * b;
-    p = mwMalloc( size, file, line );
-    if( p == NULL ) return NULL;
-    memset( p, 0, size );
-    return p;
-    }
-
-void mwFree_( void *p ) {
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-	MW_MUTEX_UNLOCK();
-    free(p);
-    }
-
-void* mwMalloc_( size_t size ) {
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-	MW_MUTEX_UNLOCK();
-    return malloc( size );
-    }
-
-void* mwRealloc_( void *p, size_t size ) {
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-	MW_MUTEX_UNLOCK();
-    return realloc( p, size );
-    }
-
-void* mwCalloc_( size_t a, size_t b ) {
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-	MW_MUTEX_UNLOCK();
-    return calloc( a, b );
-    }
-
-void mwFlushNow( void ) {
-    if( mwLogR() ) fflush( mwLogR() );
-    return;
-    }
-
-void mwDoFlush( int onoff ) {
-    mwFlushW( onoff<1?0:onoff );
-    if( onoff ) if( mwLogR() ) fflush( mwLogR() );
-    return;
-    }
-
-void mwLimit( long lim ) {
-    TESTS(NULL,0);
-    mwWrite("limit: old limit = ");
-    if( !mwAllocLimit ) mwWrite( "none" );
-    else mwWrite( "%ld bytes", mwAllocLimit );
-    mwWrite( ", new limit = ");
-    if( !lim ) {
-        mwWrite( "none\n" );
-        mwUseLimit = 0;
-        }
-    else {
-        mwWrite( "%ld bytes\n", lim );
-        mwUseLimit = 1;
-        }
-    mwAllocLimit = lim;
-    FLUSH();
-    }
-
-void mwSetAriAction( int action ) {
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-    mwAriAction = action;
-	MW_MUTEX_UNLOCK();
-    return;
-    }
-
-int mwAssert( int exp, const char *exps, const char *fn, int ln ) {
-    int i;
-    char buffer[MW_TRACE_BUFFER+8];
-    if( exp ) {
-    	return 0;
-    	}
-    mwAutoInit();
-	MW_MUTEX_LOCK();
-    TESTS(fn,ln);
-    mwIncErr();
-    mwCounter++;
-    mwWrite( "assert trap: <%ld> %s(%d), %s\n", mwCounter, fn, ln, exps );
-    if( mwAriFunction != NULL ) {
-        sprintf( buffer, "MEMWATCH: assert trap: %s(%d), %s", fn, ln, exps );
-        i = (*mwAriFunction)(buffer);
-		switch( i ) {
-			case MW_ARI_IGNORE:
-	           	mwWrite( "assert trap: <%ld> IGNORED - execution continues\n", mwCounter );
-				MW_MUTEX_UNLOCK();
-    	        return 0;
-			case MW_ARI_RETRY:
-            	mwWrite( "assert trap: <%ld> RETRY - executing again\n", mwCounter );
-				MW_MUTEX_UNLOCK();
-            	return 1;
-			}
-        }
-    else {
-        if( mwAriAction & MW_ARI_IGNORE ) {
-            mwWrite( "assert trap: <%ld> AUTO IGNORED - execution continues\n", mwCounter );
-			MW_MUTEX_UNLOCK();
-            return 0;
-            }
-        fprintf(mwSTDERR,"\nMEMWATCH: assert trap: %s(%d), %s\n", fn, ln, exps );
-        }
-
-    FLUSH();
-    (void) mwTestNow( fn, ln, 1 );
-    FLUSH();
-
-	if( mwAriAction & MW_ARI_NULLREAD ) {
-		/* This is made in an attempt to kick in */
-		/* any debuggers or OS stack traces */
-	    FLUSH();
-		/*lint -save -e413 */
-		i = *((int*)NULL);
-		mwDummy( (char)i );
-		/*lint -restore */
-		}
-
-	MW_MUTEX_UNLOCK();
-    exit(255);
-    /* NOT REACHED - the return statement is in to keep */
-    /* stupid compilers from squeaking about differing return modes. */
-    /* Smart compilers instead say 'code unreachable...' */
-    /*lint -save -e527 */
-    return 0;
-    /*lint -restore */
-    }
-
-int mwVerify( int exp, const char *exps, const char *fn, int ln ) {
-    int i;
-    char buffer[MW_TRACE_BUFFER+8];
-    if( exp ) {
-    	return 0;
-    	}
-    mwAutoInit();
-	MW_MUTEX_LOCK();
-    TESTS(fn,ln);
-    mwIncErr();
-    mwCounter++;
-    mwWrite( "verify trap: <%ld> %s(%d), %s\n", mwCounter, fn, ln, exps );
-    if( mwAriFunction != NULL ) {
-        sprintf( buffer, "MEMWATCH: verify trap: %s(%d), %s", fn, ln, exps );
-        i = (*mwAriFunction)(buffer);
-        if( i == 0 ) {
-            mwWrite( "verify trap: <%ld> IGNORED - execution continues\n", mwCounter );
-			MW_MUTEX_UNLOCK();
-            return 0;
-            }
-        if( i == 1 ) {
-            mwWrite( "verify trap: <%ld> RETRY - executing again\n", mwCounter );
-			MW_MUTEX_UNLOCK();
-            return 1;
-            }
-        }
-    else {
-        if( mwAriAction & MW_ARI_NULLREAD ) {
-            /* This is made in an attempt to kick in */
-            /* any debuggers or OS stack traces */
-		    FLUSH();
-            /*lint -save -e413 */
-            i = *((int*)NULL);
-			mwDummy( (char)i );
-            /*lint -restore */
-            }
-        if( mwAriAction & MW_ARI_IGNORE ) {
-            mwWrite( "verify trap: <%ld> AUTO IGNORED - execution continues\n", mwCounter );
-			MW_MUTEX_UNLOCK();
-            return 0;
-            }
-        fprintf(mwSTDERR,"\nMEMWATCH: verify trap: %s(%d), %s\n", fn, ln, exps );
-        }
-    FLUSH();
-    (void) mwTestNow( fn, ln, 1 );
-    FLUSH();
-	MW_MUTEX_UNLOCK();
-	exit(255);
-    /* NOT REACHED - the return statement is in to keep */
-    /* stupid compilers from squeaking about differing return modes. */
-    /* Smart compilers instead say 'code unreachable...' */
-    /*lint -save -e527 */
-    return 0;
-    /*lint -restore */
-    }
-
-void mwTrace( const char *format, ... ) {
-    int tot, oflow = 0;
-    va_list mark;
-
-    mwAutoInit();
-	MW_MUTEX_LOCK();
-    TESTS(NULL,0);
-    if( mwOutFunction == NULL ) mwOutFunction = mwDefaultOutFunc;
-
-    va_start( mark, format );
-    tot = vsprintf( mwPrintBuf, format, mark );
-    va_end( mark );
-    if( tot >= MW_TRACE_BUFFER ) { mwPrintBuf[MW_TRACE_BUFFER] = 0; oflow = 1; }
-    for(tot=0;mwPrintBuf[tot];tot++)
-        (*mwOutFunction)( mwPrintBuf[tot] );
-    if( oflow ) {
-        mwIncErr();
-        mwTrace( " [WARNING: OUTPUT BUFFER OVERFLOW - SYSTEM UNSTABLE]\n" );
-        }
-
-    FLUSH();
-	MW_MUTEX_UNLOCK();
-    }
-
-
-/***********************************************************************
-** Grab & Drop
-***********************************************************************/
-
-unsigned mwGrab( unsigned kb ) {
-    TESTS(NULL,0);
-    return mwGrab_( kb, MW_VAL_GRB, 0 );
-    }
-
-unsigned mwDrop( unsigned kb ) {
-    TESTS(NULL,0);
-    return mwDrop_( kb, MW_VAL_GRB, 0 );
-    }
-
-static void mwDropAll() {
-    TESTS(NULL,0);
-    (void) mwDrop_( 0, MW_VAL_GRB, 0 );
-    (void) mwDrop_( 0, MW_VAL_NML, 0 );
-    if( mwGrabList != NULL )
-        mwWrite( "internal: the grab list is not empty after mwDropAll()\n");
-    }
-
-static const char *mwGrabType( int type ) {
-    switch( type ) {
-        case MW_VAL_GRB:
-            return "grabbed";
-        case MW_VAL_NML:
-            return "no-mans-land";
-        default:
-            /* do nothing */
-            ;
-        }
-    return "<unknown type>";
-    }
-
-static unsigned mwGrab_( unsigned kb, int type, int silent ) {
-    unsigned i = kb;
-    mwGrabData *gd;
-    if( !kb ) i = kb = 65000U;
-
-    for(;kb;kb--) {
-        if( mwUseLimit &&
-            (mwStatCurAlloc + mwGrabSize + (long)sizeof(mwGrabData) > mwAllocLimit) ) {
-            if( !silent ) {
-                mwWrite("grabbed: all allowed memory to %s (%u kb)\n",
-                    mwGrabType(type), i-kb);
-                FLUSH();
-                }
-            return i-kb;
-            }
-        gd = (mwGrabData*) malloc( sizeof(mwGrabData) );
-        if( gd == NULL ) {
-            if( !silent ) {
-                mwWrite("grabbed: all available memory to %s (%u kb)\n",
-                    mwGrabType(type), i-kb);
-                FLUSH();
-                }
-            return i-kb;
-            }
-        mwGrabSize += (long) sizeof(mwGrabData);
-        gd->next = mwGrabList;
-        memset( gd->blob, type, sizeof(gd->blob) );
-        gd->type = type;
-        mwGrabList = gd;
-        }
-    if( !silent ) {
-        mwWrite("grabbed: %u kilobytes of %s memory\n", i, mwGrabType(type) );
-        FLUSH();
-        }
-    return i;
-    }
-
-static unsigned mwDrop_( unsigned kb, int type, int silent ) {
-    unsigned i = kb;
-    mwGrabData *gd,*tmp,*pr;
-    const void *p;
-
-    if( mwGrabList == NULL && kb == 0 ) return 0;
-    if( !kb ) i = kb = 60000U;
-
-    pr = NULL;
-    gd = mwGrabList;
-    for(;kb;) {
-        if( gd == NULL ) {
-            if( i-kb > 0 && !silent ) {
-                mwWrite("dropped: all %s memory (%u kb)\n", mwGrabType(type), i-kb);
-                FLUSH();
-                }
-            return i-kb;
-            }
-        if( gd->type == type ) {
-            if( pr ) pr->next = gd->next;
-            kb --;
-            tmp = gd;
-            if( mwGrabList == gd ) mwGrabList = gd->next;
-            gd = gd->next;
-            p = mwTestMem( tmp->blob, sizeof( tmp->blob ), type );
-            if( p != NULL ) {
-                mwWrite( "wild pointer: <%ld> %s memory hit at %p\n",
-                    mwCounter, mwGrabType(type), p );
-                FLUSH();
-                }
-            mwGrabSize -= (long) sizeof(mwGrabData);
-            free( tmp );
-            }
-        else {
-            pr = gd;
-            gd = gd->next;
-            }
-        }
-    if( !silent ) {
-        mwWrite("dropped: %u kilobytes of %s memory\n", i, mwGrabType(type) );
-        FLUSH();
-        }
-    return i;
-    }
-
-/***********************************************************************
-** No-Mans-Land
-***********************************************************************/
-
-void mwNoMansLand( int level ) {
-    mwAutoInit();
-    TESTS(NULL,0);
-    switch( level ) {
-        case MW_NML_NONE:
-            (void) mwDrop_( 0, MW_VAL_NML, 0 );
-            break;
-        case MW_NML_FREE:
-            break;
-        case MW_NML_ALL:
-            (void) mwGrab_( 0, MW_VAL_NML, 0 );
-            break;
-        default:
-            return;
-        }
-    mwNML = level;
-    }
-
-/***********************************************************************
-** Static functions
-***********************************************************************/
-
-static void mwAutoInit( void )
-{
-    if( mwInited ) return;
-    mwUseAtexit = 1;
-    mwInit();
-    return;
-}
-
-static FILE *mwLogR() {
-    if( (mwLog == mwLogB1) && (mwLog == mwLogB2) ) return mwLog;
-    if( mwLog == mwLogB1 ) mwLogB2 = mwLog;
-    if( mwLog == mwLogB2 ) mwLogB1 = mwLog;
-    if( mwLogB1 == mwLogB2 ) mwLog = mwLogB1;
-    if( (mwLog == mwLogB1) && (mwLog == mwLogB2) ) {
-        mwWrite("internal: log file handle damaged and recovered\n");
-        FLUSH();
-        return mwLog;
-        }
-    fprintf(mwSTDERR,"\nMEMWATCH: log file handle destroyed, using mwSTDERR\n" );
-    mwLog = mwLogB1 = mwLogB2 = mwSTDERR;
-    return mwSTDERR;
-    }
-
-static void mwLogW( FILE *p ) {
-    mwLog = mwLogB1 = mwLogB2 = p;
-    }
-
-static int mwFlushR() {
-    if( (mwFlushing == mwFlushingB1) && (mwFlushing == mwFlushingB2) ) return mwFlushing;
-    if( mwFlushing == mwFlushingB1 ) mwFlushingB2 = mwFlushing;
-    if( mwFlushing == mwFlushingB2 ) mwFlushingB1 = mwFlushing;
-    if( mwFlushingB1 == mwFlushingB2 ) mwFlushing = mwFlushingB1;
-    if( (mwFlushing == mwFlushingB1) && (mwFlushing == mwFlushingB2) ) {
-        mwWrite("internal: flushing flag damaged and recovered\n");
-        FLUSH();
-        return mwFlushing;
-        }
-    mwWrite("internal: flushing flag destroyed, so set to true\n");
-    mwFlushing = mwFlushingB1 = mwFlushingB2 = 1;
-    return 1;
-    }
-
-static void mwFlushW( int n ) {
-    mwFlushing = mwFlushingB1 = mwFlushingB2 = n;
-    }
-
-static void mwIncErr() {
-    mwErrors++;
-    mwFlushW( mwFlushR()+1 );
-    FLUSH();
-    }
-
-static void mwFlush() {
-    if( mwLogR() == NULL ) return;
-#ifdef MW_FLUSH
-    fflush( mwLogR() );
-#else
-    if( mwFlushR() ) fflush( mwLogR() );
-#endif
-    return;
-    }
-
-static void mwUnlink( mwData* mw, const char* file, int line ) {
-    if( mw->prev == NULL ) {
-        if( mwHead != mw )
-            mwWrite( "internal: <%ld> %s(%d), MW-%p: link1 NULL, but not head\n",
-                mwCounter, file, line, mw );
-        mwHead = mw->next;
-        }
-    else {
-        if( mw->prev->next != mw )
-            mwWrite( "internal: <%ld> %s(%d), MW-%p: link1 failure\n",
-                mwCounter, file, line, mw );
-        else mw->prev->next = mw->next;
-        }
-    if( mw->next == NULL ) {
-        if( mwTail != mw )
-            mwWrite( "internal: <%ld> %s(%d), MW-%p: link2 NULL, but not tail\n",
-                mwCounter, file, line, mw );
-        mwTail = mw->prev;
-        }
-    else {
-        if( mw->next->prev != mw )
-            mwWrite( "internal: <%ld> %s(%d), MW-%p: link2 failure\n",
-                mwCounter, file, line, mw );
-        else mw->next->prev = mw->prev;
-        }
-    }
-
-/*
-** Relinking tries to repair a damaged mw block.
-** Returns nonzero if it thinks it successfully
-** repaired the heap chain.
-*/
-static int mwRelink( mwData* mw, const char* file, int line ) {
-    int fails;
-    mwData *mw1, *mw2;
-    long count, size;
-    mwStat *ms;
-
-	if( file == NULL ) file = "unknown";
-
-    if( mw == NULL ) {
-        mwWrite("relink: cannot repair MW at NULL\n");
-        FLUSH();
-        goto emergency;
-        }
-
-    if( !mwIsSafeAddr(mw, mwDataSize) ) {
-        mwWrite("relink: MW-%p is a garbage pointer\n", mw);
-        FLUSH();
-        goto emergency;
-        }
-
-    mwWrite("relink: <%ld> %s(%d) attempting to repair MW-%p...\n", mwCounter, file, line, mw );
-    FLUSH();
-    fails = 0;
-
-    /* Repair from head */
-    if( mwHead != mw ) {
-        if( !mwIsSafeAddr( mwHead, mwDataSize ) ) {
-            mwWrite("relink: failed for MW-%p; head pointer destroyed\n", mw );
-            FLUSH();
-            goto emergency;
-            }
-        for( mw1=mwHead; mw1; mw1=mw1->next ) {
-            if( mw1->next == mw ) {
-                mw->prev = mw1;
-                break;
-                }
-            if( mw1->next &&
-                ( !mwIsSafeAddr(mw1->next, mwDataSize ) || mw1->next->prev != mw1) ) {
-                mwWrite("relink: failed for MW-%p; forward chain fragmented at MW-%p: 'next' is %p\n", mw, mw1, mw1->next );
-                FLUSH();
-                goto emergency;
-                }
-            }
-        if( mw1 == NULL ) {
-            mwWrite("relink: MW-%p not found in forward chain search\n", mw );
-            FLUSH();
-            fails ++;
-            }
-        }
-	else
-	{
-		mwWrite( "relink: MW-%p is the head (first) allocation\n", mw );
-		if( mw->prev != NULL )
-		{
-			mwWrite( "relink: MW-%p prev pointer is non-NULL, you have a wild pointer\n", mw );
-			mw->prev = NULL;
-		}
-	}
-
-    /* Repair from tail */
-    if( mwTail != mw ) {
-        if( !mwIsSafeAddr( mwTail, mwDataSize ) ) {
-            mwWrite("relink: failed for MW-%p; tail pointer destroyed\n", mw );
-            FLUSH();
-            goto emergency;
-            }
-        for( mw1=mwTail; mw1; mw1=mw1->prev ) {
-            if( mw1->prev == mw ) {
-                mw->next = mw1;
-                break;
-                }
-            if( mw1->prev && (!mwIsSafeAddr(mw1->prev, mwDataSize ) || mw1->prev->next != mw1) ) {
-                mwWrite("relink: failed for MW-%p; reverse chain fragmented at MW-%p, 'prev' is %p\n", mw, mw1, mw1->prev );
-                FLUSH();
-                goto emergency;
-                }
-            }
-        if( mw1 == NULL ) {
-            mwWrite("relink: MW-%p not found in reverse chain search\n", mw );
-            FLUSH();
-            fails ++;
-            }
-        }
-	else
-	{
-		mwWrite( "relink: MW-%p is the tail (last) allocation\n", mw );
-		if( mw->next != NULL )
-		{
-			mwWrite( "relink: MW-%p next pointer is non-NULL, you have a wild pointer\n", mw );
-			mw->next = NULL;
-		}
-	}
-
-    if( fails > 1 ) {
-        mwWrite("relink: heap appears intact, MW-%p probably garbage pointer\n", mw );
-        FLUSH();
-        goto verifyok;
-        }
-
-    /* restore MW info where possible */
-    if( mwIsReadAddr( mw->file, 1 ) ) {
-        ms = mwStatGet( mw->file, -1, 0 );
-        if( ms == NULL ) mw->file = "<relinked>";
-        }
-    mw->check = CHKVAL(mw);
-    goto verifyok;
-
-    /* Emergency repair */
-    emergency:
-
-    if( mwHead == NULL && mwTail == NULL )
-    {
-        if( mwStatCurAlloc == 0 )
-            mwWrite("relink: <%ld> %s(%d) heap is empty, nothing to repair\n", mwCounter, file, line );
-        else
-            mwWrite("relink: <%ld> %s(%d) heap damaged beyond repair\n", mwCounter, file, line );
-        FLUSH();
-        return 0;
-    }
-
-    mwWrite("relink: <%ld> %s(%d) attempting emergency repairs...\n", mwCounter, file, line );
-    FLUSH();
-
-	if( mwHead == NULL || mwTail == NULL )
-	{
-		if( mwHead == NULL ) mwWrite("relink: mwHead is NULL, but mwTail is %p\n", mwTail );
-		else mwWrite("relink: mwTail is NULL, but mwHead is %p\n", mwHead );
-	}
-
-    mw1=NULL;
-    if( mwHead != NULL )
-	{
-		if( !mwIsReadAddr( mwHead, mwDataSize ) || mwHead->check != CHKVAL(mwHead) )
-		{
-			mwWrite("relink: mwHead (MW-%p) is damaged, skipping forward scan\n", mwHead );
-			mwHead = NULL;
-			goto scan_reverse;
-		}
-		if( mwHead->prev != NULL )
-		{
-			mwWrite("relink: the mwHead pointer's 'prev' member is %p, not NULL\n", mwHead->prev );
-		}
-        for( mw1=mwHead; mw1; mw1=mw1->next )
-		{
-			if( mw1->next )
-			{
-				if( !mwIsReadAddr(mw1->next,mwDataSize) ||
-					!mw1->next->check != CHKVAL(mw1) ||
-					mw1->next->prev != mw1 )
-				{
-					mwWrite("relink: forward chain's last intact MW is MW-%p, %ld %sbytes at %s(%d)\n",
-						mw1, mw1->size, (mw->flag & MW_NML)?"NoMansLand ":"", mw1->file, mw1->line );
-					if( mwIsReadAddr(mw1->next,mwDataSize ) )
-					{
-						mwWrite("relink: forward chain's first damaged MW is MW-%p, %ld %sbytes at %s(%d)\n",
-							mw1->next, mw1->size, (mw->flag & MW_NML)?"NoMansLand ":"",
-							mwIsReadAddr(mw1->file,16)?mw1->file:"<garbage-pointer>", mw1->line );
-					}
-					else
-					{
-						mwWrite("relink: the 'next' pointer of this MW points to %p, which is out-of-legal-access\n",
-							mw1->next );
-					}
-					break;
-				}
-			}
-        }
-	}
-
-
-scan_reverse:
-    mw2=NULL;
-    if( mwTail != NULL )
-	{
-		if( !mwIsReadAddr(mwTail,mwDataSize) || mwTail->check != CHKVAL(mwTail) )
-		{
-			mwWrite("relink: mwTail (%p) is damaged, skipping reverse scan\n", mwTail );
-			mwTail = NULL;
-			goto analyze;
-		}
-		if( mwTail->next != NULL )
-		{
-			mwWrite("relink: the mwTail pointer's 'next' member is %p, not NULL\n", mwTail->next );
-		}
-        for( mw2=mwTail; mw2; mw2=mw2->prev )
-		{
-            if( mw2->prev )
-			{
-				if( !mwIsReadAddr(mw2->prev,mwDataSize) ||
-					!mw2->prev->check != CHKVAL(mw2) ||
-					mw2->prev->next != mw2 )
-				{
-					mwWrite("relink: reverse chain's last intact MW is MW-%p, %ld %sbytes at %s(%d)\n",
-						mw2, mw2->size, (mw->flag & MW_NML)?"NoMansLand ":"", mw2->file, mw2->line );
-					if( mwIsReadAddr(mw2->prev,mwDataSize ) )
-					{
-						mwWrite("relink: reverse chain's first damaged MW is MW-%p, %ld %sbytes at %s(%d)\n",
-							mw2->prev, mw2->size, (mw->flag & MW_NML)?"NoMansLand ":"",
-							mwIsReadAddr(mw2->file,16)?mw2->file:"<garbage-pointer>", mw2->line );
-					}
-					else
-					{
-						mwWrite("relink: the 'prev' pointer of this MW points to %p, which is out-of-legal-access\n",
-							mw2->prev );
-					}
-					break;
-				}
-			}
-        }
-	}
-
-analyze:
-	if( mwHead == NULL && mwTail == NULL )
-	{
-        mwWrite("relink: both head and tail pointers damaged, aborting program\n");
-        mwFlushW(1);
-        FLUSH();
-        abort();
-	}
-	if( mwHead == NULL )
-	{
-		mwHead = mw2;
-		mwWrite("relink: heap truncated, MW-%p designated as new mwHead\n", mw2 );
-		mw2->prev = NULL;
-		mw1 = mw2 = NULL;
-	}
-	if( mwTail == NULL )
-	{
-		mwTail = mw1;
-		mwWrite("relink: heap truncated, MW-%p designated as new mwTail\n", mw1 );
-		mw1->next = NULL;
-		mw1 = mw2 = NULL;
-	}
-    if( mw1 == NULL && mw2 == NULL &&
-        mwHead->prev == NULL && mwTail->next == NULL ) {
-        mwWrite("relink: verifying heap integrity...\n" );
-        FLUSH();
-        goto verifyok;
-        }
-    if( mw1 && mw2 && mw1 != mw2 ) {
-        mw1->next = mw2;
-        mw2->prev = mw1;
-        mwWrite("relink: emergency repairs successful, assessing damage...\n");
-        FLUSH();
-        }
-    else {
-        mwWrite("relink: heap totally destroyed, aborting program\n");
-        mwFlushW(1);
-        FLUSH();
-        abort();
-        }
-
-    /* Verify by checking that the number of active allocations */
-    /* match the number of entries in the chain */
-verifyok:
-    if( !mwIsHeapOK( NULL ) ) {
-        mwWrite("relink: heap verification FAILS - aborting program\n");
-        mwFlushW(1);
-        FLUSH();
-        abort();
-        }
-    for( size=count=0, mw1=mwHead; mw1; mw1=mw1->next ) {
-        count ++;
-        size += (long) mw1->size;
-        }
-    if( count == mwNumCurAlloc ) {
-        mwWrite("relink: successful, ");
-        if( size == mwStatCurAlloc ) {
-            mwWrite("no allocations lost\n");
-            }
-        else {
-            if( mw != NULL ) {
-                mwWrite("size information lost for MW-%p\n", mw);
-                mw->size = 0;
-                }
-            }
-        }
-    else {
-        mwWrite("relink: partial, %ld MW-blocks of %ld bytes lost\n",
-			mwNmlNumAlloc+mwNumCurAlloc-count, mwNmlCurAlloc+mwStatCurAlloc-size );
-        return 0;
-        }
-
-    return 1;
-    }
-
-/*
-**  If mwData* is NULL:
-**      Returns 0 if heap chain is broken.
-**      Returns 1 if heap chain is intact.
-**  If mwData* is not NULL:
-**      Returns 0 if mwData* is missing or if chain is broken.
-**      Returns 1 if chain is intact and mwData* is found.
-*/
-static int mwIsHeapOK( mwData *includes_mw ) {
-    int found = 0;
-    mwData *mw;
-
-    for( mw = mwHead; mw; mw=mw->next ) {
-        if( includes_mw == mw ) found++;
-        if( !mwIsSafeAddr( mw, mwDataSize ) ) return 0;
-        if( mw->prev ) {
-            if( !mwIsSafeAddr( mw->prev, mwDataSize ) ) return 0;
-            if( mw==mwHead || mw->prev->next != mw ) return 0;
-            }
-        if( mw->next ) {
-            if( !mwIsSafeAddr( mw->next, mwDataSize ) ) return 0;
-            if( mw==mwTail || mw->next->prev != mw ) return 0;
-            }
-        else if( mw!=mwTail ) return 0;
-        }
-
-    if( includes_mw != NULL && !found ) return 0;
-
-    return 1;
-    }
-
-static int mwIsOwned( mwData* mw, const char *file, int line ) {
-    int retv;
-    mwStat *ms;
-
-    /* see if the address is legal according to OS */
-    if( !mwIsSafeAddr( mw, mwDataSize ) ) return 0;
-
-    /* make sure we have _anything_ allocated */
-    if( mwHead == NULL && mwTail == NULL && mwStatCurAlloc == 0 )
-        return 0;
-
-    /* calculate checksum */
-    if( mw->check != CHKVAL(mw) ) {
-        /* may be damaged checksum, see if block is in heap */
-        if( mwIsHeapOK( mw ) ) {
-            /* damaged checksum, repair it */
-            mwWrite( "internal: <%ld> %s(%d), checksum for MW-%p is incorrect\n",
-                mwCounter, file, line, mw );
-            mwIncErr();
-            if( mwIsReadAddr( mw->file, 1 ) ) {
-                ms = mwStatGet( mw->file, -1, 0 );
-                if( ms == NULL ) mw->file = "<relinked>";
-                }
-            else mw->file = "<unknown>";
-            mw->size = 0;
-            mw->check = CHKVAL(mw);
-            return 1;
-            }
-        /* no, it's just some garbage data */
-        return 0;
-        }
-
-	/* check that the non-NULL pointers are safe */
-	if( mw->prev && !mwIsSafeAddr( mw->prev, mwDataSize ) ) mwRelink( mw, file, line );
-	if( mw->next && !mwIsSafeAddr( mw->next, mwDataSize ) ) mwRelink( mw, file, line );
-
-    /* safe address, checksum OK, proceed with heap checks */
-
-    /* see if the block is in the heap */
-    retv = 0;
-    if( mw->prev ) { if( mw->prev->next == mw ) retv ++; }
-    else { if( mwHead == mw ) retv++; }
-    if( mw->next ) { if( mw->next->prev == mw ) retv ++; }
-    else { if( mwTail == mw ) retv++; }
-    if( mw->check == CHKVAL(mw) ) retv ++;
-    if( retv > 2 ) return 1;
-
-    /* block not in heap, check heap for corruption */
-
-    if( !mwIsHeapOK( mw ) ) {
-        if( mwRelink( mw, file, line ) )
-            return 1;
-        }
-
-    /* unable to repair */
-    mwWrite( "internal: <%ld> %s(%d), mwIsOwned fails for MW-%p\n",
-       mwCounter, file, line, mw );
-    mwIncErr();
-
-    return 0;
-    }
-
-/*
-** mwTestBuf:
-**  Checks a buffers links and pre/postfixes.
-**  Writes errors found to the log.
-**  Returns zero if no errors found.
-*/
-static int mwTestBuf( mwData* mw, const char* file, int line ) {
-    int retv = 0;
-    char *p;
-
-    if( file == NULL ) file = "unknown";
-
-    if( !mwIsSafeAddr( mw, mwDataSize + mwOverflowZoneSize ) ) {
-        mwWrite( "internal: <%ld> %s(%d): pointer MW-%p is invalid\n",
-            mwCounter, file, line, mw );
-        mwIncErr();
-        return 2;
-        }
-
-    if( mw->check != CHKVAL(mw) ) {
-        mwWrite( "internal: <%ld> %s(%d), info trashed; relinking\n",
-            mwCounter, file, line );
-        mwIncErr();
-        if( !mwRelink( mw, file, line ) ) return 2;
-        }
-
-    if( mw->prev && mw->prev->next != mw ) {
-        mwWrite( "internal: <%ld> %s(%d), buffer <%ld> %s(%d) link1 broken\n",
-            mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line );
-        mwIncErr();
-        if( !mwRelink( mw, file, line ) ) retv = 2;
-        }
-    if( mw->next && mw->next->prev != mw ) {
-        mwWrite( "internal: <%ld> %s(%d), buffer <%ld> %s(%d) link2 broken\n",
-            mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line );
-        mwIncErr();
-        if( !mwRelink( mw, file, line ) ) retv = 2;
-        }
-
-    p = ((char*)mw) + mwDataSize;
-    if( mwCheckOF( p ) ) {
-        mwWrite( "underflow: <%ld> %s(%d), %ld bytes alloc'd at <%ld> %s(%d)\n",
-            mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line );
-        mwIncErr();
-        retv = 1;
-        }
-    p += mwOverflowZoneSize + mw->size;
-    if( mwIsReadAddr( p, mwOverflowZoneSize ) && mwCheckOF( p ) ) {
-        mwWrite( "overflow: <%ld> %s(%d), %ld bytes alloc'd at <%ld> %s(%d)\n",
-            mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line );
-        mwIncErr();
-        retv = 1;
-        }
-
-    return retv;
-    }
-
-static void mwDefaultOutFunc( int c ) {
-    if( mwLogR() ) fputc( c, mwLogR() );
-    }
-
-static void mwWrite( const char *format, ... ) {
-    int tot, oflow = 0;
-    va_list mark;
-    mwAutoInit();
-    if( mwOutFunction == NULL ) mwOutFunction = mwDefaultOutFunc;
-    va_start( mark, format );
-    tot = vsprintf( mwPrintBuf, format, mark );
-    va_end( mark );
-    if( tot >= MW_TRACE_BUFFER ) { mwPrintBuf[MW_TRACE_BUFFER] = 0; oflow = 1; }
-    for(tot=0;mwPrintBuf[tot];tot++)
-        (*mwOutFunction)( mwPrintBuf[tot] );
-    if( oflow ) {
-        mwWrite( "\ninternal: mwWrite(): WARNING! OUTPUT EXCEEDED %u CHARS: SYSTEM UNSTABLE\n", MW_TRACE_BUFFER-1 );
-        FLUSH();
-        }
-    return;
-    }
-
-static void mwLogFile( const char *name ) {
-    time_t tid;
-    (void) time( &tid );
-    if( mwLogR() != NULL ) {
-        fclose( mwLogR() );
-        mwLogW( NULL );
-        }
-    if( name == NULL ) return;
-    mwLogW( fopen( name, "a" COMMIT ) );
-    if( mwLogR() == NULL )
-        mwWrite( "logfile: failed to open/create file '%s'\n", name );
-    }
-
-/*
-** Try to free NML memory until a contiguous allocation of
-** 'needed' bytes can be satisfied. If this is not enough
-** and the 'urgent' parameter is nonzero, grabbed memory is
-** also freed.
-*/
-static size_t mwFreeUp( size_t needed, int urgent ) {
-    void *p;
-    mwData *mw, *mw2;
-    char *data;
-
-    /* free grabbed NML memory */
-    for(;;) {
-        if( mwDrop_( 1, MW_VAL_NML, 1 ) == 0 ) break;
-        p = malloc( needed );
-        if( p == NULL ) continue;
-        free( p );
-        return needed;
-        }
-
-    /* free normal NML memory */
-    mw = mwHead;
-    while( mw != NULL ) {
-        if( !(mw->flag & MW_NML) ) mw = mw->next;
-        else {
-            data = ((char*)mw)+mwDataSize+mwOverflowZoneSize;
-            if( mwTestMem( data, mw->size, MW_VAL_NML ) ) {
-                mwIncErr();
-                mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n",
-                    mw->count, data + mwOverflowZoneSize, mw->file, mw->line );
-                }
-            mw2 = mw->next;
-            mwUnlink( mw, "mwFreeUp", 0 );
-            free( mw );
-            mw = mw2;
-            p = malloc( needed );
-            if( p == NULL ) continue;
-            free( p );
-            return needed;
-            }
-        }
-
-    /* if not urgent (for internal purposes), fail */
-    if( !urgent ) return 0;
-
-    /* free grabbed memory */
-    for(;;) {
-        if( mwDrop_( 1, MW_VAL_GRB, 1 ) == 0 ) break;
-        p = malloc( needed );
-        if( p == NULL ) continue;
-        free( p );
-        return needed;
-        }
-
-    return 0;
-    }
-
-static const void * mwTestMem( const void *p, unsigned len, int c ) {
-    const unsigned char *ptr;
-    ptr = (const unsigned char *) p;
-    while( len-- ) {
-        if( *ptr != (unsigned char)c ) return (const void*)ptr;
-        ptr ++;
-        }
-    return NULL;
-    }
-
-static int mwStrCmpI( const char *s1, const char *s2 ) {
-    if( s1 == NULL || s2 == NULL ) return 0;
-    while( *s1 ) {
-        if( toupper(*s2) == toupper(*s1) ) { s1++; s2++; continue; }
-        return 1;
-        }
-    return 0;
-    }
-
-#define AIPH() if( always_invoked ) { mwWrite("autocheck: <%ld> %s(%d) ", mwCounter, file, line ); always_invoked = 0; }
-
-static int mwTestNow( const char *file, int line, int always_invoked ) {
-    int retv = 0;
-    mwData *mw;
-    char *data;
-
-    if( file && !always_invoked )
-        mwWrite("check: <%ld> %s(%d), checking %s%s%s\n",
-            mwCounter, file, line,
-			(mwTestFlags & MW_TEST_CHAIN) ? "chain ": "",
-		    (mwTestFlags & MW_TEST_ALLOC) ? "alloc ": "",
-		    (mwTestFlags & MW_TEST_NML) ? "nomansland ": ""
-			);
-
-    if( mwTestFlags & MW_TEST_CHAIN ) {
-        for( mw = mwHead; mw; mw=mw->next ) {
-			if( !mwIsSafeAddr(mw, mwDataSize) ) {
-				AIPH();
-				mwWrite("check: heap corruption detected\n");
-				mwIncErr();
-				return retv + 1;
-				}
-			if( mw->prev ) {
-				if( !mwIsSafeAddr(mw->prev, mwDataSize) ) {
-					AIPH();
-					mwWrite("check: heap corruption detected\n");
-					mwIncErr();
-					return retv + 1;
-					}
-				if( mw==mwHead || mw->prev->next != mw ) {
-					AIPH();
-					mwWrite("check: heap chain broken, prev link incorrect\n");
-					mwIncErr();
-					retv ++;
-					}
-				}
-			if( mw->next ) {
-				if( !mwIsSafeAddr(mw->next, mwDataSize) ) {
-					AIPH();
-					mwWrite("check: heap corruption detected\n");
-					mwIncErr();
-					return retv + 1;
-					}
-				if( mw==mwTail || mw->next->prev != mw ) {
-					AIPH();
-					mwWrite("check: heap chain broken, next link incorrect\n");
-					mwIncErr();
-					retv ++;
-					}
-				}
-			else if( mw!=mwTail ) {
-				AIPH();
-				mwWrite("check: heap chain broken, tail incorrect\n");
-				mwIncErr();
-				retv ++;
-				}
-            }
-        }
-    if( mwTestFlags & MW_TEST_ALLOC ) {
-        for( mw = mwHead; mw; mw=mw->next ) {
-            if( mwTestBuf( mw, file, line ) ) retv ++;
-            }
-        }
-    if( mwTestFlags & MW_TEST_NML ) {
-        for( mw = mwHead; mw; mw=mw->next ) {
-            if( (mw->flag & MW_NML) ) {
-                data = ((char*)mw)+mwDataSize+mwOverflowZoneSize;
-                if( mwTestMem( data, mw->size, MW_VAL_NML ) ) {
-                    mwIncErr();
-                    mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n",
-                        mw->count, data + mwOverflowZoneSize, mw->file, mw->line );
-                    }
-                }
-            }
-        }
-
-
-	if( file && !always_invoked && !retv )
-        mwWrite("check: <%ld> %s(%d), complete; no errors\n",
-            mwCounter, file, line );
-    return retv;
-    }
-
-/**********************************************************************
-** Statistics
-**********************************************************************/
-
-static void mwStatReport()
-{
-    mwStat* ms, *ms2;
-    const char *modname;
-    int modnamelen;
-
-    /* global statistics report */
-    mwWrite( "\nMemory usage statistics (global):\n" );
-    mwWrite( " N)amber of allocations made: %ld\n", mwStatNumAlloc );
-    mwWrite( " L)argest memory usage      : %ld\n", mwStatMaxAlloc );
-    mwWrite( " T)otal of all alloc() calls: %ld\n", mwStatTotAlloc );
-    mwWrite( " U)nfreed bytes totals      : %ld\n", mwStatCurAlloc );
-    FLUSH();
-
-    if( mwStatLevel < 1 ) return;
-
-    /* on a per-module basis */
-    mwWrite( "\nMemory usage statistics (detailed):\n");
-    mwWrite( " Module/Line                                Number   Largest  Total    Unfreed \n");
-    for( ms=mwStatList; ms; ms=ms->next )
-    {
-        if( ms->line == -1 )
-        {
-			if( ms->file == NULL || !mwIsReadAddr(ms->file,22) ) modname = "<unknown>";
-			else modname = ms->file;
-			modnamelen = strlen(modname);
-			if( modnamelen > 42 )
-			{
-				modname = modname + modnamelen - 42;
-			}
-
-            mwWrite(" %-42s %-8ld %-8ld %-8ld %-8ld\n",
-            	modname, ms->num, ms->max, ms->total, ms->curr );
-            if( ms->file && mwStatLevel > 1 )
-            {
-                for( ms2=mwStatList; ms2; ms2=ms2->next )
-                {
-                    if( ms2->line!=-1 && ms2->file!=NULL && !mwStrCmpI( ms2->file, ms->file ) )
-					{
-					mwWrite( "  %-8d                                  %-8ld %-8ld %-8ld %-8ld\n",
-						ms2->line, ms2->num, ms2->max, ms2->total, ms2->curr );
-					}
-				}
-			}
-		}
-	}
-}
-
-static mwStat* mwStatGet( const char *file, int line, int makenew ) {
-    mwStat* ms;
-
-    if( mwStatLevel < 2 ) line = -1;
-
-    for( ms=mwStatList; ms!=NULL; ms=ms->next ) {
-        if( line != ms->line ) continue;
-        if( file==NULL ) {
-            if( ms->file == NULL ) break;
-            continue;
-            }
-        if( ms->file == NULL ) continue;
-        if( !strcmp( ms->file, file ) ) break;
-        }
-
-    if( ms != NULL ) return ms;
-
-    if( !makenew ) return NULL;
-
-    ms = (mwStat*) malloc( sizeof(mwStat) );
-    if( ms == NULL ) {
-        if( mwFreeUp( sizeof(mwStat), 0 ) < sizeof(mwStat) ||
-            (ms=(mwStat*)malloc(sizeof(mwStat))) == NULL ) {
-            mwWrite("internal: memory low, statistics incomplete for '%s'\n", file );
-            return NULL;
-            }
-        }
-    ms->file = file;
-    ms->line = line;
-    ms->total = 0L;
-    ms->max = 0L;
-    ms->num = 0L;
-    ms->curr = 0L;
-    ms->next = mwStatList;
-    mwStatList = ms;
-    return ms;
-    }
-
-static void mwStatAlloc( size_t size, const char* file, int line ) {
-    mwStat* ms;
-
-    /* update the module statistics */
-    ms = mwStatGet( file, -1, 1 );
-    if( ms != NULL ) {
-        ms->total += (long) size;
-        ms->curr += (long) size;
-        ms->num ++;
-        if( ms->curr > ms->max ) ms->max = ms->curr;
-        }
-
-    /* update the line statistics */
-    if( mwStatLevel > 1 && line != -1 && file ) {
-        ms = mwStatGet( file, line, 1 );
-        if( ms != NULL ) {
-            ms->total += (long) size;
-            ms->curr += (long) size;
-            ms->num ++;
-            if( ms->curr > ms->max ) ms->max = ms->curr;
-            }
-        }
-
-    }
-
-static void mwStatFree( size_t size, const char* file, int line ) {
-    mwStat* ms;
-
-    /* update the module statistics */
-    ms = mwStatGet( file, -1, 1 );
-    if( ms != NULL ) ms->curr -= (long) size;
-
-    /* update the line statistics */
-    if( mwStatLevel > 1 && line != -1 && file ) {
-        ms = mwStatGet( file, line, 1 );
-        if( ms != NULL ) ms->curr -= (long) size;
-        }
-    }
-
-/***********************************************************************
-** Safe memory checkers
-**
-** Using ifdefs, implement the operating-system specific mechanism
-** of identifying a piece of memory as legal to access with read
-** and write priviliges. Default: return nonzero for non-NULL pointers.
-***********************************************************************/
-
-static char mwDummy( char c )
-{
-	return c;
-}
-
-#ifndef MW_SAFEADDR
-#ifdef WIN32
-#define MW_SAFEADDR
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-int mwIsReadAddr( const void *p, unsigned len )
-{
-    if( p == NULL ) return 0;
-    if( IsBadReadPtr(p,len) ) return 0;
-    return 1;
-}
-int mwIsSafeAddr( void *p, unsigned len )
-{
-    /* NOTE: For some reason, under Win95 the IsBad... */
-    /* can return false for invalid pointers. */
-    if( p == NULL ) return 0;
-    if( IsBadReadPtr(p,len) || IsBadWritePtr(p,len) ) return 0;
-    return 1;
-}
-#endif /* WIN32 */
-#endif /* MW_SAFEADDR */
-
-#ifndef MW_SAFEADDR
-#ifdef SIGSEGV
-#define MW_SAFEADDR
-
-typedef void (*mwSignalHandlerPtr)( int );
-mwSignalHandlerPtr mwOldSIGSEGV = (mwSignalHandlerPtr) 0;
-jmp_buf mwSIGSEGVjump;
-static void mwSIGSEGV( int n );
-
-static void mwSIGSEGV( int n )
-{
-	n = n;
-	longjmp( mwSIGSEGVjump, 1 );
-}
-
-int mwIsReadAddr( const void *p, unsigned len )
-{
-	const char *ptr;
-
-    if( p == NULL ) return 0;
-	if( !len ) return 1;
-
-	/* set up to catch the SIGSEGV signal */
-	mwOldSIGSEGV = signal( SIGSEGV, mwSIGSEGV );
-
-	if( setjmp( mwSIGSEGVjump ) )
-	{
-		signal( SIGSEGV, mwOldSIGSEGV );
-		return 0;
-	}
-
-	/* read all the bytes in the range */
-	ptr = (const char *)p;
-	ptr += len;
-
-	/* the reason for this rather strange construct is that */
-	/* we want to keep the number of used parameters and locals */
-	/* to a minimum. if we use len for a counter gcc will complain */
-	/* it may get clobbered by longjmp() at high warning levels. */
-	/* it's a harmless warning, but this way we don't have to see it. */
-	do
-	{
-		ptr --;
-		if( *ptr == 0x7C ) (void) mwDummy( (char)0 );
-	} while( (const void*) ptr != p );
-
-	/* remove the handler */
-	signal( SIGSEGV, mwOldSIGSEGV );
-
-    return 1;
-}
-int mwIsSafeAddr( void *p, unsigned len )
-{
-	char *ptr;
-
-	if( p == NULL ) return 0;
-	if( !len ) return 1;
-
-	/* set up to catch the SIGSEGV signal */
-	mwOldSIGSEGV = signal( SIGSEGV, mwSIGSEGV );
-
-	if( setjmp( mwSIGSEGVjump ) )
-	{
-		signal( SIGSEGV, mwOldSIGSEGV );
-		return 0;
-	}
-
-	/* read and write-back all the bytes in the range */
-	ptr = (char *)p;
-	ptr += len;
-
-	/* the reason for this rather strange construct is that */
-	/* we want to keep the number of used parameters and locals */
-	/* to a minimum. if we use len for a counter gcc will complain */
-	/* it may get clobbered by longjmp() at high warning levels. */
-	/* it's a harmless warning, but this way we don't have to see it. */
-	do
-	{
-		ptr --;
-		*ptr = mwDummy( *ptr );
-	} while( (void*) ptr != p );
-
-	/* remove the handler */
-	signal( SIGSEGV, mwOldSIGSEGV );
-
-    return 1;
-}
-#endif /* SIGSEGV */
-#endif /* MW_SAFEADDR */
-
-#ifndef MW_SAFEADDR
-int mwIsReadAddr( const void *p, unsigned len )
-{
-    if( p == NULL ) return 0;
-    if( len == 0 ) return 1;
-    return 1;
-}
-int mwIsSafeAddr( void *p, unsigned len )
-{
-    if( p == NULL ) return 0;
-    if( len == 0 ) return 1;
-    return 1;
-}
-#endif
-
-/**********************************************************************
-** Mutex handling
-**********************************************************************/
-
-#if defined(WIN32) || defined(__WIN32__)
-
-static void	mwMutexInit( void )
-{
-	mwGlobalMutex = CreateMutex( NULL, FALSE, NULL);
-	return;
-}
-
-static void	mwMutexTerm( void )
-{
-	CloseHandle( mwGlobalMutex );
-	return;
-}
-
-static void	mwMutexLock( void )
-{
-	if( WaitForSingleObject(mwGlobalMutex, 1000 ) == WAIT_TIMEOUT )
-	{
-		mwWrite( "mwMutexLock: timed out, possible deadlock\n" );
-	}
-	return;
-}
-
-static void	mwMutexUnlock( void )
-{
-	ReleaseMutex( mwGlobalMutex );
-	return;
-}
-
-#endif
-
-#if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H)
-
-static void	mwMutexInit( void )
-{
-	pthread_mutex_init( &mwGlobalMutex, NULL );
-	return;
-}
-
-static void	mwMutexTerm( void )
-{
-	pthread_mutex_destroy( &mwGlobalMutex );
-	return;
-}
-
-static void	mwMutexLock( void )
-{
-	pthread_mutex_lock(&mwGlobalMutex);
-	return;
-}
-
-static void	mwMutexUnlock( void )
-{
-	pthread_mutex_unlock(&mwGlobalMutex);
-	return;
-}
-
-#endif
-
-/**********************************************************************
-** C++ new & delete
-**********************************************************************/
-
-#if 0 /* 980317: disabled C++ */
-
-#ifdef __cplusplus
-#ifndef MEMWATCH_NOCPP
-
-int mwNCur = 0;
-const char *mwNFile = NULL;
-int mwNLine = 0;
-
-class MemWatch {
-public:
-    MemWatch();
-    ~MemWatch();
-    };
-
-MemWatch::MemWatch() {
-    if( mwInited ) return;
-    mwUseAtexit = 0;
-    mwInit();
-    }
-
-MemWatch::~MemWatch() {
-    if( mwUseAtexit ) return;
-    mwTerm();
-    }
-
-/*
-** This global new will catch all 'new' calls where MEMWATCH is
-** not active.
-*/
-void* operator new( unsigned size ) {
-    mwNCur = 0;
-    return mwMalloc( size, "<unknown>", 0 );
-    }
-
-/*
-** This is the new operator that's called when a module uses mwNew.
-*/
-void* operator new( unsigned size, const char *file, int line ) {
-    mwNCur = 0;
-    return mwMalloc( size, file, line );
-    }
-
-/*
-** This is the new operator that's called when a module uses mwNew[].
-** -- hjc 07/16/02
-*/
-void* operator new[] ( unsigned size, const char *file, int line ) {
-    mwNCur = 0;
-    return mwMalloc( size, file, line );
-    }
-
-/*
-** Since this delete operator will recieve ALL delete's
-** even those from within libraries, we must accept
-** delete's before we've been initialized. Nor can we
-** reliably check for wild free's if the mwNCur variable
-** is not set.
-*/
-void operator delete( void *p ) {
-    if( p == NULL ) return;
-    if( !mwInited ) {
-        free( p );
-        return;
-        }
-    if( mwNCur ) {
-        mwFree( p, mwNFile, mwNLine );
-        mwNCur = 0;
-        return;
-        }
-    mwFree_( p );
-    }
-
-void operator delete[]( void *p ) {
-    if( p == NULL ) return;
-    if( !mwInited ) {
-        free( p );
-        return;
-        }
-    if( mwNCur ) {
-        mwFree( p, mwNFile, mwNLine );
-        mwNCur = 0;
-        return;
-        }
-    mwFree_( p );
-    }
-
-#endif /* MEMWATCH_NOCPP */
-#endif /* __cplusplus */
-
-#endif /* 980317: disabled C++ */
-
-/* MEMWATCH.C */
diff --git a/memwatch.h b/memwatch.h
deleted file mode 100644
index d63fd76..0000000
--- a/memwatch.h
+++ /dev/null
@@ -1,707 +0,0 @@
-/*
-** MEMWATCH.H
-** Nonintrusive ANSI C memory leak / overwrite detection
-** Copyright (C) 1992-2002 Johan Lindh
-** All rights reserved.
-** Version 2.71
-**
-************************************************************************
-**
-** PURPOSE:
-**
-**  MEMWATCH has been written to allow guys and gals that like to
-**  program in C a public-domain memory error control product.
-**  I hope you'll find it's as advanced as most commercial packages.
-**  The idea is that you use it during the development phase and
-**  then remove the MEMWATCH define to produce your final product.
-**  MEMWATCH is distributed in source code form in order to allow
-**  you to compile it for your platform with your own compiler.
-**  It's aim is to be 100% ANSI C, but some compilers are more stingy
-**  than others. If it doesn't compile without warnings, please mail
-**  me the configuration of operating system and compiler you are using
-**  along with a description of how to modify the source, and the version
-**  number of MEMWATCH that you are using.
-**
-************************************************************************
-
-	This file is part of MEMWATCH.
-
-    MEMWATCH is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    MEMWATCH is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with MEMWATCH; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-************************************************************************
-**
-** REVISION HISTORY:
-**
-** 920810 JLI   [1.00]
-** 920830 JLI   [1.10 double-free detection]
-** 920912 JLI   [1.15 mwPuts, mwGrab/Drop, mwLimit]
-** 921022 JLI   [1.20 ASSERT and VERIFY]
-** 921105 JLI   [1.30 C++ support and TRACE]
-** 921116 JLI   [1.40 mwSetOutFunc]
-** 930215 JLI   [1.50 modified ASSERT/VERIFY]
-** 930327 JLI   [1.51 better auto-init & PC-lint support]
-** 930506 JLI   [1.55 MemWatch class, improved C++ support]
-** 930507 JLI   [1.60 mwTest & CHECK()]
-** 930809 JLI   [1.65 Abort/Retry/Ignore]
-** 930820 JLI   [1.70 data dump when unfreed]
-** 931016 JLI   [1.72 modified C++ new/delete handling]
-** 931108 JLI   [1.77 mwSetAssertAction() & some small changes]
-** 940110 JLI   [1.80 no-mans-land alloc/checking]
-** 940328 JLI   [2.00 version 2.0 rewrite]
-**              Improved NML (no-mans-land) support.
-**              Improved performance (especially for free()ing!).
-**              Support for 'read-only' buffers (checksums)
-**              ^^ NOTE: I never did this... maybe I should?
-**              FBI (free'd block info) tagged before freed blocks
-**              Exporting of the mwCounter variable
-**              mwBreakOut() localizes debugger support
-**              Allocation statistics (global, per-module, per-line)
-**              Self-repair ability with relinking
-** 950913 JLI   [2.10 improved garbage handling]
-** 951201 JLI   [2.11 improved auto-free in emergencies]
-** 960125 JLI   [X.01 implemented auto-checking using mwAutoCheck()]
-** 960514 JLI   [2.12 undefining of existing macros]
-** 960515 JLI   [2.13 possibility to use default new() & delete()]
-** 960516 JLI   [2.20 suppression of file flushing on unfreed msgs]
-** 960516 JLI   [2.21 better support for using MEMWATCH with DLL's]
-** 960710 JLI   [X.02 multiple logs and mwFlushNow()]
-** 960801 JLI   [2.22 merged X.01 version with current]
-** 960805 JLI   [2.30 mwIsXXXXAddr() to avoid unneeded GP's]
-** 960805 JLI   [2.31 merged X.02 version with current]
-** 961002 JLI   [2.32 support for realloc() + fixed STDERR bug]
-** 961222 JLI   [2.40 added mwMark() & mwUnmark()]
-** 970101 JLI   [2.41 added over/underflow checking after failed ASSERT/VERIFY]
-** 970113 JLI   [2.42 added support for PC-Lint 7.00g]
-** 970207 JLI   [2.43 added support for strdup()]
-** 970209 JLI   [2.44 changed default filename to lowercase]
-** 970405 JLI   [2.45 fixed bug related with atexit() and some C++ compilers]
-** 970723 JLI   [2.46 added MW_ARI_NULLREAD flag]
-** 970813 JLI   [2.47 stabilized marker handling]
-** 980317 JLI   [2.48 ripped out C++ support; wasn't working good anyway]
-** 980318 JLI   [2.50 improved self-repair facilities & SIGSEGV support]
-** 980417 JLI	[2.51 more checks for invalid addresses]
-** 980512 JLI	[2.52 moved MW_ARI_NULLREAD to occur before aborting]
-** 990112 JLI	[2.53 added check for empty heap to mwIsOwned]
-** 990217 JLI	[2.55 improved the emergency repairs diagnostics and NML]
-** 990224 JLI	[2.56 changed ordering of members in structures]
-** 990303 JLI	[2.57 first maybe-fixit-for-hpux test]
-** 990516 JLI	[2.58 added 'static' to the definition of mwAutoInit]
-** 990517 JLI	[2.59 fixed some high-sensitivity warnings]
-** 990610 JLI	[2.60 fixed some more high-sensitivity warnings]
-** 990715 JLI	[2.61 changed TRACE/ASSERT/VERIFY macro names]
-** 991001 JLI	[2.62 added CHECK_BUFFER() and mwTestBuffer()]
-** 991007 JLI	[2.63 first shot at a 64-bit compatible version]
-** 991009 JLI	[2.64 undef's strdup() if defined, mwStrdup made const]
-** 000704 JLI	[2.65 added some more detection for 64-bits]
-** 010502 JLI   [2.66 incorporated some user fixes]
-**              [mwRelink() could print out garbage pointer (thanks mac at phobos.ca)]
-**				[added array destructor for C++ (thanks rdasilva at connecttel.com)]
-**				[added mutex support (thanks rdasilva at connecttel.com)]
-** 010531 JLI	[2.67 fix: mwMutexXXX() was declared even if MW_HAVE_MUTEX was not defined]
-** 010619 JLI	[2.68 fix: mwRealloc() could leave the mutex locked]
-** 020918 JLI	[2.69 changed to GPL, added C++ array allocation by Howard Cohen]
-** 030212 JLI	[2.70 mwMalloc() bug for very large allocations (4GB on 32bits)]
-** 030520 JLI	[2.71 added ULONG_LONG_MAX as a 64-bit detector (thanks Sami Salonen)]
-**
-** To use, simply include 'MEMWATCH.H' as a header file,
-** and add MEMWATCH.C to your list of files, and define the macro
-** 'MEMWATCH'. If this is not defined, MEMWATCH will disable itself.
-**
-** To call the standard C malloc / realloc / calloc / free; use mwMalloc_(),
-** mwCalloc_() and mwFree_(). Note that mwFree_() will correctly
-** free both malloc()'d memory as well as mwMalloc()'d.
-**
-** 980317: C++ support has been disabled.
-**         The code remains, but is not compiled.
-**
-**         For use with C++, which allows use of inlining in header files
-**         and class specific new/delete, you must also define 'new' as
-**         'mwNew' and 'delete' as 'mwDelete'. Do this *after* you include
-**         C++ header files from libraries, otherwise you can mess up their
-**         class definitions. If you don't define these, the C++ allocations
-**         will not have source file and line number information. Also note,
-**         most C++ class libraries implement their own C++ memory management,
-**         and don't allow anyone to override them. MFC belongs to this crew.
-**         In these cases, the only thing to do is to use MEMWATCH_NOCPP.
-**
-** You can capture output from MEMWATCH using mwSetOutFunc().
-** Just give it the adress of a "void myOutFunc(int c)" function,
-** and all characters to be output will be redirected there.
-**
-** A failing ASSERT() or VERIFY() will normally always abort your
-** program. This can be changed using mwSetAriFunc(). Give it a
-** pointer to a "int myAriFunc(const char *)" function. Your function
-** must ask the user whether to Abort, Retry or Ignore the trap.
-** Return 2 to Abort, 1 to Retry or 0 to Ignore. Beware retry; it
-** causes the expression to be evaluated again! MEMWATCH has a
-** default ARI handler. It's disabled by default, but you can enable
-** it by calling 'mwDefaultAri()'. Note that this will STILL abort
-** your program unless you define MEMWATCH_STDIO to allow MEMWATCH
-** to use the standard C I/O streams. Also, setting the ARI function
-** will cause MEMWATCH *NOT* to write the ARI error to stderr. The
-** error string is passed to the ARI function instead, as the
-** 'const char *' parameter.
-**
-** You can disable MEMWATCH's ASSERT/VERIFY and/or TRACE implementations.
-** This can be useful if you're using a debug terminal or smart debugger.
-** Disable them by defining MW_NOASSERT, MW_NOVERIFY or MW_NOTRACE.
-**
-** MEMWATCH fills all allocated memory with the byte 0xFE, so if
-** you're looking at erroneous data which are all 0xFE:s, the
-** data probably was not initialized by you. The exception is
-** calloc(), which will fill with zero's. All freed buffers are
-** zapped with 0xFD. If this is what you look at, you're using
-** data that has been freed. If this is the case, be aware that
-** MEMWATCH places a 'free'd block info' structure immediately
-** before the freed data. This block contains info about where
-** the block was freed. The information is in readable text,
-** in the format "FBI<counter>filename(line)", for example:
-** "FBI<267>test.c(12)". Using FBI's slows down free(), so it's
-** disabled by default. Use mwFreeBufferInfo(1) to enable it.
-**
-** To aid in tracking down wild pointer writes, MEMWATCH can perform
-** no-mans-land allocations. No-mans-land will contain the byte 0xFC.
-** MEMWATCH will, when this is enabled, convert recently free'd memory
-** into NML allocations.
-**
-** MEMWATCH protects it's own data buffers with checksums. If you
-** get an internal error, it means you're overwriting wildly,
-** or using an uninitialized pointer.
-**
-************************************************************************
-**
-** Note when compiling with Microsoft C:
-**  -   MSC ignores fflush() by default. This is overridden, so that
-**      the disk log will always be current.
-**
-** This utility has been tested with:
-**  PC-lint 7.0k, passed as 100% ANSI C compatible
-**  Microsoft Visual C++ on Win16 and Win32
-**  Microsoft C on DOS
-**  SAS C on an Amiga 500
-**  Gnu C on a PC running Red Hat Linux
-**  ...and using an (to me) unknown compiler on an Atari machine.
-**
-************************************************************************
-**
-** Format of error messages in MEMWATCH.LOG:
-**  message: <sequence-number> filename(linenumber), information
-**
-** Errors caught by MemWatch, when they are detected, and any
-** actions taken besides writing to the log file MEMWATCH.LOG:
-**
-**  Double-freeing:
-**      A pointer that was recently freed and has not since been
-**      reused was freed again. The place where the previous free()
-**      was executed is displayed.
-**      Detect: delete or free() using the offending pointer.
-**      Action: The delete or free() is cancelled, execution continues.
-**  Underflow:
-**      You have written just ahead of the allocated memory.
-**      The size and place of the allocation is displayed.
-**      Detect: delete or free() of the damaged buffer.
-**      Action: The buffer is freed, but there may be secondary damage.
-**  Overflow:
-**      Like underflow, but you've written after the end of the buffer.
-**      Detect: see Underflow.
-**      Action: see Underflow.
-**  WILD free:
-**      An unrecognized pointer was passed to delete or free().
-**      The pointer may have been returned from a library function;
-**      in that case, use mwFree_() to force free() of it.
-**      Also, this may be a double-free, but the previous free was
-**      too long ago, causing MEMWATCH to 'forget' it.
-**      Detect: delete or free() of the offending pointer.
-**      Action: The delete or free() is cancelled, execution continues.
-**  NULL free:
-**      It's unclear to me whether or not freeing of NULL pointers
-**      is legal in ANSI C, therefore a warning is written to the log file,
-**      but the error counter remains the same. This is legal using C++,
-**      so the warning does not appear with delete.
-**      Detect: When you free(NULL).
-**      Action: The free() is cancelled.
-**  Failed:
-**      A request to allocate memory failed. If the allocation is
-**      small, this may be due to memory depletion, but is more likely
-**      to be memory fragmentation problems. The amount of memory
-**      allocated so far is displayed also.
-**      Detect: When you new, malloc(), realloc() or calloc() memory.
-**      Action: NULL is returned.
-**  Realloc:
-**      A request to re-allocate a memory buffer failed for reasons
-**      other than out-of-memory. The specific reason is shown.
-**      Detect: When you realloc()
-**      Action: realloc() is cancelled, NULL is returned
-**  Limit fail:
-**      A request to allocate memory failed since it would violate
-**      the limit set using mwLimit(). mwLimit() is used to stress-test
-**      your code under simulated low memory conditions.
-**      Detect: At new, malloc(), realloc() or calloc().
-**      Action: NULL is returned.
-**  Assert trap:
-**      An ASSERT() failed. The ASSERT() macro works like C's assert()
-**      macro/function, except that it's interactive. See your C manual.
-**      Detect: On the ASSERT().
-**      Action: Program ends with an advisory message to stderr, OR
-**              Program writes the ASSERT to the log and continues, OR
-**              Program asks Abort/Retry/Ignore? and takes that action.
-**  Verify trap:
-**      A VERIFY() failed. The VERIFY() macro works like ASSERT(),
-**      but if MEMWATCH is not defined, it still evaluates the
-**      expression, but it does not act upon the result.
-**      Detect: On the VERIFY().
-**      Action: Program ends with an advisory message to stderr, OR
-**              Program writes the VERIFY to the log and continues, OR
-**              Program asks Abort/Retry/Ignore? and takes that action.
-**  Wild pointer:
-**      A no-mans-land buffer has been written into. MEMWATCH can
-**      allocate and distribute chunks of memory solely for the
-**      purpose of trying to catch random writes into memory.
-**      Detect: Always on CHECK(), but can be detected in several places.
-**      Action: The error is logged, and if an ARI handler is installed,
-**              it is executed, otherwise, execution continues.
-**  Unfreed:
-**      A memory buffer you allocated has not been freed.
-**      You are informed where it was allocated, and whether any
-**      over or underflow has occured. MemWatch also displays up to
-**      16 bytes of the data, as much as it can, in hex and text.
-**      Detect: When MemWatch terminates.
-**      Action: The buffer is freed.
-**  Check:
-**      An error was detected during a CHECK() operation.
-**      The associated pointer is displayed along with
-**      the file and line where the CHECK() was executed.
-**      Followed immediately by a normal error message.
-**      Detect: When you CHECK()
-**      Action: Depends on the error
-**  Relink:
-**      After a MEMWATCH internal control block has been trashed,
-**      MEMWATCH tries to repair the damage. If successful, program
-**      execution will continue instead of aborting. Some information
-**      about the block may be gone permanently, though.
-**      Detect: N/A
-**      Action: Relink successful: program continues.
-**              Relink fails: program aborts.
-**  Internal:
-**      An internal error is flagged by MEMWATCH when it's control
-**      structures have been damaged. You are likely using an uninitialized
-**      pointer somewhere in your program, or are zapping memory all over.
-**      The message may give you additional diagnostic information.
-**      If possible, MEMWATCH will recover and continue execution.
-**      Detect: Various actions.
-**      Action: Whatever is needed
-**  Mark:
-**      The program terminated without umarking all marked pointers. Marking
-**      can be used to track resources other than memory. mwMark(pointer,text,...)
-**      when the resource is allocated, and mwUnmark(pointer) when it's freed.
-**      The 'text' is displayed for still marked pointers when the program
-**      ends.
-**      Detect: When MemWatch terminates.
-**      Action: The error is logged.
-**
-**
-************************************************************************
-**
-**  The author may be reached by e-mail at the address below. If you
-**  mail me about source code changes in MEMWATCH, remember to include
-**  MW's version number.
-**
-**      Johan Lindh
-**      johan at linkdata.se
-**
-** The latest version of MEMWATCH may be downloaded from
-** http://www.linkdata.se/
-*/
-
-#ifndef __MEMWATCH_H
-#define __MEMWATCH_H
-
-/* Make sure that malloc(), realloc(), calloc() and free() are declared. */
-/*lint -save -e537 */
-#include <stdlib.h>
-/*lint -restore */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
-** Constants used
-**  All MEMWATCH constants start with the prefix MW_, followed by
-**  a short mnemonic which indicates where the constant is used,
-**  followed by a descriptive text about it.
-*/
-
-#define MW_ARI_NULLREAD 0x10    /* Null read (to start debugger) */
-#define MW_ARI_ABORT    0x04    /* ARI handler says: abort program! */
-#define MW_ARI_RETRY    0x02    /* ARI handler says: retry action! */
-#define MW_ARI_IGNORE   0x01    /* ARI handler says: ignore error! */
-
-#define MW_VAL_NEW      0xFE    /* value in newly allocated memory */
-#define MW_VAL_DEL      0xFD    /* value in newly deleted memory */
-#define MW_VAL_NML      0xFC    /* value in no-mans-land */
-#define MW_VAL_GRB      0xFB    /* value in grabbed memory */
-
-#define MW_TEST_ALL     0xFFFF  /* perform all tests */
-#define MW_TEST_CHAIN   0x0001  /* walk the heap chain */
-#define MW_TEST_ALLOC   0x0002  /* test allocations & NML guards */
-#define MW_TEST_NML     0x0004  /* test all-NML areas for modifications */
-
-#define MW_NML_NONE     0       /* no NML */
-#define MW_NML_FREE     1       /* turn FREE'd memory into NML */
-#define MW_NML_ALL      2       /* all unused memory is NML */
-#define MW_NML_DEFAULT  0       /* the default NML setting */
-
-#define MW_STAT_GLOBAL  0       /* only global statistics collected */
-#define MW_STAT_MODULE  1       /* collect statistics on a module basis */
-#define MW_STAT_LINE    2       /* collect statistics on a line basis */
-#define MW_STAT_DEFAULT 0       /* the default statistics setting */
-
-/*
-** MemWatch internal constants
-**  You may change these and recompile MemWatch to change the limits
-**  of some parameters. Respect the recommended minimums!
-*/
-#define MW_TRACE_BUFFER 2048    /* (min 160) size of TRACE()'s output buffer */
-#define MW_FREE_LIST    64      /* (min 4) number of free()'s to track */
-
-/*
-** Exported variables
-**  In case you have to remove the 'const' keyword because your compiler
-**  doesn't support it, be aware that changing the values may cause
-**  unpredictable behaviour.
-**  - mwCounter contains the current action count. You can use this to
-**      place breakpoints using a debugger, if you want.
-*/
-#ifndef __MEMWATCH_C
-extern const unsigned long mwCounter;
-#endif
-
-/*
-** System functions
-**  Normally, it is not nessecary to call any of these. MEMWATCH will
-**  automatically initialize itself on the first MEMWATCH function call,
-**  and set up a call to mwAbort() using atexit(). Some C++ implementations
-**  run the atexit() chain before the program has terminated, so you
-**  may have to use mwInit() or the MemWatch C++ class to get good
-**  behaviour.
-**  - mwInit() can be called to disable the atexit() usage. If mwInit()
-**      is called directly, you must call mwTerm() to end MemWatch, or
-**      mwAbort().
-**  - mwTerm() is usually not nessecary to call; but if called, it will
-**      call mwAbort() if it finds that it is cancelling the 'topmost'
-**      mwInit() call.
-**  - mwAbort() cleans up after MEMWATCH, reports unfreed buffers, etc.
-*/
-void  mwInit( void );
-void  mwTerm( void );
-void  mwAbort( void );
-
-/*
-** Setup functions
-**  These functions control the operation of MEMWATCH's protective features.
-**  - mwFlushNow() causes MEMWATCH to flush it's buffers.
-**  - mwDoFlush() controls whether MEMWATCH flushes the disk buffers after
-**      writes. The default is smart flushing: MEMWATCH will not flush buffers
-**      explicitly until memory errors are detected. Then, all writes are
-**      flushed until program end or mwDoFlush(0) is called.
-**  - mwLimit() sets the allocation limit, an arbitrary limit on how much
-**      memory your program may allocate in bytes. Used to stress-test app.
-**      Also, in virtual-memory or multitasking environs, puts a limit on
-**      how much MW_NML_ALL can eat up.
-**  - mwGrab() grabs up X kilobytes of memory. Allocates actual memory,
-**      can be used to stress test app & OS both.
-**  - mwDrop() drops X kilobytes of grabbed memory.
-**  - mwNoMansLand() sets the behaviour of the NML logic. See the
-**      MW_NML_xxx for more information. The default is MW_NML_DEFAULT.
-**  - mwStatistics() sets the behaviour of the statistics collector. See
-**      the MW_STAT_xxx defines for more information. Default MW_STAT_DEFAULT.
-**  - mwFreeBufferInfo() enables or disables the tagging of free'd buffers
-**      with freeing information. This information is written in text form,
-**      using sprintf(), so it's pretty slow. Disabled by default.
-**  - mwAutoCheck() performs a CHECK() operation whenever a MemWatch function
-**      is used. Slows down performance, of course.
-**  - mwCalcCheck() calculates checksums for all data buffers. Slow!
-**  - mwDumpCheck() logs buffers where stored & calc'd checksums differ. Slow!!
-**  - mwMark() sets a generic marker. Returns the pointer given.
-**  - mwUnmark() removes a generic marker. If, at the end of execution, some
-**      markers are still in existence, these will be reported as leakage.
-**      returns the pointer given.
-*/
-void        mwFlushNow( void );
-void        mwDoFlush( int onoff );
-void        mwLimit( long bytes );
-unsigned    mwGrab( unsigned kilobytes );
-unsigned    mwDrop( unsigned kilobytes );
-void        mwNoMansLand( int mw_nml_level );
-void        mwStatistics( int level );
-void        mwFreeBufferInfo( int onoff );
-void        mwAutoCheck( int onoff );
-void        mwCalcCheck( void );
-void        mwDumpCheck( void );
-void *      mwMark( void *p, const char *description, const char *file, unsigned line );
-void *      mwUnmark( void *p, const char *file, unsigned line );
-
-/*
-** Testing/verification/tracing
-**  All of these macros except VERIFY() evaluates to a null statement
-**  if MEMWATCH is not defined during compilation.
-**  - mwIsReadAddr() checks a memory area for read privilige.
-**  - mwIsSafeAddr() checks a memory area for both read & write privilige.
-**      This function and mwIsReadAddr() is highly system-specific and
-**      may not be implemented. If this is the case, they will default
-**      to returning nonzero for any non-NULL pointer.
-**  - CHECK() does a complete memory integrity test. Slow!
-**  - CHECK_THIS() checks only selected components.
-**  - CHECK_BUFFER() checks the indicated buffer for errors.
-**  - mwASSERT() or ASSERT() If the expression evaluates to nonzero, execution continues.
-**      Otherwise, the ARI handler is called, if present. If not present,
-**      the default ARI action is taken (set with mwSetAriAction()).
-**      ASSERT() can be disabled by defining MW_NOASSERT.
-**  - mwVERIFY() or VERIFY() works just like ASSERT(), but when compiling without
-**      MEMWATCH the macro evaluates to the expression.
-**      VERIFY() can be disabled by defining MW_NOVERIFY.
-**  - mwTRACE() or TRACE() writes some text and data to the log. Use like printf().
-**      TRACE() can be disabled by defining MW_NOTRACE.
-*/
-int   mwIsReadAddr( const void *p, unsigned len );
-int   mwIsSafeAddr( void *p, unsigned len );
-int   mwTest( const char *file, int line, int mw_test_flags );
-int   mwTestBuffer( const char *file, int line, void *p );
-int   mwAssert( int, const char*, const char*, int );
-int   mwVerify( int, const char*, const char*, int );
-
-/*
-** User I/O functions
-**  - mwTrace() works like printf(), but dumps output either to the
-**      function specified with mwSetOutFunc(), or the log file.
-**  - mwPuts() works like puts(), dumps output like mwTrace().
-**  - mwSetOutFunc() allows you to give the adress of a function
-**      where all user output will go. (exeption: see mwSetAriFunc)
-**      Specifying NULL will direct output to the log file.
-**  - mwSetAriFunc() gives MEMWATCH the adress of a function to call
-**      when an 'Abort, Retry, Ignore' question is called for. The
-**      actual error message is NOT printed when you've set this adress,
-**      but instead it is passed as an argument. If you call with NULL
-**      for an argument, the ARI handler is disabled again. When the
-**      handler is disabled, MEMWATCH will automatically take the
-**      action specified by mwSetAriAction().
-**  - mwSetAriAction() sets the default ARI return value MEMWATCH should
-**      use if no ARI handler is specified. Defaults to MW_ARI_ABORT.
-**  - mwAriHandler() is an ANSI ARI handler you can use if you like. It
-**      dumps output to stderr, and expects input from stdin.
-**  - mwBreakOut() is called in certain cases when MEMWATCH feels it would
-**      be nice to break into a debugger. If you feel like MEMWATCH, place
-**      an execution breakpoint on this function.
-*/
-void  mwTrace( const char* format_string, ... );
-void  mwPuts( const char* text );
-void  mwSetOutFunc( void (*func)(int) );
-void  mwSetAriFunc( int (*func)(const char*) );
-void  mwSetAriAction( int mw_ari_value );
-int   mwAriHandler( const char* cause );
-void  mwBreakOut( const char* cause );
-
-/*
-** Allocation/deallocation functions
-**  These functions are the ones actually to perform allocations
-**  when running MEMWATCH, for both C and C++ calls.
-**  - mwMalloc() debugging allocator
-**  - mwMalloc_() always resolves to a clean call of malloc()
-**  - mwRealloc() debugging re-allocator
-**  - mwRealloc_() always resolves to a clean call of realloc()
-**  - mwCalloc() debugging allocator, fills with zeros
-**  - mwCalloc_() always resolves to a clean call of calloc()
-**  - mwFree() debugging free. Can only free memory which has
-**      been allocated by MEMWATCH.
-**  - mwFree_() resolves to a) normal free() or b) debugging free.
-**      Can free memory allocated by MEMWATCH and malloc() both.
-**      Does not generate any runtime errors.
-*/
-void* mwMalloc( size_t, const char*, int );
-void* mwMalloc_( size_t );
-void* mwRealloc( void *, size_t, const char*, int );
-void* mwRealloc_( void *, size_t );
-void* mwCalloc( size_t, size_t, const char*, int );
-void* mwCalloc_( size_t, size_t );
-void  mwFree( void*, const char*, int );
-void  mwFree_( void* );
-char* mwStrdup( const char *, const char*, int );
-
-/*
-** Enable/disable precompiler block
-**  This block of defines and if(n)defs make sure that references
-**  to MEMWATCH is completely removed from the code if the MEMWATCH
-**  manifest constant is not defined.
-*/
-#ifndef __MEMWATCH_C
-#ifdef MEMWATCH
-
-#define mwASSERT(exp)   while(mwAssert((int)(exp),#exp,__FILE__,__LINE__))
-#ifndef MW_NOASSERT
-#ifndef ASSERT
-#define ASSERT          mwASSERT
-#endif /* !ASSERT */
-#endif /* !MW_NOASSERT */
-#define mwVERIFY(exp)   while(mwVerify((int)(exp),#exp,__FILE__,__LINE__))
-#ifndef MW_NOVERIFY
-#ifndef VERIFY
-#define VERIFY          mwVERIFY
-#endif /* !VERIFY */
-#endif /* !MW_NOVERIFY */
-#define mwTRACE         mwTrace
-#ifndef MW_NOTRACE
-#ifndef TRACE
-#define TRACE           mwTRACE
-#endif /* !TRACE */
-#endif /* !MW_NOTRACE */
-
-/* some compilers use a define and not a function */
-/* for strdup(). */
-#ifdef strdup
-#undef strdup
-#endif
-
-#define malloc(n)       mwMalloc(n,__FILE__,__LINE__)
-#define strdup(p)       mwStrdup(p,__FILE__,__LINE__)
-#define realloc(p,n)    mwRealloc(p,n,__FILE__,__LINE__)
-#define calloc(n,m)     mwCalloc(n,m,__FILE__,__LINE__)
-#define free(p)         mwFree(p,__FILE__,__LINE__)
-#define CHECK()         mwTest(__FILE__,__LINE__,MW_TEST_ALL)
-#define CHECK_THIS(n)   mwTest(__FILE__,__LINE__,n)
-#define CHECK_BUFFER(b) mwTestBuffer(__FILE__,__LINE__,b)
-#define MARK(p)         mwMark(p,#p,__FILE__,__LINE__)
-#define UNMARK(p)       mwUnmark(p,__FILE__,__LINE__)
-
-#else /* MEMWATCH */
-
-#define mwASSERT(exp)
-#ifndef MW_NOASSERT
-#ifndef ASSERT
-#define ASSERT          mwASSERT
-#endif /* !ASSERT */
-#endif /* !MW_NOASSERT */
-
-#define mwVERIFY(exp)    exp
-#ifndef MW_NOVERIFY
-#ifndef VERIFY
-#define VERIFY          mwVERIFY
-#endif /* !VERIFY */
-#endif /* !MW_NOVERIFY */
-
-/*lint -esym(773,mwTRACE) */
-#define mwTRACE         /*lint -save -e506 */ 1?(void)0:mwDummyTraceFunction /*lint -restore */
-#ifndef MW_NOTRACE
-#ifndef TRACE
-/*lint -esym(773,TRACE) */
-#define TRACE           mwTRACE
-#endif /* !TRACE */
-#endif /* !MW_NOTRACE */
-
-extern void mwDummyTraceFunction(const char *,...);
-/*lint -save -e652 */
-#define mwDoFlush(n)
-#define mwPuts(s)
-#define mwInit()
-#define mwGrab(n)
-#define mwDrop(n)
-#define mwLimit(n)
-#define mwTest(f,l)
-#define mwSetOutFunc(f)
-#define mwSetAriFunc(f)
-#define mwDefaultAri()
-#define mwNomansland()
-#define mwStatistics(f)
-#define mwMark(p,t,f,n)     (p)
-#define mwUnmark(p,f,n)     (p)
-#define mwMalloc(n,f,l)     malloc(n)
-#define mwStrdup(p,f,l)     strdup(p)
-#define mwRealloc(p,n,f,l)  realloc(p,n)
-#define mwCalloc(n,m,f,l)   calloc(n,m)
-#define mwFree(p)           free(p)
-#define mwMalloc_(n)        malloc(n)
-#define mwRealloc_(p,n)     realloc(p,n)
-#define mwCalloc_(n,m)      calloc(n,m)
-#define mwFree_(p)          free(p)
-#define mwAssert(e,es,f,l)
-#define mwVerify(e,es,f,l)  (e)
-#define mwTrace             mwDummyTrace
-#define mwTestBuffer(f,l,b) (0)
-#define CHECK()
-#define CHECK_THIS(n)
-#define CHECK_BUFFER(b)
-#define MARK(p)             (p)
-#define UNMARK(p)           (p)
-/*lint -restore */
-
-#endif /* MEMWATCH */
-#endif /* !__MEMWATCH_C */
-
-#ifdef __cplusplus
-    }
-#endif
-
-#if 0 /* 980317: disabled C++ */
-
-/*
-** C++ support section
-**  Implements the C++ support. Please note that in order to avoid
-**  messing up library classes, C++ support is disabled by default.
-**  You must NOT enable it until AFTER the inclusion of all header
-**  files belonging to code that are not compiled with MEMWATCH, and
-**  possibly for some that are! The reason for this is that a C++
-**  class may implement it's own new() function, and the preprocessor
-**  would substitute this crucial declaration for MEMWATCH new().
-**  You can forcibly deny C++ support by defining MEMWATCH_NOCPP.
-**  To enble C++ support, you must be compiling C++, MEMWATCH must
-**  be defined, MEMWATCH_NOCPP must not be defined, and finally,
-**  you must define 'new' to be 'mwNew', and 'delete' to be 'mwDelete'.
-**  Unlike C, C++ code can begin executing *way* before main(), for
-**  example if a global variable is created. For this reason, you can
-**  declare a global variable of the class 'MemWatch'. If this is
-**  is the first variable created, it will then check ALL C++ allocations
-**  and deallocations. Unfortunately, this evaluation order is not
-**  guaranteed by C++, though the compilers I've tried evaluates them
-**  in the order encountered.
-*/
-#ifdef __cplusplus
-#ifndef __MEMWATCH_C
-#ifdef MEMWATCH
-#ifndef MEMWATCH_NOCPP
-extern int mwNCur;
-extern const char *mwNFile;
-extern int mwNLine;
-class MemWatch {
-public:
-    MemWatch();
-    ~MemWatch();
-    };
-void * operator new(size_t);
-void * operator new(size_t,const char *,int);
-void * operator new[] (size_t,const char *,int);	// hjc 07/16/02
-void operator delete(void *);
-#define mwNew new(__FILE__,__LINE__)
-#define mwDelete (mwNCur=1,mwNFile=__FILE__,mwNLine=__LINE__),delete
-#endif /* MEMWATCH_NOCPP */
-#endif /* MEMWATCH */
-#endif /* !__MEMWATCH_C */
-#endif /* __cplusplus */
-
-#endif /* 980317: disabled C++ */
-
-#endif /* __MEMWATCH_H */
-
-/* EOF MEMWATCH.H */
diff --git a/modules.h b/modules.h
deleted file mode 100644
index 6980ec7..0000000
--- a/modules.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Central application error code managment
-// ****************************************************************************
-
-#ifndef __MODULES_H__
-#define __MODULES_H__
-
-#define CREATE_MODULE_IDS(ModulName, x) \
-   const int ERROR_BASE_ ## ModulName = ERROR_BASE_GUYMAGER_MAIN +  x * ID_OFFSET_SUBSUBPROJECT;
-
-
-CREATE_MODULE_IDS (MAIN           ,  0)
-CREATE_MODULE_IDS (LOG            ,  1)
-CREATE_MODULE_IDS (CFG            ,  2)
-CREATE_MODULE_IDS (UTIL           ,  3)
-CREATE_MODULE_IDS (QTUTIL         ,  4)
-CREATE_MODULE_IDS (SCAN           ,  5)
-CREATE_MODULE_IDS (MAINWINDOW     ,  6)
-CREATE_MODULE_IDS (TABLE          ,  7)
-CREATE_MODULE_IDS (FIFO           ,  8)
-CREATE_MODULE_IDS (THREADSCAN     ,  9)
-CREATE_MODULE_IDS (THREADREAD     , 10)
-CREATE_MODULE_IDS (THREADWRITE    , 11)
-CREATE_MODULE_IDS (THREADHASH     , 12)
-CREATE_MODULE_IDS (THREADCOMPRESS , 13)
-CREATE_MODULE_IDS (DEVICE         , 14)
-CREATE_MODULE_IDS (DEVICELISTMODEL, 15)
-CREATE_MODULE_IDS (FILE           , 16)
-CREATE_MODULE_IDS (ITEMDELEGATE   , 17)
-CREATE_MODULE_IDS (INFO           , 18)
-CREATE_MODULE_IDS (INFOFIELD      , 19)
-CREATE_MODULE_IDS (DLGACQUIRE     , 20)
-CREATE_MODULE_IDS (DLGMESSAGE     , 21)
-CREATE_MODULE_IDS (DLGABORT       , 22)
-CREATE_MODULE_IDS (DLGDIRSEL      , 23)
-CREATE_MODULE_IDS (DLGWAIT        , 24)
-CREATE_MODULE_IDS (HASH           , 25)
-CREATE_MODULE_IDS (AAFF           , 26)
-
-CREATE_MODULE_IDS (QT             , 99)
-
-enum
-{
-   ERROR_QT_UNSUCCESSFUL = ERROR_BASE_QT + 1
-};
-
-
-#endif
-
diff --git a/package.sh b/package.sh
deleted file mode 100755
index 3405e59..0000000
--- a/package.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-#
-# package.sh - automated packaging in Guy's developer environment.
-#
-# You may use a command like
-#   dpkg-buildpackage -B -uc -rfakeroot
-# or similar instead
-
-if [ -e ../../scripts/package.sh ]; then
-   ../../scripts/package.sh guymager
-else
-   ../../../scripts/package.sh guymager # when called from the branches or tags directories
-fi
-
-./compileinfo.sh | grep Version | awk -F\" ' { print "Version "$2 } '
-
diff --git a/qtutil.cpp b/qtutil.cpp
deleted file mode 100644
index e73510a..0000000
--- a/qtutil.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different Qt utility functions
-// ****************************************************************************
-
-#include "common.h"
-
-#include <algorithm>
-
-#include <QtGui>
-
-#include "config.h"
-#include "qtutil.h"
-
-// ------------------------------------
-//              Constants
-// ------------------------------------
-
-
-const QColor QtUtilColorDefault; // Accessible externally as well, see qtutil.h. This color is an invalid color (see description of the
-                                 // QColor default construtor) and is interpreted in the QtUtil functions as the default color (gray for
-                                 // a button background, for instance; see QtUtilSetButtonColor for an example on how it is used)
-
-static const float QTUTIL_GEOMETRY_MAXFACTOR_X = 0.95;
-static const float QTUTIL_GEOMETRY_MAXFACTOR_Y = 0.95;
-
-static const int QTUTIL_WAIT_PROCESS_MAX    = 60000;
-
-// ------------------------------------
-//          Type definitions
-// ------------------------------------
-
-//typedef struct
-//{
-//} t_QtUtilLocal;
-
-// ------------------------------------
-//          Global variables
-// ------------------------------------
-
-//static t_QtUtilLocal QtUtilLocal;
-
-// ------------------------------------
-//              Functions
-// ------------------------------------
-
-APIRET QtUtilSetGeometryCentered (QWidget *pWidget, int Dx, int Dy)
-{
-   QWidget *pParent;
-   int       X, Y;
-   int       ScreenDx, ScreenDy;
-
-   ScreenDx = QApplication::desktop()->width ();
-   ScreenDy = QApplication::desktop()->height();
-
-   Dx = std::min (Dx, (int)(ScreenDx * QTUTIL_GEOMETRY_MAXFACTOR_X)); // Take care that the window size never gets bigger
-   Dy = std::min (Dy, (int)(ScreenDy * QTUTIL_GEOMETRY_MAXFACTOR_Y)); // than the screen minus a certain border.
-
-   if (pWidget->windowFlags() & Qt::Dialog)
-        pParent = NULL;
-   else pParent = pWidget->parentWidget();
-
-   if (pParent == NULL)
-   {
-      X = (ScreenDx - Dx) / 2;
-      Y = (ScreenDy - Dy) / 2;
-   }
-   else
-   {
-      X  = (pParent->width () - Dx) / 2;
-      Y  = (pParent->height() - Dy) / 2;
-   }
-   pWidget->setGeometry(X, Y, Dx, Dy);
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//             Font metrics
-// ------------------------------------
-
-static APIRET QtUtilGetFontMetrics (QPainter const *pPainter, QFont const *pFont, QFontMetrics **ppFontMetrics)
-{
-   if (pFont)
-        *ppFontMetrics = new QFontMetrics(*pFont);
-   else *ppFontMetrics = new QFontMetrics(pPainter->font());
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetTextSize (QPainter const *pPainter, QFont const *pFont, const QString &Str, int *pDx, int *pDy)
-{
-   QFontMetrics *pFontMetrics;
-   QRect          Rect;
-
-   CHK (QtUtilGetFontMetrics (pPainter, pFont, &pFontMetrics))
-   Rect = pFontMetrics->boundingRect(Str);
-
-   if (pDx) *pDx = Rect.width ();
-   if (pDy) *pDy = Rect.height();
-
-   delete pFontMetrics;
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetCharHeight (QPainter const *pPainter, QFont const *pFont, int *pDy)
-{
-   QFontMetrics *pFontMetrics;
-
-   CHK (QtUtilGetFontMetrics (pPainter, pFont, &pFontMetrics))
-   *pDy = pFontMetrics->ascent();
-   delete pFontMetrics;
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetLineHeight (QPainter const *pPainter, QFont const *pFont, int *pDy)
-{
-   QFontMetrics *pFontMetrics;
-
-   CHK (QtUtilGetFontMetrics (pPainter, pFont, &pFontMetrics))
-   *pDy = pFontMetrics->height();
-   delete pFontMetrics;
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetTextAscent (QPainter const *pPainter, QFont const *pFont, int *pDy)
-{
-   QFontMetrics *pFontMetrics;
-
-   CHK (QtUtilGetFontMetrics (pPainter, pFont, &pFontMetrics))
-   *pDy = pFontMetrics->ascent();
-   delete pFontMetrics;
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetTextDescent (QPainter const *pPainter, QFont const *pFont, int *pDy)
-{
-   QFontMetrics *pFontMetrics;
-
-   CHK (QtUtilGetFontMetrics (pPainter, pFont, &pFontMetrics))
-   *pDy = pFontMetrics->descent();
-   delete pFontMetrics;
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetNumStrWidth (QPainter const *pPainter, QFont const *pFont, int IntLen, int FrcLen, bool Signed, int *pDx)
-{
-   QString Str;
-   int     Digits;
-
-   Digits = IntLen + FrcLen;
-   if (FrcLen > 0) Digits++;       // +1 for the ','
-   if (Signed    ) Digits++;
-
-   Str.sprintf ("%0*.*f", Digits, FrcLen, 0.0);
-   Str.replace ('.', ',');
-
-   CHK (QtUtilGetTextSize (pPainter, pFont, Str, pDx, NULL))
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilGetAvgStrWidth (QPainter const *pPainter, QFont const *pFont, int Chars, int *pAvgWidth)
-{
-   QString AvgChar;
-   int     AvgCharWidth;
-
-   AvgChar = "N";    // Let it be the average character...
-   CHK (QtUtilGetTextSize (pPainter, pFont, AvgChar, &AvgCharWidth, NULL))
-   *pAvgWidth = Chars * AvgCharWidth;
-
-   return NO_ERROR;
-}
-
-
-// ------------------------------------
-//             List view
-// ------------------------------------
-
-// t_QtUtilListView::t_QtUtilListView (QWidget *pParent, const char *pName, WFlags Flags)
-//    :QListView (pParent, pName, Flags)
-// {
-// }
-//
-// t_QtUtilListView::~t_QtUtilListView (void)
-// {
-// }
-//
-// APIRET t_QtUtilListView::AdjustColumnWidths (void)
-// {
-//    QTimer::singleShot (0, this, SLOT(SlotAdjustColumnWidths()));
-//    return NO_ERROR;
-// }
-//
-// void t_QtUtilListView::SlotAdjustColumnWidths (void)
-// {
-//    int i;
-//    for (i=0; i<columns(); i++)
-//       adjustColumn (i);
-//    triggerUpdate();
-// }
-
-// ------------------------------------
-//               Sleep
-// ------------------------------------
-
-class QtUtilThread: public QThread
-{
-   public:
-      static APIRET Sleep (int MilliSeconds)
-      {
-         msleep ((unsigned long)MilliSeconds);
-         return NO_ERROR;
-      }
-};
-
-APIRET QtUtilSleep (int MilliSeconds)
-{
-   CHK (QtUtilThread::Sleep(MilliSeconds))
-
-   return NO_ERROR;
-}
-
-
-// ------------------------------------
-//         Default widget setting
-// ------------------------------------
-
-APIRET QtUtilAdjustPushButton (QPushButton *pWidget)
-{
-   pWidget->setFont (CONFIG_FONT (FONTOBJECT_DIALOGDEFAULT));
-   return NO_ERROR;
-}
-
-APIRET QtUtilAdjustLabel (QLabel *pWidget)
-{
-   pWidget->setFont (CONFIG_FONT (FONTOBJECT_DIALOGDEFAULT));
-   return NO_ERROR;
-}
-
-
-APIRET QtUtilAdjustLayout (QLayout *pLayout, bool TopLevelLayout)
-{
-   if (TopLevelLayout)
-        pLayout->setMargin (15);
-   else pLayout->setMargin ( 0);
-   pLayout->setSpacing (15);
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilAdjustDefaults (QLayout *pLayout, bool TopLevelLayout)
-{
-   QLayoutItem     *pLayoutItem;
-   QWidget         *pChildWidget;
-   QLayout         *pChildLayout;
-   int               i = 0;
-
-   CHK (QtUtilAdjustLayout (pLayout, TopLevelLayout))
-
-   while ((pLayoutItem = pLayout->itemAt(i)) != 0)
-   {
-      pChildWidget = pLayoutItem->widget();
-      pChildLayout = pLayoutItem->layout();
-      if (pChildWidget != NULL)
-      {
-//         if      (pChildWidget->inherits ("QPushButton")) CHK (QtUtilAdjustPushButton ((QPushButton*) pChildWidget))
-//         else if (pChildWidget->inherits ("QLabel"     )) CHK (QtUtilAdjustLabel      ((QLabel     *) pChildWidget))
-         if      (pChildWidget->inherits ("QPushButton")) CHK (QtUtilAdjustPushButton (dynamic_cast<QPushButton*>(pChildWidget)))
-         else if (pChildWidget->inherits ("QLabel"     )) CHK (QtUtilAdjustLabel      (dynamic_cast<QLabel     *>(pChildWidget)))
-      }
-      else if (pChildLayout != NULL)
-      {
-         CHK (QtUtilAdjustDefaults (pChildLayout, false)) // recursive call for processing sub-layouts
-      }
-   }
-
-   return NO_ERROR;
-}
-
-// ------------------------------------
-//          External calls
-// ------------------------------------
-
-APIRET QtUtilProcessCommand (const QString &Command, QString &StandardOutput)
-{
-   QProcess    Process;
-   QStringList SplittedCommand;
-
-   QStringList Arguments;
-   QString     StrState;
-   QString     Cmd = Command;
-   QString     LastArg;
-   bool        qtrc;
-
-   Process.setProcessChannelMode (QProcess::MergedChannels); // Merge stderr and stdout
-
-   // Split up the whole command string into command and arguments
-   // ------------------------------------------------------------
-   SplittedCommand = Command.split (' ');
-   Cmd = SplittedCommand.takeFirst();                       // The first part is the command
-   while (!SplittedCommand.isEmpty())                       // Then come the arguments
-   {
-      if (SplittedCommand.first()[0] != '"')
-           Arguments.append (SplittedCommand.takeFirst());
-      else break;                                           // If an argument starts with " we assume that comes one big last argument
-   }
-   if (!SplittedCommand.isEmpty())
-   {
-      LastArg = SplittedCommand.join (" ");                 // Put all the rest together
-      LastArg = LastArg.right (LastArg.length()-1);         // Take away the leading "
-      if (LastArg[LastArg.length()-1] == '"')               // If there is a trailing ",
-         LastArg = LastArg.left (LastArg.length()-1);       // take it away as well
-      Arguments.append (LastArg);
-   }                                    // The whole handling is not really clean. We try to copy bash's behaviour, very roughly. It
-                                        // should work for all commands of the form   bash -c "xxxx yy zzz xx"
-   // Run the command
-   // ---------------
-   Process.start (Cmd, Arguments);
-
-   StrState = "WaitForStarted";
-   qtrc = Process.waitForStarted  (QTUTIL_WAIT_PROCESS_MAX);
-   if (qtrc)
-   {
-      StrState = "WaitForFinished";
-      Process.closeWriteChannel ();
-      qtrc = Process.waitForFinished (QTUTIL_WAIT_PROCESS_MAX);
-   }
-   if (qtrc)
-   {
-//      StandardOutput  = Process.readAllStandardOutput();
-      StandardOutput  = Process.readAll();
-      StrState = "Done";
-   }
-   else
-   {
-      LOG_INFO ("Killing command because of timeout [%s] in state %s", QSTR_TO_PSZ(Command), QSTR_TO_PSZ(StrState))
-      Process.kill();
-      return ERROR_QTUTIL_COMMAND_TIMEOUT;
-   }
-
-   return NO_ERROR;
-}
-
-//#include <sys/types.h>
-//#include <unistd.h>
-//#include <stdlib.h>
-//#include <wait.h>
-//
-//APIRET QtUtilProcessCommand_C (const QString &Command, QString &StandardOutput)
-//{
-//   FILE *pStream;
-//   int    Ch;
-//   pid_t  Pid;
-//   int    ChildExitCode;
-//   int    PipeArr[2];      /* This holds the fd for the input & output of the pipe */
-//
-//   // Setup communication pipe
-//   // ------------------------
-//   if (pipe(PipeArr))
-//      CHK (ERROR_QTUTIL_PIPE_ERROR)
-//
-//   // Attempt to fork
-//   // ---------------
-//   Pid = fork();
-//   if (Pid == -1)
-//      CHK (ERROR_QTUTIL_FORK_FAILED)
-//
-//   if (Pid)  // Parent process
-//   {
-//      close (PipeArr[STDOUT_FILENO]);                      // Close unused side of pipe (in side)
-//
-//      pStream = fdopen (PipeArr[STDIN_FILENO], "r");
-//      if (pStream == NULL)
-//         CHK (ERROR_QTUTIL_STREAM_OPEN_FAILED)
-//
-//      while ((Ch = fgetc (pStream)) != EOF)
-//         StandardOutput += QChar(Ch);
-//
-//      fclose (pStream);
-//      waitpid (Pid, &ChildExitCode, STDIN_FILENO);         // Wait for child process to end
-//   }
-//   else // Child process
-//   {
-//      dup2  (commpipe[STDOUT_FILENO],STDOUT_FILENO);       // Replace stdout with out side of the pipe
-//      close (commpipe[STDIN_FILENO ]);                     // Close unused side of pipe (out side)
-//
-//      execl ("/bin/bash", "/bin/bash", "--noprofile", "--norc", "--posix", "-c", QSTR_TO_PSZ(Command), NULL);    // Replace the child fork with a new process
-//      _exit (1);
-//   }
-//
-//   return NO_ERROR;
-//}
-
-// ------------------------------------
-//       Module initialisation
-// ------------------------------------
-
-APIRET QtUtilInit (void)
-{
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_STACK_OVERFLOW     ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_STACK_UNDERFLOW    ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_INVALID_CUSTOMEVENT))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_UNEXPECTED_EVENT   ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_INVALID_MESSAGEBOX_TYPE   ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_UNFREED_MEMORY            ))
-   CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_COMMAND_TIMEOUT           ))
-
-   return NO_ERROR;
-}
-
-APIRET QtUtilDeInit (void)
-{
-   return NO_ERROR;
-}
-
diff --git a/qtutil.h b/qtutil.h
deleted file mode 100644
index 85d4842..0000000
--- a/qtutil.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different Qt utility functions
-// ****************************************************************************
-
-
-#ifndef __QTUTIL_H__
-#define __QTUTIL_H__
-
-
-#define QTUTIL_DEGREES(x) (16*x)
-#define QTUTIL_FULL_CIRCLE QTUTIL_DEGREES(360)
-
-
-#ifdef QDIALOG_H
-//   const int QtUtilDefaultDialogFlags = Qt::WStyle_DialogBorder |
-//                                        Qt::WStyle_StaysOnTop   |
-//                                        Qt::WStyle_Dialog;
-
-   const int QtUtilDefaultDialogFlags = Qt::WindowTitleHint;
-
-
-// What QMessageBox::information does:
-//    : QDialog( parent, name, modal, f | WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu )
-#endif
-
-
-
-
-#ifdef QCOLOR_H
-   extern const QColor QtUtilColorDefault;
-#endif
-
-// ------------------------------------
-//               Prototypes
-// ------------------------------------
-
-#ifdef QWIDGET_H
-   APIRET QtUtilSetGeometryCentered (QWidget *pWidget, int Dx, int Dy);
-#endif
-
-#if defined QSTRING_H && defined QPAINTER_H && defined QFONT_H
-   APIRET QtUtilGetTextAscent  (QPainter const *pPainter, QFont const *pFont, int *pDy);
-   APIRET QtUtilGetTextDescent (QPainter const *pPainter, QFont const *pFont, int *pDy);
-   APIRET QtUtilGetCharHeight  (QPainter const *pPainter, QFont const *pFont, int *pDy);
-   APIRET QtUtilGetLineHeight  (QPainter const *pPainter, QFont const *pFont, int *pDy);
-   APIRET QtUtilGetAvgStrWidth (QPainter const *pPainter, QFont const *pFont, int Chars, int *pAvgWidth);
-   APIRET QtUtilGetTextSize    (QPainter const *pPainter, QFont const *pFont, const QString &Str, int *pDx, int *pDy);
-   APIRET QtUtilGetNumStrWidth (QPainter const *pPainter, QFont const *pFont, int IntLen, int FrcLen , bool Signed, int *pDx);
-#ifdef __STRUCT_H__
-   APIRET QtUtilGetNumStrWidth (QPainter const *pPainter, QFont const *pFont, t_pParamUnit pParamUnit, bool Signed, int *pDx);
-#endif
-#endif
-
-APIRET QtUtilSleep (int MilliSeconds);
-
-#ifdef QLAYOUT_H
-   APIRET QtUtilAdjustDefaults (QLayout *pLayout, bool TopLevelLayout=true);
-   APIRET QtUtilAdjustLayout   (QLayout *pLayout, bool TopLevelLayout);
-#endif
-#ifdef QPUSHBUTTON_H
-   APIRET QtUtilAdjustPushButton (QPushButton *pWidget);
-#endif
-#ifdef QLABEL_H
-   APIRET QtUtilAdjustLabel      (QLabel      *pWidget);
-#endif
-
-APIRET QtUtilProcessCommand (const QString &Command, QString &StandardOutput);
-
-APIRET QtUtilInit   (void);
-APIRET QtUtilDeInit (void);
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_QTUTIL_DIALOG_STACK_OVERFLOW = ERROR_BASE_QTUTIL + 1,
-   ERROR_QTUTIL_DIALOG_STACK_UNDERFLOW,
-   ERROR_QTUTIL_DIALOG_INVALID_CUSTOMEVENT,
-   ERROR_QTUTIL_DIALOG_UNEXPECTED_EVENT,
-   ERROR_QTUTIL_INVALID_MESSAGEBOX_TYPE,
-   ERROR_QTUTIL_UNFREED_MEMORY,
-   ERROR_QTUTIL_COMMAND_TIMEOUT
-};
-
-#endif
-
-
diff --git a/sha256.cpp b/sha256.cpp
deleted file mode 100644
index b2fbc60..0000000
--- a/sha256.cpp
+++ /dev/null
@@ -1,649 +0,0 @@
-// Guy: This file has been downloaded from www.spale.com/download/scrypt/scrypt1.0/sha256.c. It
-// has been optimised for speedon i386 and amd64 architecture and corrected for powerpc.
-
-// sha256 calculation on i386 and amd64 processors.
-/*
- *  FIPS-180-2 compliant SHA-256 implementation
- *
- *  Copyright (C) 2001-2003  Christophe Devine
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <string.h>
-#include <netinet/in.h>
-
-#include "sha256.h"
-
-#if defined(__i386__) || defined (__amd64__)
-   #define SHA256_USE_OPTIMISED_ASSEMBLER_CODE
-#endif
-
-
-// Guy: The original GET_UINT32 and PUT_UINT32 are
-//   - too slow
-//   - not working on powerpc
-// They have been replaced by the powerful htonl/ntohl functions.
-
-/*
-#define GET_UINT32(n,b,i)                       \
-{                                               \
-    (n) = ( (uint32) (b)[(i)    ] << 24 )       \
-        | ( (uint32) (b)[(i) + 1] << 16 )       \
-        | ( (uint32) (b)[(i) + 2] <<  8 )       \
-        | ( (uint32) (b)[(i) + 3]       );      \
-}
-
-#define PUT_UINT32(n,b,i)                       \
-{                                               \
-    (b)[(i)    ] = (uint8) ( (n) >> 24 );       \
-    (b)[(i) + 1] = (uint8) ( (n) >> 16 );       \
-    (b)[(i) + 2] = (uint8) ( (n) >>  8 );       \
-    (b)[(i) + 3] = (uint8) ( (n)       );       \
-}
-*/
-
-#define GET_UINT32(n,b,i)                       \
-   (n)= htonl (*((uint32 *)&(b)[i]));
-
-#define PUT_UINT32(n,b,i)                       \
-   *((uint32 *)&(b)[i]) = ntohl((n));
-
-void sha256_starts( sha256_context *ctx )
-{
-    ctx->total[0] = 0;
-    ctx->total[1] = 0;
-
-    ctx->state[0] = 0x6A09E667;
-    ctx->state[1] = 0xBB67AE85;
-    ctx->state[2] = 0x3C6EF372;
-    ctx->state[3] = 0xA54FF53A;
-    ctx->state[4] = 0x510E527F;
-    ctx->state[5] = 0x9B05688C;
-    ctx->state[6] = 0x1F83D9AB;
-    ctx->state[7] = 0x5BE0CD19;
-}
-
-
-#ifdef SHA256_USE_OPTIMISED_ASSEMBLER_CODE
-
-   #define P(a,b,c,d,e,f,g,h,x,K)                                                                       \
-       __asm__  __volatile__ (                                                                          \
-                /* ------------------------------------------------------------------------------- */   \
-                /* h + S3(e)                                    +   F1(e,f,g)             + K + x  */   \
-                /* h + (ROTR(e, 6) ^ ROTR(e,11) ^ ROTR(e,25))   +   (g ^ (e & (f ^ g)))   + K + x  */   \
-                /*           $5            $5           $5           $7   $5   $6  $7       $9  $8 */   \
-                /* ------------------------------------------------------------------------------- */   \
-                                                                                                        \
-                "movl %5,%%ebx;"                                      \
-                "movl %%ebx,%%edx;"                                   \
-                "rorl $6,%%ebx;"                                      \
-                "movl %%ebx,%%eax;"                                   \
-                "rorl $5,%%eax;"                                      \
-                "xorl %%ebx,%%eax;"                                   \
-                "rorl $19,%%ebx;"                                     \
-                "xorl %%ebx,%%eax;"  /* eax = S3(); edx = e */        \
-                                                                      \
-                "movl %7,%%ebx;"                                      \
-                "movl %%ebx,%%ecx;"                                   \
-                "xorl %6,%%ecx;"                                      \
-                "andl %%edx,%%ecx;"                                   \
-                "xorl %%ebx,%%ecx;"   /* ecx = F1() */                \
-                                                                      \
-                "leal " #K "(%%ecx,%%eax,1),%%eax;"                   \
-                "addl %1,%%eax;"                                      \
-                "addl %8,%%eax;"                                      \
-                "addl %%eax, %0;"   /*  d += temp1; */                \
-                                                                      \
-                /* ----------------------------------------------------------------------- */   \
-                /* S2(a)                                    +   F0(a,b,c);                 */   \
-                /* (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))   +   ((a & b) | (c & (a | b)))  */   \
-                /* ----------------------------------------------------------------------- */   \
-                                                                      \
-                "movl %2,%%ebx;"                                      \
-                "movl %3,%%ecx;"                                      \
-                "movl %%ecx,%%edx;"                                   \
-                "and  %%ebx,%%ecx;"  /* ecx = (a & b) */              \
-                "or   %%ebx,%%edx;"  /* edx = (a | b) */              \
-                "and  %4,%%edx;"                                      \
-                "or   %%edx,%%ecx;"  /* ecx = F0(); ebx = a */        \
-                                                                      \
-                "rorl $2,%%ebx;"                                      \
-                "movl %%ebx,%%edx;"                                   \
-                "rorl $11,%%ebx;"                                     \
-                "xorl %%ebx,%%edx;"                                   \
-                "rorl $9,%%ebx;"                                      \
-                "xorl %%ebx,%%edx;"  /* edx = S2() */                 \
-                                                                      \
-                "addl %%edx,%%ecx;"  /* ecx = Resultat */             \
-                                                                      \
-                "addl %%eax,%%ecx;"  /* h = temp1 + temp2; */         \
-                "movl %%ecx, %1;"                                     \
-            :"=m"(d), "=m"(h)                                                                   \
-            :"m"(a), "m"(b), "m"(c), "m"(e), "m"(f), "m"(g), "m"(x), "i"(K), "0"(d), "1"(h)     \
-            /*   2       3       4       5       6       7       8       9       0       1 */   \
-                                                                                                \
-            :"%eax", "%ebx", "%ecx", "%edx", "%cc", "memory")
-
-
-   #if defined(__i386__)
-      #define PR(a,b,c,d,e,f,g,h,i,K)                                         \
-          __asm__  __volatile__ (                                             \
-                                                                              \
-                   /* ----------------------------------- */                  \
-                   /* W[t] = S1(W[t -  2]) + W[t -  7] +  */                  \
-                   /*        S0(W[t - 15]) + W[t - 16]    */                  \
-                   /* ----------------------------------- */                  \
-                                                                              \
-                   "movl %10,%%edx;"                                          \
-                   "movl 4*(" #i "- 7)(%%edx),%%ecx;"  /* ecx used for sum */ \
-                   "addl 4*(" #i "-16)(%%edx),%%ecx;"                         \
-                                                                              \
-                   "movl 4*(" #i "- 2)(%%edx),%%ebx;"                         \
-                   "movl %%ebx,%%eax;"                                        \
-                   "shrl $10,%%eax;"                                          \
-                   "rorl $17,%%ebx;"                                          \
-                   "xorl %%ebx,%%eax;"                                        \
-                   "rorl $2,%%ebx;"                                           \
-                   "xorl %%ebx,%%eax;"  /* eax = S1() */                      \
-                   "addl %%eax,%%ecx;"                                        \
-                                                                              \
-                   "movl 4*(" #i "-15)(%%edx),%%ebx;"                         \
-                   "movl %%ebx,%%eax;"                                        \
-                   "shrl $3,%%eax;"                                           \
-                   "rorl $7,%%ebx;"                                           \
-                   "xorl %%ebx,%%eax;"                                        \
-                   "rorl $11,%%ebx;"                                          \
-                   "xorl %%ebx,%%eax;"  /* eax = S1() */                      \
-                   "addl %%eax,%%ecx;"                                        \
-                                                                              \
-                   "movl %%ecx, 4*(" #i ")(%%edx);" /* Write result to W[t], keep ecx for later */         \
-                                                                                                           \
-                   /* ------------------------------------------------------------------------------- */   \
-                   /* h + S3(e)                                    +   F1(e,f,g)             + K + x  */   \
-                   /* h + (ROTR(e, 6) ^ ROTR(e,11) ^ ROTR(e,25))   +   (g ^ (e & (f ^ g)))   + K + x  */   \
-                   /*           $5            $5           $5           $7   $5   $6  $7       $9  $8 */   \
-                   /* ------------------------------------------------------------------------------- */   \
-                                                                                                           \
-                   "movl %5,%%ebx;"                                      \
-                   "movl %%ebx,%%edx;"                                   \
-                   "rorl $6,%%ebx;"                                      \
-                   "movl %%ebx,%%eax;"                                   \
-                   "rorl $5,%%eax;"                                      \
-                   "xorl %%ebx,%%eax;"                                   \
-                   "rorl $19,%%ebx;"                                     \
-                   "xorl %%ebx,%%eax;"  /* eax = S3(); edx = e */        \
-                   "addl %%ecx,%%eax;"  /* Add R(t)  */                  \
-                                                                         \
-                   "movl %7,%%ebx;"                                      \
-                   "movl %%ebx,%%ecx;"                                   \
-                   "xorl %6,%%ecx;"                                      \
-                   "andl %%edx,%%ecx;"                                   \
-                   "xorl %%ebx,%%ecx;"   /* ecx = F1() */                \
-                                                                         \
-                   "leal " #K "(%%ecx,%%eax,1),%%eax;"                   \
-                   "addl %1,%%eax;"                                      \
-                   /* "addl %8,%%eax;"   */                              \
-                   "addl %%eax, %0;"   /*  d += temp1; */                \
-                                                                         \
-                   /* ----------------------------------------------------------------------- */   \
-                   /* S2(a)                                    +   F0(a,b,c);                 */   \
-                   /* (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))   +   ((a & b) | (c & (a | b)))  */   \
-                   /* ----------------------------------------------------------------------- */   \
-                                                                         \
-                   "movl %2,%%ebx;"                                      \
-                   "movl %3,%%ecx;"                                      \
-                   "movl %%ecx,%%edx;"                                   \
-                   "and  %%ebx,%%ecx;"  /* ecx = (a & b) */              \
-                   "or   %%ebx,%%edx;"  /* edx = (a | b) */              \
-                   "and  %4,%%edx;"                                      \
-                   "or   %%edx,%%ecx;"  /* ecx = F0(); ebx = a */        \
-                                                                         \
-                   "rorl $2,%%ebx;"                                      \
-                   "movl %%ebx,%%edx;"                                   \
-                   "rorl $11,%%ebx;"                                     \
-                   "xorl %%ebx,%%edx;"                                   \
-                   "rorl $9,%%ebx;"                                      \
-                   "xorl %%ebx,%%edx;"  /* edx = S2() */                 \
-                                                                         \
-                   "addl %%edx,%%ecx;"  /* ecx = Resultat */             \
-                                                                         \
-                   "addl %%eax,%%ecx;"  /* h = temp1 + temp2; */         \
-                   "movl %%ecx, %1;"                                     \
-               :"=m"(d), "=m"(h)                                                                            \
-               :"m"(a), "m"(b), "m"(c), "m"(e), "m"(f), "m"(g), "i"(i), "i"(K), "m"(pW), "0"(d), "1"(h)     \
-               /*   2       3       4       5       6       7       8       9       10       0       1 */   \
-                                                                                                            \
-               :"%eax", "%ebx", "%ecx", "%edx", "%cc", "memory")
-
-   #elif defined(__amd64__)
-
-      #define PR(a,b,c,d,e,f,g,h,i,K)                                         \
-          __asm__  __volatile__ (                                             \
-                                                                              \
-                   /* ----------------------------------- */                  \
-                   /* W[t] = S1(W[t -  2]) + W[t -  7] +  */                  \
-                   /*        S0(W[t - 15]) + W[t - 16]    */                  \
-                   /* ----------------------------------- */                  \
-                                                                              \
-                   "movq %10,%%rdx;"                                          \
-                   "movl 4*(" #i "- 7)(%%rdx),%%ecx;"  /* ecx used for sum */ \
-                   "addl 4*(" #i "-16)(%%rdx),%%ecx;"                         \
-                                                                              \
-                   "movl 4*(" #i "- 2)(%%rdx),%%ebx;"                         \
-                   "movl %%ebx,%%eax;"                                        \
-                   "shrl $10,%%eax;"                                          \
-                   "rorl $17,%%ebx;"                                          \
-                   "xorl %%ebx,%%eax;"                                        \
-                   "rorl $2,%%ebx;"                                           \
-                   "xorl %%ebx,%%eax;"  /* eax = S1() */                      \
-                   "addl %%eax,%%ecx;"                                        \
-                                                                              \
-                   "movl 4*(" #i "-15)(%%rdx),%%ebx;"                         \
-                   "movl %%ebx,%%eax;"                                        \
-                   "shrl $3,%%eax;"                                           \
-                   "rorl $7,%%ebx;"                                           \
-                   "xorl %%ebx,%%eax;"                                        \
-                   "rorl $11,%%ebx;"                                          \
-                   "xorl %%ebx,%%eax;"  /* eax = S1() */                      \
-                   "addl %%eax,%%ecx;"                                        \
-                                                                              \
-                   "movl %%ecx, 4*(" #i ")(%%rdx);" /* Write result to W[t], keep ecx for later */         \
-                                                                                                           \
-                   /* ------------------------------------------------------------------------------- */   \
-                   /* h + S3(e)                                    +   F1(e,f,g)             + K + x  */   \
-                   /* h + (ROTR(e, 6) ^ ROTR(e,11) ^ ROTR(e,25))   +   (g ^ (e & (f ^ g)))   + K + x  */   \
-                   /*           $5            $5           $5           $7   $5   $6  $7       $9  $8 */   \
-                   /* ------------------------------------------------------------------------------- */   \
-                                                                                                           \
-                   "movl %5,%%ebx;"                                      \
-                   "movl %%ebx,%%edx;"                                   \
-                   "rorl $6,%%ebx;"                                      \
-                   "movl %%ebx,%%eax;"                                   \
-                   "rorl $5,%%eax;"                                      \
-                   "xorl %%ebx,%%eax;"                                   \
-                   "rorl $19,%%ebx;"                                     \
-                   "xorl %%ebx,%%eax;"  /* eax = S3(); edx = e */        \
-                   "addl %%ecx,%%eax;"  /* Add R(t)  */                  \
-                                                                         \
-                   "movl %7,%%ebx;"                                      \
-                   "movl %%ebx,%%ecx;"                                   \
-                   "xorl %6,%%ecx;"                                      \
-                   "andl %%edx,%%ecx;"                                   \
-                   "xorl %%ebx,%%ecx;"   /* ecx = F1() */                \
-                                                                         \
-                   "leal " #K "(%%ecx,%%eax,1),%%eax;"                   \
-                   "addl %1,%%eax;"                                      \
-                   /* "addl %8,%%eax;"   */                              \
-                   "addl %%eax, %0;"   /*  d += temp1; */                \
-                                                                         \
-                   /* ----------------------------------------------------------------------- */   \
-                   /* S2(a)                                    +   F0(a,b,c);                 */   \
-                   /* (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))   +   ((a & b) | (c & (a | b)))  */   \
-                   /* ----------------------------------------------------------------------- */   \
-                                                                         \
-                   "movl %2,%%ebx;"                                      \
-                   "movl %3,%%ecx;"                                      \
-                   "movl %%ecx,%%edx;"                                   \
-                   "and  %%ebx,%%ecx;"  /* ecx = (a & b) */              \
-                   "or   %%ebx,%%edx;"  /* edx = (a | b) */              \
-                   "and  %4,%%edx;"                                      \
-                   "or   %%edx,%%ecx;"  /* ecx = F0(); ebx = a */        \
-                                                                         \
-                   "rorl $2,%%ebx;"                                      \
-                   "movl %%ebx,%%edx;"                                   \
-                   "rorl $11,%%ebx;"                                     \
-                   "xorl %%ebx,%%edx;"                                   \
-                   "rorl $9,%%ebx;"                                      \
-                   "xorl %%ebx,%%edx;"  /* edx = S2() */                 \
-                                                                         \
-                   "addl %%edx,%%ecx;"  /* ecx = Resultat */             \
-                                                                         \
-                   "addl %%eax,%%ecx;"  /* h = temp1 + temp2; */         \
-                   "movl %%ecx, %1;"                                     \
-               :"=m"(d), "=m"(h)                                                                            \
-               :"m"(a), "m"(b), "m"(c), "m"(e), "m"(f), "m"(g), "i"(i), "i"(K), "m"(pW), "0"(d), "1"(h)     \
-               /*   2       3       4       5       6       7       8       9       10       0       1 */   \
-                                                                                                            \
-               :"%eax", "%ebx", "%ecx", "%edx", "%rdx", "%cc", "memory")
-   #else
-      #error "Processor architecture not supported by sha256 inline assembly optimisation"
-   #endif
-#else
-// #define  SHR(x,n) ((x & 0xFFFFFFFF) >> n)  // Dieses AND mit FFFFFFFF war nur notwendig, da uint32 in sha256.h faelschlicherweise als long definiert war, was auf amd64 zu 64-Variablen fuehrte
-   #define  SHR(x,n) ((x) >> n)
-   #define ROTR(x,n) (SHR(x,n) | (x << (32 - n)))
-
-   #define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^  SHR(x, 3))
-   #define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^  SHR(x,10))
-
-   #define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))
-   #define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25))
-
-   #define F0(x,y,z) ((x & y) | (z & (x | y)))
-   #define F1(x,y,z) (z ^ (x & (y ^ z)))
-
-   #define R(t)                                    \
-   (                                               \
-       W[t] = S1(W[t -  2]) + W[t -  7] +          \
-              S0(W[t - 15]) + W[t - 16]            \
-   )
-
-   #define P(a,b,c,d,e,f,g,h,x,K)                  \
-   {                                               \
-       temp1 = h + S3(e) + F1(e,f,g) + K + x;      \
-       temp2 = S2(a) + F0(a,b,c);                  \
-       d += temp1; h = temp1 + temp2;              \
-   }
-
-   #define PR(a,b,c,d,e,f,g,h,i,K)                 \
-      P(a,b,c,d,e,f,g,h,R(i),K)
-
-
-#endif
-
-void sha256_process( sha256_context *ctx, uint8 data[64] )
-{
-    #ifndef SHA256_USE_OPTIMISED_ASSEMBLER_CODE
-       uint32 temp1, temp2;
-    #endif
-    uint32 W[64];
-    uint32 A, B, C, D, E, F, G, H;
-    uint32 *pW = &W[0];
-
-    GET_UINT32( W[0],  data,  0 );
-    GET_UINT32( W[1],  data,  4 );
-    GET_UINT32( W[2],  data,  8 );
-    GET_UINT32( W[3],  data, 12 );
-    GET_UINT32( W[4],  data, 16 );
-    GET_UINT32( W[5],  data, 20 );
-    GET_UINT32( W[6],  data, 24 );
-    GET_UINT32( W[7],  data, 28 );
-    GET_UINT32( W[8],  data, 32 );
-    GET_UINT32( W[9],  data, 36 );
-    GET_UINT32( W[10], data, 40 );
-    GET_UINT32( W[11], data, 44 );
-    GET_UINT32( W[12], data, 48 );
-    GET_UINT32( W[13], data, 52 );
-    GET_UINT32( W[14], data, 56 );
-    GET_UINT32( W[15], data, 60 );
-
-    A = ctx->state[0];
-    B = ctx->state[1];
-    C = ctx->state[2];
-    D = ctx->state[3];
-    E = ctx->state[4];
-    F = ctx->state[5];
-    G = ctx->state[6];
-    H = ctx->state[7];
-
-    P( A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98 );
-    P( H, A, B, C, D, E, F, G, W[ 1], 0x71374491 );
-    P( G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF );
-    P( F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5 );
-    P( E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B );
-    P( D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1 );
-    P( C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4 );
-    P( B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5 );
-    P( A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98 );
-    P( H, A, B, C, D, E, F, G, W[ 9], 0x12835B01 );
-    P( G, H, A, B, C, D, E, F, W[10], 0x243185BE );
-    P( F, G, H, A, B, C, D, E, W[11], 0x550C7DC3 );
-    P( E, F, G, H, A, B, C, D, W[12], 0x72BE5D74 );
-    P( D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE );
-    P( C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7 );
-    P( B, C, D, E, F, G, H, A, W[15], 0xC19BF174 );
-    PR(A, B, C, D, E, F, G, H,   16 , 0xE49B69C1 );
-    PR(H, A, B, C, D, E, F, G,   17 , 0xEFBE4786 );
-    PR(G, H, A, B, C, D, E, F,   18 , 0x0FC19DC6 );
-    PR(F, G, H, A, B, C, D, E,   19 , 0x240CA1CC );
-    PR(E, F, G, H, A, B, C, D,   20 , 0x2DE92C6F );
-    PR(D, E, F, G, H, A, B, C,   21 , 0x4A7484AA );
-    PR(C, D, E, F, G, H, A, B,   22 , 0x5CB0A9DC );
-    PR(B, C, D, E, F, G, H, A,   23 , 0x76F988DA );
-    PR(A, B, C, D, E, F, G, H,   24 , 0x983E5152 );
-    PR(H, A, B, C, D, E, F, G,   25 , 0xA831C66D );
-    PR(G, H, A, B, C, D, E, F,   26 , 0xB00327C8 );
-    PR(F, G, H, A, B, C, D, E,   27 , 0xBF597FC7 );
-    PR(E, F, G, H, A, B, C, D,   28 , 0xC6E00BF3 );
-    PR(D, E, F, G, H, A, B, C,   29 , 0xD5A79147 );
-    PR(C, D, E, F, G, H, A, B,   30 , 0x06CA6351 );
-    PR(B, C, D, E, F, G, H, A,   31 , 0x14292967 );
-    PR(A, B, C, D, E, F, G, H,   32 , 0x27B70A85 );
-    PR(H, A, B, C, D, E, F, G,   33 , 0x2E1B2138 );
-    PR(G, H, A, B, C, D, E, F,   34 , 0x4D2C6DFC );
-    PR(F, G, H, A, B, C, D, E,   35 , 0x53380D13 );
-    PR(E, F, G, H, A, B, C, D,   36 , 0x650A7354 );
-    PR(D, E, F, G, H, A, B, C,   37 , 0x766A0ABB );
-    PR(C, D, E, F, G, H, A, B,   38 , 0x81C2C92E );
-    PR(B, C, D, E, F, G, H, A,   39 , 0x92722C85 );
-    PR(A, B, C, D, E, F, G, H,   40 , 0xA2BFE8A1 );
-    PR(H, A, B, C, D, E, F, G,   41 , 0xA81A664B );
-    PR(G, H, A, B, C, D, E, F,   42 , 0xC24B8B70 );
-    PR(F, G, H, A, B, C, D, E,   43 , 0xC76C51A3 );
-    PR(E, F, G, H, A, B, C, D,   44 , 0xD192E819 );
-    PR(D, E, F, G, H, A, B, C,   45 , 0xD6990624 );
-    PR(C, D, E, F, G, H, A, B,   46 , 0xF40E3585 );
-    PR(B, C, D, E, F, G, H, A,   47 , 0x106AA070 );
-    PR(A, B, C, D, E, F, G, H,   48 , 0x19A4C116 );
-    PR(H, A, B, C, D, E, F, G,   49 , 0x1E376C08 );
-    PR(G, H, A, B, C, D, E, F,   50 , 0x2748774C );
-    PR(F, G, H, A, B, C, D, E,   51 , 0x34B0BCB5 );
-    PR(E, F, G, H, A, B, C, D,   52 , 0x391C0CB3 );
-    PR(D, E, F, G, H, A, B, C,   53 , 0x4ED8AA4A );
-    PR(C, D, E, F, G, H, A, B,   54 , 0x5B9CCA4F );
-    PR(B, C, D, E, F, G, H, A,   55 , 0x682E6FF3 );
-    PR(A, B, C, D, E, F, G, H,   56 , 0x748F82EE );
-    PR(H, A, B, C, D, E, F, G,   57 , 0x78A5636F );
-    PR(G, H, A, B, C, D, E, F,   58 , 0x84C87814 );
-    PR(F, G, H, A, B, C, D, E,   59 , 0x8CC70208 );
-    PR(E, F, G, H, A, B, C, D,   60 , 0x90BEFFFA );
-    PR(D, E, F, G, H, A, B, C,   61 , 0xA4506CEB );
-    PR(C, D, E, F, G, H, A, B,   62 , 0xBEF9A3F7 );
-    PR(B, C, D, E, F, G, H, A,   63 , 0xC67178F2 );
-
-    ctx->state[0] += A;
-    ctx->state[1] += B;
-    ctx->state[2] += C;
-    ctx->state[3] += D;
-    ctx->state[4] += E;
-    ctx->state[5] += F;
-    ctx->state[6] += G;
-    ctx->state[7] += H;
-}
-
-void sha256_update( sha256_context *ctx, uint8 *input, uint32 length )
-{
-    uint32 left, fill;
-
-    if( ! length ) return;
-
-    left = ctx->total[0] & 0x3F;
-    fill = 64 - left;
-
-    ctx->total[0] += length;
-    ctx->total[0] &= 0xFFFFFFFF;
-
-    if( ctx->total[0] < length )
-        ctx->total[1]++;
-
-    if( left && length >= fill )
-    {
-        memcpy( (void *) (ctx->buffer + left),
-                (void *) input, fill );
-        sha256_process( ctx, ctx->buffer );
-        length -= fill;
-        input  += fill;
-        left = 0;
-    }
-
-    while( length >= 64 )
-    {
-        sha256_process( ctx, input );
-        length -= 64;
-        input  += 64;
-    }
-
-    if( length )
-    {
-        memcpy( (void *) (ctx->buffer + left),
-                (void *) input, length );
-    }
-}
-
-static uint8 sha256_padding[64] =
-{
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-void sha256_finish( sha256_context *ctx, uint8 digest[32] )
-{
-    uint32 last, padn;
-    uint32 high, low;
-    uint8 msglen[8];
-
-    high = ( ctx->total[0] >> 29 )
-         | ( ctx->total[1] <<  3 );
-    low  = ( ctx->total[0] <<  3 );
-
-    PUT_UINT32( high, msglen, 0 );
-    PUT_UINT32( low,  msglen, 4 );
-
-    last = ctx->total[0] & 0x3F;
-    padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
-
-    sha256_update( ctx, sha256_padding, padn );
-    sha256_update( ctx, msglen, 8 );
-
-    PUT_UINT32( ctx->state[0], digest,  0 );
-    PUT_UINT32( ctx->state[1], digest,  4 );
-    PUT_UINT32( ctx->state[2], digest,  8 );
-    PUT_UINT32( ctx->state[3], digest, 12 );
-    PUT_UINT32( ctx->state[4], digest, 16 );
-    PUT_UINT32( ctx->state[5], digest, 20 );
-    PUT_UINT32( ctx->state[6], digest, 24 );
-    PUT_UINT32( ctx->state[7], digest, 28 );
-}
-
-#ifdef TEST
-
-#include <stdlib.h>
-#include <stdio.h>
-
-/*
- * those are the standard FIPS-180-2 test vectors
- */
-
-static const char *msg[] =
-{
-    "abc",
-    "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-    NULL
-};
-
-static const char *val[] =
-{
-    "ba7816bf8f01cfea414140de5dae2223" \
-    "b00361a396177a9cb410ff61f20015ad",
-    "248d6a61d20638b8e5c026930c3e6039" \
-    "a33ce45964ff2167f6ecedd419db06c1",
-    "cdc76e5c9914fb9281a1c7e284d73e67" \
-    "f1809a48a497200e046d39ccc7112cd0"
-};
-
-int main( int argc, char *argv[] )
-{
-    FILE *f;
-    int i, j;
-    char output[65];
-    sha256_context ctx;
-    unsigned char buf[65536];
-    unsigned char sha256sum[32];
-
-    if( argc < 2 )
-    {
-        printf( "\n SHA-256 Validation Tests:\n\n" );
-
-        for( i = 0; i < 3; i++ )
-        {
-            printf( " Test %d ", i + 1 );
-
-            sha256_starts( &ctx );
-
-            if( i < 2 )
-            {
-                sha256_update( &ctx, (uint8 *) msg[i],
-                               strlen( msg[i] ) );
-            }
-            else
-            {
-                memset( buf, 'a', 1000 );
-
-                for( j = 0; j < 1000; j++ )
-                {
-                    sha256_update( &ctx, (uint8 *) buf, 1000 );
-                }
-            }
-
-            sha256_finish( &ctx, sha256sum );
-
-            for( j = 0; j < 32; j++ )
-            {
-                sprintf( output + j * 2, "%02x", sha256sum[j] );
-            }
-
-            if( memcmp( output, val[i], 64 ) )
-            {
-                printf( "failed!\n" );
-                return( 1 );
-            }
-
-            printf( "passed.\n" );
-        }
-
-        printf( "\n" );
-    }
-    else
-    {
-        if( ! ( f = fopen( argv[1], "rb" ) ) )
-        {
-            perror( "fopen" );
-            return( 1 );
-        }
-
-        sha256_starts( &ctx );
-
-        while( ( i = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
-        {
-            sha256_update( &ctx, buf, i );
-        }
-
-        sha256_finish( &ctx, sha256sum );
-
-        for( j = 0; j < 32; j++ )
-        {
-            printf( "%02x", sha256sum[j] );
-        }
-
-        printf( "  %s\n", argv[1] );
-    }
-
-    return( 0 );
-}
-
-#endif
diff --git a/sha256.h b/sha256.h
deleted file mode 100644
index c2dc048..0000000
--- a/sha256.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// This file has been copied 1:1 from www.spale.com/download/scrypt/scrypt1.0/sha256.c
-// Besides these 2 comment lines, nothing has been changed.
-
-#ifndef _SHA256_H
-#define _SHA256_H
-
-#ifndef uint8
-#define uint8  unsigned char
-#endif
-
-#ifndef uint32
-#define uint32 unsigned int // Hier stand "long int", was für amd64 an sich falsch ist (siehe auch Bemerkung zu SHR in sha256.cpp)
-#endif
-
-typedef struct
-{
-    uint32 total[2];
-    uint32 state[8];
-    uint8 buffer[64];
-}
-sha256_context;
-
-void sha256_starts( sha256_context *ctx );
-void sha256_update( sha256_context *ctx, uint8 *input, uint32 length );
-void sha256_finish( sha256_context *ctx, uint8 digest[32] );
-
-#endif /* sha256.h */
-
diff --git a/splash.png b/splash.png
deleted file mode 100644
index 4c5a7e4..0000000
Binary files a/splash.png and /dev/null differ
diff --git a/table.cpp b/table.cpp
deleted file mode 100644
index 7dbd1b8..0000000
--- a/table.cpp
+++ /dev/null
@@ -1,816 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The table widget (central widget of the application)
-// ****************************************************************************
-
-#include <QtGui>
-
-#include "toolconstants.h"
-#include "common.h"
-#include "config.h"
-#include "threadread.h"
-#include "threadwrite.h"
-#include "threadhash.h"
-#include "threadcompress.h"
-#include "dlgmessage.h"
-#include "dlgacquire.h"
-#include "itemdelegate.h"
-#include "table.h"
-#include "compileinfo.h"
-#include "dlgabort.h"
-#include "file.h"
-
-
-class t_TableLocal
-{
-   public:
-      t_pDeviceList  pDeviceList;
-      QAction       *pActionAcquire;
-      QAction       *pActionAbort;
-      QAction       *pActionDeviceInfo;
-      bool            SlowDownAcquisitions;
-};
-
-t_Table::t_Table ()
-{
-   CHK_EXIT (ERROR_TABLE_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-t_Table::t_Table (QWidget *pParent, t_pDeviceList pDeviceList)
-   :QTableView (pParent)
-{
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_INVALID_ACTION                ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_THREADREAD_ALREADY_RUNNING    ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_THREADHASH_ALREADY_RUNNING    ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_THREADWRITE_ALREADY_RUNNING   ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_THREADCOMPRESS_ALREADY_RUNNING))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_THREADREAD_DOESNT_EXIT        ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_FIFO_EXISTS                   ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_CONSTRUCTOR_NOT_SUPPORTED     ))
-   CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_TABLE_INVALID_FORMAT                ))
-
-   setItemDelegate      (new t_ItemDelegate (this));
-   setSelectionBehavior (QAbstractItemView::SelectRows     );
-   setSelectionMode     (QAbstractItemView::SingleSelection);
-
-   pOwn = new t_TableLocal;
-   pOwn->pDeviceList          = pDeviceList;
-   pOwn->SlowDownAcquisitions = false;
-
-   verticalHeader  ()->hide                  ();
-   horizontalHeader()->setClickable          (true);
-   horizontalHeader()->setSortIndicatorShown (true);
-
-   pOwn->pActionAcquire    = new QAction(tr("Acquire"          , "Context menu"), this);  addAction (pOwn->pActionAcquire   );
-   pOwn->pActionAbort      = new QAction(tr("Abort acquisition", "Context menu"), this);  addAction (pOwn->pActionAbort     );
-   pOwn->pActionDeviceInfo = new QAction(tr("Info"             , "Context menu"), this);  addAction (pOwn->pActionDeviceInfo);
-
-   CHK_QT_EXIT (connect (this, SIGNAL(clicked (const QModelIndex &)), this, SLOT(SlotMouseClick(const QModelIndex &))))
-
-
-//   pOwn->pTable->setContextMenuPolicy (Qt::ActionsContextMenu);
-}
-
-t_Table::~t_Table ()
-{
-   delete pOwn;
-}
-
-APIRET t_Table::GetDeviceUnderCursor (t_pDevice &pDevice)
-{
-   QModelIndex Index;
-   int         Row;
-   int         Count;
-
-   pDevice = NULL;
-   QModelIndexList IndexList = selectionModel()->selectedRows();
-   Count = IndexList.count();
-   switch (Count)
-   {
-      case 0:  break;
-      case 1:  Index = IndexList.first();
-               Row = model()->data(Index, t_ItemDelegate::RowNrRole).toInt();
-               pDevice = pOwn->pDeviceList->at(Row);
-               break;
-      default: LOG_ERROR ("Strange, several rows seem to be selected.")
-   }
-
-   return NO_ERROR;
-}
-
-void t_Table::contextMenuEvent (QContextMenuEvent *pEvent)
-{
-   QAction     *pAction;
-   QAction       LocalIndicator (tr("Local Device - cannot be acquired"), this);
-   QMenu         Menu;
-   QPoint        Pos;
-   t_pDevice    pDevice;
-   int           CorrectedY;
-   int           Row;
-   QModelIndex   Index;
-   bool          Running;
-
-   Pos = mapFromGlobal (pEvent->globalPos());           // The event coordinates are absolute screen coordinates, map them withb this widget
-   CorrectedY = Pos.y() - horizontalHeader()->height(); // QTableView::rowAt seems to have a bug: It doesn't include the header height in the calculations. So, we correct it here.
-   Pos.setY (CorrectedY);
-
-   Index = indexAt (Pos);
-   selectRow (Index.row());
-   Row = model()->data(Index, t_ItemDelegate::RowNrRole).toInt();
-
-   if ((Row < 0) || (Row >= pOwn->pDeviceList->count())) // User clicked in the empty area
-      return;
-
-   pDevice = pOwn->pDeviceList->at(Row);
-//   LOG_INFO ("Context global %d -- widget %d -- corrected %d -- index %d", pEvent->globalPos().y(), Pos.y(), CorrectedY, RowIndex);
-
-   Running = pDevice->pThreadRead || pDevice->pThreadWrite;
-
-   pOwn->pActionAcquire->setEnabled (!Running);
-   pOwn->pActionAbort  ->setEnabled ( Running);
-
-   if (pDevice->Local)
-   {
-      LocalIndicator.setEnabled (false);
-      Menu.addAction (&LocalIndicator);
-      Menu.addSeparator ();
-   }
-   else
-   {
-      Menu.addAction (pOwn->pActionAcquire);
-      Menu.addAction (pOwn->pActionAbort  );
-   }
-   Menu.addAction (pOwn->pActionDeviceInfo);
-
-   pAction = Menu.exec (pEvent->globalPos());
-
-//   pAction = QMenu::exec (actions(), pEvent->globalPos());
-   if      (pAction == pOwn->pActionAcquire   ) CHK_EXIT (StartAcquisition  (pDevice))
-   if      (pAction == pOwn->pActionAbort     ) CHK_EXIT (AbortAcquisition  (pDevice))
-   else if (pAction == pOwn->pActionDeviceInfo) CHK_EXIT (ShowDeviceInfo    (pDevice))
-   else
-   {
-//      CHK_EXIT (ERROR_TABLE_INVALID_ACTION)
-   }
-}
-
-void t_Table::SlotMouseClick (const QModelIndex & Index)
-{
-   int Row;
-
-   selectRow (Index.row());
-   Row = model()->data (Index, t_ItemDelegate::RowNrRole).toInt();
-   emit (SignalDeviceSelected (pOwn->pDeviceList->at(Row)));
-}
-
-
-APIRET t_Table::ShowDeviceInfo (t_pcDevice pDevice)
-{
-   QString Info;
-
-   LOG_INFO ("Info for %s requested", QSTR_TO_PSZ(pDevice->LinuxDevice))
-   pOwn->SlowDownAcquisitions = true;
-   CHK (t_Info::GetDeviceInfo (pDevice, true, Info))
-   pOwn->SlowDownAcquisitions = false;
-   CHK (t_DlgMessage::Show (tr("Device info", "Dialog title"), Info, true))
-
-   return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------------------------------------------
-//
-//                                                     Acquistion start
-//
-// ----------------------------------------------------------------------------------------------------------------
-
-
-
-APIRET t_Table::InfoAcquisitionStart (t_pDevice pDevice)
-{
-   const char *pLibGuyToolsVersionInstalled;
-   const char *pLibEwfVersionInstalled;
-   QString      FormatDescription;
-   QString      FormatExtension;
-
-   CHK (pDevice->Info.Create())
-   CHK (pDevice->Info.Title   (tr("GUYMAGER ACQUISITION INFO FILE", "Info file")))
-
-   t_Log::GetLibGuyToolsVersion (&pLibGuyToolsVersionInstalled);
-   pLibEwfVersionInstalled = libewf_get_version ();
-
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.Title   (tr("Guymager", "Info file")))
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.AddRow (tr("Version:: %1"              , "Info file") .arg(pCompileInfoVersion  )))
-   CHK (pDevice->Info.AddRow (tr("Compilation timestamp:: %1", "Info file") .arg(pCompileInfoTimestamp)))
-   CHK (pDevice->Info.AddRow (tr("Compiled with:: %1 %2"     , "Info file") .arg("gcc") .arg(__VERSION__)))
-   CHK (pDevice->Info.AddRow (tr("libewf version:: %1"       , "Info file") .arg(pLibEwfVersionInstalled     )))
-   CHK (pDevice->Info.AddRow (tr("libguytools version:: %1"  , "Info file") .arg(pLibGuyToolsVersionInstalled)))
-   CHK (pDevice->Info.WriteTable ());
-
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.Title   (tr("Device information", "Info file")))
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.WriteDeviceInfo ())
-
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.Title   (tr("Image", "Info file")))
-   CHK (pDevice->Info.WriteLn ())
-   CHK (pDevice->Info.AddRow (tr("Linux device:: %1"    , "Info file").arg(pDevice->LinuxDevice) ))
-   CHK (pDevice->Info.AddRow (tr("Device size:: %1 (%2)", "Info file").arg(pDevice->Size) .arg(t_Device::GetSizeHuman(pDevice).toString())))
-   CHK (pDevice->Info.AddRow (tr("Image path and file name:: %1 %2" , "Info file").arg(pDevice->Acquisition.ImagePath) .arg(pDevice->Acquisition.ImageFilename)))
-   CHK (pDevice->Info.AddRow (tr("Info  path and file name:: %1 %2" , "Info file").arg(pDevice->Acquisition.InfoPath ) .arg(pDevice->Acquisition.InfoFilename )))
-
-   CHK (t_File::GetFormatDescription (pDevice->Acquisition.Format, FormatDescription))
-   CHK (t_File::GetFormatExtension   (pDevice->Acquisition.Format, NULL, &FormatExtension))
-
-   CHK (pDevice->Info.AddRow (tr("Image format:: %1 - file extension is %2", "Info file")  .arg(FormatDescription) .arg(FormatExtension)))
-
-   if (pDevice->Acquisition.CalcHashes)
-        CHK (pDevice->Info.AddRow (tr("Hash calculation:: on" , "Info file")))
-   else CHK (pDevice->Info.AddRow (tr("Hash calculation:: off", "Info file")))
-
-   if (pDevice->Acquisition.VerifySource)
-        CHK (pDevice->Info.AddRow (tr("Source verification:: on" , "Info file")))
-   else CHK (pDevice->Info.AddRow (tr("Source verification:: off", "Info file")))
-   CHK (pDevice->Info.WriteTable ());
-
-   return NO_ERROR;
-}
-
-APIRET t_Table::StartAcquisition (t_pDevice pDevice)
-{
-   t_DlgAcquire Dlg (pDevice, this);
-   QString      Format;
-   int          Fifos=0;
-
-   if (Dlg.exec() == QDialog::Accepted)
-   {
-      pOwn->SlowDownAcquisitions = true;
-      LOG_INFO ("Starting acquisition for %s", QSTR_TO_PSZ(pDevice->LinuxDevice))
-      CHK (Dlg.GetParameters (pDevice->Acquisition))
-      CHK (t_File::GetFormatExtension   (pDevice->Acquisition.Format, NULL, &Format))
-      LOG_INFO ("Image %s%s%s", QSTR_TO_PSZ(pDevice->Acquisition.ImagePath), QSTR_TO_PSZ(pDevice->Acquisition.ImageFilename), QSTR_TO_PSZ(Format))
-      LOG_INFO ("Info  %s%s%s" , QSTR_TO_PSZ(pDevice->Acquisition.InfoPath ), QSTR_TO_PSZ(pDevice->Acquisition.InfoFilename ), t_File::pExtensionInfo)
-
-      CHK (pDevice->SetMessage (QString()))
-      pDevice->State               = t_Device::Acquire;
-      pDevice->AbortReason         = t_Device::None;
-      pDevice->AbortRequest        = false;
-      pDevice->DeleteAfterAbort    = false;
-      pDevice->StartTimestampVerify= QDateTime();
-      pDevice->StopTimestamp       = QDateTime();
-      pDevice->PrevTimestamp       = QTime();
-      pDevice->PrevSpeed           = 0.0;
-      pDevice->PrevPos             = 0;
-      pDevice->SetCurrentWritePos (0LL);
-      pDevice->SetCurrentVerifyPos(0LL);
-      CHK (pDevice->ClearBadSectors ())
-
-      memset (&pDevice->MD5Digest         , 0, sizeof(pDevice->MD5Digest         ));
-      memset (&pDevice->MD5DigestVerify   , 0, sizeof(pDevice->MD5DigestVerify   ));
-      memset (&pDevice->SHA256Digest      , 0, sizeof(pDevice->SHA256Digest      ));
-      memset (&pDevice->SHA256DigestVerify, 0, sizeof(pDevice->SHA256DigestVerify));
-      pDevice->StartTimestamp = QDateTime::currentDateTime();
-      CHK (InfoAcquisitionStart (pDevice))
-
-      if (pDevice->pThreadRead  != NULL) CHK_EXIT (ERROR_TABLE_THREADREAD_ALREADY_RUNNING)
-      if (pDevice->pThreadWrite != NULL) CHK_EXIT (ERROR_TABLE_THREADWRITE_ALREADY_RUNNING)
-      if (pDevice->pThreadHash  != NULL) CHK_EXIT (ERROR_TABLE_THREADHASH_ALREADY_RUNNING)
-      if (!pDevice->ThreadCompressList.isEmpty()) CHK_EXIT (ERROR_TABLE_THREADCOMPRESS_ALREADY_RUNNING)
-      if ((pDevice->pFifoRead        != NULL) ||
-          (pDevice->pFifoHashIn      != NULL) ||
-          (pDevice->pFifoHashOut     != NULL) ||
-          (pDevice->pFifoCompressIn  != NULL) ||
-          (pDevice->pFifoCompressOut != NULL))
-         CHK_EXIT (ERROR_TABLE_FIFO_EXISTS)
-
-      // Create threads
-      // --------------
-      pDevice->pThreadRead  = new t_ThreadRead  (pDevice, &pOwn->SlowDownAcquisitions);
-      pDevice->pThreadWrite = new t_ThreadWrite (pDevice, &pOwn->SlowDownAcquisitions);
-      CHK_QT_EXIT (connect (pDevice->pThreadRead , SIGNAL(SignalEnded(t_pDevice)), this, SLOT(SlotThreadReadFinished (t_pDevice))))
-      CHK_QT_EXIT (connect (pDevice->pThreadWrite, SIGNAL(SignalEnded(t_pDevice)), this, SLOT(SlotThreadWriteFinished(t_pDevice))))
-
-      if (pDevice->HasHashThread())
-      {
-         pDevice->pThreadHash = new t_ThreadHash (pDevice);
-         CHK_QT_EXIT (connect (pDevice->pThreadHash, SIGNAL(SignalEnded(t_pDevice)), this, SLOT(SlotThreadHashFinished (t_pDevice))))
-      }
-
-      if (pDevice->HasCompressionThreads())
-      {
-         for (int i=0; i < CONFIG(CompressionThreads); i++)
-         {
-            t_pThreadCompress pThread;
-
-            pThread = new t_ThreadCompress (pDevice, i);
-            pDevice->ThreadCompressList.append (pThread);
-            CHK_QT_EXIT (connect (pThread, SIGNAL(SignalEnded(t_pDevice,int)), this, SLOT(SlotThreadCompressFinished (t_pDevice,int))))
-         }
-      }
-
-      // Create fifos and assign threads
-      // -------------------------------
-
-      switch (pDevice->Acquisition.Format)
-      {
-         case t_File::DD : pDevice->FifoBlockSize = CONFIG(FifoBlockSizeDD );   break;
-         case t_File::AFF: pDevice->FifoBlockSize = CONFIG(FifoBlockSizeAFF);   break;
-         case t_File::EWF:
-            if (pDevice->HasCompressionThreads())
-                 pDevice->FifoBlockSize = EWF_MULTITHREADED_COMPRESSION_CHUNK_SIZE;
-            else pDevice->FifoBlockSize = CONFIG(FifoBlockSizeEWF);
-            if (pDevice->FifoBlockSize != (unsigned int) CONFIG(FifoBlockSizeEWF))
-               LOG_INFO ("Running with FifoBlockSize of %d (no other size supported when running with multithreaded EWF compression)", pDevice->FifoBlockSize)
-            break;
-         default:  CHK (ERROR_TABLE_INVALID_FORMAT)
-      }
-
-      #define FIFO_MAX_BLOCKS(Fifos0)   std::max ((int)((((long long)CONFIG(FifoMaxMem))*BYTES_PER_MEGABYTE) / ((long long)pDevice->FifoBlockSize * (Fifos0))), 1)
-
-      if      (!pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         Fifos = 1;
-         pDevice->FifoMaxBlocks = FIFO_MAX_BLOCKS (Fifos);
-         pDevice->pFifoRead     = new t_FifoStd (pDevice->FifoMaxBlocks);
-         pDevice->pFifoWrite    = pDevice->pFifoRead;
-      }
-      else if ( pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         Fifos = 2;
-         pDevice->FifoMaxBlocks = FIFO_MAX_BLOCKS (Fifos);
-         pDevice->pFifoRead     = new t_FifoStd (pDevice->FifoMaxBlocks);
-         pDevice->pFifoHashIn   = pDevice->pFifoRead;
-         pDevice->pFifoHashOut  = new t_FifoStd (pDevice->FifoMaxBlocks);
-         pDevice->pFifoWrite    = pDevice->pFifoHashOut;
-      }
-      else if (!pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-      {
-         Fifos = 2 * CONFIG(CompressionThreads);
-         pDevice->FifoMaxBlocks    = FIFO_MAX_BLOCKS (Fifos);
-         pDevice->pFifoCompressIn  = new t_FifoCompressIn  (CONFIG(CompressionThreads), pDevice->FifoMaxBlocks);
-         pDevice->pFifoRead        = pDevice->pFifoCompressIn;
-         pDevice->pFifoCompressOut = new t_FifoCompressOut (CONFIG(CompressionThreads), pDevice->FifoMaxBlocks);
-         pDevice->pFifoWrite       = pDevice->pFifoCompressOut;
-      }
-      else if ( pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-      {
-         Fifos = 1 + 2 * CONFIG(CompressionThreads);
-         pDevice->FifoMaxBlocks    = FIFO_MAX_BLOCKS (Fifos);
-         pDevice->pFifoRead        = new t_FifoStd (pDevice->FifoMaxBlocks);
-         pDevice->pFifoHashIn      = pDevice->pFifoRead;
-         pDevice->pFifoCompressIn  = new t_FifoCompressIn  (CONFIG(CompressionThreads), pDevice->FifoMaxBlocks);
-         pDevice->pFifoHashOut     = pDevice->pFifoCompressIn;
-         pDevice->pFifoCompressOut = new t_FifoCompressOut (CONFIG(CompressionThreads), pDevice->FifoMaxBlocks);
-         pDevice->pFifoWrite       = pDevice->pFifoCompressOut;
-      }
-      #undef FIFO_MAX_BLOCKS
-      LOG_INFO ("Acquisition runs with %d fifos, each one with space for %d blocks of %d bytes (%0.1f MB per acquisition)",
-                Fifos, pDevice->FifoMaxBlocks, pDevice->FifoBlockSize, (double)(Fifos * pDevice->FifoMaxBlocks * pDevice->FifoBlockSize) / BYTES_PER_MEGABYTE)
-
-      // Start threads
-      // -------------
-      pDevice->pThreadRead ->start(QThread::LowPriority);
-      if (pDevice->HasHashThread())
-         pDevice->pThreadHash->start(QThread::LowPriority);
-      for (int i=0; i < pDevice->ThreadCompressList.count(); i++)
-         pDevice->ThreadCompressList[i]->start(QThread::LowPriority);
-      pDevice->pThreadWrite->start(QThread::LowPriority);
-
-      pOwn->SlowDownAcquisitions = false;
-   }
-
-   return NO_ERROR;
-}
-
-
-// ----------------------------------------------------------------------------------------------------------------
-//
-//                                                     Acquistion end
-//
-// ----------------------------------------------------------------------------------------------------------------
-
-APIRET t_Table::InfoAcquisitionBadSectors (t_pDevice pDevice, bool Verify)
-{
-   QList<quint64> BadSectors;
-   quint64        Count, i;
-   quint64        From, To, Next;
-   int            LineEntries    =  0;
-   const int      MaxLineEntries = 10;
-   bool           First          = true;
-
-   CHK (pDevice->GetBadSectors (BadSectors, Verify))
-   Count = BadSectors.count();
-   if (Count)
-   {
-      if (Verify)
-           LOG_INFO ("During verification, %lld bad sectors have been encountered", Count)
-      else LOG_INFO ("During acquisition, %lld bad sectors have been encountered", Count)
-
-      if (Verify)
-           CHK (pDevice->Info.WriteLn (tr("During verification, %1 bad sectors have been encountered. The sector numbers are:", "Info file") .arg(Count)))
-      else CHK (pDevice->Info.WriteLn (tr("During acquisition, %1 bad sectors have been encountered. They have been replaced by zeroed sectors. The sector numbers are:", "Info file") .arg(Count)))
-      CHK (pDevice->Info.WriteLn ("   "))
-      i = 0;
-      while (i<Count)
-      {
-         From = BadSectors.at(i++);
-         To   = From;
-         while (i < Count)
-         {
-            Next = BadSectors.at(i);
-            if (Next != To+1)
-               break;
-            To = Next;
-            i++;
-         }
-         if (!First)
-         {
-            if (LineEntries >= MaxLineEntries)
-            {
-               CHK (pDevice->Info.Write   (","))
-               CHK (pDevice->Info.WriteLn ("   "))
-               LineEntries = 0;
-            }
-            else
-            {
-               CHK (pDevice->Info.Write (", "))
-            }
-         }
-         First = false;
-         if (From == To)
-         {
-            CHK (pDevice->Info.Write ("%Lu", From))
-            LineEntries++;
-         }
-         else
-         {
-            CHK (pDevice->Info.Write ("%Lu-%Lu", From, To))
-            LineEntries += 2;
-         }
-      }
-   }
-   else
-   {
-      if (Verify)
-      {
-         LOG_INFO ("No bad sectors encountered during verification.")
-         CHK (pDevice->Info.WriteLn (tr("No bad sectors encountered during verification.", "Info file")))
-      }
-      else
-      {
-         LOG_INFO ("No bad sectors encountered during acquisition.")
-         CHK (pDevice->Info.WriteLn (tr("No bad sectors encountered during acquisition.", "Info file")))
-      }
-   }
-
-   return NO_ERROR;
-}
-
-static APIRET TableTimestampToISO (const QDateTime &Timestamp, QString &Str)
-{
-   Str = Timestamp.toString (Qt::ISODate);
-   Str.replace ("T", " ");
-   return NO_ERROR;
-}
-
-APIRET t_Table::InfoAcquisitionEnd (t_pDevice pDevice)
-{
-   QString    MD5;
-   QString    MD5Verify;
-   QString    SHA256;
-   QString    SHA256Verify;
-   QString    StateStr;
-   quint64    BadSectors;
-   QString    StartStr, StopStr, VerifyStr;
-   int        Hours, Minutes, Seconds;
-   double     Speed;
-
-   CHK (pDevice->Info.WriteLn ())
-   CHK (InfoAcquisitionBadSectors (pDevice, false))
-   if (!pDevice->StartTimestampVerify.isNull())
-      CHK (InfoAcquisitionBadSectors (pDevice, true))
-   MD5 = tr("--", "Info file");
-   MD5Verify    = MD5;
-   SHA256       = MD5;
-   SHA256Verify = MD5;
-
-   switch (pDevice->State)
-   {
-      case t_Device::Finished:
-         StateStr = tr("Finished successfully", "Info file");
-         BadSectors = t_Device::GetBadSectorCount(pDevice).toULongLong();
-         if (BadSectors)
-            StateStr += " " + tr("(with %1 bad sectors)", "Info file, may be appended to 'finished successfully' message") .arg(BadSectors);
-         if (pDevice->Acquisition.CalcHashes)
-         {
-            CHK (HashMD5DigestStr    (&pDevice->MD5Digest   , MD5   ))
-            CHK (HashSHA256DigestStr (&pDevice->SHA256Digest, SHA256))
-         }
-         if (pDevice->Acquisition.VerifySource)
-         {
-            CHK (HashMD5DigestStr    (&pDevice->MD5DigestVerify   , MD5Verify   ))
-            CHK (HashSHA256DigestStr (&pDevice->SHA256DigestVerify, SHA256Verify))
-         }
-         break;
-
-      case t_Device::Aborted:
-         switch (pDevice->AbortReason)
-         {
-            case t_Device::UserRequest:
-               StateStr = tr("Aborted by user", "Info file") + " ";
-               if (pDevice->StartTimestampVerify.isNull())
-               {
-                  StateStr += tr("(during acquisition)"     , "Info file");
-               }
-               else
-               {
-                  StateStr += tr("(during source verification)", "Info file");
-                  if (pDevice->Acquisition.CalcHashes)                            // If the user interrupted during verification (i.e. after
-                  {                                                               // acquisition), we can calculate the acquisition hash.
-                     CHK (HashMD5DigestStr    (&pDevice->MD5Digest   , MD5   ))
-                     CHK (HashSHA256DigestStr (&pDevice->SHA256Digest, SHA256))
-                  }
-               }
-               break;
-            case t_Device::ThreadWriteFileError: StateStr = tr("Aborted because of image write error", "Info file"); break;
-            default:                             StateStr = tr("Aborted, strange reason (%1)"        , "Info file") .arg(pDevice->AbortReason); break;
-         }
-         break;
-
-      default:
-         StateStr = tr("Strange state (%1)", "Info file") .arg(pDevice->State);
-   }
-   CHK (pDevice->Info.WriteLn (tr("State: %1", "Info file") .arg(StateStr)))
-   CHK (pDevice->Info.WriteLn ())
-
-   CHK (pDevice->Info.AddRow (tr("MD5 hash:: %1"            , "Info file") .arg(MD5         )))
-   CHK (pDevice->Info.AddRow (tr("MD5 hash verified:: %1"   , "Info file") .arg(MD5Verify   )))
-   CHK (pDevice->Info.AddRow (tr("SHA256 hash:: %1"         , "Info file") .arg(SHA256      )))
-   CHK (pDevice->Info.AddRow (tr("SHA256 hash verified:: %1", "Info file") .arg(SHA256Verify)))
-   CHK (pDevice->Info.WriteTable ());
-   if ((pDevice->State == t_Device::Finished) && pDevice->Acquisition.CalcHashes &&
-                                                 pDevice->Acquisition.VerifySource)
-   {
-      if (HashMD5Match   (&pDevice->MD5Digest   , &pDevice->MD5DigestVerify   ) &&
-          HashSHA256Match(&pDevice->SHA256Digest, &pDevice->SHA256DigestVerify))
-           CHK (pDevice->Info.WriteLn (tr ("The hash values are identical. The device delivered the same data during acquisition and verification.")))
-      else CHK (pDevice->Info.WriteLn (tr ("The hash values differ. The device didn't deliver the same data during acquisition and verification. "
-                                           "Maybe you try to acquire the device once again. Check as well if the defect sector list was "
-                                           "the same during acquisition and verification (see above).")))
-   }
-   CHK (pDevice->Info.WriteLn ())
-
-   // Performance
-   // -----------
-   CHK (TableTimestampToISO (pDevice->StartTimestamp, StartStr))
-   CHK (TableTimestampToISO (pDevice->StopTimestamp , StopStr ))
-   StartStr += " " + tr("(ISO format YYYY-MM-DD HH:MM:SS)");
-   Seconds  = pDevice->StartTimestamp.secsTo (pDevice->StopTimestamp);
-   Hours    = Seconds / SECONDS_PER_HOUR  ; Seconds -= Hours   * SECONDS_PER_HOUR;
-   Minutes  = Seconds / SECONDS_PER_MINUTE; Seconds -= Minutes * SECONDS_PER_MINUTE;
-
-   if (pDevice->Acquisition.VerifySource)
-   {
-      if (!pDevice->StartTimestampVerify.isNull())
-           CHK (TableTimestampToISO (pDevice->StartTimestampVerify , VerifyStr))
-      else VerifyStr = tr ("Acquisition aborted before start of verification");
-
-      CHK (pDevice->Info.AddRow (tr("Acquisition started:: %1" , "Info file") .arg(StartStr )))
-      CHK (pDevice->Info.AddRow (tr("Verification started:: %1", "Info file") .arg(VerifyStr)))
-      CHK (pDevice->Info.AddRow (tr("Ended:: %1 (%2 hours, %3 minutes and %4 seconds)", "Info file").arg(StopStr ) .arg(Hours) .arg(Minutes) .arg(Seconds)))
-
-      if (pDevice->StartTimestampVerify.isNull())
-           Seconds = pDevice->StartTimestamp.secsTo (pDevice->StopTimestamp);
-      else Seconds = pDevice->StartTimestamp.secsTo (pDevice->StartTimestampVerify);
-      Speed = (double) pDevice->CurrentReadPos / ((double)BYTES_PER_MEGABYTE * (double)Seconds);
-      Hours   = Seconds / SECONDS_PER_HOUR  ; Seconds -= Hours   * SECONDS_PER_HOUR;
-      Minutes = Seconds / SECONDS_PER_MINUTE; Seconds -= Minutes * SECONDS_PER_MINUTE;
-      CHK (pDevice->Info.AddRow (tr("Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)", "Info file").arg(Speed, 0, 'f', 2) .arg(Hours) .arg(Minutes) .arg(Seconds)))
-
-      if (!pDevice->StartTimestampVerify.isNull())
-      {
-         Seconds = pDevice->StartTimestampVerify.secsTo (pDevice->StopTimestamp);
-         Speed = (double) pDevice->CurrentReadPos / ((double)BYTES_PER_MEGABYTE * (double)Seconds);
-         Hours   = Seconds / SECONDS_PER_HOUR  ; Seconds -= Hours   * SECONDS_PER_HOUR;
-         Minutes = Seconds / SECONDS_PER_MINUTE; Seconds -= Minutes * SECONDS_PER_MINUTE;
-         CHK (pDevice->Info.AddRow (tr("Verification speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)", "Info file").arg(Speed, 0, 'f', 2) .arg(Hours) .arg(Minutes) .arg(Seconds)))
-      }
-      CHK (pDevice->Info.WriteTable ());
-   }
-   else
-   {
-      CHK (pDevice->Info.AddRow (tr("Acquisition started:: %1"                        , "Info file").arg(StartStr)))
-      CHK (pDevice->Info.AddRow (tr("Ended:: %1 (%2 hours, %3 minutes and %4 seconds)", "Info file").arg(StopStr ) .arg(Hours) .arg(Minutes) .arg(Seconds)))
-
-      Seconds = pDevice->StartTimestamp.secsTo (pDevice->StopTimestamp);
-      Speed = (double) pDevice->CurrentReadPos / ((double)BYTES_PER_MEGABYTE * (double)Seconds);
-      Hours   = Seconds / SECONDS_PER_HOUR  ; Seconds -= Hours   * SECONDS_PER_HOUR;
-      Minutes = Seconds / SECONDS_PER_MINUTE; Seconds -= Minutes * SECONDS_PER_MINUTE;
-      CHK (pDevice->Info.AddRow (tr("Acquisition speed:: %1 MByte/s (%2 hours, %3 minutes and %4 seconds)", "Info file").arg(Speed, 0, 'f', 2) .arg(Hours) .arg(Minutes) .arg(Seconds)))
-      CHK (pDevice->Info.WriteTable ());
-   }
-   CHK (pDevice->Info.WriteLn ());
-   CHK (pDevice->Info.WriteLn ());
-
-   return NO_ERROR;
-}
-
-APIRET t_Table::FinaliseThreadStructs (t_pDevice pDevice)
-{
-   if ((pDevice->pThreadRead  == NULL) &&        // TableCleanupThreadStructs is called upon every thread's end,
-       (pDevice->pThreadWrite == NULL) &&        // but its core only is executed after the last thread ended (as
-       (pDevice->pThreadHash  == NULL) &&        // we must not kill vital structures as long as any threads are
-       (pDevice->ThreadCompressList.isEmpty()))  // still running).
-   {
-      if      (!pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         delete pDevice->pFifoRead;
-      }
-      else if ( pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-      {
-         delete pDevice->pFifoRead;
-         delete pDevice->pFifoHashOut;
-      }
-      else if (!pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-      {
-         delete pDevice->pFifoCompressIn;
-         delete pDevice->pFifoCompressOut;
-      }
-      else if ( pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-      {
-         delete pDevice->pFifoRead;
-         delete pDevice->pFifoCompressIn;
-         delete pDevice->pFifoCompressOut;
-      }
-
-      pDevice->pFifoRead        = NULL;
-      pDevice->pFifoHashIn      = NULL;
-      pDevice->pFifoHashOut     = NULL;
-      pDevice->pFifoWrite       = NULL;
-      pDevice->pFifoCompressIn  = NULL;
-      pDevice->pFifoCompressOut = NULL;
-
-//      LibEwfGetMemStats (&LibEwfAllocs, &LibEwfFrees);
-//      LOG_INFO ("LIBEWF mem  statistics: %d allocated - %d freed = %d remaining", LibEwfAllocs, LibEwfFrees, LibEwfAllocs - LibEwfFrees)
-
-      LOG_INFO ("Acquisition of %s: All structures cleaned.", QSTR_TO_PSZ (pDevice->LinuxDevice))
-
-      if (pDevice->AbortRequest)
-           pDevice->State = t_Device::Aborted;
-      else pDevice->State = t_Device::Finished;
-
-      if (!pDevice->DeleteAfterAbort)
-         CHK_EXIT (InfoAcquisitionEnd (pDevice))
-   }
-
-   return NO_ERROR;
-}
-
-void t_Table::SlotThreadReadFinished (t_pDevice pDevice)
-{
-   LOG_INFO ("Acquisition of %s: Reading thread finished", QSTR_TO_PSZ (pDevice->LinuxDevice))
-   pDevice->pThreadRead->deleteLater();
-   pDevice->pThreadRead = NULL;
-
-   if (pDevice->AbortRequest)
-        CHK_EXIT (WakeWaitingThreads(pDevice))
-   else CHK_EXIT (pDevice->pFifoRead->InsertDummy ())
-   CHK_EXIT (FinaliseThreadStructs (pDevice))
-}
-
-void t_Table::SlotThreadHashFinished (t_pDevice pDevice)
-{
-   LOG_INFO ("Acquisition of %s: Hash thread finished", QSTR_TO_PSZ (pDevice->LinuxDevice))
-   pDevice->pThreadHash->deleteLater();
-   pDevice->pThreadHash = NULL;
-
-   if (pDevice->AbortRequest)
-        CHK_EXIT (WakeWaitingThreads(pDevice))
-   else CHK_EXIT (pDevice->pFifoHashOut->InsertDummy ())
-   CHK_EXIT (FinaliseThreadStructs (pDevice))
-}
-
-void t_Table::SlotThreadCompressFinished (t_pDevice pDevice, int ThreadNr)
-{
-   bool NoMoreThreads = true;
-
-   LOG_INFO ("Acquisition of %s: Compression thread #%d finished", QSTR_TO_PSZ (pDevice->LinuxDevice), ThreadNr)
-
-   pDevice->ThreadCompressList[ThreadNr]->deleteLater();
-   pDevice->ThreadCompressList[ThreadNr] = NULL;
-
-   for (int i=0;
-        (i < pDevice->ThreadCompressList.count()) && NoMoreThreads;
-        i++)
-      NoMoreThreads = (pDevice->ThreadCompressList[i] == NULL);
-
-   if (NoMoreThreads)
-   {
-       LOG_INFO ("All %d compression threads finished", pDevice->ThreadCompressList.count())
-       pDevice->ThreadCompressList.clear();
-   }
-
-   if (pDevice->AbortRequest)
-        CHK_EXIT (WakeWaitingThreads(pDevice))
-   else CHK_EXIT (pDevice->pFifoCompressOut->InsertDummy (ThreadNr))
-
-   CHK_EXIT (FinaliseThreadStructs (pDevice))
-}
-
-void t_Table::SlotThreadWriteFinished (t_pDevice pDevice)
-{
-   LOG_INFO ("Acquisition of %s: Writing thread finished", QSTR_TO_PSZ (pDevice->LinuxDevice))
-
-   pDevice->pThreadWrite->deleteLater();
-   pDevice->pThreadWrite = NULL;
-
-   if (pDevice->AbortRequest)
-      CHK_EXIT (WakeWaitingThreads(pDevice))
-
-   CHK_EXIT (FinaliseThreadStructs (pDevice))
-}
-
-APIRET t_Table::AbortAcquisition0 (t_pDevice pDevice)
-{
-   if (pDevice->pThreadRead == NULL)
-   {
-      LOG_INFO ("User pressed abort, but acquisition on %s is no longer running (it probably ended between the user's click and this message)", QSTR_TO_PSZ(pDevice->LinuxDevice))
-      return NO_ERROR;
-   }
-
-   LOG_INFO ("User aborts acquisition on %s", QSTR_TO_PSZ(pDevice->LinuxDevice))
-   pDevice->AbortReason  = t_Device::UserRequest;
-   pDevice->AbortRequest = true;
-
-   CHK (WakeWaitingThreads (pDevice))
-
-   return NO_ERROR;
-}
-
-APIRET t_Table::AbortAcquisition (t_pDevice pDevice)
-{
-   bool Abort;
-
-   CHK (t_DlgAbort::Show (pDevice, Abort, pDevice->DeleteAfterAbort))
-   if (Abort)
-      CHK (AbortAcquisition0 (pDevice))
-
-   return NO_ERROR;
-}
-
-APIRET t_Table::AbortAllAcquisitions (void)
-{
-   t_pDevice pDevice;
-   int        i;
-
-   for (i=0; i<pOwn->pDeviceList->count(); i++)
-   {
-      pDevice = pOwn->pDeviceList->at(i);
-      if ((pDevice->State == t_Device::Acquire)       ||
-          (pDevice->State == t_Device::AcquirePaused) ||
-          (pDevice->State == t_Device::Verify)        ||
-          (pDevice->State == t_Device::VerifyPaused))
-      {
-         CHK (AbortAcquisition0 (pDevice))
-      }
-   }
-
-   return NO_ERROR;
-}
-
-APIRET t_Table::WakeWaitingThreads (t_pDevice pDevice)
-{
-   if      (!pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-   {
-      CHK (pDevice->pFifoRead->WakeWaitingThreads())
-   }
-   else if ( pDevice->HasHashThread() && !pDevice->HasCompressionThreads())
-   {
-      CHK (pDevice->pFifoRead   ->WakeWaitingThreads())
-      CHK (pDevice->pFifoHashOut->WakeWaitingThreads())
-   }
-   else if (!pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-   {
-      CHK (pDevice->pFifoCompressIn ->WakeWaitingThreads())
-      CHK (pDevice->pFifoCompressOut->WakeWaitingThreads())
-   }
-   else if ( pDevice->HasHashThread() &&  pDevice->HasCompressionThreads())
-   {
-      CHK (pDevice->pFifoRead       ->WakeWaitingThreads())
-      CHK (pDevice->pFifoCompressIn ->WakeWaitingThreads())
-      CHK (pDevice->pFifoCompressOut->WakeWaitingThreads())
-   }
-
-   return NO_ERROR;
-}
-
diff --git a/table.h b/table.h
deleted file mode 100644
index 36a5acb..0000000
--- a/table.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         The table widget (central widget of the application)
-// ****************************************************************************
-
-
-
-#ifndef __TABLE_H__
-#define __TABLE_H__
-
-#include <QtGui>      //lint !e537 Repeated include
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-class t_TableLocal;
-
-class t_Table: public QTableView
-{
-   Q_OBJECT
-
-   public:
-      t_Table ();
-      t_Table (QWidget *pParent, t_pDeviceList pDeviceList);
-     ~t_Table ();
-
-      APIRET AbortAllAcquisitions (void);
-      APIRET GetDeviceUnderCursor (t_pDevice &pDevice);
-
-   private:
-      APIRET ShowDeviceInfo            (t_pcDevice pDevice);
-      APIRET StartAcquisition          (t_pDevice  pDevice);
-      APIRET AbortAcquisition0         (t_pDevice  pDevice);
-      APIRET AbortAcquisition          (t_pDevice  pDevice);
-      APIRET InfoAcquisitionStart      (t_pDevice  pDevice);
-      APIRET InfoAcquisitionBadSectors (t_pDevice  pDevice, bool Verify);
-      APIRET InfoAcquisitionEnd        (t_pDevice  pDevice);
-      APIRET WakeWaitingThreads        (t_pDevice  pDevice);
-      APIRET FinaliseThreadStructs     (t_pDevice  pDevice);
-
-   protected:
-      void   contextMenuEvent          (QContextMenuEvent *pEvent);
-
-   private slots:
-      void SlotMouseClick             (const QModelIndex & index);
-      void SlotThreadReadFinished     (t_pDevice pDevice);
-      void SlotThreadWriteFinished    (t_pDevice pDevice);
-      void SlotThreadHashFinished     (t_pDevice pDevice);
-      void SlotThreadCompressFinished (t_pDevice pDevice, int ThreadNr);
-
-   signals:
-      void SignalDeviceSelected (t_pDevice pDevice);
-
-   private:
-      t_TableLocal *pOwn;
-};
-
-typedef t_Table *t_pTable;
-
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-   #ifdef __MODULES_H__
-      enum
-      {
-         ERROR_TABLE_INVALID_ACTION = ERROR_BASE_TABLE + 1,
-         ERROR_TABLE_THREADREAD_ALREADY_RUNNING,
-         ERROR_TABLE_THREADHASH_ALREADY_RUNNING,
-         ERROR_TABLE_THREADWRITE_ALREADY_RUNNING,
-         ERROR_TABLE_THREADCOMPRESS_ALREADY_RUNNING,
-         ERROR_TABLE_THREADREAD_DOESNT_EXIT,
-         ERROR_TABLE_FIFO_EXISTS,
-         ERROR_TABLE_CONSTRUCTOR_NOT_SUPPORTED,
-         ERROR_TABLE_INVALID_FORMAT
-      };
-   #endif
-
-#endif
diff --git a/threadcompress.cpp b/threadcompress.cpp
deleted file mode 100644
index cc92069..0000000
--- a/threadcompress.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Multi-threaded compression
-// ****************************************************************************
-
-
-#include <QtCore>
-
-#include "libewf.h"
-
-#include "common.h"
-#include "device.h"
-#include "threadcompress.h"
-#include "threadwrite.h"
-#include "config.h"
-#include "aaff.h"
-
-class t_ThreadCompressLocal
-{
-   public:
-      t_pDevice pDevice;
-      int        ThreadNr;
-};
-
-t_ThreadCompress::t_ThreadCompress (void)
-{
-   CHK_EXIT (ERROR_THREADCOMPRESS_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-
-t_ThreadCompress::t_ThreadCompress (t_pDevice pDevice, int ThreadNr)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADCOMPRESS_CONSTRUCTOR_NOT_SUPPORTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADCOMPRESS_ZLIB_FAILED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADCOMPRESS_LIBEWF_FAILED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADCOMPRESS_COMPRESSION_BUFFER_TOO_SMALL))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADCOMPRESS_INVALID_FORMAT))
-
-      Initialised = true;
-   }
-
-   pOwn = new t_ThreadCompressLocal;
-   pOwn->pDevice  = pDevice;
-   pOwn->ThreadNr = ThreadNr;
-
-   CHK_QT_EXIT (connect (this, SIGNAL(finished()), this, SLOT(SlotFinished())))
-}
-
-t_ThreadCompress::~t_ThreadCompress (void)
-{
-   delete pOwn;
-}
-
-
-void t_ThreadCompress::run (void)
-{
-   t_pDevice      pDevice;
-   t_pFifoStd     pFifoIn;
-   t_pFifoStd     pFifoOut;
-   t_pFifoBlock   pFifoBlockIn;
-   t_pFifoBlock   pFifoBlockOut;
-   bool            Finished  = false;
-   quint64         Blocks    = 0;
-   const int       SubFifoNr = pOwn->ThreadNr;
-   size_t          CompressedMaxSize = 0;
-   size_t          CompressedSize    = 0;
-   LIBEWF_HANDLE *pEwfHandle;
-   ssize_t         rc;
-
-   LOG_INFO ("Acquisition of %s: Compression thread #%d started", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice), pOwn->ThreadNr)
-
-   pDevice  = pOwn->pDevice;
-
-   if (pDevice->Acquisition.Format == t_File::EWF)
-   {
-      CompressedMaxSize = (size_t) (pDevice->FifoBlockSize *1.001) + 12; // see zlib documentation
-      if (CompressedMaxSize > t_Fifo::GetCompressionOptimisedBufferSize (pDevice->FifoBlockSize))
-         CHK_EXIT (ERROR_THREADCOMPRESS_COMPRESSION_BUFFER_TOO_SMALL)
-   }
-
-   CHK_EXIT (pDevice->pThreadWrite->GetpFileHandle ((void **)&pEwfHandle))
-   CHK_EXIT (pDevice->pFifoCompressIn ->GetSubFifo (SubFifoNr, pFifoIn ))
-   CHK_EXIT (pDevice->pFifoCompressOut->GetSubFifo (SubFifoNr, pFifoOut))
-
-   while (!Finished && !pDevice->AbortRequest)
-   {
-      CHK_EXIT (pFifoIn->Get (pFifoBlockIn))
-      if (pFifoBlockIn)
-      {
-         Blocks++;
-         switch (pDevice->Acquisition.Format)
-         {
-            case t_File::EWF:
-               CHK_EXIT (t_Fifo::CreateCompressionOptimised (pFifoBlockOut, pDevice->FifoBlockSize))
-
-               CompressedSize          = CompressedMaxSize;   // Must be initialised with the max buffer size (we use this one instead of MULTITHREADED_COMPRESSION_FIFO_BLOCK_SIZE in order to check if ti works as tols in the zlib docu)
-               pFifoBlockOut->Nr       = pFifoBlockIn->Nr;
-               pFifoBlockOut->DataSize = pFifoBlockIn->DataSize;
-
-               rc = libewf_raw_write_prepare_buffer (pEwfHandle, pFifoBlockIn ->Buffer, pFifoBlockIn->DataSize,
-                                                                 pFifoBlockOut->Buffer, &CompressedSize,
-                                                                &pFifoBlockOut->EwfCompressionUsed,
-                                                                &pFifoBlockOut->EwfChunkCRC,
-                                                                &pFifoBlockOut->EwfWriteCRC);
-               if (pFifoBlockOut->EwfCompressionUsed)
-               {
-                  pFifoBlockOut->EwfDataSize = CompressedSize;   // Data to be forwarded is contained in
-                  CHK_EXIT (t_Fifo::Destroy (pFifoBlockIn))      // pFifoBlockOut, pFifoBlockIn no longer needed.
-               }
-               else
-               {
-                  pFifoBlockIn->EwfDataSize        = pFifoBlockIn ->DataSize;
-                  pFifoBlockIn->EwfCompressionUsed = pFifoBlockOut->EwfCompressionUsed;
-                  pFifoBlockIn->EwfChunkCRC        = pFifoBlockOut->EwfChunkCRC;
-                  pFifoBlockIn->EwfWriteCRC        = pFifoBlockOut->EwfWriteCRC;
-                  CHK_EXIT (t_Fifo::Destroy (pFifoBlockOut))                     // No compression, we'll forward the
-                  pFifoBlockOut = pFifoBlockIn;                                  // original block we received
-               }
-
-               if (rc != (ssize_t) pFifoBlockOut->EwfDataSize)
-               {
-                  LOG_INFO ("libewf_raw_write_prepare_buffer returned %d. DataSize=%u, CompressedMaxSize=%zd, CompressedSize=%zd, EwfCompressionUsed=%d", (int)rc,
-                            pFifoBlockOut->DataSize, CompressedMaxSize, CompressedSize, pFifoBlockOut->EwfCompressionUsed)
-                  CHK_EXIT (ERROR_THREADCOMPRESS_LIBEWF_FAILED)
-               }
-               pFifoBlockOut->EwfPreprocessed = true;
-               break;
-
-            case t_File::AFF:
-//               LOG_ERROR ("AaffPreprocess")
-               CHK_EXIT (t_Fifo::CreateCompressionOptimised (pFifoBlockOut, pDevice->FifoBlockSize))
-               pFifoBlockOut->Nr       = pFifoBlockIn->Nr;
-               pFifoBlockOut->DataSize = pFifoBlockIn->DataSize;
-
-               CHK_EXIT (AaffPreprocess (&pFifoBlockOut->pAaffPreprocess, pFifoBlockIn->Buffer, pFifoBlockIn->DataSize, pFifoBlockOut->Buffer, pFifoBlockOut->BufferSize))
-
-               if (pFifoBlockOut->pAaffPreprocess->Compressed)
-               {
-                  CHK_EXIT (t_Fifo::Destroy (pFifoBlockIn))
-               }
-               else
-               {
-                  pFifoBlockIn->pAaffPreprocess = pFifoBlockOut->pAaffPreprocess;
-                  CHK_EXIT (t_Fifo::Destroy (pFifoBlockOut))
-                  pFifoBlockOut = pFifoBlockIn;
-               }
-               break;
-
-            default:
-               CHK_EXIT (ERROR_THREADCOMPRESS_INVALID_FORMAT)
-         }
-         CHK_EXIT (pFifoOut->Insert (pFifoBlockOut))
-      }
-      else
-      {
-         LOG_INFO ("Dummy block")
-         Finished = true;
-      }
-   }
-
-   LOG_INFO ("Compression thread #%d exits now (device %s, %Ld blocks processed)", pOwn->ThreadNr, QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice), Blocks)
-}
-
-
-void t_ThreadCompress::SlotFinished (void)
-{
-   emit SignalEnded (pOwn->pDevice, pOwn->ThreadNr);
-}
-
diff --git a/threadcompress.h b/threadcompress.h
deleted file mode 100644
index be9422e..0000000
--- a/threadcompress.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Multi-threaded compression
-// ****************************************************************************
-
-
-#ifndef __THREADCOMPRESS_H__
-#define __THREADCOMPRESS_H__
-
-#include <QThread>   //lint !e537 Repeated include
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-class t_ThreadCompressLocal;
-
-class t_ThreadCompress: public QThread
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadCompress ();
-      t_ThreadCompress (t_pDevice pDevice, int ThreadNr);
-     ~t_ThreadCompress ();
-
-   protected:
-      void run (void);
-
-   signals:
-      void SignalEnded (t_pDevice pDevice, int ThreadNr);
-
-   private slots:
-      void SlotFinished (void);
-
-   private:
-      t_ThreadCompressLocal *pOwn;
-};
-
-typedef t_ThreadCompress *t_pThreadCompress;
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_THREADCOMPRESS_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_THREADCOMPRESS + 1,
-   ERROR_THREADCOMPRESS_ZLIB_FAILED,
-   ERROR_THREADCOMPRESS_LIBEWF_FAILED,
-   ERROR_THREADCOMPRESS_COMPRESSION_BUFFER_TOO_SMALL,
-   ERROR_THREADCOMPRESS_INVALID_FORMAT
-};
-
-#endif
-
diff --git a/threadhash.cpp b/threadhash.cpp
deleted file mode 100644
index be3e644..0000000
--- a/threadhash.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for calculating hashes
-// ****************************************************************************
-
-#include <QtCore>
-
-#include "common.h"
-#include "device.h"
-#include "threadhash.h"
-#include "threadwrite.h"
-#include "hash.h"
-
-class t_ThreadHashLocal
-{
-   public:
-      t_pDevice pDevice;
-};
-
-t_ThreadHash::t_ThreadHash(void)
-{
-   CHK_EXIT (ERROR_THREADHASH_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-
-t_ThreadHash::t_ThreadHash (t_pDevice pDevice)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADHASH_CONSTRUCTOR_NOT_SUPPORTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADHASH_LIBEWF_FAILED))
-      Initialised = true;
-   }
-
-   pOwn = new t_ThreadHashLocal;
-   pOwn->pDevice = pDevice;
-
-   CHK_QT_EXIT (connect (this, SIGNAL(finished()), this, SLOT(SlotFinished())))
-}
-
-t_ThreadHash::~t_ThreadHash (void)
-{
-   delete pOwn;
-}
-
-void t_ThreadHash::run (void)
-{
-   t_pDevice          pDevice;
-   t_pFifoBlock       pFifoBlock;
-   bool                Finished;
-   quint64           *pBlocks;
-   quint64             BlocksCalculated = 0;
-   quint64             BlocksVerified   = 0;
-   t_HashContextMD5    HashContextMD5;
-   t_HashContextSHA256 HashContextSHA256;
-   bool                VerifyLoop = false;
-
-   LOG_INFO ("Acquisition of %s: Hash thread started", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice))
-   pDevice = pOwn->pDevice;
-   pBlocks = &BlocksCalculated;
-   for (;;)  // The whole loop is done 2 times if the user chose to do a source verification, 1 time otherwise.
-   {
-      *pBlocks = 0;
-      Finished = false;
-      CHK_EXIT (HashMD5Init    (&HashContextMD5   ))
-      CHK_EXIT (HashSHA256Init (&HashContextSHA256))
-      do
-      {
-         CHK_EXIT (pDevice->pFifoHashIn->Get (pFifoBlock))
-         if (pFifoBlock)
-         {
-            (*pBlocks)++;
-            CHK_EXIT (HashMD5Append    (&HashContextMD5   , pFifoBlock->Buffer, pFifoBlock->DataSize))
-            CHK_EXIT (HashSHA256Append (&HashContextSHA256, pFifoBlock->Buffer, pFifoBlock->DataSize))
-            if (VerifyLoop)
-            {
-               pDevice->IncCurrentVerifyPos(pFifoBlock->DataSize);
-               CHK_EXIT (t_Fifo::Destroy              (pFifoBlock))
-            }
-            else
-            {
-               CHK_EXIT (pDevice->pFifoHashOut->Insert (pFifoBlock))
-            }
-         }
-         else
-         {
-            LOG_INFO ("Dummy block")
-            Finished = true;
-         }
-      } while (!Finished && !pDevice->AbortRequest);
-      if (pDevice->AbortRequest)
-      {
-         break;
-      }
-      else if (VerifyLoop)
-      {
-         CHK_EXIT (HashMD5Digest    (&HashContextMD5   , &pDevice->MD5DigestVerify   ))
-         CHK_EXIT (HashSHA256Digest (&HashContextSHA256, &pDevice->SHA256DigestVerify))
-         break;
-      }
-      else if (pDevice->Acquisition.VerifySource)
-      {
-         CHK_EXIT (HashMD5Digest    (&HashContextMD5   , &pDevice->MD5Digest   ))
-         CHK_EXIT (HashSHA256Digest (&HashContextSHA256, &pDevice->SHA256Digest))
-         pBlocks = &BlocksVerified;
-         VerifyLoop = true;
-      }
-      else
-      {
-         CHK_EXIT (HashMD5Digest    (&HashContextMD5   , &pDevice->MD5Digest   ))
-         CHK_EXIT (HashSHA256Digest (&HashContextSHA256, &pDevice->SHA256Digest))
-         break;
-      }
-   }
-
-   if (pDevice->Acquisition.VerifySource)
-        LOG_INFO ("Hash thread exits now (device %s, %Ld blocks processed, %Ld blocks verified)", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice), BlocksCalculated, BlocksVerified)
-   else LOG_INFO ("Hash thread exits now (device %s, %Ld blocks processed)"                     , QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice), BlocksCalculated)
-}
-
-
-void t_ThreadHash::SlotFinished (void)
-{
-   emit SignalEnded (pOwn->pDevice);
-}
-
diff --git a/threadhash.h b/threadhash.h
deleted file mode 100644
index 194aa32..0000000
--- a/threadhash.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for calculating hashes
-// ****************************************************************************
-
-
-#ifndef __THREADHASH_H__
-#define __THREADHASH_H__
-
-#include <QThread>   //lint !e537 Repeated include
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-class t_ThreadHashLocal;
-
-class t_ThreadHash: public QThread
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadHash ();
-      t_ThreadHash (t_pDevice pDevice);
-     ~t_ThreadHash ();
-
-   protected:
-      void run (void);
-
-   signals:
-      void SignalEnded (t_pDevice pDevice);
-
-   private slots:
-      void SlotFinished (void);
-
-   private:
-      t_ThreadHashLocal *pOwn;
-};
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_THREADHASH_CONSTRUCTOR_NOT_SUPPORTED = ERROR_BASE_THREADHASH + 1,
-   ERROR_THREADHASH_LIBEWF_FAILED
-};
-
-#endif
-
diff --git a/threadread.cpp b/threadread.cpp
deleted file mode 100644
index 07bb582..0000000
--- a/threadread.cpp
+++ /dev/null
@@ -1,452 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for reading data.
-// ****************************************************************************
-
-#include <errno.h>
-
-#include <QtCore>
-
-#include "common.h"
-#include "config.h"
-#include "device.h"
-#include "threadread.h"
-#include "threadwrite.h"
-
-#include "fcntl.h"
-//##define _GNU_SOURCE
-
-const int THREADREAD_CHECK_CONNECTED_SLEEP = 1000;
-const int THREADREAD_SLOWDOWN_SLEEP        =  700;
-
-
-class t_ThreadReadLocal
-{
-   public:
-      t_pDevice     pDevice;
-      bool         *pSlowDownRequest;
-};
-
-t_ThreadRead::t_ThreadRead(void)
-{
-   CHK_EXIT (ERROR_THREADREAD_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-t_ThreadRead::t_ThreadRead (t_pDevice pDevice, bool *pSlowDownRequest)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_FILESRC_ALREADY_OPEN     ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_NO_DATA                  ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_DEVICE_DISCONNECTED      ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_UNEXPECTED_FAILURE       ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_CONSTRUCTOR_NOT_SUPPORTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_BLOCKSIZE                ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_DEVICE_ABORTED           ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_LIBEWF_FAILED            ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADREAD_BAD_FILE_HANDLE          ))
-      Initialised = true;
-   }
-
-   pOwn = new t_ThreadReadLocal;
-   pOwn->pDevice          = pDevice;
-   pOwn->pSlowDownRequest = pSlowDownRequest;
-
-   CHK_QT_EXIT (connect (this, SIGNAL(finished()), this, SLOT(SlotFinished())))
-}
-
-t_ThreadRead::~t_ThreadRead (void)
-{
-   delete pOwn;
-}
-
-inline bool ThreadReadEOF (t_pcDevice pDevice)
-{
-//   LOG_INFO ("EOF check %Ld %Ld", pDevice->CurrentPos, pDevice->Size)
-   return (pDevice->CurrentReadPos >= pDevice->Size);
-}
-
-static APIRET ThreadReadCheckDeviceExists (t_pcDevice pDevice, bool &DeviceExists)
-{
-   FILE *pFileTest;
-
-   pFileTest = fopen64 (QSTR_TO_PSZ(pDevice->LinuxDevice), "r");
-   DeviceExists = (pFileTest != NULL);
-   if (DeviceExists)
-      (void) fclose (pFileTest);
-
-   return NO_ERROR;
-}
-
-static APIRET ThreadReadDeviceDisconnected (t_pDevice pDevice)
-{
-   if (pDevice->pFileSrc)
-   {
-      (void) fclose (pDevice->pFileSrc);
-      pDevice->pFileSrc = NULL;
-   }
-   if (pDevice->State == t_Device::Acquire)
-        pDevice->State = t_Device::AcquirePaused;
-   else pDevice->State = t_Device::VerifyPaused;
-   LOG_INFO ("Device %s disconnected, switching device state to %s", QSTR_TO_PSZ(pDevice->LinuxDevice), pDevice->StateStr())
-
-   return ERROR_THREADREAD_DEVICE_DISCONNECTED;
-}
-
-static APIRET ThreadReadAdjustSeek (t_pDevice pDevice)        // According to the GNU Clib docu, a seek should be done after read errors
-{
-   int rc;
-
-   if (pDevice->pFileSrc == NULL)
-      CHK (ERROR_THREADREAD_FILESRC_NOT_OPEN)
-
-   if (ThreadReadEOF (pDevice))
-      return NO_ERROR;
-
-   rc = fseeko64 (pDevice->pFileSrc, (off64_t)pDevice->CurrentReadPos, SEEK_SET);
-   if (rc)
-      CHK_RET (ThreadReadDeviceDisconnected (pDevice))
-
-   return NO_ERROR;
-}
-
-//static APIRET ThreadReadDirectMode (FILE *pFileSrc, bool Enable)
-//{
-//   int OldFlags, NewFlags, rc;
-//   int FileDescriptor;
-//
-//   FileDescriptor = fileno (pFileSrc);
-//   if (FileDescriptor == -1)
-//      CHK (ERROR_THREADREAD_BAD_FILE_HANDLE)
-//
-//   OldFlags = fcntl (FileDescriptor, F_GETFL);
-//   if (OldFlags > 0)
-//   {
-//      NewFlags = (Enable ? (OldFlags |  O_DIRECT)
-//                         : (OldFlags & ~O_DIRECT));
-//      if (NewFlags != OldFlags)
-//      {
-//         rc = fcntl (FileDescriptor, F_SETFL, NewFlags);
-//         if (rc == -1)
-//            LOG_INFO ("Setting flags with fcntl failed. Direct mode state unknown.")
-//      }
-//      LOG_INFO ("Direct mode %s", Enable ? "enabled" : "disabled")
-//   }
-//   else
-//   {
-//      LOG_INFO ("Reading flags with fcntl failed. Direct mode remains unchanged")
-//   }
-//
-//   return NO_ERROR;
-//}
-
-static APIRET ThreadReadBlock0 (t_pDevice pDevice, unsigned char *pBuffer, unsigned int Size)
-{
-   bool DeviceExists;
-   int  Read;
-
-   errno = 0;
-   if (pDevice->pFileSrc == NULL)
-   {
-      pDevice->pFileSrc = fopen64 (QSTR_TO_PSZ(pDevice->LinuxDevice), "r");
-      if (!pDevice->pFileSrc)
-         CHK_RET (ThreadReadDeviceDisconnected (pDevice))
-      CHK_RET (ThreadReadAdjustSeek (pDevice))
-
-//      CHK (ThreadReadDirectMode (pDevice->pFileSrc, true))
-   }
-
-   Read = (int) fread (pBuffer, Size, 1, pDevice->pFileSrc); //lint !e732 !e712 loss of sign/precision arg 2
-   // ev. zusaetzlich ferror abfragen
-
-// Bad sector simulation
-//   if ((pDevice->CurrentReadPos > 500000) && (pDevice->CurrentReadPos < 600000) ||
-//       (pDevice->CurrentReadPos > 700000) && (pDevice->CurrentReadPos < 740000) ||
-//       (pDevice->CurrentReadPos == 0) || (pDevice->CurrentReadPos == 512) || (pDevice->CurrentReadPos == 1024))
-//      Read = 0;
-
-   switch (Read)
-   {
-      case  1: pDevice->CurrentReadPos += Size;
-               return NO_ERROR;
-
-      case  0:
-//               LOG_INFO ("Read error at position %lld", pDevice->CurrentReadPos)
-
-               CHK (ThreadReadCheckDeviceExists (pDevice, DeviceExists))
-               if (DeviceExists)
-               {
-//                  LOG_DEBUG ("Device still exists")
-                  CHK_RET (ThreadReadAdjustSeek (pDevice))
-//                  LOG_DEBUG ("Seek adjusted")
-                  return ERROR_THREADREAD_NO_DATA;
-               }
-               else
-               {
-                  CHK_RET (ThreadReadDeviceDisconnected (pDevice))
-               }
-               break;
-
-      default: CHK_CONST (ERROR_THREADREAD_UNEXPECTED_FAILURE)
-   }
-
-   return NO_ERROR;
-}
-
-
-APIRET t_ThreadRead::ThreadReadBlock (t_pFifoBlock &pFifoBlock)
-{
-   t_pDevice      pDevice;
-   unsigned char *pBuffer;
-   quint64         BytesToRead;
-   quint64         BytesRead = 0;
-   quint64         RemainingSize;
-   quint64         Sector;
-   quint64         PrevReadPos;
-   unsigned int    ReadTry;
-   APIRET          RcRead;
-   APIRET          RcSeek;
-
-   pDevice       = pOwn->pDevice;
-   PrevReadPos   = pDevice->CurrentReadPos;
-   RemainingSize = pDevice->Size - pDevice->CurrentReadPos;
-   if ((quint64)pDevice->FifoBlockSize > RemainingSize)
-        BytesToRead = RemainingSize;
-   else BytesToRead = pDevice->FifoBlockSize;
-
-   if (BytesToRead > INT_MAX)
-      CHK (ERROR_THREADREAD_BLOCKSIZE)
-
-   if (pDevice->HasCompressionThreads())
-        CHK (t_Fifo::CreateCompressionOptimised (pFifoBlock, pDevice->FifoBlockSize))
-   else CHK (t_Fifo::Create (pFifoBlock, (unsigned int) BytesToRead))
-
-   pFifoBlock->DataSize = (unsigned int) BytesToRead;
-   pBuffer = pFifoBlock->Buffer;
-
-   if (pDevice->FallbackMode)
-        ReadTry = pDevice->SectorSize;
-   else ReadTry = BytesToRead;
-   do
-   {
-      RcRead = ThreadReadBlock0 (pDevice, pBuffer, ReadTry);
-      switch (RcRead)
-      {
-         case NO_ERROR:
-            BytesRead += ReadTry;
-            pBuffer   += ReadTry;
-            break;
-
-         case ERROR_THREADREAD_NO_DATA:
-            if (!pDevice->FallbackMode)
-            {
-               pDevice->FallbackMode = true;
-//               ReadTry = (int) std::min (pDevice->SectorSize, pDevice->SectorSizePhys);
-               ReadTry = pDevice->SectorSize;
-//               CHK (ThreadReadDirectMode (pDevice->pFileSrc, true))
-               LOG_INFO ("Device read error, switching %s to slow fallback mode. Reading sectors individually from now on.", QSTR_TO_PSZ(pDevice->LinuxDevice))
-            }
-            else
-            {
-               Sector = pDevice->CurrentReadPos / pDevice->SectorSize;
-               pDevice->CurrentReadPos += ReadTry;
-               RcSeek = ThreadReadAdjustSeek (pDevice); // If the seek still succeeds, then there's probably just a bad sector on
-               switch (RcSeek)                          // the source device, let's replace it by a zero sector.
-               {
-                  case NO_ERROR:
-                     if ((pDevice->Acquisition.Format == t_File::AFF) && (CONFIG (AffMarkBadSectors)))
-                          CHK (AaffCopyBadSectorMarker (pBuffer, ReadTry))
-                     else memset (pBuffer, 0, ReadTry);
-                     BytesRead += ReadTry;
-                     pBuffer   += ReadTry;
-                     LOG_INFO ("Read error on %s, sector %Ld, bad data replaced by zero block", QSTR_TO_PSZ(pDevice->LinuxDevice), Sector)
-                     pDevice->AddBadSector (Sector);
-                     break;
-                  case ERROR_THREADREAD_DEVICE_DISCONNECTED:
-                     break;
-                  default:
-                     CHK (RcSeek)
-               }
-            }
-            break;
-
-         case ERROR_THREADREAD_DEVICE_DISCONNECTED:
-            break;
-
-         default:
-            CHK (RcRead)
-      }
-   } while ((BytesRead < BytesToRead) && (pDevice->State != t_Device::AcquirePaused)
-                                      && (pDevice->State != t_Device::VerifyPaused )
-                                      && !pDevice->AbortRequest);
-
-   if ((pDevice->State == t_Device::AcquirePaused) ||
-       (pDevice->State == t_Device::VerifyPaused ))
-   {
-      CHK (t_Fifo::Destroy (pFifoBlock))
-      pDevice->CurrentReadPos = PrevReadPos;
-
-      return ERROR_THREADREAD_DEVICE_DISCONNECTED;
-   }
-   else if (pDevice->AbortRequest)
-   {
-      CHK (t_Fifo::Destroy (pFifoBlock))
-
-      return ERROR_THREADREAD_DEVICE_ABORTED;
-   }
-   else if ((pDevice->FallbackMode) && (RcRead == NO_ERROR))
-   {
-      pDevice->FallbackMode = false;  // Switch to fast reading mode if last read was good
-      LOG_INFO ("Device read ok again. Switching %s to fast block read.", QSTR_TO_PSZ(pDevice->LinuxDevice))
-//      CHK (ThreadReadDirectMode (pDevice->pFileSrc, false))
-   }
-
-   pFifoBlock->LastBlock = ThreadReadEOF (pDevice);
-
-   return NO_ERROR;
-}
-
-void t_ThreadRead::run (void)
-{
-   t_pDevice          pDevice;
-   t_pFifoBlock       pFifoBlock;
-   APIRET              rc;
-   int                 rcf;
-   bool                CalcHashes;
-   quint64           *pBlocks;
-   quint64             BlocksRead     = 0;
-   quint64             BlocksVerified = 0;
-   quint64             BytesRead      = 0;
-   quint64             BytesVerified  = 0;
-   t_HashContextMD5    HashContextMD5;
-   t_HashContextSHA256 HashContextSHA256;
-
-   LOG_INFO ("Acquisition of %s: Reading thread started", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice))
-   pDevice = pOwn->pDevice;
-   CalcHashes = pDevice->Acquisition.CalcHashes && !CONFIG (UseSeparateHashThread);
-   pBlocks = &BlocksRead;
-   pDevice->State = t_Device::Acquire;
-   for (;;)
-   {
-      pDevice->pFileSrc       = NULL;
-      pDevice->CurrentReadPos = 0;
-      pDevice->FallbackMode   = false;
-      *pBlocks = 0;
-      if (CalcHashes)
-      {
-         CHK_EXIT (HashMD5Init    (&HashContextMD5   ))
-         CHK_EXIT (HashSHA256Init (&HashContextSHA256))
-      }
-      do
-      {
-         if (*(pOwn->pSlowDownRequest))
-            msleep (THREADREAD_SLOWDOWN_SLEEP);
-
-         rc = ThreadReadBlock (pFifoBlock);
-         switch (rc)
-         {
-            case NO_ERROR:
-               pFifoBlock->Nr = (*pBlocks);
-
-               if (CalcHashes)
-               {
-                  CHK_EXIT (HashMD5Append    (&HashContextMD5   , pFifoBlock->Buffer, pFifoBlock->DataSize))
-                  CHK_EXIT (HashSHA256Append (&HashContextSHA256, pFifoBlock->Buffer, pFifoBlock->DataSize))
-               }
-               if ((pDevice->State == t_Device::Verify) && CalcHashes)
-               {
-                  pDevice->IncCurrentVerifyPos(pFifoBlock->DataSize);
-                  CHK_EXIT (t_Fifo::Destroy (pFifoBlock))
-               }
-               else
-               {
-                  CHK_EXIT (pDevice->pFifoRead->Insert (pFifoBlock))
-               }
-               (*pBlocks)++;
-               break;
-
-            case ERROR_THREADREAD_DEVICE_DISCONNECTED:
-               while (!pDevice->AbortRequest && ((pDevice->State == t_Device::AcquirePaused) ||
-                                                 (pDevice->State == t_Device::VerifyPaused )) )
-                  msleep (THREADREAD_CHECK_CONNECTED_SLEEP);
-               break;
-
-            case ERROR_THREADREAD_DEVICE_ABORTED:
-               break;
-            default:
-               LOG_ERROR ("Unexpected return code ThreadReadBlock")
-               CHK_EXIT (rc)
-         }
-      } while (!ThreadReadEOF(pDevice) && !pDevice->AbortRequest);
-
-      if (pDevice->State == t_Device::Acquire)
-           BytesRead     = pDevice->CurrentReadPos;
-      else BytesVerified = pDevice->CurrentReadPos;
-
-      if (pDevice->AbortRequest)
-         break;
-
-      if (pDevice->State == t_Device::Verify)
-      {
-         if (CalcHashes)
-         {
-            CHK_EXIT (HashMD5Digest    (&HashContextMD5   , &pDevice->MD5DigestVerify   ))
-            CHK_EXIT (HashSHA256Digest (&HashContextSHA256, &pDevice->SHA256DigestVerify))
-         }
-         LOG_INFO ("Source verification completed (device %s)", QSTR_TO_PSZ (pDevice->LinuxDevice))
-         break;
-      }
-
-      if (CalcHashes)
-      {
-         CHK_EXIT (HashMD5Digest    (&HashContextMD5   , &pDevice->MD5Digest   ))
-         CHK_EXIT (HashSHA256Digest (&HashContextSHA256, &pDevice->SHA256Digest))
-      }
-
-      if (pDevice->Acquisition.VerifySource)
-      {
-         (void) fclose (pDevice->pFileSrc);
-         LOG_INFO ("All data has been read (device %s), now re-reading for source verification", QSTR_TO_PSZ (pDevice->LinuxDevice))
-         pDevice->State = t_Device::Verify;
-         pDevice->StartTimestampVerify = QDateTime::currentDateTime();
-         pBlocks = &BlocksVerified;
-         if (!CalcHashes)
-            CHK_EXIT (pDevice->pFifoRead->InsertDummy ())
-      }
-      else
-      {
-         LOG_INFO ("All data has been read (device %s)", QSTR_TO_PSZ (pDevice->LinuxDevice))
-         break;
-      }
-   }
-
-   if (pDevice->pFileSrc)
-   {
-      rcf = fclose (pDevice->pFileSrc);
-      pDevice->pFileSrc = NULL;
-      if (rcf)
-      {
-         LOG_INFO ("Unexpected error on fclose, errno = %d", errno)
-         pDevice->AbortReason  = t_Device::ThreadReadFileError;
-         pDevice->AbortRequest = true;
-      }
-   }
-
-   LOG_INFO ("Reading thread exits now (device %s, %Ld blocks read, %llu bytes)", QSTR_TO_PSZ (pDevice->LinuxDevice), BlocksRead, BytesRead)
-   if (pDevice->Acquisition.VerifySource)
-   LOG_INFO ("                    (for the verification: %Ld blocks read, %llu bytes)", BlocksVerified, BytesVerified)
-}
-
-void t_ThreadRead::SlotFinished (void)
-{
-   emit SignalEnded (pOwn->pDevice);
-}
-
diff --git a/threadread.h b/threadread.h
deleted file mode 100644
index 4000f0e..0000000
--- a/threadread.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for reading data.
-// ****************************************************************************
-
-
-#ifndef __THREADREAD_H__
-#define __THREADREAD_H__
-
-#include <QThread>
-
-#ifndef __DEVICE_H__
-   #include "device.h"
-#endif
-
-class t_ThreadReadLocal;
-
-class t_ThreadRead: public QThread
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadRead ();
-      t_ThreadRead (t_pDevice pDevice, bool *pSlowDownRequest);
-     ~t_ThreadRead ();
-
-   protected:
-      void   run             (void);
-      APIRET ThreadReadBlock (t_pFifoBlock &pFifoBlock);
-
-   signals:
-      void SignalEnded (t_pDevice pDevice);
-
-   private slots:
-      void SlotFinished (void);
-
-   private:
-      t_ThreadReadLocal *pOwn;
-};
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_THREADREAD_FILESRC_ALREADY_OPEN = ERROR_BASE_THREADREAD + 1,
-   ERROR_THREADREAD_FILESRC_NOT_OPEN,
-   ERROR_THREADREAD_NO_DATA,
-   ERROR_THREADREAD_DEVICE_DISCONNECTED,
-   ERROR_THREADREAD_UNEXPECTED_FAILURE,
-   ERROR_THREADREAD_CONSTRUCTOR_NOT_SUPPORTED,
-   ERROR_THREADREAD_BLOCKSIZE,
-   ERROR_THREADREAD_DEVICE_ABORTED,
-   ERROR_THREADREAD_LIBEWF_FAILED,
-   ERROR_THREADREAD_BAD_FILE_HANDLE
-};
-
-#endif
-
diff --git a/threadscan.cpp b/threadscan.cpp
deleted file mode 100644
index daaa61c..0000000
--- a/threadscan.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for scanning the connected devices
-// ****************************************************************************
-
-#include <QtCore>
-#include <QtDBus/QtDBus>
-
-#include "toolconstants.h"
-
-#include "common.h"
-#include "config.h"
-#include "device.h"
-#include "qtutil.h"
-#include "threadscan.h"
-
-// --------------------------
-//         Constants
-// --------------------------
-
-const int THREADSCAN_WAIT_MAX         = 5000;
-const int THREADSCAN_WAIT_GRANULARITY = 100;
-
-
-// -----------------------------------
-//  Utility functions used by workers
-// -----------------------------------
-
-static APIRET ThreadScanMarkLocalDevices (const t_pDeviceList pDeviceList)
-{
-   QStringList *pLocalDevices;
-   t_pDevice    pDevice;
-   int           i;
-
-   CHK_EXIT (CfgGetLocalDevices (&pLocalDevices))
-   for (i=0; i<pDeviceList->count(); i++)
-   {
-      pDevice = pDeviceList->at (i);
-      pDevice->Local = pLocalDevices->contains (pDevice->SerialNumber) ||
-                       pLocalDevices->contains (pDevice->LinuxDevice );
-   }
-   return NO_ERROR;
-}
-
-// --------------------------
-//  t_ThreadScanWorkerParted
-// --------------------------
-
-// Scan the devices using libparted and bash command to gather device info
-
-static APIRET ThreadScanGetSerialNumber (char const *pcDeviceName, QString &SerialNumber)
-{
-   QString Command;
-   APIRET  rc;
-
-   Command = CONFIG (CommandGetSerialNumber);
-   Command.replace ("%dev", pcDeviceName, Qt::CaseInsensitive);
-
-   rc = QtUtilProcessCommand (Command, SerialNumber);
-   if (rc == ERROR_QTUTIL_COMMAND_TIMEOUT)
-      return rc;
-   CHK(rc)
-   SerialNumber = SerialNumber.trimmed();
-
-   return NO_ERROR;
-}
-
-t_ThreadScanWorkerParted::t_ThreadScanWorkerParted ()
-{
-}
-
-void t_ThreadScanWorkerParted::SlotRescan (void)
-{
-   t_pDeviceList  pDeviceList;
-   t_pDevice      pDevice;
-   PedDevice     *pPedDev;
-   QString         SerialNumber;
-   APIRET          rc;
-
-   emit (SignalScanStarted ());
-   LOG_INFO ("Rescanning devices")
-
-   ped_device_probe_all();
-
-   pDeviceList = new t_DeviceList;
-   pPedDev     = NULL;
-   while ((pPedDev = ped_device_get_next (pPedDev)))  //lint !e820
-   {
-      rc = ThreadScanGetSerialNumber (pPedDev->path, SerialNumber);
-      if (rc == ERROR_QTUTIL_COMMAND_TIMEOUT)
-      {
-         LOG_INFO ("Device scan aborted due to timeout while trying to get serial number for %s", pPedDev->path)
-         ped_device_free_all ();
-         delete pDeviceList;
-         return;
-      }
-      pDevice = pDeviceList->AppendNew (SerialNumber, pPedDev);
-      if (pDevice->LinuxDevice.startsWith ("/dev/fd",  Qt::CaseSensitive)) // Not a good way for checking this, but I don't know how to extract the information from
-         pDevice->Removable = true;                                        // PedDevice. BTW, this won't work with other removable devices, for instance memory sticks.
-   }
-   ped_device_free_all ();
-   CHK_EXIT (ThreadScanMarkLocalDevices (pDeviceList))
-
-   emit (SignalScanFinished (pDeviceList));
-}
-
-// --------------------------
-//  t_ThreadScanWorkerHAL
-// --------------------------
-
-// Scan the devices using DBUS/HAL
-
-#define HAL_SERVICE      "org.freedesktop.Hal"
-#define HAL_MANAGER_PATH "/org/freedesktop/Hal/Manager"
-#define HAL_MANAGER_IF   "org.freedesktop.Hal.Manager"
-#define HAL_DEVICE_IF    "org.freedesktop.Hal.Device"
-
-class t_ThreadScanWorkerHALLocal
-{
-   public:
-      t_ThreadScanWorkerHALLocal (void)
-      {
-         pDBusConnection = new QDBusConnection (QDBusConnection::systemBus());
-         pDBusInterface  = NULL;
-      }
-
-     ~t_ThreadScanWorkerHALLocal ()
-      {
-         QDBusConnection::disconnectFromBus (pDBusConnection->baseService());
-         delete pDBusConnection;
-         pDBusConnection = NULL;
-         pDBusInterface  = NULL;
-      }
-
-   public:
-      QDBusConnection          *pDBusConnection;
-      QDBusConnectionInterface *pDBusInterface;
-};
-
-
-t_ThreadScanWorkerHAL::t_ThreadScanWorkerHAL (void)
-{
-   pOwn = new t_ThreadScanWorkerHALLocal;
-   if (!pOwn->pDBusConnection->isConnected())
-      CHK_EXIT (ERROR_THREADSCAN_DBUS_CONNECTION)
-
-   pOwn->pDBusInterface = pOwn->pDBusConnection->interface();
-   if (!pOwn->pDBusInterface->isServiceRegistered (HAL_SERVICE))
-      CHK_EXIT (ERROR_THREADSCAN_HAL_NOT_REGISTERED)
-}
-
-t_ThreadScanWorkerHAL::~t_ThreadScanWorkerHAL (void)
-{
-   delete pOwn;
-}
-
-QList<QVariant> t_ThreadScanWorkerHAL::CallMethod (const QString &Device, const QString &Method, const QString &Argument)
-{
-   QList<QVariant> Args;
-   QDBusMessage    Message = QDBusMessage::createMethodCall (HAL_SERVICE, Device, HAL_DEVICE_IF, Method);
-   QDBusMessage    Reply;
-
-   Args += Argument;
-   Message.setArguments (Args);
-   Reply = pOwn->pDBusConnection->call (Message);
-
-   if (Reply.type() == QDBusMessage::ErrorMessage)
-   {
-      LOG_ERROR ("DBus returned '%s' for method %s on device %s", QSTR_TO_PSZ (Reply.errorName()),
-                                                                  QSTR_TO_PSZ (Method),
-                                                                  QSTR_TO_PSZ (Device))
-      return QList<QVariant>(); // return empty list
-   }
-
-   return Reply.arguments();
-}
-
-QVariant t_ThreadScanWorkerHAL::CallMethodSingle (const QString &Device, const QString &Method, const QString &Argument)
-{
-   QList<QVariant> Results;
-
-   Results = CallMethod (Device, Method, Argument);
-   if (Results.first().isNull())
-      return QVariant();
-
-   return Results.first();
-}
-
-APIRET t_ThreadScanWorkerHAL::GetProperty (const QString &Device, const QString &Property, QList<QVariant> &VarList)
-{
-   QVariant Exists;
-
-   Exists = CallMethodSingle (Device, "PropertyExists", Property);
-   if (Exists.toBool())
-        VarList = CallMethod (Device, "GetProperty", Property);
-   else VarList = QList<QVariant>();  // Construct an empty, invalid list to show that the property doesn't exist
-
-   return NO_ERROR;
-}
-
-APIRET t_ThreadScanWorkerHAL::GetPropertySingle (const QString &Device, const QString &Property, QVariant &Var)
-{
-   Var = CallMethodSingle (Device, "PropertyExists", Property);
-   if (Var.toBool())
-        Var = CallMethodSingle (Device, "GetProperty", Property);
-   else Var = QVariant();  // Construct an empty, invalid QVariant to show that the property doesn't exist
-
-   return NO_ERROR;
-}
-
-bool t_ThreadScanWorkerHAL::PropertyContains (const QString &Device, const QString &Property, const QString &Str)
-{
-   QList<QVariant> PropertyElements;
-   bool            Found = false;
-
-   CHK_EXIT (GetProperty (Device, Property, PropertyElements))
-
-   foreach (QVariant Element, PropertyElements)
-   {
-      if (Element.isValid())
-      {
-         switch (Element.type())
-         {
-            case QVariant::String    : Found = (Element.toString() == Str);                                  break;
-            case QVariant::StringList: Found =  Element.toStringList().contains (Str, Qt::CaseInsensitive);  break;
-            default                  : break;
-         }
-      }
-      if (Found)
-         break;
-   }
-   return Found;
-}
-
-void t_ThreadScanWorkerHAL::SlotRescan (void)
-{
-   t_pDeviceList   pDeviceList=NULL;
-   t_pDevice       pDevice;
-   QDBusMessage     Message;
-   QDBusMessage     Reply;
-   QStringList      DeviceList;
-   QVariant         Category;
-   QVariant         SerialNumber;
-   QVariant         LinuxDevice;
-   QVariant         Vendor;
-   QVariant         Product;
-   QVariant         Size;
-   QVariant         Removable;
-   QVariant         RemovableAvailable;
-   QString          Model;
-
-   if (thread() != QThread::currentThread())
-      CHK_EXIT (ERROR_THREADSCAN_CALLED_FROM_WRONG_THREAD) // As Qt's DBus system is quite sensible to this kind of
-                                                           // mistake (resulting in many QTimer "cannot be stopped/started
-                                                           // from another thread) we prefer to do the check here!
-   emit (SignalScanStarted ());
-   LOG_INFO ("Device scan started")
-
-   Message = QDBusMessage::createMethodCall (HAL_SERVICE, HAL_MANAGER_PATH, HAL_MANAGER_IF, "GetAllDevices");
-   Reply   = pOwn->pDBusConnection->call (Message);
-   if (Reply.type() == QDBusMessage::ErrorMessage)
-   {
-      LOG_ERROR ("DBus GetAllDevices returned %s", QSTR_TO_PSZ(Reply.errorName()))
-   }
-   else
-   {
-      pDeviceList = new t_DeviceList;
-      DeviceList  = Reply.arguments().first().toStringList();
-
-      //lint -save -e155 -e521
-      foreach (QString HalDevice, DeviceList)
-      //lint -restore
-      {
-         // Do not check the info.category any longer. It has been observed, that it may contain many different
-         // strings. For example, a phone had "portable_audio_player" in its info.category and was not detected,
-         // eventhough it was perfectly readable by dd.
-//         CHK_EXIT (GetPropertySingle (HalDevice, "info.category", Category))
-//         if (!Category.isValid())
-//            continue;
-//         if (Category != "storage")
-//            continue;
-
-         CHK_EXIT (GetPropertySingle (HalDevice, "block.device", LinuxDevice))
-         if (!LinuxDevice.isValid())
-            continue;
-
-         if (PropertyContains (HalDevice, "info.capabilities", "volume"))  // we only are interested in complete device (/dev/sda), not in volumes (/dev/sda1)
-            continue;
-
-         CHK_EXIT (GetPropertySingle (HalDevice, "storage.removable", Removable))
-         if (!Removable.isValid())
-         {
-            LOG_INFO ("Strange, %s is a block device but has no storage.removable property", QSTR_TO_PSZ(HalDevice))
-            continue;
-         }
-         if (Removable.toBool())
-         {
-            CHK_EXIT (GetPropertySingle (HalDevice, "storage.removable.media_available", RemovableAvailable))
-            if (RemovableAvailable.toBool())
-                 CHK_EXIT (GetPropertySingle (HalDevice, "storage.removable.media_size", Size))
-            else continue;
-         }
-         else
-         {
-            CHK_EXIT (GetPropertySingle (HalDevice, "storage.size", Size))
-         }
-
-         CHK_EXIT (GetPropertySingle (HalDevice, "storage.serial", SerialNumber))
-         CHK_EXIT (GetPropertySingle (HalDevice, "info.vendor"   , Vendor      ))
-         CHK_EXIT (GetPropertySingle (HalDevice, "info.product"  , Product     ))
-         if (!SerialNumber.isValid())
-            SerialNumber = "";  // Attention: Empty string must be used, else t_DeviceList::MatchDevice doesn't work
-         if (!Vendor.isValid() && !Product.isValid())
-              Model = "--";
-         else Model = Vendor.toString() + " " + Product.toString();
-         Model = Model.trimmed();
-
-         pDevice = pDeviceList->AppendNew (SerialNumber.toString(), LinuxDevice.toString(), Model,
-                                           DEVICE_DEFAULT_SECTOR_SIZE, DEVICE_DEFAULT_SECTOR_SIZE,
-                                           Size.toULongLong());
-//         pDevice = pDeviceList->AppendNew (SerialNumber.toString(), LinuxDevice.toString(), Model,
-//                                           DEVICE_DEFAULT_SECTOR_SIZE, DEVICE_DEFAULT_SECTOR_SIZE,
-//                                           1024*1024*1024);   // For test purposes
-         pDevice->Removable = Removable.toBool();
-
-
-      }
-   }
-   CHK_EXIT (ThreadScanMarkLocalDevices (pDeviceList))
-   LOG_INFO ("Device scan finished")
-
-   emit (SignalScanFinished (pDeviceList));
-}
-
-// --------------------------
-//        t_ThreadScan
-// --------------------------
-
-static APIRET ThreadScanRegisterErrorCodes (void)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      Initialised = true;
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_NOT_STARTED             ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_NOT_STOPPED             ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_EXITCODE_NONZERO        ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_PROCESS_NOTSTARTED      ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_PROCESS_NOTFINISHED     ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_DBUS_CONNECTION         ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_HAL_NOT_REGISTERED      ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_PROPERTY_NONEXISTENT    ))
-      CHK (TOOL_ERROR_REGISTER_CODE (ERROR_THREADSCAN_CALLED_FROM_WRONG_THREAD))
-   }
-   return NO_ERROR;
-}
-
-t_ThreadScan::t_ThreadScan (void)
-{
-   CHK_EXIT (ThreadScanRegisterErrorCodes())
-   ppoWorker = NULL;  //lint -esym(613, t_ThreadScan::ppoWorker)  Possible use of NULL pointer
-}
-
-APIRET t_ThreadScan::Start (t_ThreadScanWorker **ppWorker)
-{
-   int Wait;
-
-   *ppWorker = NULL;
-   ppoWorker = ppWorker;
-
-   start();
-//   start(QThread::HighPriority);
-
-   for ( Wait =  0;
-        (Wait <  THREADSCAN_WAIT_MAX) && (*ppWorker == NULL);
-         Wait += THREADSCAN_WAIT_GRANULARITY)
-      msleep (THREADSCAN_WAIT_GRANULARITY);
-
-   if (*ppWorker == NULL)
-      CHK (ERROR_THREADSCAN_NOT_STARTED)
-
-   return NO_ERROR;
-}
-
-APIRET t_ThreadScan::Stop ()
-{
-   time_t BeginT, NowT;
-   int    Wait;
-
-   quit(); // This tells t_ThreadScan::run to quit the exec() call
-
-   time (&BeginT);  // As we do not know how much time is spent in the different calls
-   do               // to processEvents, we have to measure the time ourselves
-   {
-      QCoreApplication::processEvents (QEventLoop::ExcludeUserInputEvents, THREADSCAN_WAIT_GRANULARITY);
-      time (&NowT);
-      Wait = (NowT-BeginT)*MSEC_PER_SECOND;
-   } while ((Wait < THREADSCAN_WAIT_MAX) && (*ppoWorker != NULL));
-
-   if (*ppoWorker != NULL)
-      CHK (ERROR_THREADSCAN_NOT_STOPPED)
-
-   return NO_ERROR;
-}
-
-
-void t_ThreadScan::run (void)
-{
-   QTimer *pTimer;
-   int      rc;
-
-   LOG_INFO ("Thread Scan started")
-   if (CONFIG(ScanUsingDbusHal))
-        *ppoWorker = new t_ThreadScanWorkerHAL    (); // We have to create this object as we want to work with signals
-   else *ppoWorker = new t_ThreadScanWorkerParted (); // and slots in this new thread. t_ThreadScan itself belongs to
-                                                      // the main thread and thus can't be used for signals and slots.
-//   pTimer = new QTimer(this); // Do not take "this" as parent, as "this" doesn't belong to the current thread (would lead to the error "Cannot create children for a parent that is in a different thread").
-   pTimer = new QTimer();
-   CHK_QT_EXIT (connect (pTimer, SIGNAL(timeout()), *ppoWorker, SLOT(SlotRescan())))
-   pTimer->start (CONFIG(ScanInterval) * MSEC_PER_SECOND);
-
-   rc = exec(); // Enter event loop
-   if (rc)
-   {
-      LOG_ERROR ("ThreadScan exits with code %d", rc)
-      CHK_EXIT (ERROR_THREADSCAN_EXITCODE_NONZERO)
-   }
-   LOG_INFO ("Thread Scan ended")
-   delete pTimer;
-   delete *ppoWorker;
-   *ppoWorker = NULL;
-}
-
-
-
diff --git a/threadscan.h b/threadscan.h
deleted file mode 100644
index 4589cfc..0000000
--- a/threadscan.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-
-#include <QObject>  //lint !e537 Repeated include
-#include <QThread>
-
-#ifndef __DEVICE_H__
-   #include "device.h"
-#endif
-
-#ifndef __COMMON_H__
-   #include "common.h"
-#endif
-
-class t_ThreadScanWorker: public QObject
-{
-   Q_OBJECT
-
-   public slots:
-      virtual void SlotRescan (void) = 0;
-
-   signals:
-      void SignalScanFinished (t_pDeviceList);
-      void SignalScanStarted  (void)         ;
-};
-
-class t_ThreadScanWorkerParted: public t_ThreadScanWorker
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadScanWorkerParted (void);
-
-   public slots:
-      void SlotRescan (void);
-};
-
-
-class t_ThreadScanWorkerHALLocal;
-class t_ThreadScanWorkerHAL: public t_ThreadScanWorker
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadScanWorkerHAL (void);
-     ~t_ThreadScanWorkerHAL (void);
-
-   private:
-      QList<QVariant> CallMethod        (const QString &Device, const QString &Method, const QString &Argument);
-      QVariant        CallMethodSingle  (const QString &Device, const QString &Method, const QString &Argument);
-      APIRET          GetProperty       (const QString &Device, const QString &Property, QList<QVariant> &VarList);
-      APIRET          GetPropertySingle (const QString &Device, const QString &Property, QVariant        &Var    );
-      bool            PropertyContains  (const QString &Device, const QString &Property, const QString   &Str    );
-
-   public slots:
-      void SlotRescan (void);
-
-   private:
-      t_ThreadScanWorkerHALLocal *pOwn;
-};
-
-
-class t_ThreadScan: public QThread
-{
-   public:
-      t_ThreadScan (void);
-      APIRET Start (t_ThreadScanWorker **ppWorker);  // Return ptr to worker, so calling fn may emit signals to it
-      APIRET Stop  ();
-
-   protected:
-      void run (void);
-
-   private:
-      t_ThreadScanWorker **ppoWorker;
-};
-
-enum
-{
-   ERROR_THREADSCAN_NOT_STARTED = ERROR_BASE_THREADSCAN,
-   ERROR_THREADSCAN_NOT_STOPPED,
-   ERROR_THREADSCAN_EXITCODE_NONZERO,
-   ERROR_THREADSCAN_PROCESS_NOTSTARTED,
-   ERROR_THREADSCAN_PROCESS_NOTFINISHED,
-   ERROR_THREADSCAN_DBUS_CONNECTION,
-   ERROR_THREADSCAN_HAL_NOT_REGISTERED,
-   ERROR_THREADSCAN_PROPERTY_NONEXISTENT,
-   ERROR_THREADSCAN_CALLED_FROM_WRONG_THREAD
-};
-
diff --git a/threadwrite.cpp b/threadwrite.cpp
deleted file mode 100644
index 4a9a7ee..0000000
--- a/threadwrite.cpp
+++ /dev/null
@@ -1,723 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for writing data.
-// ****************************************************************************
-
-#include "common.h"
-#include "compileinfo.h"
-
-#include <errno.h>
-#include <zlib.h>
-#include <fcntl.h>
-
-#include <QtCore>
-
-#include "toolconstants.h"
-#include "sysinfo/toolsysinfo.h"
-
-#include "util.h"
-#include "config.h"
-#include "device.h"
-#include "main.h"
-#include "aaff.h"
-#include "threadwrite.h"
-
-
-const unsigned long THREADWRITE_WAIT_FOR_HANDLE_GRANULARITY =   100; // ms
-const unsigned long THREADWRITE_WAIT_FOR_HANDLE             = 30000; // ms
-const unsigned long THREADWRITE_SLOWDOWN_SLEEP              =   700; // ms
-
-const int           THREADWRITE_AFF_MODE                    =  0666; // file mode flags
-
-class t_OutputFile
-{
-   public:
-      virtual        ~t_OutputFile  (void) {};
-      virtual APIRET  Open          (t_pDevice pDevice)       = 0;
-      virtual APIRET  Write         (t_pFifoBlock pFifoBlock) = 0;
-      virtual APIRET  Close         (void)                    = 0;
-      virtual bool    Opened        (void)                    = 0;
-      virtual void *  GetFileHandle (void)                    = 0;
-};
-
-class t_OutputFileDD: public t_OutputFile
-{
-   public:
-      t_OutputFileDD (void) :
-         poFile (NULL)
-      {
-      } //lint -esym(613, t_OutputFileDD::poFile)  Possible use of NULL pointer
-        //lint -esym(668, fclose, fwrite)  Possibly passing NULL pointer
-
-      ~t_OutputFileDD (void)
-      {
-         if (t_OutputFileDD::Opened())
-            (void) t_OutputFileDD::Close();
-      } //lint !e1740
-
-      APIRET Open (t_pDevice pDevice)
-      {
-         QString Extension;
-         QString FileName;
-
-         if (CONFIG (WriteToDevNull))
-         {
-            FileName = "/dev/null";
-         }
-         else
-         {
-            CHK (t_File::GetFormatExtension (pDevice->Acquisition.Format, &Extension))
-            FileName = pDevice->Acquisition.ImagePath + pDevice->Acquisition.ImageFilename + Extension;
-         }
-
-         poFile = fopen64 (QSTR_TO_PSZ (FileName), "w");
-         if (poFile == NULL)
-         {
-            LOG_ERROR ("fopen on %s failed, errno=%d '%s'", QSTR_TO_PSZ (FileName), errno, ToolErrorTranslateErrno (errno))
-            return ERROR_THREADWRITE_OPEN_FAILED;
-         }
-         return NO_ERROR;
-      }
-
-      APIRET Write (t_pFifoBlock pFifoBlock)
-      {
-         unsigned int Written = fwrite (pFifoBlock->Buffer, pFifoBlock->DataSize, 1, poFile);
-         if (Written != 1)
-         {
-            LOG_ERROR ("fwrite failed, errno=%d '%s'", errno, ToolErrorTranslateErrno (errno))
-            return ERROR_THREADWRITE_WRITE_FAILED;
-         }
-         return NO_ERROR;
-      }
-
-      APIRET Close (void)
-      {
-         int Res;
-
-         if (poFile == NULL)
-            CHK (ERROR_THREADWRITE_NOT_OPENED)
-
-         Res = fflush (poFile);
-         if (Res)
-         {
-            (void) fclose (poFile);
-            LOG_ERROR ("fflush failed, errno=%d '%s'", errno, ToolErrorTranslateErrno (errno))
-            return ERROR_THREADWRITE_CLOSE_FAILED;
-         }
-
-         Res = fclose (poFile);
-         poFile = NULL;
-         if (Res)
-         {
-            LOG_ERROR ("fclose failed, errno=%d '%s'", errno, ToolErrorTranslateErrno (errno))
-            return ERROR_THREADWRITE_CLOSE_FAILED;
-         }
-         return NO_ERROR;
-      }
-
-      void * GetFileHandle (void)
-      {
-         return poFile;
-      }
-
-      bool Opened (void)
-      {
-         return (poFile != NULL);
-      }
-
-   private:
-      FILE *poFile;
-};
-
-#define CHK_LIBEWF(Fn)                                                 \
-{                                                                      \
-   int rclibewf = (Fn);                                                \
-   if (rclibewf != 1)                                                  \
-   {                                                                   \
-      LOG_ERROR ("Error in libewf function: %s, rc=%d", #Fn, rclibewf) \
-      return ERROR_THREADWRITE_LIBEWF_FAILED;                          \
-   }                                                                   \
-}
-
-class t_OutputFileEWF: public t_OutputFile
-{
-   public:
-      t_OutputFileEWF (void)
-      {
-         poFile   = NULL;
-         poDevice = NULL;   //lint -esym(613,t_OutputFileEWF::poDevice)  Prevent lint from telling us about possible null pointers in the following code
-          oHasCompressionThreads = false;
-      }
-
-      ~t_OutputFileEWF (void)
-      {
-         if (t_OutputFileEWF::Opened())
-            (void) t_OutputFileEWF::Close();
-      } //lint !e1740
-
-      APIRET Open (t_pDevice pDevice)
-      {
-         QString         Uname;
-         QString         GuymagerVersion;
-         LIBEWF_HANDLE *pFile;
-         QByteArray      AsciiFileName = (pDevice->Acquisition.ImagePath + pDevice->Acquisition.ImageFilename).toAscii();
-         char          *pAsciiFileName = AsciiFileName.data();
-
-         oHasCompressionThreads = pDevice->HasCompressionThreads();
-         poDevice               = pDevice;
-
-         pFile = libewf_open (&pAsciiFileName, 1, LIBEWF_OPEN_WRITE);
-         if (pFile == NULL)
-            return ERROR_THREADWRITE_OPEN_FAILED;
-
-
-         #define STR_AND_LEN(QStr) QStr.toAscii().data(), strlen(QStr.toAscii().data())
-
-
-         libewf_set_notify_values(stderr, 1);
-
-         CHK_LIBEWF (libewf_set_sectors_per_chunk  (pFile, 64))
-         CHK_LIBEWF (libewf_set_bytes_per_sector   (pFile, pDevice->SectorSize))
-         CHK_LIBEWF (libewf_set_segment_file_size  (pFile, (unsigned int) (CONFIG (EwfSegmentSize) * BYTES_PER_MEGABYTE)))
-         CHK_LIBEWF (libewf_set_compression_values (pFile, CONFIG (EwfCompression), 1))
-         CHK_LIBEWF (libewf_set_media_type         (pFile, pDevice->Removable ? LIBEWF_MEDIA_TYPE_REMOVABLE : LIBEWF_MEDIA_TYPE_FIXED))
-         CHK_LIBEWF (libewf_set_volume_type        (pFile, LIBEWF_VOLUME_TYPE_PHYSICAL))
-         CHK_LIBEWF (libewf_set_format             (pFile, (uint8_t) CONFIG (EwfFormat)))
-         CHK_LIBEWF (libewf_set_media_size         (pFile, pDevice->Size))
-
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"case_number"    , STR_AND_LEN(pDevice->Acquisition.CaseNumber    )))
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"description"    , STR_AND_LEN(pDevice->Acquisition.Description   )))
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"examiner_name"  , STR_AND_LEN(pDevice->Acquisition.Examiner      )))
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"evidence_number", STR_AND_LEN(pDevice->Acquisition.EvidenceNumber)))
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"notes"          , STR_AND_LEN(pDevice->Acquisition.Notes         )))
-
-         CHK (ToolSysInfoUname (Uname))
-         GuymagerVersion = QString("guymager ") + QString(pCompileInfoVersion);
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"acquiry_operating_system", STR_AND_LEN(Uname)))
-         CHK_LIBEWF (libewf_set_header_value (pFile, (char *)"acquiry_software_version", STR_AND_LEN(GuymagerVersion)))
-
-         #undef STR_AND_LEN
-
-         poFile = pFile; // Only set poFile at the very end, so the CompressionThreads won't use it until everything is initialised
-         return NO_ERROR;
-      }
-
-      APIRET Write (t_pFifoBlock pFifoBlock)
-      {
-         int Written;
-         int Size;
-
-         if (oHasCompressionThreads != pFifoBlock->EwfPreprocessed)
-            CHK (ERROR_THREADWRITE_WRONG_BLOCK)
-
-         if (oHasCompressionThreads)
-         {
-            Size = pFifoBlock->EwfDataSize;
-            Written = libewf_raw_write_buffer (poFile, pFifoBlock->Buffer, Size, pFifoBlock->DataSize,
-                                                                                 pFifoBlock->EwfCompressionUsed,
-                                                                                 pFifoBlock->EwfChunkCRC,
-                                                                                 pFifoBlock->EwfWriteCRC);
-         }
-         else
-         {
-            Size = pFifoBlock->DataSize;
-            Written = libewf_write_buffer (poFile, pFifoBlock->Buffer, Size);
-         }
-         if (Written != Size)
-         {
-            LOG_ERROR ("Written %d/%d bytes", Written, Size)
-            return ERROR_THREADWRITE_WRITE_FAILED;
-         }
-
-         return NO_ERROR;
-      }
-
-      APIRET Close (void)
-      {
-         int rc;
-
-         if (poFile == NULL)
-            CHK (ERROR_THREADWRITE_NOT_OPENED)
-
-         if (poDevice->HasCompressionThreads())
-            CHK_LIBEWF (libewf_set_md5_hash (poFile, (uint8_t*)&poDevice->MD5Digest, HASH_MD5_DIGEST_LENGTH))
-
-         rc = libewf_close (poFile);
-         if (rc != 0)
-         {
-            LOG_ERROR ("Error in libewf function: libewf_close, rc=%d", rc)
-            return ERROR_THREADWRITE_LIBEWF_FAILED;
-         }
-
-         poFile = NULL;
-         return NO_ERROR;
-      }
-
-      void * GetFileHandle (void)
-      {
-         return poFile;
-      }
-
-      bool Opened (void)
-      {
-         return (poFile != NULL);
-      }
-
-   private:
-      LIBEWF_HANDLE *poFile;
-      t_pDevice      poDevice;
-      bool            oHasCompressionThreads;
-};
-
-
-class t_OutputFileAFF: public t_OutputFile
-{
-   public:
-      t_OutputFileAFF (void) :
-         poFile   (NULL),
-         poDevice (NULL)
-      {
-      }
-
-      ~t_OutputFileAFF (void)
-      {
-         if (t_OutputFileAFF::Opened())
-            (void) t_OutputFileAFF::Close();
-      } //lint !e1740
-
-      APIRET Open (t_pDevice pDevice)
-      {
-         QString               Extension;
-         QString               FileName;
-         QString               Mac;
-         QString               DateTimeStr;
-         t_ToolSysInfoMacAddr  MacAddr;
-         char                *pCommandLine;
-         t_pAaff              pFile;
-         APIRET                rc;
-
-//         printf ("\nCalling AaffOpen");
-         poDevice = pDevice;
-         oHasCompressionThreads = pDevice->HasCompressionThreads();
-
-
-         CHK (t_File::GetFormatExtension (pDevice->Acquisition.Format, &Extension))
-         FileName = pDevice->Acquisition.ImagePath + pDevice->Acquisition.ImageFilename + Extension;
-
-
-         CHK (AaffOpen (&pFile, QSTR_TO_PSZ(FileName), pDevice->Size, pDevice->SectorSizePhys, pDevice->FifoBlockSize))
-
-         rc = ToolSysInfoGetMacAddr (&MacAddr);
-         if (rc == TOOLSYSINFO_ERROR_NO_ADDR)
-         {
-            Mac = "none";
-         }
-         else
-         {
-            CHK (rc)
-            Mac = &MacAddr.AddrStr[0];
-         }
-
-         DateTimeStr  = poDevice->StartTimestamp.toString ("yyyy-MM-dd hh:mm:ss");
-         DateTimeStr += " localtime";
-         CHK (MainGetCommandLine (&pCommandLine))
-
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_COMMAND_LINE, 0, pCommandLine))
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_MACADDR     , 0, QSTR_TO_PSZ(Mac                                 )))
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_DATE        , 0, QSTR_TO_PSZ(DateTimeStr                         )))
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_DEVICE      , 0, QSTR_TO_PSZ(poDevice->LinuxDevice               )))
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_MODEL       , 0, QSTR_TO_PSZ(poDevice->Model                     )))
-         CHK (AaffWriteSegmentStr (pFile, AAFF_SEGNAME_SN          , 0, QSTR_TO_PSZ(poDevice->SerialNumber              )))
-         CHK (AaffWriteSegmentStr (pFile, "CaseNumber"             , 0, QSTR_TO_PSZ(poDevice->Acquisition.CaseNumber    )))
-         CHK (AaffWriteSegmentStr (pFile, "EvidenceNumber"         , 0, QSTR_TO_PSZ(poDevice->Acquisition.EvidenceNumber)))
-         CHK (AaffWriteSegmentStr (pFile, "Examiner"               , 0, QSTR_TO_PSZ(poDevice->Acquisition.Examiner      )))
-         CHK (AaffWriteSegmentStr (pFile, "Description"            , 0, QSTR_TO_PSZ(poDevice->Acquisition.Description   )))
-         CHK (AaffWriteSegmentStr (pFile, "Notes"                  , 0, QSTR_TO_PSZ(poDevice->Acquisition.Notes         )))
-
-//         printf ("\nAaffOpen finished");
-         poFile = pFile; // Only set poFile at the very end, so the CompressionThreads won't use it until everything is initialised
-         return NO_ERROR;
-      }
-
-      APIRET Write (t_pFifoBlock pFifoBlock)
-      {
-         if (!oHasCompressionThreads) // Do preprocessing if not already done in compression threads
-         {
-            t_pFifoBlock pPreprocessBlock;
-
-            CHK_EXIT (t_Fifo::CreateCompressionOptimised (pPreprocessBlock, poDevice->FifoBlockSize))
-            pPreprocessBlock->DataSize = pFifoBlock->DataSize;
-            CHK_EXIT (AaffPreprocess (&pPreprocessBlock->pAaffPreprocess, pFifoBlock->Buffer, pFifoBlock->DataSize, pPreprocessBlock->Buffer, pPreprocessBlock->BufferSize))
-            if (pPreprocessBlock->pAaffPreprocess->Compressed)
-            {
-               CHK_EXIT (t_Fifo::Destroy (pFifoBlock))
-               pFifoBlock = pPreprocessBlock;
-            }
-            else
-            {
-               pFifoBlock->pAaffPreprocess = pPreprocessBlock->pAaffPreprocess;
-               CHK_EXIT (t_Fifo::Destroy (pPreprocessBlock))
-            }
-         }
-
-         CHK (AaffWrite (poFile, pFifoBlock->pAaffPreprocess, pFifoBlock->Buffer, pFifoBlock->DataSize))
-
-         return NO_ERROR;
-      }
-
-      APIRET Close (void)
-      {
-         QList<quint64> BadSectors;
-         int            Seconds;
-
-         if (poFile == NULL)
-            CHK (ERROR_THREADWRITE_NOT_OPENED)
-
-         CHK (poDevice->GetBadSectors (BadSectors, false))
-         Seconds  = poDevice->StartTimestamp.secsTo (QDateTime::currentDateTime());
-
-         CHK (AaffClose (poFile, BadSectors.count(), (unsigned char*)&poDevice->MD5Digest, (unsigned char*)&poDevice->SHA256Digest, Seconds))
-
-         poFile = NULL;
-
-         return NO_ERROR;
-      }
-
-      void *GetFileHandle (void)
-      {
-         return poFile;
-      }
-
-      bool Opened (void)
-      {
-         return (poFile != NULL);
-      }
-
-   private:
-      t_pAaff    poFile;
-      t_pDevice  poDevice;
-      bool        oHasCompressionThreads;
-};
-
-
-class t_ThreadWriteLocal
-{
-   public:
-      t_ThreadWriteLocal (void) :  pOutputFile(NULL), pDevice(NULL) {}
-
-   public:
-      t_OutputFile *pOutputFile;
-      bool         *pSlowDownRequest;
-      t_pDevice     pDevice;
-};
-
-
-t_ThreadWrite::t_ThreadWrite(void)
-{
-   CHK_EXIT (ERROR_THREADWRITE_CONSTRUCTOR_NOT_SUPPORTED)
-} //lint !e1401 not initialised
-
-t_ThreadWrite::t_ThreadWrite (t_pDevice pDevice, bool *pSlowDownRequest)
-   :pOwn(NULL)
-{
-   static bool Initialised = false;
-
-   if (!Initialised)
-   {
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_OPEN_FAILED              ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_WRITE_FAILED             ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_CLOSE_FAILED             ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_NOT_OPENED               ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_INVALID_FORMAT           ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_CONSTRUCTOR_NOT_SUPPORTED))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_WRONG_BLOCK              ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_OUT_OF_SEQUENCE_BLOCK    ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_HANDLE_TIMEOUT           ))
-      CHK_EXIT (TOOL_ERROR_REGISTER_CODE (ERROR_THREADWRITE_LIBEWF_FAILED            ))
-
-      Initialised = true;
-   }
-
-   pOwn = new t_ThreadWriteLocal;
-   pOwn->pDevice          = pDevice;
-   pOwn->pOutputFile      = NULL;
-   pOwn->pSlowDownRequest = pSlowDownRequest;
-
-   CHK_QT_EXIT (connect (this, SIGNAL(finished()), this, SLOT(SlotFinished())))
-}
-
-t_ThreadWrite::~t_ThreadWrite (void)
-{
-   delete pOwn;
-}
-
-
-APIRET ThreadWriteCheckData (t_pFifoBlock pFifoBlock)
-{
-   unsigned char *pBufferUncompressed;
-   uLongf          UncompressedSize;
-   int             zrc=99;
-   uint32_t        CRC1;
-   uint32_t        CRC2;
-   bool            Error;
-
-   Error = !pFifoBlock->EwfPreprocessed;
-
-   // Get the original data
-   // ---------------------
-   if (pFifoBlock->EwfCompressionUsed)
-   {
-      UncompressedSize = pFifoBlock->DataSize + 4096; // DataSize should be enough for the uncompression buffer, as the uncompressed data originally had that
-                                                      // size, but as this fn is used for debugging and we do not know what the bug might be, we add 4K for safety
-      pBufferUncompressed = (unsigned char *) UTIL_MEM_ALLOC (UncompressedSize);
-      if (pBufferUncompressed == NULL)
-      {
-         LOG_ERROR ("malloc returned NULL")
-         CHK_EXIT (1967)
-      }
-      zrc = uncompress ((Bytef*)pBufferUncompressed, &UncompressedSize, pFifoBlock->Buffer, pFifoBlock->EwfDataSize);
-      Error = Error || (zrc != Z_OK);
-      Error = Error || (UncompressedSize != (unsigned) pFifoBlock->DataSize);
-
-      ((char *)&CRC1)[0] = ((char *)&pFifoBlock->EwfChunkCRC)[3];
-      ((char *)&CRC1)[1] = ((char *)&pFifoBlock->EwfChunkCRC)[2];
-      ((char *)&CRC1)[2] = ((char *)&pFifoBlock->EwfChunkCRC)[1];
-      ((char *)&CRC1)[3] = ((char *)&pFifoBlock->EwfChunkCRC)[0];
-   }
-   else
-   {
-      pBufferUncompressed = pFifoBlock->Buffer;
-      UncompressedSize = pFifoBlock->DataSize;
-      CRC1 = pFifoBlock->EwfChunkCRC;
-   }
-
-   // Get the CRC
-   // -----------
-   CRC2 = adler32 (1, (Bytef*)pBufferUncompressed, UncompressedSize);
-   Error = Error || (CRC1 != CRC2);
-
-   // Clean up
-   // --------
-   if (pFifoBlock->EwfCompressionUsed)
-   {
-      UTIL_MEM_FREE (pBufferUncompressed);  //lint !e673 Possibly inappropriate deallocation
-   }
-
-   if (Error)
-   {
-      LOG_ERROR ("zrc=%d CRC1=%08X CRC2=%08X Size1=%d Size2=%lu EwfPreprocessed=%d, EwfCompressionUsed=%d EwfWriteCRC=%d ",
-                  zrc, CRC1, CRC2, pFifoBlock->DataSize, UncompressedSize,
-                                   pFifoBlock->EwfPreprocessed?1:0,
-                                   pFifoBlock->EwfCompressionUsed,
-                                   pFifoBlock->EwfWriteCRC)
-   }
-   return NO_ERROR;
-}
-
-void t_ThreadWrite::run (void)
-{
-   t_pDevice     pDevice;
-   t_pFifoBlock  pFifoBlock;
-   t_OutputFile *pOutputFile= NULL;
-   bool           Finished  = false;
-   quint64        Blocks    = 0;
-   APIRET         rc;
-
-   LOG_INFO ("Acquisition of %s: Writing thread started", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice))
-
-   pDevice = pOwn->pDevice;
-   pDevice->SetCurrentWritePos (0LL);
-
-   LOG_INFO ("Deleting existing image files of the same name")
-   CHK_EXIT (DeleteImageFiles (false))
-
-   switch (pDevice->Acquisition.Format)
-   {
-      case t_File::DD:  pOutputFile = new t_OutputFileDD;  break;
-      case t_File::EWF: pOutputFile = new t_OutputFileEWF; break;
-      case t_File::AFF: pOutputFile = new t_OutputFileAFF; break;
-      default: CHK_EXIT (ERROR_THREADWRITE_INVALID_FORMAT)
-   }
-
-   rc = pOutputFile->Open (pDevice);
-   if (rc == ERROR_THREADWRITE_OPEN_FAILED)
-   {
-      LOG_INFO ("Could not open destination file %s", QSTR_TO_PSZ (pOwn->pDevice->Acquisition.ImageFilename))
-      pDevice->AbortReason  = t_Device::ThreadWriteFileError;
-      pDevice->AbortRequest = true;
-   }
-   else
-   {
-      CHK_EXIT (rc)
-   }
-
-   pOwn->pOutputFile = pOutputFile;  // Only set pOwn->pOutputFile here, after initialisation completed successfully. The reason is,
-                                     // that other threads should remain blocked in t_ThreadWrite::GetpFileHandle until this point.
-
-   while (!Finished && !pDevice->AbortRequest)
-   {
-      if (*(pOwn->pSlowDownRequest))
-         msleep (THREADWRITE_SLOWDOWN_SLEEP);
-
-      CHK_EXIT (pDevice->pFifoWrite->Get (pFifoBlock))
-      if (pFifoBlock)
-      {
-         if (pFifoBlock->Nr != Blocks)
-         {
-            LOG_ERROR ("Fifo block number out of sequence. Expected: %Ld Received: %Ld", Blocks, pFifoBlock->Nr)
-            CHK_EXIT (ERROR_THREADWRITE_OUT_OF_SEQUENCE_BLOCK)
-         }
-         Blocks++;
-         rc = pOwn->pOutputFile->Write (pFifoBlock);
-
-         pDevice->IncCurrentWritePos (pFifoBlock->DataSize);
-         if (rc == ERROR_THREADWRITE_WRITE_FAILED)
-         {
-            LOG_ERROR ("Could not write to destination file %s", QSTR_TO_PSZ (pOwn->pDevice->Acquisition.ImageFilename))
-            LOG_INFO ("Last block sizes: %d - %d - %zd ", pFifoBlock->BufferSize, pFifoBlock->DataSize, pFifoBlock->EwfDataSize)
-            pDevice->AbortReason  = t_Device::ThreadWriteFileError;
-            pDevice->AbortRequest = true;
-         }
-         else
-         {
-            CHK_EXIT (rc)
-         }
-         if (pDevice->HasCompressionThreads() && (pDevice->Acquisition.Format == t_File::EWF) && CONFIG(CheckEwfData))
-            CHK_EXIT (ThreadWriteCheckData (pFifoBlock))
-         CHK_EXIT (t_Fifo::Destroy (pFifoBlock))
-      }
-      else
-      {
-         LOG_INFO ("Dummy block")
-         Finished = true;
-      }
-   }
-
-   LOG_INFO ("Waiting for all other threads using the file handle to finish")
-   while ((pDevice->pThreadRead != NULL) ||
-          (pDevice->pThreadHash != NULL) ||                // Wait until all threads that might use the file handle have finished
-          !pDevice->ThreadCompressList.isEmpty())
-   {
-      msleep (THREADWRITE_WAIT_FOR_HANDLE_GRANULARITY);
-   }
-
-   LOG_INFO ("Closing output file")
-   if (pOwn->pOutputFile->Opened())
-   {
-      rc = pOwn->pOutputFile->Close ();
-      if (rc == ERROR_THREADWRITE_CLOSE_FAILED)
-      {
-         pDevice->AbortReason  = t_Device::ThreadWriteFileError;
-         pDevice->AbortRequest = true;
-      }
-   }
-   delete pOwn->pOutputFile;
-   pOwn->pOutputFile = NULL;
-   pDevice->State = t_Device::Cleanup;
-
-   if (pDevice->DeleteAfterAbort)
-      CHK_EXIT (DeleteImageFiles (true))
-
-   pDevice->StopTimestamp = QDateTime::currentDateTime();
-
-   LOG_INFO ("Writing thread exits now (device %s, %Ld blocks processed, %Ld bytes written to output file)", QSTR_TO_PSZ (pOwn->pDevice->LinuxDevice), Blocks, pDevice->GetCurrentWritePos ())
-}
-
-static APIRET DeleteImageFiles0 (t_pDevice pDevice, const QDir &Dir, const QStringList &NameFilter)
-{
-   QFileInfoList  FileInfoList;
-   QFileInfo      FileInfo;
-   QString        Info;
-   bool           Success;
-
-   FileInfoList = Dir.entryInfoList (NameFilter, QDir::Files, QDir::Name);
-   while (!FileInfoList.isEmpty())
-   {
-      FileInfo = FileInfoList.takeFirst();
-      CHK (pDevice->SetMessage (QObject::tr("Deleting %1") .arg(FileInfo.fileName())))
-
-      Info = "Deleting " + FileInfo.absoluteFilePath() + " - ";
-      Success = QFile::remove (FileInfo.absoluteFilePath());
-      if (Success)
-           Info += "successfull";
-      else Info += "could not be deleted";
-      LOG_INFO ("%s", QSTR_TO_PSZ(Info))
-   }
-
-   return NO_ERROR;
-}
-
-APIRET t_ThreadWrite::DeleteImageFiles (bool AlsoDeleteInfoFile)
-{
-   t_pDevice pDevice = pOwn->pDevice;
-   QDir       DirImage (pDevice->Acquisition.ImagePath);
-   QDir       DirInfo  (pDevice->Acquisition.InfoPath );
-   QString    ExtensionImage;
-
-   CHK (t_File::GetFormatExtension (pDevice->Acquisition.Format, &ExtensionImage))
-   CHK (DeleteImageFiles0 (pDevice, DirImage, QStringList(pDevice->Acquisition.ImageFilename + ExtensionImage)))
-
-   if (AlsoDeleteInfoFile)
-      CHK (DeleteImageFiles0 (pDevice, DirImage, QStringList(pDevice->Acquisition.InfoFilename + t_File::pExtensionInfo)))
-
-   CHK (pDevice->SetMessage (QString()))
-
-   return NO_ERROR;
-}
-
-void t_ThreadWrite::SlotFinished (void)
-{
-   emit SignalEnded (pOwn->pDevice);
-}
-
-APIRET t_ThreadWrite::GetpFileHandle0 (void **ppHandle)
-{
-   *ppHandle = NULL;
-
-   if (!isRunning())
-      return ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE;
-
-   if (!pOwn->pOutputFile)
-      return ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE;
-
-   *ppHandle = pOwn->pOutputFile->GetFileHandle();
-
-   if (!*ppHandle)
-      return ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE;
-
-   return NO_ERROR;
-}
-
-
-APIRET t_ThreadWrite::GetpFileHandle (void **ppHandle)
-{
-   unsigned int Wait=0;
-   APIRET       rc;
-
-   *ppHandle = NULL;
-   do
-   {
-      rc = GetpFileHandle0 (ppHandle);
-      if (rc != ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE)
-         CHK (rc)
-
-      if (pOwn->pDevice->AbortRequest)  // May happen, for example, if the write thread wasn't able to open the destination file.
-         break;
-
-      Wait += THREADWRITE_WAIT_FOR_HANDLE_GRANULARITY;
-      if (Wait > THREADWRITE_WAIT_FOR_HANDLE)
-         CHK_EXIT (ERROR_THREADWRITE_HANDLE_TIMEOUT)
-
-      msleep (THREADWRITE_WAIT_FOR_HANDLE_GRANULARITY);
-   } while (*ppHandle == NULL);
-
-   return NO_ERROR;
-}
-
diff --git a/threadwrite.h b/threadwrite.h
deleted file mode 100644
index a802f3b..0000000
--- a/threadwrite.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Thread for writing data.
-// ****************************************************************************
-
-
-#ifndef __THREADWRITE_H__
-#define __THREADWRITE_H__
-
-#include <QThread>   //lint !e537 Repeated include
-
-#ifndef __DEVICE_H__
-  #include "device.h"
-#endif
-
-
-class t_ThreadWriteLocal;
-
-class t_ThreadWrite: public QThread
-{
-   Q_OBJECT
-
-   public:
-      t_ThreadWrite ();
-      t_ThreadWrite (t_pDevice pDevice, bool *pSlowDownRequest);
-     ~t_ThreadWrite ();
-
-      APIRET GetpFileHandle0 (void **ppHandle);
-      APIRET GetpFileHandle  (void **ppHandle);
-
-   protected:
-      void run (void);
-
-   private:
-      APIRET DeleteImageFiles (bool AlsoDeleteInfoFile);
-
-   signals:
-      void SignalEnded (t_pDevice pDevice);
-
-   private slots:
-      void SlotFinished (void);
-
-   private:
-      t_ThreadWriteLocal *pOwn;
-};
-
-// ------------------------------------
-//             Error codes
-// ------------------------------------
-
-enum
-{
-   ERROR_THREADWRITE_OPEN_FAILED = ERROR_BASE_THREADWRITE + 1,
-   ERROR_THREADWRITE_WRITE_FAILED,
-   ERROR_THREADWRITE_CLOSE_FAILED,
-   ERROR_THREADWRITE_NOT_OPENED,
-   ERROR_THREADWRITE_INVALID_FORMAT,
-   ERROR_THREADWRITE_CONSTRUCTOR_NOT_SUPPORTED,
-   ERROR_THREADWRITE_WRONG_BLOCK,
-   ERROR_THREADWRITE_OUT_OF_SEQUENCE_BLOCK,
-   ERROR_THREADWRITE_HANDLE_NOT_YET_AVAILABLE,
-   ERROR_THREADWRITE_HANDLE_TIMEOUT,
-   ERROR_THREADWRITE_LIBEWF_FAILED
-};
-
-#endif
-
diff --git a/util.cpp b/util.cpp
deleted file mode 100644
index 3dec0c2..0000000
--- a/util.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different utility functions
-// ****************************************************************************
-
-#include "common.h"
-
-#include <QtGui>
-
-#include "config.h"
-
-#define MEMWATCH
-#define MEMWATCH_NOCPP
-#include "memwatch.h"
-#undef malloc   // These have been defined in memwatch.h. We must undefine them
-#undef free     // in order to be able to access std::malloc and std::free
-
-#include "util.h"
-
-static QMutex MutexMemAccess;
-
-
-void *UtilMemAlloc (size_t Size, const char *pFile, int Line)
-{
-   void *pMem;
-
-   if (CONFIG(UseMemWatch))
-   {
-      MutexMemAccess.lock();
-      pMem = mwMalloc (Size, pFile, Line);
-      MutexMemAccess.unlock();
-   }
-   else
-   {
-      pMem = malloc(Size);
-   }
-
-   return pMem;
-}
-
-void UtilMemFree (void *pMem, const char *pFile, int Line)
-{
-   if (CONFIG(UseMemWatch))
-   {
-      MutexMemAccess.lock();
-      mwFree (pMem, pFile, Line);
-      MutexMemAccess.unlock();
-   }
-   else
-   {
-      free (pMem);
-   }
-}
-
diff --git a/util.h b/util.h
deleted file mode 100644
index 03bd1de..0000000
--- a/util.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// ****************************************************************************
-//  Project:        GUYMAGER
-// ****************************************************************************
-//  Programmer:     Guy Voncken
-//                  Police Grand-Ducale
-//                  Service de Police Judiciaire
-//                  Section Nouvelles Technologies
-// ****************************************************************************
-//  Module:         Different utility functions
-// ****************************************************************************
-
-#ifndef __UTIL_H__
-#define __UTIL_H__
-
-void *UtilMemAlloc (size_t Size, const char *pFile, int Line);
-void  UtilMemFree  (void *pMem , const char *pFile, int Line);
-
-#define UTIL_MEM_ALLOC(Size) UtilMemAlloc (Size, __FILE__, __LINE__)
-#define UTIL_MEM_FREE(pMem)  UtilMemFree  (pMem, __FILE__, __LINE__)
-
-#endif
-
-

-- 
debian-forensics/guymager



More information about the forensics-changes mailing list