Icon-o-matic: some 64 bit fixes
This commit is contained in:
parent
48350f1a72
commit
60128b54b4
@ -176,7 +176,7 @@ MainWindow::MessageReceived(BMessage* message)
|
||||
|
||||
if (message->WasDropped()) {
|
||||
const rgb_color* color;
|
||||
int32 length;
|
||||
ssize_t length;
|
||||
// create styles from dropped colors
|
||||
for (int32 i = 0; message->FindData("RGBColor", B_RGB_COLOR_TYPE, i,
|
||||
(const void**)&color, &length) == B_OK; i++) {
|
||||
|
@ -29,8 +29,8 @@ Observable::~Observable()
|
||||
if (fObservers.CountItems() > 0) {
|
||||
char message[256];
|
||||
Observer* o = (Observer*)fObservers.ItemAt(0);
|
||||
sprintf(message, "Observable::~Observable() - %ld "
|
||||
"observers still watching, first: %s\n",
|
||||
sprintf(message, "Observable::~Observable() - %" B_PRId32
|
||||
" observers still watching, first: %s\n",
|
||||
fObservers.CountItems(), typeid(*o).name());
|
||||
debugger(message);
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ PropertyListView::SetTo(PropertyObject* object)
|
||||
// unkown to the PropertyEditorFactory and therefor
|
||||
// there is no editor view at this item
|
||||
fprintf(stderr, "PropertyListView::_SetTo() - "
|
||||
"property mismatch at %ld\n", i);
|
||||
"property mismatch at %" B_PRId32 "\n", i);
|
||||
error = true;
|
||||
break;
|
||||
}
|
||||
@ -425,7 +425,7 @@ PropertyListView::SetTo(PropertyObject* object)
|
||||
int32 focused = -1;
|
||||
for (int32 i = 0; PropertyItemView* item = _ItemAt(i); i++) {
|
||||
if (item->IsSelected())
|
||||
selection.AddItem((void*)i);
|
||||
selection.AddItem((void*)(long)i);
|
||||
if (item->IsFocused())
|
||||
focused = i;
|
||||
}
|
||||
@ -449,7 +449,7 @@ PropertyListView::SetTo(PropertyObject* object)
|
||||
// restore scroll pos, selection and focus
|
||||
SetScrollOffset(scrollOffset);
|
||||
for (int32 i = 0; PropertyItemView* item = _ItemAt(i); i++) {
|
||||
if (selection.HasItem((void*)i))
|
||||
if (selection.HasItem((void*)(long)i))
|
||||
item->SetSelected(true);
|
||||
if (i == focused)
|
||||
item->MakeFocus(true);
|
||||
|
@ -111,7 +111,7 @@ append_float(BString& string, float n, int32 maxDigits)
|
||||
n = n - rounded;
|
||||
rounded = (int32)(n * pow(10, maxDigits));
|
||||
char tmp[maxDigits + 1];
|
||||
sprintf(tmp, "%0*ld", (int)maxDigits, rounded);
|
||||
sprintf(tmp, "%0*" B_PRId32, (int)maxDigits, rounded);
|
||||
tmp[maxDigits] = 0;
|
||||
int32 digits = strlen(tmp);
|
||||
for (int32 i = strlen(tmp) - 1; i >= 0; i--) {
|
||||
|
@ -51,12 +51,12 @@ FlatIconExporter::~FlatIconExporter()
|
||||
{
|
||||
#if PRINT_STATISTICS
|
||||
printf("Statistics\n"
|
||||
"--style section size: %ld\n"
|
||||
" gradients: %ld\n"
|
||||
" gradient transforms: %ld\n"
|
||||
"---path section size: %ld\n"
|
||||
"--shape section size: %ld\n"
|
||||
"---total/different points: %ld/%lu\n",
|
||||
"--style section size: %" B_PRId32 "\n"
|
||||
" gradients: %" B_PRId32 "\n"
|
||||
" gradient transforms: %" B_PRId32 "\n"
|
||||
"---path section size: %" B_PRId32 "\n"
|
||||
"--shape section size: %" B_PRId32 "\n"
|
||||
"---total/different points: %" B_PRId32 "/%" B_PRIdSSIZE "\n",
|
||||
fStyleSectionSize,
|
||||
fGradientSize,
|
||||
fGradientTransformSize,
|
||||
|
@ -186,14 +186,14 @@ StyledTextImporter::Import(Icon* icon, BMessage* clipping)
|
||||
{
|
||||
CALLED();
|
||||
const char *text;
|
||||
int32 textLength;
|
||||
ssize_t textLength;
|
||||
|
||||
if (clipping == NULL)
|
||||
return ENOENT;
|
||||
if (clipping->FindData("text/plain",
|
||||
B_MIME_TYPE, (const void **)&text, &textLength) == B_OK) {
|
||||
text_run_array *runs = NULL;
|
||||
int32 runsLength;
|
||||
ssize_t runsLength;
|
||||
if (clipping->FindData("application/x-vnd.Be-text_run_array",
|
||||
B_MIME_TYPE, (const void **)&runs, &runsLength) < B_OK)
|
||||
runs = NULL;
|
||||
|
@ -490,7 +490,7 @@ SVGExporter::_GetFill(const Style* style, char* string,
|
||||
status_t ret = B_OK;
|
||||
if (Gradient* gradient = style->Gradient()) {
|
||||
ret = _ExportGradient(gradient, stream);
|
||||
sprintf(string, "url(#gradient%ld)", fGradientCount++);
|
||||
sprintf(string, "url(#gradient%" B_PRId32 ")", fGradientCount++);
|
||||
} else {
|
||||
sprintf(string, "#%.2x%.2x%.2x", style->Color().red,
|
||||
style->Color().green,
|
||||
|
@ -143,21 +143,21 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
BList::AddItem((void*)value, index);
|
||||
BList::AddItem((void*)(long)value, index);
|
||||
}
|
||||
}
|
||||
|
||||
inline bool Remove(int32 value)
|
||||
{ return BList::RemoveItem((void*)value); }
|
||||
{ return BList::RemoveItem((void*)(long)value); }
|
||||
|
||||
inline bool Contains(int32 value) const
|
||||
{ return BList::HasItem((void*)value); }
|
||||
{ return BList::HasItem((void*)(long)value); }
|
||||
|
||||
inline bool IsEmpty() const
|
||||
{ return BList::IsEmpty(); }
|
||||
|
||||
inline int32 IndexAt(int32 index) const
|
||||
{ return (int32)BList::ItemAt(index); }
|
||||
{ return (int32)(long)BList::ItemAt(index); }
|
||||
|
||||
inline void MakeEmpty()
|
||||
{ BList::MakeEmpty(); }
|
||||
|
@ -147,7 +147,7 @@ FreezeTransformationCommand::_ApplyTransformation(Shape* shape,
|
||||
path->ApplyTransform(transform);
|
||||
} else {
|
||||
printf("Not transfering transformation of \"%s\" onto "
|
||||
"path \"%s\", because %ld other shapes "
|
||||
"path \"%s\", because %" B_PRId32 " other shapes "
|
||||
"have it assigned.\n", shape->Name(), path->Name(),
|
||||
shapes - 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user