Add the fix command

Split in various files
Add --force switch
Add --start switch
This commit is contained in:
Andrea Mazzoleni 2011-03-04 20:59:21 +01:00
parent 8e953adb27
commit 4bd4f9dd79
16 changed files with 2335 additions and 1532 deletions

19
util.h
View file

@ -15,6 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __UTIL_H
#define __UTIL_H
/****************************************************************************/
/* string */
@ -168,3 +171,19 @@ static inline char* strdechex(void* void_data, unsigned data_len, char* str)
return 0;
}
/****************************************************************************/
/* memory */
/**
* Safe malloc.
* If no memory is available, it aborts.
*/
void* malloc_nofail(size_t size);
/**
* Xor two memory blocks.
*/
void memxor(unsigned char* xor, const unsigned char* block, unsigned size);
#endif