diff options
author | Daniel Brahneborg <basic@chello.se> | 2002-03-08 19:44:37 +0000 |
---|---|---|
committer | Daniel Brahneborg <basic@chello.se> | 2002-03-08 19:44:37 +0000 |
commit | 7378f5ddf46ef0317343ad310d703c4f4ff8d703 (patch) | |
tree | 5bdaf343a46d73c43dadc319d2806454097f6464 /lib/sisfileheader.cpp | |
parent | 0f623548115340cf5f2d39abf9098bf27b822b68 (diff) | |
download | plptools-7378f5ddf46ef0317343ad310d703c4f4ff8d703.tar.gz plptools-7378f5ddf46ef0317343ad310d703c4f4ff8d703.tar.bz2 plptools-7378f5ddf46ef0317343ad310d703c4f4ff8d703.zip |
Initial stuff for checking requisites and previous versions.
Diffstat (limited to 'lib/sisfileheader.cpp')
-rw-r--r-- | lib/sisfileheader.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/sisfileheader.cpp b/lib/sisfileheader.cpp index 19724c3..97e0687 100644 --- a/lib/sisfileheader.cpp +++ b/lib/sisfileheader.cpp @@ -29,6 +29,22 @@ const int OFF_NUMBER_OF_FILES = 26; const int OFF_INSTALLATION_DRIVE = 28; SisRC +SISFileHeader::compareApp(SISFileHeader* other) +{ + if (m_uid1 != other->m_uid1) + return SIS_DIFFERENT_APP; + if ((m_major < other->m_major) || + ((m_major == other->m_major) && + (m_minor < other->m_minor))) + return SIS_VER_EARLIER; + if ((m_major == other->m_major) && + (m_minor == other->m_minor) && + (m_variant != other->m_variant)) + return SIS_OTHER_VARIANT; + return SIS_SAME_OR_LATER; +} + +SisRC SISFileHeader::fillFrom(uint8_t* buf, int* base, off_t len) { if (*base + 68 > len) |