hrev47296 adds 3 changesets to branch 'master' old head: 1ee3031a901ef3e35e167b892597eb4fe35fb11a new head: d527dbc8f6469f534abdeca2bf9441998cce22f8 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d527dbc+%5E1ee3031 ---------------------------------------------------------------------------- 1a7bcf6: Lots of B_PRI... insertions to fix errors with DEBUG=1. 9118212: Increase HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET for debug builds. d527dbc: Avoid unwanted output of <build>unzip with DEBUG=1. [ Oliver Tappe <zooey@xxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 42 files changed, 442 insertions(+), 349 deletions(-) build/jam/ArchitectureRules | 15 +++- .../kernel/drivers/midi/usb_midi/usb_midi.cpp | 16 ++-- .../kernel/file_systems/bfs/BPlusTree.cpp | 6 +- .../file_systems/packagefs/kernel_interface.cpp | 67 +++++++------- .../kernel/partitioning_systems/session/Debug.h | 4 +- .../kernel/partitioning_systems/session/Disc.cpp | 93 +++++++++++--------- .../partitioning_systems/session/session.cpp | 15 ++-- .../mail_daemon/outbound_protocols/smtp/smtp.cpp | 4 +- .../media/media-add-ons/mixer/MixerDebug.h | 6 +- .../multi_audio/MultiAudioDevice.cpp | 32 ++++--- .../media-add-ons/multi_audio/MultiAudioNode.cpp | 84 +++++++++++------- .../tone_producer_demo/ToneProducer.cpp | 33 ++++--- src/add-ons/translators/ppm/PPMTranslator.cpp | 7 +- .../cortex/MediaRoutingView/MediaRoutingView.cpp | 10 +-- src/apps/cortex/NodeManager/NodeGroup.cpp | 15 ++-- src/apps/cortex/NodeManager/NodeManager.cpp | 57 ++++++------ src/apps/cortex/NodeManager/NodeRef.cpp | 35 +++++--- src/apps/cortex/NodeManager/NodeSyncThread.cpp | 8 +- src/apps/cortex/RouteApp/LiveNodeIO.cpp | 2 +- src/apps/cortex/RouteApp/NodeSetIOContext.cpp | 2 +- src/apps/cortex/RouteApp/route_app_io.cpp | 6 +- src/apps/cortex/addons/Flanger/FlangerNode.cpp | 22 ++--- .../cortex/addons/common/AudioFilterNode.cpp | 27 +++--- src/apps/cortex/support/BasicThread.h | 3 +- src/apps/cortex/support/ObservableHandler.cpp | 2 +- src/apps/cortex/support/ObservableLooper.cpp | 2 +- src/apps/patchbay/PatchView.cpp | 23 ++--- src/apps/poorman/PoorManPreferencesWindow.cpp | 4 +- src/kits/midi/MidiStore.cpp | 2 +- src/kits/midi2/MidiEndpoint.cpp | 4 +- src/kits/midi2/MidiLocalProducer.cpp | 4 +- src/kits/midi2/MidiRosterLooper.cpp | 11 +-- src/preferences/mouse/MouseSettings.cpp | 12 +-- src/servers/midi/MidiServerApp.cpp | 28 +++--- src/servers/registrar/MessageDeliverer.cpp | 18 ++-- src/servers/registrar/MessageRunnerManager.cpp | 5 +- src/servers/registrar/RecentEntries.cpp | 14 +-- .../registrar/RosterSettingsCharStream.cpp | 2 +- src/servers/registrar/ShutdownProcess.cpp | 34 +++---- src/servers/registrar/TRoster.cpp | 46 +++++----- src/system/kernel/fs/fd.cpp | 5 +- src/tools/unzip/Jamfile | 6 +- ############################################################################ Commit: 1a7bcf6962e1c99906cce0fe602e08c3fcda46f6 URL: http://cgit.haiku-os.org/haiku/commit/?id=1a7bcf6 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Sun Jun 1 23:40:27 2014 UTC Lots of B_PRI... insertions to fix errors with DEBUG=1. ---------------------------------------------------------------------------- diff --git a/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.cpp b/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.cpp index eebaff2..0b586c7 100644 --- a/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.cpp +++ b/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.cpp @@ -123,7 +123,7 @@ create_device(const usb_device* dev, uint16 ifno) { int32 bc; get_sem_count(sem, &bc); - DPRINTF_DEBUG((MY_ID "Allocated %ld write buffers\n", bc)); + DPRINTF_DEBUG((MY_ID "Allocated %" B_PRId32 " write buffers\n", bc)); } @@ -245,11 +245,11 @@ midi_usb_read_callback(void* cookie, status_t status, midiDevice->bus_status = status; /* B_USB_STATUS_* */ if (status != B_OK) { /* request failed */ - DPRINTF_DEBUG((MY_ID "bus status 0x%lx\n", status)); + DPRINTF_DEBUG((MY_ID "bus status 0x%" B_PRIx32 "\n", status)); if (status == B_CANCELED || !midiDevice->active) { /* cancelled: device is unplugged */ DPRINTF_DEBUG((MY_ID "midi_usb_read_callback: cancelled" - "(status=%lx active=%d -- deleting sem_cbs\n", + "(status=%" B_PRIx32 " active=%d -- deleting sem_cbs\n", status, midiDevice->active)); // Free any read() still blocked on semaphore @@ -294,7 +294,7 @@ midi_usb_write_callback(void* cookie, status_t status, assert(cookie != NULL); DPRINTF_DEBUG((MY_ID "midi_usb_write_callback()" - " status %ld length %ld pkt %p cin %x\n", + " status %" B_PRId32 " length %" B_PRIuSIZE " pkt %p cin %x\n", status, actual_len, pkt, pkt->cin)); release_sem(midiDevice->sem_send); /* done with buffer */ } @@ -561,8 +561,8 @@ usb_midi_read(driver_cookie* cookie, off_t position, if (midiDevice == NULL || !midiDevice->active) return B_ERROR; /* already unplugged */ - DPRINTF_DEBUG((MY_ID "usb_midi_read: (%ld byte buffer at %lld cookie %p)" - "\n", *num_bytes, position, cookie)); + DPRINTF_DEBUG((MY_ID "usb_midi_read: (%" B_PRIuSIZE " byte buffer at %" + B_PRIdOFF " cookie %p)\n", *num_bytes, position, cookie)); while (midiDevice && midiDevice->active) { ZDPRINTF_DEBUG((MY_ID "waiting on acquire_sem_etc\n")); err = acquire_sem_etc(cookie->sem_cb, 1, @@ -633,8 +633,8 @@ usb_midi_write(driver_cookie* cookie, off_t position, buff_lim = midiDevice->outMaxPkt * 3 / 4; /* max MIDI bytes buffer space */ - DPRINTF_DEBUG((MY_ID "MIDI write (%ld bytes at %lld)\n", - *num_bytes, position)); + DPRINTF_DEBUG((MY_ID "MIDI write (%" B_PRIuSIZE " bytes at %" B_PRIdOFF + ")\n", *num_bytes, position)); if (*num_bytes > 3 && midicode != 0xF0) { DPRINTF_ERR((MY_ID "Non-SysEx packet of %ld bytes" " -- too big to handle\n", *num_bytes)); diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index ba82408..169c5b0 100644 --- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp @@ -1679,7 +1679,7 @@ BPlusTree::Insert(Transaction& transaction, const uint8* key, uint16 keyLength, RETURN_ERROR(B_BAD_VALUE); #ifdef DEBUG if (value < 0) - panic("tried to insert invalid value %Ld!\n", value); + panic("tried to insert invalid value %" B_PRId64 "!\n", value); #endif ASSERT_WRITE_LOCKED_INODE(fStream); @@ -2878,9 +2878,9 @@ TreeIterator::Dump() { __out("TreeIterator at %p:\n", this); __out("\tfTree = %p\n", fTree); - __out("\tfCurrentNodeOffset = %Ld\n", fCurrentNodeOffset); + __out("\tfCurrentNodeOffset = %" B_PRId64 "\n", fCurrentNodeOffset); __out("\tfCurrentKey = %d\n", (int)fCurrentKey); - __out("\tfDuplicateNode = %Ld (%Ld, 0x%Lx)\n", + __out("\tfDuplicateNode = %" B_PRId64 " (%" B_PRId64 ", 0x%" B_PRIx64 ")\n", bplustree_node::FragmentOffset(fDuplicateNode), fDuplicateNode, fDuplicateNode); __out("\tfDuplicate = %u\n", fDuplicate); diff --git a/src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp index 260ea19..bafc1ec 100644 --- a/src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp @@ -94,8 +94,8 @@ static status_t packagefs_mount(fs_volume* fsVolume, const char* device, uint32 flags, const char* parameters, ino_t* _rootID) { - FUNCTION("fsVolume: %p, device: \"%s\", flags: %#lx, parameters: \"%s\"\n", - fsVolume, device, flags, parameters); + FUNCTION("fsVolume: %p, device: \"%s\", flags: %#" B_PRIx32 ", parameters: " + "\"%s\"\n", fsVolume, device, flags, parameters); // create a Volume object Volume* volume = new(std::nothrow) Volume(fsVolume); @@ -161,8 +161,8 @@ packagefs_lookup(fs_volume* fsVolume, fs_vnode* fsDir, const char* entryName, Volume* volume = (Volume*)fsVolume->private_volume; Node* dir = (Node*)fsDir->private_node; - FUNCTION("volume: %p, dir: %p (%lld), entry: \"%s\"\n", volume, dir, - dir->ID(), entryName); + FUNCTION("volume: %p, dir: %p (%" B_PRId64 "), entry: \"%s\"\n", volume, + dir, dir->ID(), entryName); if (!S_ISDIR(dir->Mode())) return B_NOT_A_DIRECTORY; @@ -218,7 +218,7 @@ packagefs_get_vnode(fs_volume* fsVolume, ino_t vnid, fs_vnode* fsNode, { Volume* volume = (Volume*)fsVolume->private_volume; - FUNCTION("volume: %p, vnid: %lld\n", volume, vnid); + FUNCTION("volume: %p, vnid: %" B_PRId64 "\n", volume, vnid); VolumeReadLocker volumeLocker(volume); Node* node = volume->FindNode(vnid); @@ -271,8 +271,8 @@ packagefs_io(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie, Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p, request: %p\n", volume, - node, node->ID(), cookie, request); + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, request: %p\n", + volume, node, node->ID(), cookie, request); TOUCH(volume); if (io_request_is_write(request)) @@ -294,8 +294,8 @@ packagefs_ioctl(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie, Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p, operation: %" B_PRIu32 - ", buffer: %p, size: %zu\n", volume, node, node->ID(), cookie, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, operation: %" + B_PRIu32 ", buffer: %p, size: %zu\n", volume, node, node->ID(), cookie, operation, buffer, size); TOUCH(cookie); @@ -310,7 +310,8 @@ packagefs_read_symlink(fs_volume* fsVolume, fs_vnode* fsNode, char* buffer, Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID()); + FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node, + node->ID()); TOUCH(volume); NodeReadLocker nodeLocker(node); @@ -328,7 +329,8 @@ packagefs_access(fs_volume* fsVolume, fs_vnode* fsNode, int mode) Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID()); + FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node, + node->ID()); TOUCH(volume); NodeReadLocker nodeLocker(node); @@ -342,7 +344,8 @@ packagefs_read_stat(fs_volume* fsVolume, fs_vnode* fsNode, struct stat* st) Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID()); + FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node, + node->ID()); TOUCH(volume); NodeReadLocker nodeLocker(node); @@ -385,8 +388,8 @@ packagefs_open(fs_volume* fsVolume, fs_vnode* fsNode, int openMode, Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld), openMode %#x\n", volume, node, - node->ID(), openMode); + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), openMode %#x\n", + volume, node, node->ID(), openMode); TOUCH(volume); NodeReadLocker nodeLocker(node); @@ -427,7 +430,7 @@ packagefs_free_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie) Node* node = (Node*)fsNode->private_node; FileCookie* cookie = (FileCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -446,9 +449,9 @@ packagefs_read(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie, Node* node = (Node*)fsNode->private_node; FileCookie* cookie = (FileCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p, offset: %lld, " - "buffer: %p, size: %lu\n", volume, node, node->ID(), cookie, offset, - buffer, *bufferSize); + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, offset: %" + B_PRId64 ", buffer: %p, size: %" B_PRIuSIZE "\n", volume, node, + node->ID(), cookie, offset, buffer, *bufferSize); TOUCH(volume); if ((cookie->openMode & O_RWMASK) != O_RDONLY) @@ -549,7 +552,8 @@ packagefs_open_dir(fs_volume* fsVolume, fs_vnode* fsNode, void** _cookie) Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID()); + FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node, + node->ID()); TOUCH(volume); if (!S_ISDIR(node->Mode())) @@ -586,7 +590,7 @@ packagefs_free_dir_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie) Node* node = (Node*)fsNode->private_node; DirectoryCookie* cookie = (DirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -606,7 +610,7 @@ packagefs_read_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie, Node* node = (Node*)fsNode->private_node; DirectoryCookie* cookie = (DirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -670,7 +674,7 @@ packagefs_rewind_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie) Node* node = (Node*)fsNode->private_node; DirectoryCookie* cookie = (DirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -691,7 +695,8 @@ packagefs_open_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void** _cookie) Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID()); + FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node, + node->ID()); TOUCH(volume); status_t error = check_access(node, R_OK); @@ -726,7 +731,7 @@ packagefs_free_attr_dir_cookie(fs_volume* fsVolume, fs_vnode* fsNode, Node* node = (Node*)fsNode->private_node; AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -745,7 +750,7 @@ packagefs_read_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie, Node* node = (Node*)fsNode->private_node; AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -761,7 +766,7 @@ packagefs_rewind_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie) Node* node = (Node*)fsNode->private_node; AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -780,8 +785,8 @@ packagefs_open_attr(fs_volume* fsVolume, fs_vnode* fsNode, const char* name, Volume* volume = (Volume*)fsVolume->private_volume; Node* node = (Node*)fsNode->private_node; - FUNCTION("volume: %p, node: %p (%lld), name: \"%s\", openMode %#x\n", - volume, node, node->ID(), name, openMode); + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), name: \"%s\", openMode " + "%#x\n", volume, node, node->ID(), name, openMode); TOUCH(volume); NodeReadLocker nodeLocker(node); @@ -819,7 +824,7 @@ packagefs_free_attr_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie) Node* node = (Node*)fsNode->private_node; AttributeCookie* cookie = (AttributeCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -838,7 +843,7 @@ packagefs_read_attr(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie, Node* node = (Node*)fsNode->private_node; AttributeCookie* cookie = (AttributeCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); @@ -855,7 +860,7 @@ packagefs_read_attr_stat(fs_volume* fsVolume, fs_vnode* fsNode, Node* node = (Node*)fsNode->private_node; AttributeCookie* cookie = (AttributeCookie*)_cookie; - FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node, + FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node, node->ID(), cookie); TOUCH(volume); TOUCH(node); diff --git a/src/add-ons/kernel/partitioning_systems/session/Debug.h b/src/add-ons/kernel/partitioning_systems/session/Debug.h index 9020461..a6b5759 100644 --- a/src/add-ons/kernel/partitioning_systems/session/Debug.h +++ b/src/add-ons/kernel/partitioning_systems/session/Debug.h @@ -173,7 +173,7 @@ private: } #define REPORT_ERROR(error) { \ - LPRINT(("returning error 0x%lx, `%s'\n", error, strerror(error))); \ + LPRINT(("returning error 0x%" B_PRIx32 ", `%s'\n", error, strerror(error))); \ } #define RETURN_ERROR(error) { \ @@ -190,7 +190,7 @@ private: } else if (_status == (status_t)B_OK) { \ LPRINT(("returning B_OK\n")); \ } else { \ - LPRINT(("returning 0x%lx = %ld\n", _status, _status)); \ + LPRINT(("returning 0x%" B_PRIx32 " = %" B_PRId32 "\n", _status, _status)); \ } \ return _status; \ } diff --git a/src/add-ons/kernel/partitioning_systems/session/Disc.cpp b/src/add-ons/kernel/partitioning_systems/session/Disc.cpp index 35f130f..abf4912 100644 --- a/src/add-ons/kernel/partitioning_systems/session/Disc.cpp +++ b/src/add-ons/kernel/partitioning_systems/session/Disc.cpp @@ -223,7 +223,7 @@ dump_full_table_of_contents(uchar* data, uint16 dataLength) TRACE((" pminutes = %d\n", entries[i].pminutes)); TRACE((" pseconds = %d\n", entries[i].pseconds)); TRACE((" pframes = %d\n", entries[i].pframes)); - TRACE((" lba = %lld\n", + TRACE((" lba = %" B_PRId64 "\n", msf_to_lba(make_msf_address(entries[i].pminutes, entries[i].pseconds, entries[i].pframes)))); } @@ -286,8 +286,8 @@ read_table_of_contents(int deviceFD, uint32 first_session, uchar* buffer, } } else { error = errno; - TRACE(("%s: scsi command failed with error 0x%lx\n", kModuleDebugName, - error)); + TRACE(("%s: scsi command failed with error 0x%" B_PRIx32 "\n", + kModuleDebugName, error)); } return error; @@ -407,8 +407,8 @@ List::SortAndRemoveDuplicates() } else if (item->index == next->index) { // Duplicate indicies TRACE(("%s: List::SortAndRemoveDuplicates: duplicate indicies " - "found (#%ld); keeping first instance\n", kModuleDebugName, - item->index)); + "found (#%" B_PRId32 "); keeping first instance\n", + kModuleDebugName, item->index)); item->next = next->next; delete next; next = item->next; @@ -563,7 +563,8 @@ Disc::Disc(int fd) } } - PRINT(("Setting init status to 0x%lx, `%s'\n", error, strerror(error))); + PRINT(("Setting init status to 0x%" B_PRIx32 ", `%s'\n", error, + strerror(error))); fInitStatus = error; } @@ -594,7 +595,7 @@ Disc::InitCheck() Session* Disc::GetSession(int32 index) { - DEBUG_INIT_ETC("Disc", ("index: %ld", index)); + DEBUG_INIT_ETC("Disc", ("index: %" B_PRId32, index)); int32 counter = -1; for (session* session = (struct session*)fSessionList->First(); session; session = (struct session*)session->next) { @@ -606,7 +607,8 @@ Disc::GetSession(int32 index) // track with the end of session. track* track = (struct track*)session->track_list.First(); if (track != NULL) { - PRINT(("found session #%ld info (audio session)\n", index)); + PRINT(("found session #%" B_PRId32 " info (audio session)" + "\n", index)); off_t startLBA = track->start_lba; off_t endLBA = session->end_lba; @@ -623,8 +625,8 @@ Disc::GetSession(int32 index) } return result; } else { - PRINT(("Error: session #%ld is an audio session with no " - "tracks!\n", index)); + PRINT(("Error: session #%" B_PRId32 " is an audio session " + "with no tracks!\n", index)); return NULL; } } @@ -633,13 +635,14 @@ Disc::GetSession(int32 index) track; track = (struct track*)track->next) { counter++; if (counter == index) { - PRINT(("found session #%ld info (data session)\n", index)); + PRINT(("found session #%" B_PRId32 " info (data session)\n", + index)); off_t startLBA = track->start_lba; if (startLBA < 0) { - WARN(("%s: warning: invalid negative start LBA of %lld" - " for data track assuming 0\n", kModuleDebugName, - startLBA)); + WARN(("%s: warning: invalid negative start LBA of %" + B_PRId64 " for data track assuming 0\n", + kModuleDebugName, startLBA)); startLBA = 0; } @@ -663,7 +666,7 @@ Disc::GetSession(int32 index) } } - PRINT(("no session #%ld found!\n", index)); + PRINT(("no session #%" B_PRId32 " found!\n", index)); return NULL; } @@ -676,10 +679,10 @@ Disc::Dump() TRACE(("%s: Disc dump:\n", kModuleDebugName)); session* session = (struct session*)fSessionList->First(); while (session != NULL) { - TRACE(("session %ld:\n", session->index)); + TRACE(("session %" B_PRId32 ":\n", session->index)); TRACE((" first track hint: %d\n", session->first_track_hint)); TRACE((" last track hint: %d\n", session->last_track_hint)); - TRACE((" end_lba: %lld\n", session->end_lba)); + TRACE((" end_lba: %" B_PRId64 "\n", session->end_lba)); TRACE((" control: %d (%s session, copy %s)\n", session->control, (session->control & kControlDataTrack ? "data" : "audio"), @@ -688,8 +691,8 @@ Disc::Dump() TRACE((" adr: %d\n", session->adr)); track* track = (struct track*)session->track_list.First(); while (track != NULL) { - TRACE((" track %ld:\n", track->index)); - TRACE((" start_lba: %lld\n", track->start_lba)); + TRACE((" track %" B_PRId32 ":\n", track->index)); + TRACE((" start_lba: %" B_PRId64 "\n", track->start_lba)); track = (struct track*)track->next; } session = (struct session*)session->next; @@ -790,7 +793,7 @@ status_t Disc::_ParseTableOfContents(cdrom_full_table_of_contents_entry entries[], uint32 count) { - DEBUG_INIT_ETC("Disc", ("entries: %p, count: %ld", entries, count)); + DEBUG_INIT_ETC("Disc", ("entries: %p, count: %" B_PRIu32, entries, count)); for (uint32 i = 0; i < count; i++) { // Find or create the appropriate session @@ -858,13 +861,13 @@ Disc::_ParseTableOfContents(cdrom_full_table_of_contents_entry entries[], session->control = entries[i].control; session->adr = entries[i].adr; } else { - WARN(("%s: warning: illegal end lba %lld found for " - "session %d\n", kModuleDebugName, endLBA, + WARN(("%s: warning: illegal end lba %" B_PRId64 " found" + " for session %d\n", kModuleDebugName, endLBA, sessionIndex)); } } else { WARN(("%s: warning: duplicate end lba values found for " - "session %d; using first value encountered: %lld", + "session %d; using first value encountered: %" B_PRId64, kModuleDebugName, sessionIndex, session->end_lba)); } break; @@ -962,16 +965,16 @@ Disc::_CheckForErrorsAndWarnings() { // missing end lba if (!session->end_lba_is_set()) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: no end of " - "session address for session #%ld\n", kModuleDebugName, - session->index)); + "session address for session #%" B_PRId32 "\n", + kModuleDebugName, session->index)); return B_ERROR; } // empty track list track* track = (struct track*)session->track_list.First(); if (track == NULL) { - TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: session #%ld " - "has no tracks\n", kModuleDebugName, session->index)); + TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: session #%" + B_PRId32 "has no tracks\n", kModuleDebugName, session->index)); return B_ERROR; } @@ -981,9 +984,9 @@ Disc::_CheckForErrorsAndWarnings() { if (session->first_track_hint_is_set() && session->first_track_hint != track->index) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session " - "#%ld: first track hint (%d) doesn't match actual first track " - "(%ld)\n", kModuleDebugName, session->index, - session->first_track_hint, track->index)); + "#%" B_PRId32 ": first track hint (%d) doesn't match actual " + "first track (%" B_PRId32 ")\n", kModuleDebugName, + session->index, session->first_track_hint, track->index)); } // incorrect last track hint @@ -991,16 +994,17 @@ Disc::_CheckForErrorsAndWarnings() { if (session->last_track_hint_is_set() && last && session->last_track_hint != last->index) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session " - "#%ld: last track hint (%d) doesn't match actual last track " - "(%ld)\n", kModuleDebugName, session->index, - session->last_track_hint, last->index)); + "#%" B_PRId32 ": last track hint (%d) doesn't match actual " + "last track (%" B_PRId32 ")\n", kModuleDebugName, + session->index, session->last_track_hint, last->index)); } // invalid session sequence if (lastSessionIndex + 1 != session->index) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index for " - "session #%ld is out of sequence (should have been #%ld)\n", - kModuleDebugName, session->index, lastSessionIndex)); + "session #%" B_PRId32 " is out of sequence (should have been #%" + B_PRId32 ")\n", kModuleDebugName, session->index, + lastSessionIndex)); } lastSessionIndex = session->index; @@ -1008,17 +1012,19 @@ Disc::_CheckForErrorsAndWarnings() { // invalid track sequence if (lastTrackIndex + 1 != track->index) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index " - "for track #%ld is out of sequence (should have been " - "#%ld)\n", kModuleDebugName, track->index, lastTrackIndex)); + "for track #%" B_PRId32 " is out of sequence (should have " + "been #%" B_PRId32 ")\n", kModuleDebugName, track->index, + lastTrackIndex)); } lastTrackIndex = track->index; // mismatched control if (track->control != session->control) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: control " - "for track #%ld (%d, %s track, copy %s) does not match " - "control for parent session #%ld (%d, %s session, copy " - "%s)\n", kModuleDebugName, track->index, track->control, + "for track #%" B_PRId32 " (%d, %s track, copy %s) does not " + "match control for parent session #%" B_PRId32 " (%d, %s " + "session, copy %s)\n", kModuleDebugName, track->index, + track->control, (track->control & kControlDataTrack ? "data" : "audio"), (track->control & kControlCopyPermitted ? "permitted" : "prohibited"), @@ -1031,9 +1037,10 @@ Disc::_CheckForErrorsAndWarnings() { // mismatched adr if (track->adr != session->adr) { TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: adr " - "for track #%ld (adr = %d) does not match adr for parent " - "session #%ld (adr = %d)\n", kModuleDebugName, track->index, - track->adr, session->index, session->adr)); + "for track #%" B_PRId32 " (adr = %d) does not match adr " + "for parent session #%" B_PRId32 " (adr = %d)\n", + kModuleDebugName, track->index, track->adr, session->index, + session->adr)); } } } diff --git a/src/add-ons/kernel/partitioning_systems/session/session.cpp b/src/add-ons/kernel/partitioning_systems/session/session.cpp index e38b0e8..8d9a7ff 100644 --- a/src/add-ons/kernel/partitioning_systems/session/session.cpp +++ b/src/add-ons/kernel/partitioning_systems/session/session.cpp @@ -39,9 +39,9 @@ standard_operations(int32 op, ...) static float identify_partition(int fd, partition_data *partition, void **cookie) { - DEBUG_INIT_ETC(NULL, ("fd: %d, id: %ld, offset: %Ld, " - "size: %Ld, block_size: %ld, flags: 0x%lx", fd, - partition->id, partition->offset, partition->size, + DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRIdOFF ", " + "size: %" B_PRIdOFF ", block_size: %" B_PRId32 ", flags: 0x%" B_PRIx32, + fd, partition->id, partition->offset, partition->size, partition->block_size, partition->flags)); device_geometry geometry; @@ -70,9 +70,10 @@ identify_partition(int fd, partition_data *partition, void **cookie) static status_t scan_partition(int fd, partition_data *partition, void *cookie) { - DEBUG_INIT_ETC(NULL, ("fd: %d, id: %ld, offset: %Ld, size: %Ld, " - "block_size: %ld, cookie: %p", fd, partition->id, partition->offset, - partition->size, partition->block_size, cookie)); + DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRId64 ", " + "size: %" B_PRIdOFF ", block_size: %" B_PRId32 ", cookie: %p", fd, + partition->id, partition->offset, partition->size, + partition->block_size, cookie)); Disc *disc = static_cast<Disc*>(cookie); partition->status = B_PARTITION_VALID; @@ -100,7 +101,7 @@ scan_partition(int fd, partition_data *partition, void *cookie) } child->parameters = NULL; } - PRINT(("error: 0x%lx, `%s'\n", error, strerror(error))); + PRINT(("error: 0x%" B_PRIx32 ", `%s'\n", error, strerror(error))); RETURN(error); } diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp index 67ee55a..8cba60f 100644 --- a/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp +++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp @@ -1025,14 +1025,14 @@ SMTPProtocol::SendCommand(const char *cmd) int32 len = ReceiveResponse(fLog); if (len <= 0) { - D(bug("SMTP: len == %ld\n", len)); + D(bug("SMTP: len == %" B_PRId32 "\n", len)); return B_ERROR; } if (fLog.Length() > 4 && (fLog[3] == ' ' || fLog[3] == '-')) { int32 num = atol(fLog.String()); - D(bug("ReplyNumber: %ld\n", num)); + D(bug("ReplyNumber: %" B_PRId32 "\n", num)); if (num >= 500) return B_ERROR; diff --git a/src/add-ons/media/media-add-ons/mixer/MixerDebug.h b/src/add-ons/media/media-add-ons/mixer/MixerDebug.h index 41af2e9..441290b 100644 --- a/src/add-ons/media/media-add-ons/mixer/MixerDebug.h +++ b/src/add-ons/media/media-add-ons/mixer/MixerDebug.h @@ -25,9 +25,9 @@ inline void PRINT(int level, const char *fmt, ...) { va_list ap; if (level > DEBUG) return; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); } # define PRINT_FORMAT(_text, _fmt) do { char _buf[300]; string_for_format((_fmt), _buf, sizeof(_buf)); printf("%s %s\n", (_text), (_buf)); } while (0) -# define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0) -# define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0) -# define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08lX %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0) +# define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0) +# define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0) +# define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08" B_PRIX32 " %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0) # if DEBUG >= 2 # define TRACE printf diff --git a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioDevice.cpp b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioDevice.cpp index c45b594..a3581e9 100644 --- a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioDevice.cpp +++ b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioDevice.cpp @@ -143,7 +143,8 @@ MultiAudioDevice::_InitDriver() PRINT(("Friendly name:\t%s\nVendor:\t\t%s\n", fDescription.friendly_name, fDescription.vendor_info)); - PRINT(("%ld outputs\t%ld inputs\n%ld out busses\t%ld in busses\n", + PRINT(("%" B_PRId32 " outputs\t%" B_PRId32 " inputs\n%" B_PRId32 + " out busses\t%" B_PRId32 " in busses\n", fDescription.output_channel_count, fDescription.input_channel_count, fDescription.output_bus_channel_count, fDescription.input_bus_channel_count)); @@ -152,22 +153,23 @@ MultiAudioDevice::_InitDriver() for (int32 i = 0; i < fDescription.output_channel_count + fDescription.input_channel_count; i++) { - PRINT(("%ld\t%d\t0x%lx\t0x%lx\n", fDescription.channels[i].channel_id, + PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n", + fDescription.channels[i].channel_id, fDescription.channels[i].kind, fDescription.channels[i].designations, fDescription.channels[i].connectors)); } PRINT(("\n")); - PRINT(("Output rates\t\t0x%lx\n", fDescription.output_rates)); - PRINT(("Input rates\t\t0x%lx\n", fDescription.input_rates)); + PRINT(("Output rates\t\t0x%" B_PRIx32 "\n", fDescription.output_rates)); + PRINT(("Input rates\t\t0x%" B_PRIx32 "\n", fDescription.input_rates)); PRINT(("Max CVSR\t\t%.0f\n", fDescription.max_cvsr_rate)); PRINT(("Min CVSR\t\t%.0f\n", fDescription.min_cvsr_rate)); - PRINT(("Output formats\t\t0x%lx\n", fDescription.output_formats)); - PRINT(("Input formats\t\t0x%lx\n", fDescription.input_formats)); - PRINT(("Lock sources\t\t0x%lx\n", fDescription.lock_sources)); - PRINT(("Timecode sources\t0x%lx\n", fDescription.timecode_sources)); - PRINT(("Interface flags\t\t0x%lx\n", fDescription.interface_flags)); + PRINT(("Output formats\t\t0x%" B_PRIx32 "\n", fDescription.output_formats)); + PRINT(("Input formats\t\t0x%" B_PRIx32 "\n", fDescription.input_formats)); + PRINT(("Lock sources\t\t0x%" B_PRIx32 "\n", fDescription.lock_sources)); + PRINT(("Timecode sources\t0x%" B_PRIx32 "\n", fDescription.timecode_sources)); + PRINT(("Interface flags\t\t0x%" B_PRIx32 "\n", fDescription.interface_flags)); PRINT(("Control panel string:\t\t%s\n", fDescription.control_panel)); PRINT(("\n")); @@ -271,18 +273,22 @@ MultiAudioDevice::_GetBuffers() for (int32 i = 0; i < fBufferList.return_playback_buffers; i++) { for (int32 j = 0; j < fBufferList.return_playback_channels; j++) { - PRINT(("fBufferList.playback_buffers[%ld][%ld].base: %p\n", + PRINT(("fBufferList.playback_buffers[%" B_PRId32 "][%" B_PRId32 + "].base: %p\n", i, j, fBufferList.playback_buffers[i][j].base)); - PRINT(("fBufferList.playback_buffers[%ld][%ld].stride: %li\n", + PRINT(("fBufferList.playback_buffers[%" B_PRId32 "][%" B_PRId32 + "].stride: %li\n", i, j, fBufferList.playback_buffers[i][j].stride)); } } for (int32 i = 0; i < fBufferList.return_record_buffers; i++) { for (int32 j = 0; j < fBufferList.return_record_channels; j++) { - PRINT(("fBufferList.record_buffers[%ld][%ld].base: %p\n", + PRINT(("fBufferList.record_buffers[%" B_PRId32 "][%" B_PRId32 + "].base: %p\n", i, j, fBufferList.record_buffers[i][j].base)); - PRINT(("fBufferList.record_buffers[%ld][%ld].stride: %li\n", + PRINT(("fBufferList.record_buffers[%" B_PRId32 "][%" B_PRId32 + "].stride: %li\n", i, j, fBufferList.record_buffers[i][j].stride)); } } diff --git a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp index ddac661..6a0a275 100644 --- a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp +++ b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp @@ -351,8 +351,9 @@ MultiAudioNode::NodeRegistered() && ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT || !(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS))) ) { - PRINT(("NodeRegistered() : creating an input for %li\n", i)); - PRINT(("%ld\t%d\t0x%lx\t0x%lx\n", + PRINT(("NodeRegistered() : creating an input for %" B_PRIi32 "\n", + i)); + PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n", fDevice->Description().channels[i].channel_id, fDevice->Description().channels[i].kind, fDevice->Description().channels[i].designations, @@ -401,11 +402,13 @@ MultiAudioNode::NodeRegistered() && ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT || !(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS))) ) { - PRINT(("NodeRegistered() : creating an output for %li\n", i)); - PRINT(("%ld\t%d\t0x%lx\t0x%lx\n",fDevice->Description().channels[i].channel_id, - fDevice->Description().channels[i].kind, - fDevice->Description().channels[i].designations, - fDevice->Description().channels[i].connectors)); + PRINT(("NodeRegistered() : creating an output for %" B_PRIi32 "\n", + i)); + PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n", + fDevice->Description().channels[i].channel_id, + fDevice->Description().channels[i].kind, + fDevice->Description().channels[i].designations, + fDevice->Description().channels[i].connectors)); media_output *output = new media_output; @@ -456,7 +459,8 @@ MultiAudioNode::NodeRegistered() index++; } - PRINT(("apply configuration in : %Ld\n", system_time() - start)); + PRINT(("apply configuration in : %" B_PRIdBIGTIME "\n", + system_time() - start)); } @@ -569,7 +573,8 @@ MultiAudioNode::GetNextInput(int32* cookie, media_input* _input) node_input *channel = (node_input *)fInputs.ItemAt(*cookie); *_input = channel->fInput; *cookie += 1; - PRINT(("input.format : %lu\n", channel->fInput.format.u.raw_audio.format)); + PRINT(("input.format : %" B_PRIu32 "\n", + channel->fInput.format.u.raw_audio.format)); return B_OK; } @@ -976,10 +981,11 @@ MultiAudioNode::Connect(status_t error, const media_source& source, // Do so, then make sure we get our events early enough. media_node_id id; FindLatencyFor(channel->fOutput.destination, &fLatency, &id); - PRINT(("\tdownstream latency = %Ld\n", fLatency)); + PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", fLatency)); fInternalLatency = BufferDuration(); - PRINT(("\tbuffer-filling took %Ld usec on this machine\n", fInternalLatency)); + PRINT(("\tbuffer-filling took %" B_PRIdBIGTIME " usec on this machine\n", + fInternalLatency)); //SetEventLatency(fLatency + fInternalLatency); // Set up the buffer group for our connection, as long as nobody handed us @@ -1167,7 +1173,9 @@ MultiAudioNode::_HandleBuffer(const media_timed_event* event, // TODO: This seems like a very fragile mechanism to wait until // the previous buffer for this channel has been processed... if (channel->fBuffer != NULL) { - PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId : %li, how_early:%Ld\n", channel->fChannelId, howEarly)); + PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId : %" + B_PRIi32 ", how_early:%" B_PRIdBIGTIME "\n", + channel->fChannelId, howEarly)); //channel->fBuffer->Recycle(); snooze(100); if (channel->fBuffer != NULL) @@ -1188,7 +1196,8 @@ MultiAudioNode::_HandleDataStatus(const media_timed_event* event, bigtime_t lateness, bool realTimeEvent) { //CALLED(); - PRINT(("MultiAudioNode::HandleDataStatus status:%li, lateness:%Li\n", event->data, lateness)); + PRINT(("MultiAudioNode::HandleDataStatus status:%" B_PRIi32 + ", lateness:%" B_PRIiBIGTIME "\n", event->data, lateness)); switch (event->data) { case B_DATA_NOT_AVAILABLE: break; @@ -1219,7 +1228,8 @@ MultiAudioNode::_HandleSeek(const media_timed_event* event, bigtime_t lateness, bool realTimeEvent) { CALLED(); - PRINT(("MultiAudioNode::HandleSeek(t=%lld,d=%li,bd=%lld)\n", + PRINT(("MultiAudioNode::HandleSeek(t=%" B_PRIdBIGTIME ",d=%" B_PRIi32 + ",bd=%" B_PRId64 ")\n", event->event_time,event->data,event->bigdata)); return B_OK; } @@ -1324,7 +1334,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value, { CALLED(); - PRINT(("id : %li\n", id)); + PRINT(("id : %" B_PRIi32 "\n", id)); BParameter* parameter = NULL; for (int32 i = 0; i < fWeb->CountParameters(); i++) { parameter = fWeb->ParameterAt(i); @@ -1335,7 +1345,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value, if (parameter == NULL) { // Hmmm, we were asked for a parameter that we don't actually // support. Report an error back to the caller. - PRINT(("\terror - asked for illegal parameter %ld\n", id)); + PRINT(("\terror - asked for illegal parameter %" B_PRId32 "\n", id)); return B_ERROR; } @@ -1394,7 +1404,8 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value, } for (uint32 i = 0; i < *size / sizeof(float); i++) { - PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%li] : %f\n", i, ((float*)value)[i])); + PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%" + B_PRIi32 "] : %f\n", i, ((float*)value)[i])); } } else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) { BDiscreteParameter* discrete = (BDiscreteParameter*)parameter; @@ -1406,7 +1417,8 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value, *size = sizeof(int32); for (uint32 i = 0; i < *size / sizeof(int32); i++) { - PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%li] : %li\n", i, ((int32*)value)[i])); + PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32 + "] : %" B_PRIi32 "\n", i, ((int32*)value)[i])); } } } @@ -1420,7 +1432,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime, const void* value, size_t size) { CALLED(); - PRINT(("id : %li, performance_time : %lld, size : %li\n", id, performanceTime, size)); + PRINT(("id : %" B_PRIi32 ", performance_time : %" B_PRIdBIGTIME + ", size : %" B_PRIuSIZE "\n", id, performanceTime, size)); BParameter* parameter = NULL; for (int32 i = 0; i < fWeb->CountParameters(); i++) { @@ -1547,7 +1560,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime, if (parameter->Type() == BParameter::B_CONTINUOUS_PARAMETER) { for (uint32 i = 0; i < size / sizeof(float); i++) { - PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%li] : %f\n", i, ((float*)value)[i])); + PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%" B_PRIi32 + "] : %f\n", i, ((float*)value)[i])); } info.item_count = 1; values[0].id = control_id; @@ -1560,7 +1574,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime, } } else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) { for (uint32 i = 0; i < size / sizeof(int32); i++) { - PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%li] : %li\n", i, ((int32*)value)[i])); + PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32 + "] : %" B_PRIi32 "\n", i, ((int32*)value)[i])); } BDiscreteParameter* discrete = (BDiscreteParameter*)parameter; @@ -1589,7 +1604,7 @@ MultiAudioNode::MakeParameterWeb() CALLED(); BParameterWeb* web = new BParameterWeb; - PRINT(("MixControlInfo().control_count : %li\n", + PRINT(("MixControlInfo().control_count : %" B_PRIi32 "\n", fDevice->MixControlInfo().control_count)); BParameterGroup* generalGroup = web->MakeGroup(B_TRANSLATE("General")); @@ -1680,7 +1695,7 @@ MultiAudioNode::_ProcessGroup(BParameterGroup* group, int32 index, i++; } - PRINT(("num parameters : %ld\n", numParameters)); + PRINT(("num parameters : %" B_PRId32 "\n", numParameters)); if (numParameters > 0) { (group->ParameterAt(numParameters - 1))->AddOutput( group->ParameterAt(numParameters)); @@ -1826,12 +1841,12 @@ MultiAudioNode::_OutputThread() } } - PRINT(("MultiAudioNode::RunThread: recorded_real_time : %Ld\n", - bufferInfo.recorded_real_time)); - PRINT(("MultiAudioNode::RunThread: recorded_frames_count : %Ld\n", - bufferInfo.recorded_frames_count)); - PRINT(("MultiAudioNode::RunThread: record_buffer_cycle : %li\n", - bufferInfo.record_buffer_cycle)); + PRINT(("MultiAudioNode::RunThread: recorded_real_time : %" B_PRIdBIGTIME + "\n", bufferInfo.recorded_real_time)); + PRINT(("MultiAudioNode::RunThread: recorded_frames_count : %" + B_PRId64 "\n", bufferInfo.recorded_frames_count)); + PRINT(("MultiAudioNode::RunThread: record_buffer_cycle : %" B_PRIi32 + "\n", bufferInfo.record_buffer_cycle)); for (int32 i = 0; i < fOutputs.CountItems(); i++) { node_output* output = (node_output*)fOutputs.ItemAt(i); @@ -2073,9 +2088,10 @@ MultiAudioNode::_AllocateBuffers(node_output &channel) size_t size = channel.fOutput.format.u.raw_audio.buffer_size; int32 count = int32(fLatency / BufferDuration() + 1 + 1); - PRINT(("\tlatency = %Ld, buffer duration = %Ld\n", fLatency, - BufferDuration())); - PRINT(("\tcreating group of %ld buffers, size = %lu\n", count, size)); + PRINT(("\tlatency = %" B_PRIdBIGTIME ", buffer duration = %" B_PRIdBIGTIME + "\n", fLatency, BufferDuration())); + PRINT(("\tcreating group of %" B_PRId32 " buffers, size = %" B_PRIuSIZE + "\n", count, size)); channel.fBufferGroup = new BBufferGroup(size, count); } @@ -2183,7 +2199,7 @@ MultiAudioNode::GetConfigurationFor(BMessage* message) && parameter->Type() != BParameter::B_DISCRETE_PARAMETER) continue; - PRINT(("getting parameter %li\n", parameter->ID())); + PRINT(("getting parameter %" B_PRIi32 "\n", parameter->ID())); size_t size = bufferSize; while ((err = GetParameterValue(parameter->ID(), &lastChange, buffer, &size)) == B_NO_MEMORY && bufferSize < 128 * 1024) { @@ -2384,7 +2400,7 @@ MultiAudioNode::_UpdateInternalLatency(const media_format& format) * format.u.raw_audio.channel_count) / ((int32)(format.u.raw_audio.frame_rate / 100)); - PRINT((" internal latency = %lld\n",fInternalLatency)); + PRINT((" internal latency = %" B_PRIdBIGTIME "\n", fInternalLatency)); SetEventLatency(fInternalLatency); } diff --git a/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp b/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp index e10172e..0afb248 100644 --- a/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp +++ b/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp @@ -152,7 +152,8 @@ ToneProducer::GetParameterValue(int32 id, bigtime_t* last_change, void* value, s default: // Hmmm, we were asked for a parameter that we don't actually // support. Report an error back to the caller. - FPRINTF(stderr, "\terror - asked for illegal parameter %ld\n", id); + FPRINTF(stderr, "\terror - asked for illegal parameter %" B_PRId32 "\n", + id); return B_ERROR; break; } @@ -380,7 +381,7 @@ ToneProducer::PrepareToConnect(const media_source& what, const media_destination if(format->u.raw_audio.channel_count == media_raw_audio_format::wildcard.channel_count) { //format->u.raw_audio.channel_count = mPreferredFormat.u.raw_audio.channel_count; format->u.raw_audio.channel_count = 1; - FPRINTF(stderr, "\tno channel count provided, suggesting %lu\n", format->u.raw_audio.channel_count); + FPRINTF(stderr, "\tno channel count provided, suggesting %" B_PRIu32 "\n", format->u.raw_audio.channel_count); } if(format->u.raw_audio.byte_order == media_raw_audio_format::wildcard.byte_order) { format->u.raw_audio.byte_order = mPreferredFormat.u.raw_audio.byte_order; @@ -451,7 +452,7 @@ ToneProducer::Connect(status_t error, const media_source& source, const media_de // Do so, then make sure we get our events early enough. media_node_id id; FindLatencyFor(mOutput.destination, &mLatency, &id); - FPRINTF(stderr, "\tdownstream latency = %Ld\n", mLatency); + FPRINTF(stderr, "\tdownstream latency = %" B_PRIdBIGTIME "\n", mLatency); // Use a dry run to see how long it takes me to fill a buffer of data bigtime_t start, produceLatency; @@ -468,7 +469,8 @@ ToneProducer::Connect(status_t error, const media_source& source, const media_de mInternalLatency += 20000LL; delete [] data; - FPRINTF(stderr, "\tbuffer-filling took %Ld usec on this machine\n", mInternalLatency); + FPRINTF(stderr, "\tbuffer-filling took %" B_PRIdBIGTIME + " usec on this machine\n", mInternalLatency); SetEventLatency(mLatency + mInternalLatency); // reset our buffer duration, etc. to avoid later calculations @@ -500,7 +502,8 @@ ToneProducer::Disconnect(const media_source& what, const media_destination& wher } else { - FPRINTF(stderr, "\tDisconnect() called with wrong source/destination (%ld/%ld), ours is (%ld/%ld)\n", + FPRINTF(stderr, "\tDisconnect() called with wrong source/destination (%" + B_PRId32 "/%" B_PRId32 "), ours is (%" B_PRId32 "/%" B_PRId32 ")\n", what.id, where.id, mOutput.source.id, mOutput.destination.id); } } @@ -533,7 +536,8 @@ ToneProducer::LateNoticeReceived(const media_source& what, bigtime_t how_much, b mInternalLatency = 50000; SetEventLatency(mLatency + mInternalLatency); - FPRINTF(stderr, "\tincreasing latency to %Ld\n", mLatency + mInternalLatency); + FPRINTF(stderr, "\tincreasing latency to %" B_PRIdBIGTIME "\n", + mLatency + mInternalLatency); } else { @@ -576,7 +580,8 @@ ToneProducer::SetPlayRate(int32 numer, int32 denom) status_t ToneProducer::HandleMessage(int32 message, const void* data, size_t size) { - FPRINTF(stderr, "ToneProducer::HandleMessage(%ld = 0x%lx)\n", message, message); + FPRINTF(stderr, "ToneProducer::HandleMessage(%" B_PRId32 " = 0x%" B_PRIx32 + ")\n", message, message); // HandleMessage() is where you implement any private message protocols // that you want to use. When messages are written to your node's control // port that are not recognized by any of the node superclasses, they'll be @@ -602,7 +607,8 @@ ToneProducer::LatencyChanged( bigtime_t new_latency, uint32 flags) { - PRINT(("ToneProducer::LatencyChanged(): %Ld\n", new_latency)); + PRINT(("ToneProducer::LatencyChanged(): %" B_PRIdBIGTIME "\n", + new_latency)); // something downstream changed latency, so we need to start producing // buffers earlier (or later) than we were previously. Make sure that the @@ -646,7 +652,8 @@ ToneProducer::NodeRegistered() void ToneProducer::Start(bigtime_t performance_time) { - PRINT(("ToneProducer::Start(%Ld): now %Ld\n", performance_time, TimeSource()->Now())); + PRINT(("ToneProducer::Start(%" B_PRIdBIGTIME "): now %" B_PRIdBIGTIME "\n", + performance_time, TimeSource()->Now())); // send 'data available' message if(mOutput.destination != media_destination::null) @@ -789,7 +796,7 @@ ToneProducer::HandleEvent(const media_timed_event* event, bigtime_t lateness, bo break; default: - FPRINTF(stderr, "Hmmm... got a B_PARAMETER event for a parameter we don't have? (%ld)\n", param); + FPRINTF(stderr, "Hmmm... got a B_PARAMETER event for a parameter we don't have? (%" B_PRId32 ")\n", param); break; } } @@ -873,8 +880,10 @@ ToneProducer::AllocateBuffers() size_t size = mOutput.format.u.raw_audio.buffer_size; int32 count = int32(mLatency / BufferDuration() + 1 + 1); - FPRINTF(stderr, "\tlatency = %Ld, buffer duration = %Ld\n", mLatency, BufferDuration()); - FPRINTF(stderr, "\tcreating group of %ld buffers, size = %lx\n", count, size); + FPRINTF(stderr, "\tlatency = %" B_PRIdBIGTIME ", buffer duration = %" + B_PRIdBIGTIME "\n", mLatency, BufferDuration()); + FPRINTF(stderr, "\tcreating group of %" B_PRId32 " buffers, size = %" + B_PRIuSIZE "\n", count, size); mBufferGroup = new BBufferGroup(size, count); } diff --git a/src/add-ons/translators/ppm/PPMTranslator.cpp b/src/add-ons/translators/ppm/PPMTranslator.cpp index 2ec800e..9598f65 100644 --- a/src/add-ons/translators/ppm/PPMTranslator.cpp +++ b/src/add-ons/translators/ppm/PPMTranslator.cpp @@ -334,7 +334,8 @@ Translate( /* required */ free(comment); } if (err < B_OK) { - dprintf(("read_ppm_header() error %s [%lx]\n", strerror(err), err)); + dprintf(("read_ppm_header() error %s [%" B_PRIx32 "]\n", strerror(err), + err)); return err; } /* Check if we're configured to write ASCII format file. */ @@ -422,11 +423,11 @@ Translate( /* required */ hdr.dataSize = B_HOST_TO_BENDIAN_INT32(out_rowbytes*height); dprintf(("rowBytes is %d, width %d, out_space %x, space %x\n", out_rowbytes, width, out_space, space)); err = outDestination->Write(&hdr, sizeof(hdr)); - dprintf(("PPMTranslator: Write() returns %lx\n", err)); + dprintf(("PPMTranslator: Write() returns %" B_PRIx32 "\n", err)); #if DEBUG { BBitmap * map = new BBitmap(BRect(0,0,width-1,height-1), out_space); - printf("map rb = %ld\n", map->BytesPerRow()); + printf("map rb = %" B_PRId32 "\n", map->BytesPerRow()); delete map; } #endif diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp index b2290a0..788284d 100644 --- a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp +++ b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp @@ -591,7 +591,7 @@ void MediaRoutingView::MessageReceived( status_t err = manager->roster->StartTimeSource(ref->node(), when); if(err < B_OK) { PRINT(( - "! StartTimeSource(%ld): '%s'\n", + "! StartTimeSource(%" B_PRId32 "): '%s'\n", ref->id(), strerror(err))); } break; @@ -610,7 +610,7 @@ void MediaRoutingView::MessageReceived( status_t err = manager->roster->StopTimeSource(ref->node(), when); if(err < B_OK) { PRINT(( - "! StopTimeSource(%ld): '%s'\n", + "! StopTimeSource(%" B_PRId32 "): '%s'\n", ref->id(), strerror(err))); } break; @@ -1154,8 +1154,8 @@ status_t MediaRoutingView::importStateFor( err = archive->FindMessage("panel", archiveIndex, &m); if(err < B_OK) { PRINT(( - "!!! MediaRoutingView::importStateFor(): missing panel %ld\n", - archiveIndex)); + "!!! MediaRoutingView::importStateFor(): missing panel %" + B_PRId32 "\n", archiveIndex)); continue; } @@ -1217,7 +1217,7 @@ status_t MediaRoutingView::exportStateFor( if(err < B_OK) { PRINT(( "!!! MediaRoutingView::exportStateFor():\n" - " no panel for node %ld\n", + " no panel for node %" B_PRId32 "\n", context->nodeAt(n))); return B_BAD_VALUE; } diff --git a/src/apps/cortex/NodeManager/NodeGroup.cpp b/src/apps/cortex/NodeManager/NodeGroup.cpp index ab19926..f623a95 100644 --- a/src/apps/cortex/NodeManager/NodeGroup.cpp +++ b/src/apps/cortex/NodeManager/NodeGroup.cpp @@ -743,7 +743,7 @@ void NodeGroup::MessageReceived( runMode > BMediaNode::B_RECORDING) { PRINT(( "* NodeGroup::MessageReceived(M_SET_RUN_MODE):\n" - " invalid run mode (%ld)\n", runMode)); + " invalid run mode (%" B_PRIu32 ")\n", runMode)); break; } @@ -1180,7 +1180,7 @@ status_t NodeGroup::_start() { offset += s_rosterLatency; PRINT(( - "- offset: %Ld\n", offset)); + "- offset: %" B_PRIdBIGTIME "\n", offset)); // * Seek all nodes (in case one or more failed to preroll) @@ -1190,7 +1190,7 @@ status_t NodeGroup::_start() { if(err < B_OK) { PRINT(( "! NodeGroup('%s')::_start():\n" - " ref('%s')->_seekStopped(%Ld) failed:\n" + " ref('%s')->_seekStopped(%" B_PRIdBIGTIME ") failed:\n" " %s\n", name(), (*it)->name(), m_startPosition, strerror(err))); @@ -1217,7 +1217,7 @@ status_t NodeGroup::_start() { if(err < B_OK) { PRINT(( "! NodeGroup('%s')::_start():\n" - " ref('%s')->_start(%Ld) failed:\n" + " ref('%s')->_start(%" B_PRIdBIGTIME ") failed:\n" " %s\n", name(), (*it)->name(), when, strerror(err))); @@ -1306,7 +1306,7 @@ status_t NodeGroup::_roll() { offset += s_rosterLatency; PRINT(( - "- offset: %Ld\n", offset)); + "- offset: %" B_PRIdBIGTIME "\n", offset)); ASSERT(m_timeSourceObj); tpStart = m_timeSourceObj->Now() + offset; @@ -1605,7 +1605,7 @@ void NodeGroup::_cycleThread() { // +++++ adjust to compensate !!! PRINT(( "*** NodeGroup::_cycleThread(): LATE\n" - " by %Ld\n", -timeout)); + " by %" B_PRIdBIGTIME "\n", -timeout)); } // +++++ if timeout is very short, spin until the target time arrives @@ -1658,7 +1658,8 @@ void NodeGroup::_cycleThread() { default: PRINT(( - "* NodeGroup::_cycleThread(): unknown message code '%ld'\n", code)); + "* NodeGroup::_cycleThread(): unknown message code '%" + B_PRId32 "'\n", code)); break; } } // while(!done) diff --git a/src/apps/cortex/NodeManager/NodeManager.cpp b/src/apps/cortex/NodeManager/NodeManager.cpp index 7c87dba..a431386 100644 --- a/src/apps/cortex/NodeManager/NodeManager.cpp +++ b/src/apps/cortex/NodeManager/NodeManager.cpp @@ -571,8 +571,8 @@ bool NodeManager::findRoute( err = getNodeRef(nodeA, &ref); if(err < B_OK) { PRINT(( - "!!! NodeManager::findRoute(%ld, %ld): no ref for node %ld\n", - nodeA, nodeB, nodeA)); + "!!! NodeManager::findRoute(%" B_PRId32 ", %" B_PRId32 + "): no ref for node %" B_PRId32 "\n", nodeA, nodeB, nodeA)); return false; } @@ -923,8 +923,8 @@ status_t NodeManager::splitGroup( // ensure that no route exists from insideNode to outsideNode if(findRoute(insideNode->id(), outsideNode->id())) { PRINT(( - "!!! NodeManager::splitGroup(): route exists from %ld to %ld\n", - insideNode->id(), outsideNode->id())); + "!!! NodeManager::splitGroup(): route exists from %" B_PRId32 + " to %" B_PRId32 "\n", insideNode->id(), outsideNode->id())); return B_NOT_ALLOWED; } @@ -936,8 +936,8 @@ status_t NodeManager::splitGroup( } if(oldGroup != outsideNode->group()) { PRINT(( - "!!! NodeManager::splitGroup(): mismatched groups for %ld and %ld\n", - insideNode->id(), outsideNode->id())); + "!!! NodeManager::splitGroup(): mismatched groups for %" B_PRId32 + " and %" B_PRId32 "\n", insideNode->id(), outsideNode->id())); return B_NOT_ALLOWED; } @@ -1193,10 +1193,10 @@ status_t NodeManager::connect( D_METHOD(( "! creating connection:\n" - " source id: %ld\n" - " source port: %ld\n" - " dest id: %ld\n" - " dest port: %ld\n", + " source id: %" B_PRId32 "\n" + " source port: %" B_PRId32 "\n" + " dest id: %" B_PRId32 "\n" + " dest port: %" B_PRId32 "\n", finalOutput.source.id, finalOutput.source.port, finalInput.destination.id, finalInput.destination.port)); @@ -1316,7 +1316,7 @@ status_t NodeManager::disconnect( if(connection.flags() & Connection::LOCKED) { PRINT(( "NodeManager::disconnect(): connection locked:\n" - " %ld:%s -> %ld:%s\n", + " %" B_PRId32 ":%s -> %" B_PRId32 ":%s\n", connection.sourceNode(), connection.outputName(), connection.destinationNode(), @@ -1326,12 +1326,12 @@ status_t NodeManager::disconnect( D_METHOD(( "! breaking connection:\n" - " source node: %ld\n" - " source id: %ld\n" - " source port: %ld\n" - " dest node: %ld\n" - " dest id: %ld\n" - " dest port: %ld\n", + " source node: %" B_PRId32 "\n" + " source id: %" B_PRId32 "\n" + " source port: %" B_PRId32 "\n" + " dest node: %" B_PRId32 "\n" + " dest id: %" B_PRId32 "\n" + " dest port: %" B_PRId32 "\n", connection.sourceNode(), connection.source().id, connection.source().port, connection.destinationNode(), @@ -1879,7 +1879,7 @@ void NodeManager::_removeGroup( // precondition: group in set if(it == m_nodeGroupSet.end()) { PRINT(( - "* NodeManager::_removeGroup(%ld): group not in set.\n", + "* NodeManager::_removeGroup(%" B_PRId32 "): group not in set.\n", group->id())); return; } @@ -1920,7 +1920,7 @@ inline status_t NodeManager::_handleNodesCreated( } D_METHOD(( - "NodeManager::_handleNodesCreated(): %d nodes\n", + "NodeManager::_handleNodesCreated(): %" B_PRId32 " nodes\n", count)); // * Create NodeRef instances for the listed nodes. @@ -1952,7 +1952,8 @@ inline status_t NodeManager::_handleNodesCreated( err = roster->GetNodeFor(id, &node); if(err < B_OK) { PRINT(( - "* NodeManager::_handleNodesCreated(): roster->GetNodeFor(%ld) failed:\n" + "* NodeManager::_handleNodesCreated(): roster->GetNodeFor(%" + B_PRId32 ") failed:\n" " %s\n", id, strerror(err))); continue; @@ -1990,7 +1991,8 @@ inline status_t NodeManager::_handleNodesCreated( err = roster->ReleaseNode(node); if(err < B_OK) { PRINT(( - "* NodeManager::_handleNodesCreated(): roster->ReleaseNode(%ld) failed:\n" + "* NodeManager::_handleNodesCreated(): roster->ReleaseNode(%" + B_PRId32 ") failed:\n" " %s\n", id, strerror(err))); } @@ -2084,10 +2086,10 @@ inline status_t NodeManager::_handleNodesCreated( "!!! NodeManager::_handleNodesCreated():\n" " input/output mismatch for connection\n" " '%s' (%s) -> '%s' (%s)\n" - " input.source: port %ld, ID %ld\n" - " output.source: port %ld, ID %ld\n" - " input.destination: port %ld, ID %ld\n" - " output.destination: port %ld, ID %ld\n\n", + " input.source: port %" B_PRId32 ", ID %" B_PRId32 "\n" + " output.source: port %" B_PRId32 ", ID %" B_PRId32 "\n" + " input.destination: port %" B_PRId32 ", ID %" B_PRId32 "\n" + " output.destination: port %" B_PRId32 ", ID %" B_PRId32 "\n\n", sourceRef->name(), output.name, destRef->name(), input.name, input.source.port, input.source.id, @@ -2175,7 +2177,8 @@ inline void NodeManager::_handleNodesDeleted( err = getNodeRef(id, &ref); if(err < B_OK) { PRINT(( - "* NodeManager::_handleNodesDeleted(): getNodeRef(%ld) failed\n" + "* NodeManager::_handleNodesDeleted(): getNodeRef(%" B_PRId32 + ") failed\n" " %s\n", id, strerror(err))); continue; @@ -2336,7 +2339,7 @@ inline void NodeManager::_handleConnectionBroken( if(err < B_OK) { PRINT(( "* NodeManager::_handleConnectionBroken(): connection not found:\n" - " %ld:%ld\n", + " %" B_PRId32 ":%" B_PRId32 "\n", source.port, source.id)); // add empty entry to message diff --git a/src/apps/cortex/NodeManager/NodeRef.cpp b/src/apps/cortex/NodeManager/NodeRef.cpp index 33808fa..abe0275 100644 --- a/src/apps/cortex/NodeManager/NodeRef.cpp +++ b/src/apps/cortex/NodeManager/NodeRef.cpp @@ -356,7 +356,7 @@ bigtime_t NodeRef::calculateRecordingModeDelay() { node(), &latency); PRINT(( - " %Ld\n", latency)); + " %" B_PRIdBIGTIME "\n", latency)); return latency; // +++++ stab in the dark 28sep99 // return maxBufferDur + latency; @@ -669,7 +669,7 @@ status_t NodeRef::releaseNode() { if(err < B_OK) { PRINT(( - "!!! ReleaseNode(%ld) failed:\n" + "!!! ReleaseNode(%" B_PRId32 ") failed:\n" " %s\n", m_info.node.node, strerror(err))); @@ -683,7 +683,8 @@ status_t NodeRef::releaseNode() { err = AddOnHost::ReleaseInternalNode(m_info); if(err < B_OK) { PRINT(( - "!!! AddOnHost::ReleaseInternalNode(%ld) failed:\n" + "!!! AddOnHost::ReleaseInternalNode(%" B_PRId32 + ") failed:\n" " %s\n", m_info.node.node, strerror(err))); @@ -1498,7 +1499,8 @@ NodeRef::NodeRef( if(err < B_OK) { PRINT(( - "!!! NodeRef(): BMediaRoster::GetLiveNodeInfo(%ld) failed:\n" + "!!! NodeRef(): BMediaRoster::GetLiveNodeInfo(%" B_PRId32 + ") failed:\n" " %s\n", node.node, strerror(err))); @@ -1669,7 +1671,7 @@ status_t NodeRef::_setTimeSource( if(err < B_OK) { PRINT(( - "* NodeRef('%s')::_setTimeSource(%ld):\n" + "* NodeRef('%s')::_setTimeSource(%" B_PRId32 "):\n" " SetTimeSourceFor() failed: %s\n", name(), timeSourceID, strerror(err))); } @@ -1709,7 +1711,8 @@ status_t NodeRef::_setRunMode( node(), delay, m); if(err < B_OK) { PRINT(( - "NodeRef('%s')::_setRunMode(): SetProducerRunModeDelay(%Ld) failed: %s\n", + "NodeRef('%s')::_setRunMode(): SetProducerRunModeDelay(%" + B_PRIdBIGTIME ") failed: %s\n", name(), delay, strerror(err))); } } else { @@ -1773,7 +1776,8 @@ status_t NodeRef::_preroll( if(err < B_OK) { PRINT(( - "*** NodeRef('%s')::_preroll(%Ld): BMediaRoster::SeekNode():\n" + "*** NodeRef('%s')::_preroll(%" B_PRIdBIGTIME + "): BMediaRoster::SeekNode():\n" " %s\n", name(), position, strerror(err))); return err; @@ -1788,7 +1792,8 @@ status_t NodeRef::_preroll( if(err < B_OK) { PRINT(( - "*** NodeRef('%s')::_preroll(%Ld): BMediaRoster::PrerollNode():\n" + "*** NodeRef('%s')::_preroll(%" B_PRIdBIGTIME + "): BMediaRoster::PrerollNode():\n" " %s\n", name(), position, strerror(err))); return err; @@ -1811,7 +1816,7 @@ status_t NodeRef::_seek( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_seek(to %Ld, at %Ld)\n", + "NodeRef('%s')::_seek(to %" B_PRIdBIGTIME ", at %" B_PRIdBIGTIME ")\n", name(), position, when)); if(m_flags & NO_SEEK) @@ -1828,7 +1833,8 @@ status_t NodeRef::_seek( if(err < B_OK) { PRINT(( - "*** NodeRef('%s')::_seek(to %Ld, at %Ld): BMediaRoster::SeekNode():\n" + "*** NodeRef('%s')::_seek(to %" B_PRIdBIGTIME ", at %" + B_PRIdBIGTIME "): BMediaRoster::SeekNode():\n" " %s\n", name(), position, when, strerror(err))); return err; @@ -1900,7 +1906,7 @@ status_t NodeRef::_start( if(err < B_OK) { PRINT(( - " * StartNode(%ld) failed: '%s'\n", + " * StartNode(%" B_PRId32 ") failed: '%s'\n", id(), strerror(err))); return err; } @@ -1984,7 +1990,7 @@ status_t NodeRef::_roll( m_group->m_transportState == NodeGroup::TRANSPORT_RUNNING || m_group->m_transportState == NodeGroup::TRANSPORT_STARTING); - D_ROSTER(("# roster->RollNode(%ld)\n", id())); + D_ROSTER(("# roster->RollNode(%" B_PRId32 ")\n", id())); if(m_flags & NO_SEEK) err = BMediaRoster::Roster()->RollNode( node(), start, stop); @@ -1994,8 +2000,9 @@ status_t NodeRef::_roll( if(err < B_OK) { PRINT(( - "NodeRef('%s')::_roll(%Ld to %Ld, from %Ld)\n" - "!!! BMediaRoster::RollNode(%ld) failed: '%s'\n", + "NodeRef('%s')::_roll(%" B_PRIdBIGTIME " to %" B_PRIdBIGTIME + ", from %" B_PRIdBIGTIME ")\n" + "!!! BMediaRoster::RollNode(%" B_PRId32 ") failed: '%s'\n", name(), start, stop, position, id(), strerror(err))); return err; } diff --git a/src/apps/cortex/NodeManager/NodeSyncThread.cpp b/src/apps/cortex/NodeManager/NodeSyncThread.cpp index 1707dde..66e2f8f 100644 --- a/src/apps/cortex/NodeManager/NodeSyncThread.cpp +++ b/src/apps/cortex/NodeManager/NodeSyncThread.cpp @@ -52,7 +52,7 @@ NodeSyncThread::~NodeSyncThread() { err = kill_thread(m_thread); if(err < B_OK) PRINT(( - "! ~NodeSyncThread(): kill_thread(%ld):\n" + "! ~NodeSyncThread(): kill_thread(%" B_PRId32 "):\n" " %s\n", m_thread, strerror(err))); @@ -64,7 +64,7 @@ NodeSyncThread::~NodeSyncThread() { err = delete_port(m_port); if(err < B_OK) PRINT(( - "! ~NodeSyncThread(): delete_port(%ld):\n" + "! ~NodeSyncThread(): delete_port(%" B_PRId32 "):\n" " %s\n", m_port, strerror(err))); @@ -173,8 +173,8 @@ void NodeSyncThread::_sync() { if(code != M_TRIGGER) { PRINT(( - "! NodeSyncThread::sync(): unknown message code %ld\n", - code)); + "! NodeSyncThread::sync(): unknown message code %" B_PRId32 + "\n", code)); continue; } diff --git a/src/apps/cortex/RouteApp/LiveNodeIO.cpp b/src/apps/cortex/RouteApp/LiveNodeIO.cpp index 959f11a..e01757c 100644 --- a/src/apps/cortex/RouteApp/LiveNodeIO.cpp +++ b/src/apps/cortex/RouteApp/LiveNodeIO.cpp @@ -119,7 +119,7 @@ status_t LiveNodeIO::getNode( outNode); if(err < B_OK) { PRINT(( - "!!! No node found named '%s' with kinds %Ld\n", + "!!! No node found named '%s' with kinds %" B_PRId64 "\n", name(), kind())); return B_NAME_NOT_FOUND; diff --git a/src/apps/cortex/RouteApp/NodeSetIOContext.cpp b/src/apps/cortex/RouteApp/NodeSetIOContext.cpp index 821316c..1aeea46 100644 --- a/src/apps/cortex/RouteApp/NodeSetIOContext.cpp +++ b/src/apps/cortex/RouteApp/NodeSetIOContext.cpp @@ -71,7 +71,7 @@ status_t NodeSetIOContext::addNode( (*it).first.Length() && strcmp(key, (*it).first.String()) != 0) { PRINT(( - "!!! NodeSetIOContext::addNode(%ld, '%s'):\n" + "!!! NodeSetIOContext::addNode(%" B_PRId32 ", '%s'):\n" " found matching node with key '%s'!\n", node, key, (*it).first.String())); } diff --git a/src/apps/cortex/RouteApp/route_app_io.cpp b/src/apps/cortex/RouteApp/route_app_io.cpp index de89922..ec465f5 100644 --- a/src/apps/cortex/RouteApp/route_app_io.cpp +++ b/src/apps/cortex/RouteApp/route_app_io.cpp @@ -161,8 +161,8 @@ status_t __CORTEX_NAMESPACE__ _get_node_signature( status_t err = manager->getNodeRef(node, &ref); if(err < B_OK) { PRINT(( - "!!! ConnectionIO::_getNodeSignature(): node %ld not found\n", - node)); + "!!! ConnectionIO::_getNodeSignature(): node %" B_PRId32 + " not found\n", node)); return err; } @@ -228,7 +228,7 @@ status_t __CORTEX_NAMESPACE__ _match_node_signature( return err; for(int32 n = 0; n < count; ++n) { - PRINT(("# %ld\n", buffer[n].node.node)); + PRINT(("# %" B_PRId32 "\n", buffer[n].node.node)); if((buffer[n].node.kind & kind) != kind) { PRINT(("# - kind mismatch\n")); continue; diff --git a/src/apps/cortex/addons/Flanger/FlangerNode.cpp b/src/apps/cortex/addons/Flanger/FlangerNode.cpp index 4a64417..0af06dc 100644 --- a/src/apps/cortex/addons/Flanger/FlangerNode.cpp +++ b/src/apps/cortex/addons/Flanger/FlangerNode.cpp @@ -346,7 +346,7 @@ FlangerNode::Connected(const media_source& source, media_input* poInput) { PRINT(("FlangerNode::Connected()\n" - "\tto source %ld\n", source.id)); + "\tto source %" B_PRId32 "\n", source.id)); // sanity check if(destination != m_input.destination) { @@ -377,13 +377,13 @@ void FlangerNode::Disconnected( // sanity checks if(m_input.source != source) { - PRINT(("\tsource mismatch: expected ID %ld, got %ld\n", - m_input.source.id, source.id)); + PRINT(("\tsource mismatch: expected ID %" B_PRId32 ", got %" B_PRId32 + "\n", m_input.source.id, source.id)); return; } if(destination != m_input.destination) { - PRINT(("\tdestination mismatch: expected ID %ld, got %ld\n", - m_input.destination.id, destination.id)); + PRINT(("\tdestination mismatch: expected ID %" B_PRId32 ", got %" + B_PRId32 "\n", m_input.destination.id, destination.id)); return; } @@ -438,7 +438,7 @@ status_t FlangerNode::GetLatencyFor( } *poLatency = m_downstreamLatency + m_processingLatency; - PRINT(("\treturning %Ld\n", *poLatency)); + PRINT(("\treturning %" B_PRIdBIGTIME "\n", *poLatency)); *poTimeSource = TimeSource()->ID(); return B_OK; } @@ -550,14 +550,14 @@ void FlangerNode::Connect( if(err < B_OK) { PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err))); } - PRINT(("\tdownstream latency = %Ld\n", m_downstreamLatency)); + PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", m_downstreamLatency)); // prepare the filter initFilter(); // figure processing time m_processingLatency = calcProcessingLatency(); - PRINT(("\tprocessing latency = %Ld\n", m_processingLatency)); + PRINT(("\tprocessing latency = %" B_PRIdBIGTIME "\n", m_processingLatency)); // store summed latency SetEventLatency(m_downstreamLatency + m_processingLatency); @@ -685,7 +685,7 @@ status_t FlangerNode::GetLatency( PRINT(("FlangerNode::GetLatency()\n")); *poLatency = EventLatency() + SchedulingLatency(); - PRINT(("\treturning %Ld\n", *poLatency)); + PRINT(("\treturning %" B_PRIdBIGTIME "\n", *poLatency)); return B_OK; } @@ -747,8 +747,8 @@ void FlangerNode::LateNoticeReceived( bigtime_t tpWhen) { PRINT(("FlangerNode::LateNoticeReceived()\n" - "\thowLate == %Ld\n" - "\twhen == %Ld\n", howLate, tpWhen)); + "\thowLate == %" B_PRIdBIGTIME "\n" + "\twhen == %" B_PRIdBIGTIME "\n", howLate, tpWhen)); if(source != m_output.source) { PRINT(("\tBad source.\n")); diff --git a/src/apps/cortex/addons/common/AudioFilterNode.cpp b/src/apps/cortex/addons/common/AudioFilterNode.cpp index 79e413f..a43901d 100644 --- a/src/apps/cortex/addons/common/AudioFilterNode.cpp +++ b/src/apps/cortex/addons/common/AudioFilterNode.cpp @@ -582,7 +582,7 @@ status_t AudioFilterNode::Connected( media_input* outInput) { PRINT(("AudioFilterNode::Connected()\n" - "\tto source %ld\n", source.id)); + "\tto source %" B_PRId32 "\n", source.id)); // sanity check if(destination != m_input.destination) { @@ -613,13 +613,13 @@ void AudioFilterNode::Disconnected( // sanity checks if(m_input.source != source) { - PRINT(("\tsource mismatch: expected ID %ld, got %ld\n", - m_input.source.id, source.id)); + PRINT(("\tsource mismatch: expected ID %" B_PRId32 ", got %" B_PRId32 + "\n", m_input.source.id, source.id)); return; } if(destination != m_input.destination) { - PRINT(("\tdestination mismatch: expected ID %ld, got %ld\n", - m_input.destination.id, destination.id)); + PRINT(("\tdestination mismatch: expected ID %" B_PRId32 ", got %" + B_PRId32 "\n", m_input.destination.id, destination.id)); return; } @@ -684,7 +684,7 @@ status_t AudioFilterNode::GetLatencyFor( } *outLatency = m_downstreamLatency + m_processingLatency; - PRINT(("\treturning %Ld\n", *outLatency)); + PRINT(("\treturning %" B_PRIdBIGTIME "\n", *outLatency)); *outTimeSource = TimeSource()->ID(); return B_OK; } @@ -707,7 +707,8 @@ void AudioFilterNode::ProducerDataStatus( int32 status, bigtime_t tpWhen) { - PRINT(("AudioFilterNode::ProducerDataStatus(%ld at %Ld)\n", status, tpWhen)); + PRINT(("AudioFilterNode::ProducerDataStatus(%" B_PRId32 " at %" + B_PRIdBIGTIME ")\n", status, tpWhen)); // sanity check if(destination != m_input.destination) { @@ -804,7 +805,7 @@ void AudioFilterNode::Connect( if(err < B_OK) { PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err))); } - PRINT(("\tdownstream latency = %Ld\n", m_downstreamLatency)); + PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", m_downstreamLatency)); // // prepare the filter // initFilter(); @@ -984,7 +985,7 @@ status_t AudioFilterNode::GetLatency( PRINT(("AudioFilterNode::GetLatency()\n")); *outLatency = EventLatency() + SchedulingLatency(); - PRINT(("\treturning %Ld\n", *outLatency)); + PRINT(("\treturning %" B_PRIdBIGTIME "\n", *outLatency)); return B_OK; } @@ -1047,8 +1048,8 @@ void AudioFilterNode::LateNoticeReceived( bigtime_t tpWhen) { PRINT(("AudioFilterNode::LateNoticeReceived()\n" - "\thowLate == %Ld\n" - "\twhen == %Ld\n", howLate, tpWhen)); + "\thowLate == %" B_PRIdBIGTIME "\n" + "\twhen == %" B_PRIdBIGTIME "\n", howLate, tpWhen)); if(source != m_output.source) { PRINT(("\tBad source.\n")); @@ -1362,7 +1363,7 @@ void AudioFilterNode::updateOperation() { // do performance tests (what if I'm running? +++++) m_processingLatency = calcProcessingLatency(); - PRINT(("\tprocessing latency = %Ld\n", m_processingLatency)); + PRINT(("\tprocessing latency = %" B_PRIdBIGTIME "\n", m_processingLatency)); // store summed latency SetEventLatency(m_downstreamLatency + m_processingLatency); @@ -1435,7 +1436,7 @@ void AudioFilterNode::updateBufferGroup() { // create buffer group PRINT(( "##### AudioFilterNode::updateBufferGroup():\n" - "##### creating %ld buffers of size %ld\n", + "##### creating %" B_PRId32 " buffers of size %" B_PRIuSIZE "\n", bufferCount, m_output.format.u.raw_audio.buffer_size)); m_bufferGroup = new BBufferGroup( diff --git a/src/apps/cortex/support/BasicThread.h b/src/apps/cortex/support/BasicThread.h index 18f6bbb..f670c65 100644 --- a/src/apps/cortex/support/BasicThread.h +++ b/src/apps/cortex/support/BasicThread.h @@ -115,7 +115,8 @@ public: // operations if(wait) { status_t ret; while(wait_for_thread(thread, &ret) == B_INTERRUPTED) { - PRINT(("stopping thread %ld: B_INTERRUPTED\n", thread)); + PRINT(("stopping thread %" B_PRId32 ": B_INTERRUPTED\n", + thread)); } } diff --git a/src/apps/cortex/support/ObservableHandler.cpp b/src/apps/cortex/support/ObservableHandler.cpp index 53babd7..3eda698 100644 --- a/src/apps/cortex/support/ObservableHandler.cpp +++ b/src/apps/cortex/support/ObservableHandler.cpp @@ -81,7 +81,7 @@ status_t ObservableHandler::release() { ObservableHandler::~ObservableHandler() { if(CountTargets()) { PRINT(( - "*** ~ObservableHandler() '%s': %ld observers remain\n", + "*** ~ObservableHandler() '%s': %" B_PRId32 " observers remain\n", Name(), CountTargets())); } } diff --git a/src/apps/cortex/support/ObservableLooper.cpp b/src/apps/cortex/support/ObservableLooper.cpp index c19c37a..be44fb6 100644 --- a/src/apps/cortex/support/ObservableLooper.cpp +++ b/src/apps/cortex/support/ObservableLooper.cpp @@ -69,7 +69,7 @@ status_t ObservableLooper::release() { ObservableLooper::~ObservableLooper() { if(CountTargets()) { PRINT(( - "*** ~ObservableLooper() '%s': %ld observers remain\n", + "*** ~ObservableLooper() '%s': %" B_PRId32 " observers remain\n", Name(), CountTargets())); } if(m_executioner) diff --git a/src/apps/patchbay/PatchView.cpp b/src/apps/patchbay/PatchView.cpp index 55892f4..c43d6c8 100644 --- a/src/apps/patchbay/PatchView.cpp +++ b/src/apps/patchbay/PatchView.cpp @@ -212,8 +212,8 @@ PatchView::HandleMidiEvent(BMessage* msg) break; } - PRINT(("MIDI Roster Event B_MIDI_REGISTERED: id=%ld, type=%s\n", - id, type)); + PRINT(("MIDI Roster Event B_MIDI_REGISTERED: id=%" B_PRId32 + ", type=%s\n", id, type)); if (strcmp(type, "producer") == 0) AddProducer(id); else if (strcmp(type, "consumer") == 0) @@ -236,8 +236,8 @@ PatchView::HandleMidiEvent(BMessage* msg) break; } - PRINT(("MIDI Roster Event B_MIDI_UNREGISTERED: id=%ld, type=%s\n", - id, type)); + PRINT(("MIDI Roster Event B_MIDI_UNREGISTERED: id=%" B_PRId32 + ", type=%s\n", id, type)); if (strcmp(type, "producer") == 0) RemoveProducer(id); else if (strcmp(type, "consumer") == 0) @@ -267,8 +267,8 @@ PatchView::HandleMidiEvent(BMessage* msg) break; } - PRINT(("MIDI Roster Event B_MIDI_CHANGED_PROPERTIES: id=%ld, type=%s\n", - id, type)); + PRINT(("MIDI Roster Event B_MIDI_CHANGED_PROPERTIES: id=%" B_PRId32 + ", type=%s\n", id, type)); if (strcmp(type, "producer") == 0) UpdateProducerProps(id, &props); else if (strcmp(type, "consumer") == 0) @@ -295,8 +295,8 @@ PatchView::HandleMidiEvent(BMessage* msg) " field not found in B_MIDI_CONNECTED\n")); break; } - PRINT(("MIDI Roster Event B_MIDI_CONNECTED: producer=%ld, consumer=%ld\n", - prod, cons)); + PRINT(("MIDI Roster Event B_MIDI_CONNECTED: producer=%" B_PRId32 + ", consumer=%" B_PRId32 "\n", prod, cons)); Connect(prod, cons); } break; @@ -315,13 +315,14 @@ PatchView::HandleMidiEvent(BMessage* msg) " field not found in B_MIDI_DISCONNECTED\n")); break; } - PRINT(("MIDI Roster Event B_MIDI_DISCONNECTED: producer=%ld, consumer=%ld\n", - prod, cons)); + PRINT(("MIDI Roster Event B_MIDI_DISCONNECTED: producer=%" B_PRId32 + ", consumer=%" B_PRId32 "\n", prod, cons)); Disconnect(prod, cons); } break; default: - PRINT(("PatchView::HandleMidiEvent: unknown opcode %ld\n", op)); + PRINT(("PatchView::HandleMidiEvent: unknown opcode %" B_PRId32 "\n", + op)); break; } } diff --git a/src/apps/poorman/PoorManPreferencesWindow.cpp b/src/apps/poorman/PoorManPreferencesWindow.cpp index 0095c82..6b1901a 100644 --- a/src/apps/poorman/PoorManPreferencesWindow.cpp +++ b/src/apps/poorman/PoorManPreferencesWindow.cpp @@ -128,7 +128,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message) fLoggingView->LogFileName())); win->SetLogPath(fLoggingView->LogFileName()); - PRINT(("Pref Window: MaxConnections Slider: %ld\n", + PRINT(("Pref Window: MaxConnections Slider: %" B_PRId32 "\n", fAdvancedView->MaxSimultaneousConnections())); server->SetMaxConns(fAdvancedView->MaxSimultaneousConnections()); win->SetMaxConnections( @@ -167,7 +167,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message) break; case MSG_PREF_ADV_SLD_MAX_CONNECTION: fMaxConnections = fAdvancedView->MaxSimultaneousConnections(); - PRINT(("Max Connections: %ld\n", fMaxConnections)); + PRINT(("Max Connections: %" B_PRId32 "\n", fMaxConnections)); break; default: BWindow::MessageReceived(message); diff --git a/src/kits/midi/MidiStore.cpp b/src/kits/midi/MidiStore.cpp index c4bd829..51ec5a5 100644 --- a/src/kits/midi/MidiStore.cpp +++ b/src/kits/midi/MidiStore.cpp @@ -728,7 +728,7 @@ BMidiStore::ReadChunk() if (strncmp(fourcc, "MTrk", 4) == 0) ReadTrack(); else { - TRACE(("Skipping '%c%c%c%c' chunk (%lu bytes)", + TRACE(("Skipping '%c%c%c%c' chunk (%" B_PRIu32 " bytes)", fourcc[0], fourcc[1], fourcc[2], fourcc[3], fByteCount)) SkipBytes(fByteCount); diff --git a/src/kits/midi2/MidiEndpoint.cpp b/src/kits/midi2/MidiEndpoint.cpp index 060876b..6bb9acf 100644 --- a/src/kits/midi2/MidiEndpoint.cpp +++ b/src/kits/midi2/MidiEndpoint.cpp @@ -119,7 +119,7 @@ BMidiEndpoint::Release() { int32 old = atomic_add(&fRefCount, -1); - TRACE(("BMidiEndpoint::Release refCount is now %ld", old - 1)) + TRACE(("BMidiEndpoint::Release refCount is now %" B_PRId32, old - 1)) if (old == 1) { // If the reference count of a local endpoint drops to zero, @@ -146,7 +146,7 @@ BMidiEndpoint::Acquire() #endif atomic_add(&fRefCount, 1); - TRACE(("BMidiEndpoint::Acquire refCount is now %ld", old + 1)) + TRACE(("BMidiEndpoint::Acquire refCount is now %" B_PRId32, old + 1)) return B_OK; } diff --git a/src/kits/midi2/MidiLocalProducer.cpp b/src/kits/midi2/MidiLocalProducer.cpp index 47df682..22f0af6 100644 --- a/src/kits/midi2/MidiLocalProducer.cpp +++ b/src/kits/midi2/MidiLocalProducer.cpp @@ -41,7 +41,7 @@ void BMidiLocalProducer::Connected(BMidiConsumer* cons) { ASSERT(cons != NULL) - TRACE(("Connected() %ld to %ld", ID(), cons->ID())) + TRACE(("Connected() %" B_PRId32 " to %" B_PRId32 "", ID(), cons->ID())) // Do nothing. } @@ -51,7 +51,7 @@ void BMidiLocalProducer::Disconnected(BMidiConsumer* cons) { ASSERT(cons != NULL) - TRACE(("Disconnected() %ld from %ld", ID(), cons->ID())) + TRACE(("Disconnected() %" B_PRId32 " from %" B_PRId32 "", ID(), cons->ID())) // Do nothing. } diff --git a/src/kits/midi2/MidiRosterLooper.cpp b/src/kits/midi2/MidiRosterLooper.cpp index 1b5592b..186e2fa 100644 --- a/src/kits/midi2/MidiRosterLooper.cpp +++ b/src/kits/midi2/MidiRosterLooper.cpp @@ -603,11 +603,11 @@ BMidiRosterLooper::DumpEndpoints() for (int32 t = 0; t < CountEndpoints(); ++t) { BMidiEndpoint* endp = EndpointAt(t); - printf("\tendpoint %ld (%p):\n", t, endp); + printf("\tendpoint %" B_PRId32 " (%p):\n", t, endp); printf( - "\t\tid %ld, name '%s', %s, %s, %s, %s, refcount %ld\n", - endp->ID(), endp->Name(), + "\t\tid %" B_PRId32 ", name '%s', %s, %s, %s, %s, refcount %" + B_PRId32 "\n", endp->ID(), endp->Name(), endp->IsConsumer() ? "consumer" : "producer", endp->IsRegistered() ? "registered" : "unregistered", endp->IsLocal() ? "local" : "remote", @@ -618,7 +618,7 @@ BMidiRosterLooper::DumpEndpoints() if (endp->IsConsumer()) { BMidiConsumer* cons = (BMidiConsumer*) endp; - printf("\t\tport %ld, latency %Ld\n", + printf("\t\tport %" B_PRId32 ", latency %" B_PRIdBIGTIME "\n", cons->fPort, cons->fLatency); } else { BMidiProducer* prod = (BMidiProducer*) endp; @@ -626,7 +626,8 @@ BMidiRosterLooper::DumpEndpoints() printf("\t\tconnections:\n"); for (int32 k = 0; k < prod->CountConsumers(); ++k) { BMidiConsumer* cons = prod->ConsumerAt(k); - printf("\t\t\tid %ld (%p)\n", cons->ID(), cons); + printf("\t\t\tid %" B_PRId32 " (%p)\n", cons->ID(), + cons); } prod->UnlockProducer(); } diff --git a/src/preferences/mouse/MouseSettings.cpp b/src/preferences/mouse/MouseSettings.cpp index eaa3fdc..105b40ec 100644 --- a/src/preferences/mouse/MouseSettings.cpp +++ b/src/preferences/mouse/MouseSettings.cpp @@ -144,14 +144,14 @@ MouseSettings::_SaveSettings() void MouseSettings::Dump() { - printf("type:\t\t%ld button mouse\n", fSettings.type); - printf("map:\t\tleft = %lu : middle = %lu : right = %lu\n", - fSettings.map.button[0], fSettings.map.button[2], + printf("type:\t\t%" B_PRId32 " button mouse\n", fSettings.type); + printf("map:\t\tleft = %" B_PRIu32 " : middle = %" B_PRIu32 " : right = %" + B_PRIu32 "\n", fSettings.map.button[0], fSettings.map.button[2], fSettings.map.button[1]); - printf("click speed:\t%Ld\n", fSettings.click_speed); + printf("click speed:\t%" B_PRId64 "\n", fSettings.click_speed); printf("accel:\t\t%s\n", fSettings.accel.enabled ? "enabled" : "disabled"); - printf("accel factor:\t%ld\n", fSettings.accel.accel_factor); - printf("speed:\t\t%ld\n", fSettings.accel.speed); + printf("accel factor:\t%" B_PRId32 "\n", fSettings.accel.accel_factor); + printf("speed:\t\t%" B_PRId32 "\n", fSettings.accel.speed); const char *mode = "unknown"; switch (fMode) { diff --git a/src/servers/midi/MidiServerApp.cpp b/src/servers/midi/MidiServerApp.cpp index 4e547c6..fe23928 100644 --- a/src/servers/midi/MidiServerApp.cpp +++ b/src/servers/midi/MidiServerApp.cpp @@ -238,7 +238,7 @@ MidiServerApp::OnChangeEndpoint(BMessage* msg) reply.AddInt32("midi:result", err); if (SendReply(app, msg, &reply) && err == B_OK) { - TRACE(("Endpoint %ld (%p) changed", endp->id, endp)) + TRACE(("Endpoint %" B_PRId32 " (%p) changed", endp->id, endp)) BMessage notify; notify.what = MSG_ENDPOINT_CHANGED; @@ -320,11 +320,13 @@ MidiServerApp::OnConnectDisconnect(BMessage* msg) if (SendReply(app, msg, &reply) && err == B_OK) { if (mustConnect) { - TRACE(("Connection made: %ld ---> %ld", prod->id, cons->id)) + TRACE(("Connection made: %" B_PRId32 " ---> %" B_PRId32, prod->id, + cons->id)) prod->connections.AddItem(cons); } else { - TRACE(("Connection broken: %ld -X-> %ld", prod->id, cons->id)) + TRACE(("Connection broken: %" B_PRId32 " -X-> %" B_PRId32, prod->id, + cons->id)) prod->connections.RemoveItem(cons); } @@ -392,7 +394,7 @@ MidiServerApp::AddEndpoint(BMessage* msg, endpoint_t* endp) ASSERT(endp != NULL) ASSERT(!endpoints.HasItem(endp)) - TRACE(("Endpoint %ld (%p) added", endp->id, endp)) + TRACE(("Endpoint %" B_PRId32 " (%p) added", endp->id, endp)) endpoints.AddItem(endp); @@ -412,7 +414,7 @@ MidiServerApp::RemoveEndpoint(app_t* app, endpoint_t* endp) ASSERT(endp != NULL) ASSERT(endpoints.HasItem(endp)) - TRACE(("Endpoint %ld (%p) removed", endp->id, endp)) + TRACE(("Endpoint %" B_PRId32 " (%p) removed", endp->id, endp)) endpoints.RemoveItem(endp); @@ -502,7 +504,7 @@ MidiServerApp::WhichApp(BMessage* msg) return app; } - TRACE(("Application %ld is not registered", retadr.Team())) + TRACE(("Application %" B_PRId32 " is not registered", retadr.Team())) return NULL; } @@ -537,7 +539,7 @@ MidiServerApp::FindEndpoint(int32 id) } } - TRACE(("Endpoint %ld not found", id)) + TRACE(("Endpoint %" B_PRId32 " not found", id)) return NULL; } @@ -703,7 +705,8 @@ MidiServerApp::DumpApps() for (int32 t = 0; t < CountApps(); ++t) { app_t* app = AppAt(t); - printf("\tapp %ld (%p): team %ld\n", t, app, app->messenger.Team()); + printf("\tapp %" B_PRId32 " (%p): team %" B_PRId32 "\n", t, app, + app->messenger.Team()); } printf("*** END DumpApps\n"); @@ -720,8 +723,8 @@ MidiServerApp::DumpEndpoints() for (int32 t = 0; t < CountEndpoints(); ++t) { endpoint_t* endp = EndpointAt(t); - printf("\tendpoint %ld (%p):\n", t, endp); - printf("\t\tid %ld, name '%s', %s, %s, app %p\n", + printf("\tendpoint %" B_PRId32 " (%p):\n", t, endp); + printf("\t\tid %" B_PRId32 ", name '%s', %s, %s, app %p\n", endp->id, endp->name.String(), endp->consumer ? "consumer" : "producer", endp->registered ? "registered" : "unregistered", @@ -729,12 +732,13 @@ MidiServerApp::DumpEndpoints() printf("\t\tproperties: "); endp->properties.PrintToStream(); if (endp->consumer) - printf("\t\tport %ld, latency %Ld\n", endp->port, endp->latency); + printf("\t\tport %" B_PRId32 ", latency %" B_PRIdBIGTIME "\n", + endp->port, endp->latency); else { printf("\t\tconnections:\n"); for (int32 k = 0; k < CountConnections(endp); ++k) { endpoint_t* cons = ConnectionAt(endp, k); - printf("\t\t\tid %ld (%p)\n", cons->id, cons); + printf("\t\t\tid %" B_PRId32 " (%p)\n", cons->id, cons); } } } diff --git a/src/servers/registrar/MessageDeliverer.cpp b/src/servers/registrar/MessageDeliverer.cpp index eb5f22a..0db7e3b 100644 --- a/src/servers/registrar/MessageDeliverer.cpp +++ b/src/servers/registrar/MessageDeliverer.cpp @@ -356,8 +356,8 @@ public: status_t PushMessage(Message *message, int32 token) { -PRINT("MessageDeliverer::TargetPort::PushMessage(port: %ld, %p, %ld)\n", -fPortID, message, token); +PRINT("MessageDeliverer::TargetPort::PushMessage(port: %" B_PRId32 ", %p, %" +B_PRId32 ")\n", fPortID, message, token); // create a target message TargetMessage *targetMessage = new(nothrow) TargetMessage(message, token); @@ -390,7 +390,7 @@ fPortID, message, token); void PopMessage() { if (fMessages.Head()) { -PRINT("MessageDeliverer::TargetPort::PopMessage(): port: %ld, %p\n", +PRINT("MessageDeliverer::TargetPort::PopMessage(): port: %" B_PRId32 ", %p\n", fPortID, fMessages.Head()->GetMessage()); _RemoveMessage(fMessages.Head()); } @@ -405,8 +405,8 @@ fPortID, fMessages.Head()->GetMessage()); if (message->GetMessage()->TimeoutTime() > now) break; -PRINT("MessageDeliverer::TargetPort::DropTimedOutMessages(): port: %ld: " -"message %p timed out\n", fPortID, message->GetMessage()); +PRINT("MessageDeliverer::TargetPort::DropTimedOutMessages(): port: %" B_PRId32 +": message %p timed out\n", fPortID, message->GetMessage()); _RemoveMessage(message); } } @@ -433,15 +433,15 @@ private: { // message count while (fMessageCount > kMaxMessagesPerPort) { -PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %ld: hit maximum " -"message count limit.\n", fPortID); +PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %" B_PRId32 +": hit maximum message count limit.\n", fPortID); PopMessage(); } // message size while (fMessageSize > kMaxDataPerPort) { -PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %ld: hit maximum " -"message size limit.\n", fPortID); +PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %" B_PRId32 +": hit maximum message size limit.\n", fPortID); PopMessage(); } } diff --git a/src/servers/registrar/MessageRunnerManager.cpp b/src/servers/registrar/MessageRunnerManager.cpp index bcafc84..2df05d9 100644 --- a/src/servers/registrar/MessageRunnerManager.cpp +++ b/src/servers/registrar/MessageRunnerManager.cpp @@ -751,8 +751,9 @@ MessageRunnerManager::_ScheduleEvent(RunnerInfo *info) info->event->SetTime(info->time); scheduled = fEventQueue->AddEvent(info->event); -PRINT("runner %ld (%lld, %ld) rescheduled: %d, time: %lld, now: %lld\n", -info->token, info->interval, info->count, scheduled, info->time, system_time()); +PRINT("runner %" B_PRId32 " (%" B_PRId64 ", %" B_PRId32 ") rescheduled: %d, " +"time: %" B_PRId64 ", now: %" B_PRId64 "\n", info->token, info->interval, +info->count, scheduled, info->time, system_time()); } return scheduled; } diff --git a/src/servers/registrar/RecentEntries.cpp b/src/servers/registrar/RecentEntries.cpp index ed3d582..3479681 100644 --- a/src/servers/registrar/RecentEntries.cpp +++ b/src/servers/registrar/RecentEntries.cpp @@ -312,17 +312,19 @@ RecentEntries::Save(FILE* file, const char *description, const char *tag) fprintf(file, " \"%s\" %" B_PRId32, entry->sig.c_str(), entry->index); } else { - D(PRINT("WARNING: RecentEntries::Save(): The entry %ld " - "entries from the front of the compiled recent_entry* " - "list for the entry ref (%ld, %lld, '%s') was found to " - "be NULL\n", i, mapItem->first.device, - mapItem->first.directory, mapItem->first.name)); + D(PRINT("WARNING: RecentEntries::Save(): The entry %" + B_PRId32 " entries from the front of the compiled " + "recent_entry* list for the entry ref (%" B_PRId32 ", %" + B_PRId64 ", '%s') was found to be NULL\n", i, + mapItem->first.device, mapItem->first.directory, + mapItem->first.name)); } } fprintf(file, "\n"); } else { D(PRINT("WARNING: RecentEntries::Save(): entry_ref_to_path() " - "failed on the entry_ref (%ld, %lld, '%s') with error 0x%lx\n", + "failed on the entry_ref (%" B_PRId32", %" B_PRId64 ", '%s') " + "with error 0x%" B_PRIx32 "\n", mapItem->first.device, mapItem->first.directory, mapItem->first.name, outputError)); } diff --git a/src/servers/registrar/RosterSettingsCharStream.cpp b/src/servers/registrar/RosterSettingsCharStream.cpp index 51a61b4..497e13c 100644 --- a/src/servers/registrar/RosterSettingsCharStream.cpp +++ b/src/servers/registrar/RosterSettingsCharStream.cpp @@ -295,7 +295,7 @@ RosterSettingsCharStream::GetString(char *result) // NULL terminate regardless result[resultPos] = '\0'; - D(PRINT("error == 0x%lx, result == '%s'\n", error, result)); + D(PRINT("error == 0x%" B_PRIx32 ", result == '%s'\n", error, result)); return error; } diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp index e3d2ea2..493189c 100644 --- a/src/servers/registrar/ShutdownProcess.cpp +++ b/src/servers/registrar/ShutdownProcess.cpp @@ -739,8 +739,8 @@ ShutdownProcess::MessageReceived(BMessage* message) return; } - PRINT("ShutdownProcess::MessageReceived(): B_SOME_APP_QUIT: %ld\n", - team); + PRINT("ShutdownProcess::MessageReceived(): B_SOME_APP_QUIT: %" + B_PRId32 "\n", team); // remove the app info from the respective list int32 phase; @@ -774,7 +774,8 @@ ShutdownProcess::MessageReceived(BMessage* message) // get the phase the event is intended for int32 phase = TimeoutEvent::GetMessagePhase(message); team_id team = TimeoutEvent::GetMessageTeam(message);; - PRINT("MSG_PHASE_TIMED_OUT: phase: %ld, team: %ld\n", phase, team); + PRINT("MSG_PHASE_TIMED_OUT: phase: %" B_PRId32 ", team: %" B_PRId32 + "\n", phase, team); BAutolock _(fWorkerLock); @@ -837,10 +838,12 @@ ShutdownProcess::MessageReceived(BMessage* message) BAutolock _(fWorkerLock); if (open) { - PRINT("B_REG_TEAM_DEBUGGER_ALERT: insert %ld\n", team); + PRINT("B_REG_TEAM_DEBUGGER_ALERT: insert %" B_PRId32 "\n", + team); fDebuggedTeams.insert(team); } else { - PRINT("B_REG_TEAM_DEBUGGER_ALERT: remove %ld\n", team); + PRINT("B_REG_TEAM_DEBUGGER_ALERT: remove %" B_PRId32 "\n", + team); fDebuggedTeams.erase(team); _PushEvent(DEBUG_EVENT, -1, fCurrentPhase); } @@ -1397,7 +1400,7 @@ ShutdownProcess::_WaitForApp(team_id team, AppInfoList* list, bool systemApps) } else { // The app returned false in QuitRequested(). PRINT("ShutdownProcess::_WaitForApp(): shutdown cancelled " - "by team %ld (-1 => user)\n", eventTeam); + "by team %" B_PRId32 " (-1 => user)\n", eventTeam); _DisplayAbortingApp(team); throw_error(B_SHUTDOWN_CANCELLED); @@ -1433,7 +1436,7 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps) if (event == ABORT_EVENT) { PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by " - "team %ld (-1 => user)\n", team); + "team %" B_PRId32 " (-1 => user)\n", team); _DisplayAbortingApp(team); throw_error(B_SHUTDOWN_CANCELLED); @@ -1459,7 +1462,7 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps) if (!systemApps && event == ABORT_EVENT) { PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by " - "team %ld (-1 => user)\n", team); + "team %" B_PRId32 " (-1 => user)\n", team); _DisplayAbortingApp(team); throw_error(B_SHUTDOWN_CANCELLED); @@ -1498,8 +1501,8 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps) _SetShutdownWindowCurrentApp(team); // send the shutdown message to the app - PRINT(" sending team %ld (port: %ld) a shutdown message\n", team, - port); + PRINT(" sending team %" B_PRId32 " (port: %" B_PRId32 ") a shutdown " + "message\n", team, port); SingleMessagingTargetSet target(port, B_PREFERRED_TOKEN); MessageDeliverer::Default()->DeliverMessage(&message, target); @@ -1547,7 +1550,7 @@ ShutdownProcess::_QuitBackgroundApps() AppInfoListMessagingTargetSet targetSet(fBackgroundApps); if (targetSet.HasNext()) { - PRINT(" sending shutdown message to %ld apps\n", + PRINT(" sending shutdown message to %" B_PRId32 " apps\n", fBackgroundApps.CountInfos()); status_t error = MessageDeliverer::Default()->DeliverMessage( @@ -1653,7 +1656,7 @@ ShutdownProcess::_QuitNonApps() team_info teamInfo; while (get_next_team_info(&cookie, &teamInfo) == B_OK) { if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) { - PRINT(" sending team %ld TERM signal\n", teamInfo.team); + PRINT(" sending team %" B_PRId32 " TERM signal\n", teamInfo.team); #ifdef __HAIKU__ // Note: team ID == team main thread ID under Haiku @@ -1674,7 +1677,7 @@ ShutdownProcess::_QuitNonApps() cookie = 0; while (get_next_team_info(&cookie, &teamInfo) == B_OK) { if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) { - PRINT(" killing team %ld\n", teamInfo.team); + PRINT(" killing team %" B_PRId32 "\n", teamInfo.team); #ifdef __HAIKU__ kill_team(teamInfo.team); @@ -1735,7 +1738,8 @@ ShutdownProcess::_QuitBlockingApp(AppInfoList& list, team_id team, if (event == ABORT_EVENT) { if (cancelAllowed || debugged) { PRINT("ShutdownProcess::_QuitBlockingApp(): shutdown " - "cancelled by team %ld (-1 => user)\n", eventTeam); + "cancelled by team %" B_PRId32 " (-1 => user)\n", + eventTeam); if (!debugged) _DisplayAbortingApp(eventTeam); @@ -1757,7 +1761,7 @@ ShutdownProcess::_QuitBlockingApp(AppInfoList& list, team_id team, } // kill the app - PRINT(" killing team %ld\n", team); + PRINT(" killing team %" B_PRId32 "\n", team); kill_team(team); diff --git a/src/servers/registrar/TRoster.cpp b/src/servers/registrar/TRoster.cpp index b3276b0..dcbf13c 100644 --- a/src/servers/registrar/TRoster.cpp +++ b/src/servers/registrar/TRoster.cpp @@ -183,7 +183,7 @@ TRoster::HandleAddApplication(BMessage* request) if (request->FindBool("full_registration", &fullReg) != B_OK) fullReg = false; - PRINT("team: %ld, signature: %s\n", team, signature); + PRINT("team: %" B_PRId32 ", signature: %s\n", team, signature); PRINT("full registration: %d\n", fullReg); if (fShuttingDown) @@ -203,8 +203,9 @@ TRoster::HandleAddApplication(BMessage* request) // entry_ref if (error == B_OK) { - PRINT("flags: %lx\n", flags); - PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name); + PRINT("flags: %" B_PRIx32 "\n", flags); + PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device, + ref.directory, ref.name); // check single/exclusive launchers RosterAppInfo* info = NULL; if ((launchFlags == B_SINGLE_LAUNCH @@ -253,15 +254,15 @@ TRoster::HandleAddApplication(BMessage* request) // add it to the right list bool addingSuccess = false; if (team >= 0) { - PRINT("added ref: %ld, %lld, %s\n", info->ref.device, - info->ref.directory, info->ref.name); + PRINT("added ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", + info->ref.device, info->ref.directory, info->ref.name); addingSuccess = (AddApp(info) == B_OK); if (addingSuccess && fullReg) _AppAdded(info); } else { token = info->token = _NextToken(); addingSuccess = fEarlyPreRegisteredApps.AddInfo(info); - PRINT("added to early pre-regs, token: %lu\n", token); + PRINT("added to early pre-regs, token: %" B_PRIu32 "\n", token); } if (!addingSuccess) SET_ERROR(error, B_NO_MEMORY); @@ -385,8 +386,9 @@ TRoster::HandleIsAppRegistered(BMessage* request) if (request->FindInt32("token", (int32*)&token) != B_OK) token = 0; - PRINT("team: %ld, token: %lu\n", team, token); - PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name); + PRINT("team: %" B_PRId32 ", token: %" B_PRIu32 "\n", team, token); + PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device, ref.directory, + ref.name); // check the parameters // entry_ref @@ -486,7 +488,7 @@ TRoster::HandleRemoveApp(BMessage* request) if (request->FindInt32("team", &team) != B_OK) team = -1; - PRINT("team: %ld\n", team); + PRINT("team: %" B_PRId32 "\n", team); // remove the app if (error == B_OK) { @@ -538,7 +540,8 @@ TRoster::HandleSetThreadAndTeam(BMessage* request) if (error == B_OK && team < 0) SET_ERROR(error, B_BAD_VALUE); - PRINT("team: %ld, thread: %ld, token: %lu\n", team, thread, token); + PRINT("team: %" B_PRId32 ", thread: %" B_PRId32 ", token: %" B_PRIu32 "\n", + team, thread, token); // update the app_info if (error == B_OK) { @@ -667,9 +670,10 @@ TRoster::HandleGetAppInfo(BMessage* request) hasSignature = false; if (hasTeam) -PRINT("team: %ld\n", team); +PRINT("team: %" B_PRId32 "\n", team); if (hasRef) -PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name); +PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device, ref.directory, + ref.name); if (hasSignature) PRINT("signature: %s\n", signature); @@ -1801,7 +1805,7 @@ TRoster::_HandleGetRecentEntries(BMessage* request) default: D(PRINT("WARNING: TRoster::_HandleGetRecentEntries(): " - "unexpected request->what value of 0x%lx\n", + "unexpected request->what value of 0x%" B_PRIx32 "\n", request->what)); error = B_BAD_VALUE; break; @@ -1963,15 +1967,17 @@ TRoster::_LoadRosterSettings(const char* path) } if (!streamError) { D(printf("pushing entry, leaf == '%s', app == " - "'%s', index == %ld\n", entry->ref.name, - entry->sig.c_str(), entry->index)); + "'%s', index == %" B_PRId32 "\n", + entry->ref.name, entry->sig.c_str(), + entry->index)); list->push_back(entry); } } if (streamError) { - D(printf("entry error 0x%lx\n", streamError)); + D(printf("entry error 0x%" B_PRIx32 "\n", + streamError)); if (streamError != RosterSettingsCharStream::kEndOfLine && streamError @@ -2024,7 +2030,7 @@ TRoster::_LoadRosterSettings(const char* path) } if (error) { D(PRINT("WARNING: TRoster::_LoadRosterSettings(): error loading roster " - "settings from '%s', 0x%lx\n", settingsPath, error)); + "settings from '%s', 0x%" B_PRIx32 "\n", settingsPath, error)); } return error; } @@ -2047,17 +2053,17 @@ TRoster::_SaveRosterSettings(const char* path) saveError = fRecentDocuments.Save(file, "Recent documents", "RecentDoc"); if (saveError) { D(PRINT("TRoster::_SaveRosterSettings(): recent documents save " - "failed with error 0x%lx\n", saveError)); + "failed with error 0x%" B_PRIx32 "\n", saveError)); } saveError = fRecentFolders.Save(file, "Recent folders", "RecentFolder"); if (saveError) { D(PRINT("TRoster::_SaveRosterSettings(): recent folders save " - "failed with error 0x%lx\n", saveError)); + "failed with error 0x%" B_PRIx32 "\n", saveError)); } saveError = fRecentApps.Save(file); if (saveError) { D(PRINT("TRoster::_SaveRosterSettings(): recent folders save " - "failed with error 0x%lx\n", saveError)); + "failed with error 0x%" B_PRIx32 "\n", saveError)); } fclose(file); [ *** diff truncated: 17 lines dropped *** ] ############################################################################ Commit: 911821275aa1ab1f7b030050a9878b69de15beec URL: http://cgit.haiku-os.org/haiku/commit/?id=9118212 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Sun Jun 1 23:46:25 2014 UTC Increase HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET for debug builds. ---------------------------------------------------------------------------- ############################################################################ Revision: hrev47296 Commit: d527dbc8f6469f534abdeca2bf9441998cce22f8 URL: http://cgit.haiku-os.org/haiku/commit/?id=d527dbc Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Sun Jun 1 23:59:16 2014 UTC Avoid unwanted output of <build>unzip with DEBUG=1. ----------------------------------------------------------------------------