diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-03-05 16:45:22 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-03-05 16:45:22 +0000 |
commit | 7db6f09bbf06dfc15cd9aef486229637514d607a (patch) | |
tree | 08484db98dc4ab47bda6255122c457d7082c901e /src/slices.h | |
parent | a5f35dfa2aac7c1040022d0cfb475c9b1fdcf32e (diff) | |
download | 2011-ddhardrescue-7db6f09bbf06dfc15cd9aef486229637514d607a.tar.gz 2011-ddhardrescue-7db6f09bbf06dfc15cd9aef486229637514d607a.tar.bz2 2011-ddhardrescue-7db6f09bbf06dfc15cd9aef486229637514d607a.zip |
Restructuration du code.
Création d'un Makefile avec génération automatique des dépendances. J'ai pomé 3 heures de boulot en écrasant tous mes .c par des fichiers vides, dégouté.
git-svn-id: file:///var/svn/2011-ddhardrescue/trunk@6 d3078510-dda0-49f1-841c-895ef4b7ec81
Diffstat (limited to 'src/slices.h')
-rwxr-xr-x | src/slices.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/slices.h b/src/slices.h deleted file mode 100755 index 85cb621..0000000 --- a/src/slices.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef SLICES_H -#define SLICES_H - -#include <stdint.h> -#include <stdlib.h> - -/* IMPORTANT NOTES -Slice are inclusive intervals. Let say sliceNew(1,2,S_UNKNOWN,NULL) return a [1;2] interval, - so interval lenght is end-begin+1. Here, it is 2 sectors lenght slice. -*/ - -typedef enum { S_UNKNOWN, S_RECOVERED, S_UNREADABLE } sliceStatus_t; -typedef unsigned long long int address_t; - -typedef struct _slice { - address_t begin, end; - sliceStatus_t status; - struct _slice *next; -} slice_t; - -typedef struct { - int count; - slice_t *first, *last; -} slices_t; - -slice_t *sliceNew(address_t begin, address_t end, sliceStatus_t status, slice_t *next); -int sliceSplit(slices_t *slices, slice_t *initialSlice, address_t splitAt, sliceStatus_t statusBefore, sliceStatus_t statusAt, sliceStatus_t statusAfter); - -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*/ |