From fed16d043a14e8b86c97a6413aec7281fefcbcb5 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Wed, 27 Jan 2010 23:03:40 -0500 Subject: Misc. updates and bug fixes --- support.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'support.h') diff --git a/support.h b/support.h index 3a102ae..79e62a9 100644 --- a/support.h +++ b/support.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #ifndef __GPTSUPPORT #define __GPTSUPPORT @@ -35,6 +35,9 @@ #define APM_SIGNATURE1 UINT64_C(0x00004D5000000000) #define APM_SIGNATURE2 UINT64_C(0x0000535400000000) +// Maximum line length ignored on some input functions +#define MAX_IGNORED 999 + /************************** * Some GPT constants.... * **************************/ @@ -58,11 +61,11 @@ struct GUIDData { static char theFile[255]; -int GetNumber(int low, int high, int def, const char prompt[]); +int GetNumber(int low, int high, int def, const string & prompt); char GetYN(void); -uint64_t GetSectorNum(uint64_t low, uint64_t high, uint64_t def, char prompt[]); -char* BytesToSI(uint64_t size, char theValue[]); -char* GUIDToStr(struct GUIDData theGUID, char* theString); +uint64_t GetSectorNum(uint64_t low, uint64_t high, uint64_t def, const string & prompt); +string BytesToSI(uint64_t size); +string GUIDToStr(struct GUIDData theGUID); GUIDData GetGUID(void); int IsLittleEndian(void); // Returns 1 if CPU is little-endian, 0 if it's big-endian void ReverseBytes(void* theValue, int numBytes); // Reverses byte-order of theValue -- cgit v1.2.3