diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2010-01-27 23:03:40 -0500 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2010-01-27 23:03:40 -0500 |
commit | fed16d043a14e8b86c97a6413aec7281fefcbcb5 (patch) | |
tree | 6e1250e01ad78fa5eb243b1d134b212e69d4be1f /support.h | |
parent | 546a9c7c369df465021feecb20f6a8f81b6df6bc (diff) | |
download | gptfdisk-fed16d043a14e8b86c97a6413aec7281fefcbcb5.tar.gz |
Misc. updates and bug fixes
Diffstat (limited to 'support.h')
-rw-r--r-- | support.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -4,7 +4,7 @@ #include <stdint.h> #include <unistd.h> #include <stdlib.h> -#include <string.h> +#include <string> #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 |