Fixed version format and calculations

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matthew Wilber
2004-01-08 03:41:53 +00:00
parent ead4b1fa60
commit 0e292355ba
3 changed files with 7 additions and 5 deletions
@@ -181,8 +181,9 @@ TIFFTranslator::TIFFTranslator()
{ {
strcpy(fName, "TIFF Images"); strcpy(fName, "TIFF Images");
sprintf(fInfo, "TIFF image translator v%d.%d.%d %s", sprintf(fInfo, "TIFF image translator v%d.%d.%d %s",
TIFF_TRANSLATOR_VERSION / 100, (TIFF_TRANSLATOR_VERSION / 10) % 10, static_cast<int>(TIFF_TRANSLATOR_VERSION >> 8),
TIFF_TRANSLATOR_VERSION % 10, __DATE__); static_cast<int>((TIFF_TRANSLATOR_VERSION >> 4) & 0xf),
static_cast<int>(TIFF_TRANSLATOR_VERSION & 0xf), __DATE__);
} }
// --------------------------------------------------------------- // ---------------------------------------------------------------
@@ -46,7 +46,7 @@
#define DOCUMENT_COUNT "/documentCount" #define DOCUMENT_COUNT "/documentCount"
#define DOCUMENT_INDEX "/documentIndex" #define DOCUMENT_INDEX "/documentIndex"
#define TIFF_TRANSLATOR_VERSION 100 #define TIFF_TRANSLATOR_VERSION 0x100
#define TIFF_IN_QUALITY 0.5 #define TIFF_IN_QUALITY 0.5
#define TIFF_IN_CAPABILITY 0.6 #define TIFF_IN_CAPABILITY 0.6
@@ -105,8 +105,9 @@ TIFFView::Draw(BRect area)
char detail[100]; char detail[100];
sprintf(detail, "Version %d.%d.%d %s", sprintf(detail, "Version %d.%d.%d %s",
TIFF_TRANSLATOR_VERSION / 100, (TIFF_TRANSLATOR_VERSION / 10) % 10, static_cast<int>(TIFF_TRANSLATOR_VERSION >> 8),
TIFF_TRANSLATOR_VERSION % 10, __DATE__); static_cast<int>((TIFF_TRANSLATOR_VERSION >> 4) & 0xf),
static_cast<int>(TIFF_TRANSLATOR_VERSION & 0xf), __DATE__);
DrawString(detail, BPoint(xbold, yplain + ybold)); DrawString(detail, BPoint(xbold, yplain + ybold));
int32 lineno = 4; int32 lineno = 4;