From ebc3e0991986c8cf300312fff557b9670835cdb4 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Tue, 22 Feb 2011 16:23:52 +0000 Subject: Fonction slicesFindLargestFast() et semble bien marcher. Passage au 64 bits (long long int), correction de quelques cast implicites détruisant de l'information utile. Peaufinnage de la fonction slicesDump(), mais c'est pas encore terminé. En tout cas le calcul du blockSize à l'air d'être meilleur à présent, disons qu'on voit la fin des informations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///var/svn/2011-ddhardrescue/trunk@4 d3078510-dda0-49f1-841c-895ef4b7ec81 --- src/slices.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/slices.h') diff --git a/src/slices.h b/src/slices.h index 9f97246..85cb621 100755 --- a/src/slices.h +++ b/src/slices.h @@ -10,10 +10,10 @@ Slice are inclusive intervals. Let say sliceNew(1,2,S_UNKNOWN,NULL) return a [1; */ typedef enum { S_UNKNOWN, S_RECOVERED, S_UNREADABLE } sliceStatus_t; -typedef unsigned long int address_t; +typedef unsigned long long int address_t; typedef struct _slice { - uint32_t begin, end; + address_t begin, end; sliceStatus_t status; struct _slice *next; } slice_t; @@ -29,6 +29,7 @@ int sliceSplit(slices_t *slices, slice_t *initialSlice, address_t splitAt, slice slices_t *slicesNew(); void slicesAppend(slices_t *slices, slice_t *slice); slice_t *slicesFindLargest(slices_t *slices, sliceStatus_t status); +slice_t *slicesFindLargestFast(slices_t *slices, address_t *foundMax, sliceStatus_t status, address_t knownMax, slice_t *firstToTry); char *slicesDump(slices_t *slices, address_t *blockSize, unsigned int charCount, address_t begin, address_t end); #endif /*SLICES_H*/ -- cgit v1.2.3