Get app_server working on x86_64.
With this commit, app_server now compiles and runs at boot! Nothing particularly interesting happens, just the blue background and a mouse pointer. Remote backends are broken and not compiled in, see #8834. Note that it won't be possible to build this quite yet, need to get the FreeType package uploaded.
This commit is contained in:
parent
f429464535
commit
3fed1a15f5
@ -40,13 +40,20 @@ SYSTEM_PREFERENCES = ;
|
|||||||
|
|
||||||
SYSTEM_DEMOS = ;
|
SYSTEM_DEMOS = ;
|
||||||
|
|
||||||
SYSTEM_LIBS = libbe.so libroot.so libroot-addon-icu.so
|
SYSTEM_LIBS = libbe.so libbnetapi.so libnetwork.so
|
||||||
|
libroot.so libroot-addon-icu.so
|
||||||
|
libtextencoding.so libtranslation.so
|
||||||
$(HAIKU_SHARED_LIBSTDC++) $(HAIKU_SHARED_LIBSUPC++)
|
$(HAIKU_SHARED_LIBSTDC++) $(HAIKU_SHARED_LIBSUPC++)
|
||||||
|
$(HAIKU_FREETYPE_CURRENT_LIB)
|
||||||
;
|
;
|
||||||
|
|
||||||
PRIVATE_SYSTEM_LIBS = ;
|
PRIVATE_SYSTEM_LIBS = ;
|
||||||
|
|
||||||
SYSTEM_SERVERS = registrar ;
|
SYSTEM_SERVERS = app_server input_server registrar syslog_daemon ;
|
||||||
|
|
||||||
|
SYSTEM_ADD_ONS_ACCELERANTS = vesa.accelerant ;
|
||||||
|
|
||||||
|
SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = vesa ;
|
||||||
|
|
||||||
SYSTEM_ADD_ONS_BUS_MANAGERS = $(ATA_ONLY)ata pci ps2 isa scsi config_manager ;
|
SYSTEM_ADD_ONS_BUS_MANAGERS = $(ATA_ONLY)ata pci ps2 isa scsi config_manager ;
|
||||||
SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs iso9660 attribute_overlay write_overlay ;
|
SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs iso9660 attribute_overlay write_overlay ;
|
||||||
@ -79,6 +86,7 @@ AddNewDriversToHaikuImage disk scsi : scsi_cd scsi_disk ;
|
|||||||
# legacy drivers
|
# legacy drivers
|
||||||
AddDriversToHaikuImage : console dprintf null
|
AddDriversToHaikuImage : console dprintf null
|
||||||
random <driver>tty zero ;
|
random <driver>tty zero ;
|
||||||
|
AddDriversToHaikuImage graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
|
||||||
AddDriversToHaikuImage input : ps2_hid ;
|
AddDriversToHaikuImage input : ps2_hid ;
|
||||||
|
|
||||||
# kernel
|
# kernel
|
||||||
@ -88,6 +96,12 @@ AddFilesToHaikuImage system : kernel_$(TARGET_ARCH) ;
|
|||||||
AddLibrariesToHaikuHybridImage system lib
|
AddLibrariesToHaikuHybridImage system lib
|
||||||
: $(SYSTEM_LIBS) $(PRIVATE_SYSTEM_LIBS) ;
|
: $(SYSTEM_LIBS) $(PRIVATE_SYSTEM_LIBS) ;
|
||||||
|
|
||||||
|
# libfreetype.so links to the current freetype lib
|
||||||
|
AddSymlinkToHaikuHybridImage system lib : $(HAIKU_FREETYPE_CURRENT_LIB:BS)
|
||||||
|
: $(HAIKU_FREETYPE_CURRENT_LINK) : : true ;
|
||||||
|
AddSymlinkToHaikuHybridImage system lib : $(HAIKU_FREETYPE_CURRENT_LINK)
|
||||||
|
: libfreetype.so : : true ;
|
||||||
|
|
||||||
# servers
|
# servers
|
||||||
AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
|
AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
|
||||||
|
|
||||||
@ -139,11 +153,11 @@ local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
|
|||||||
fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
|
fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
|
||||||
AddFilesToHaikuImage system data fortunes : $(fortuneFiles) ;
|
AddFilesToHaikuImage system data fortunes : $(fortuneFiles) ;
|
||||||
|
|
||||||
#local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
|
local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
|
||||||
#local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
|
local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
|
||||||
#local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ;
|
local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ;
|
||||||
#AddFilesToHaikuImage system data fonts psfonts : $(psFonts) ;
|
AddFilesToHaikuImage system data fonts psfonts : $(psFonts) ;
|
||||||
#AddFilesToHaikuImage system data fonts ttfonts : $(ttFonts) ;
|
AddFilesToHaikuImage system data fonts ttfonts : $(ttFonts) ;
|
||||||
|
|
||||||
local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ]
|
local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ]
|
||||||
: *.keymap ] ;
|
: *.keymap ] ;
|
||||||
@ -218,6 +232,13 @@ AddBootModuleSymlinksToHaikuImage
|
|||||||
bfs
|
bfs
|
||||||
;
|
;
|
||||||
|
|
||||||
|
# add-ons
|
||||||
|
AddFilesToHaikuImage system add-ons accelerants
|
||||||
|
: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
|
||||||
|
|
||||||
|
AddFilesToHaikuImage system add-ons input_server devices
|
||||||
|
: <input>keyboard <input>mouse <input>tablet <input>wacom ;
|
||||||
|
|
||||||
# create directories that will remain empty
|
# create directories that will remain empty
|
||||||
AddDirectoryToHaikuImage common bin ;
|
AddDirectoryToHaikuImage common bin ;
|
||||||
AddDirectoryToHaikuImage common include ;
|
AddDirectoryToHaikuImage common include ;
|
||||||
|
@ -380,9 +380,11 @@ if $(TARGET_ARCH) = x86 {
|
|||||||
|
|
||||||
# Freetype
|
# Freetype
|
||||||
local freetypeBaseURL = $(baseURL)/lib ;
|
local freetypeBaseURL = $(baseURL)/lib ;
|
||||||
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
|
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
|
||||||
if $(TARGET_ARCH) = ppc {
|
if $(TARGET_ARCH) = ppc {
|
||||||
HAIKU_FREETYPE_FILE = freetype-2.4.9-ppc-gcc4-2012-06-26.zip ;
|
HAIKU_FREETYPE_FILE = freetype-2.4.9-ppc-gcc4-2012-06-26.zip ;
|
||||||
|
} else if $(TARGET_ARCH) = x86_64 {
|
||||||
|
HAIKU_FREETYPE_FILE = freetype-2.4.9-x86_64-2012-08-04.zip ;
|
||||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||||
HAIKU_FREETYPE_FILE = freetype-2.4.9-x86-gcc4-2012-06-15.zip ;
|
HAIKU_FREETYPE_FILE = freetype-2.4.9-x86-gcc4-2012-06-15.zip ;
|
||||||
} else {
|
} else {
|
||||||
|
@ -26,7 +26,11 @@ typedef uint32_t in_addr_t;
|
|||||||
* and we are not allowed to import all the BeOS types here.
|
* and we are not allowed to import all the BeOS types here.
|
||||||
*/
|
*/
|
||||||
#ifndef htonl
|
#ifndef htonl
|
||||||
|
# ifdef __HAIKU_BEOS_COMPATIBLE_TYPES
|
||||||
extern unsigned long __swap_int32(unsigned long); /* private */
|
extern unsigned long __swap_int32(unsigned long); /* private */
|
||||||
|
# else
|
||||||
|
extern unsigned int __swap_int32(unsigned int); /* private */
|
||||||
|
# endif
|
||||||
extern uint16_t __swap_int16(uint16_t); /* private */
|
extern uint16_t __swap_int16(uint16_t); /* private */
|
||||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
# define htonl(x) ((uint32_t)__swap_int32(x))
|
# define htonl(x) ((uint32_t)__swap_int32(x))
|
||||||
|
@ -60,7 +60,7 @@ MasterServerDevice::~MasterServerDevice()
|
|||||||
// cleanup
|
// cleanup
|
||||||
_StopAll();
|
_StopAll();
|
||||||
if (_LockDevices()) {
|
if (_LockDevices()) {
|
||||||
while (PointingDevice* device = (PointingDevice*)fDevices.RemoveItem(0L))
|
while (PointingDevice* device = (PointingDevice*)fDevices.RemoveItem((int32)0))
|
||||||
delete device;
|
delete device;
|
||||||
_UnlockDevices();
|
_UnlockDevices();
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@ BListView::MouseDown(BPoint point)
|
|||||||
doubleClick = true;
|
doubleClick = true;
|
||||||
|
|
||||||
if (doubleClick && index >= fFirstSelected && index <= fLastSelected) {
|
if (doubleClick && index >= fFirstSelected && index <= fLastSelected) {
|
||||||
fTrack->drag_start.Set(LONG_MAX, LONG_MAX);
|
fTrack->drag_start.Set(INT32_MAX, INT32_MAX);
|
||||||
Invoke();
|
Invoke();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -107,9 +107,9 @@ find_own_image(image_info* _info)
|
|||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
image_info info;
|
image_info info;
|
||||||
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
||||||
if (((uint32)info.text <= (uint32)find_own_image
|
if (((addr_t)info.text <= (addr_t)find_own_image
|
||||||
&& (uint32)info.text + (uint32)info.text_size
|
&& (addr_t)info.text + (size_t)info.text_size
|
||||||
> (uint32)find_own_image)) {
|
> (addr_t)find_own_image)) {
|
||||||
// found us
|
// found us
|
||||||
*_info = info;
|
*_info = info;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
@ -20,8 +20,8 @@ find_own_image()
|
|||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
image_info info;
|
image_info info;
|
||||||
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
||||||
if (((uint32)info.text <= (uint32)find_own_image
|
if (((addr_t)info.text <= (addr_t)find_own_image
|
||||||
&& (uint32)info.text + (uint32)info.text_size > (uint32)find_own_image)) {
|
&& (addr_t)info.text + (size_t)info.text_size > (addr_t)find_own_image)) {
|
||||||
// found us
|
// found us
|
||||||
__gNetAPIStart = (addr_t)min_c(info.text, info.data);
|
__gNetAPIStart = (addr_t)min_c(info.text, info.data);
|
||||||
__gNetAPIEnd = min_c((addr_t)info.text + info.text_size,
|
__gNetAPIEnd = min_c((addr_t)info.text + info.text_size,
|
||||||
|
@ -520,7 +520,7 @@ BIconButton::TrimIcon(bool keepAspect)
|
|||||||
uint32 bpr = fNormalBitmap->BytesPerRow();
|
uint32 bpr = fNormalBitmap->BytesPerRow();
|
||||||
uint32 width = fNormalBitmap->Bounds().IntegerWidth() + 1;
|
uint32 width = fNormalBitmap->Bounds().IntegerWidth() + 1;
|
||||||
uint32 height = fNormalBitmap->Bounds().IntegerHeight() + 1;
|
uint32 height = fNormalBitmap->Bounds().IntegerHeight() + 1;
|
||||||
BRect trimmed(LONG_MAX, LONG_MAX, LONG_MIN, LONG_MIN);
|
BRect trimmed(INT32_MAX, INT32_MAX, INT32_MIN, INT32_MIN);
|
||||||
for (uint32 y = 0; y < height; y++) {
|
for (uint32 y = 0; y < height; y++) {
|
||||||
uint8* b = bits + 3;
|
uint8* b = bits + 3;
|
||||||
bool rowHasAlpha = false;
|
bool rowHasAlpha = false;
|
||||||
|
@ -82,13 +82,13 @@ BBitmapStream::ReadAt(off_t pos, void* buffer, size_t size)
|
|||||||
return B_NO_INIT;
|
return B_NO_INIT;
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
if (pos >= fSize || pos < 0 || buffer == NULL)
|
if (pos >= (off_t)fSize || pos < 0 || buffer == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
ssize_t toRead;
|
ssize_t toRead;
|
||||||
void *source;
|
void *source;
|
||||||
|
|
||||||
if (pos < sizeof(TranslatorBitmap)) {
|
if (pos < (off_t)sizeof(TranslatorBitmap)) {
|
||||||
toRead = sizeof(TranslatorBitmap) - pos;
|
toRead = sizeof(TranslatorBitmap) - pos;
|
||||||
source = (reinterpret_cast<uint8 *>(fBigEndianHeader)) + pos;
|
source = (reinterpret_cast<uint8 *>(fBigEndianHeader)) + pos;
|
||||||
} else {
|
} else {
|
||||||
@ -122,7 +122,7 @@ BBitmapStream::WriteAt(off_t pos, const void* data, size_t size)
|
|||||||
{
|
{
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
if (!data || pos < 0 || pos > fSize)
|
if (!data || pos < 0 || pos > (off_t)fSize)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
ssize_t written = 0;
|
ssize_t written = 0;
|
||||||
@ -131,7 +131,7 @@ BBitmapStream::WriteAt(off_t pos, const void* data, size_t size)
|
|||||||
void *dest;
|
void *dest;
|
||||||
// We depend on writing the header separately in detecting
|
// We depend on writing the header separately in detecting
|
||||||
// changes to it
|
// changes to it
|
||||||
if (pos < sizeof(TranslatorBitmap)) {
|
if (pos < (off_t)sizeof(TranslatorBitmap)) {
|
||||||
toWrite = sizeof(TranslatorBitmap) - pos;
|
toWrite = sizeof(TranslatorBitmap) - pos;
|
||||||
dest = (reinterpret_cast<uint8 *> (&fHeader)) + pos;
|
dest = (reinterpret_cast<uint8 *> (&fHeader)) + pos;
|
||||||
} else {
|
} else {
|
||||||
@ -153,7 +153,7 @@ BBitmapStream::WriteAt(off_t pos, const void* data, size_t size)
|
|||||||
written += toWrite;
|
written += toWrite;
|
||||||
data = (reinterpret_cast<const uint8 *> (data)) + toWrite;
|
data = (reinterpret_cast<const uint8 *> (data)) + toWrite;
|
||||||
size -= toWrite;
|
size -= toWrite;
|
||||||
if (pos > fSize)
|
if (pos > (off_t)fSize)
|
||||||
fSize = pos;
|
fSize = pos;
|
||||||
// If we change the header, the rest needs to be reset
|
// If we change the header, the rest needs to be reset
|
||||||
if (pos == sizeof(TranslatorBitmap)) {
|
if (pos == sizeof(TranslatorBitmap)) {
|
||||||
@ -185,7 +185,7 @@ BBitmapStream::WriteAt(off_t pos, const void* data, size_t size)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
if ((uint32)fBitmap->BytesPerRow() != fHeader.rowBytes) {
|
if ((uint32)fBitmap->BytesPerRow() != fHeader.rowBytes) {
|
||||||
fprintf(stderr, "BitmapStream %ld %ld\n",
|
fprintf(stderr, "BitmapStream %" B_PRId32 " %" B_PRId32 "\n",
|
||||||
fBitmap->BytesPerRow(), fHeader.rowBytes);
|
fBitmap->BytesPerRow(), fHeader.rowBytes);
|
||||||
return B_MISMATCHED_VALUES;
|
return B_MISMATCHED_VALUES;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ BBitmapStream::Seek(off_t position, uint32 seekMode)
|
|||||||
else if (seekMode == SEEK_END)
|
else if (seekMode == SEEK_END)
|
||||||
position += fSize;
|
position += fSize;
|
||||||
|
|
||||||
if (position < 0 || position > fSize)
|
if (position < 0 || position > (off_t)fSize)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
fPosition = position;
|
fPosition = position;
|
||||||
@ -257,7 +257,7 @@ BBitmapStream::SetSize(off_t size)
|
|||||||
{
|
{
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
if (fBitmap && (size > fHeader.dataSize + sizeof(TranslatorBitmap)))
|
if (fBitmap && (size > (off_t)(fHeader.dataSize + sizeof(TranslatorBitmap))))
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
// Problem:
|
// Problem:
|
||||||
// What if someone calls SetSize() before writing the header,
|
// What if someone calls SetSize() before writing the header,
|
||||||
|
@ -344,7 +344,7 @@ Constraint::ToString() const
|
|||||||
BString string;
|
BString string;
|
||||||
string << "Constraint ";
|
string << "Constraint ";
|
||||||
string << fLabel;
|
string << fLabel;
|
||||||
string << "(" << (int32)this << "): ";
|
string << "(" << (addr_t)this << "): ";
|
||||||
|
|
||||||
if (fIsValid) {
|
if (fIsValid) {
|
||||||
for (int i = 0; i < fLeftSide->CountItems(); i++) {
|
for (int i = 0; i < fLeftSide->CountItems(); i++) {
|
||||||
|
@ -656,7 +656,7 @@ BString
|
|||||||
LinearSpec::ToString() const
|
LinearSpec::ToString() const
|
||||||
{
|
{
|
||||||
BString string;
|
BString string;
|
||||||
string << "LinearSpec " << (int32)this << ":\n";
|
string << "LinearSpec " << (addr_t)this << ":\n";
|
||||||
for (int i = 0; i < fVariables.CountItems(); i++) {
|
for (int i = 0; i < fVariables.CountItems(); i++) {
|
||||||
Variable* variable = fVariables.ItemAt(i);
|
Variable* variable = fVariables.ItemAt(i);
|
||||||
string += variable->ToString();
|
string += variable->ToString();
|
||||||
|
@ -175,7 +175,7 @@ Variable::ToString() const
|
|||||||
} else {
|
} else {
|
||||||
string << "Variable ";
|
string << "Variable ";
|
||||||
if (!fIsValid)
|
if (!fIsValid)
|
||||||
string << "(invalid," << (int32)this << ")";
|
string << "(invalid," << (addr_t)this << ")";
|
||||||
else
|
else
|
||||||
string << Index();
|
string << Index();
|
||||||
}
|
}
|
||||||
|
@ -189,9 +189,9 @@ AppServer::_DispatchMessage(int32 code, BPrivate::LinkReceiver& msg)
|
|||||||
int32 version;
|
int32 version;
|
||||||
if (msg.Read<int32>(&version) < B_OK
|
if (msg.Read<int32>(&version) < B_OK
|
||||||
|| version != AS_PROTOCOL_VERSION) {
|
|| version != AS_PROTOCOL_VERSION) {
|
||||||
syslog(LOG_ERR, "Application for user %ld with port %ld does "
|
syslog(LOG_ERR, "Application for user %" B_PRId32 " with port "
|
||||||
"not support the current server protocol.\n", userID,
|
"%" B_PRId32 " does not support the current server "
|
||||||
replyPort);
|
"protocol.\n", userID, replyPort);
|
||||||
} else {
|
} else {
|
||||||
desktop = _FindDesktop(userID, targetScreen);
|
desktop = _FindDesktop(userID, targetScreen);
|
||||||
if (desktop == NULL) {
|
if (desktop == NULL) {
|
||||||
@ -245,8 +245,8 @@ AppServer::_DispatchMessage(int32 code, BPrivate::LinkReceiver& msg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
STRACE(("Server::MainLoop received unexpected code %ld (offset %ld)\n",
|
STRACE(("Server::MainLoop received unexpected code %" B_PRId32 " "
|
||||||
code, code - SERVER_TRUE));
|
"(offset %" B_PRId32 ")\n", code, code - SERVER_TRUE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,14 +189,14 @@ ClientMemoryAllocator::Free(block* freeBlock)
|
|||||||
void
|
void
|
||||||
ClientMemoryAllocator::Dump()
|
ClientMemoryAllocator::Dump()
|
||||||
{
|
{
|
||||||
debug_printf("Application %ld, %s: chunks:\n", fApplication->ClientTeam(),
|
debug_printf("Application %" B_PRId32 ", %s: chunks:\n",
|
||||||
fApplication->Signature());
|
fApplication->ClientTeam(), fApplication->Signature());
|
||||||
|
|
||||||
chunk_list::Iterator iterator = fChunks.GetIterator();
|
chunk_list::Iterator iterator = fChunks.GetIterator();
|
||||||
int32 i = 0;
|
int32 i = 0;
|
||||||
while (struct chunk* chunk = iterator.Next()) {
|
while (struct chunk* chunk = iterator.Next()) {
|
||||||
debug_printf(" [%4ld] %p, area %ld, base %p, size %lu\n", i++, chunk,
|
debug_printf(" [%4" B_PRId32 "] %p, area %" B_PRId32 ", base %p, "
|
||||||
chunk->area, chunk->base, chunk->size);
|
"size %lu\n", i++, chunk, chunk->area, chunk->base, chunk->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_printf("free blocks:\n");
|
debug_printf("free blocks:\n");
|
||||||
@ -204,8 +204,8 @@ ClientMemoryAllocator::Dump()
|
|||||||
block_list::Iterator blockIterator = fFreeBlocks.GetIterator();
|
block_list::Iterator blockIterator = fFreeBlocks.GetIterator();
|
||||||
i = 0;
|
i = 0;
|
||||||
while (struct block* block = blockIterator.Next()) {
|
while (struct block* block = blockIterator.Next()) {
|
||||||
debug_printf(" [%6ld] %p, chunk %p, base %p, size %lu\n", i++, block,
|
debug_printf(" [%6" B_PRId32 "] %p, chunk %p, base %p, size %lu\n",
|
||||||
block->chunk, block->base, block->size);
|
i++, block, block->chunk, block->base, block->size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,8 +254,8 @@ ClientMemoryAllocator::_AllocateChunk(size_t size, bool& newArea)
|
|||||||
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
||||||
strcpy(name, "client heap");
|
strcpy(name, "client heap");
|
||||||
#else
|
#else
|
||||||
snprintf(name, sizeof(name), "heap:%ld:%s", fApplication->ClientTeam(),
|
snprintf(name, sizeof(name), "heap:%" B_PRId32 ":%s",
|
||||||
fApplication->SignatureLeaf());
|
fApplication->ClientTeam(), fApplication->SignatureLeaf());
|
||||||
#endif
|
#endif
|
||||||
area_id area = create_area(name, (void**)&address, B_ANY_ADDRESS, size,
|
area_id area = create_area(name, (void**)&address, B_ANY_ADDRESS, size,
|
||||||
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
|
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
|
||||||
|
@ -203,7 +203,7 @@ KeyboardFilter::Filter(BMessage* message, EventTarget** _target,
|
|||||||
if ((modifiers & B_CONTROL_KEY) != 0)
|
if ((modifiers & B_CONTROL_KEY) != 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
STRACE(("Set Workspace %ld\n", key - 1));
|
STRACE(("Set Workspace %" B_PRId32 "\n", key - 1));
|
||||||
|
|
||||||
fDesktop->SetWorkspaceAsync(key - B_F1_KEY, takeWindow);
|
fDesktop->SetWorkspaceAsync(key - B_F1_KEY, takeWindow);
|
||||||
return B_SKIP_MESSAGE;
|
return B_SKIP_MESSAGE;
|
||||||
@ -2640,8 +2640,8 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("Desktop %d:%s received unexpected code %ld\n", 0, "baron",
|
printf("Desktop %d:%s received unexpected code %" B_PRId32 "\n", 0,
|
||||||
code);
|
"baron", code);
|
||||||
|
|
||||||
if (link.NeedsReply()) {
|
if (link.NeedsReply()) {
|
||||||
// the client is now blocking and waiting for a reply!
|
// the client is now blocking and waiting for a reply!
|
||||||
@ -3366,8 +3366,8 @@ Desktop::_SetCurrentWorkspaceConfiguration()
|
|||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
// The application having the direct screen lock didn't give it up in
|
// The application having the direct screen lock didn't give it up in
|
||||||
// time, make it crash
|
// time, make it crash
|
||||||
syslog(LOG_ERR, "Team %ld did not give up its direct screen lock.\n",
|
syslog(LOG_ERR, "Team %" B_PRId32 " did not give up its direct screen "
|
||||||
fDirectScreenTeam);
|
"lock.\n", fDirectScreenTeam);
|
||||||
|
|
||||||
debug_thread(fDirectScreenTeam);
|
debug_thread(fDirectScreenTeam);
|
||||||
fDirectScreenTeam = -1;
|
fDirectScreenTeam = -1;
|
||||||
|
@ -293,7 +293,7 @@ DesktopSettingsPrivate::_Load()
|
|||||||
// colors
|
// colors
|
||||||
for (int32 i = 0; i < kNumColors; i++) {
|
for (int32 i = 0; i < kNumColors; i++) {
|
||||||
char colorName[12];
|
char colorName[12];
|
||||||
snprintf(colorName, sizeof(colorName), "color%ld",
|
snprintf(colorName, sizeof(colorName), "color%" B_PRId32,
|
||||||
(int32)index_to_color_which(i));
|
(int32)index_to_color_which(i));
|
||||||
|
|
||||||
settings.FindInt32(colorName, (int32*)&fShared.colors[i]);
|
settings.FindInt32(colorName, (int32*)&fShared.colors[i]);
|
||||||
@ -438,7 +438,7 @@ DesktopSettingsPrivate::Save(uint32 mask)
|
|||||||
|
|
||||||
for (int32 i = 0; i < kNumColors; i++) {
|
for (int32 i = 0; i < kNumColors; i++) {
|
||||||
char colorName[12];
|
char colorName[12];
|
||||||
snprintf(colorName, sizeof(colorName), "color%ld",
|
snprintf(colorName, sizeof(colorName), "color%" B_PRId32,
|
||||||
(int32)index_to_color_which(i));
|
(int32)index_to_color_which(i));
|
||||||
settings.AddInt32(colorName, (const int32&)fShared.colors[i]);
|
settings.AddInt32(colorName, (const int32&)fShared.colors[i]);
|
||||||
}
|
}
|
||||||
|
@ -635,10 +635,10 @@ DrawState::PrintToStream() const
|
|||||||
fHighColor.red, fHighColor.green, fHighColor.blue, fHighColor.alpha);
|
fHighColor.red, fHighColor.green, fHighColor.blue, fHighColor.alpha);
|
||||||
printf("\t LowColor: r=%d g=%d b=%d a=%d\n",
|
printf("\t LowColor: r=%d g=%d b=%d a=%d\n",
|
||||||
fLowColor.red, fLowColor.green, fLowColor.blue, fLowColor.alpha);
|
fLowColor.red, fLowColor.green, fLowColor.blue, fLowColor.alpha);
|
||||||
printf("\t Pattern: %llu\n", fPattern.GetInt64());
|
printf("\t Pattern: %" B_PRIu64 "\n", fPattern.GetInt64());
|
||||||
|
|
||||||
printf("\t DrawMode: %lu\n", (uint32)fDrawingMode);
|
printf("\t DrawMode: %" B_PRIu32 "\n", (uint32)fDrawingMode);
|
||||||
printf("\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n",
|
printf("\t AlphaSrcMode: %" B_PRId32 "\t AlphaFncMode: %" B_PRId32 "\n",
|
||||||
(int32)fAlphaSrcMode, (int32)fAlphaFncMode);
|
(int32)fAlphaSrcMode, (int32)fAlphaFncMode);
|
||||||
|
|
||||||
printf("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n",
|
printf("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n",
|
||||||
@ -652,9 +652,9 @@ DrawState::PrintToStream() const
|
|||||||
printf("\t Size: %.1f (%.1f)\n", fFont.Size(), fUnscaledFontSize);
|
printf("\t Size: %.1f (%.1f)\n", fFont.Size(), fUnscaledFontSize);
|
||||||
printf("\t Shear: %.2f\n", fFont.Shear());
|
printf("\t Shear: %.2f\n", fFont.Shear());
|
||||||
printf("\t Rotation: %.2f\n", fFont.Rotation());
|
printf("\t Rotation: %.2f\n", fFont.Rotation());
|
||||||
printf("\t Spacing: %ld\n", fFont.Spacing());
|
printf("\t Spacing: %" B_PRId32 "\n", fFont.Spacing());
|
||||||
printf("\t Encoding: %ld\n", fFont.Encoding());
|
printf("\t Encoding: %" B_PRId32 "\n", fFont.Encoding());
|
||||||
printf("\t Face: %d\n", fFont.Face());
|
printf("\t Face: %d\n", fFont.Face());
|
||||||
printf("\t Flags: %lu\n", fFont.Flags());
|
printf("\t Flags: %" B_PRIu32 "\n", fFont.Flags());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,9 +266,9 @@ InputServerStream::_MessageFromPort(BMessage** _message, bigtime_t timeout)
|
|||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
|
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
printf("Unflatten event failed: %s, port message code was: %ld - %c%c%c%c\n",
|
printf("Unflatten event failed: %s, port message code was: %" B_PRId32
|
||||||
strerror(status), code, (int8)(code >> 24), (int8)(code >> 16),
|
" - %c%c%c%c\n", strerror(status), code, (int8)(code >> 24),
|
||||||
(int8)(code >> 8), (int8)code);
|
(int8)(code >> 16), (int8)(code >> 8), (int8)code);
|
||||||
delete message;
|
delete message;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ IntPoint::ConstrainTo(const IntRect& r)
|
|||||||
void
|
void
|
||||||
IntPoint::PrintToStream() const
|
IntPoint::PrintToStream() const
|
||||||
{
|
{
|
||||||
printf("IntPoint(x:%ld, y:%ld)\n", x, y);
|
printf("IntPoint(x:%" B_PRId32 ", y:%" B_PRId32 ")\n", x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -209,7 +209,8 @@ IntRect::OffsetToCopy(int32 dx, int32 dy)
|
|||||||
void
|
void
|
||||||
IntRect::PrintToStream() const
|
IntRect::PrintToStream() const
|
||||||
{
|
{
|
||||||
printf("IntRect(l:%ld, t:%ld, r:%ld, b:%ld)\n", left, top, right, bottom);
|
printf("IntRect(l:%" B_PRId32 ", t:%" B_PRId32 ", r:%" B_PRId32 ", b:%"
|
||||||
|
B_PRId32 ")\n", left, top, right, bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,11 @@ Includes [ FGristFiles AppServer.cpp BitmapManager.cpp
|
|||||||
: $(HAIKU_FREETYPE_HEADERS_DEPENDENCY) ;
|
: $(HAIKU_FREETYPE_HEADERS_DEPENDENCY) ;
|
||||||
|
|
||||||
|
|
||||||
|
local BROKEN_64 = ;
|
||||||
|
if $(TARGET_ARCH) != x86_64 {
|
||||||
|
BROKEN_64 = "" ;
|
||||||
|
}
|
||||||
|
|
||||||
Server app_server :
|
Server app_server :
|
||||||
Angle.cpp
|
Angle.cpp
|
||||||
AppServer.cpp
|
AppServer.cpp
|
||||||
@ -87,7 +92,7 @@ Server app_server :
|
|||||||
# libraries
|
# libraries
|
||||||
:
|
:
|
||||||
libtranslation.so libbe.so libbnetapi.so
|
libtranslation.so libbe.so libbnetapi.so
|
||||||
libasdrawing.a libasremote.a libashtml5.a
|
libasdrawing.a $(BROKEN_64)libasremote.a $(BROKEN_64)libashtml5.a
|
||||||
libpainter.a libagg.a $(HAIKU_FREETYPE_LIB)
|
libpainter.a libagg.a $(HAIKU_FREETYPE_LIB)
|
||||||
libstackandtile.a liblinprog.a libtextencoding.so libshared.a
|
libstackandtile.a liblinprog.a libtextencoding.so libshared.a
|
||||||
$(TARGET_LIBSTDC++)
|
$(TARGET_LIBSTDC++)
|
||||||
|
@ -147,8 +147,8 @@ MessageLooper::_MessageLooper()
|
|||||||
// that shouldn't happen, it's our port
|
// that shouldn't happen, it's our port
|
||||||
char name[256];
|
char name[256];
|
||||||
_GetLooperName(name, 256);
|
_GetLooperName(name, 256);
|
||||||
printf("MessageLooper \"%s\": Someone deleted our message port %ld, %s!\n",
|
printf("MessageLooper \"%s\": Someone deleted our message port %"
|
||||||
name, receiver.Port(), strerror(status));
|
B_PRId32 ", %s!\n", name, receiver.Port(), strerror(status));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ MultiLocker::InitCheck()
|
|||||||
contained.
|
contained.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
MultiLocker::IsWriteLocked(uint32* _stackBase, thread_id* _thread) const
|
MultiLocker::IsWriteLocked(addr_t* _stackBase, thread_id* _thread) const
|
||||||
{
|
{
|
||||||
#if TIMING
|
#if TIMING
|
||||||
bigtime_t start = system_time();
|
bigtime_t start = system_time();
|
||||||
@ -163,7 +163,7 @@ MultiLocker::IsWriteLocked(uint32* _stackBase, thread_id* _thread) const
|
|||||||
// this is managed by taking the address of the item on the
|
// this is managed by taking the address of the item on the
|
||||||
// stack and dividing it by the size of the memory pages
|
// stack and dividing it by the size of the memory pages
|
||||||
// if it is the same as the cached stack_page, there is a match
|
// if it is the same as the cached stack_page, there is a match
|
||||||
uint32 stackBase = (uint32)&writeLockHolder / B_PAGE_SIZE;
|
addr_t stackBase = (addr_t)&writeLockHolder / B_PAGE_SIZE;
|
||||||
thread_id thread = 0;
|
thread_id thread = 0;
|
||||||
|
|
||||||
if (fWriterStackBase == stackBase) {
|
if (fWriterStackBase == stackBase) {
|
||||||
@ -248,7 +248,7 @@ MultiLocker::WriteLock()
|
|||||||
bool locked = false;
|
bool locked = false;
|
||||||
|
|
||||||
if (fInit == B_OK) {
|
if (fInit == B_OK) {
|
||||||
uint32 stackBase = 0;
|
addr_t stackBase = 0;
|
||||||
thread_id thread = -1;
|
thread_id thread = -1;
|
||||||
|
|
||||||
if (IsWriteLocked(&stackBase, &thread)) {
|
if (IsWriteLocked(&stackBase, &thread)) {
|
||||||
@ -434,7 +434,7 @@ MultiLocker::WriteLock()
|
|||||||
if (fInit != B_OK)
|
if (fInit != B_OK)
|
||||||
debugger("lock not initialized");
|
debugger("lock not initialized");
|
||||||
|
|
||||||
uint32 stackBase = 0;
|
addr_t stackBase = 0;
|
||||||
thread_id thread = -1;
|
thread_id thread = -1;
|
||||||
|
|
||||||
if (IsWriteLocked(&stackBase, &thread)) {
|
if (IsWriteLocked(&stackBase, &thread)) {
|
||||||
@ -508,7 +508,7 @@ MultiLocker::WriteUnlock()
|
|||||||
} else {
|
} else {
|
||||||
char message[256];
|
char message[256];
|
||||||
snprintf(message, sizeof(message), "Non-writer attempting to "
|
snprintf(message, sizeof(message), "Non-writer attempting to "
|
||||||
"WriteUnlock() - write holder: %ld", fWriterThread);
|
"WriteUnlock() - write holder: %" B_PRId32, fWriterThread);
|
||||||
debugger(message);
|
debugger(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
bool WriteUnlock();
|
bool WriteUnlock();
|
||||||
|
|
||||||
// does the current thread hold a write lock ?
|
// does the current thread hold a write lock ?
|
||||||
bool IsWriteLocked(uint32 *stackBase = NULL,
|
bool IsWriteLocked(addr_t *stackBase = NULL,
|
||||||
thread_id *thread = NULL) const;
|
thread_id *thread = NULL) const;
|
||||||
|
|
||||||
#if MULTI_LOCKER_DEBUG
|
#if MULTI_LOCKER_DEBUG
|
||||||
@ -97,7 +97,7 @@ private:
|
|||||||
status_t fInit;
|
status_t fInit;
|
||||||
int32 fWriterNest;
|
int32 fWriterNest;
|
||||||
thread_id fWriterThread;
|
thread_id fWriterThread;
|
||||||
uint32 fWriterStackBase;
|
addr_t fWriterStackBase;
|
||||||
|
|
||||||
#if MULTI_LOCKER_TIMING
|
#if MULTI_LOCKER_TIMING
|
||||||
uint32 rl_count;
|
uint32 rl_count;
|
||||||
|
@ -105,7 +105,7 @@ ScreenManager::AcquireScreens(ScreenOwner* owner, int32* wishList,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TEST_MODE == 0
|
#if TEST_MODE == 0 && !defined(__x86_64__)
|
||||||
if (added == 0 && target != NULL) {
|
if (added == 0 && target != NULL) {
|
||||||
// there's a specific target screen we want to initialize
|
// there's a specific target screen we want to initialize
|
||||||
// TODO: right now we only support remote screens, but we could
|
// TODO: right now we only support remote screens, but we could
|
||||||
|
@ -109,7 +109,8 @@ ServerApp::ServerApp(Desktop* desktop, port_id clientReplyPort,
|
|||||||
fSignature = "application/no-signature";
|
fSignature = "application/no-signature";
|
||||||
|
|
||||||
char name[B_OS_NAME_LENGTH];
|
char name[B_OS_NAME_LENGTH];
|
||||||
snprintf(name, sizeof(name), "a<%ld:%s", clientTeam, SignatureLeaf());
|
snprintf(name, sizeof(name), "a<%" B_PRId32 ":%s", clientTeam,
|
||||||
|
SignatureLeaf());
|
||||||
|
|
||||||
fMessagePort = create_port(DEFAULT_MONITOR_PORT_SIZE, name);
|
fMessagePort = create_port(DEFAULT_MONITOR_PORT_SIZE, name);
|
||||||
if (fMessagePort < B_OK)
|
if (fMessagePort < B_OK)
|
||||||
@ -141,8 +142,8 @@ ServerApp::ServerApp(Desktop* desktop, port_id clientReplyPort,
|
|||||||
desktop->UnlockSingleWindow();
|
desktop->UnlockSingleWindow();
|
||||||
|
|
||||||
STRACE(("ServerApp %s:\n", Signature()));
|
STRACE(("ServerApp %s:\n", Signature()));
|
||||||
STRACE(("\tBApp port: %ld\n", fClientReplyPort));
|
STRACE(("\tBApp port: %" B_PRId32 "\n", fClientReplyPort));
|
||||||
STRACE(("\tReceiver port: %ld\n", fMessagePort));
|
STRACE(("\tReceiver port: %" B_PRId32 "\n", fMessagePort));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -505,7 +506,7 @@ ServerApp::NotifyDeleteClientArea(area_id serverArea)
|
|||||||
void
|
void
|
||||||
ServerApp::_GetLooperName(char* name, size_t length)
|
ServerApp::_GetLooperName(char* name, size_t length)
|
||||||
{
|
{
|
||||||
snprintf(name, length, "a:%ld:%s", ClientTeam(), SignatureLeaf());
|
snprintf(name, length, "a:%" B_PRId32 ":%s", ClientTeam(), SignatureLeaf());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -567,13 +568,14 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
{
|
{
|
||||||
fMapLocker.Lock();
|
fMapLocker.Lock();
|
||||||
|
|
||||||
debug_printf("Application %ld, %s: %d bitmaps:\n", ClientTeam(),
|
debug_printf("Application %" B_PRId32 ", %s: %d bitmaps:\n",
|
||||||
Signature(), (int)fBitmapMap.size());
|
ClientTeam(), Signature(), (int)fBitmapMap.size());
|
||||||
|
|
||||||
BitmapMap::const_iterator iterator = fBitmapMap.begin();
|
BitmapMap::const_iterator iterator = fBitmapMap.begin();
|
||||||
for (; iterator != fBitmapMap.end(); iterator++) {
|
for (; iterator != fBitmapMap.end(); iterator++) {
|
||||||
ServerBitmap* bitmap = iterator->second;
|
ServerBitmap* bitmap = iterator->second;
|
||||||
debug_printf(" [%ld] %ldx%ld, area %ld, size %ld\n",
|
debug_printf(" [%" B_PRId32 "] %" B_PRId32 "x%" B_PRId32 ", "
|
||||||
|
"area %" B_PRId32 ", size %" B_PRId32 "\n",
|
||||||
bitmap->Token(), bitmap->Width(), bitmap->Height(),
|
bitmap->Token(), bitmap->Width(), bitmap->Height(),
|
||||||
bitmap->Area(), bitmap->BitsLength());
|
bitmap->Area(), bitmap->BitsLength());
|
||||||
}
|
}
|
||||||
@ -765,8 +767,8 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
|
|
||||||
ServerBitmap* bitmap = _FindBitmap(token);
|
ServerBitmap* bitmap = _FindBitmap(token);
|
||||||
if (bitmap != NULL) {
|
if (bitmap != NULL) {
|
||||||
STRACE(("ServerApp %s: Deleting Bitmap %ld\n", Signature(),
|
STRACE(("ServerApp %s: Deleting Bitmap %" B_PRId32 "\n",
|
||||||
token));
|
Signature(), token));
|
||||||
|
|
||||||
_DeleteBitmap(bitmap);
|
_DeleteBitmap(bitmap);
|
||||||
}
|
}
|
||||||
@ -787,7 +789,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
ServerBitmap* bitmap = GetBitmap(token);
|
ServerBitmap* bitmap = GetBitmap(token);
|
||||||
if (bitmap != NULL) {
|
if (bitmap != NULL) {
|
||||||
STRACE(("ServerApp %s: Get overlay restrictions for bitmap "
|
STRACE(("ServerApp %s: Get overlay restrictions for bitmap "
|
||||||
"%ld\n", Signature(), token));
|
"%" B_PRId32 "\n", Signature(), token));
|
||||||
|
|
||||||
status = fDesktop->HWInterface()->GetOverlayRestrictions(
|
status = fDesktop->HWInterface()->GetOverlayRestrictions(
|
||||||
bitmap->Overlay(), &restrictions);
|
bitmap->Overlay(), &restrictions);
|
||||||
@ -3161,8 +3163,8 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("ServerApp %s received unhandled message code %ld\n",
|
printf("ServerApp %s received unhandled message code %" B_PRId32
|
||||||
Signature(), code);
|
"\n", Signature(), code);
|
||||||
|
|
||||||
if (link.NeedsReply()) {
|
if (link.NeedsReply()) {
|
||||||
// the client is now blocking and waiting for a reply!
|
// the client is now blocking and waiting for a reply!
|
||||||
@ -3199,8 +3201,8 @@ ServerApp::_MessageLooper()
|
|||||||
status_t err = B_OK;
|
status_t err = B_OK;
|
||||||
|
|
||||||
while (!fQuitting) {
|
while (!fQuitting) {
|
||||||
STRACE(("info: ServerApp::_MessageLooper() listening on port %ld.\n",
|
STRACE(("info: ServerApp::_MessageLooper() listening on port %" B_PRId32
|
||||||
fMessagePort));
|
".\n", fMessagePort));
|
||||||
|
|
||||||
err = receiver.GetNextMessage(code, B_INFINITE_TIMEOUT);
|
err = receiver.GetNextMessage(code, B_INFINITE_TIMEOUT);
|
||||||
if (err != B_OK || code == B_QUIT_REQUESTED) {
|
if (err != B_OK || code == B_QUIT_REQUESTED) {
|
||||||
|
@ -209,8 +209,9 @@ ServerBitmap::Owner() const
|
|||||||
void
|
void
|
||||||
ServerBitmap::PrintToStream()
|
ServerBitmap::PrintToStream()
|
||||||
{
|
{
|
||||||
printf("Bitmap@%p: (%ld:%ld), space %ld, bpr %ld, buffer %p\n",
|
printf("Bitmap@%p: (%" B_PRId32 ":%" B_PRId32 "), space %" B_PRId32 ", "
|
||||||
this, fWidth, fHeight, (int32)fSpace, fBytesPerRow, fBuffer);
|
"bpr %" B_PRId32 ", buffer %p\n", this, fWidth, fHeight, (int32)fSpace,
|
||||||
|
fBytesPerRow, fBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ class BoundingBoxConsumer {
|
|||||||
BoundingBoxConsumer(Transformable& transform, BRect* rectArray,
|
BoundingBoxConsumer(Transformable& transform, BRect* rectArray,
|
||||||
bool asString)
|
bool asString)
|
||||||
: rectArray(rectArray)
|
: rectArray(rectArray)
|
||||||
, stringBoundingBox(LONG_MAX, LONG_MAX, LONG_MIN, LONG_MIN)
|
, stringBoundingBox(INT32_MAX, INT32_MAX, INT32_MIN, INT32_MIN)
|
||||||
, fAsString(asString)
|
, fAsString(asString)
|
||||||
, fCurves(fPathAdaptor)
|
, fCurves(fPathAdaptor)
|
||||||
, fContour(fCurves)
|
, fContour(fCurves)
|
||||||
|
@ -234,14 +234,14 @@ ServerWindow::~ServerWindow()
|
|||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
profile* p = (profile*)profiles.ItemAtFast(i);
|
profile* p = (profile*)profiles.ItemAtFast(i);
|
||||||
string_for_message_code(p->code, codeName);
|
string_for_message_code(p->code, codeName);
|
||||||
printf("[%s] called %ld times, %g secs (%Ld usecs per call)\n",
|
printf("[%s] called %" B_PRId32 " times, %g secs (%" B_PRId64 " usecs "
|
||||||
codeName.String(), p->count, p->time / 1000000.0,
|
"per call)\n", codeName.String(), p->count, p->time / 1000000.0,
|
||||||
p->time / p->count);
|
p->time / p->count);
|
||||||
}
|
}
|
||||||
if (sRedrawProcessingTime.count > 0) {
|
if (sRedrawProcessingTime.count > 0) {
|
||||||
printf("average redraw processing time: %g secs, count: %ld (%lld "
|
printf("average redraw processing time: %g secs, count: %" B_PRId32 " "
|
||||||
"usecs per call)\n", sRedrawProcessingTime.time / 1000000.0,
|
"(%" B_PRId64 " usecs per call)\n",
|
||||||
sRedrawProcessingTime.count,
|
sRedrawProcessingTime.time / 1000000.0, sRedrawProcessingTime.count,
|
||||||
sRedrawProcessingTime.time / sRedrawProcessingTime.count);
|
sRedrawProcessingTime.time / sRedrawProcessingTime.count);
|
||||||
}
|
}
|
||||||
// if (sNextMessageTime.count > 0) {
|
// if (sNextMessageTime.count > 0) {
|
||||||
@ -326,7 +326,7 @@ ServerWindow::_GetLooperName(char* name, size_t length)
|
|||||||
if (title == NULL || !title[0])
|
if (title == NULL || !title[0])
|
||||||
title = "Unnamed Window";
|
title = "Unnamed Window";
|
||||||
|
|
||||||
snprintf(name, length, "w:%ld:%s", ClientTeam(), title);
|
snprintf(name, length, "w:%" B_PRId32 ":%s", ClientTeam(), title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ ServerWindow::_CreateView(BPrivate::LinkReceiver& link, View** _parent)
|
|||||||
link.Read<rgb_color>(&viewColor);
|
link.Read<rgb_color>(&viewColor);
|
||||||
link.Read<int32>(&parentToken);
|
link.Read<int32>(&parentToken);
|
||||||
|
|
||||||
STRACE(("ServerWindow(%s)::_CreateView()-> view %s, token %ld\n",
|
STRACE(("ServerWindow(%s)::_CreateView()-> view %s, token %" B_PRId32 "\n",
|
||||||
fTitle, name, token));
|
fTitle, name, token));
|
||||||
|
|
||||||
View* newView;
|
View* newView;
|
||||||
@ -612,8 +612,8 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
link.Read<bool>(&minimize);
|
link.Read<bool>(&minimize);
|
||||||
if (link.Read<int32>(&showLevel) == B_OK) {
|
if (link.Read<int32>(&showLevel) == B_OK) {
|
||||||
DTRACE(("ServerWindow %s: Message AS_MINIMIZE_WINDOW, "
|
DTRACE(("ServerWindow %s: Message AS_MINIMIZE_WINDOW, "
|
||||||
"showLevel: %ld, minimize: %d\n", Title(), showLevel,
|
"showLevel: %" B_PRId32 ", minimize: %d\n", Title(),
|
||||||
minimize));
|
showLevel, minimize));
|
||||||
|
|
||||||
if (showLevel <= 0) {
|
if (showLevel <= 0) {
|
||||||
// window is currently hidden - ignore the minimize request
|
// window is currently hidden - ignore the minimize request
|
||||||
@ -942,8 +942,8 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
link.Read<int32>(&maxHeight);
|
link.Read<int32>(&maxHeight);
|
||||||
*/
|
*/
|
||||||
DTRACE(("ServerWindow %s: Message AS_SET_SIZE_LIMITS: "
|
DTRACE(("ServerWindow %s: Message AS_SET_SIZE_LIMITS: "
|
||||||
"x: %ld-%ld, y: %ld-%ld\n",
|
"x: %" B_PRId32 "-%" B_PRId32 ", y: %" B_PRId32 "-%" B_PRId32
|
||||||
Title(), minWidth, maxWidth, minHeight, maxHeight));
|
"\n", Title(), minWidth, maxWidth, minHeight, maxHeight));
|
||||||
|
|
||||||
fWindow->SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
|
fWindow->SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
|
||||||
|
|
||||||
@ -1112,12 +1112,12 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
// TODO: if this happens, we probably want to kill the app and
|
// TODO: if this happens, we probably want to kill the app and
|
||||||
// clean up
|
// clean up
|
||||||
debug_printf("ServerWindow %s: Message "
|
debug_printf("ServerWindow %s: Message "
|
||||||
"\n\n\nAS_SET_CURRENT_VIEW: view not found, token %ld\n",
|
"\n\n\nAS_SET_CURRENT_VIEW: view not found, token %"
|
||||||
fTitle, token);
|
B_PRId32 "\n", fTitle, token);
|
||||||
current = NULL;
|
current = NULL;
|
||||||
} else {
|
} else {
|
||||||
DTRACE(("\n\n\nServerWindow %s: Message AS_SET_CURRENT_VIEW: %s, "
|
DTRACE(("\n\n\nServerWindow %s: Message AS_SET_CURRENT_VIEW: %s, "
|
||||||
"token %ld\n", fTitle, current->Name(), token));
|
"token %" B_PRId32 "\n", fTitle, current->Name(), token));
|
||||||
_SetCurrentView(current);
|
_SetCurrentView(current);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1457,7 +1457,7 @@ fDesktop->LockSingleWindow();
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
DTRACE(("ServerWindow %s: Message AS_VIEW_RESIZE_MODE: "
|
DTRACE(("ServerWindow %s: Message AS_VIEW_RESIZE_MODE: "
|
||||||
"View: %s -> %ld\n", Title(), fCurrentView->Name(),
|
"View: %s -> %" B_PRId32 "\n", Title(), fCurrentView->Name(),
|
||||||
resizeMode));
|
resizeMode));
|
||||||
|
|
||||||
fCurrentView->SetResizeMode(resizeMode);
|
fCurrentView->SetResizeMode(resizeMode);
|
||||||
@ -1482,8 +1482,8 @@ fDesktop->LockSingleWindow();
|
|||||||
}
|
}
|
||||||
|
|
||||||
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_FLAGS: "
|
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_FLAGS: "
|
||||||
"View: %s -> flags: %lu\n", Title(), fCurrentView->Name(),
|
"View: %s -> flags: %" B_PRIu32 "\n", Title(),
|
||||||
flags));
|
fCurrentView->Name(), flags));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_VIEW_HIDE:
|
case AS_VIEW_HIDE:
|
||||||
@ -1929,7 +1929,7 @@ fDesktop->LockSingleWindow();
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_CLIP_REGION: "
|
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_CLIP_REGION: "
|
||||||
"View: %s -> rect count: %ld, frame = "
|
"View: %s -> rect count: %" B_PRId32 ", frame = "
|
||||||
"BRect(%.1f, %.1f, %.1f, %.1f)\n",
|
"BRect(%.1f, %.1f, %.1f, %.1f)\n",
|
||||||
Title(), fCurrentView->Name(), rectCount,
|
Title(), fCurrentView->Name(), rectCount,
|
||||||
region.Frame().left, region.Frame().top,
|
region.Frame().left, region.Frame().top,
|
||||||
@ -1976,8 +1976,8 @@ fDesktop->LockSingleWindow();
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
DTRACE(("ServerWindow %s: Message AS_VIEW_INVALIDATE_REGION: "
|
DTRACE(("ServerWindow %s: Message AS_VIEW_INVALIDATE_REGION: "
|
||||||
"View: %s -> rect count: %ld, frame: BRect(%.1f, %.1f, "
|
"View: %s -> rect count: %" B_PRId32 ", frame: BRect(%.1f, "
|
||||||
"%.1f, %.1f)\n", Title(),
|
"%.1f, %.1f, %.1f)\n", Title(),
|
||||||
fCurrentView->Name(), region.CountRects(),
|
fCurrentView->Name(), region.CountRects(),
|
||||||
region.Frame().left, region.Frame().top,
|
region.Frame().left, region.Frame().top,
|
||||||
region.Frame().right, region.Frame().bottom));
|
region.Frame().right, region.Frame().bottom));
|
||||||
@ -2141,7 +2141,7 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code,
|
|||||||
if (!fCurrentView->IsVisible() || !fWindow->IsVisible()) {
|
if (!fCurrentView->IsVisible() || !fWindow->IsVisible()) {
|
||||||
if (link.NeedsReply()) {
|
if (link.NeedsReply()) {
|
||||||
debug_printf("ServerWindow::DispatchViewDrawingMessage() got "
|
debug_printf("ServerWindow::DispatchViewDrawingMessage() got "
|
||||||
"message %ld that needs a reply!\n", code);
|
"message %" B_PRId32 " that needs a reply!\n", code);
|
||||||
// the client is now blocking and waiting for a reply!
|
// the client is now blocking and waiting for a reply!
|
||||||
fLink.StartMessage(B_ERROR);
|
fLink.StartMessage(B_ERROR);
|
||||||
fLink.Flush();
|
fLink.Flush();
|
||||||
@ -2285,8 +2285,8 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code,
|
|||||||
ServerBitmap* bitmap = fServerApp->GetBitmap(info.bitmapToken);
|
ServerBitmap* bitmap = fServerApp->GetBitmap(info.bitmapToken);
|
||||||
if (bitmap != NULL) {
|
if (bitmap != NULL) {
|
||||||
DTRACE(("ServerWindow %s: Message AS_VIEW_DRAW_BITMAP: "
|
DTRACE(("ServerWindow %s: Message AS_VIEW_DRAW_BITMAP: "
|
||||||
"View: %s, bitmap: %ld (size %ld x %ld), "
|
"View: %s, bitmap: %" B_PRId32 " (size %" B_PRId32 " x "
|
||||||
"BRect(%.1f, %.1f, %.1f, %.1f) -> "
|
"%" B_PRId32 "), BRect(%.1f, %.1f, %.1f, %.1f) -> "
|
||||||
"BRect(%.1f, %.1f, %.1f, %.1f)\n",
|
"BRect(%.1f, %.1f, %.1f, %.1f)\n",
|
||||||
fTitle, fCurrentView->Name(), info.bitmapToken,
|
fTitle, fCurrentView->Name(), info.bitmapToken,
|
||||||
bitmap->Width(), bitmap->Height(),
|
bitmap->Width(), bitmap->Height(),
|
||||||
@ -3388,7 +3388,7 @@ ServerWindow::_MessageLooper()
|
|||||||
#ifdef PROFILE_MESSAGE_LOOP
|
#ifdef PROFILE_MESSAGE_LOOP
|
||||||
bigtime_t diff = system_time() - start;
|
bigtime_t diff = system_time() - start;
|
||||||
if (diff > 10000) {
|
if (diff > 10000) {
|
||||||
printf("ServerWindow %s: lock acquisition took %Ld usecs\n",
|
printf("ServerWindow %s: lock acquisition took %" B_PRId64 " usecs\n",
|
||||||
Title(), diff);
|
Title(), diff);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3470,8 +3470,8 @@ ServerWindow::_MessageLooper()
|
|||||||
sMessageProfile[code].time += diff;
|
sMessageProfile[code].time += diff;
|
||||||
#endif
|
#endif
|
||||||
if (diff > 10000) {
|
if (diff > 10000) {
|
||||||
printf("ServerWindow %s: message %ld took %Ld usecs\n",
|
printf("ServerWindow %s: message %" B_PRId32 " took %"
|
||||||
Title(), code, diff);
|
B_PRId64 " usecs\n", Title(), code, diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3554,8 +3554,8 @@ ServerWindow::HandleDirectConnection(int32 bufferState, int32 driverState)
|
|||||||
if (fDirectWindowInfo == NULL)
|
if (fDirectWindowInfo == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
STRACE(("HandleDirectConnection(bufferState = %ld, driverState = %ld)\n",
|
STRACE(("HandleDirectConnection(bufferState = %" B_PRId32 ", driverState = "
|
||||||
bufferState, driverState));
|
"%" B_PRId32 ")\n", bufferState, driverState));
|
||||||
|
|
||||||
status_t status = fDirectWindowInfo->SetState(
|
status_t status = fDirectWindowInfo->SetState(
|
||||||
(direct_buffer_state)bufferState, (direct_driver_state)driverState,
|
(direct_buffer_state)bufferState, (direct_driver_state)driverState,
|
||||||
|
@ -1614,9 +1614,11 @@ void
|
|||||||
View::PrintToStream() const
|
View::PrintToStream() const
|
||||||
{
|
{
|
||||||
printf("View: %s\n", Name());
|
printf("View: %s\n", Name());
|
||||||
printf(" fToken: %ld\n", fToken);
|
printf(" fToken: %" B_PRId32 "\n", fToken);
|
||||||
printf(" fFrame: IntRect(%ld, %ld, %ld, %ld)\n", fFrame.left, fFrame.top, fFrame.right, fFrame.bottom);
|
printf(" fFrame: IntRect(%" B_PRId32 ", %" B_PRId32 ", %" B_PRId32 ", %" B_PRId32 ")\n",
|
||||||
printf(" fScrollingOffset: IntPoint(%ld, %ld)\n", fScrollingOffset.x, fScrollingOffset.y);
|
fFrame.left, fFrame.top, fFrame.right, fFrame.bottom);
|
||||||
|
printf(" fScrollingOffset: IntPoint(%" B_PRId32 ", %" B_PRId32 ")\n",
|
||||||
|
fScrollingOffset.x, fScrollingOffset.y);
|
||||||
printf(" fHidden: %d\n", fHidden);
|
printf(" fHidden: %d\n", fHidden);
|
||||||
printf(" fVisible: %d\n", fVisible);
|
printf(" fVisible: %d\n", fVisible);
|
||||||
printf(" fWindow: %p\n", fWindow);
|
printf(" fWindow: %p\n", fWindow);
|
||||||
|
@ -962,7 +962,7 @@ AccelerantHWInterface::GetMonitorInfo(monitor_info* info)
|
|||||||
memset(info, 0, sizeof(monitor_info));
|
memset(info, 0, sizeof(monitor_info));
|
||||||
strlcpy(info->vendor, edid.vendor.manufacturer, sizeof(info->vendor));
|
strlcpy(info->vendor, edid.vendor.manufacturer, sizeof(info->vendor));
|
||||||
if (edid.vendor.serial != 0) {
|
if (edid.vendor.serial != 0) {
|
||||||
snprintf(info->serial_number, sizeof(info->serial_number), "%lu",
|
snprintf(info->serial_number, sizeof(info->serial_number), "%" B_PRIu32,
|
||||||
edid.vendor.serial);
|
edid.vendor.serial);
|
||||||
}
|
}
|
||||||
info->product_id = edid.vendor.prod_id;
|
info->product_id = edid.vendor.prod_id;
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
fDryRun(dryRun),
|
fDryRun(dryRun),
|
||||||
fSubpixelAntiAliased(subpixelAntiAliased),
|
fSubpixelAntiAliased(subpixelAntiAliased),
|
||||||
fVector(false),
|
fVector(false),
|
||||||
fBounds(LONG_MAX, LONG_MAX, LONG_MIN, LONG_MIN),
|
fBounds(INT32_MAX, INT32_MAX, INT32_MIN, INT32_MIN),
|
||||||
fNextCharPos(nextCharPos),
|
fNextCharPos(nextCharPos),
|
||||||
|
|
||||||
fTransformedGlyph(transformedGlyph),
|
fTransformedGlyph(transformedGlyph),
|
||||||
|
@ -371,7 +371,7 @@ FontCacheEntry::GenerateSignature(char* signature, size_t signatureSize,
|
|||||||
bool hinting = font.Hinting();
|
bool hinting = font.Hinting();
|
||||||
uint8 averageWeight = gSubpixelAverageWeight;
|
uint8 averageWeight = gSubpixelAverageWeight;
|
||||||
|
|
||||||
snprintf(signature, signatureSize, "%ld,%u,%d,%d,%.1f,%d,%d",
|
snprintf(signature, signatureSize, "%" B_PRId32 ",%u,%d,%d,%.1f,%d,%d",
|
||||||
font.GetFamilyAndStyle(), charMap,
|
font.GetFamilyAndStyle(), charMap,
|
||||||
font.Face(), int(renderingType), font.Size(), hinting, averageWeight);
|
font.Face(), int(renderingType), font.Size(), hinting, averageWeight);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <FontPrivate.h>
|
#include <FontPrivate.h>
|
||||||
|
|
||||||
|
|
||||||
const uint32 kInvalidFamilyFlags = ~0UL;
|
const uint32 kInvalidFamilyFlags = ~(uint32)0;
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -642,7 +642,8 @@ FontManager::_FindDirectory(node_ref& nodeRef)
|
|||||||
void
|
void
|
||||||
FontManager::_RemoveDirectory(font_directory* directory)
|
FontManager::_RemoveDirectory(font_directory* directory)
|
||||||
{
|
{
|
||||||
FTRACE(("FontManager: Remove directory (%Ld)!\n", directory->directory.node));
|
FTRACE(("FontManager: Remove directory (%" B_PRIdINO ")!\n",
|
||||||
|
directory->directory.node));
|
||||||
|
|
||||||
fDirectories.RemoveItem(directory, false);
|
fDirectories.RemoveItem(directory, false);
|
||||||
|
|
||||||
@ -704,8 +705,8 @@ FontManager::_AddPath(BEntry& entry, font_directory** _newDirectory)
|
|||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
// we cannot watch this directory - while this is unfortunate,
|
// we cannot watch this directory - while this is unfortunate,
|
||||||
// it's not a critical error
|
// it's not a critical error
|
||||||
printf("could not watch directory %ld:%Ld\n", nodeRef.device,
|
printf("could not watch directory %" B_PRIdDEV ":%" B_PRIdINO "\n",
|
||||||
nodeRef.node);
|
nodeRef.device, nodeRef.node);
|
||||||
// TODO: should go into syslog()
|
// TODO: should go into syslog()
|
||||||
} else {
|
} else {
|
||||||
BPath path(&entry);
|
BPath path(&entry);
|
||||||
|
@ -50,7 +50,7 @@ prepare_output()
|
|||||||
// check file size
|
// check file size
|
||||||
struct stat stat;
|
struct stat stat;
|
||||||
if (fstat(sLog, &stat) == 0) {
|
if (fstat(sLog, &stat) == 0) {
|
||||||
if (stat.st_size < sLogMaxSize)
|
if (stat.st_size < (off_t)sLogMaxSize)
|
||||||
needNew = false;
|
needNew = false;
|
||||||
else
|
else
|
||||||
tooLarge = true;
|
tooLarge = true;
|
||||||
@ -100,7 +100,7 @@ write_to_log(const char *buffer, int32 length)
|
|||||||
if (sRepeatCount > 0) {
|
if (sRepeatCount > 0) {
|
||||||
char repeat[64];
|
char repeat[64];
|
||||||
ssize_t size = snprintf(repeat, sizeof(repeat),
|
ssize_t size = snprintf(repeat, sizeof(repeat),
|
||||||
"Last message repeated %ld time%s\n", sRepeatCount,
|
"Last message repeated %" B_PRId32 " time%s\n", sRepeatCount,
|
||||||
sRepeatCount > 1 ? "s" : "");
|
sRepeatCount > 1 ? "s" : "");
|
||||||
sRepeatCount = 0;
|
sRepeatCount = 0;
|
||||||
if (write(sLog, repeat, strlen(repeat)) < size)
|
if (write(sLog, repeat, strlen(repeat)) < size)
|
||||||
@ -144,7 +144,7 @@ syslog_output(syslog_message &message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((message.options & LOG_PID) != 0) {
|
if ((message.options & LOG_PID) != 0) {
|
||||||
pos += snprintf(header + pos, sizeof(header) - pos, "[%ld]",
|
pos += snprintf(header + pos, sizeof(header) - pos, "[%" B_PRId32 "]",
|
||||||
message.from);
|
message.from);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user