From korli at users.berlios.de Thu Oct 1 00:07:59 2009 From: korli at users.berlios.de (=?ISO-8859-1?B?Suly9G1lIER1dmFs?=) Date: Thu, 1 Oct 2009 00:07:59 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: 2009/9/30 PulkoMandy : > It depends on the application, actually. There are multiple aspects : > > -A very simple application will only make requests to the catalog when > opening its window, so the catalog may be dropped after that. > -Some applications (for example a script interpreter) will want to use > other catalogs (the one of the interpreted script) and not only their own > one. > -Every application should handle the "Locale Changed" message broadcasted > by the locale kit and update its own catalog dynamically. Or maybe that's > just a bit overkill :) > > What other solution do you suggest, in order not to leak the be_catalog in > any case and be able to use it as needed ? > GSoC is finished now, I'd be happy if other people started to improve the > code of the locale kit. I'm sure you can help :) Well you did a good job. I'm just giving suggestions. Why not deleting be_catalog in the be_locale destructor ? BLocale::GetAppCatalog could also accept a NULL argument. Bye, J?r?me From dev at m-phasis.de Thu Oct 1 00:09:28 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Thu, 1 Oct 2009 00:09:28 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: 2009/9/30 PulkoMandy : > What other solution do you suggest, in order not to leak the be_catalog in > any case and be able to use it as needed ? > GSoC is finished now, I'd be happy if other people started to improve the > code of the locale kit. I'm sure you can help :) In expectation that might be utterly wrong: :) Index: src/kits/locale/Locale.cpp =================================================================== --- src/kits/locale/Locale.cpp (revision 33370) +++ src/kits/locale/Locale.cpp (working copy) @@ -24,6 +24,8 @@ BLocale::~BLocale() { + delete be_app_catalog; + delete be_catalog; } @@ -46,9 +48,7 @@ status_t BLocale::GetAppCatalog(BCatalog *catalog) { - if (!catalog) - return B_BAD_VALUE; if (be_catalog) debugger( "GetAppCatalog() has been called while be_catalog != NULL"); - return BCatalog::GetAppCatalog(catalog); + return BCatalog::GetAppCatalog(catalog ? catalog : new BCatalog); } Allows for be_locale->GetAppCatalog(NULL); and makes sure the be_[app_]catalog are being freed when my printfs() didn't fool me. Whenever the locale changes, call GetAppCatalog again and work with be_[app_]catalog? Michael From mattmadia at gmail.com Thu Oct 1 00:49:07 2009 From: mattmadia at gmail.com (mattmadia at gmail.com) Date: Wed, 30 Sep 2009 15:49:07 -0700 (PDT) Subject: [Haiku-commits] BOM: r33375 ...failed C++ /objects/haiku/_arch_/release/preferences/appearance/APRMain.o ... Message-ID: <4ac3e063.0707d00a.4ecb.317b@mx.google.com> Host Machine : FreeBSD 7.2-RELEASE-p2 i386 Host Machine 32|64bit : 32bit use-xattr : True use-32bit : False Architectures Tested : x86gcc2 x86gcc4 x86gcc2hybrid x86gcc4hybrid Targets Affected & Last Known Good Revision : | | x86gcc4:@nightly-cd:33371 x86gcc4:@nightly-raw:33371 x86gcc4:@nightly-vmware:33371 x86gcc4hybrid:@nightly-cd:33371 x86gcc4hybrid:@nightly-raw:33371 x86gcc4hybrid:@nightly-vmware:33371 x86gcc2:@nightly-cd:33371 x86gcc2:@nightly-raw:33371 x86gcc2:@nightly-vmware:33371 x86gcc2hybrid:@nightly-cd:33371 x86gcc2hybrid:@nightly-raw:33371 x86gcc2hybrid:@nightly-vmware:33371 Log Snippet : AddTargetVariableToScript1 /storage/BOM/haiku/haiku/generated.x86gcc4/haiku.image-init-vars AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/etc/locale/catalogs/x-vnd.Haiku-Appearance AddTargetVariableToScript1 /storage/BOM/haiku/haiku/generated.x86gcc4/haiku.image-init-vars AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/etc/locale/catalogs/x-vnd.Haiku-BluetoothPrefs C++ /storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/preferences/appearance/APRMain.o AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/etc/locale/catalogs/x-vnd.Haiku-CPUFrequencyPref AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/etc/locale/catalogs/x-vnd.Haiku-Locale AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/bus_managers In file included from /storage/BOM/haiku/haiku/src/preferences/appearance/APRMain.cpp:8: /storage/BOM/haiku/haiku/src/preferences/appearance/APRMain.h:23: error: 'BCatalog' does not name a type AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/busses/agp_gart /storage/BOM/haiku/haiku/src/preferences/appearance/APRMain.cpp: In constructor 'APRApplication::APRApplication()': /storage/BOM/haiku/haiku/src/preferences/appearance/APRMain.cpp:21: error: 'cat' was not declared in this scope AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/busses/ata AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/busses/scsi AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/busses/usb AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/console /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/bin/i586-pc-haiku-gcc -c "/storage/BOM/haiku/haiku/src/preferences/appearance/APRMain.cpp" -O -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -pipe -fno-strict-aliasing -fno-tree-vrp -nostdinc -Wno-deprecated -DHAIKU_INCLUDE_PATENTED_CODE=0 -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -D__HAIKU__ -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -D__INTEL__ -DARCH_x86 -DBOOT_ARCHIVE_IMAGE_OFFSET=300 -DHAIKU_TARGET_PLATFORM_HAIKU -iquote /storage/BOM/haiku/haiku/build/user_config_headers -iquote /storage/BOM/haiku/haiku/build/config_headers -iquote /storage/BOM/haiku/haiku/src/preferences/appearance -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/common/preferences/appearance -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/freebsd/x86/common/preferences/appearance -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/common/preferences/appearance -I /storage/BOM/haiku/haiku/headers/private/app -I /storage/BOM/haiku/haiku/headers/private/servers/app -I /storage/BOM/haiku/haiku/headers/libs/freetype2 -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3 -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/i586-pc-haiku -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/backward -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/ext -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/include -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/include-fixed -I /storage/BOM/haiku/haiku/headers -I /storage/BOM/haiku/haiku/headers/posix -I /storage/BOM/haiku/haiku/headers/glibc -I /storage/BOM/haiku/haiku/headers/os -I /storage/BOM/haiku/haiku/headers/os/add-ons -I /storage/BOM/haiku/haiku/headers/os/add-ons/file_system -I /storage/BOM/haiku/haiku/headers/os/add-ons/graphics -I /storage/BOM/haiku/haiku/headers/os/add-ons/input_server -I /storage/BOM/haiku/haiku/headers/os/add-ons/registrar -I /storage/BOM/haiku/haiku/headers/os/add-ons/screen_saver -I /storage/BOM/haiku/haiku/headers/os/add-ons/tracker -I /storage/BOM/haiku/haiku/headers/os/app -I /storage/BOM/haiku/haiku/headers/os/device -I /storage/BOM/haiku/haiku/headers/os/drivers -I /storage/BOM/haiku/haiku/headers/os/game -I /storage/BOM/haiku/haiku/headers/os/interface -I /storage/BOM/haiku/haiku/headers/os/kernel -I /storage/BOM/haiku/haiku/headers/os/locale -I /storage/BOM/haiku/haiku/headers/os/media -I /storage/BOM/haiku/haiku/headers/os/mail -I /storage/BOM/haiku/haiku/headers/os/midi -I /storage/BOM/haiku/haiku/headers/os/midi2 -I /storage/BOM/haiku/haiku/headers/os/net -I /storage/BOM/haiku/haiku/headers/os/opengl -I /storage/BOM/haiku/haiku/headers/os/storage -I /storage/BOM/haiku/haiku/headers/os/support -I /storage/BOM/haiku/haiku/headers/os/translation -I /storage/BOM/haiku/haiku/headers/private/. -o "/storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/preferences/appearance/APRMain.o" ; ...failed C++ /storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/preferences/appearance/APRMain.o ... ...skipped Appearance for lack of APRMain.o... ...skipped haiku.image-copy-files-dummy-system/preferences for lack of Appearance... AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/debugger AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/file_systems AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/generic AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/partitioning_systems AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/cpu AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/disk/scsi AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/power AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/bin AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/console AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/dprintf AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/keyboard AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/null AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/random AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/tty AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/zero AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/auich AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/auvia AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/echo3g AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/emuxki AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/hda AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/midi/emuxki AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/midi/usb_midi AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/bus/usb_raw AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/bus/fw_raw AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/floppy/pc_floppy AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/usb/usb_disk AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/virtual/nbd AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/dvb/cx23882 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/radeon AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/nvidia AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/neomagic AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/matrox AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/intel_extreme AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/s3 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/vesa AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/ati AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/ps2_hid AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/usb_hid AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/wacom AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/poke AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/test AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/mem AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/3com AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/broadcom440x AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/broadcom570x AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/etherpci AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/ipro1000 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/pegasus AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/rtl8139 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/rtl8169 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/rtl81xx AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/sis900 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/via_rhine AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/wb840 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/ipro100 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/nforce AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/marvell_yukon AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/syskonnect AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/attansic_l1 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/attansic_l2 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/ar81xx AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/usb_ecm AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/usb_asix AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/lib AddSymlinkToContainerCopyFilesScript system/lib/libGLU.so AddSymlinkToContainerCopyFilesScript system/lib/libglut.so AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/servers AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/bin AddSymlinkToContainerCopyFilesScript system/bin/sh AddSymlinkToContainerCopyFilesScript system/bin/untrash AddSymlinkToContainerCopyFilesScript system/bin/bunzip2 AddSymlinkToContainerCopyFilesScript system/bin/more AddSymlinkToContainerCopyFilesScript system/bin/gunzip AddSymlinkToContainerCopyFilesScript system/bin/zcat AddSymlinkToContainerCopyFilesScript system/bin/zcmp AddSymlinkToContainerCopyFilesScript system/bin/zipinfo AddSymlinkToContainerCopyFilesScript system/bin/awk ...on 100th target... AddSymlinkToContainerCopyFilesScript system/bin/egrep AddSymlinkToContainerCopyFilesScript system/bin/fgrep AddSymlinkToContainerCopyFilesScript system/bin/vi AddSymlinkToContainerCopyFilesScript system/bin/view AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/apps ...skipped haiku-nightly.vmdk for lack of haiku.image-copy-files... ...failed updating 1 target(s)... ...skipped 3 target(s)... ...updated 103 target(s)... command: jam -q -j2 @nightly-vmware From kirilla at mail.berlios.de Thu Oct 1 01:32:42 2009 From: kirilla at mail.berlios.de (kirilla at BerliOS) Date: Thu, 1 Oct 2009 01:32:42 +0200 Subject: [Haiku-commits] r33377 - haiku/trunk/src/apps/deskbar Message-ID: <200909302332.n8UNWgnG027045@sheep.berlios.de> Author: kirilla Date: 2009-10-01 01:32:37 +0200 (Thu, 01 Oct 2009) New Revision: 33377 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33377&view=rev Modified: haiku/trunk/src/apps/deskbar/BarApp.cpp haiku/trunk/src/apps/deskbar/BarApp.h haiku/trunk/src/apps/deskbar/BarMenuBar.cpp haiku/trunk/src/apps/deskbar/BarMenuBar.h haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp haiku/trunk/src/apps/deskbar/BarView.cpp haiku/trunk/src/apps/deskbar/BarView.h haiku/trunk/src/apps/deskbar/BarWindow.cpp haiku/trunk/src/apps/deskbar/BarWindow.h haiku/trunk/src/apps/deskbar/BeMenu.cpp haiku/trunk/src/apps/deskbar/BeMenu.h haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp haiku/trunk/src/apps/deskbar/CalendarMenuItem.h haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp haiku/trunk/src/apps/deskbar/DeskBarUtils.h haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp haiku/trunk/src/apps/deskbar/ExpandoMenuBar.h haiku/trunk/src/apps/deskbar/Jamfile haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp haiku/trunk/src/apps/deskbar/ResourceSet.cpp haiku/trunk/src/apps/deskbar/ResourceSet.h haiku/trunk/src/apps/deskbar/ShowHideMenuItem.cpp haiku/trunk/src/apps/deskbar/StatusView.cpp haiku/trunk/src/apps/deskbar/StatusViewShelf.cpp haiku/trunk/src/apps/deskbar/StatusViewShelf.h haiku/trunk/src/apps/deskbar/Switcher.cpp haiku/trunk/src/apps/deskbar/Switcher.h haiku/trunk/src/apps/deskbar/TeamMenu.cpp haiku/trunk/src/apps/deskbar/TeamMenu.h haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp haiku/trunk/src/apps/deskbar/TeamMenuItem.h haiku/trunk/src/apps/deskbar/TimeView.cpp haiku/trunk/src/apps/deskbar/TimeView.h haiku/trunk/src/apps/deskbar/WindowMenu.cpp haiku/trunk/src/apps/deskbar/WindowMenu.h haiku/trunk/src/apps/deskbar/WindowMenuItem.h haiku/trunk/src/apps/deskbar/icons.h Log: Removing ifdefs and code for non-Haiku build targets. Partial clean-up. Enforcing the 80-char limit, renaming constants, newline at end of file. Modified: haiku/trunk/src/apps/deskbar/BarApp.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarApp.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarApp.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -46,11 +46,8 @@ #include #include #include +#include -#if __HAIKU__ -# include -#endif - #include "icons.h" #include "tracker_private.h" #include "BarApp.h" @@ -65,9 +62,6 @@ #include "WindowMenuItem.h" -// private Be API -extern void __set_window_decor(int32 theme); - BLocker TBarApp::sSubscriberLock; BList TBarApp::sBarTeamInfoList; BList TBarApp::sSubscribers; @@ -78,14 +72,9 @@ const BRect kIconSize(0.0f, 0.0f, 15.0f, 15.0f); -#if __HAIKU__ - static const color_space kIconFormat = B_RGBA32; -#else - static const color_space kIconFormat = B_CMAP8; -#endif +static const color_space kIconFormat = B_RGBA32; - int main() { @@ -104,9 +93,7 @@ InitSettings(); InitIconPreloader(); -#ifdef __HAIKU__ be_roster->StartWatching(this); -#endif sBarTeamInfoList.MakeEmpty(); @@ -139,9 +126,7 @@ TBarApp::~TBarApp() { -#ifdef __HAIKU__ be_roster->StopWatching(this); -#endif int32 teamCount = sBarTeamInfoList.CountItems(); for (int32 i = 0; i < teamCount; i++) { @@ -285,7 +270,8 @@ fSettingsFile->Read(&settings.timeShowMil, sizeof(bool)); } if (size >= kValidSettingsSize5) - fSettingsFile->Read(&settings.recentFoldersCount, sizeof(int32)); + fSettingsFile->Read(&settings.recentFoldersCount, + sizeof(int32)); if (size >= kValidSettingsSize6) { fSettingsFile->Read(&settings.timeShowEuro, sizeof(bool)); fSettingsFile->Read(&settings.alwaysOnTop, sizeof(bool)); @@ -391,22 +377,6 @@ fStatusViewMessenger.SendMessage(message); break; - case kBe: - __set_window_decor(0); - break; - - case kWin95: - __set_window_decor(2); - break; - - case kAmiga: - __set_window_decor(1); - break; - - case kMac: - __set_window_decor(3); - break; - case kToggleDraggers: if (BDragger::AreDraggersDrawn()) BDragger::HideAllDraggers(); @@ -488,14 +458,14 @@ fSwitcherMessenger.SendMessage(message); break; -#if __HAIKU__ - case CMD_SUSPEND_SYSTEM: + case kSuspendSystem: + // TODO: Call BRoster? break; - case CMD_REBOOT_SYSTEM: - case CMD_SHUTDOWN_SYSTEM: + case kRebootSystem: + case kShutdownSystem: { - bool reboot = (message->what == CMD_REBOOT_SYSTEM); + bool reboot = (message->what == kRebootSystem); bool confirm; message->FindBool("confirm", &confirm); @@ -507,14 +477,9 @@ break; } -#endif // __HAIKU__ - // in case Tracker is not running - case kShowSplash: -#ifdef B_BEOS_VERSION_5 run_be_about(); -#endif break; default: @@ -524,11 +489,6 @@ } -/** In case Tracker is not running, the TBeMenu will use us as a target. - * We'll make sure the user won't be completely confused and take over - * Tracker's duties until it's back. - */ - void TBarApp::RefsReceived(BMessage* refs) { @@ -739,4 +699,3 @@ free(name); } - Modified: haiku/trunk/src/apps/deskbar/BarApp.h =================================================================== --- haiku/trunk/src/apps/deskbar/BarApp.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarApp.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -81,9 +81,9 @@ const uint32 kAutoRaise = 'AtRs'; // from roster_private.h -const uint32 CMD_SHUTDOWN_SYSTEM = 301; -const uint32 CMD_REBOOT_SYSTEM = 302; -const uint32 CMD_SUSPEND_SYSTEM = 304; +const uint32 kShutdownSystem = 301; +const uint32 kRebootSystem = 302; +const uint32 kSuspendSystem = 304; /* --------------------------------------------- */ @@ -117,7 +117,8 @@ // the following structures are defined to compute // valid sizes for "struct desk_settings" -const uint32 kValidSettingsSize1 = 5 * sizeof(bool) + sizeof(uint32) + sizeof(float); +const uint32 kValidSettingsSize1 = 5 * sizeof(bool) + sizeof(uint32) + + sizeof(float); const uint32 kValidSettingsSize2 = sizeof(BPoint) + kValidSettingsSize1; const uint32 kValidSettingsSize3 = 2 * sizeof(int32) + kValidSettingsSize2; const uint32 kValidSettingsSize4 = 2 * sizeof(bool) + kValidSettingsSize3; Modified: haiku/trunk/src/apps/deskbar/BarMenuBar.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarMenuBar.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarMenuBar.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -201,3 +201,4 @@ if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both)) init_tracking_hook(fAppListMenuItem, hookFunction, state); } + Modified: haiku/trunk/src/apps/deskbar/BarMenuBar.h =================================================================== --- haiku/trunk/src/apps/deskbar/BarMenuBar.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarMenuBar.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -51,7 +51,8 @@ TBarMenuBar(TBarView* bar, BRect frame, const char* name); virtual ~TBarMenuBar(); - virtual void MouseMoved(BPoint where, uint32 code, const BMessage* message); + virtual void MouseMoved(BPoint where, uint32 code, + const BMessage* message); virtual void Draw(BRect); void DrawBackground(BRect); Modified: haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -120,8 +120,9 @@ if (fIcon != NULL) { BRect dstRect(fIcon->Bounds()); dstRect.OffsetTo(frame.LeftTop()); - dstRect.OffsetBy(rintf(((frame.Width() - dstRect.Width()) / 2) - 1.0f), - rintf(((frame.Height() - dstRect.Height()) / 2) - 0.0f)); + dstRect.OffsetBy(rintf(((frame.Width() - dstRect.Width()) / 2) + - 1.0f), rintf(((frame.Height() - dstRect.Height()) / 2) + - 0.0f)); menu->DrawBitmapAsync(fIcon, dstRect); } @@ -206,3 +207,4 @@ return BMenuItem::Invoke(message); } + Modified: haiku/trunk/src/apps/deskbar/BarView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarView.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarView.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -407,7 +407,8 @@ settings->showTime = ShowingClock(); fReplicantTray->RememberClockSettings(); - settings->alwaysOnTop = (Window()->Feel() & B_FLOATING_ALL_WINDOW_FEEL) != 0; + settings->alwaysOnTop = (Window()->Feel() & B_FLOATING_ALL_WINDOW_FEEL) + != 0; } @@ -447,12 +448,14 @@ // We need to keep track of what apps are expanded. BList expandedItems; BString* signature = NULL; - if (fVertical && Expando() && static_cast(be_app)->Settings()->superExpando) { - // Get a list of the Signatures of expanded apps - Can't use team_id because - // there can be more than one team per application + if (fVertical && Expando() + && static_cast(be_app)->Settings()->superExpando) { + // Get a list of the signatures of expanded apps. Can't use + // team_id because there can be more than one team per application if (fVertical && Expando() && vertical && fExpando) { for (int index = 0; index < fExpando->CountItems(); index++) { - TTeamMenuItem* item = dynamic_cast(fExpando->ItemAt(index)); + TTeamMenuItem* item + = dynamic_cast(fExpando->ItemAt(index)); if (item != NULL && item->IsExpanded()) { signature = new BString(item->Signature()); expandedItems.AddItem((void*)signature); @@ -476,7 +479,8 @@ // Start at the 'bottom' of the list working up. // Prevents being thrown off by expanding items. for (int teamIndex = fExpando->CountItems(); teamIndex-- > 0;) { - TTeamMenuItem* item = dynamic_cast(fExpando->ItemAt(teamIndex)); + TTeamMenuItem* item + = dynamic_cast(fExpando->ItemAt(teamIndex)); if (item != NULL && !signature->Compare(item->Signature())) { item->ToggleExpandState(false); break; @@ -661,7 +665,8 @@ menu->ConvertToScreen(&location); if (barview->LockLooper()) { TExpandoMenuBar* expando = barview->ExpandoMenuBar(); - TBeMenu* bemenu = (dynamic_cast(barview->Window()))->BeMenu(); + TBeMenu* bemenu + = (dynamic_cast(barview->Window()))->BeMenu(); if (bemenu && bemenu->LockLooper()) { bemenu->ConvertFromScreen(&location); @@ -929,8 +934,10 @@ TBarView::OffsetIconFrame(BRect rect) const { BRect frame(Frame()); - frame.left += fDragRegion->Frame().left + fReplicantTray->Frame().left + rect.left; - frame.top += fDragRegion->Frame().top + fReplicantTray->Frame().top + rect.top; + frame.left += fDragRegion->Frame().left + fReplicantTray->Frame().left + + rect.left; + frame.top += fDragRegion->Frame().top + fReplicantTray->Frame().top + + rect.top; frame.right = frame.left + rect.Width(); frame.bottom = frame.top + rect.Height(); Modified: haiku/trunk/src/apps/deskbar/BarView.h =================================================================== --- haiku/trunk/src/apps/deskbar/BarView.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarView.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -127,7 +127,8 @@ BRect IconFrame(int32 id) const; BRect IconFrame(const char* name) const; - void GetPreferredWindowSize(BRect screenFrame, float* width, float* height); + void GetPreferredWindowSize(BRect screenFrame, float* width, + float* height); void SizeWindow(BRect screenFrame); void PositionWindow(BRect screenFrame); @@ -206,3 +207,4 @@ } #endif /* BARVIEW_H */ + Modified: haiku/trunk/src/apps/deskbar/BarWindow.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarWindow.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -529,7 +529,8 @@ } else if (message->FindRef("addon", &ref) == B_OK) { // // exposing the name of the view here is not so great - TReplicantTray* tray = dynamic_cast(FindView("Status")); + TReplicantTray* tray + = dynamic_cast(FindView("Status")); if (tray) { // Force this into the deskbar even if the security code is wrong // This is OK because the user specifically asked for this replicant @@ -590,3 +591,4 @@ reply.AddRect("frame", frame); message->SendReply(&reply); } + Modified: haiku/trunk/src/apps/deskbar/BarWindow.h =================================================================== --- haiku/trunk/src/apps/deskbar/BarWindow.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BarWindow.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -64,7 +64,8 @@ void GetLocation(BMessage*); deskbar_location DeskbarLocation() const; void SetLocation(BMessage*); - void SetDeskbarLocation(deskbar_location location, bool expand); + void SetDeskbarLocation(deskbar_location location, + bool expand); void IsExpanded(BMessage*); void Expand(BMessage*); @@ -85,3 +86,4 @@ }; #endif /* BAR_WINDOW_H */ + Modified: haiku/trunk/src/apps/deskbar/BeMenu.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BeMenu.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BeMenu.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -51,10 +51,6 @@ #define ROSTER_SIG "application/x-vnd.Be-ROST" -#ifdef B_BEOS_VERSION_5 -void run_be_about(); -#endif - #ifdef MOUNT_MENU_IN_DESKBAR class DeskbarMountMenu : public BPrivate::MountMenu { @@ -153,14 +149,18 @@ TrackingHookData* data = fBarView->GetTrackingHookData(); if (fAddState == kAddingRecents) { - const char* recentTitle[] = {"Recent Documents", "Recent Folders", "Recent Applications"}; - const int recentType[] = {kRecentDocuments, kRecentFolders, kRecentApplications}; + const char* recentTitle[] = {"Recent Documents", "Recent Folders", + "Recent Applications"}; + const int recentType[] = {kRecentDocuments, kRecentFolders, + kRecentApplications}; const int recentTypes = 3; TRecentsMenu* recentItem[recentTypes]; int count = 0; for (int i = 0; i < recentTypes; i++) { - recentItem[i] = new TRecentsMenu(recentTitle[i], fBarView, recentType[i]); + recentItem[i] = new TRecentsMenu(recentTitle[i], fBarView, + recentType[i]); + if (recentItem[i]) count += recentItem[i]->RecentsCount(); } @@ -222,14 +222,10 @@ dragging = fBarView->Dragging(); BMenuItem* item = new BMenuItem( -#ifdef __HAIKU__ -# ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL - "About Haiku" -# else - "About This System" -# endif +#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL + "About Haiku" #else - "About BeOS" + "About This System" #endif B_UTF8_ELLIPSIS, new BMessage(kShowSplash)); item->SetEnabled(!dragging); @@ -260,67 +256,31 @@ item->SetTarget(be_app); AddItem(item); -#ifndef __HAIKU__ - if ((modifiers() & (B_LEFT_SHIFT_KEY|B_LEFT_CONTROL_KEY|B_LEFT_COMMAND_KEY)) - == (B_LEFT_SHIFT_KEY|B_LEFT_CONTROL_KEY|B_LEFT_COMMAND_KEY)) { - subMenu = new BMenu("Window Decor"); - subMenu->SetEnabled(!dragging); - - item = new BMenuItem("BeOS", new BMessage(kBe)); - item->SetTarget(be_app); - item->SetEnabled(!dragging); - subMenu->AddItem(item); - - item = new BMenuItem("AmigaOS", new BMessage(kAmiga)); - item->SetTarget(be_app); - item->SetEnabled(!dragging); - subMenu->AddItem(item); - - item = new BMenuItem("MacOS 8", new BMessage(kMac)); - item->SetTarget(be_app); - item->SetEnabled(!dragging); - subMenu->AddItem(item); - - item = new BMenuItem("Windows 95/98", new BMessage(kWin95)); - item->SetTarget(be_app); - item->SetEnabled(!dragging); - subMenu->AddItem(item); - - subMenu->SetFont(be_plain_font); - AddItem(subMenu); - }; -#endif - AddSeparatorItem(); BMenu* shutdownMenu = new BMenu("Shutdown" B_UTF8_ELLIPSIS); - item = new BMenuItem("Restart System", new BMessage(CMD_REBOOT_SYSTEM)); + item = new BMenuItem("Restart System", new BMessage(kRebootSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item); #ifdef APM_SUPPORT if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) { - item = new BMenuItem("Suspend", new BMessage(CMD_SUSPEND_SYSTEM)); + item = new BMenuItem("Suspend", new BMessage(kSuspendSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item); } #endif - item = new BMenuItem("Power Off", new BMessage(CMD_SHUTDOWN_SYSTEM)); + item = new BMenuItem("Power Off", new BMessage(kShutdownSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item); shutdownMenu->SetFont(be_plain_font); -#ifdef __HAIKU__ shutdownMenu->SetTargetForItems(be_app); - BMessage* message = new BMessage(CMD_SHUTDOWN_SYSTEM); + BMessage* message = new BMessage(kShutdownSystem); message->AddBool("confirm", true); AddItem(new BMenuItem(shutdownMenu, message)); -#else - shutdownMenu->SetTargetForItems(BMessenger(ROSTER_SIG)); - AddItem(shutdownMenu); -#endif fAddState = kAddingRecents; @@ -363,38 +323,22 @@ if (item->Message()) { switch (item->Message()->what) { - case kShowSplash: -#ifdef B_BEOS_VERSION_5 - // about box in libbe in BeOS R5 - item->SetTarget(be_app); -#endif - break; case kFindButton: - // about, find item->SetTarget(BMessenger(kTrackerSignature)); break; + case kShowSplash: case kToggleDraggers: case kConfigShow: case kAlwaysTop: - case kMsgShowSeconds: - case kMsgMilTime: - case kMsgEuroDate: - // show/hide replicants + case kShowSeconds: + case kMilTime: + case kEuroDate: + case kRebootSystem: + case kSuspendSystem: + case kShutdownSystem: item->SetTarget(be_app); break; - - case CMD_REBOOT_SYSTEM: - case CMD_SUSPEND_SYSTEM: - case CMD_SHUTDOWN_SYSTEM: - // Unreachable cases. - // See comment at start of method. -#ifdef __HAIKU__ - item->SetTarget(be_app); -#else - item->SetTarget(BMessenger(ROSTER_SIG)); -#endif - break; } } } @@ -533,7 +477,8 @@ roster.GetRecentApps(&fRecentList, count); break; case kRecentAppDocuments: - roster.GetRecentDocuments(&fRecentList, count, NULL, fSignature); + roster.GetRecentDocuments(&fRecentList, count, NULL, + fSignature); break; case kRecentFolders: roster.GetRecentFolders(&fRecentList, count); @@ -581,7 +526,8 @@ // avoid the creation of the submenu. if (doc.CountNames(B_REF_TYPE) > 0) { - // create recents menu that will contain the recent docs of this app + // create recents menu that will contain the recent docs of + // this app TRecentsMenu* docs = new TRecentsMenu(ref.name, fBarView, kRecentAppDocuments, signature, &ref); docs->SetTypesList(TypesList()); @@ -649,7 +595,7 @@ } -//******************************************************************************** +//***************************************************************************** // #pragma mark - @@ -673,3 +619,4 @@ } #endif + Modified: haiku/trunk/src/apps/deskbar/BeMenu.h =================================================================== --- haiku/trunk/src/apps/deskbar/BeMenu.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/BeMenu.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -121,3 +121,4 @@ }; #endif /* _BE_MENU_H_ */ + Modified: haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -1,6 +1,6 @@ /* - * Copyright 2005-2006, Axel D?rfler, axeld at pinc-software.de. All rights reserved. - * Distributed under the terms of the MIT License. + * Copyright 2005-2006, Axel D?rfler, axeld at pinc-software.de. + * All rights reserved. Distributed under the terms of the MIT License. */ @@ -13,8 +13,9 @@ #include -static const int32 kDaysPerMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - // Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec +static const int32 kDaysPerMonth[] + = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + // Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec static const int32 kTitleFontSize = 9; @@ -70,7 +71,8 @@ Menu()->PushState(); Menu()->SetOrigin(ContentLocation()); - rgb_color todayBackgroundColor = tint_color(Menu()->LowColor(), B_LIGHTEN_2_TINT); + rgb_color todayBackgroundColor = tint_color(Menu()->LowColor(), + B_LIGHTEN_2_TINT); rgb_color dayColor = tint_color(Menu()->HighColor(), B_DARKEN_2_TINT); rgb_color titleColor = Menu()->HighColor(); @@ -85,7 +87,8 @@ char text[64]; strftime(text, sizeof(text), "%B, %Y", &tm); float width = Menu()->StringWidth(text); - Menu()->DrawString(text, BPoint((fColumnWidth * 7 - width) / 2, fTitleHeight)); + Menu()->DrawString(text, BPoint((fColumnWidth * 7 - width) / 2, + fTitleHeight)); // Draw weekdays @@ -93,8 +96,8 @@ strftime(text, sizeof(text), "%a", &tm); width = Menu()->StringWidth(text); - Menu()->DrawString(text, BPoint(fColumnWidth * tm.tm_wday + (fColumnWidth - width) / 2, - 2 * fTitleHeight + kTitleGap)); + Menu()->DrawString(text, BPoint(fColumnWidth * tm.tm_wday + + (fColumnWidth - width) / 2, 2 * fTitleHeight + kTitleGap)); } // Draw days @@ -156,11 +159,13 @@ font.SetSize(kTitleFontSize); font_height fontHeight; font.GetHeight(&fontHeight); - fTitleHeight = ceilf(fontHeight.ascent + fontHeight.descent + fontHeight.leading); + fTitleHeight = ceilf(fontHeight.ascent + fontHeight.descent + + fontHeight.leading); font = be_plain_font; font.GetHeight(&fontHeight); - fRowHeight = ceilf(fontHeight.ascent + fontHeight.descent + fontHeight.leading + kRowGap); + fRowHeight = ceilf(fontHeight.ascent + fontHeight.descent + + fontHeight.leading + kRowGap); fFontHeight = ceilf(fontHeight.ascent); fColumnWidth = font.StringWidth("99") + kColumnGap; @@ -174,3 +179,4 @@ } #endif // _SHOW_CALENDAR_MENU_ITEM + Modified: haiku/trunk/src/apps/deskbar/CalendarMenuItem.h =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuItem.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/CalendarMenuItem.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -23,3 +23,4 @@ }; #endif /* CALENDAR_MENU_ITEM_H */ + Modified: haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -78,13 +78,14 @@ CalendarMenuWindow::CalendarMenuWindow(BPoint where, bool euroDate) - : BWindow(BRect(0.0, 0.0, 100.0, 130.0), "", B_BORDERED_WINDOW, - B_AUTO_UPDATE_SIZE_LIMITS | B_ASYNCHRONOUS_CONTROLS | B_CLOSE_ON_ESCAPE | - B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE), - fYearLabel(NULL), - fMonthLabel(NULL), - fCalendarView(NULL), - fSuppressFirstClose(true) + : + BWindow(BRect(0.0, 0.0, 100.0, 130.0), "", B_BORDERED_WINDOW, + B_AUTO_UPDATE_SIZE_LIMITS | B_ASYNCHRONOUS_CONTROLS | B_CLOSE_ON_ESCAPE + | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE), + fYearLabel(NULL), + fMonthLabel(NULL), + fCalendarView(NULL), + fSuppressFirstClose(true) { RemoveShortcut('H', B_COMMAND_KEY | B_CONTROL_KEY); AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED)); @@ -262,3 +263,4 @@ return button; } + Modified: haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -43,3 +43,4 @@ #endif // _CALENDAR_MENU_WINDOW_H_ + Modified: haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -52,22 +53,6 @@ #include "DeskBarUtils.h" #include "ExpandoMenuBar.h" -const char* const kBePath = "/boot/home/config/be"; - -BFilePanel* -AskForRefLocation(BMessenger* target) -{ - entry_ref startRef; - get_ref_for_path(kBePath, &startRef); - - BFilePanel* fp = new BFilePanel(B_OPEN_PANEL, target, &startRef, - B_DIRECTORY_NODE | B_FILE_NODE, - false, new BMessage(msg_be_container)); - fp->Show(); - - return fp; -} - void AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory) { @@ -98,8 +83,12 @@ return; dir.SetTo(&ref); - } else - dir.SetTo(kBePath); + } else { + if (find_directory(B_USER_DESKBAR_DIRECTORY, &path) == B_OK) + dir.SetTo(path.Path()); + else + return; + } for (long i = 0; i < count; i++) { if (m->FindRef("refs", i, &ref) == B_NO_ERROR) { @@ -113,77 +102,3 @@ } } -bool -SignatureForRef(const entry_ref* ref, char* signature) -{ - BEntry entry(ref, true); - if (entry.InitCheck()==B_OK && entry.Exists()) { - if (entry.IsFile()) { - BFile file(&entry, O_RDWR); - BAppFileInfo finfo(&file); - - finfo.GetSignature(signature); - - return true; - } - } - return false; -} - -void -CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} - -float -FontHeight(const BFont* font, bool full) -{ - font_height finfo; - font->GetHeight(&finfo); - float h = finfo.ascent + finfo.descent; - - if (full) - h += finfo.leading; - - return h; -} - -#ifdef LOG -const char* const kLogPath = "/boot/home/"; -const char* const kLogFile = "deskbar_log"; -void -AddToLog(const char* str) -{ - if (!str) - return; - -// BFile file; -// BDirectory dir(kLogPath); -// if (!dir.Contains(kLogFile)) -// dir.CreateFile(kLogFile, &file); -// else { -// BEntry entry; -// dir.FindEntry(kLogFile, &entry); -// file.SetTo(&entry, O_RDWR); -// } -// -// if (file.InitCheck() != B_OK) -// printf("Deskbar Log: can't add to log\n"); -// -// off_t size; -// file.GetSize(&size); -// file.WriteAt(size, str, strlen(str)); - - char dstr[B_PATH_NAME_LENGTH+1024]; - sprintf(dstr, "Deskbar: %s\n", str); -// printf("%s\n", str); - SERIAL_PRINT((dstr)); -} -#endif Modified: haiku/trunk/src/apps/deskbar/DeskBarUtils.h =================================================================== --- haiku/trunk/src/apps/deskbar/DeskBarUtils.h 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/DeskBarUtils.h 2009-09-30 23:32:37 UTC (rev 33377) @@ -37,22 +37,9 @@ #include "tracker_private.h" -class BFilePanel; -enum { - msg_be_container -}; - -BFilePanel* AskForRefLocation(BMessenger* target); void AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory); -bool SignatureForRef(const entry_ref* ref, char* signature); -void CenterWindowOnScreen(BWindow* w); -float FontHeight(const BFont* font, bool full); - -#ifdef LOG -void AddToLog(const char*); -#endif - #endif /* DB_UTILS_H */ + Modified: haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp 2009-09-30 21:44:53 UTC (rev 33376) +++ haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp 2009-09-30 23:32:37 UTC (rev 33377) @@ -61,8 +61,8 @@ const float kDefaultBeMenuWidth = 50.0f; const float kSepItemWidth = 5.0f; -const uint32 M_MINIMIZE_TEAM = 'mntm'; -const uint32 M_BRING_TEAM_TO_FRONT = 'bftm'; +const uint32 kMinimizeTeam = 'mntm'; +const uint32 kBringTeamToFront = 'bftm'; bool TExpandoMenuBar::sDoMonitor = false; @@ -263,7 +263,7 @@ break; } - case M_MINIMIZE_TEAM: + case kMinimizeTeam: { index = message->FindInt32("itemIndex"); item = dynamic_cast(ItemAt(index)); @@ -277,7 +277,7 @@ break; } - case M_BRING_TEAM_TO_FRONT: + case kBringTeamToFront: { index = message->FindInt32("itemIndex"); item = dynamic_cast(ItemAt(index)); @@ -343,7 +343,7 @@ if (fLastClickItem == i && clickSpeed > system_time() - fLastClickTime) { // bring this team's window to the front - BMessage showMessage(M_BRING_TEAM_TO_FRONT); + BMessage showMessage(kBringTeamToFront); showMessage.AddInt32("itemIndex", i); Window()->PostMessage(&showMessage, this); return; @@ -366,7 +366,7 @@ if (item != NULL) { // show/hide item's teams BMessage showMessage((modifiers & B_SHIFT_KEY) != 0 - ? M_MINIMIZE_TEAM : M_BRING_TEAM_TO_FRONT); + ? kMinimizeTeam : kBringTeamToFront); showMessage.AddInt32("itemIndex", IndexOf(item)); Window()->PostMessage(&showMessage, this); return; @@ -409,7 +409,8 @@ uint32 buttons; if (!(Window()->CurrentMessage()) - || Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons) < B_OK) + || Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons) + < B_OK) buttons = 0; if (buttons == 0) @@ -530,7 +531,8 @@ TExpandoMenuBar::AddTeam(BList* team, BBitmap* icon, char* name, char* signature) { - float itemWidth = fVertical ? fBarView->Bounds().Width() : sMinimumWindowWidth; + float itemWidth = fVertical ? fBarView->Bounds().Width() + : sMinimumWindowWidth; float itemHeight = -1.0f; desk_settings* settings = ((TBarApp*)be_app)->Settings(); @@ -615,10 +617,10 @@ RemoveItem(i); if (fVertical) { - // instead of resizing the window here and there in the code - // the resize method will be centered in one place - // thus, the same behavior (good or bad) will be used whereever - // window sizing is done + // instead of resizing the window here and there in the + // code the resize method will be centered in one place + // thus, the same behavior (good or bad) will be used + // whereever window sizing is done fBarView->SizeWindow(BScreen(Window()).Frame()); } else CheckItemSizes(-1); @@ -646,7 +648,8 @@ // in this case there are 2 extra items: // The Be Menu // The little separator item - fullWidth = fullWidth - (sMinimumWindowWidth * 2) + (fBeMenuWidth + kSepItemWidth); + fullWidth = fullWidth - (sMinimumWindowWidth * 2) + + (fBeMenuWidth + kSepItemWidth); width -= (fBeMenuWidth + kSepItemWidth); count -= 2; } @@ -730,7 +733,8 @@ StrokeLine(bounds.LeftTop(), bounds.RightTop()); StrokeLine(BPoint(bounds.left, bounds.top + 1), bounds.LeftBottom()); SetHighColor(hilite); - StrokeLine(BPoint(bounds.left + 1, bounds.bottom), bounds.RightBottom()); + StrokeLine(BPoint(bounds.left + 1, bounds.bottom), + bounds.RightBottom()); } } @@ -780,7 +784,8 @@ } } - // Perform SetTo() on all the items that still exist as well as add new items. + // Perform SetTo() on all the items that still exist as well as add + // new items. bool itemModified = false, resize = false; TTeamMenuItem* teamItem = NULL; @@ -813,7 +818,8 @@ if (item) { item->SetTo(wInfo->name, wInfo->server_token, wInfo->is_mini, - ((1 << current_workspace()) & wInfo->workspaces) != 0); + ((1 << current_workspace()) + & wInfo->workspaces) != 0); if (strcmp(wInfo->name, item->Label()) != 0) item->SetLabel(wInfo->name); @@ -824,8 +830,8 @@ // Add the item item = new TWindowMenuItem(wInfo->name, wInfo->server_token, wInfo->is_mini, - ((1 << current_workspace()) & wInfo->workspaces) != 0, - false); + ((1 << current_workspace()) + & wInfo->workspaces) != 0, false); item->ExpandedItem(true); teamMenu->AddItem(item, i + 1); resize = true; @@ -843,7 +849,8 @@ if (!teamMenu->SubmenuAt(i)){ item = static_cast(teamMenu->ItemAt(i)); if (item && item->RequiresUpdate()) { - item = static_cast(teamMenu->RemoveItem(i)); + item = static_cast [... truncated: 1066 lines follow ...] From kirilla at mail.berlios.de Thu Oct 1 02:03:01 2009 From: kirilla at mail.berlios.de (kirilla at BerliOS) Date: Thu, 1 Oct 2009 02:03:01 +0200 Subject: [Haiku-commits] r33378 - in haiku/trunk/src: apps/bootman apps/magnify apps/tv kits/tracker preferences/devices preferences/dun Message-ID: <200910010003.n91031q9016122@sheep.berlios.de> Author: kirilla Date: 2009-10-01 02:03:00 +0200 (Thu, 01 Oct 2009) New Revision: 33378 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33378&view=rev Modified: haiku/trunk/src/apps/bootman/BootManagerWindow.cpp haiku/trunk/src/apps/bootman/BootManagerWindow.h haiku/trunk/src/apps/magnify/Magnify.cpp haiku/trunk/src/apps/tv/MainWin.cpp haiku/trunk/src/apps/tv/MainWin.h haiku/trunk/src/kits/tracker/FavoritesConfig.cpp haiku/trunk/src/preferences/devices/ConfigurationWindow.cpp haiku/trunk/src/preferences/devices/DevicesWindow.cpp haiku/trunk/src/preferences/devices/DevicesWindows.h haiku/trunk/src/preferences/devices/ModemWindow.cpp haiku/trunk/src/preferences/devices/ResourceUsageWindow.cpp haiku/trunk/src/preferences/dun/ModemWindow.cpp haiku/trunk/src/preferences/dun/NewConnectionWindow.cpp Log: Standardizing on BWindow::CenterOnScreen() Modified: haiku/trunk/src/apps/bootman/BootManagerWindow.cpp =================================================================== --- haiku/trunk/src/apps/bootman/BootManagerWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/apps/bootman/BootManagerWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -35,7 +35,7 @@ AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED)); - _CenterWindow(); + CenterOnScreen(); } @@ -73,25 +73,3 @@ return true; } - -void -BootManagerWindow::_CenterWindow() -{ - BScreen screen(this); - if (!screen.IsValid()) - return; - - BRect frame = screen.Frame(); - BRect windowFrame = Frame(); - - float left = floor((frame.Width() - windowFrame.Width()) / 2); - float top = floor((frame.Height() - windowFrame.Height()) / 2); - - if (left < 20) - left = 20; - if (top < 20) - top = 20; - - MoveTo(left, top); -} - Modified: haiku/trunk/src/apps/bootman/BootManagerWindow.h =================================================================== --- haiku/trunk/src/apps/bootman/BootManagerWindow.h 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/apps/bootman/BootManagerWindow.h 2009-10-01 00:03:00 UTC (rev 33378) @@ -26,8 +26,6 @@ private: - void _CenterWindow(); - BootManagerController fController; WizardView* fWizardView; }; Modified: haiku/trunk/src/apps/magnify/Magnify.cpp =================================================================== --- haiku/trunk/src/apps/magnify/Magnify.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/apps/magnify/Magnify.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -103,19 +103,6 @@ static void -CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} - - -static void BoundsSelection(int32 incX, int32 incY, float* x, float* y, int32 xCount, int32 yCount) { @@ -473,7 +460,7 @@ } // if prefs dont yet exist or the window is not onscreen, center the window - CenterWindowOnScreen(this); + CenterOnScreen(); // set all the settings to defaults if we get here DONE: @@ -839,7 +826,7 @@ text->Insert(" option-arrow key - moves the mouse location 1 pixel at a time\n"); text->Insert(" x marks the selection - the current selection has an 'x' in it\n"); - CenterWindowOnScreen(w); + w->CenterOnScreen(); w->Show(); } Modified: haiku/trunk/src/apps/tv/MainWin.cpp =================================================================== --- haiku/trunk/src/apps/tv/MainWin.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/apps/tv/MainWin.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -133,7 +133,7 @@ VideoFormatChange(fSourceWidth, fSourceHeight, fWidthScale, fHeightScale); - CenterWindow(); + CenterOnScreen(); } @@ -1178,24 +1178,3 @@ } } - -void -MainWin::CenterWindow() -{ - BScreen screen(this); - if (!screen.IsValid()) - return; - - BRect frame = screen.Frame(); - BRect windowFrame = Frame(); - - float left = floor((frame.Width() - windowFrame.Width()) / 2); - float top = floor((frame.Height() - windowFrame.Height()) / 2); - - if (left < 20) - left = 20; - if (top < 20) - top = 20; - - MoveTo(left, top); -} Modified: haiku/trunk/src/apps/tv/MainWin.h =================================================================== --- haiku/trunk/src/apps/tv/MainWin.h 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/apps/tv/MainWin.h 2009-10-01 00:03:00 UTC (rev 33378) @@ -75,7 +75,6 @@ void ToggleNoBorder(); void ToggleNoMenu(); void ToggleNoBorderNoMenu(); - void CenterWindow(); void ShowContextMenu(const BPoint &screen_point); Modified: haiku/trunk/src/kits/tracker/FavoritesConfig.cpp =================================================================== --- haiku/trunk/src/kits/tracker/FavoritesConfig.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/kits/tracker/FavoritesConfig.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -219,13 +219,7 @@ void CenterWindowOnScreen(BWindow *window) { - BRect screenFrame = BScreen(B_MAIN_SCREEN_ID).Frame(); - BPoint point; - point.x = screenFrame.Width() / 2 - window->Bounds().Width() / 2; - point.y = screenFrame.Height() / 2 - window->Bounds().Height() / 2; - - if (screenFrame.Contains(point)) - window->MoveTo(point); + window->CenterOnScreen(); } @@ -264,7 +258,7 @@ MoveTo(-1024, -1024); Show(); AddParts(maxApps, maxDocs, maxFolders); - CenterWindowOnScreen(this); + CenterOnScreen(); Unlock(); AddShortcut('R', B_COMMAND_KEY, new BMessage(kRemove)); @@ -2219,7 +2213,7 @@ AddParts(initialtext); ResizeTo(Bounds().Width(), fCancelBtn->Frame().bottom + 10); Unlock(); - CenterWindowOnScreen(this); + CenterOnScreen(); } Modified: haiku/trunk/src/preferences/devices/ConfigurationWindow.cpp =================================================================== --- haiku/trunk/src/preferences/devices/ConfigurationWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/devices/ConfigurationWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -142,7 +142,7 @@ B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE|B_NOT_RESIZABLE), fItem(item) { - CenterWindowOnScreen(this); + CenterOnScreen(); fItem->SetWindow(this); InitWindow(); Modified: haiku/trunk/src/preferences/devices/DevicesWindow.cpp =================================================================== --- haiku/trunk/src/preferences/devices/DevicesWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/devices/DevicesWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -48,25 +48,11 @@ const uint32 SELECTION_CHANGED = 'slch'; -// CenterWindowOnScreen -- Centers the BWindow to the Current Screen -void CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} -// ---------------------------------------------------------------------------------------------------------- // - - // DevicesWindow - Constructor DevicesWindow::DevicesWindow(BRect frame) : BWindow (frame, "Devices", B_TITLED_WINDOW, B_NORMAL_WINDOW_FEEL , 0) { InitWindow(); - CenterWindowOnScreen(this); + CenterOnScreen(); // Load User Settings BPath path; Modified: haiku/trunk/src/preferences/devices/DevicesWindows.h =================================================================== --- haiku/trunk/src/preferences/devices/DevicesWindows.h 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/devices/DevicesWindows.h 2009-10-01 00:03:00 UTC (rev 33378) @@ -31,8 +31,6 @@ #define MODEM_ADDED 'moad' -void CenterWindowOnScreen(BWindow* w); - class ResourceUsageWindow : public BWindow { public: ResourceUsageWindow(BRect frame, BList &); Modified: haiku/trunk/src/preferences/devices/ModemWindow.cpp =================================================================== --- haiku/trunk/src/preferences/devices/ModemWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/devices/ModemWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -44,7 +44,7 @@ fMessenger(messenger) { InitWindow(); - CenterWindowOnScreen(this); + CenterOnScreen(); Show(); } // -------------------------------------------------------------------------------------------------- // Modified: haiku/trunk/src/preferences/devices/ResourceUsageWindow.cpp =================================================================== --- haiku/trunk/src/preferences/devices/ResourceUsageWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/devices/ResourceUsageWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -188,7 +188,7 @@ : BWindow (frame, "Resource Usage", B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE) { InitWindow(list); - CenterWindowOnScreen(this); + CenterOnScreen(); Show(); } // -------------------------------------------------------------------------------------------------- // Modified: haiku/trunk/src/preferences/dun/ModemWindow.cpp =================================================================== --- haiku/trunk/src/preferences/dun/ModemWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/dun/ModemWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -13,24 +13,11 @@ #include "ModemWindow.h" -// CenterWindowOnScreen -- Centers the BWindow to the Current Screen -static void CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} -// ------------------------------------------------------------------------------------------ // - // ModemWindow -- constructor for ModemWindow Class ModemWindow::ModemWindow(BRect frame) : BWindow (frame, "", B_MODAL_WINDOW, B_NOT_RESIZABLE , 0) { InitWindow(); - CenterWindowOnScreen(this); + CenterOnScreen(); Show(); } // ------------------------------------------------------------------------------- // Modified: haiku/trunk/src/preferences/dun/NewConnectionWindow.cpp =================================================================== --- haiku/trunk/src/preferences/dun/NewConnectionWindow.cpp 2009-09-30 23:32:37 UTC (rev 33377) +++ haiku/trunk/src/preferences/dun/NewConnectionWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) @@ -33,25 +33,11 @@ // ---------------------------------------------------------------------------------------------------------- // -// CenterWindowOnScreen -- Centers the BWindow to the Current Screen -static void CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} -// ---------------------------------------------------------------------------------------------------------- // - - // NewConnectionWindow - Constructor NewConnectionWindow::NewConnectionWindow(BRect frame) : BWindow (frame, "NewConnectionWindow", B_MODAL_WINDOW , B_NOT_RESIZABLE , 0) { InitWindow(); - CenterWindowOnScreen(this); + CenterOnScreen(); Show(); } From kirilla at mail.berlios.de Thu Oct 1 02:14:40 2009 From: kirilla at mail.berlios.de (kirilla at BerliOS) Date: Thu, 1 Oct 2009 02:14:40 +0200 Subject: [Haiku-commits] r33379 - haiku/trunk/src/apps/installer Message-ID: <200910010014.n910Ee2P019126@sheep.berlios.de> Author: kirilla Date: 2009-10-01 02:14:40 +0200 (Thu, 01 Oct 2009) New Revision: 33379 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33379&view=rev Modified: haiku/trunk/src/apps/installer/InstallerApp.cpp haiku/trunk/src/apps/installer/InstallerWindow.cpp Log: Standardize on BWindow::CenterOnScreen(). Modified: haiku/trunk/src/apps/installer/InstallerApp.cpp =================================================================== --- haiku/trunk/src/apps/installer/InstallerApp.cpp 2009-10-01 00:03:00 UTC (rev 33378) +++ haiku/trunk/src/apps/installer/InstallerApp.cpp 2009-10-01 00:14:40 UTC (rev 33379) @@ -185,10 +185,7 @@ .SetInsets(10, 10, 10, 10) ); - BRect frame = BScreen().Frame(); - fEULAWindow->MoveTo(frame.left + (frame.Width() - eulaFrame.Width()) / 2, - frame.top + (frame.Height() - eulaFrame.Height()) / 2); - + fEULAWindow->CenterOnScreen(); fEULAWindow->Show(); #else // Show the installer window without EULA. Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp =================================================================== --- haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 00:03:00 UTC (rev 33378) +++ haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 00:14:40 UTC (rev 33379) @@ -302,9 +302,7 @@ // assume that the first frame event is because of this adoption and // move ourselves to the screen center... fNeedsToCenterOnScreen = false; - BRect frame = BScreen(this).Frame(); - MoveTo(frame.left + (frame.Width() - Frame().Width()) / 2, - frame.top + (frame.Height() - Frame().Height()) / 2); + CenterOnScreen(); } } From bonefish at mail.berlios.de Thu Oct 1 05:02:42 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:02:42 +0200 Subject: [Haiku-commits] r33380 - in haiku/trunk: headers/private/kernel src/system/kernel/debug Message-ID: <200910010302.n9132gVB006369@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:02:34 +0200 (Thu, 01 Oct 2009) New Revision: 33380 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33380&view=rev Modified: haiku/trunk/headers/private/kernel/debug.h haiku/trunk/src/system/kernel/debug/debug.cpp Log: Added debug_strlcpy() for use in the kernel debugger. Modified: haiku/trunk/headers/private/kernel/debug.h =================================================================== --- haiku/trunk/headers/private/kernel/debug.h 2009-10-01 00:14:40 UTC (rev 33379) +++ haiku/trunk/headers/private/kernel/debug.h 2009-10-01 03:02:34 UTC (rev 33380) @@ -131,6 +131,7 @@ extern int debug_call_with_fault_handler(jmp_buf jumpBuffer, void (*function)(void*), void* parameter); extern status_t debug_memcpy(void* to, const void* from, size_t size); +extern ssize_t debug_strlcpy(char* to, const char* from, size_t size); extern char kgetc(void); extern void kputs(const char *string); Modified: haiku/trunk/src/system/kernel/debug/debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/debug/debug.cpp 2009-10-01 00:14:40 UTC (rev 33379) +++ haiku/trunk/src/system/kernel/debug/debug.cpp 2009-10-01 03:02:34 UTC (rev 33380) @@ -55,7 +55,14 @@ size_t size; }; +struct debug_strlcpy_parameters { + char* to; + const char* from; + size_t size; + size_t result; +}; + static const char* const kKDLPrompt = "kdebug> "; extern "C" int kgets(char* buffer, int length); @@ -1180,6 +1187,16 @@ } +static void +debug_strlcpy_trampoline(void* _parameters) +{ + debug_strlcpy_parameters* parameters + = (debug_strlcpy_parameters*)_parameters; + parameters->result = strlcpy(parameters->to, parameters->from, + parameters->size); +} + + void call_modules_hook(bool enter) { @@ -1522,6 +1539,22 @@ } +/*! Similar to user_strlcpy(), but can only be invoked from within the kernel + debugger (and must not be used outside). +*/ +ssize_t +debug_strlcpy(char* to, const char* from, size_t size) +{ + debug_strlcpy_parameters parameters = {to, from, size}; + + if (debug_call_with_fault_handler(gCPU[sDebuggerOnCPU].fault_jump_buffer, + &debug_strlcpy_trampoline, ¶meters) != 0) { + return B_BAD_ADDRESS; + } + return parameters.result; +} + + // #pragma mark - public API From bonefish at mail.berlios.de Thu Oct 1 05:03:24 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:03:24 +0200 Subject: [Haiku-commits] r33381 - in haiku/trunk/src/system/kernel: . arch/x86 Message-ID: <200910010303.n9133Oxj006402@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:03:16 +0200 (Thu, 01 Oct 2009) New Revision: 33381 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33381&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp haiku/trunk/src/system/kernel/elf.cpp Log: Fixed incorrect uses of user_{strl,mem}cpy() in the kernel debugger. This could break stack traces. Modified: haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2009-10-01 03:02:34 UTC (rev 33380) +++ haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2009-10-01 03:03:16 UTC (rev 33381) @@ -239,7 +239,7 @@ if (type == B_STRING_TYPE) { if (value == 0) kprintf(" \33[31m\"\"\33[0m"); - else if (user_strlcpy(buffer, (char*)value, kBufferSize) < B_OK) + else if (debug_strlcpy(buffer, (char*)value, kBufferSize) < B_OK) kprintf(" \33[31m\"\"\33[0m"); else kprintf(" \33[36m\"%s\"\33[0m", buffer); Modified: haiku/trunk/src/system/kernel/elf.cpp =================================================================== --- haiku/trunk/src/system/kernel/elf.cpp 2009-10-01 03:02:34 UTC (rev 33380) +++ haiku/trunk/src/system/kernel/elf.cpp 2009-10-01 03:03:16 UTC (rev 33381) @@ -1465,6 +1465,8 @@ if (!IS_USER_ADDRESS(address)) return false; + if (debug_debugger_running()) + return debug_strlcpy(buffer, address, bufferSize) >= 0; return user_strlcpy(buffer, address, bufferSize) >= 0; } @@ -1486,6 +1488,8 @@ if (!IS_USER_ADDRESS(address)) return false; + if (debug_debugger_running()) + return debug_memcpy(&data, address, sizeof(T)) == B_OK; return user_memcpy(&data, address, sizeof(T)) == B_OK; } From bonefish at mail.berlios.de Thu Oct 1 05:04:01 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:04:01 +0200 Subject: [Haiku-commits] r33382 - haiku/trunk/src/system/kernel/disk_device_manager Message-ID: <200910010304.n91341pN006423@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:03:56 +0200 (Thu, 01 Oct 2009) New Revision: 33382 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33382&view=rev Modified: haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp Log: Fixed incorrect return value of _user_get_file_disk_device_path(). Modified: haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp =================================================================== --- haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp 2009-10-01 03:03:16 UTC (rev 33381) +++ haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp 2009-10-01 03:03:56 UTC (rev 33382) @@ -456,7 +456,11 @@ if (fileDevice == NULL) return B_BAD_VALUE; - return user_strlcpy(buffer, fileDevice->FilePath(), bufferSize); + ssize_t copied = user_strlcpy(buffer, fileDevice->FilePath(), + bufferSize); + if (copied < 0) + return copied; + return (size_t)copied < bufferSize ? B_OK : B_BUFFER_OVERFLOW; } } From bonefish at mail.berlios.de Thu Oct 1 05:04:37 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:04:37 +0200 Subject: [Haiku-commits] r33383 - haiku/trunk/src/system/kernel/disk_device_manager Message-ID: <200910010304.n9134bLc006458@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:04:32 +0200 (Thu, 01 Oct 2009) New Revision: 33383 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33383&view=rev Modified: haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp Log: The B_DISK_DEVICE_IS_FILE flag is cleared by KDiskDevice and needs to be reset. Modified: haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp =================================================================== --- haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp 2009-10-01 03:03:56 UTC (rev 33382) +++ haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp 2009-10-01 03:04:32 UTC (rev 33383) @@ -89,7 +89,16 @@ error = set_string(fFilePath, filePath); if (error != B_OK) return error; - return KDiskDevice::SetTo(devicePath); + + error = KDiskDevice::SetTo(devicePath); + if (error != B_OK) + return error; + + // reset the B_DISK_DEVICE_IS_FILE flag -- KDiskDevice::SetTo() has cleared + // it + SetDeviceFlags(DeviceFlags() | B_DISK_DEVICE_IS_FILE); + + return B_OK; } // Unset From bonefish at mail.berlios.de Thu Oct 1 05:05:15 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:05:15 +0200 Subject: [Haiku-commits] r33384 - haiku/trunk/src/bin Message-ID: <200910010305.n9135FV5006502@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:05:06 +0200 (Thu, 01 Oct 2009) New Revision: 33384 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33384&view=rev Added: haiku/trunk/src/bin/diskimage.cpp Modified: haiku/trunk/src/bin/Jamfile Log: Implemented small tool diskimage, which allows to register/unregister files as disk devices. It also demonstrates that the respective devfs functionality is utterly broken. Modified: haiku/trunk/src/bin/Jamfile =================================================================== --- haiku/trunk/src/bin/Jamfile 2009-10-01 03:04:32 UTC (rev 33383) +++ haiku/trunk/src/bin/Jamfile 2009-10-01 03:05:06 UTC (rev 33384) @@ -80,6 +80,7 @@ checkfs.cpp clipboard.cpp df.cpp + diskimage.cpp dpms.cpp draggers.cpp # factor.cpp Added: haiku/trunk/src/bin/diskimage.cpp =================================================================== --- haiku/trunk/src/bin/diskimage.cpp 2009-10-01 03:04:32 UTC (rev 33383) +++ haiku/trunk/src/bin/diskimage.cpp 2009-10-01 03:05:06 UTC (rev 33384) @@ -0,0 +1,246 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + +extern const char* __progname; +const char* kCommandName = __progname; + + +static const char* kUsage = + "Usage: %s register \n" + " %s unregister ( | | )\n" + " %s list\n" + "Registers a regular file as disk device, unregisters an already " + "registered\n" + "one, or lists all file disk devices.\n" + "\n" + "Options:\n" + " -h, --help - Print this usage info.\n" +; + + +static void +print_usage_and_exit(bool error) +{ + fprintf(error ? stderr : stdout, kUsage, kCommandName, kCommandName, + kCommandName); + exit(error ? 1 : 0); +} + + +static status_t +list_file_disk_devices() +{ + printf(" ID File Device\n"); + printf("------------------------------------------------------------------" + "-------------\n"); + + BDiskDeviceRoster roster; + BDiskDevice device; + while (roster.GetNextDevice(&device) == B_OK) { + if (!device.IsFile()) + continue; + + // ID + printf("%6ld ", device.ID()); + + // file path + BPath path; + printf("%-35s", + device.GetFilePath(&path) == B_OK ? path.Path() : "???"); + + // device path + printf("%s", device.GetPath(&path) == B_OK ? path.Path() : "???"); + printf("\n"); + } + + return B_OK; +} + + +static status_t +register_file_disk_device(const char* fileName) +{ + // stat() the file to verify that it's a regular file + struct stat st; + if (lstat(fileName, &st) != 0) { + status_t error = errno; + fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", fileName, + strerror(error)); + return error; + } + + if (!S_ISREG(st.st_mode)) { + fprintf(stderr, "Error: \"%s\" is not a regular file.\n", fileName); + return B_BAD_VALUE; + } + + // register the file + BDiskDeviceRoster roster; + partition_id id = roster.RegisterFileDevice(fileName); + if (id < 0) { + fprintf(stderr, "Error: Failed to register file disk device: %s\n", + strerror(id)); + return id; + } + + // print the success message (get the device path) + BDiskDevice device; + BPath path; + if (roster.GetDeviceWithID(id, &device) == B_OK + && device.GetPath(&path) == B_OK) { + printf("Registered file as disk device \"%s\" with ID %ld.\n", + path.Path(), id); + } else { + printf("Registered file as disk device with ID %ld, but failed to " + "get the device path.\n", id); + } + + return B_OK; +} + + +static status_t +unregister_file_disk_device(const char* fileNameOrID) +{ + // try to parse the parameter as ID + char* numberEnd; + partition_id id = strtol(fileNameOrID, &numberEnd, 0); + BDiskDeviceRoster roster; + if (id >= 0 && numberEnd != fileNameOrID && *numberEnd == '\0') { + BDiskDevice device; + if (roster.GetDeviceWithID(id, &device) == B_OK && device.IsFile()) { + status_t error = roster.UnregisterFileDevice(id); + if (error != B_OK) { + fprintf(stderr, "Error: Failed to unregister file disk device " + "with ID %ld: %s\n", id, strerror(error)); + return error; + } + + printf("Unregistered file disk device with ID %ld.\n", id); + return B_OK; + } else { + fprintf(stderr, "No file disk device with ID %ld, trying file " + "\"%s\"\n", id, fileNameOrID); + } + } + + // the parameter must be a file name -- stat() it + struct stat st; + if (lstat(fileNameOrID, &st) != 0) { + status_t error = errno; + fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", fileNameOrID, + strerror(error)); + return error; + } + + // remember the volume and node ID, so we can identify the file + // NOTE: There's a race condition -- we would need to open the file and + // keep it open to avoid it. + dev_t volumeID = st.st_dev; + ino_t nodeID = st.st_ino; + + // iterate through all file disk devices and try to find a match + BDiskDevice device; + while (roster.GetNextDevice(&device) == B_OK) { + if (!device.IsFile()) + continue; + + // get file path and stat it, same for the device path + BPath path; + bool isFilePath = true; + if ((device.GetFilePath(&path) == B_OK && lstat(path.Path(), &st) == 0 + && volumeID == st.st_dev && nodeID == st.st_ino) + || (isFilePath = false, false) + || (device.GetPath(&path) == B_OK && lstat(path.Path(), &st) == 0 + && volumeID == st.st_dev && nodeID == st.st_ino)) { + status_t error = roster.UnregisterFileDevice(device.ID()); + if (error != B_OK) { + fprintf(stderr, "Error: Failed to unregister file disk device" + "%s \"%s\" (ID: %ld): %s\n", isFilePath ? " for file" : "", + fileNameOrID, device.ID(), strerror(error)); + return error; + } + + printf("Unregistered file disk device%s \"%s\" (ID: %ld)\n", + isFilePath ? " for file" : "", fileNameOrID, device.ID()); + + return B_OK; + } + } + + fprintf(stderr, "Error: \"%s\" does not refer to a file disk device.\n", + fileNameOrID); + return B_BAD_VALUE; +} + + +int +main(int argc, const char* const* argv) +{ + while (true) { + static struct option sLongOptions[] = { + { "help", no_argument, 0, 'h' }, + { 0, 0, 0, 0 } + }; + + opterr = 0; // don't print errors + int c = getopt_long(argc, (char**)argv, "+h", sLongOptions, NULL); + if (c == -1) + break; + + switch (c) { + case 'h': + print_usage_and_exit(false); + break; + + default: + print_usage_and_exit(true); + break; + } + } + + // Of the remaining arguments the next one should be the command. + if (optind >= argc) + print_usage_and_exit(true); + + status_t error = B_OK; + const char* command = argv[optind++]; + + if (strcmp(command, "list") == 0) { + if (optind < argc) + print_usage_and_exit(true); + + list_file_disk_devices(); + } else if (strcmp(command, "register") == 0) { + if (optind + 1 != argc) + print_usage_and_exit(true); + + const char* fileName = argv[optind++]; + register_file_disk_device(fileName); + } else if (strcmp(command, "unregister") == 0) { + if (optind + 1 != argc) + print_usage_and_exit(true); + + const char* fileName = argv[optind++]; + unregister_file_disk_device(fileName); + } else + print_usage_and_exit(true); + + return error == B_OK ? 0 : 1; +} From bonefish at mail.berlios.de Thu Oct 1 05:06:54 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:06:54 +0200 Subject: [Haiku-commits] r33385 - in haiku/trunk: headers/private/kernel src/system/kernel/device_manager src/system/kernel/fs Message-ID: <200910010306.n9136sNx007083@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:06:34 +0200 (Thu, 01 Oct 2009) New Revision: 33385 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33385&view=rev Added: haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.cpp haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.h haiku/trunk/src/system/kernel/device_manager/FileDevice.cpp haiku/trunk/src/system/kernel/device_manager/FileDevice.h Modified: haiku/trunk/headers/private/kernel/vfs.h haiku/trunk/src/system/kernel/device_manager/BaseDevice.cpp haiku/trunk/src/system/kernel/device_manager/BaseDevice.h haiku/trunk/src/system/kernel/device_manager/Jamfile haiku/trunk/src/system/kernel/device_manager/devfs.cpp haiku/trunk/src/system/kernel/device_manager/device_manager.cpp haiku/trunk/src/system/kernel/device_manager/legacy_drivers.cpp haiku/trunk/src/system/kernel/fs/vfs.cpp Log: * VFS: - Fixed vfs_get_vnode_from_fd() return type. - Added vfs_open_vnode(). - Added a "bool traverseLeafLink" parameter to vfs_get_fs_node_from_path(). It was always resolving symlinks. * device manager/devfs: - devfs: get_node_for_path() no longer resolves leaf symlinks. That still doesn't help with file disk devices, as creating partition wouldn't work anyway. - Pulled the module-related implementation part of BaseDevice into new class AbstractModuleDevice and made all methods of BaseDevice virtual. Small adjustments to devfs to be happy with the new BaseDevice interface. - Added BaseDevice subclass FileDevice, which maps the interface to a file's file descriptor. Still got a few TODOs, but should basically work. - Use FileDevice for publishing file disk devices in devfs. Now those do actually work, though there's some BFS trouble with one of the images I tested. Modified: haiku/trunk/headers/private/kernel/vfs.h =================================================================== --- haiku/trunk/headers/private/kernel/vfs.h 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/headers/private/kernel/vfs.h 2009-10-01 03:06:34 UTC (rev 33385) @@ -81,7 +81,7 @@ int vfs_setrlimit(int resource, const struct rlimit *rlp); /* calls needed by the VM for paging and by the file cache */ -int vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode **_vnode); +status_t vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode **_vnode); status_t vfs_get_vnode_from_path(const char *path, bool kernel, struct vnode **_vnode); status_t vfs_get_vnode(dev_t mountID, ino_t vnodeID, bool canWait, @@ -91,6 +91,7 @@ void vfs_vnode_to_node_ref(struct vnode *vnode, dev_t *_mountID, ino_t *_vnodeID); +int vfs_open_vnode(struct vnode* vnode, int openMode, bool kernel); status_t vfs_lookup_vnode(dev_t mountID, ino_t vnodeID, struct vnode **_vnode); void vfs_put_vnode(struct vnode *vnode); @@ -107,14 +108,14 @@ io_request* request); status_t vfs_synchronous_io(io_request* request, status_t (*doIO)(void* cookie, off_t offset, void* buffer, - size_t* length), - void* cookie); + size_t* length), + void* cookie); status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache, bool allocate); status_t vfs_get_file_map(struct vnode *vnode, off_t offset, size_t size, struct file_io_vec *vecs, size_t *_count); status_t vfs_get_fs_node_from_path(fs_volume *volume, const char *path, - bool kernel, void **_node); + bool traverseLeafLink, bool kernel, void **_node); status_t vfs_stat_vnode(struct vnode *vnode, struct stat *stat); status_t vfs_stat_node_ref(dev_t device, ino_t inode, struct stat *stat); status_t vfs_get_vnode_name(struct vnode *vnode, char *name, Added: haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.cpp 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.cpp 2009-10-01 03:06:34 UTC (rev 33385) @@ -0,0 +1,121 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Copyright 2008-2009, Axel D?rfler, axeld at pinc-software.de. + * Distributed under the terms of the MIT License. + */ + + +#include "AbstractModuleDevice.h" + + +AbstractModuleDevice::AbstractModuleDevice() + : + fNode(NULL), + fInitialized(0), + fDeviceModule(NULL), + fDeviceData(NULL) +{ +} + + +AbstractModuleDevice::~AbstractModuleDevice() +{ +} + + +bool +AbstractModuleDevice::HasSelect() const +{ + return Module()->select != NULL; +} + + +bool +AbstractModuleDevice::HasDeselect() const +{ + return Module()->deselect != NULL; +} + + +bool +AbstractModuleDevice::HasRead() const +{ + return Module()->read != NULL; +} + + +bool +AbstractModuleDevice::HasWrite() const +{ + return Module()->write != NULL; +} + + +bool +AbstractModuleDevice::HasIO() const +{ + return Module()->io != NULL; +} + + +status_t +AbstractModuleDevice::Open(const char* path, int openMode, void** _cookie) +{ + return Module()->open(Data(), path, openMode, _cookie); +} + + +status_t +AbstractModuleDevice::Read(void* cookie, off_t pos, void* buffer, size_t* _length) +{ + return Module()->read(cookie, pos, buffer, _length); +} + + +status_t +AbstractModuleDevice::Write(void* cookie, off_t pos, const void* buffer, size_t* _length) +{ + return Module()->write(cookie, pos, buffer, _length); +} + + +status_t +AbstractModuleDevice::IO(void* cookie, io_request* request) +{ + return Module()->io(cookie, request); +} + + +status_t +AbstractModuleDevice::Control(void* cookie, int32 op, void* buffer, size_t length) +{ + return Module()->control(cookie, op, buffer, length); +} + + +status_t +AbstractModuleDevice::Select(void* cookie, uint8 event, selectsync* sync) +{ + return Module()->select(cookie, event, sync); +} + + +status_t +AbstractModuleDevice::Deselect(void* cookie, uint8 event, selectsync* sync) +{ + return Module()->deselect(cookie, event, sync); +} + + +status_t +AbstractModuleDevice::Close(void* cookie) +{ + return Module()->close(cookie); +} + + +status_t +AbstractModuleDevice::Free(void* cookie) +{ + return Module()->free(cookie); +} Added: haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.h =================================================================== --- haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.h 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/AbstractModuleDevice.h 2009-10-01 03:06:34 UTC (rev 33385) @@ -0,0 +1,53 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Copyright 2008-2009, Axel D?rfler, axeld at pinc-software.de. + * Distributed under the terms of the MIT License. + */ +#ifndef ABSTRACT_MODULE_DEVICE_H +#define ABSTRACT_MODULE_DEVICE_H + + +#include "BaseDevice.h" + + +class AbstractModuleDevice : public BaseDevice { +public: + AbstractModuleDevice(); + virtual ~AbstractModuleDevice(); + + device_module_info* Module() const { return fDeviceModule; } + + void* Data() const { return fDeviceData; } + device_node* Node() const { return fNode; } + + virtual bool HasSelect() const; + virtual bool HasDeselect() const; + virtual bool HasRead() const; + virtual bool HasWrite() const; + virtual bool HasIO() const; + + virtual status_t Open(const char* path, int openMode, + void** _cookie); + virtual status_t Read(void* cookie, off_t pos, void* buffer, + size_t* _length); + virtual status_t Write(void* cookie, off_t pos, const void* buffer, + size_t* _length); + virtual status_t IO(void* cookie, io_request* request); + virtual status_t Control(void* cookie, int32 op, void* buffer, + size_t length); + virtual status_t Select(void* cookie, uint8 event, selectsync* sync); + virtual status_t Deselect(void* cookie, uint8 event, + selectsync* sync); + + virtual status_t Close(void* cookie); + virtual status_t Free(void* cookie); + +protected: + device_node* fNode; + int32 fInitialized; + device_module_info* fDeviceModule; + void* fDeviceData; +}; + + +#endif // ABSTRACT_MODULE_DEVICE_H Modified: haiku/trunk/src/system/kernel/device_manager/BaseDevice.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/BaseDevice.cpp 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/BaseDevice.cpp 2009-10-01 03:06:34 UTC (rev 33385) @@ -8,11 +8,6 @@ BaseDevice::BaseDevice() - : - fNode(NULL), - fInitialized(0), - fDeviceModule(NULL), - fDeviceData(NULL) { } @@ -39,3 +34,80 @@ BaseDevice::Removed() { } + + +bool +BaseDevice::HasSelect() const +{ + return false; +} + + +bool +BaseDevice::HasDeselect() const +{ + return false; +} + + +bool +BaseDevice::HasRead() const +{ + return false; +} + + +bool +BaseDevice::HasWrite() const +{ + return false; +} + + +bool +BaseDevice::HasIO() const +{ + return false; +} + + +status_t +BaseDevice::Read(void* cookie, off_t pos, void* buffer, size_t* _length) +{ + return B_UNSUPPORTED; +} + + +status_t +BaseDevice::Write(void* cookie, off_t pos, const void* buffer, size_t* _length) +{ + return B_UNSUPPORTED; +} + + +status_t +BaseDevice::IO(void* cookie, io_request* request) +{ + return B_UNSUPPORTED; +} + + +status_t +BaseDevice::Control(void* cookie, int32 op, void* buffer, size_t length) +{ + return B_UNSUPPORTED; +} + + +status_t +BaseDevice::Select(void* cookie, uint8 event, selectsync* sync) +{ + return B_UNSUPPORTED; +} + + +status_t +BaseDevice::Deselect(void* cookie, uint8 event, selectsync* sync) +{ + return B_UNSUPPORTED; +} Modified: haiku/trunk/src/system/kernel/device_manager/BaseDevice.h =================================================================== --- haiku/trunk/src/system/kernel/device_manager/BaseDevice.h 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/BaseDevice.h 2009-10-01 03:06:34 UTC (rev 33385) @@ -14,115 +14,39 @@ BaseDevice(); virtual ~BaseDevice(); - void SetID(ino_t id) { fID = id; } - ino_t ID() const { return fID; } + void SetID(ino_t id) { fID = id; } + ino_t ID() const { return fID; } - device_node* Node() const { return fNode; } - virtual status_t InitDevice(); virtual void UninitDevice(); virtual void Removed(); - device_module_info* Module() const { return fDeviceModule; } - void* Data() const { return fDeviceData; } + virtual bool HasSelect() const; + virtual bool HasDeselect() const; + virtual bool HasRead() const; + virtual bool HasWrite() const; + virtual bool HasIO() const; - bool HasSelect() const - { return Module()->select != NULL; } - bool HasDeselect() const - { return Module()->deselect != NULL; } - bool HasRead() const - { return Module()->read != NULL; } - bool HasWrite() const - { return Module()->write != NULL; } - bool HasIO() const - { return Module()->io != NULL; } - virtual status_t Open(const char* path, int openMode, - void** _cookie); - status_t Read(void* cookie, off_t pos, void* buffer, + void** _cookie) = 0; + virtual status_t Read(void* cookie, off_t pos, void* buffer, size_t* _length); - status_t Write(void* cookie, off_t pos, const void* buffer, + virtual status_t Write(void* cookie, off_t pos, const void* buffer, size_t* _length); - status_t IO(void* cookie, io_request* request); - status_t Control(void* cookie, int32 op, void* buffer, + virtual status_t IO(void* cookie, io_request* request); + virtual status_t Control(void* cookie, int32 op, void* buffer, size_t length); virtual status_t Select(void* cookie, uint8 event, selectsync* sync); - status_t Deselect(void* cookie, uint8 event, + virtual status_t Deselect(void* cookie, uint8 event, selectsync* sync); - status_t Close(void* cookie); - status_t Free(void* cookie); + virtual status_t Close(void* cookie) = 0; + virtual status_t Free(void* cookie) = 0; protected: ino_t fID; - device_node* fNode; - int32 fInitialized; - device_module_info* fDeviceModule; - void* fDeviceData; }; -inline status_t -BaseDevice::Open(const char* path, int openMode, void** _cookie) -{ - return Module()->open(Data(), path, openMode, _cookie); -} - - -inline status_t -BaseDevice::Read(void* cookie, off_t pos, void* buffer, size_t* _length) -{ - return Module()->read(cookie, pos, buffer, _length); -} - - -inline status_t -BaseDevice::Write(void* cookie, off_t pos, const void* buffer, size_t* _length) -{ - return Module()->write(cookie, pos, buffer, _length); -} - - -inline status_t -BaseDevice::IO(void* cookie, io_request* request) -{ - return Module()->io(cookie, request); -} - - -inline status_t -BaseDevice::Control(void* cookie, int32 op, void* buffer, size_t length) -{ - return Module()->control(cookie, op, buffer, length); -} - - -inline status_t -BaseDevice::Select(void* cookie, uint8 event, selectsync* sync) -{ - return Module()->select(cookie, event, sync); -} - - -inline status_t -BaseDevice::Deselect(void* cookie, uint8 event, selectsync* sync) -{ - return Module()->deselect(cookie, event, sync); -} - - -inline status_t -BaseDevice::Close(void* cookie) -{ - return Module()->close(cookie); -} - - -inline status_t -BaseDevice::Free(void* cookie) -{ - return Module()->free(cookie); -} - #endif // BASE_DEVICE_H Added: haiku/trunk/src/system/kernel/device_manager/FileDevice.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/FileDevice.cpp 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/FileDevice.cpp 2009-10-01 03:06:34 UTC (rev 33385) @@ -0,0 +1,335 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include "FileDevice.h" + +#include +#include + +#include + +#include + +#include + + +static const uint32 kBlockSize = 512; + + +struct FileDevice::Cookie { + int fd; + + Cookie(int fd) + : + fd(fd) + { + } + + ~Cookie() + { + if (fd >= 0) + close(fd); + } +}; + + +FileDevice::FileDevice() + : + fFD(-1), + fFileSize(0) +{ +} + + +FileDevice::~FileDevice() +{ + if (fFD >= 0) + close(fFD); +} + + +status_t +FileDevice::Init(const char* path) +{ + fFD = open(path, O_RDONLY | O_NOTRAVERSE); + if (fFD < 0) + return errno; + + struct stat st; + if (fstat(fFD, &st) != 0) + return errno; + + if (!S_ISREG(st.st_mode)) + return B_BAD_TYPE; + + fFileSize = st.st_size / kBlockSize * kBlockSize; + + return B_OK; +} + + +status_t +FileDevice::InitDevice() +{ + return B_OK; +} + + +void +FileDevice::UninitDevice() +{ +} + + +void +FileDevice::Removed() +{ + delete this; +} + + +bool +FileDevice::HasSelect() const +{ + return false; +} + + +bool +FileDevice::HasDeselect() const +{ + return false; +} + + +bool +FileDevice::HasRead() const +{ + return true; +} + + +bool +FileDevice::HasWrite() const +{ + return true; +} + + +bool +FileDevice::HasIO() const +{ + // TODO: Support! + return false; +} + + +status_t +FileDevice::Open(const char* path, int openMode, void** _cookie) +{ + // get the vnode + struct vnode* vnode; + status_t error = vfs_get_vnode_from_fd(fFD, true, &vnode); + if (error != B_OK) + return error; + + // open it + int fd = vfs_open_vnode(vnode, openMode, true); + if (fd < 0) { + vfs_put_vnode(vnode); + return fd; + } + // our vnode reference does now belong to the FD + + Cookie* cookie = new(std::nothrow) Cookie(fd); + if (cookie == NULL) { + close(fd); + return B_NO_MEMORY; + } + + *_cookie = cookie; + return B_OK; +} + + +status_t +FileDevice::Read(void* _cookie, off_t pos, void* buffer, size_t* _length) +{ + Cookie* cookie = (Cookie*)_cookie; + + ssize_t bytesRead = pread(cookie->fd, buffer, *_length, pos); + if (bytesRead < 0) { + *_length = 0; + return errno; + } + + *_length = bytesRead; + return B_OK; +} + + +status_t +FileDevice::Write(void* _cookie, off_t pos, const void* buffer, size_t* _length) +{ + Cookie* cookie = (Cookie*)_cookie; + + ssize_t bytesWritten = pwrite(cookie->fd, buffer, *_length, pos); + if (bytesWritten < 0) { + *_length = 0; + return errno; + } + + *_length = bytesWritten; + return B_OK; +} + + +status_t +FileDevice::IO(void* _cookie, io_request* request) +{ +// Cookie* cookie = (Cookie*)_cookie; +// return do_fd_io(cookie->fd, request); +// TODO: The implementation is fine in principle, but do_fd_io() requires either +// the io() hook or the {read,write}_pages() hooks of the underlying FS to be +// implemented, which we can't guarantee. do_fd_io() should work around by using +// read() and write(), but it's all quite of a mess, since we mix up the io() +// hook -- which ATM has the semantics of uncached_io() hook (i.e. ignoring the +// file cache) -- with the actual io() hook semantics (i.e. using the file +// cache). + return B_UNSUPPORTED; +} + + +template +static status_t +set_ioctl_result(const ResultType& result, void* buffer, size_t length) +{ + // NOTE: We omit the buffer size check for sake of callers (e.g. BFS) not + // specifying a length argument. +// if (sizeof(ResultType) < length) +// return B_BAD_VALUE; + + if (buffer == NULL) + return B_BAD_ADDRESS; + + if (!IS_USER_ADDRESS(buffer)) + return user_memcpy(buffer, &result, sizeof(ResultType)); + + memcpy(buffer, &result, sizeof(ResultType)); + return B_OK; +} + + +status_t +FileDevice::Control(void* _cookie, int32 op, void* buffer, size_t length) +{ + Cookie* cookie = (Cookie*)_cookie; + + switch (op) { + case B_GET_DEVICE_SIZE: + return set_ioctl_result( + fFileSize > ~(size_t)0 ? ~(size_t)0 : (size_t)fFileSize, + buffer, length); + + case B_SET_BLOCKING_IO: + case B_SET_NONBLOCKING_IO: + // TODO: Translate to O_NONBLOCK and pass on! + return B_OK; + + case B_GET_READ_STATUS: + case B_GET_WRITE_STATUS: + // TODO: poll() the FD! + return set_ioctl_result(true, buffer, length); + + case B_GET_ICON: + return B_UNSUPPORTED; + + case B_GET_GEOMETRY: + case B_GET_BIOS_GEOMETRY: + { + // fill in the geometry + // Optimally we have only 1 block per sector and only one head. + // Since we have only a uint32 for the cylinder count, this won't + // work for files > 2TB. So, we set the head count to the minimally + // possible value. + off_t blocks = fFileSize / kBlockSize; + uint32 heads = (blocks + 0xfffffffe) / 0xffffffff; + if (heads == 0) + heads = 1; + + device_geometry geometry; + geometry.bytes_per_sector = kBlockSize; + geometry.sectors_per_track = 1; + geometry.cylinder_count = blocks / heads; + geometry.head_count = heads; + geometry.device_type = B_DISK; + geometry.removable = false; + geometry.read_only = false; + geometry.write_once = false; + + return set_ioctl_result(geometry, buffer, length); + } + + case B_GET_MEDIA_STATUS: + return set_ioctl_result((status_t)B_OK, buffer, length); + + case B_SET_INTERRUPTABLE_IO: + case B_SET_UNINTERRUPTABLE_IO: + return B_OK; + + case B_FLUSH_DRIVE_CACHE: + return fsync(cookie->fd) == 0 ? B_OK : errno; + + case B_GET_BIOS_DRIVE_ID: + return set_ioctl_result((uint8)0xf8, buffer, length); + + case B_GET_DRIVER_FOR_DEVICE: + case B_SET_DEVICE_SIZE: + case B_SET_PARTITION: + case B_FORMAT_DEVICE: + case B_EJECT_DEVICE: + case B_LOAD_MEDIA: + case B_GET_NEXT_OPEN_DEVICE: + default: + return B_BAD_VALUE; + } + + return B_OK; +} + + +status_t +FileDevice::Select(void* _cookie, uint8 event, selectsync* sync) +{ + // TODO: Support (select_fd())! + return B_UNSUPPORTED; +} + + +status_t +FileDevice::Deselect(void* cookie, uint8 event, selectsync* sync) +{ + // TODO: Support (deselect_fd())! + return B_UNSUPPORTED; +} + + +status_t +FileDevice::Close(void* cookie) +{ + // TODO: This should probably really close the FD. Depending on the + // underlying FS operations could block and close() would be needed to + // unblock them. + return B_OK; +} + + +status_t +FileDevice::Free(void* _cookie) +{ + delete (Cookie*)_cookie; + return B_OK; +} Added: haiku/trunk/src/system/kernel/device_manager/FileDevice.h =================================================================== --- haiku/trunk/src/system/kernel/device_manager/FileDevice.h 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/FileDevice.h 2009-10-01 03:06:34 UTC (rev 33385) @@ -0,0 +1,55 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef FILE_DEVICE_H +#define FILE_DEVICE_H + + +#include "BaseDevice.h" + + +class FileDevice : public BaseDevice { +public: + FileDevice(); + virtual ~FileDevice(); + + status_t Init(const char* path); + + virtual status_t InitDevice(); + virtual void UninitDevice(); + + virtual void Removed(); + + virtual bool HasSelect() const; + virtual bool HasDeselect() const; + virtual bool HasRead() const; + virtual bool HasWrite() const; + virtual bool HasIO() const; + + virtual status_t Open(const char* path, int openMode, + void** _cookie); + virtual status_t Read(void* cookie, off_t pos, void* buffer, + size_t* _length); + virtual status_t Write(void* cookie, off_t pos, const void* buffer, + size_t* _length); + virtual status_t IO(void* cookie, io_request* request); + virtual status_t Control(void* cookie, int32 op, void* buffer, + size_t length); + virtual status_t Select(void* cookie, uint8 event, selectsync* sync); + virtual status_t Deselect(void* cookie, uint8 event, + selectsync* sync); + + virtual status_t Close(void* cookie); + virtual status_t Free(void* cookie); + +private: + struct Cookie; + +private: + int fFD; + off_t fFileSize; +}; + + +#endif // FILE_DEVICE_H Modified: haiku/trunk/src/system/kernel/device_manager/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/device_manager/Jamfile 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) @@ -4,9 +4,11 @@ UsePrivateHeaders [ FDirName kernel util ] shared ; KernelMergeObject kernel_device_manager.o : + AbstractModuleDevice.cpp BaseDevice.cpp device_manager.cpp devfs.cpp + FileDevice.cpp id_generator.cpp io_resources.cpp IOScheduler.cpp Modified: haiku/trunk/src/system/kernel/device_manager/devfs.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/devfs.cpp 2009-10-01 03:05:06 UTC (rev 33384) +++ haiku/trunk/src/system/kernel/device_manager/devfs.cpp 2009-10-01 03:06:34 UTC (rev 33385) @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -36,6 +37,7 @@ #include #include "BaseDevice.h" +#include "FileDevice.h" #include "IORequest.h" #include "legacy_drivers.h" @@ -484,7 +486,8 @@ get_node_for_path(struct devfs *fs, const char *path, struct devfs_vnode **_node) { - return vfs_get_fs_node_from_path(fs->volume, path, true, (void **)_node); + return vfs_get_fs_node_from_path(fs->volume, path, false, true, + (void **)_node); } @@ -509,21 +512,6 @@ static status_t -unpublish_node(struct devfs *fs, const char *path, mode_t type) -{ - devfs_vnode *node; - status_t status = get_node_for_path(fs, path, &node); - if (status != B_OK) - return status; - - status = unpublish_node(fs, node, type); - - put_vnode(fs->volume, node->id); - return status; -} - - -static status_t publish_directory(struct devfs *fs, const char *path) { ASSERT_LOCKED_RECURSIVE(&fs->lock); @@ -818,7 +806,6 @@ kprintf(" symlink to: %s\n", vnode->stream.u.symlink.path); } else { kprintf(" device: %p\n", vnode->stream.u.dev.device); - kprintf(" node: %p\n", vnode->stream.u.dev.device->Node()); kprintf(" partition: %p\n", vnode->stream.u.dev.partition); if (vnode->stream.u.dev.partition != NULL) { partition_info& info = vnode->stream.u.dev.partition->info; @@ -1622,6 +1609,7 @@ static bool devfs_can_page(fs_volume *_volume, fs_vnode *_vnode, void *cookie) { +#if 0 struct devfs_vnode *vnode = (devfs_vnode *)_vnode->private_node; //TRACE(("devfs_canpage: vnode %p\n", vnode)); @@ -1633,6 +1621,9 @@ return vnode->stream.u.dev.device->HasRead() || vnode->stream.u.dev.device->HasIO(); +#endif + // TODO: Obsolete hook! + return false; } @@ -1998,36 +1989,50 @@ extern "C" status_t devfs_unpublish_file_device(const char *path) { - return unpublish_node(sDeviceFileSystem, path, S_IFLNK); + // get the device node + devfs_vnode* node; + status_t status = get_node_for_path(sDeviceFileSystem, path, &node); + if (status != B_OK) + return status; + + if (!S_ISCHR(node->stream.type)) { + put_vnode(sDeviceFileSystem->volume, node->id); + return B_BAD_VALUE; + } + + // if it is indeed a file device, unpublish it + FileDevice* device = dynamic_cast(node->stream.u.dev.device); + if (device == NULL) { + put_vnode(sDeviceFileSystem->volume, node->id); + return B_BAD_VALUE; + } + + status = unpublish_node(sDeviceFileSystem, node, S_IFCHR); + + put_vnode(sDeviceFileSystem->volume, node->id); + return status; } extern "C" status_t devfs_publish_file_device(const char *path, const char *filePath) { - struct devfs_vnode *node; - struct devfs_vnode *dirNode; - status_t status; - - filePath = strdup(filePath); - if (filePath == NULL) + // create a FileDevice for the file + FileDevice* device = new(std::nothrow) FileDevice; + if (device == NULL) return B_NO_MEMORY; [... truncated: 162 lines follow ...] From bonefish at mail.berlios.de Thu Oct 1 05:08:14 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:08:14 +0200 Subject: [Haiku-commits] r33386 - in haiku/trunk: headers/private/storage headers/private/system src/add-ons/disk_systems/intel src/add-ons/kernel/partitioning_systems/amiga src/add-ons/kernel/partitioning_systems/apple src/add-ons/kernel/partitioning_systems/efi src/add-ons/kernel/partitioning_systems/intel src/add-ons/kernel/partitioning_systems/session src/bin/makebootable/platform/bios_ia32 src/kits/storage/disk_device src/system/kernel/disk_device_manager src/tools/makebootable/platform/bios_ia32 Message-ID: <200910010308.n9138EDR007132@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:07:42 +0200 (Thu, 01 Oct 2009) New Revision: 33386 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33386&view=rev Added: haiku/trunk/headers/private/system/disk_device_types.h Modified: haiku/trunk/headers/private/storage/DiskDeviceTypes.h haiku/trunk/src/add-ons/disk_systems/intel/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/apple.cpp haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.h haiku/trunk/src/add-ons/kernel/partitioning_systems/session/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/session/session.cpp haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile haiku/trunk/src/kits/storage/disk_device/DiskDeviceTypes.cpp haiku/trunk/src/system/kernel/disk_device_manager/Jamfile haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile Log: * : Removed kPartitionTypeIntel{Primary,Logical} constants. * Added new header headers/private/system/disk_device_types.h, which defines the constants as macros and which can be used where the constants cannot be used. The constants are defined using the macros, so now there's only one place where the string literals should be specified. * Use the macros in the partitioning systems. I was too lazy to also adjust the file systems -- most of them seem to hard-code the string literal yet. Modified: haiku/trunk/headers/private/storage/DiskDeviceTypes.h =================================================================== --- haiku/trunk/headers/private/storage/DiskDeviceTypes.h 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/headers/private/storage/DiskDeviceTypes.h 2009-10-01 03:07:42 UTC (rev 33386) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku Inc. + * Copyright 2003-2009, Haiku Inc. * Distributed under the terms of the MIT License. */ #ifndef _DISK_DEVICE_TYPES_H @@ -16,7 +16,6 @@ extern const char *kPartitionTypeUnrecognized; extern const char *kPartitionTypeMultisession; - extern const char *kPartitionTypeAudioSession; extern const char *kPartitionTypeDataSession; @@ -24,10 +23,8 @@ extern const char *kPartitionTypeApple; extern const char *kPartitionTypeEFI; extern const char *kPartitionTypeIntel; - -extern const char *kPartitionTypeIntelPrimary; extern const char *kPartitionTypeIntelExtended; -extern const char *kPartitionTypeIntelLogical; +extern const char *kPartitionTypeVMDK; extern const char *kPartitionTypeAmigaFFS; extern const char *kPartitionTypeBFS; Added: haiku/trunk/headers/private/system/disk_device_types.h =================================================================== --- haiku/trunk/headers/private/system/disk_device_types.h 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/headers/private/system/disk_device_types.h 2009-10-01 03:07:42 UTC (rev 33386) @@ -0,0 +1,46 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + * + * Disk device type macros for kernel and boot loader. In userland use + * . + */ +#ifndef _SYSTEM_DISK_DEVICE_TYPES_H +#define _SYSTEM_DISK_DEVICE_TYPES_H + + +// Device Types + +#define FLOPPY_DEVICE_NAME "Floppy Disk Media" +#define HARD_DISK_DEVICE_NAME "Hard Disk Media" +#define OPTICAL_DEVICE_NAME "Optical Media" + +// Partition types + +#define UNRECOGNIZED_PARTITION_NAME "Unrecognized" + +#define MULTISESSION_PARTITION_NAME "Multisession Storage Device" +#define AUDIO_SESSION_PARTITION_NAME "Audio Session" +#define DATA_SESSION_PARTITION_NAME "Data Session" + +#define AMIGA_PARTITION_NAME "Amiga Partition Map" +#define APPLE_PARTITION_NAME "Apple Partition Map" +#define EFI_PARTITION_NAME "EFI GUID Partition Map" +#define INTEL_PARTITION_NAME "Intel Partition Map" +#define INTEL_EXTENDED_PARTITION_NAME "Intel Extended Partition" +#define VMDK_PARTITION_NAME "VMDK Partition" + +#define AMIGA_FFS_NAME "AmigaFFS File System" +#define BFS_NAME "Be File System" +#define EXT2_FS_NAME "EXT2 File System" +#define EXT3_FS_NAME "EXT3 File System" +#define FAT12_FS_NAME "FAT12 File System" +#define FAT32_FS_NAME "FAT32 File System" +#define HFS_NAME "HFS File System" +#define HFS_PLUS_NAME "HFS+ File System" +#define ISO9660_FS_NAME "ISO9660 File System" +#define REISER_FS_NAME "Reiser File System" +#define UDF_FS_NAME "UDF File System" + + +#endif // _SYSTEM_DISK_DEVICE_TYPES_H Modified: haiku/trunk/src/add-ons/disk_systems/intel/Jamfile =================================================================== --- haiku/trunk/src/add-ons/disk_systems/intel/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/disk_systems/intel/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -1,6 +1,7 @@ SubDir HAIKU_TOP src add-ons disk_systems intel ; UsePrivateHeaders shared storage ; +UsePrivateSystemHeaders ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -3,6 +3,7 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName storage ] ; +UsePrivateSystemHeaders ; KernelAddon amiga_rdb : amiga_rdb.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp 2009-10-01 03:07:42 UTC (rev 33386) @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef _BOOT_MODE # include #else @@ -29,7 +30,6 @@ #define AMIGA_PARTITION_MODULE_NAME "partitioning_systems/amiga_rdb/v1" -#define AMIGA_PARTITION_NAME "Amiga Partition Map" template bool Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -3,6 +3,7 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName storage ] ; +UsePrivateSystemHeaders ; KernelAddon apple : apple.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/apple.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/apple.cpp 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/apple.cpp 2009-10-01 03:07:42 UTC (rev 33386) @@ -7,6 +7,7 @@ #include "apple.h" #include +#include #include #ifdef _BOOT_MODE # include @@ -27,7 +28,6 @@ #endif #define APPLE_PARTITION_MODULE_NAME "partitioning_systems/apple/v1" -#define APPLE_PARTITION_NAME "Apple Partition Map" static const char *kApplePartitionTypes[] = { "partition_map", // the partition map itself Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -2,6 +2,7 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders interface kernel storage ; +UsePrivateSystemHeaders ; KernelAddon efi_gpt : efi_gpt.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp 2009-10-01 03:07:42 UTC (rev 33386) @@ -10,6 +10,7 @@ #include #include +#include #ifdef _BOOT_MODE # include #else @@ -33,7 +34,6 @@ #define EFI_PARTITION_MODULE_NAME "partitioning_systems/efi_gpt/v1" -#define EFI_PARTITION_NAME "EFI GUID Partition Map" struct static_guid { Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -4,6 +4,7 @@ UsePrivateHeaders kernel ; UsePrivateHeaders shared ; UsePrivateHeaders storage ; +UsePrivateSystemHeaders ; KernelAddon intel : intel.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.h =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.h 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.h 2009-10-01 03:07:42 UTC (rev 33386) @@ -16,18 +16,15 @@ #include #include +#include + #ifndef _USER_MODE # include #else # include #endif -// These match those in DiskDeviceTypes.cpp and *must* be kept in sync. -#define INTEL_PARTITION_NAME "Intel Partition Map" -#define INTEL_EXTENDED_PARTITION_NAME "Intel Extended Partition" -#define BFS_NAME "Be File System" - // partition_type struct partition_type { uint8 type; Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/session/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/session/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/session/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -4,14 +4,15 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName storage ] ; +UsePrivateSystemHeaders ; { -# local defines = [ FDefines USER ] ; +# local defines = [ FDefines USER ] ; # SubDirCcFlags $(defines) ; # SubDirC++Flags $(defines) ; } -local session_files = +local session_files = Debug.cpp Disc.cpp session.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/session/session.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/session/session.cpp 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/session/session.cpp 2009-10-01 03:07:42 UTC (rev 33386) @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -19,7 +20,6 @@ #define SESSION_PARTITION_MODULE_NAME "partitioning_systems/session/v1" -#define SESSION_PARTITION_NAME "Multisession Storage Device" static status_t @@ -115,7 +115,7 @@ standard_operations }, "session", // short_name - SESSION_PARTITION_NAME, // pretty_name + MULTISESSION_PARTITION_NAME, // pretty_name 0, // flags // scanning Modified: haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile =================================================================== --- haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -3,6 +3,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ; UsePrivateHeaders shared storage ; +UsePrivateSystemHeaders ; # write the stage 1 boot loader into the makebootable resources AddFileDataResource makebootable : RAWT:666:BootCode : stage1.bin ; Modified: haiku/trunk/src/kits/storage/disk_device/DiskDeviceTypes.cpp =================================================================== --- haiku/trunk/src/kits/storage/disk_device/DiskDeviceTypes.cpp 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/kits/storage/disk_device/DiskDeviceTypes.cpp 2009-10-01 03:07:42 UTC (rev 33386) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku Inc. + * Copyright 2003-2009, Haiku Inc. * Distributed under the terms of the MIT License. * * Authors: @@ -9,39 +9,38 @@ #include +#include + // Device Types -const char *kDeviceTypeFloppyDisk = "Floppy Disk Media"; -const char *kDeviceTypeHardDisk = "Hard Disk Media"; -const char *kDeviceTypeOptical = "Optical Media"; +const char *kDeviceTypeFloppyDisk = FLOPPY_DEVICE_NAME; +const char *kDeviceTypeHardDisk = HARD_DISK_DEVICE_NAME; +const char *kDeviceTypeOptical = OPTICAL_DEVICE_NAME; // Partition types -const char *kPartitionTypeUnrecognized = "Unrecognized"; +const char *kPartitionTypeUnrecognized = UNRECOGNIZED_PARTITION_NAME; -const char *kPartitionTypeMultisession = "Multisession Storage Device"; +const char *kPartitionTypeMultisession = MULTISESSION_PARTITION_NAME; +const char *kPartitionTypeAudioSession = AUDIO_SESSION_PARTITION_NAME; +const char *kPartitionTypeDataSession = DATA_SESSION_PARTITION_NAME; -const char *kPartitionTypeAudioSession = "Audio Session"; -const char *kPartitionTypeDataSession = "Data Session"; +const char *kPartitionTypeAmiga = AMIGA_PARTITION_NAME; +const char *kPartitionTypeApple = APPLE_PARTITION_NAME; +const char *kPartitionTypeEFI = EFI_PARTITION_NAME; +const char *kPartitionTypeIntel = INTEL_PARTITION_NAME; +const char *kPartitionTypeIntelExtended = INTEL_EXTENDED_PARTITION_NAME; +const char *kPartitionTypeVMDK = VMDK_PARTITION_NAME; -const char *kPartitionTypeAmiga = "Amiga Partition Map"; -const char *kPartitionTypeApple = "Apple Partition Map"; -const char *kPartitionTypeEFI = "EFI GUID Partition Map"; -const char *kPartitionTypeIntel = "Intel Partition Map"; - -const char *kPartitionTypeIntelPrimary = "Intel Primary Partition"; -const char *kPartitionTypeIntelExtended = "Intel Extended Partition"; -const char *kPartitionTypeIntelLogical = "Intel Logical Partition"; - -const char *kPartitionTypeAmigaFFS = "AmigaFFS File System"; -const char *kPartitionTypeBFS = "Be File System"; -const char *kPartitionTypeEXT2 = "EXT2 File System"; -const char *kPartitionTypeEXT3 = "EXT3 File System"; -const char *kPartitionTypeFAT12 = "FAT12 File System"; -const char *kPartitionTypeFAT32 = "FAT32 File System"; -const char *kPartitionTypeHFS = "HFS File System"; -const char *kPartitionTypeHFSPlus = "HFS+ File System"; -const char *kPartitionTypeISO9660 = "ISO9660 File System"; -const char *kPartitionTypeReiser = "Reiser File System"; -const char *kPartitionTypeUDF = "UDF File System"; +const char *kPartitionTypeAmigaFFS = AMIGA_FFS_NAME; +const char *kPartitionTypeBFS = BFS_NAME; +const char *kPartitionTypeEXT2 = EXT2_FS_NAME; +const char *kPartitionTypeEXT3 = EXT3_FS_NAME; +const char *kPartitionTypeFAT12 = FAT12_FS_NAME; +const char *kPartitionTypeFAT32 = FAT32_FS_NAME; +const char *kPartitionTypeHFS = HFS_NAME; +const char *kPartitionTypeHFSPlus = HFS_PLUS_NAME; +const char *kPartitionTypeISO9660 = ISO9660_FS_NAME; +const char *kPartitionTypeReiser = REISER_FS_NAME; +const char *kPartitionTypeUDF = UDF_FS_NAME; Modified: haiku/trunk/src/system/kernel/disk_device_manager/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/disk_device_manager/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/system/kernel/disk_device_manager/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -9,6 +9,7 @@ UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName kernel fs ] ; UsePrivateHeaders [ FDirName kernel util ] ; +UsePrivateSystemHeaders ; UsePrivateHeaders shared ; UsePrivateHeaders storage ; Modified: haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile =================================================================== --- haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile 2009-10-01 03:06:34 UTC (rev 33385) +++ haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) @@ -3,6 +3,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ; UsePrivateHeaders storage shared ; +UsePrivateSystemHeaders system ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin makebootable platform bios_ia32 ] ; From bonefish at mail.berlios.de Thu Oct 1 05:08:57 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:08:57 +0200 Subject: [Haiku-commits] r33387 - in haiku/trunk: headers/private headers/private/vmdk src/tools/vmdkimage Message-ID: <200910010308.n9138vdj007180@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:08:46 +0200 (Thu, 01 Oct 2009) New Revision: 33387 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33387&view=rev Added: haiku/trunk/headers/private/vmdk/ haiku/trunk/headers/private/vmdk/vmdk.h Removed: haiku/trunk/src/tools/vmdkimage/vmdkimage.h Modified: haiku/trunk/src/tools/vmdkimage/Jamfile haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp Log: Moved vmdkimage.h to a shareable place, cleaned it up a bit, and renamed it to vmdk.h. Copied: haiku/trunk/headers/private/vmdk/vmdk.h (from rev 33015, haiku/trunk/src/tools/vmdkimage/vmdkimage.h) =================================================================== --- haiku/trunk/src/tools/vmdkimage/vmdkimage.h 2009-09-09 01:35:20 UTC (rev 33015) +++ haiku/trunk/headers/private/vmdk/vmdk.h 2009-10-01 03:08:46 UTC (rev 33387) @@ -0,0 +1,38 @@ +/* + * Copyright 2007, Marcus Overhagen. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _VMDK_H +#define _VMDK_H + + +#include + + +typedef uint64_t SectorType; + + +struct SparseExtentHeader { + uint32_t magicNumber; + uint32_t version; + uint32_t flags; + SectorType capacity; + SectorType grainSize; + SectorType descriptorOffset; + SectorType descriptorSize; + uint32_t numGTEsPerGT; + SectorType rgdOffset; + SectorType gdOffset; + SectorType overHead; + uint8_t uncleanShutdown; + char singleEndLineChar; + char nonEndLineChar; + char doubleEndLineChar1; + char doubleEndLineChar2; + uint8_t pad[435]; +} __attribute__((__packed__)) ; + +#define VMDK_SPARSE_MAGICNUMBER 0x564d444b /* 'V' 'M' 'D' 'K' */ +#define VMDK_SPARSE_VERSION 1 + +#endif // _VMDK_H Property changes on: haiku/trunk/headers/private/vmdk/vmdk.h ___________________________________________________________________ Name: svn:mergeinfo + Modified: haiku/trunk/src/tools/vmdkimage/Jamfile =================================================================== --- haiku/trunk/src/tools/vmdkimage/Jamfile 2009-10-01 03:07:42 UTC (rev 33386) +++ haiku/trunk/src/tools/vmdkimage/Jamfile 2009-10-01 03:08:46 UTC (rev 33387) @@ -1,6 +1,7 @@ SubDir HAIKU_TOP src tools vmdkimage ; UsePrivateHeaders kernel ; +UsePrivateHeaders vmdk ; BuildPlatformMain vmdkimage : vmdkimage.cpp Modified: haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp =================================================================== --- haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp 2009-10-01 03:07:42 UTC (rev 33386) +++ haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp 2009-10-01 03:08:46 UTC (rev 33387) @@ -3,6 +3,7 @@ * Distributed under the terms of the MIT License. */ + #include #include #include @@ -15,13 +16,15 @@ #include #include -#include "vmdkimage.h" +#include + #if defined(__BEOS__) && !defined(__HAIKU__) #define pread(_fd, _buf, _count, _pos) read_pos(_fd, _pos, _buf, _count) #define realpath(x, y) NULL #endif + static void print_usage() { @@ -59,7 +62,7 @@ exit(EXIT_FAILURE); } - if (header.magicNumber != SPARSE_MAGICNUMBER) { + if (header.magicNumber != VMDK_SPARSE_MAGICNUMBER) { fprintf(stderr, "Error: invalid header magic.\n"); exit(EXIT_FAILURE); } @@ -108,10 +111,10 @@ } -static uint64 +static uint64_t hash_string(const char *string) { - uint64 hash = 0; + uint64_t hash = 0; char c; while ((c = *string++) != 0) { @@ -145,8 +148,8 @@ int main(int argc, char *argv[]) { - uint64 headerSize = 0; - uint64 imageSize = 0; + uint64_t headerSize = 0; + uint64_t imageSize = 0; const char *file = NULL; const char *uuid = NULL; bool headerOnly = false; @@ -277,9 +280,9 @@ // printf("imageSize %llu\n", imageSize); // printf("file %s\n", file); - uint64 sectors; - uint64 heads; - uint64 cylinders; + uint64_t sectors; + uint64_t heads; + uint64_t cylinders; // TODO: fixme! sectors = 63; @@ -294,8 +297,8 @@ memset(desc, 0, sizeof(desc)); memset(&header, 0, sizeof(header)); - header.magicNumber = SPARSE_MAGICNUMBER; - header.version = 1; + header.magicNumber = VMDK_SPARSE_MAGICNUMBER; + header.version = VMDK_SPARSE_VERSION; header.flags = 1; header.capacity = 0; header.grainSize = 16; @@ -312,7 +315,7 @@ header.doubleEndLineChar2 = '\n'; // Generate UUID for the image by hashing its full path - uint64 uuid1 = 0, uuid2 = 0, uuid3 = 0, uuid4 = 0, uuid5 = 0; + uint64_t uuid1 = 0, uuid2 = 0, uuid3 = 0, uuid4 = 0, uuid5 = 0; if (uuid == NULL) { char fullPath[PATH_MAX + 6]; strcpy(fullPath, "Haiku"); @@ -376,7 +379,7 @@ if (write(fd, desc, sizeof(desc)) != sizeof(desc)) goto write_err; - if ((uint64)lseek(fd, headerSize - 1, SEEK_SET) != headerSize - 1) + if ((uint64_t)lseek(fd, headerSize - 1, SEEK_SET) != headerSize - 1) goto write_err; if (1 != write(fd, "", 1)) Deleted: haiku/trunk/src/tools/vmdkimage/vmdkimage.h From bonefish at mail.berlios.de Thu Oct 1 05:09:26 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 05:09:26 +0200 Subject: [Haiku-commits] r33388 - in haiku/trunk/src/add-ons/kernel/partitioning_systems: . vmdk Message-ID: <200910010309.n9139QYB007214@sheep.berlios.de> Author: bonefish Date: 2009-10-01 05:09:18 +0200 (Thu, 01 Oct 2009) New Revision: 33388 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33388&view=rev Added: haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/ haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/Jamfile Log: Implemented a "vmdk" partitioning system. It allows to access the contents of monolithic vmware images as produced by the build system (by registering such an image via the "diskimage" tool). Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/Jamfile 2009-10-01 03:08:46 UTC (rev 33387) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/Jamfile 2009-10-01 03:09:18 UTC (rev 33388) @@ -1,8 +1,9 @@ SubDir HAIKU_TOP src add-ons kernel partitioning_systems ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems amiga ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems apple ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems atari ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems efi ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems intel ; -SubInclude HAIKU_TOP src add-ons kernel partitioning_systems session ; +HaikuSubInclude amiga ; +HaikuSubInclude apple ; +HaikuSubInclude atari ; +HaikuSubInclude efi ; +HaikuSubInclude intel ; +HaikuSubInclude session ; +HaikuSubInclude vmdk ; Property changes on: haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk ___________________________________________________________________ Name: svn:mergeinfo + Added: haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile 2009-10-01 03:08:46 UTC (rev 33387) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile 2009-10-01 03:09:18 UTC (rev 33388) @@ -0,0 +1,10 @@ +SubDir HAIKU_TOP src add-ons kernel partitioning_systems vmdk ; + +UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; +UsePrivateHeaders kernel ; +UsePrivateHeaders shared ; +UsePrivateHeaders storage ; +UsePrivateHeaders vmdk ; +UsePrivateSystemHeaders ; + +KernelAddon vmdk : vmdk.cpp ; Added: haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp 2009-10-01 03:08:46 UTC (rev 33387) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp 2009-10-01 03:09:18 UTC (rev 33388) @@ -0,0 +1,517 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#include + +//#define TRACE_VMDK 1 +#ifdef _BOOT_MODE +# include +# include +# undef TRACE_VMDK +#else +# include +#endif + +#if TRACE_VMDK +# define TRACE(x...) dprintf("vmdk: " x) +#else +# define TRACE(x...) do { } while (false) +#endif + + +// module name +#define VMDK_PARTITION_MODULE_NAME "partitioning_systems/vmdk/v1" + + +// #pragma mark - VMDK header/descriptor parsing + + +static const off_t kMaxDescriptorSize = 64 * 1024; + + +struct VmdkCookie { + VmdkCookie(off_t contentOffset, off_t contentSize) + : + contentOffset(contentOffset), + contentSize(contentSize) + { + } + + off_t contentOffset; + off_t contentSize; +}; + + +enum { + TOKEN_END, + TOKEN_STRING, + TOKEN_ASSIGN +}; + +struct Token { + int type; + size_t length; + char string[1024]; + + void SetToEnd() + { + type = TOKEN_END; + string[0] = '\0'; + length = 0; + } + + void SetToAssign() + { + type = TOKEN_ASSIGN; + string[0] = '='; + string[1] = '\0'; + length = 0; + } + + void SetToString() + { + type = TOKEN_STRING; + string[0] = '\0'; + length = 0; + } + + void PushChar(char c) + { + if (length + 1 < sizeof(string)) { + string[length++] = c; + string[length] = '\0'; + } + } + + bool operator==(const char* other) const + { + return strcmp(string, other) == 0; + } + + bool operator!=(const char* other) const + { + return !(*this == other); + } +}; + + +static status_t +read_file(int fd, off_t offset, void* buffer, size_t size) +{ + ssize_t bytesRead = pread(fd, buffer, size, offset); + if (bytesRead < 0) + return errno; + + return (size_t)bytesRead == size ? B_OK : B_ERROR; +} + + +static int +next_token(char*& line, const char* lineEnd, Token& token) +{ + // skip whitespace + while (line != lineEnd && isspace(*line)) + line++; + + // comment/end of line + if (line == lineEnd || *line == '#') { + token.SetToEnd(); + return token.type; + } + + switch (*line) { + case '=': + { + line++; + token.SetToAssign(); + return token.type; + } + + case '"': + { + // quoted string + token.SetToString(); + line++; + while (line != lineEnd) { + if (*line == '"') { + // end of string + line++; + break; + } + + if (*line == '\\') { + // escaped char + line++; + if (line == lineEnd) + break; + } + + token.PushChar(*(line++)); + } + + return token.type; + } + + default: + { + // unquoted string + token.SetToString(); + while (line != lineEnd && *line != '#' && *line != '=' + && !isspace(*line)) { + token.PushChar(*(line++)); + } + return token.type; + } + } +} + + +static status_t +parse_vmdk_header(int fd, off_t fileSize, VmdkCookie*& _cookie) +{ + // read the header + SparseExtentHeader header; + status_t error = read_file(fd, 0, &header, sizeof(header)); + if (error != B_OK) + return error; + + // check the header + if (header.magicNumber != VMDK_SPARSE_MAGICNUMBER) { + TRACE("Error: Header magic mismatch!\n"); + return B_BAD_DATA; + } + + if (header.version != VMDK_SPARSE_VERSION) { + TRACE("Error: Header version mismatch!\n"); + return B_BAD_DATA; + } + + if (header.overHead > (uint64_t)fileSize / 512) { + TRACE("Error: Header overHead invalid!\n"); + return B_BAD_DATA; + } + off_t headerSize = header.overHead * 512; + + if (header.descriptorOffset < (sizeof(header) + 511) / 512 + || header.descriptorOffset >= header.overHead + || header.descriptorSize == 0 + || header.overHead - header.descriptorOffset < header.descriptorSize) { + TRACE("Error: Invalid descriptor location!\n"); + return B_BAD_DATA; + } + off_t descriptorOffset = header.descriptorOffset * 512; + off_t descriptorSize = header.descriptorSize * 512; + + if (descriptorSize > kMaxDescriptorSize) { + TRACE("Error: Unsupported descriptor size!\n"); + return B_UNSUPPORTED; + } + + // read descriptor + char* descriptor = (char*)malloc(descriptorSize + 1); + if (descriptor == NULL) { + TRACE("Error: Descriptor allocation failed!\n"); + return B_NO_MEMORY; + } + MemoryDeleter descriptorDeleter(descriptor); + + error = read_file(fd, descriptorOffset, descriptor, descriptorSize); + if (error != B_OK) + return error; + + // determine the actual descriptor size + descriptor[descriptorSize] = '\0'; + descriptorSize = strlen(descriptor); + + // parse descriptor + uint64_t extendOffset = 0; + uint64_t extendSize = 0; + + char* line = descriptor; + char* descriptorEnd = line + descriptorSize; + while (line < descriptorEnd) { + // determine the end of the line + char* lineEnd = strchr(line, '\n'); + if (lineEnd != NULL) + *lineEnd = '\0'; + else + lineEnd = descriptorEnd; + + Token token; + if (next_token(line, lineEnd, token) == TOKEN_END) { + line = lineEnd + 1; + continue; + } + + Token token2; + switch (next_token(line, lineEnd, token2)) { + case TOKEN_END: + break; + + case TOKEN_ASSIGN: + if (next_token(line, lineEnd, token2) != TOKEN_STRING) { + TRACE("Line not understood: %s = ?\n", token.string); + break; + } + + if (token == "version") { + if (token2 != "1") { + TRACE("Unsupported descriptor version: %s\n", + token2.string); + return B_UNSUPPORTED; + } + } else if (token == "createType") { + if (token2 != "monolithicFlat") { + TRACE("Unsupported descriptor createType: %s\n", + token2.string); + return B_UNSUPPORTED; + } + } + + break; + + case TOKEN_STRING: + if (token != "RW") + break; + + extendSize = strtoll(token2.string, NULL, 0); + if (extendSize == 0) { + TRACE("Bad extend size.\n"); + return B_BAD_DATA; + } + + if (next_token(line, lineEnd, token) != TOKEN_STRING + || token != "FLAT" + || next_token(line, lineEnd, token) != TOKEN_STRING + // image name + || next_token(line, lineEnd, token2) != TOKEN_STRING) { + TRACE("Invalid/unsupported extend line\n"); + break; + } + + extendOffset = strtoll(token2.string, 0, NULL); + if (extendOffset == 0) { + TRACE("Bad extend offset.\n"); + return B_BAD_DATA; + } + + break; + } + + line = lineEnd + 1; + } + + if (extendOffset < (uint64_t)headerSize / 512 + || extendOffset >= (uint64_t)fileSize / 512 + || extendSize == 0 + || (uint64_t)fileSize / 512 - extendOffset < extendSize) { + TRACE("Error: Invalid extend location!\n"); + return B_BAD_DATA; + } + + TRACE("descriptor len: %lld\n", descriptorSize); + TRACE("header size: %lld\n", headerSize); + TRACE("file size: %lld\n", fileSize); + TRACE("extend offset: %lld\n", extendOffset * 512); + TRACE("extend size: %lld\n", extendSize * 512); + + VmdkCookie* cookie = new(std::nothrow) VmdkCookie(extendOffset * 512, + extendSize * 512); + if (cookie == NULL) + return B_NO_MEMORY; + + _cookie = cookie; + return B_OK; +} + + +// #pragma mark - module hooks + + +static status_t +vmdk_std_ops(int32 op, ...) +{ + TRACE("vmdk_std_ops(0x%lx)\n", op); + switch(op) { + case B_MODULE_INIT: + case B_MODULE_UNINIT: + return B_OK; + } + return B_ERROR; +} + + +static float +vmdk_identify_partition(int fd, partition_data* partition, void** _cookie) +{ + TRACE("vmdk_identify_partition(%d, %ld: %lld, %lld, %ld)\n", fd, + partition->id, partition->offset, partition->size, + partition->block_size); + + VmdkCookie* cookie; + status_t error = parse_vmdk_header(fd, partition->size, cookie); + if (error != B_OK) + return -1; + + *_cookie = cookie; + return 0.8f; +} + + +static status_t +vmdk_scan_partition(int fd, partition_data* partition, void* _cookie) +{ + TRACE("vmdk_scan_partition(%d, %ld: %lld, %lld, %ld)\n", fd, + partition->id, partition->offset, partition->size, + partition->block_size); + + VmdkCookie* cookie = (VmdkCookie*)_cookie; + ObjectDeleter cookieDeleter(cookie); + + // fill in the partition_data structure + partition->status = B_PARTITION_VALID; + partition->flags |= B_PARTITION_PARTITIONING_SYSTEM; + partition->content_size = partition->size; + // (no content_name and content_parameters) + // (content_type is set by the system) + partition->content_cookie = cookie; + + // child + partition_data* child = create_child_partition(partition->id, 0, + partition->offset + cookie->contentOffset, cookie->contentSize, -1); + if (child == NULL) { + partition->content_cookie = NULL; + return B_ERROR; + } + + child->block_size = partition->block_size; + // (no name) + child->type = strdup(kPartitionTypeUnrecognized); + child->parameters = NULL; + child->cookie = NULL; + + // check for allocation problems + if (child->type == NULL) { + partition->content_cookie = NULL; + return B_NO_MEMORY; + } + + cookieDeleter.Detach(); + return B_OK; +} + + +static void +vmdk_free_identify_partition_cookie(partition_data*/* partition*/, void* cookie) +{ + delete (VmdkCookie*)cookie; +} + + +static void +vmdk_free_partition_cookie(partition_data* partition) +{ + // called for the child partition -- it doesn't have a cookie +} + + +static void +vmdk_free_partition_content_cookie(partition_data* partition) +{ + delete (VmdkCookie*)partition->content_cookie; +} + + +#ifdef _BOOT_MODE +partition_module_info gVMwarePartitionModule = +#else +static partition_module_info vmdk_partition_module = +#endif +{ + { + VMDK_PARTITION_MODULE_NAME, + 0, + vmdk_std_ops + }, + "vmdk", // short_name + VMDK_PARTITION_NAME, // pretty_name + + // flags + 0, + + // scanning + vmdk_identify_partition, // identify_partition + vmdk_scan_partition, // scan_partition + vmdk_free_identify_partition_cookie, // free_identify_partition_cookie + vmdk_free_partition_cookie, // free_partition_cookie + vmdk_free_partition_content_cookie, // free_partition_content_cookie + +#ifndef _BOOT_MODE + // querying (obsolete) + NULL, // get_supported_operations + NULL, // get_supported_child_operations + NULL, // supports_initializing_child + NULL, // is_sub_system_for + + // validation hooks (obsolete) + NULL, // validate_resize + NULL, // validate_resize_child + NULL, // validate_move + NULL, // validate_move_child + NULL, // validate_set_name + NULL, // validate_set_content_name + NULL, // validate_set_type + NULL, // validate_set_parameters + NULL, // validate_set_content_parameters + NULL, // validate_initialize + NULL, // validate_create_child + NULL, // get_partitionable_spaces + NULL, // get_next_supported_type + NULL, // get_type_for_content_type + + // shadow partition modification (obsolete) + NULL, // shadow_changed + + // writing + NULL, // repair + NULL, // resize + NULL, // resize_child + NULL, // move + NULL, // move_child + NULL, // set_name + NULL, // set_content_name + NULL, // set_type + NULL, // set_parameters + NULL, // set_content_parameters + NULL, // initialize + NULL, // create_child + NULL, // delete_child +#else + NULL +#endif // _BOOT_MODE +}; + + +#ifndef _BOOT_MODE +extern "C" partition_module_info* modules[]; +_EXPORT partition_module_info* modules[] = +{ + &vmdk_partition_module, + NULL +}; +#endif From bonefish at mail.berlios.de Thu Oct 1 06:38:28 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 06:38:28 +0200 Subject: [Haiku-commits] r33389 - haiku/trunk/src/system/kernel/debug Message-ID: <200910010438.n914cSBP025067@sheep.berlios.de> Author: bonefish Date: 2009-10-01 06:38:19 +0200 (Thu, 01 Oct 2009) New Revision: 33389 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33389&view=rev Modified: haiku/trunk/src/system/kernel/debug/tracing.cpp Log: Don't destroy tracing entries. This is not necessary and even harmful, if the code is no longer loaded, e.g. when the module has been unloaded or the tracing buffer was reattached from a previous session. Modified: haiku/trunk/src/system/kernel/debug/tracing.cpp =================================================================== --- haiku/trunk/src/system/kernel/debug/tracing.cpp 2009-10-01 03:09:18 UTC (rev 33388) +++ haiku/trunk/src/system/kernel/debug/tracing.cpp 2009-10-01 04:38:19 UTC (rev 33389) @@ -253,8 +253,9 @@ if (fFirstEntry->flags & BUFFER_ENTRY) { // a buffer entry -- just skip it } else if (fFirstEntry->flags & ENTRY_INITIALIZED) { - // fully initialized TraceEntry -- destroy it - TraceEntry::FromTraceEntry(fFirstEntry)->~TraceEntry(); + // Fully initialized TraceEntry: We could destroy it, but don't do so + // for sake of robustness. The destructors of tracing entry classes + // should be empty anyway. fEntries--; } else { // Not fully initialized TraceEntry. We can't free it, since From phoudoin at mail.berlios.de Thu Oct 1 09:45:09 2009 From: phoudoin at mail.berlios.de (phoudoin at mail.berlios.de) Date: Thu, 1 Oct 2009 09:45:09 +0200 Subject: [Haiku-commits] r33390 - haiku/trunk/src/preferences/opengl Message-ID: <200910010745.n917j9iR008809@sheep.berlios.de> Author: phoudoin Date: 2009-10-01 09:45:06 +0200 (Thu, 01 Oct 2009) New Revision: 33390 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33390&view=rev Added: haiku/trunk/src/preferences/opengl/logo.png Removed: haiku/trunk/src/preferences/opengl/OpenGL_logo.png Modified: haiku/trunk/src/preferences/opengl/LogoView.cpp haiku/trunk/src/preferences/opengl/OpenGL.rdef Log: We can't use OpenGL logo before we obtains a license from SGI. Meanwhile, let's replace it with a classical glgears one. BTW, we need an icon for this preflet, currently it's the Network preflet one! People more fluent with Icon-O-Matic than me (aka everybody) are welcome. Modified: haiku/trunk/src/preferences/opengl/LogoView.cpp =================================================================== --- haiku/trunk/src/preferences/opengl/LogoView.cpp 2009-10-01 04:38:19 UTC (rev 33389) +++ haiku/trunk/src/preferences/opengl/LogoView.cpp 2009-10-01 07:45:06 UTC (rev 33390) @@ -22,7 +22,7 @@ fLogo(NULL) { SetViewColor(255, 255, 255); - fLogo = BTranslationUtils::GetBitmap(B_PNG_FORMAT, "OpenGL_logo.png"); + fLogo = BTranslationUtils::GetBitmap(B_PNG_FORMAT, "logo.png"); if (fLogo) { SetExplicitMinSize( BSize(fLogo->Bounds().Width(), fLogo->Bounds().Height() + 6)); Modified: haiku/trunk/src/preferences/opengl/OpenGL.rdef =================================================================== --- haiku/trunk/src/preferences/opengl/OpenGL.rdef 2009-10-01 04:38:19 UTC (rev 33389) +++ haiku/trunk/src/preferences/opengl/OpenGL.rdef 2009-10-01 07:45:06 UTC (rev 33390) @@ -15,7 +15,7 @@ long_info = "OpenGL ?2009 Haiku" }; -resource(1, "OpenGL_logo.png") #'PNG ' import "OpenGL_logo.png"; +resource(1, "logo.png") #'PNG ' import "logo.png"; resource vector_icon { $"6E6369660B0500020016023A3D24339506B715A93DDB134A79084A1A1100D7FF" Deleted: haiku/trunk/src/preferences/opengl/OpenGL_logo.png Added: haiku/trunk/src/preferences/opengl/logo.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/src/preferences/opengl/logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From superstippi at gmx.de Thu Oct 1 10:01:03 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Thu, 01 Oct 2009 10:01:03 +0200 Subject: [Haiku-commits] r33379 - haiku/trunk/src/apps/installer In-Reply-To: <200910010014.n910Ee2P019126@sheep.berlios.de> References: <200910010014.n910Ee2P019126@sheep.berlios.de> Message-ID: <20091001100103.487.3@bepc.1254381245.fake> Hi Jonas, > Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp > =================================================================== > --- haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 > 00:03:00 UTC (rev 33378) > +++ haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 > 00:14:40 UTC (rev 33379) > @@ -302,9 +302,7 @@ > // assume that the first frame event is because of this adoption > and // move ourselves to the screen center... > fNeedsToCenterOnScreen = false; > - BRect frame = BScreen(this).Frame(); > - MoveTo(frame.left + (frame.Width() - Frame().Width()) / 2, > - frame.top + (frame.Height() - Frame().Height()) / 2); > + CenterOnScreen(); > } > } Thanks a whole bunch for making these cleanups! It's greatly appreciated. Just wanted to point out that this one can be reduced further, since FrameResized() is only overridden to center on screen, the call can be moved into the constructor. Best regards, -Stephan From bonefish at mail.berlios.de Thu Oct 1 11:30:50 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 11:30:50 +0200 Subject: [Haiku-commits] r33391 - haiku/trunk/src/system/kernel/debug Message-ID: <200910010930.n919Uog7032146@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:30:46 +0200 (Thu, 01 Oct 2009) New Revision: 33391 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33391&view=rev Modified: haiku/trunk/src/system/kernel/debug/BreakpointManager.cpp Log: Fixed build with tracing enabled. Modified: haiku/trunk/src/system/kernel/debug/BreakpointManager.cpp =================================================================== --- haiku/trunk/src/system/kernel/debug/BreakpointManager.cpp 2009-10-01 07:45:06 UTC (rev 33390) +++ haiku/trunk/src/system/kernel/debug/BreakpointManager.cpp 2009-10-01 09:30:46 UTC (rev 33391) @@ -720,7 +720,7 @@ area_id area = _user_area_for(address); if (area < 0) { TRACE("BreakpointManager::_WriteMemory(): area not found for " - "address: %#lx: %lx\n", address, area); + "address: %p: %lx\n", address, area); error = area; break; } From bonefish at mail.berlios.de Thu Oct 1 11:31:24 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Thu, 1 Oct 2009 11:31:24 +0200 Subject: [Haiku-commits] r33392 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200910010931.n919VOwD032194@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:31:20 +0200 (Thu, 01 Oct 2009) New Revision: 33392 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33392&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_user_debugger.cpp Log: Improved comment. Modified: haiku/trunk/src/system/kernel/arch/x86/arch_user_debugger.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_user_debugger.cpp 2009-10-01 09:30:46 UTC (rev 33391) +++ haiku/trunk/src/system/kernel/arch/x86/arch_user_debugger.cpp 2009-10-01 09:31:20 UTC (rev 33392) @@ -767,7 +767,7 @@ /** - * Interrupts are disabled. + * Interrupts are disabled. \a frame is unused, i.e. can be \c NULL. */ void x86_init_user_debug_at_kernel_exit(struct iframe *frame) From bonefish at mail.berlios.de Thu Oct 1 11:37:24 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 1 Oct 2009 11:37:24 +0200 Subject: [Haiku-commits] r33393 - in haiku/trunk/src/apps/debugger: . types Message-ID: <200910010937.n919bOAi000090@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:37:24 +0200 (Thu, 01 Oct 2009) New Revision: 33393 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33393&view=rev Added: haiku/trunk/src/apps/debugger/types/ArrayIndexPath.cpp haiku/trunk/src/apps/debugger/types/ArrayIndexPath.h Modified: haiku/trunk/src/apps/debugger/Jamfile Log: Added ArrayIndexPath, a small class storing a index list for identifying an element in a multi-dimensional array, featuring conversion from and to string. Modified: haiku/trunk/src/apps/debugger/Jamfile =================================================================== --- haiku/trunk/src/apps/debugger/Jamfile 2009-10-01 09:31:20 UTC (rev 33392) +++ haiku/trunk/src/apps/debugger/Jamfile 2009-10-01 09:37:24 UTC (rev 33393) @@ -140,6 +140,7 @@ X86AssemblyLanguage.cpp # types + ArrayIndexPath.cpp TargetAddressRangeList.cpp ValueLocation.cpp Added: haiku/trunk/src/apps/debugger/types/ArrayIndexPath.cpp =================================================================== --- haiku/trunk/src/apps/debugger/types/ArrayIndexPath.cpp 2009-10-01 09:31:20 UTC (rev 33392) +++ haiku/trunk/src/apps/debugger/types/ArrayIndexPath.cpp 2009-10-01 09:37:24 UTC (rev 33393) @@ -0,0 +1,100 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include "ArrayIndexPath.h" + +#include + +#include + + +static const char kIndexSeparator = ';'; + + +ArrayIndexPath::ArrayIndexPath() +{ +} + + +ArrayIndexPath::ArrayIndexPath(const ArrayIndexPath& other) + : + fIndices(other.fIndices) +{ +} + + +ArrayIndexPath::~ArrayIndexPath() +{ +} + + +bool +ArrayIndexPath::SetTo(const char* path) +{ + fIndices.Clear(); + + if (path == NULL) + return true; + + while (*path != '\0') { + char* numberEnd; + int64 index = strtoll(path, &numberEnd, 0); + if (numberEnd == path) + return false; + path = numberEnd; + + if (!fIndices.Add(index)) + return false; + + if (*path == '\0') + break; + + if (*path != kIndexSeparator) + return false; + path++; + } + + return true; +} + + +void +ArrayIndexPath::Clear() +{ + fIndices.Clear(); +} + + +bool +ArrayIndexPath::GetPathString(BString& path) const +{ + path.Truncate(0); + + int32 count = CountIndices(); + for (int32 i = 0; i < count; i++) { + // append separator for all but the first index + if (i > 0) { + int32 oldLength = path.Length(); + if (path.Append(kIndexSeparator, 1).Length() != oldLength + 1) + return false; + } + + // append index + int32 oldLength = path.Length(); + if ((path << IndexAt(i)).Length() == oldLength) + return false; + } + + return true; +} + + +ArrayIndexPath& +ArrayIndexPath::operator=(const ArrayIndexPath& other) +{ + fIndices = other.fIndices; + return *this; +} Added: haiku/trunk/src/apps/debugger/types/ArrayIndexPath.h =================================================================== --- haiku/trunk/src/apps/debugger/types/ArrayIndexPath.h 2009-10-01 09:31:20 UTC (rev 33392) +++ haiku/trunk/src/apps/debugger/types/ArrayIndexPath.h 2009-10-01 09:37:24 UTC (rev 33393) @@ -0,0 +1,64 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef ARRAY_INDEX_PATH_H +#define ARRAY_INDEX_PATH_H + + +#include "Array.h" +#include "Types.h" + + +class BString; + + +class ArrayIndexPath { +public: + ArrayIndexPath(); + ArrayIndexPath(const ArrayIndexPath& other); + ~ArrayIndexPath(); + + bool SetTo(const char* path); + void Clear(); + + bool GetPathString(BString& path) const; + + inline int32 CountIndices() const; + inline int64 IndexAt(int32 index) const; + inline bool AddIndex(int64 index); + + + ArrayIndexPath& operator=(const ArrayIndexPath& other); + +private: + typedef Array IndexArray; + +private: + IndexArray fIndices; +}; + + +int32 +ArrayIndexPath::CountIndices() const +{ + return fIndices.Count(); +} + + +int64 +ArrayIndexPath::IndexAt(int32 index) const +{ + return index >= 0 && index < fIndices.Count() + ? fIndices.ElementAt(index) : -1; +} + + +bool +ArrayIndexPath::AddIndex(int64 index) +{ + return fIndices.Add(index); +} + + +#endif // ARRAY_INDEX_PATH_H From bonefish at mail.berlios.de Thu Oct 1 11:38:32 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 1 Oct 2009 11:38:32 +0200 Subject: [Haiku-commits] r33394 - haiku/trunk/src/apps/debugger/debug_info Message-ID: <200910010938.n919cWAp000208@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:38:31 +0200 (Thu, 01 Oct 2009) New Revision: 33394 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33394&view=rev Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp Log: * Fixed typos in comparisons. * Some more output on error. Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp 2009-10-01 09:37:24 UTC (rev 33393) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp 2009-10-01 09:38:31 UTC (rev 33394) @@ -1653,10 +1653,13 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, DIEArrayType* typeEntry, DwarfType*& _type) { + TRACE_LOCALS("DwarfStackFrameDebugInfo::_CreateArrayType(\"%s\", %p)\n", + name.String(), typeEntry); + // create the base type DIEArrayType* baseTypeOwnerEntry = DwarfUtils::GetDIEByPredicate( typeEntry, HasTypePredicate()); - if (baseTypeOwnerEntry != NULL) { + if (baseTypeOwnerEntry == NULL) { WARNING("Failed to get base type for array type \"%s\"\n", name.String()); return B_BAD_VALUE; @@ -1664,8 +1667,11 @@ DwarfType* baseType = NULL; status_t error = _CreateType(baseTypeOwnerEntry->GetType(), baseType); - if (error != B_OK) + if (error != B_OK) { + WARNING("Failed to create base type for array type \"%s\": %s\n", + name.String(), strerror(error)); return error; + } Reference baseTypeReference(baseType, true); // create the array type @@ -1679,7 +1685,7 @@ DIEArrayType* dimensionOwnerEntry = DwarfUtils::GetDIEByPredicate( typeEntry, HasDimensionsPredicate()); - if (dimensionOwnerEntry != NULL) { + if (dimensionOwnerEntry == NULL) { WARNING("Failed to get dimensions for array type \"%s\"\n", name.String()); return B_BAD_VALUE; @@ -1693,8 +1699,11 @@ // get/create the dimension type DwarfType* dimensionType = NULL; status_t error = _CreateType(dimensionEntry, dimensionType); - if (error != B_OK) + if (error != B_OK) { + WARNING("Failed to create type for array dimension: %s\n", + strerror(error)); return error; + } Reference dimensionTypeReference(dimensionType, true); // create and add the array dimension object From bonefish at mail.berlios.de Thu Oct 1 11:40:42 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 1 Oct 2009 11:40:42 +0200 Subject: [Haiku-commits] r33395 - haiku/trunk/src/apps/debugger/model Message-ID: <200910010940.n919eglb000455@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:40:41 +0200 (Thu, 01 Oct 2009) New Revision: 33395 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33395&view=rev Modified: haiku/trunk/src/apps/debugger/model/TypeComponentPath.h Log: Since arrays can be multi-dimensional, a single index does not suffice to identify an element. We use the name string of the TypeComponent as index path. Modified: haiku/trunk/src/apps/debugger/model/TypeComponentPath.h =================================================================== --- haiku/trunk/src/apps/debugger/model/TypeComponentPath.h 2009-10-01 09:38:31 UTC (rev 33394) +++ haiku/trunk/src/apps/debugger/model/TypeComponentPath.h 2009-10-01 09:40:41 UTC (rev 33395) @@ -11,6 +11,7 @@ #include #include +#include "ArrayIndexPath.h" #include "Type.h" @@ -68,14 +69,22 @@ this->name = name; } - void SetToArrayElement(type_kind typeKind, uint64 index) + void SetToArrayElement(type_kind typeKind, const BString& indexPath) { this->componentKind = TYPE_COMPONENT_ARRAY_ELEMENT; this->typeKind = typeKind; - this->index = index; - this->name = name; + this->index = 0; + this->name = indexPath; } + bool SetToArrayElement(type_kind typeKind, const ArrayIndexPath& indexPath) + { + this->componentKind = TYPE_COMPONENT_ARRAY_ELEMENT; + this->typeKind = typeKind; + this->index = 0; + return indexPath.GetPathString(this->name); + } + uint32 HashValue() const; void Dump() const; From bonefish at mail.berlios.de Thu Oct 1 11:41:49 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 1 Oct 2009 11:41:49 +0200 Subject: [Haiku-commits] r33396 - haiku/trunk/src/apps/debugger/gui/team_window Message-ID: <200910010941.n919fnDG000647@sheep.berlios.de> Author: bonefish Date: 2009-10-01 11:41:49 +0200 (Thu, 01 Oct 2009) New Revision: 33396 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33396&view=rev Modified: haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp Log: Added support for displaying arrays. Their element's values aren't retrieved yet, though. Modified: haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp 2009-10-01 09:40:41 UTC (rev 33395) +++ haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp 2009-10-01 09:41:49 UTC (rev 33396) @@ -28,11 +28,14 @@ VALUE_NODE_TYPE = 'valn' }; +// maximum number of array elements to show by default +static const uint64 kMaxArrayElementCount = 10; + class VariablesView::ValueNode : public Referenceable { public: ValueNode(ValueNode* parent, Variable* variable, TypeComponentPath* path, - const BString& name, Type* type) + const BString& name, Type* type, bool isPresentationNode) : fParent(parent), fVariable(variable), @@ -40,7 +43,8 @@ fName(name), fType(type), fRawType(type->ResolveRawType()), - fChildrenAdded(false) + fChildrenAdded(false), + fIsPresentationNode(isPresentationNode) { fVariable->AcquireReference(); fPath->AcquireReference(); @@ -99,6 +103,11 @@ fValue = value; } + bool IsPresentationNode() const + { + return fIsPresentationNode; + } + int32 CountChildren() const { return fChildren.CountItems(); @@ -146,6 +155,7 @@ BVariant fValue; ChildList fChildren; bool fChildrenAdded; + bool fIsPresentationNode; }; @@ -394,7 +404,7 @@ Reference pathReference(path, true); ValueNode* node = new(std::nothrow) ValueNode(NULL, variable, path, - variable->Name(), variable->GetType()); + variable->Name(), variable->GetType(), false); if (node == NULL || !fNodes.AddItem(node)) { delete node; return; @@ -520,9 +530,77 @@ dereferencedType = true; break; case TYPE_ARRAY: + { TRACE_LOCALS("TYPE_ARRAY\n"); - // TODO:... + ArrayType* arrayType = dynamic_cast(type); + int32 dimensionCount = arrayType->CountDimensions(); + + // get the base array indices + ArrayIndexPath baseIndexPath; + int32 baseDimension = 0; + if (node->Parent() != NULL + && node->Parent()->GetType() == type) { + TypeComponent arrayComponent + = path->ComponentAt(path->CountComponents() - 1); + if (arrayComponent.componentKind + != TYPE_COMPONENT_ARRAY_ELEMENT) { + ERROR("Unexpected array type path component!\n"); + return; + } + + if (!baseIndexPath.SetTo(arrayComponent.name.String())) + return; + + baseDimension = baseIndexPath.CountIndices(); + } + + if (baseDimension >= dimensionCount) { + ERROR("Unexpected array base dimension!\n"); + return; + } + bool isFinalDimension = baseDimension + 1 == dimensionCount; + + ArrayDimension* dimension = arrayType->DimensionAt( + baseDimension); + uint64 elementCount = dimension->CountElements(); + if (elementCount == 0 + || elementCount > kMaxArrayElementCount) { + elementCount = kMaxArrayElementCount; + } + + // create children for the array elements + for (int32 i = 0; i < (int32)elementCount; i++) { + ArrayIndexPath indexPath(baseIndexPath); + if (indexPath.CountIndices() + != baseIndexPath.CountIndices() + || !indexPath.AddIndex(i)) { + return; + } + + component.SetToArrayElement(type->Kind(), indexPath); + TypeComponentPath* elementPath + = new(std::nothrow) TypeComponentPath(*path); + if (elementPath == NULL + || elementPath->CountComponents() + != path->CountComponents() + || !elementPath->AddComponent(component)) { + delete elementPath; + return; + } + Reference elementPathReference( + elementPath, true); + + BString name(node->Name()); + name << '[' << i << ']'; + + _AddChildNode(node, node->GetVariable(), elementPath, + name, + isFinalDimension ? arrayType->BaseType() : type, + !isFinalDimension); + } + return; + } case TYPE_ENUMERATION: TRACE_LOCALS("TYPE_ENUMERATION\n"); done = true; @@ -546,10 +624,11 @@ } void _AddChildNode(ValueNode* parent, Variable* variable, - TypeComponentPath* path, const BString& name, Type* type) + TypeComponentPath* path, const BString& name, Type* type, + bool isPresentationNode = false) { ValueNode* node = new(std::nothrow) ValueNode(parent, variable, path, - name, type); + name, type, isPresentationNode); if (node == NULL || !parent->AddChild(node)) { delete node; return; @@ -723,6 +802,9 @@ // request the values of all children that don't have any yet for (int32 i = 0; ValueNode* child = node->ChildAt(i); i++) { + if (child->IsPresentationNode()) + continue; + Variable* variable = child->GetVariable(); TypeComponentPath* path = child->Path(); if (fStackFrame->Values()->HasValue(variable->ID(), *path)) From korli at users.berlios.de Thu Oct 1 19:17:47 2009 From: korli at users.berlios.de (=?ISO-8859-1?B?Suly9G1lIER1dmFs?=) Date: Thu, 1 Oct 2009 19:17:47 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: 2009/10/1 Michael Weirauch : > 2009/9/30 PulkoMandy : >> What other solution do you suggest, in order not to leak the be_catalog in >> any case and be able to use it as needed ? >> GSoC is finished now, I'd be happy if other people started to improve the >> code of the locale kit. I'm sure you can help :) > > In expectation that might be utterly wrong: :) > > Index: src/kits/locale/Locale.cpp > =================================================================== > --- src/kits/locale/Locale.cpp ?(revision 33370) > +++ src/kits/locale/Locale.cpp ?(working copy) > @@ -24,6 +24,8 @@ > > ?BLocale::~BLocale() > ?{ > + ? ? ? delete be_app_catalog; > + ? ? ? delete be_catalog; > ?} > > > @@ -46,9 +48,7 @@ > > ?status_t > ?BLocale::GetAppCatalog(BCatalog *catalog) { > - ? ? ? if (!catalog) > - ? ? ? ? ? ? ? return B_BAD_VALUE; > ? ? ? ?if (be_catalog) > ? ? ? ? ? ? ? ?debugger( "GetAppCatalog() has been called while > be_catalog != NULL"); > - ? ? ? return BCatalog::GetAppCatalog(catalog); > + ? ? ? return BCatalog::GetAppCatalog(catalog ? catalog : new BCatalog); > ?} > > > Allows for be_locale->GetAppCatalog(NULL); and makes sure the be_[app_]catalog > are being freed when my printfs() didn't fool me. > > Whenever the locale changes, call GetAppCatalog again and work with > be_[app_]catalog? This would be the idea, yes. Bye, J?r?me From pulkomandy at mail.berlios.de Thu Oct 1 19:26:15 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Thu, 1 Oct 2009 19:26:15 +0200 Subject: [Haiku-commits] r33397 - haiku/trunk/src/preferences/bluetooth Message-ID: <200910011726.n91HQF4u005001@sheep.berlios.de> Author: pulkomandy Date: 2009-10-01 19:26:12 +0200 (Thu, 01 Oct 2009) New Revision: 33397 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33397&view=rev Added: haiku/trunk/src/preferences/bluetooth/de.catkeys Modified: haiku/trunk/src/preferences/bluetooth/Jamfile Log: German localization for bluetooth preflet, done by svend. Thanks ! Modified: haiku/trunk/src/preferences/bluetooth/Jamfile =================================================================== --- haiku/trunk/src/preferences/bluetooth/Jamfile 2009-10-01 09:41:49 UTC (rev 33396) +++ haiku/trunk/src/preferences/bluetooth/Jamfile 2009-10-01 17:26:12 UTC (rev 33397) @@ -28,6 +28,6 @@ InquiryPanel.cpp RemoteDevicesView.cpp : en.catalog - : fr.catkeys ru.catkeys + : fr.catkeys ru.catkeys de.catkeys ; Added: haiku/trunk/src/preferences/bluetooth/de.catkeys =================================================================== --- haiku/trunk/src/preferences/bluetooth/de.catkeys 2009-10-01 09:41:49 UTC (rev 33396) +++ haiku/trunk/src/preferences/bluetooth/de.catkeys 2009-10-01 17:26:12 UTC (rev 33397) @@ -0,0 +1,54 @@ +1 german x-vnd.Haiku-BluetoothPrefs 406799883 +About? Window ?ber? +Handheld Settings view Handheld +Only from Trusted devices Settings view Nur von vertrauten Ger?ten +Add device to list Inquiry panel Ger?t zu Liste hinzuf?gen +Starting scan... Inquiry panel Starte Suche... +Smart Phone Settings view Smartphone + seconds Inquiry panel Sekunden +Remote Devices Window Entfernte Ger?te +Server Settings view Server +Default Inquiry time: Settings view Standard Nachfragezeit: +Identify host as: Settings view identifiziere Host als: +View Window Ansicht +Refresh? Remote devices Aktuallisieren? +Show Bluetooth console? Window Zeige Bluetooth-Konsole? +Incoming connections policy: Settings view Richtlinie f?r eingehende Verbindungen: +From all devices Settings view Von allen Ger?ten +Start Bluetooth Services? Window Starte Bluetooth-Dienste? +Server Window Server +Scanning completed. Inquiry panel Suche beendet. +Remove Remote devices Entfernen +15 secs Settings view 15 sek. +Policy... Settings view Richtlinie... +61 secs Settings view 61 sek. +Haiku Bluetooth System, (ARCE)\n\nCreated by Oliver Ruiz Dorantes\n\nWith support of:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nThanks to the individuals who helped...\n\nShipping/donating hardware:\n\t- Henry Jair Abril Florez(el Colombian)\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\nEconomically:\n\t- Karl vom Dorff, Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E,\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W:\n\nWith patches:\n\t- Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynald Lesieur\n\t- Andreas F?rber\n\t- Joerg Meyer\nTesting:\n\t- Petter H. Juliussen\n\t- Adrien Destugues\n\nWho gave me all the knowledge:\n\t- the yellowTAB team main Haiku Bluetooth System, (ARCE)\n\nErstellt von Oliver Ruiz Dorantes\n\nMit Unterst?tzung von:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nDank an die Helfer f?r...\n\n die Bereitstellung ! von Hardware:\n\t- Henry Jair Abril Florez(el Colombian\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\n wirtschaftliche Unterst?tzung:\n\t- Karl vom Dorff, Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W:\n\tPatches:\n\t Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynal Lesieur\n\t- Andreas F?rber\n\t- Joer Meyer\n\Tests:\n\t- Petter H. Juliussen\n\t Adrie Destuges\n\nDie Leute die mir das Wissen vermittelt haben:\n\t- das yellowTAB team +Identify us as... Settings view Identifiziere uns als... +Remaining Inquiry panel Verbleibend +Connections & Channels list? Window Verbindungs- und Kanal-Liste +Pick LocalDevice... Settings view w?hle LocalDevice... +Defaults Window Standard Werte +Inquiry Inquiry panel Suche +Desktop Settings view Desktop +Revert Window R?ckg?ngig +Laptop Settings view Laptop +Retrieving name of Inquiry panel Empfange Name von +Bluetooth Window Bluetooth +Local Devices found on system: Settings view Lokale Ger?te im System gefunden: +As Trusted Remote devices Als vertraut +Discoverable Extended local device view Feststellbar +As Blocked Remote devices Als blockiert +Service Classes: Device View Dienstklassen: +Refresh LocalDevices? Window aktuallisiere LocalDevices? +Settings Window Einstellungen +Check that the bluetooth capabilities of your remote device are activated. Press Inquiry to start scanning. The needed time for the retrieval of the names is unknown, although should not take more than 3 seconds per device. Afterwards you will be able to add them to your main list, where you will be able to pair with them Inquiry panel ?berpr?fen sie bitte, das die Bluetooth-F?higkeite ihres entfernen Ger?tes aktiviert sind. Dr?cken sie Suche um das Scannen zu starten. Die Zeit die ben?tigt wird um die Namen zu empfangen kann nich vorhergesehen werden, aber es sollte nicht l?nger als 3 Sekunden pro Ger?t dauern. Danch k?nnen sie die Ger?te zu ihrer Ger?teliste hinzuf?gen, wo sie sich dann mit ihnen verbinden k?nnen. +Scanning progress Inquiry panel Suchfortschritt +Always ask Settings view Immer fragen +Remote Devices List? Window Liste der entfernten Ger?te? +Retrieving names... Inquiry panel Empfange Namen... +Help Window Hilfe +Ok main Ok +Add? Remote devices Hinzuf?gen? +There has not been found any bluetooth LocalDevice device registered on the system Inquiry panel Es wurde kein registriertes Bluetooth-Ger?t auf diesem System gefunden. +Stop Bluetooth Services? Window Beende Bluetooth-Dienste? +Show Name Extended local device view Zeige Name From pulkomandy at mail.berlios.de Thu Oct 1 19:29:48 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Thu, 1 Oct 2009 19:29:48 +0200 Subject: [Haiku-commits] r33398 - haiku/trunk/src/preferences/appearance Message-ID: <200910011729.n91HTm0L009530@sheep.berlios.de> Author: pulkomandy Date: 2009-10-01 19:29:47 +0200 (Thu, 01 Oct 2009) New Revision: 33398 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33398&view=rev Modified: haiku/trunk/src/preferences/appearance/de.catkeys Log: Patch by Colin: improve the appearance german localization. Modified: haiku/trunk/src/preferences/appearance/de.catkeys =================================================================== --- haiku/trunk/src/preferences/appearance/de.catkeys 2009-10-01 17:26:12 UTC (rev 33397) +++ haiku/trunk/src/preferences/appearance/de.catkeys 2009-10-01 17:29:47 UTC (rev 33398) @@ -1,43 +1,43 @@ 1 german x-vnd.Haiku-Appearance 959674221 -Navigation Pulse Colors tab Navigations Puls +Navigation Pulse Colors tab Navigation - Leuchtfarbe Shadow Colors tab Schatten -On AntialiasingSettingsView Ein -Defaults APRWindow Standard +On AntialiasingSettingsView An +Defaults APRWindow Standardwerte Grayscale AntialiasingSettingsView Graustufen Shine Colors tab Glanz Off AntialiasingSettingsView Aus -Anti-aliasing type: AntialiasingSettingsView Kantengl?ttungstyp : +Anti-aliasing type: AntialiasingSettingsView Kantengl?ttungstyp: Success Colors tab Erfolg -Inactive Window Tab Colors tab Inaktives Fenster +Inactive Window Tab Colors tab Fenstertitel (inaktiv) Failure Colors tab Fehler -Hinting menu AntialiasingSettingsView Menu-hinting -Control Border Colors tab Steuerelementrahmen -Document Background Colors tab Dokumenthintergrund -Revert APRWindow R?ckg?ngig -Selected Menu Item Border Colors tab Rahmen ausgew?hlter Men?eintrag -Selected Menu Item Text Colors tab Textfarbe ausgew?hlter Men?eintrag +Hinting menu AntialiasingSettingsView Hinting-Men? +Control Border Colors tab Steuerelement - Rahmen +Document Background Colors tab Dokument - Hintergrund +Revert APRWindow Zur?cknehmen +Selected Menu Item Border Colors tab Men? - Rahmen (ausgew?hlt) +Selected Menu Item Text Colors tab Men? - Text (ausgew?hlt) Antialiasing APRWindow Kantengl?ttung -Window Tab Text Colors tab FensterreitertText -Tooltip Background Colors tab Tooltip Hintergrund -Document Text Colors tab Dokumenttext -Navigation Base Colors tab Aktives Steuerelement -Menu Background Colors tab Men?hintergrund +Window Tab Text Colors tab Fenstertitel - Text +Tooltip Background Colors tab Hinweis - Hintergrund +Document Text Colors tab Dokument - Text +Navigation Base Colors tab Navigation - Grundfarbe +Menu Background Colors tab Men? - Hintergrund Appearance APRWindow Aussehen -Control Background Colors tab Steuerelementhintergrund +Control Background Colors tab Steuerelement - Hintergrund Colors APRWindow Farben -Panel Background Colors tab Panelhintergrund -Window Tab Colors tab Fensterreiter +Panel Background Colors tab Oberfl?che - Hintergrund +Window Tab Colors tab Fenstertitel Reduce colored edges filter strength: AntialiasingSettingsView St?rke des Farbsaumfilters -Subpixel based anti-aliasing in combination with glyph hinting is not available in this build of Haiku to avoid possible patent issues. To enable this feature, you have to build Haiku yourself and enable certain options in the libfreetype configuration header. AntialiasingSettingsView Um Patentprobleme zu umgehen ist subpixelbasierende Kantengl?ttung in Verbindung mit Zeichen-hinting in diesem Build nicht verf?gbar. Um diese Funktion zu aktivieren m?ssen sie Haiku selbst kompilieren und spezielle Funktionen im libfreetype Konfiguarions-Header aktivieren. -Menu Item Text Colors tab Men?eintragtext +Subpixel based anti-aliasing in combination with glyph hinting is not available in this build of Haiku to avoid possible patent issues. To enable this feature, you have to build Haiku yourself and enable certain options in the libfreetype configuration header. AntialiasingSettingsView Zur Vermeidung von m?glichen Patentproblemen ist die Kombination von Subpixel-Kantengl?ttung und Glyph-hinting deaktiviert. Um diese Funktion zu aktivieren m?ssen Sie spezielle Funktionen im Konfigurationsheader der Freetype-Bibliothek freischalten und anschlie?end Haiku selbst kompilieren. +Menu Item Text Colors tab Men? - Text Monospaced Fonts Only AntialiasingSettingsView Nur Monospace Schriften LCD subpixel AntialiasingSettingsView LCD Subpixel -Inactive Window Tab Text Colors tab Inaktiver Fensterreiter +Inactive Window Tab Text Colors tab Fenstertitel - Text (inaktiv) Strong AntialiasingSettingsView Stark -Control Highlight Colors tab Steuerelement Randschatten links und oben -Control Text Colors tab Steuerelementtext -Tooltip Text Colors tab Tooltiptext -Antialiasing menu AntialiasingSettingsView Menu Kantengl?ttung -Selected Menu Item Background Colors tab Hintergrund ausgew?hlter Men?eintrag -Glyph hinting: AntialiasingSettingsView Zeichen-hinting : -Panel Text Colors tab Paneltext +Control Highlight Colors tab Steuerelement - Beleuchtung +Control Text Colors tab Steuerelement - Text +Tooltip Text Colors tab Hinweis - Text +Antialiasing menu AntialiasingSettingsView Kantengl?ttungs-Men? +Selected Menu Item Background Colors tab Men? - Hintergrund (ausgew?hlt) +Glyph hinting: AntialiasingSettingsView Glyph-hinting: +Panel Text Colors tab Oberfl?che - Text From pulkomandy at mail.berlios.de Thu Oct 1 19:35:59 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Thu, 1 Oct 2009 19:35:59 +0200 Subject: [Haiku-commits] r33399 - haiku/trunk/src/preferences/cpufrequency Message-ID: <200910011735.n91HZxvE017307@sheep.berlios.de> Author: pulkomandy Date: 2009-10-01 19:35:57 +0200 (Thu, 01 Oct 2009) New Revision: 33399 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33399&view=rev Modified: haiku/trunk/src/preferences/cpufrequency/de.catkeys Log: Improved german localization for cpufrequency preflet, done by Colin. Thanks! Modified: haiku/trunk/src/preferences/cpufrequency/de.catkeys =================================================================== --- haiku/trunk/src/preferences/cpufrequency/de.catkeys 2009-10-01 17:29:47 UTC (rev 33398) +++ haiku/trunk/src/preferences/cpufrequency/de.catkeys 2009-10-01 17:35:57 UTC (rev 33399) @@ -1,18 +1,18 @@ 1 german x-vnd.Haiku-CPUFrequencyPref 2623066734 Ok Status view Ok -Integration Time [ms] CPU Frequency View Karenzzeit [ms] -High Performance Status view Hohe Geschwindigkeit -Defaults Pref Window Standard -CPU Frequency Status View CPU Frequency View CPU-Frequenz-Status -Dynamic Performance Status view Dynamische Performance -Step up by CPU usage: Color Step View Hochtaktung bei Prozessorlast : +Integration Time [ms] CPU Frequency View Bewertungszeitraum [ms] +High Performance Status view Hohe Leistung +Defaults Pref Window Standardwerte +CPU Frequency Status View CPU Frequency View CPU-Takt-Anzeige +Dynamic Performance Status view Dynamische Leistung +Step up by CPU usage: Color Step View Takt?nderung ab CPU-Auslastung von: Stepping Policy CPU Frequency View Taktungsrichtlinie Open Speedstep Preferences? Status view ?ffne Speedstep Einstellungen? -Set State Status view Setze Status -Launching the CPU Frequency preflet failed.\n\nError: Status view Das CPU-Frequenz-Preflet konnte nicht gestartet werden.\n\nFehler: +Set State Status view Fester Takt +Launching the CPU Frequency preflet failed.\n\nError: Status view Das CPU-Takt-Preflet konnte nicht gestartet werden.\n\nFehler: Install Replicant into Deskbar CPU Frequency View Installiere Replikanten in Deskbar Low Energy Status view Geringer Energieverbrauch -Revert Pref Window R?ckg?ngig +Revert Pref Window Zur?cknehmen Dynamic Stepping CPU Frequency View Dynamische Taktung -CPU Frequency\n\twritten by Clemens Zeidler\n\tCopyright 2009, Haiku, Inc.\n Status view CPU-Frequenz\n\tgeschrieben von Clemens Zeidler\n\tCopyright 2009, Haiku, Inc.\n -CPU Frequency Main window CPU-Frequenz +CPU Frequency\n\twritten by Clemens Zeidler\n\tCopyright 2009, Haiku, Inc.\n Status view CPU-Takt\n\tgeschrieben von Clemens Zeidler\n\tCopyright 2009, Haiku, Inc.\n +CPU Frequency Main window CPU-Takt From dev at m-phasis.de Thu Oct 1 19:39:11 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Thu, 1 Oct 2009 19:39:11 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: 2009/10/1 J?r?me Duval : >> Whenever the locale changes, call GetAppCatalog again and work with >> be_[app_]catalog? > > This would be the idea, yes. My question was rather of rhetoric nature ;) Anyways, I can only second that it seems odd to have to carry the pointer around if you can access it via be_catalog, too. I would be interested in what the initial designers of the kit or the current maintainers would think of the proposed change for BLocale::GetAppCatalog(). It could even be made a default arg argument and one would not have to explicitely pass NULL. Michael From dev at m-phasis.de Thu Oct 1 19:40:40 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Thu, 1 Oct 2009 19:40:40 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: 2009/10/1 J?r?me Duval : >> Whenever the locale changes, call GetAppCatalog again and work with >> be_[app_]catalog? > > This would be the idea, yes. My question was rather of rhetoric nature ;) Anyways, I can only second that it seems odd to have to carry the pointer around if you can access it via be_catalog, too. I would be interested in what the initial designers of the kit or the current maintainers would think of the proposed change for BLocale::GetAppCatalog(). It could even be made a default arg argument and one would not have to explicitely pass NULL. Michael From leavengood at mail.berlios.de Thu Oct 1 21:53:24 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Thu, 1 Oct 2009 21:53:24 +0200 Subject: [Haiku-commits] r33400 - haiku/trunk/headers/private/screen_saver Message-ID: <200910011953.n91JrOsE018330@sheep.berlios.de> Author: leavengood Date: 2009-10-01 21:53:23 +0200 (Thu, 01 Oct 2009) New Revision: 33400 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33400&view=rev Added: haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h Modified: haiku/trunk/headers/private/screen_saver/ScreenSaverRunner.h Log: Adding a private header with a method that can be used to provide a consistent default look for the settings of screen savers without complicated settings views. This is based on the code originally in the ScreenSaver preferences window. Also fixed a type in the ScreenSaverRunner header. Added: haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h =================================================================== --- haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h 2009-10-01 17:35:57 UTC (rev 33399) +++ haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h 2009-10-01 19:53:23 UTC (rev 33400) @@ -0,0 +1,35 @@ +/* + * Copyright 2009, Haiku. + * Distributed under the terms of the MIT License. + * + * Authors: + * Ryan Leavengood, leavengood at gmail.com + */ +#ifndef BUILD_SCREEN_SAVER_DEFAULT_SETTINGS_VIEW +#define BUILD_SCREEN_SAVER_DEFAULT_SETTINGS_VIEW + + +#include +#include + + +// This is used to provide a consistent look for the settings view for screen +// savers without any configuration. +void +BuildScreenSaverDefaultSettingsView(BView* view, const char* moduleName, const char* info) +{ + BRect rect(15, 15, 20, 20); + BStringView* stringView = new BStringView(rect, "module", moduleName); + stringView->SetFont(be_bold_font); + stringView->ResizeToPreferred(); + view->AddChild(stringView); + + rect.OffsetBy(0, stringView->Bounds().Height() + 4); + stringView = new BStringView(rect, "info", info); + stringView->ResizeToPreferred(); + view->AddChild(stringView); +} + + +#endif // BUILD_SCREEN_SAVER_DEFAULT_SETTINGS_VIEW + Modified: haiku/trunk/headers/private/screen_saver/ScreenSaverRunner.h =================================================================== --- haiku/trunk/headers/private/screen_saver/ScreenSaverRunner.h 2009-10-01 17:35:57 UTC (rev 33399) +++ haiku/trunk/headers/private/screen_saver/ScreenSaverRunner.h 2009-10-01 19:53:23 UTC (rev 33400) @@ -53,4 +53,4 @@ volatile bool fQuitting; }; -#endif //SCREEN_SAVER_THREAD_H +#endif // SCREEN_SAVER_RUNNER_H From pulkomandy at mail.berlios.de Thu Oct 1 22:05:58 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Thu, 1 Oct 2009 22:05:58 +0200 Subject: [Haiku-commits] r33401 - in haiku/trunk: build/jam src/preferences/fonts Message-ID: <200910012005.n91K5wku019643@sheep.berlios.de> Author: pulkomandy Date: 2009-10-01 22:05:56 +0200 (Thu, 01 Oct 2009) New Revision: 33401 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33401&view=rev Added: haiku/trunk/src/preferences/fonts/fr.catkeys Modified: haiku/trunk/build/jam/BeOSRules haiku/trunk/src/preferences/fonts/FontSelectionView.cpp haiku/trunk/src/preferences/fonts/FontView.cpp haiku/trunk/src/preferences/fonts/Jamfile haiku/trunk/src/preferences/fonts/MainWindow.cpp haiku/trunk/src/preferences/fonts/main.cpp Log: -Internationalization and french locale for Fonts preflet -Added grist to the sourcecode files sent to collectcatkeys to avoid mixups Modified: haiku/trunk/build/jam/BeOSRules =================================================================== --- haiku/trunk/build/jam/BeOSRules 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/build/jam/BeOSRules 2009-10-01 20:05:56 UTC (rev 33401) @@ -367,9 +367,10 @@ { genCat = [ FGristFiles $(generatedCatalog) ] ; trans = [ FGristFiles $(translatedCatalogs) ] ; + srcs = [ FGristFiles $(sources) ] ; SEARCH on $(trans) += $(SEARCH_SOURCE) ; - ExtractCatalogEntries $(genCat:S=.catkeys) : $(sources) : $(signature) ; + ExtractCatalogEntries $(genCat:S=.catkeys) : $(srcs) : $(signature) ; LinkApplicationCatalog $(genCat) : $(genCat:S=.catkeys) : $(signature) : $(genCat:B) ; Modified: haiku/trunk/src/preferences/fonts/FontSelectionView.cpp =================================================================== --- haiku/trunk/src/preferences/fonts/FontSelectionView.cpp 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/FontSelectionView.cpp 2009-10-01 20:05:56 UTC (rev 33401) @@ -14,6 +14,8 @@ #include "MainWindow.h" #include +#include +#include #include #include #include @@ -24,7 +26,10 @@ #include +#undef TR_CONTEXT +#define TR_CONTEXT "Font Selection view" + #define INSTANT_UPDATE // if defined, the system font will be updated immediately, and not // only on exit @@ -98,12 +103,12 @@ fFontsMenuField->SetAlignment(B_ALIGN_RIGHT); // size menu - fSizesMenuField = new BMenuField("size", "Size:", fSizesMenu, NULL); + fSizesMenuField = new BMenuField("size", TR("Size:"), fSizesMenu, NULL); fSizesMenuField->SetAlignment(B_ALIGN_RIGHT); // preview fPreviewText = new BStringView("preview text", - "The quick brown fox jumps over the lazy dog."); + TR_CMT("The quick brown fox jumps over the lazy dog.","Don't translate this literally ! Use a phrase showing all chars from A to Z.")); fPreviewText->SetFont(&fCurrentFont); fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); @@ -201,31 +206,31 @@ BLayoutItem* -FontSelectionView::CreateSizesLabelLayoutItem() -{ - return fSizesMenuField->CreateLabelLayoutItem(); -} +FontSelectionView::CreateSizesLabelLayoutItem() +{ + return fSizesMenuField->CreateLabelLayoutItem(); +} BLayoutItem* -FontSelectionView::CreateSizesMenuBarLayoutItem() -{ - return fSizesMenuField->CreateMenuBarLayoutItem(); -} +FontSelectionView::CreateSizesMenuBarLayoutItem() +{ + return fSizesMenuField->CreateMenuBarLayoutItem(); +} BLayoutItem* -FontSelectionView::CreateFontsLabelLayoutItem() -{ - return fFontsMenuField->CreateLabelLayoutItem(); -} +FontSelectionView::CreateFontsLabelLayoutItem() +{ + return fFontsMenuField->CreateLabelLayoutItem(); +} BLayoutItem* -FontSelectionView::CreateFontsMenuBarLayoutItem() -{ - return fFontsMenuField->CreateMenuBarLayoutItem(); -} +FontSelectionView::CreateFontsMenuBarLayoutItem() +{ + return fFontsMenuField->CreateMenuBarLayoutItem(); +} void Modified: haiku/trunk/src/preferences/fonts/FontView.cpp =================================================================== --- haiku/trunk/src/preferences/fonts/FontView.cpp 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/FontView.cpp 2009-10-01 20:05:56 UTC (rev 33401) @@ -14,10 +14,14 @@ #include +#include #include #include +#include #include +#undef TR_CONTEXT +#define TR_CONTEXT "Font view" static void add_font_selection_view(BGridLayout* layout, FontSelectionView* view, @@ -50,10 +54,10 @@ { SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - fPlainView = new FontSelectionView("plain", "Plain Font:"); - fBoldView = new FontSelectionView("bold", "Bold Font:"); - fFixedView = new FontSelectionView("fixed", "Fixed Font:"); - fMenuView = new FontSelectionView("menu", "Menu Font:"); + fPlainView = new FontSelectionView("plain", TR("Plain Font:")); + fBoldView = new FontSelectionView("bold", TR("Bold Font:")); + fFixedView = new FontSelectionView("fixed", TR("Fixed Font:")); + fMenuView = new FontSelectionView("menu", TR("Menu Font:")); BGridLayout* layout = new BGridLayout(5, 5); layout->SetInsets(10, 10, 10, 10); Modified: haiku/trunk/src/preferences/fonts/Jamfile =================================================================== --- haiku/trunk/src/preferences/fonts/Jamfile 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/Jamfile 2009-10-01 20:05:56 UTC (rev 33401) @@ -9,7 +9,7 @@ FontView.cpp main.cpp MainWindow.cpp - : be $(TARGET_LIBSUPC++) + : be $(TARGET_LIBSUPC++) liblocale.so : Fonts.rdef ; @@ -17,3 +17,15 @@ HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Fonts : tests!apps ; } + +DoCatalogs Fonts : + x-vnd.Haiku-Fonts + : + FontSelectionView.cpp + FontView.cpp + main.cpp + MainWindow.cpp + : en.catalog + : fr.catkeys + ; + Modified: haiku/trunk/src/preferences/fonts/MainWindow.cpp =================================================================== --- haiku/trunk/src/preferences/fonts/MainWindow.cpp 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/MainWindow.cpp 2009-10-01 20:05:56 UTC (rev 33401) @@ -18,8 +18,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -28,21 +30,24 @@ #include "FontView.h" +#undef TR_CONTEXT +#define TR_CONTEXT "Main window" + static const uint32 kMsgSetDefaults = 'dflt'; static const uint32 kMsgRevert = 'rvrt'; static const uint32 kMsgCheckFonts = 'chkf'; MainWindow::MainWindow() - : BWindow(BRect(0, 0, 1, 1), "Fonts", B_TITLED_WINDOW, + : BWindow(BRect(0, 0, 1, 1), TR("Fonts"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS) { - fDefaultsButton = new BButton("defaults", "Defaults", + fDefaultsButton = new BButton("defaults", TR("Defaults"), new BMessage(kMsgSetDefaults), B_WILL_DRAW); fDefaultsButton->SetEnabled(false); - fRevertButton = new BButton("revert", "Revert", + fRevertButton = new BButton("revert", TR("Revert"), new BMessage(kMsgRevert), B_WILL_DRAW); fRevertButton->SetEnabled(false); Added: haiku/trunk/src/preferences/fonts/fr.catkeys =================================================================== --- haiku/trunk/src/preferences/fonts/fr.catkeys 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/fr.catkeys 2009-10-01 20:05:56 UTC (rev 33401) @@ -0,0 +1,12 @@ +1 french x-vnd.Haiku-Fonts 3656873675 +Defaults Main window D?fauts +Plain Font: Font view Police de base : +Fonts Main window Polices +Fonts\n\tCopyright 2004-2005, Haiku.\n\n main Polices\n\tCopyright 2004-2005, Haiku.\n\n +Revert Main window D?faire +Size: Font Selection view Taille : +Menu Font: Font view Police de menu : +The quick brown fox jumps over the lazy dog. Font Selection view Don't translate this literally ! Use a phrase showing all chars from A to Z. Portez ce vieux whisky au juge blond qui fume. +Bold Font: Font view Police grasse : +Fixed Font: Font view Police ? espacement fixe : +Ok main Ok Modified: haiku/trunk/src/preferences/fonts/main.cpp =================================================================== --- haiku/trunk/src/preferences/fonts/main.cpp 2009-10-01 19:53:23 UTC (rev 33400) +++ haiku/trunk/src/preferences/fonts/main.cpp 2009-10-01 20:05:56 UTC (rev 33401) @@ -13,20 +13,28 @@ #include #include +#include +#include #include +#undef TR_CONTEXT +#define TR_CONTEXT "main" class FontsApp : public BApplication { public: FontsApp(); virtual void AboutRequested(); + + private: + BCatalog fCatalog; }; FontsApp::FontsApp() : BApplication("application/x-vnd.Haiku-Fonts") { + be_locale->GetAppCatalog(&fCatalog); MainWindow *window = new MainWindow(); window->Show(); } @@ -35,8 +43,8 @@ void FontsApp::AboutRequested() { - BAlert *alert = new BAlert("about", "Fonts\n" - "\tCopyright 2004-2005, Haiku.\n\n", "Ok"); + BAlert *alert = new BAlert("about", TR("Fonts\n" + "\tCopyright 2004-2005, Haiku.\n\n"), TR("Ok")); BTextView *view = alert->TextView(); BFont font; From leavengood at mail.berlios.de Thu Oct 1 22:22:31 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Thu, 1 Oct 2009 22:22:31 +0200 Subject: [Haiku-commits] r33402 - haiku/trunk/src/preferences/screensaver Message-ID: <200910012022.n91KMVPm021313@sheep.berlios.de> Author: leavengood Date: 2009-10-01 22:22:30 +0200 (Thu, 01 Oct 2009) New Revision: 33402 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33402&view=rev Modified: haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp Log: - Reordered headers to match coding guidelines. - Added use of the new BuildScreenSaverDefaultSettingsView function (this is basically the same code.) Modified: haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp =================================================================== --- haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp 2009-10-01 20:05:56 UTC (rev 33401) +++ haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp 2009-10-01 20:22:30 UTC (rev 33402) @@ -9,11 +9,10 @@ */ -#include "PreviewView.h" -#include "ScreenCornerSelector.h" -#include "ScreenSaverItem.h" #include "ScreenSaverWindow.h" +#include + #include #include #include @@ -32,9 +31,13 @@ #include #include -#include +#include +#include "PreviewView.h" +#include "ScreenCornerSelector.h" +#include "ScreenSaverItem.h" + const uint32 kPreviewMonitorGap = 16; const uint32 kMinSettingsWidth = 230; const uint32 kMinSettingsHeight = 120; @@ -529,18 +532,10 @@ if (fSettingsView->ChildAt(0) == NULL) { // There are no settings at all, we add the module name here to // let it look a bit better at least. - rect = BRect(15, 15, 20, 20); - BStringView* stringView = new BStringView(rect, "module", fSettings.ModuleName()[0] - ? fSettings.ModuleName() : "Blackness"); - stringView->SetFont(be_bold_font); - stringView->ResizeToPreferred(); - fSettingsView->AddChild(stringView); - - rect.OffsetBy(0, stringView->Bounds().Height() + 4); - stringView = new BStringView(rect, "info", saver || !fSettings.ModuleName()[0] - ? "No options available" : "Could not load screen saver"); - stringView->ResizeToPreferred(); - fSettingsView->AddChild(stringView); + BuildScreenSaverDefaultSettingsView(fSettingsView, + fSettings.ModuleName()[0] ? fSettings.ModuleName() : "Blackness", + saver || !fSettings.ModuleName()[0] + ? "No options available" : "Could not load screen saver"); } ScreenSaverWindow* window = dynamic_cast(Window()); From leavengood at mail.berlios.de Thu Oct 1 22:48:15 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Thu, 1 Oct 2009 22:48:15 +0200 Subject: [Haiku-commits] r33403 - in haiku/trunk: headers/private/screen_saver src/kits/screensaver src/preferences/screensaver Message-ID: <200910012048.n91KmF4D026048@sheep.berlios.de> Author: leavengood Date: 2009-10-01 22:48:14 +0200 (Thu, 01 Oct 2009) New Revision: 33403 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33403&view=rev Added: haiku/trunk/src/kits/screensaver/BuildScreenSaverDefaultSettingsView.cpp Modified: haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h haiku/trunk/src/kits/screensaver/Jamfile haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp Log: Suggestion from Rene: - Make the BuildScreenSaverDefaultSettingsView function be built into libscreensaver.so and under the BPrivate namespace. This avoids the repetition of the compiled code in each screen saver that uses it. - Updated the ScreenSaver preferences to use this. Modified: haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h =================================================================== --- haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h 2009-10-01 20:22:30 UTC (rev 33402) +++ haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h 2009-10-01 20:48:14 UTC (rev 33403) @@ -9,25 +9,12 @@ #define BUILD_SCREEN_SAVER_DEFAULT_SETTINGS_VIEW -#include -#include +class BView; +namespace BPrivate { -// This is used to provide a consistent look for the settings view for screen -// savers without any configuration. -void -BuildScreenSaverDefaultSettingsView(BView* view, const char* moduleName, const char* info) -{ - BRect rect(15, 15, 20, 20); - BStringView* stringView = new BStringView(rect, "module", moduleName); - stringView->SetFont(be_bold_font); - stringView->ResizeToPreferred(); - view->AddChild(stringView); +void BuildScreenSaverDefaultSettingsView(BView* view, const char* moduleName, const char* info); - rect.OffsetBy(0, stringView->Bounds().Height() + 4); - stringView = new BStringView(rect, "info", info); - stringView->ResizeToPreferred(); - view->AddChild(stringView); } Added: haiku/trunk/src/kits/screensaver/BuildScreenSaverDefaultSettingsView.cpp =================================================================== --- haiku/trunk/src/kits/screensaver/BuildScreenSaverDefaultSettingsView.cpp 2009-10-01 20:22:30 UTC (rev 33402) +++ haiku/trunk/src/kits/screensaver/BuildScreenSaverDefaultSettingsView.cpp 2009-10-01 20:48:14 UTC (rev 33403) @@ -0,0 +1,36 @@ +/* + * Copyright 2009, Haiku. + * Distributed under the terms of the MIT License. + * + * Authors: + * Ryan Leavengood, leavengood at gmail.com + */ + + +#include + +#include +#include + + +namespace BPrivate { + +// This is used to provide a consistent look for the settings view for screen +// savers without any configuration. +void +BuildScreenSaverDefaultSettingsView(BView* view, const char* moduleName, const char* info) +{ + BRect rect(15, 15, 20, 20); + BStringView* stringView = new BStringView(rect, "module", moduleName); + stringView->SetFont(be_bold_font); + stringView->ResizeToPreferred(); + view->AddChild(stringView); + + rect.OffsetBy(0, stringView->Bounds().Height() + 4); + stringView = new BStringView(rect, "info", info); + stringView->ResizeToPreferred(); + view->AddChild(stringView); +} + +} + Modified: haiku/trunk/src/kits/screensaver/Jamfile =================================================================== --- haiku/trunk/src/kits/screensaver/Jamfile 2009-10-01 20:22:30 UTC (rev 33402) +++ haiku/trunk/src/kits/screensaver/Jamfile 2009-10-01 20:48:14 UTC (rev 33403) @@ -8,6 +8,7 @@ UsePrivateHeaders screen_saver ; SharedLibrary libscreensaver.so : + BuildScreenSaverDefaultSettingsView.cpp ScreenSaver.cpp ScreenSaverSettings.cpp ScreenSaverRunner.cpp Modified: haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp =================================================================== --- haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp 2009-10-01 20:22:30 UTC (rev 33402) +++ haiku/trunk/src/preferences/screensaver/ScreenSaverWindow.cpp 2009-10-01 20:48:14 UTC (rev 33403) @@ -532,7 +532,7 @@ if (fSettingsView->ChildAt(0) == NULL) { // There are no settings at all, we add the module name here to // let it look a bit better at least. - BuildScreenSaverDefaultSettingsView(fSettingsView, + BPrivate::BuildScreenSaverDefaultSettingsView(fSettingsView, fSettings.ModuleName()[0] ? fSettings.ModuleName() : "Blackness", saver || !fSettings.ModuleName()[0] ? "No options available" : "Could not load screen saver"); From leavengood at mail.berlios.de Thu Oct 1 23:03:44 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Thu, 1 Oct 2009 23:03:44 +0200 Subject: [Haiku-commits] r33404 - haiku/trunk/src/add-ons/screen_savers/debugnow Message-ID: <200910012103.n91L3i0b027915@sheep.berlios.de> Author: leavengood Date: 2009-10-01 23:03:44 +0200 (Thu, 01 Oct 2009) New Revision: 33404 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33404&view=rev Modified: haiku/trunk/src/add-ons/screen_savers/debugnow/DebugNow.cpp haiku/trunk/src/add-ons/screen_savers/debugnow/Jamfile Log: Appropriately based on the name, DebugNow was full of bugs: - The text was not centered because it was not taking into account the left offset of the text rendering, which can be gotten from the left value of the rect returned by GetBoundingBoxesForStrings. I'm pretty sure this was 0 on BeOS, so there might be problems with our GetBoundingBoxesForStrings. It doesn't make sense for flat edged glyphs like D and N to be offset. But nonetheless taking into account that left offset centers the text in this screensaver. This fixes #4261. - The text rendering also could look weird because the low color was not set to blue. Again I'm pretty sure this was not a problem on BeOS, but could be related to the new subpixel AA rendering. Setting the low color fixes this and therefore fixes #4252. - To avoid any weird repaint issues in the ScreenSaver preferences preview view, the whole background is painted every frame now. - I also added an escapement_delta member which is used for both the GetBoundingBoxesForStrings call and the eventual text rendering. This may be pointless, but it is probably more consistent. Other changes: - This now makes use of the new settings view private function. - I made the coding style compliant with our latest guidelines (I think I got most of the big ones at least.) - Removed the references to the old BeOS screen saver kit stuff from the Jamfile. Modified: haiku/trunk/src/add-ons/screen_savers/debugnow/DebugNow.cpp =================================================================== --- haiku/trunk/src/add-ons/screen_savers/debugnow/DebugNow.cpp 2009-10-01 20:48:14 UTC (rev 33403) +++ haiku/trunk/src/add-ons/screen_savers/debugnow/DebugNow.cpp 2009-10-01 21:03:44 UTC (rev 33404) @@ -3,81 +3,90 @@ * Distributed under the terms of the MIT License. * * Authors: - * Ryan Leavengood + * Ryan Leavengood, leavengood at gmail.com */ +#include #include +#include #include -#include -#include +#include + const rgb_color kMediumBlue = {0, 0, 100}; const rgb_color kWhite = {255, 255, 255}; -// Inspired by the classic BeOS screensaver, of course +// Inspired by the classic BeOS BuyNow screensaver, of course class DebugNow : public BScreenSaver { public: - DebugNow(BMessage *archive, image_id); - void Draw(BView *view, int32 frame); - void StartConfig(BView *view); - status_t StartSaver(BView *view, bool preview); + DebugNow(BMessage *archive, image_id); + void Draw(BView *view, int32 frame); + void StartConfig(BView *view); + status_t StartSaver(BView *view, bool preview); private: - const char *fLine1; - const char *fLine2; - BPoint fLine1Start; - BPoint fLine2Start; + const char* fLine1; + const char* fLine2; + BPoint fLine1Start; + BPoint fLine2Start; + escapement_delta fDelta; }; -BScreenSaver *instantiate_screen_saver(BMessage *msg, image_id image) +BScreenSaver* instantiate_screen_saver(BMessage *msg, image_id image) { return new DebugNow(msg, image); } DebugNow::DebugNow(BMessage *archive, image_id id) - : BScreenSaver(archive, id) - , fLine1("DEBUG") - , fLine2("NOW") + : + BScreenSaver(archive, id), + fLine1("DEBUG"), + fLine2("NOW") { } void DebugNow::StartConfig(BView *view) -{ - view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "DEBUG NOW, " - "by Ryan Leavengood")); +{ + BPrivate::BuildScreenSaverDefaultSettingsView(view, "DEBUG NOW", + "by Ryan Leavengood"); } status_t DebugNow::StartSaver(BView *view, bool preview) { - float width = view->Bounds().Width(); - float height = view->Bounds().Height(); + float viewWidth = view->Bounds().Width(); + float viewHeight = view->Bounds().Height(); BFont font; view->GetFont(&font); - font.SetSize(height / 2.5); + font.SetSize(viewHeight / 2.5); view->SetFont(&font); - BRect rect; - escapement_delta delta; - delta.nonspace = 0; - delta.space = 0; - // If anyone has suggestions for how to clean this up, speak up - font.GetBoundingBoxesForStrings(&fLine1, 1, B_SCREEN_METRIC, &delta, &rect); - float y = ((height - (rect.Height() * 2 + height / 10)) / 2) + rect.Height(); - fLine1Start.Set((width - rect.Width()) / 2, y); - font.GetBoundingBoxesForStrings(&fLine2, 1, B_SCREEN_METRIC, &delta, &rect); - fLine2Start.Set((width - rect.Width()) / 2, y + rect.Height() + height / 10); + fDelta.nonspace = 0; + fDelta.space = 0; + BRect stringRect; + font.GetBoundingBoxesForStrings(&fLine1, 1, B_SCREEN_METRIC, &fDelta, + &stringRect); + float y = ((viewHeight - (stringRect.Height() * 2 + viewHeight / 10)) / 2) + + stringRect.Height(); + fLine1Start.Set(((viewWidth - stringRect.Width()) / 2) - stringRect.left, y); + font.GetBoundingBoxesForStrings(&fLine2, 1, B_SCREEN_METRIC, &fDelta, + &stringRect); + fLine2Start.Set(((viewWidth - stringRect.Width()) / 2) - stringRect.left, + y + stringRect.Height() + viewHeight / 10); + // Set tick size to 500,000 microseconds = 0.5 second + SetTickSize(500000); + return B_OK; } @@ -85,22 +94,19 @@ void DebugNow::Draw(BView *view, int32 frame) { - if (frame == 0) { - // fill with blue on first frame - view->SetLowColor(kMediumBlue); - view->FillRect(view->Bounds(), B_SOLID_LOW); + // On first frame set the low color to make the text rendering correct + if (frame == 0) + view->SetLowColor(kMediumBlue); - // Set tick size to 500,000 microseconds = 0.5 second - SetTickSize(500000); - } else { - // Drawing the background color every other frame to make the text blink - if (frame % 2 == 1) - view->SetHighColor(kWhite); - else - view->SetHighColor(kMediumBlue); + // Draw the background color every frame + view->SetHighColor(kMediumBlue); + view->FillRect(view->Bounds()); - view->DrawString(fLine1, fLine1Start); - view->DrawString(fLine2, fLine2Start); + // Draw the text every other frame to make the it blink + if (frame % 2 == 1) { + view->SetHighColor(kWhite); + view->DrawString(fLine1, fLine1Start, &fDelta); + view->DrawString(fLine2, fLine2Start, &fDelta); } } Modified: haiku/trunk/src/add-ons/screen_savers/debugnow/Jamfile =================================================================== --- haiku/trunk/src/add-ons/screen_savers/debugnow/Jamfile 2009-10-01 20:48:14 UTC (rev 33403) +++ haiku/trunk/src/add-ons/screen_savers/debugnow/Jamfile 2009-10-01 21:03:44 UTC (rev 33404) @@ -2,12 +2,10 @@ SetSubDirSupportedPlatformsBeOSCompatible ; +UsePrivateHeaders screen_saver ; + # For BuildScreenSaverDefaultSettingsView + ScreenSaver DebugNow : DebugNow.cpp : be libscreensaver.so $(TARGET_LIBSUPC++) ; -Package haiku-screensaverkit-cvs : - DebugNow : - boot home config add-ons Screen\ Savers -; - From leavengood at mail.berlios.de Thu Oct 1 23:49:16 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Thu, 1 Oct 2009 23:49:16 +0200 Subject: [Haiku-commits] r33405 - in haiku/trunk/src/add-ons/screen_savers: haiku icons message Message-ID: <200910012149.n91LnGDo001074@sheep.berlios.de> Author: leavengood Date: 2009-10-01 23:49:15 +0200 (Thu, 01 Oct 2009) New Revision: 33405 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33405&view=rev Modified: haiku/trunk/src/add-ons/screen_savers/haiku/Jamfile haiku/trunk/src/add-ons/screen_savers/haiku/ScreenSaver.cpp haiku/trunk/src/add-ons/screen_savers/icons/IconsSaver.cpp haiku/trunk/src/add-ons/screen_savers/icons/Jamfile haiku/trunk/src/add-ons/screen_savers/message/Jamfile haiku/trunk/src/add-ons/screen_savers/message/Message.cpp Log: Updated the screensavers Haiku, Icons and Message to use the new default settings view function. Also some clean-up. Modified: haiku/trunk/src/add-ons/screen_savers/haiku/Jamfile =================================================================== --- haiku/trunk/src/add-ons/screen_savers/haiku/Jamfile 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/haiku/Jamfile 2009-10-01 21:49:15 UTC (rev 33405) @@ -2,12 +2,11 @@ SetSubDirSupportedPlatformsBeOSCompatible ; +UsePrivateHeaders screen_saver ; + # For BuildScreenSaverDefaultSettingsView + Addon Haiku : ScreenSaver.cpp : be screensaver $(TARGET_LIBSUPC++) ; -Package haiku-screensaverkit-cvs : - Haiku : - boot home config add-ons Screen\ Savers -; Modified: haiku/trunk/src/add-ons/screen_savers/haiku/ScreenSaver.cpp =================================================================== --- haiku/trunk/src/add-ons/screen_savers/haiku/ScreenSaver.cpp 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/haiku/ScreenSaver.cpp 2009-10-01 21:49:15 UTC (rev 33405) @@ -14,6 +14,9 @@ #include #include +#include + + class ScreenSaver : public BScreenSaver { public: @@ -52,7 +55,8 @@ void ScreenSaver::StartConfig(BView *view) { - view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "Haiku, by Marcus Overhagen")); + BPrivate::BuildScreenSaverDefaultSettingsView(view, "Haiku", + "by Marcus Overhagen"); } Modified: haiku/trunk/src/add-ons/screen_savers/icons/IconsSaver.cpp =================================================================== --- haiku/trunk/src/add-ons/screen_savers/icons/IconsSaver.cpp 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/icons/IconsSaver.cpp 2009-10-01 21:49:15 UTC (rev 33405) @@ -13,6 +13,8 @@ #include #include +#include + #include "IconDisplay.h" @@ -183,21 +185,7 @@ void IconsSaver::StartConfig(BView* view) { - const uint8 spacer = 5; - BRect frame = view->Frame(); - BRect position(spacer, spacer, frame.Width() - 2 * spacer, 0); - - view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - BStringView* stringView = new BStringView(position, "", "Icons"); - stringView->SetFont(be_bold_font); - stringView->ResizeToPreferred(); - position.top += stringView->Frame().Height(); - view->AddChild(stringView); - - stringView = new BStringView(position, "", "By Vincent Duvert"); - stringView->ResizeToPreferred(); - position.top += stringView->Frame().Height(); - view->AddChild(stringView); + BPrivate::BuildScreenSaverDefaultSettingsView(view, "Icons", + "by Vincent Duvert"); } Modified: haiku/trunk/src/add-ons/screen_savers/icons/Jamfile =================================================================== --- haiku/trunk/src/add-ons/screen_savers/icons/Jamfile 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/icons/Jamfile 2009-10-01 21:49:15 UTC (rev 33405) @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src add-ons screen_savers icons ; UseLibraryHeaders icon ; +UsePrivateHeaders screen_saver ; + # For BuildScreenSaverDefaultSettingsView ScreenSaver Icons : IconDisplay.cpp IconsSaver.cpp : Modified: haiku/trunk/src/add-ons/screen_savers/message/Jamfile =================================================================== --- haiku/trunk/src/add-ons/screen_savers/message/Jamfile 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/message/Jamfile 2009-10-01 21:49:15 UTC (rev 33405) @@ -1,5 +1,7 @@ SubDir HAIKU_TOP src add-ons screen_savers message ; +UsePrivateHeaders screen_saver ; + # For BuildScreenSaverDefaultSettingsView UsePrivateHeaders shared ; # For ObjectList Modified: haiku/trunk/src/add-ons/screen_savers/message/Message.cpp =================================================================== --- haiku/trunk/src/add-ons/screen_savers/message/Message.cpp 2009-10-01 21:03:44 UTC (rev 33404) +++ haiku/trunk/src/add-ons/screen_savers/message/Message.cpp 2009-10-01 21:49:15 UTC (rev 33405) @@ -7,6 +7,10 @@ */ +#include +#include +#include + #include #include #include @@ -14,12 +18,10 @@ #include #include #include -#include +#include #include -#include -#include -#include +#include // Double brackets to satisfy a compiler warning const pattern kCheckered = { { 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33 } }; @@ -123,8 +125,8 @@ void Message::StartConfig(BView *view) { - view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "Message, by Ryan Leavengood")); - view->AddChild(new BStringView(BRect(20, 40, 200, 65), "", "Inspired by Jon Watte's Original")); + BPrivate::BuildScreenSaverDefaultSettingsView(view, "Message", + "by Ryan Leavengood"); } From jonas at kirilla.com Fri Oct 2 00:01:17 2009 From: jonas at kirilla.com (Jonas =?iso-8859-1?q?Sundstr=F6m?=) Date: Fri, 02 Oct 2009 00:01:17 +0200 CEST Subject: [Haiku-commits] r33379 - haiku/trunk/src/apps/installer In-Reply-To: <20091001100103.487.3@bepc.1254381245.fake> Message-ID: <14780873230-BeMail@kirilla> Stephan Assmus wrote: > Hi Jonas, > > > Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp > > =================================================================== > > --- haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10- > > 01 > > 00:03:00 UTC (rev 33378) > > +++ haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10- > > 01 > > 00:14:40 UTC (rev 33379) > > @@ -302,9 +302,7 @@ > > // assume that the first frame event is because of this > > adoption > > and // move ourselves to the screen center... > > fNeedsToCenterOnScreen = false; > > - BRect frame = BScreen(this).Frame(); > > - MoveTo(frame.left + (frame.Width() - Frame().Width()) / 2, > > - frame.top + (frame.Height() - Frame().Height()) / 2); > > + CenterOnScreen(); > > } > > } > > Thanks a whole bunch for making these cleanups! > It's greatly appreciated. Low hanging fruit. :) > Just wanted to point out that this one can be reduced > further, since FrameResized() is only overridden to center > on screen, the call can be moved into the constructor. Is there any truth to the comment about post-Show() re-layout, or is the layout reasonably finished after having added all views to the window? /Jonas. From superstippi at gmx.de Fri Oct 2 00:53:03 2009 From: superstippi at gmx.de (=?ISO-8859-1?Q?Stephan_A=DFmus?=) Date: Fri, 02 Oct 2009 00:53:03 +0200 Subject: [Haiku-commits] r33379 - haiku/trunk/src/apps/installer In-Reply-To: <14780873230-BeMail@kirilla> References: <14780873230-BeMail@kirilla> Message-ID: <4AC532CF.8010203@gmx.de> Hi, Jonas Sundstr?m schrieb: > Stephan Assmus wrote: >> Just wanted to point out that this one can be reduced >> further, since FrameResized() is only overridden to center >> on screen, the call can be moved into the constructor. > > Is there any truth to the comment about post-Show() re-layout, > or is the layout reasonably finished after having added all > views to the window? The comment is true, but the CenterWindowOnScreen() method takes care of it. Best regards, -Stephan From jonas at kirilla.com Fri Oct 2 00:59:55 2009 From: jonas at kirilla.com (Jonas =?iso-8859-1?q?Sundstr=F6m?=) Date: Fri, 02 Oct 2009 00:59:55 +0200 CEST Subject: [Haiku-commits] r33379 - haiku/trunk/src/apps/installer In-Reply-To: <4AC532CF.8010203@gmx.de> Message-ID: <18298847352-BeMail@kirilla> Stephan A?mus wrote: > Hi, > > Jonas Sundstr?m schrieb: > > Stephan Assmus wrote: > >> Just wanted to point out that this one can be reduced > >> further, since FrameResized() is only overridden to center > >> on screen, the call can be moved into the constructor. > > > > Is there any truth to the comment about post-Show() re-layout, > > or is the layout reasonably finished after having added all > > views to the window? > > The comment is true, but the CenterWindowOnScreen() > method takes care of it. Thanks, I'll make the changes then! /Jonas. From kirilla at mail.berlios.de Fri Oct 2 01:03:49 2009 From: kirilla at mail.berlios.de (kirilla at BerliOS) Date: Fri, 2 Oct 2009 01:03:49 +0200 Subject: [Haiku-commits] r33406 - haiku/trunk/src/apps/installer Message-ID: <200910012303.n91N3n6Z006417@sheep.berlios.de> Author: kirilla Date: 2009-10-02 01:03:48 +0200 (Fri, 02 Oct 2009) New Revision: 33406 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33406&view=rev Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp haiku/trunk/src/apps/installer/InstallerWindow.h Log: Simplified use of CenterOnScreen(). Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp =================================================================== --- haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 21:49:15 UTC (rev 33405) +++ haiku/trunk/src/apps/installer/InstallerWindow.cpp 2009-10-01 23:03:48 UTC (rev 33406) @@ -145,7 +145,6 @@ InstallerWindow::InstallerWindow() : BWindow(BRect(-2000, -2000, -1800, -1800), "Installer", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS), - fNeedsToCenterOnScreen(true), fEncouragedToSetupPartitions(false), fDriveSetupLaunched(false), fInstallStatus(kReadyForInstall), @@ -269,6 +268,7 @@ if (!be_roster->IsRunning(kDeskbarSignature)) SetFlags(Flags() | B_NOT_MINIMIZABLE); + CenterOnScreen(); Show(); fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG); @@ -292,22 +292,6 @@ void -InstallerWindow::FrameResized(float width, float height) -{ - BWindow::FrameResized(width, height); - - if (fNeedsToCenterOnScreen) { - // We have created ourselves off-screen, since the size adoption - // because of the layout management may happen after Show(). We - // assume that the first frame event is because of this adoption and - // move ourselves to the screen center... - fNeedsToCenterOnScreen = false; - CenterOnScreen(); - } -} - - -void InstallerWindow::MessageReceived(BMessage *msg) { switch (msg->what) { Modified: haiku/trunk/src/apps/installer/InstallerWindow.h =================================================================== --- haiku/trunk/src/apps/installer/InstallerWindow.h 2009-10-01 21:49:15 UTC (rev 33405) +++ haiku/trunk/src/apps/installer/InstallerWindow.h 2009-10-01 23:03:48 UTC (rev 33406) @@ -45,7 +45,6 @@ InstallerWindow(); virtual ~InstallerWindow(); - virtual void FrameResized(float width, float height); virtual void MessageReceived(BMessage* message); virtual bool QuitRequested(); @@ -88,7 +87,6 @@ BButton* fSetupButton; BButton* fMakeBootableButton; - bool fNeedsToCenterOnScreen; bool fEncouragedToSetupPartitions; bool fDriveSetupLaunched; From kirilla at mail.berlios.de Fri Oct 2 10:36:36 2009 From: kirilla at mail.berlios.de (kirilla at BerliOS) Date: Fri, 2 Oct 2009 10:36:36 +0200 Subject: [Haiku-commits] r33407 - haiku/trunk/src/apps/deskbar Message-ID: <200910020836.n928aaKb012385@sheep.berlios.de> Author: kirilla Date: 2009-10-02 10:36:35 +0200 (Fri, 02 Oct 2009) New Revision: 33407 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33407&view=rev Modified: haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp Log: Screen space diet to make the prefs panel fit on 640x480 like most of the other prefs panels, when using the current default font. Looks a bit cramped. Tabs may be a better idea. Modified: haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp 2009-10-01 23:03:48 UTC (rev 33406) +++ haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp 2009-10-02 08:36:35 UTC (rev 33407) @@ -184,14 +184,14 @@ BView* view; view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 10) - .AddGroup(B_HORIZONTAL, 10) - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 0) + .AddGroup(B_HORIZONTAL, 0) + .AddGroup(B_VERTICAL, 0) .Add(fMenuRecentDocuments) .Add(fMenuRecentFolders) .Add(fMenuRecentApplications) .End() - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 0) .Add(fMenuRecentDocumentCount) .Add(fMenuRecentApplicationCount) .Add(fMenuRecentFolderCount) @@ -199,13 +199,13 @@ .End() .Add(new BButton("Edit Menu" B_UTF8_ELLIPSIS, new BMessage(kEditMenuInTracker))) - .SetInsets(14, 14, 14, 14) + .SetInsets(5, 5, 5, 5) .End() .View(); fMenuBox->AddChild(view); view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 1) .Add(fAppsSort) .Add(fAppsSortTrackerFirst) .Add(fAppsShowExpanders) @@ -213,38 +213,39 @@ .SetInsets(20, 0, 0, 0) .Add(fAppsExpandNew) .End() - .SetInsets(14, 14, 14, 14) + .SetInsets(5, 5, 5, 5) .End() .View(); fAppsBox->AddChild(view); view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 1) .Add(fClock24Hours) .Add(fClockSeconds) .Add(fClockEuropeanDate) .Add(fClockFullDate) - .SetInsets(14, 14, 14, 14) + .SetInsets(5, 5, 5, 5) .End() .View(); fClockBox->AddChild(view); view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 1) .Add(fWindowAlwaysOnTop) .Add(fWindowAutoRaise) - .SetInsets(14, 14, 14, 14) + .AddGlue() + .SetInsets(5, 5, 5, 5) .End() .View(); fWindowBox->AddChild(view); BLayoutBuilder::Group<>(this) - .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 1) .Add(fMenuBox) .Add(fWindowBox) .Add(fAppsBox) .Add(fClockBox) - .SetInsets(14, 14, 14, 14) + .SetInsets(10, 10, 10, 10) .End() .End(); From axeld at pinc-software.de Fri Oct 2 11:55:13 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Fri, 02 Oct 2009 11:55:13 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r33404_-_haiku/trunk/src/add-ons/screen?= =?utf-8?q?=5Fsavers/debugnow?= In-Reply-To: <200910012103.n91L3i0b027915@sheep.berlios.de> Message-ID: <9989767937-BeMail@zon> leavengood at BerliOS wrote: > Log: > Appropriately based on the name, DebugNow was full of bugs: :-) Are you suggesting that we should rename other components, too? > - The text rendering also could look weird because the low color was > not set to > blue. Again I'm pretty sure this was not a problem on BeOS, but > could be > related to the new subpixel AA rendering. Setting the low color > fixes this > and therefore fixes #4252. On BeOS, you needed to set the correct low color as well (depending on the drawing mode, that is, but that's the same on Haiku). It might just have been less obvious since it uses a different font rendering (and different fonts as well). > - To avoid any weird repaint issues in the ScreenSaver preferences > preview > view, the whole background is painted every frame now. I assume you understand what's going on there exactly? At least this sounds a bit like fixing symptoms rather than causes. Bye, Axel. From axeld at pinc-software.de Fri Oct 2 12:07:52 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Fri, 02 Oct 2009 12:07:52 +0200 CEST Subject: [Haiku-commits] r33407 - haiku/trunk/src/apps/deskbar In-Reply-To: <200910020836.n928aaKb012385@sheep.berlios.de> Message-ID: <10748439916-BeMail@zon> kirilla at BerliOS wrote: > Log: > Screen space diet to make the prefs panel fit on 640x480 like most of > the other > prefs panels, when using the current default font. Looks a bit > cramped. > Tabs may be a better idea. A better idea would be to use more of the existing screen estate; the window is quite narrow. Since the "Clock" part will probably go away anyway once we have proper locale preferences, this is not an issue for long, though - in the mean time, one could move "Applications" and "Clock" into a second row, though. I don't think it's a good idea to make it look that crowded. Bye, Axel. From pulkomandy at mail.berlios.de Fri Oct 2 17:31:41 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Fri, 2 Oct 2009 17:31:41 +0200 Subject: [Haiku-commits] r33408 - haiku/trunk/src/preferences/cpufrequency Message-ID: <200910021531.n92FVf1o031711@sheep.berlios.de> Author: pulkomandy Date: 2009-10-02 17:31:41 +0200 (Fri, 02 Oct 2009) New Revision: 33408 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33408&view=rev Modified: haiku/trunk/src/preferences/cpufrequency/CPUFrequencyView.cpp haiku/trunk/src/preferences/cpufrequency/StatusView.cpp haiku/trunk/src/preferences/cpufrequency/StatusView.h Log: Fix CPUFrequency replicant localization to no longer crash. Sorry about that :) Modified: haiku/trunk/src/preferences/cpufrequency/CPUFrequencyView.cpp =================================================================== --- haiku/trunk/src/preferences/cpufrequency/CPUFrequencyView.cpp 2009-10-02 08:36:35 UTC (rev 33407) +++ haiku/trunk/src/preferences/cpufrequency/CPUFrequencyView.cpp 2009-10-02 15:31:41 UTC (rev 33408) @@ -31,7 +31,7 @@ CPUFrequencyView::CPUFrequencyView(BRect frame, - PreferencesStorage* storage) + PreferencesStorage* storage) : BView(frame, "CPUFrequencyView", B_FOLLOW_NONE, B_WILL_DRAW), fStorage(storage) { @@ -155,7 +155,7 @@ CPUFrequencyView::AttachedToWindow() { fFrequencyMenu = new FrequencyMenu(fPolicyMenu, this, - fStorage, &fDriverInterface); + fStorage, &fDriverInterface); AddFilter(fFrequencyMenu); fColorStepView->SetTarget(this); Modified: haiku/trunk/src/preferences/cpufrequency/StatusView.cpp =================================================================== --- haiku/trunk/src/preferences/cpufrequency/StatusView.cpp 2009-10-02 08:36:35 UTC (rev 33407) +++ haiku/trunk/src/preferences/cpufrequency/StatusView.cpp 2009-10-02 15:31:41 UTC (rev 33408) @@ -194,18 +194,21 @@ fStorage(storage), fInterface(interface) { - fDynamicPerformance = new BMenuItem(TR("Dynamic Performance"), + BCatalog cat("x-vnd.Haiku-CPUFrequencyPref"); + fDynamicPerformance = new BMenuItem( + cat.GetString("Dynamic Performance",TR_CONTEXT), new BMessage(kMsgPolicyDynamic)); - fHighPerformance = new BMenuItem(TR("High Performance"), + fHighPerformance = new BMenuItem( + cat.GetString("High Performance",TR_CONTEXT), new BMessage(kMsgPolicyPerformance)); - fLowEnergie = new BMenuItem(TR("Low Energy"), + fLowEnergie = new BMenuItem(cat.GetString("Low Energy",TR_CONTEXT), new BMessage(kMsgPolicyLowEnergy)); menu->AddItem(fDynamicPerformance); menu->AddItem(fHighPerformance); menu->AddItem(fLowEnergie); - fCustomStateMenu = new BMenu(TR("Set State")); + fCustomStateMenu = new BMenu(cat.GetString("Set State",TR_CONTEXT)); StateList* stateList = fInterface->GetCpuFrequencyStates(); for (int i = 0; i < stateList->CountItems(); i++) { @@ -348,7 +351,8 @@ B_WILL_DRAW | B_FRAME_EVENTS), fInDeskbar(inDeskbar), fCurrentFrequency(NULL), - fDragger(NULL) + fDragger(NULL), + cat("x-vnd.Haiku-CPUFrequencyPref") { if (!inDeskbar) { // we were obviously added to a standard window - let's add a dragger @@ -401,9 +405,9 @@ void StatusView::_AboutRequested() { - BAlert *alert = new BAlert("about", TR("CPU Frequency\n" + BAlert *alert = new BAlert("about", cat.GetString("CPU Frequency\n" "\twritten by Clemens Zeidler\n" - "\tCopyright 2009, Haiku, Inc.\n"), TR("Ok")); + "\tCopyright 2009, Haiku, Inc.\n",TR_CONTEXT), cat.GetString("Ok",TR_CONTEXT)); BTextView *view = alert->TextView(); BFont font; @@ -483,13 +487,15 @@ fPreferencesMenu->SetFont(be_plain_font); fPreferencesMenu->AddSeparatorItem(); - fOpenPrefItem = new BMenuItem(TR("Open Speedstep Preferences" B_UTF8_ELLIPSIS), + fOpenPrefItem = new BMenuItem( + cat.GetString("Open Speedstep Preferences" B_UTF8_ELLIPSIS, TR_CONTEXT), new BMessage(kMsgOpenSSPreferences)); fPreferencesMenu->AddItem(fOpenPrefItem); fOpenPrefItem->SetTarget(this); if (fInDeskbar) { - fQuitItem= new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED)); + fQuitItem= new BMenuItem(cat.GetString("Quit", TR_CONTEXT), + new BMessage(B_QUIT_REQUESTED)); fPreferencesMenu->AddItem(fQuitItem); fQuitItem->SetTarget(this); } Modified: haiku/trunk/src/preferences/cpufrequency/StatusView.h =================================================================== --- haiku/trunk/src/preferences/cpufrequency/StatusView.h 2009-10-02 08:36:35 UTC (rev 33407) +++ haiku/trunk/src/preferences/cpufrequency/StatusView.h 2009-10-02 15:31:41 UTC (rev 33408) @@ -135,6 +135,8 @@ BString fFreqString; BDragger* fDragger; + + BCatalog cat; }; #endif // STATUS_VIEW_H From pulkomandy at mail.berlios.de Fri Oct 2 17:46:09 2009 From: pulkomandy at mail.berlios.de (pulkomandy at BerliOS) Date: Fri, 2 Oct 2009 17:46:09 +0200 Subject: [Haiku-commits] r33409 - haiku/trunk/src/preferences/bluetooth Message-ID: <200910021546.n92Fk94v000529@sheep.berlios.de> Author: pulkomandy Date: 2009-10-02 17:46:09 +0200 (Fri, 02 Oct 2009) New Revision: 33409 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33409&view=rev Modified: haiku/trunk/src/preferences/bluetooth/de.catkeys Log: Improved bluetooth catalog. Modified: haiku/trunk/src/preferences/bluetooth/de.catkeys =================================================================== --- haiku/trunk/src/preferences/bluetooth/de.catkeys 2009-10-02 15:31:41 UTC (rev 33408) +++ haiku/trunk/src/preferences/bluetooth/de.catkeys 2009-10-02 15:46:09 UTC (rev 33409) @@ -1,54 +1,54 @@ 1 german x-vnd.Haiku-BluetoothPrefs 406799883 -About? Window ?ber? +Add? Remote devices Hinzuf?gen? +Remove Remote devices Entfernen +Refresh? Remote devices Aktualisieren? +As Trusted Remote devices Vertrauen +As Blocked Remote devices Blockieren +Identify host as: Settings view Agieren als: +Identify us as... Settings view Rolle... Handheld Settings view Handheld -Only from Trusted devices Settings view Nur von vertrauten Ger?ten -Add device to list Inquiry panel Ger?t zu Liste hinzuf?gen -Starting scan... Inquiry panel Starte Suche... Smart Phone Settings view Smartphone - seconds Inquiry panel Sekunden -Remote Devices Window Entfernte Ger?te +Desktop Settings view Desktop +Laptop Settings view Laptop Server Settings view Server -Default Inquiry time: Settings view Standard Nachfragezeit: -Identify host as: Settings view identifiziere Host als: -View Window Ansicht -Refresh? Remote devices Aktuallisieren? -Show Bluetooth console? Window Zeige Bluetooth-Konsole? -Incoming connections policy: Settings view Richtlinie f?r eingehende Verbindungen: -From all devices Settings view Von allen Ger?ten -Start Bluetooth Services? Window Starte Bluetooth-Dienste? -Server Window Server -Scanning completed. Inquiry panel Suche beendet. -Remove Remote devices Entfernen -15 secs Settings view 15 sek. +Incoming connections policy: Settings view Verbindungen annehmen: Policy... Settings view Richtlinie... -61 secs Settings view 61 sek. -Haiku Bluetooth System, (ARCE)\n\nCreated by Oliver Ruiz Dorantes\n\nWith support of:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nThanks to the individuals who helped...\n\nShipping/donating hardware:\n\t- Henry Jair Abril Florez(el Colombian)\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\nEconomically:\n\t- Karl vom Dorff, Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E,\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W:\n\nWith patches:\n\t- Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynald Lesieur\n\t- Andreas F?rber\n\t- Joerg Meyer\nTesting:\n\t- Petter H. Juliussen\n\t- Adrien Destugues\n\nWho gave me all the knowledge:\n\t- the yellowTAB team main Haiku Bluetooth System, (ARCE)\n\nErstellt von Oliver Ruiz Dorantes\n\nMit Unterst?tzung von:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nDank an die Helfer f?r...\n\n die Bereitstellung ! von Hardware:\n\t- Henry Jair Abril Florez(el Colombian\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\n wirtschaftliche Unterst?tzung:\n\t- Karl vom Dorff, Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W:\n\tPatches:\n\t Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynal Lesieur\n\t- Andreas F?rber\n\t- Joer Meyer\n\Tests:\n\t- Petter H. Juliussen\n\t Adrie Destuges\n\nDie Leute die mir das Wissen vermittelt haben:\n\t- das yellowTAB team -Identify us as... Settings view Identifiziere uns als... +From all devices Settings view Alle +Only from Trusted devices Settings view Nur vertraute Ger?te +Always ask Settings view Immer fragen +Default Inquiry time: Settings view Suchdauer: +15 secs Settings view 15 s +61 secs Settings view 61 s +Local Devices found on system: Settings view Verwendbare Ger?te: +Pick LocalDevice... Settings view Ger?t... +Service Classes: Device View Ger?tedienste: +Discoverable Extended local device view Sichtbar +Show Name Extended local device view Namen anzeigen +There has not been found any bluetooth LocalDevice device registered on the system Inquiry panel Es konnte kein Bluetooth-Ger?t auf diesem System gefunden werden. +Scanning progress Inquiry panel Suchfortschritt +Starting scan... Inquiry panel Suche startet... + seconds Inquiry panel Sekunden +Scanning completed. Inquiry panel Suche abgeschlossen. Remaining Inquiry panel Verbleibend -Connections & Channels list? Window Verbindungs- und Kanal-Liste -Pick LocalDevice... Settings view w?hle LocalDevice... -Defaults Window Standard Werte -Inquiry Inquiry panel Suche -Desktop Settings view Desktop -Revert Window R?ckg?ngig -Laptop Settings view Laptop -Retrieving name of Inquiry panel Empfange Name von +Add device to list Inquiry panel Ger?t zur Liste hinzuf?gen +Inquiry Inquiry panel Suchen +Retrieving name of Inquiry panel Empfangen des Namens von +Retrieving names... Inquiry panel Empfangen der Namen... +Check that the bluetooth capabilities of your remote device are activated. Press Inquiry to start scanning. The needed time for the retrieval of the names is unknown, although should not take more than 3 seconds per device. Afterwards you will be able to add them to your main list, where you will be able to pair with them Inquiry panel Bitte stellen Sie sicher, dass Bluetooth auf dem gesuchten Ger?t aktiviert ist.\nDr?cken Sie Suchen um andere Bluetooth-Ger?te zu finden.\nF?r gew?hnlich dauert das Ermitteln des Namens pro Ger?t 3 Sekunden. Gefundene Bluetooth-Ger?te k?nnen anschlie?end der Ger?teliste hinzugef?gt werden.\nWechseln Sie zur Liste der bekannten Ger?te, wenn Sie eine Verbindung herstellen m?chten. +Server Window Server +Start Bluetooth Services? Window Bluetooth-Dienste starten? +Stop Bluetooth Services? Window Bluetooth-Dienste beenden? +Show Bluetooth console? Window Bluetooth-Konsole anzeigen? +Refresh LocalDevices? Window Bluetooth-Ger?te erkennen? +View Window Informationen +Connections & Channels list? Window Verbindungs- und Kanal-Liste... +Remote Devices List? Window Liste gefundener Ger?te? +Help Window Hilfe +About? Window ?ber? +Remote Devices Window Bekannte Ger?te +Settings Window Einstellungen +Revert Window Zur?cknehmen +Defaults Window Standardwerte Bluetooth Window Bluetooth -Local Devices found on system: Settings view Lokale Ger?te im System gefunden: -As Trusted Remote devices Als vertraut -Discoverable Extended local device view Feststellbar -As Blocked Remote devices Als blockiert -Service Classes: Device View Dienstklassen: -Refresh LocalDevices? Window aktuallisiere LocalDevices? -Settings Window Einstellungen -Check that the bluetooth capabilities of your remote device are activated. Press Inquiry to start scanning. The needed time for the retrieval of the names is unknown, although should not take more than 3 seconds per device. Afterwards you will be able to add them to your main list, where you will be able to pair with them Inquiry panel ?berpr?fen sie bitte, das die Bluetooth-F?higkeite ihres entfernen Ger?tes aktiviert sind. Dr?cken sie Suche um das Scannen zu starten. Die Zeit die ben?tigt wird um die Namen zu empfangen kann nich vorhergesehen werden, aber es sollte nicht l?nger als 3 Sekunden pro Ger?t dauern. Danch k?nnen sie die Ger?te zu ihrer Ger?teliste hinzuf?gen, wo sie sich dann mit ihnen verbinden k?nnen. -Scanning progress Inquiry panel Suchfortschritt -Always ask Settings view Immer fragen -Remote Devices List? Window Liste der entfernten Ger?te? -Retrieving names... Inquiry panel Empfange Namen... -Help Window Hilfe Ok main Ok -Add? Remote devices Hinzuf?gen? -There has not been found any bluetooth LocalDevice device registered on the system Inquiry panel Es wurde kein registriertes Bluetooth-Ger?t auf diesem System gefunden. -Stop Bluetooth Services? Window Beende Bluetooth-Dienste? -Show Name Extended local device view Zeige Name +Haiku Bluetooth System, (ARCE)\n\nCreated by Oliver Ruiz Dorantes\n\nWith support of:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nThanks to the individuals who helped...\n\nShipping/donating hardware:\n\t- Henry Jair Abril Florez(el Colombian)\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\nEconomically:\n\t- Karl vom Dorff, Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E,\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W:\n\nWith patches:\n\t- Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynald Lesieur\n\t- Andreas F?rber\n\t- Joerg Meyer\nTesting:\n\t- Petter H. Juliussen\n\t- Adrien Destugues\n\nWho gave me all the knowledge:\n\t- the yellowTAB team main Haiku Bluetooth System, (ARCE)\n\nErstellt von Oliver Ruiz Dorantes.\n\nMit Unterst?tzung von:\n\t- Mika Lindqvist\n\t- Maksym Yevmenkin\n\nDank an die Helfer f?r...\n\ndie Bereitstellung ! von Hardware:\n\t- Henry Jair Abril Florez (el Colombian)\n\t\t & Stefanie Bartolich\n\t- Edwin Erik Amsler\n\t- Dennis d'Entremont\n\t- Luroh\n\t- Pieter Panman\n\nfinanzielle Unterst?tzung:\n\t- Karl vom Dorff (OSDrawer),\n\t- Andrea Bernardi (OSDrawer),\n\t- Matt M, Doug F, Hubert H,\n\t- Sebastian B, Andrew M, Jared E,\n\t- Frederik H, Tom S, Ferry B,\n\t- Greg G, David F, Richard S, Martin W.\n\nPatch-Beitr?ge:\n\t- Michael Weirauch\n\t- Fredrik Ekdahl\n\t- Raynal Lesieur\n\t- Andreas F?rber\n\t- Joer Meyer\n\Tests:\n\t- Petter H. Juliussen\n\t- Adrien Destugues\n\ndas Vermitteln des notwendigen Wissens:\n\t- Das yellowTAB team From aljen at mail.berlios.de Fri Oct 2 18:22:33 2009 From: aljen at mail.berlios.de (aljen at mail.berlios.de) Date: Fri, 2 Oct 2009 18:22:33 +0200 Subject: [Haiku-commits] r33410 - in haiku/branches/components/gallium3d: 3rdparty/mmu_man/scripts build/jam headers/os/kernel headers/os/locale headers/os/support headers/private headers/private/bluetooth headers/private/kernel headers/private/kernel/arch/x86 headers/private/kernel/boot/platform/bios_ia32 headers/private/locale headers/private/screen_saver headers/private/shared headers/private/storage headers/private/system headers/private/vmdk src/add-ons/accelerants/nvidia/engine src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/filters src/add-ons/input_server/filters/vmware_mouse src/add-ons/kernel/bus_managers/acpi src/add-ons/kernel/drivers/audio/ac97/auich src/add-ons/kernel/drivers/audio/ac97/auvia src/add-ons/kernel/drivers/audio/ac97/es1370 src/add-ons/kernel/drivers/audio/echo src/add-ons/kernel/drivers/audio/emuxki src/add-ons/kernel/drivers/graphics/nvidia src/add-ons/kernel/drivers/input/wacom src/add-ons/kernel/drivers/network! /usb_asix src/add-ons/kernel/drivers/network/usb_ecm src/add-ons/kernel/drivers/power/acpi_embedded_controller src/add-ons/kernel/drivers/power/acpi_thermal src/add-ons/kernel/network/protocols/l2cap src/add-ons/kernel/partitioning_systems src/add-ons/kernel/partitioning_systems/amiga src/add-ons/kernel/partitioning_systems/apple src/add-ons/kernel/partitioning_systems/efi src/add-ons/kernel/partitioning_systems/intel src/add-ons/kernel/partitioning_systems/session src/add-ons/kernel/partitioning_systems/vmdk src/add-ons/locale/catalogs/plaintext src/add-ons/media/plugins/avi_reader/libOpenDML src/add-ons/media/plugins/ffmpeg src/add-ons/media/plugins/theora src/add-ons/media/plugins/theora/libtheora src/add-ons/media/plugins/theora/libtheora/theora src/add-ons/media/plugins/theora/libtheora/x86 src/add-ons/screen_savers src/add-ons/screen_savers/debugnow src/add-ons/screen_savers/haiku src/add-ons/screen_savers/icons src/add-ons/screen_savers/message src/apps/aboutsystem s! rc/apps/bootman src/apps/debugger src/apps/debugger/arch/x86 s! rc/apps/ Message-ID: <200910021622.n92GMXru003599@sheep.berlios.de> Author: aljen Date: 2009-10-02 18:18:40 +0200 (Fri, 02 Oct 2009) New Revision: 33410 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33410&view=rev Added: haiku/branches/components/gallium3d/3rdparty/mmu_man/scripts/dumpwin.sh haiku/branches/components/gallium3d/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h haiku/branches/components/gallium3d/headers/private/system/disk_device_types.h haiku/branches/components/gallium3d/headers/private/vmdk/ haiku/branches/components/gallium3d/headers/private/vmdk/vmdk.h haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/ haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/Jamfile haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.cpp haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.h haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareTypes.h haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/vmdk/ haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/Jamfile haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/analyze.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/apiwrapper.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/apiwrapper.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/bitpack.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/bitpack.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/cpu.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/cpu.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dct.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/decapiwrapper.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/decinfo.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/decint.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dequant.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dequant.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encapiwrapper.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encfrag.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encinfo.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encint.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/enquant.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/enquant.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/fdct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/fragment.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffdec.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffdec.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffenc.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffenc.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/info.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/internal.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/internal.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/mathops.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/mathops.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/mcenc.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/modedec.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/ocintrin.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/quant.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/rate.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/state.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/theora/codec.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/theora/theoradec.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/theora/theoraenc.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/tokenize.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/ haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxencfrag.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfdct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfrag.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfrag.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxidct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxloop.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxstate.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/sse2fdct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86enc.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86enc.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86int.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86state.c haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/ haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconDisplay.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconDisplay.h haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconsSaver.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconsSaver.h haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/Jamfile haiku/branches/components/gallium3d/src/apps/debugger/types/ArrayIndexPath.cpp haiku/branches/components/gallium3d/src/apps/debugger/types/ArrayIndexPath.h haiku/branches/components/gallium3d/src/apps/deskbar/PreferencesWindow.cpp haiku/branches/components/gallium3d/src/apps/deskbar/PreferencesWindow.h haiku/branches/components/gallium3d/src/bin/diskimage.cpp haiku/branches/components/gallium3d/src/kits/screensaver/BuildScreenSaverDefaultSettingsView.cpp haiku/branches/components/gallium3d/src/preferences/appearance/de.catkeys haiku/branches/components/gallium3d/src/preferences/appearance/ru.catkeys haiku/branches/components/gallium3d/src/preferences/bluetooth/de.catkeys haiku/branches/components/gallium3d/src/preferences/bluetooth/ru.catkeys haiku/branches/components/gallium3d/src/preferences/cpufrequency/de.catkeys haiku/branches/components/gallium3d/src/preferences/cpufrequency/ru.catkeys haiku/branches/components/gallium3d/src/preferences/deskbar/ haiku/branches/components/gallium3d/src/preferences/deskbar/DeskbarPreferences.cpp haiku/branches/components/gallium3d/src/preferences/deskbar/DeskbarPreferences.rdef haiku/branches/components/gallium3d/src/preferences/deskbar/Jamfile haiku/branches/components/gallium3d/src/preferences/fonts/fr.catkeys haiku/branches/components/gallium3d/src/preferences/locale/de.catkeys haiku/branches/components/gallium3d/src/preferences/locale/ru.catkeys haiku/branches/components/gallium3d/src/preferences/opengl/logo.png haiku/branches/components/gallium3d/src/system/kernel/arch/x86/timers/x86_hpet.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/AbstractModuleDevice.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/AbstractModuleDevice.h haiku/branches/components/gallium3d/src/system/kernel/device_manager/FileDevice.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/FileDevice.h Removed: haiku/branches/components/gallium3d/headers/private/vmdk/vmdk.h haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/Jamfile haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.cpp haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.h haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareTypes.h haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/network/usb_ecm/kernel_cpp.h haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/vmdk/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/vmdk/vmdk.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/block_inline.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/blockmap.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/comment.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dct_decode.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/dct_encode.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encoder_internal.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encoder_lookup.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/frarray.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/frinit.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffman.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/hufftables.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/mcomp.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/misc_common.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/pb.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/pp.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/pp.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/quant_lookup.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/reconstruct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/scan.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/toplevel.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/toplevel_lookup.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxencfrag.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfdct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfrag.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxfrag.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxidct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxloop.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/mmxstate.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/sse2fdct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86enc.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86enc.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86int.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/x86/x86state.c haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconDisplay.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconDisplay.h haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconsSaver.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/IconsSaver.h haiku/branches/components/gallium3d/src/add-ons/screen_savers/icons/Jamfile haiku/branches/components/gallium3d/src/kits/locale/adler32.c haiku/branches/components/gallium3d/src/preferences/deskbar/DeskbarPreferences.cpp haiku/branches/components/gallium3d/src/preferences/deskbar/DeskbarPreferences.rdef haiku/branches/components/gallium3d/src/preferences/deskbar/Jamfile haiku/branches/components/gallium3d/src/preferences/opengl/OpenGL_logo.png haiku/branches/components/gallium3d/src/system/kernel/arch/x86/timers/hpet.h haiku/branches/components/gallium3d/src/system/kernel/arch/x86/timers/x86_hpet.c haiku/branches/components/gallium3d/src/tools/locale/adler32.c haiku/branches/components/gallium3d/src/tools/vmdkimage/vmdkimage.h Modified: haiku/branches/components/gallium3d/build/jam/BeOSRules haiku/branches/components/gallium3d/build/jam/HaikuImage haiku/branches/components/gallium3d/build/jam/OptionalPackageDependencies haiku/branches/components/gallium3d/build/jam/OptionalPackages haiku/branches/components/gallium3d/headers/os/kernel/OS.h haiku/branches/components/gallium3d/headers/os/locale/Catalog.h haiku/branches/components/gallium3d/headers/os/locale/Language.h haiku/branches/components/gallium3d/headers/os/support/Autolock.h haiku/branches/components/gallium3d/headers/private/bluetooth/bluetoothserver_p.h haiku/branches/components/gallium3d/headers/private/kernel/arch/x86/arch_hpet.h haiku/branches/components/gallium3d/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h haiku/branches/components/gallium3d/headers/private/kernel/debug.h haiku/branches/components/gallium3d/headers/private/kernel/timer.h haiku/branches/components/gallium3d/headers/private/kernel/user_debugger.h haiku/branches/components/gallium3d/headers/private/kernel/vfs.h haiku/branches/components/gallium3d/headers/private/locale/HashMapCatalog.h haiku/branches/components/gallium3d/headers/private/screen_saver/ScreenSaverRunner.h haiku/branches/components/gallium3d/headers/private/shared/OpenWithTracker.h haiku/branches/components/gallium3d/headers/private/shared/Variant.h haiku/branches/components/gallium3d/headers/private/shared/cpu_type.h haiku/branches/components/gallium3d/headers/private/storage/DiskDeviceTypes.h haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_dac2.c haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_general.c haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_info.c haiku/branches/components/gallium3d/src/add-ons/disk_systems/intel/Jamfile haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp haiku/branches/components/gallium3d/src/add-ons/input_server/filters/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c haiku/branches/components/gallium3d/src/add-ons/kernel/bus_managers/acpi/acpi_module.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/audio/ac97/auvia/auvia.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/audio/ac97/es1370/es1370.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/audio/echo/echo.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/audio/emuxki/emuxki.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/graphics/nvidia/driver.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/input/wacom/wacom.c haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/network/usb_asix/Driver.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/network/usb_asix/Driver.h haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/network/usb_asix/Settings.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/network/usb_ecm/Driver.h haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/power/acpi_embedded_controller/acpi_embedded_controller.h haiku/branches/components/gallium3d/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.c haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/L2capEndpoint.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/L2capEndpoint.h haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/l2cap.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/l2cap_signal.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/l2cap_upper.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/network/protocols/l2cap/l2cap_upper.h haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/amiga/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/apple/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/apple/apple.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/efi/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/intel/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.h haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/intel/PartitionMapWriter.cpp haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/intel/PartitionMapWriter.h haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/session/Jamfile haiku/branches/components/gallium3d/src/add-ons/kernel/partitioning_systems/session/session.cpp haiku/branches/components/gallium3d/src/add-ons/locale/catalogs/plaintext/Catalog.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/avi_reader/libOpenDML/OpenDMLParser.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/CodecTable.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/DemuxerTable.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/Jamfile haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/decode.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/encode.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/huffman.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/idct.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/quant.c haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/libtheora/theora/theora.h haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/theoraCodecPlugin.cpp haiku/branches/components/gallium3d/src/add-ons/media/plugins/theora/theoraCodecPlugin.h haiku/branches/components/gallium3d/src/add-ons/screen_savers/Jamfile haiku/branches/components/gallium3d/src/add-ons/screen_savers/debugnow/DebugNow.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/debugnow/Jamfile haiku/branches/components/gallium3d/src/add-ons/screen_savers/haiku/Jamfile haiku/branches/components/gallium3d/src/add-ons/screen_savers/haiku/ScreenSaver.cpp haiku/branches/components/gallium3d/src/add-ons/screen_savers/message/Jamfile haiku/branches/components/gallium3d/src/add-ons/screen_savers/message/Message.cpp haiku/branches/components/gallium3d/src/apps/aboutsystem/AboutSystem.cpp haiku/branches/components/gallium3d/src/apps/bootman/BootManagerWindow.cpp haiku/branches/components/gallium3d/src/apps/bootman/BootManagerWindow.h haiku/branches/components/gallium3d/src/apps/debugger/Jamfile haiku/branches/components/gallium3d/src/apps/debugger/Jobs.cpp haiku/branches/components/gallium3d/src/apps/debugger/arch/x86/ArchitectureX86.cpp haiku/branches/components/gallium3d/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp haiku/branches/components/gallium3d/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp haiku/branches/components/gallium3d/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.h haiku/branches/components/gallium3d/src/apps/debugger/debug_info/NoOpStackFrameDebugInfo.cpp haiku/branches/components/gallium3d/src/apps/debugger/debug_info/NoOpStackFrameDebugInfo.h haiku/branches/components/gallium3d/src/apps/debugger/debug_info/StackFrameDebugInfo.cpp haiku/branches/components/gallium3d/src/apps/debugger/debug_info/StackFrameDebugInfo.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/CompilationUnit.cpp haiku/branches/components/gallium3d/src/apps/debugger/dwarf/CompilationUnit.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/DebugInfoEntries.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/DwarfExpressionEvaluator.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/DwarfFile.cpp haiku/branches/components/gallium3d/src/apps/debugger/dwarf/DwarfFile.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/DwarfUtils.h haiku/branches/components/gallium3d/src/apps/debugger/dwarf/SourceLanguageInfo.cpp haiku/branches/components/gallium3d/src/apps/debugger/dwarf/SourceLanguageInfo.h haiku/branches/components/gallium3d/src/apps/debugger/gui/team_window/VariablesView.cpp haiku/branches/components/gallium3d/src/apps/debugger/model/Type.cpp haiku/branches/components/gallium3d/src/apps/debugger/model/Type.h haiku/branches/components/gallium3d/src/apps/debugger/model/TypeComponentPath.cpp haiku/branches/components/gallium3d/src/apps/debugger/model/TypeComponentPath.h haiku/branches/components/gallium3d/src/apps/debugger/types/ValueLocation.cpp haiku/branches/components/gallium3d/src/apps/debugger/types/ValueLocation.h haiku/branches/components/gallium3d/src/apps/debugger/util/BitBuffer.cpp haiku/branches/components/gallium3d/src/apps/debugger/util/BitBuffer.h haiku/branches/components/gallium3d/src/apps/deskbar/BarApp.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BarApp.h haiku/branches/components/gallium3d/src/apps/deskbar/BarMenuBar.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BarMenuBar.h haiku/branches/components/gallium3d/src/apps/deskbar/BarMenuTitle.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BarMenuTitle.h haiku/branches/components/gallium3d/src/apps/deskbar/BarView.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BarView.h haiku/branches/components/gallium3d/src/apps/deskbar/BarWindow.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BarWindow.h haiku/branches/components/gallium3d/src/apps/deskbar/BeMenu.cpp haiku/branches/components/gallium3d/src/apps/deskbar/BeMenu.h haiku/branches/components/gallium3d/src/apps/deskbar/CalendarMenuItem.cpp haiku/branches/components/gallium3d/src/apps/deskbar/CalendarMenuItem.h haiku/branches/components/gallium3d/src/apps/deskbar/CalendarMenuWindow.cpp haiku/branches/components/gallium3d/src/apps/deskbar/CalendarMenuWindow.h haiku/branches/components/gallium3d/src/apps/deskbar/DeskBarUtils.cpp haiku/branches/components/gallium3d/src/apps/deskbar/DeskBarUtils.h haiku/branches/components/gallium3d/src/apps/deskbar/ExpandoMenuBar.cpp haiku/branches/components/gallium3d/src/apps/deskbar/ExpandoMenuBar.h haiku/branches/components/gallium3d/src/apps/deskbar/Jamfile haiku/branches/components/gallium3d/src/apps/deskbar/ResourceSet.cpp haiku/branches/components/gallium3d/src/apps/deskbar/ResourceSet.h haiku/branches/components/gallium3d/src/apps/deskbar/ShowHideMenuItem.cpp haiku/branches/components/gallium3d/src/apps/deskbar/ShowHideMenuItem.h haiku/branches/components/gallium3d/src/apps/deskbar/StatusView.cpp haiku/branches/components/gallium3d/src/apps/deskbar/StatusView.h haiku/branches/components/gallium3d/src/apps/deskbar/StatusViewShelf.cpp haiku/branches/components/gallium3d/src/apps/deskbar/StatusViewShelf.h haiku/branches/components/gallium3d/src/apps/deskbar/Switcher.cpp haiku/branches/components/gallium3d/src/apps/deskbar/Switcher.h haiku/branches/components/gallium3d/src/apps/deskbar/TeamMenu.cpp haiku/branches/components/gallium3d/src/apps/deskbar/TeamMenu.h haiku/branches/components/gallium3d/src/apps/deskbar/TeamMenuItem.cpp haiku/branches/components/gallium3d/src/apps/deskbar/TeamMenuItem.h haiku/branches/components/gallium3d/src/apps/deskbar/TimeView.cpp haiku/branches/components/gallium3d/src/apps/deskbar/TimeView.h haiku/branches/components/gallium3d/src/apps/deskbar/WindowMenu.cpp haiku/branches/components/gallium3d/src/apps/deskbar/WindowMenu.h haiku/branches/components/gallium3d/src/apps/deskbar/WindowMenuItem.cpp haiku/branches/components/gallium3d/src/apps/deskbar/WindowMenuItem.h haiku/branches/components/gallium3d/src/apps/deskbar/icons.h haiku/branches/components/gallium3d/src/apps/installer/InstallerApp.cpp haiku/branches/components/gallium3d/src/apps/installer/InstallerWindow.cpp haiku/branches/components/gallium3d/src/apps/installer/InstallerWindow.h haiku/branches/components/gallium3d/src/apps/magnify/Magnify.cpp haiku/branches/components/gallium3d/src/apps/people/PeopleWindow.cpp haiku/branches/components/gallium3d/src/apps/terminal/BasicTerminalBuffer.cpp haiku/branches/components/gallium3d/src/apps/terminal/BasicTerminalBuffer.h haiku/branches/components/gallium3d/src/apps/terminal/TermConst.h haiku/branches/components/gallium3d/src/apps/terminal/TermParse.cpp haiku/branches/components/gallium3d/src/apps/terminal/TermParse.h haiku/branches/components/gallium3d/src/apps/terminal/VTPrsTbl.c haiku/branches/components/gallium3d/src/apps/tv/MainWin.cpp haiku/branches/components/gallium3d/src/apps/tv/MainWin.h haiku/branches/components/gallium3d/src/bin/Jamfile haiku/branches/components/gallium3d/src/bin/makebootable/platform/bios_ia32/Jamfile haiku/branches/components/gallium3d/src/kits/interface/Window.cpp haiku/branches/components/gallium3d/src/kits/locale/DefaultCatalog.cpp haiku/branches/components/gallium3d/src/kits/locale/HashMapCatalog.cpp haiku/branches/components/gallium3d/src/kits/locale/Jamfile haiku/branches/components/gallium3d/src/kits/network/libnetapi/NetAddress.cpp haiku/branches/components/gallium3d/src/kits/screensaver/Jamfile haiku/branches/components/gallium3d/src/kits/shared/Variant.cpp haiku/branches/components/gallium3d/src/kits/storage/disk_device/DiskDeviceTypes.cpp haiku/branches/components/gallium3d/src/kits/tracker/FavoritesConfig.cpp haiku/branches/components/gallium3d/src/libs/bsd/fgetln.c haiku/branches/components/gallium3d/src/preferences/Jamfile haiku/branches/components/gallium3d/src/preferences/appearance/APRMain.cpp haiku/branches/components/gallium3d/src/preferences/appearance/APRMain.h haiku/branches/components/gallium3d/src/preferences/appearance/APRView.cpp haiku/branches/components/gallium3d/src/preferences/appearance/APRWindow.cpp haiku/branches/components/gallium3d/src/preferences/appearance/AntialiasingSettingsView.cpp haiku/branches/components/gallium3d/src/preferences/appearance/ColorSet.cpp haiku/branches/components/gallium3d/src/preferences/appearance/Jamfile haiku/branches/components/gallium3d/src/preferences/appearance/fr.catkeys haiku/branches/components/gallium3d/src/preferences/bluetooth/BluetoothMain.cpp haiku/branches/components/gallium3d/src/preferences/bluetooth/BluetoothMain.h haiku/branches/components/gallium3d/src/preferences/bluetooth/BluetoothWindow.cpp haiku/branches/components/gallium3d/src/preferences/bluetooth/Jamfile haiku/branches/components/gallium3d/src/preferences/bluetooth/fr.catkeys haiku/branches/components/gallium3d/src/preferences/cpufrequency/CPUFrequencyView.cpp haiku/branches/components/gallium3d/src/preferences/cpufrequency/Jamfile haiku/branches/components/gallium3d/src/preferences/cpufrequency/StatusView.cpp haiku/branches/components/gallium3d/src/preferences/cpufrequency/StatusView.h haiku/branches/components/gallium3d/src/preferences/cpufrequency/fr.catkeys haiku/branches/components/gallium3d/src/preferences/devices/ConfigurationWindow.cpp haiku/branches/components/gallium3d/src/preferences/devices/DevicesWindow.cpp haiku/branches/components/gallium3d/src/preferences/devices/DevicesWindows.h haiku/branches/components/gallium3d/src/preferences/devices/ModemWindow.cpp haiku/branches/components/gallium3d/src/preferences/devices/ResourceUsageWindow.cpp haiku/branches/components/gallium3d/src/preferences/dun/ModemWindow.cpp haiku/branches/components/gallium3d/src/preferences/dun/NewConnectionWindow.cpp haiku/branches/components/gallium3d/src/preferences/fonts/FontSelectionView.cpp haiku/branches/components/gallium3d/src/preferences/fonts/FontView.cpp haiku/branches/components/gallium3d/src/preferences/fonts/Jamfile haiku/branches/components/gallium3d/src/preferences/fonts/MainWindow.cpp haiku/branches/components/gallium3d/src/preferences/fonts/main.cpp haiku/branches/components/gallium3d/src/preferences/locale/Jamfile haiku/branches/components/gallium3d/src/preferences/locale/LocaleWindow.cpp haiku/branches/components/gallium3d/src/preferences/locale/fr.catkeys haiku/branches/components/gallium3d/src/preferences/opengl/LogoView.cpp haiku/branches/components/gallium3d/src/preferences/opengl/OpenGL.rdef haiku/branches/components/gallium3d/src/preferences/screensaver/ScreenSaverWindow.cpp haiku/branches/components/gallium3d/src/preferences/tracker/TrackerPreferences.rdef haiku/branches/components/gallium3d/src/servers/bluetooth/BluetoothServer.cpp haiku/branches/components/gallium3d/src/servers/bluetooth/BluetoothServer.h haiku/branches/components/gallium3d/src/servers/bluetooth/Jamfile haiku/branches/components/gallium3d/src/servers/bluetooth/server-bluetooth.rdef haiku/branches/components/gallium3d/src/servers/midi/DeviceWatcher.cpp haiku/branches/components/gallium3d/src/servers/midi/PortDrivers.cpp haiku/branches/components/gallium3d/src/servers/midi/PortDrivers.h haiku/branches/components/gallium3d/src/system/boot/platform/bios_ia32/menu.cpp haiku/branches/components/gallium3d/src/system/boot/platform/bios_ia32/smp.cpp haiku/branches/components/gallium3d/src/system/boot/platform/bios_ia32/start.c haiku/branches/components/gallium3d/src/system/kernel/arch/x86/Jamfile haiku/branches/components/gallium3d/src/system/kernel/arch/x86/arch_debug.cpp haiku/branches/components/gallium3d/src/system/kernel/arch/x86/arch_thread.cpp haiku/branches/components/gallium3d/src/system/kernel/arch/x86/arch_timer.c haiku/branches/components/gallium3d/src/system/kernel/arch/x86/arch_user_debugger.cpp haiku/branches/components/gallium3d/src/system/kernel/debug/BreakpointManager.cpp haiku/branches/components/gallium3d/src/system/kernel/debug/debug.cpp haiku/branches/components/gallium3d/src/system/kernel/debug/tracing.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/BaseDevice.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/BaseDevice.h haiku/branches/components/gallium3d/src/system/kernel/device_manager/Jamfile haiku/branches/components/gallium3d/src/system/kernel/device_manager/devfs.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/device_manager.cpp haiku/branches/components/gallium3d/src/system/kernel/device_manager/legacy_drivers.cpp haiku/branches/components/gallium3d/src/system/kernel/disk_device_manager/Jamfile haiku/branches/components/gallium3d/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp haiku/branches/components/gallium3d/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp haiku/branches/components/gallium3d/src/system/kernel/elf.cpp haiku/branches/components/gallium3d/src/system/kernel/fs/vfs.cpp haiku/branches/components/gallium3d/src/system/kernel/team.cpp haiku/branches/components/gallium3d/src/system/libroot/posix/malloc/heap.h haiku/branches/components/gallium3d/src/tests/servers/debug/crashing_app.cpp haiku/branches/components/gallium3d/src/tools/locale/HashMapCatalog.cpp haiku/branches/components/gallium3d/src/tools/locale/Jamfile haiku/branches/components/gallium3d/src/tools/locale/PlainTextCatalog.cpp haiku/branches/components/gallium3d/src/tools/locale/collectcatkeys.cpp haiku/branches/components/gallium3d/src/tools/makebootable/platform/bios_ia32/Jamfile haiku/branches/components/gallium3d/src/tools/vmdkimage/Jamfile haiku/branches/components/gallium3d/src/tools/vmdkimage/vmdkimage.cpp Log: merged changes from trunk r33260-r33409 Copied: haiku/branches/components/gallium3d/3rdparty/mmu_man/scripts/dumpwin.sh (from rev 33409, haiku/trunk/3rdparty/mmu_man/scripts/dumpwin.sh) Modified: haiku/branches/components/gallium3d/build/jam/BeOSRules =================================================================== --- haiku/branches/components/gallium3d/build/jam/BeOSRules 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/build/jam/BeOSRules 2009-10-02 16:18:40 UTC (rev 33410) @@ -333,7 +333,7 @@ { $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - > "$(1)".pre - $(2[1]) -s $(LOCALE_KIT_SIGNATURE) -p -o "$(1)" "$(1)".pre + $(2[1]) -s $(LOCALE_KIT_SIGNATURE) -w -o "$(1)" "$(1)".pre } # Link catalog entries from given catkey file into output compiled catalog file. @@ -352,7 +352,7 @@ actions LinkApplicationCatalog1 { $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) - $(2[1]) "$(2[3-])" -l $(2[2]:B) -v -s $(LOCALE_KIT_SIGNATURE) -o "$(1)" + $(2[1]) "$(2[3-])" -l $(2[2]:B) -v -s $(LOCALE_KIT_SIGNATURE) -o "$(1)" } # General rules to invoke from jamfiles and that do (almost) everything related @@ -367,9 +367,10 @@ { genCat = [ FGristFiles $(generatedCatalog) ] ; trans = [ FGristFiles $(translatedCatalogs) ] ; + srcs = [ FGristFiles $(sources) ] ; SEARCH on $(trans) += $(SEARCH_SOURCE) ; - ExtractCatalogEntries $(genCat:S=.catkeys) : $(sources) : $(signature) ; + ExtractCatalogEntries $(genCat:S=.catkeys) : $(srcs) : $(signature) ; LinkApplicationCatalog $(genCat) : $(genCat:S=.catkeys) : $(signature) : $(genCat:B) ; Modified: haiku/branches/components/gallium3d/build/jam/HaikuImage =================================================================== --- haiku/branches/components/gallium3d/build/jam/HaikuImage 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/build/jam/HaikuImage 2009-10-02 16:18:40 UTC (rev 33410) @@ -68,9 +68,10 @@ PackageInstaller People PoorMan PowerStatus ProcessController Screenshot ShowImage SoundRecorder StyledEdit Terminal TextSearch TV Workspaces ; -SYSTEM_PREFERENCES = Appearance Backgrounds CPUFrequency DataTranslations E-mail - FileTypes Fonts Keyboard Keymap Locale Media Mouse Network OpenGL Printers - Screen ScreenSaver Sounds Time Touchpad Tracker VirtualMemory +SYSTEM_PREFERENCES = Appearance Backgrounds CPUFrequency DataTranslations + Deskbar E-mail FileTypes Fonts Keyboard Keymap Locale Media + Mouse Network OpenGL Printers Screen ScreenSaver Sounds Time Touchpad + Tracker VirtualMemory ; SYSTEM_DEMOS = BSnow Chart Clock Cortex FontDemo GLTeapot Haiku3d Mandelbrot Pairs Playground Pulse Sudoku Gradients @@ -148,7 +149,7 @@ SYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR Parallel\ Port Print\ To\ File Serial\ Port USB\ Port ; -SYSTEM_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku IFS Spider Message ; +SYSTEM_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku Icons IFS Spider Message ; SYSTEM_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ; SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia sis7018 usb_audio ; SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia @@ -163,7 +164,8 @@ $(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce #vlance $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect - $(X86_ONLY)attansic_l1 $(X86_ONLY)attansic_l2 $(X86_ONLY)ar81xx usb_ecm + $(X86_ONLY)attansic_l1 $(X86_ONLY)attansic_l2 $(X86_ONLY)ar81xx + usb_ecm usb_asix ; #SYSTEM_ADD_ONS_DRIVERS_POWER = $(X86_ONLY)acpi_button ; SYSTEM_ADD_ONS_BUS_MANAGERS = $(ATA_ONLY)ata pci $(X86_ONLY)ps2 $(X86_ONLY)isa Modified: haiku/branches/components/gallium3d/build/jam/OptionalPackageDependencies =================================================================== --- haiku/branches/components/gallium3d/build/jam/OptionalPackageDependencies 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/build/jam/OptionalPackageDependencies 2009-10-02 16:18:40 UTC (rev 33410) @@ -5,10 +5,10 @@ OptionalPackageDependencies Subversion : APR-util Neon LibIconv LibXML2 OpenSSL SQLite ; OptionalPackageDependencies APR-util : APR Expat ; +OptionalPackageDependencies Beam : LibIconv LibLayout OpenSSL PCRE ; OptionalPackageDependencies BeHappy : BeBook NetSurf ; OptionalPackageDependencies Development : DevelopmentBase Perl ; OptionalPackageDependencies DevelopmentBase : CDRecord DevelopmentMin Yasm ; -OptionalPackageDependencies Firefox : LibIconv ; OptionalPackageDependencies LibLayout : DevelopmentBase ; OptionalPackageDependencies NetSurf : OpenSSL ; OptionalPackageDependencies OpenSSH : OpenSSL ; Modified: haiku/branches/components/gallium3d/build/jam/OptionalPackages =================================================================== --- haiku/branches/components/gallium3d/build/jam/OptionalPackages 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/build/jam/OptionalPackages 2009-10-02 16:18:40 UTC (rev 33410) @@ -45,6 +45,7 @@ # OpenSSH - the secure shell # OpenSSL - secure sockets library # P7zip - file archiving utility +# PCRE - the (Perl-compatible) regex engine # Pe - the powerful native Programmer's Editor # Perl - the scripting language # Python - the scripting language @@ -97,12 +98,12 @@ } else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) { Echo "No optional package Beam available for gcc4" ; } else { - InstallOptionalHaikuImagePackage Beam-1.1.2 - : $(baseURL)/Beam-1.1.2-x86-gcc2-2008-03-27.zip + InstallOptionalHaikuImagePackage Beam-1.2alpha + : $(baseURL)/Beam-1.2alpha-x86-gcc2-2009-09-29.zip : apps ; AddSymlinkToHaikuImage home config be Applications - : /boot/apps/beam-1-1-2-r5-with-libs/Beam ; + : /boot/apps/beam-1.2alpha-haiku/Beam ; } } @@ -447,16 +448,17 @@ Echo "No optional package Firefox available for $(TARGET_ARCH)" ; } else if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage - BeZillaBrowser-2.0.0.21pre-haiku-gcc4-x86-09-03-01 - : $(baseURL)/BeZillaBrowser-2.0.0.21pre-haiku-gcc4-x86-09-03-01.zip - : apps + BeZillaBrowser-2.0.0.22pre-x86-gcc4-2009-09-28 + : $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc4-2009-09-28.zip + : ; AddSymlinkToHaikuImage home config be Applications : /boot/apps/BeZillaBrowser/BeZillaBrowser ; } else { - InstallOptionalHaikuImagePackage BeZillaBrowser-gcc2-20090218 - : http://bezilla.beuser.de/builds/BeZillaBrowser-gcc2-20090218.zip - : apps + InstallOptionalHaikuImagePackage + BeZillaBrowser-2.0.0.22pre-x86-gcc2-2009-09-27 + : $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2009-09-27.zip + : ; AddSymlinkToHaikuImage home config be Applications : /boot/apps/BeZillaBrowser/BeZillaBrowser ; @@ -711,6 +713,29 @@ } +# PCRE regex engine +if [ IsOptionalHaikuImagePackageAdded PCRE ] { + if $(TARGET_ARCH) != x86 { + Echo "No optional package PCRE available for $(TARGET_ARCH)" ; + } else { + if $(HAIKU_GCC_VERSION[1]) >= 4 { + InstallOptionalHaikuImagePackage pcre-7.9-x86-gcc4-2009-09-30 + : $(baseURL)/pcre-7.9-x86-gcc4-2009-09-30.zip + ; + } else { + InstallOptionalHaikuImagePackage pcre-7.9-x86-gcc2-2009-09-30 + : $(baseURL)/pcre-7.9-x86-gcc2-2009-09-30.zip + ; + } + + AddSymlinkToHaikuImage home config be Applications + : /boot/apps/Pe/Pe ; + AddSymlinkToHaikuImage common bin + : /boot/apps/Pe/lpe ; + } +} + + # Pe text editor if [ IsOptionalHaikuImagePackageAdded Pe ] { if $(TARGET_ARCH) != x86 { @@ -725,11 +750,6 @@ : $(baseURL)/Pe-2.4.2-r593-r1a1-x86-gcc2-2009-09-08.zip ; } - - AddSymlinkToHaikuImage home config be Applications - : /boot/apps/Pe/Pe ; - AddSymlinkToHaikuImage common bin - : /boot/apps/Pe/lpe ; } } Modified: haiku/branches/components/gallium3d/headers/os/kernel/OS.h =================================================================== --- haiku/branches/components/gallium3d/headers/os/kernel/OS.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/os/kernel/OS.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -484,6 +484,7 @@ B_CPU_INTEL_PENTIUM_CORE_2, B_CPU_INTEL_PENTIUM_CORE_2_EXTREME = 0x11067, /* Core 2 Extreme or Xeon model 23 on 45 nm */ + B_CPU_INTEL_PENTIUM_CORE_I7 = 0x1106a, /* Core i7 920 @ 2.6(6) */ B_CPU_INTEL_PENTIUM_IV = 0x10f0, B_CPU_INTEL_PENTIUM_IV_MODEL_1, B_CPU_INTEL_PENTIUM_IV_MODEL_2, Modified: haiku/branches/components/gallium3d/headers/os/locale/Catalog.h =================================================================== --- haiku/branches/components/gallium3d/headers/os/locale/Catalog.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/os/locale/Catalog.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,6 +1,5 @@ /* - * Copyright 2003-2004, Axel D?rfler, axeld at pinc-software.de - * Copyright 2003-2004, Oliver Tappe, zooey at hirschkaefer.de + * Copyright 2003-2009, Haiku, Inc. * Distributed under the terms of the MIT License. */ #ifndef _CATALOG_H_ Modified: haiku/branches/components/gallium3d/headers/os/locale/Language.h =================================================================== --- haiku/branches/components/gallium3d/headers/os/locale/Language.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/os/locale/Language.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,5 +1,5 @@ /* -** Copyright 2003, Axel D?rfler, axeld at pinc-software.de. All rights reserved. +** Copyright 2003, Haiku, Inc. ** Distributed under the terms of the MIT License. */ Modified: haiku/branches/components/gallium3d/headers/os/support/Autolock.h =================================================================== --- haiku/branches/components/gallium3d/headers/os/support/Autolock.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/os/support/Autolock.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2001-2009, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _SUPPORT_AUTOLOCK_H @@ -11,38 +11,50 @@ class BAutolock { - public: - inline BAutolock(BLooper *looper); - inline BAutolock(BLocker *locker); - inline BAutolock(BLocker &locker); - inline ~BAutolock(); +public: + inline BAutolock(BLooper* looper); + inline BAutolock(BLocker* locker); + inline BAutolock(BLocker& locker); + inline ~BAutolock(); - inline bool IsLocked(void); + inline bool IsLocked(); - private: - BLocker *fLocker; - BLooper *fLooper; - bool fIsLocked; + inline bool Lock(); + inline void Unlock(); + +private: + BLocker* fLocker; + BLooper* fLooper; + bool fIsLocked; }; inline BAutolock::BAutolock(BLooper *looper) - : fLocker(NULL), fLooper(looper), fIsLocked(looper->Lock()) + : + fLocker(NULL), + fLooper(looper), + fIsLocked(looper->Lock()) { } inline BAutolock::BAutolock(BLocker *locker) - : fLocker(locker), fLooper(NULL), fIsLocked(locker->Lock()) + : + fLocker(locker), + fLooper(NULL), + fIsLocked(locker->Lock()) { } inline BAutolock::BAutolock(BLocker &locker) - : fLocker(&locker), fLooper(NULL), fIsLocked(locker.Lock()) + : + fLocker(&locker), + fLooper(NULL), + fIsLocked(locker.Lock()) { } @@ -50,12 +62,7 @@ inline BAutolock::~BAutolock() { - if (fIsLocked) { - if (fLooper != NULL) - fLooper->Unlock(); - else - fLocker->Unlock(); - } + Unlock(); } @@ -65,4 +72,33 @@ return fIsLocked; } + +inline bool +BAutolock::Lock() +{ + if (fIsLocked) + return true; + + if (fLooper != NULL) + fIsLocked = fLooper->Lock(); + else + fIsLocked = fLocker->Lock(); + + return fIsLocked; +} + + +inline void +BAutolock::Unlock() +{ + if (!fIsLocked) + return; + + fIsLocked = false; + if (fLooper != NULL) + fLooper->Unlock(); + else + fLocker->Unlock(); +} + #endif // _SUPPORT_AUTOLOCK_H Modified: haiku/branches/components/gallium3d/headers/private/bluetooth/bluetoothserver_p.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/bluetooth/bluetoothserver_p.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/bluetooth/bluetoothserver_p.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -2,8 +2,8 @@ #define _BLUETOOTH_SERVER_PRIVATE_H -#define BLUETOOTH_SIGNATURE "application/x-vnd.Be-bluetooth_server" -#define BLUETOOTH_APP_SIGNATURE "application/x-vnd.haiku-BluetoothPrefs" +#define BLUETOOTH_SIGNATURE "application/x-vnd.Haiku-bluetooth_server" +#define BLUETOOTH_APP_SIGNATURE "application/x-vnd.Haiku-BluetoothPrefs" /* Kit Comunication */ Modified: haiku/branches/components/gallium3d/headers/private/kernel/arch/x86/arch_hpet.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/arch/x86/arch_hpet.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/arch/x86/arch_hpet.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -11,18 +11,20 @@ /* Doing it this way is Required since the HPET only supports 32/64-bit aligned reads. */ /* Global Capability Register Masks */ -#define HPET_CAP_MASK_ID 0x000000FF -#define HPET_CAP_MASK_NUMTIMERS 0x00001F00 -#define HPET_CAP_MASK_WIDTH 0x00002000 -#define HPET_CAP_MASK_LEGACY 0x00008000 -#define HPET_CAP_MASK_VENDOR_ID 0xFFFF0000 +#define HPET_CAP_MASK_REVID 0x00000000000000FFULL +#define HPET_CAP_MASK_NUMTIMERS 0x0000000000001F00ULL +#define HPET_CAP_MASK_WIDTH 0x0000000000002000ULL +#define HPET_CAP_MASK_LEGACY 0x0000000000008000ULL +#define HPET_CAP_MASK_VENDOR_ID 0x00000000FFFF0000ULL +#define HPET_CAP_MASK_PERIOD 0xFFFFFFFF00000000ULL /* Retrieve Global Capabilities */ -#define HPET_GET_ID(regs) ((regs)->capability & HPET_CAP_MASK_ID) -#define HPET_GET_NUM_TIMERS(regs) (((regs)->capability & HPET_CAP_MASK_NUMTIMERS) >> 8) -#define HPET_IS_64BIT(regs) (((regs)->capability & HPET_CAP_MASK_WIDTH) >> 13) -#define HPET_IS_LEGACY_CAPABLE(regs) (((regs)->capability & HPET_CAP_MASK_LEGACY) >> 15) -#define HPET_GET_VENDOR_ID(regs) (((regs)->capability & HPET_CAP_MASK_VENDOR_ID) >> 16) +#define HPET_GET_REVID(regs) ((regs)->capabilities & HPET_CAP_MASK_REVID) +#define HPET_GET_NUM_TIMERS(regs) (((regs)->capabilities & HPET_CAP_MASK_NUMTIMERS) >> 8) +#define HPET_IS_64BIT(regs) (((regs)->capabilities & HPET_CAP_MASK_WIDTH) >> 13) +#define HPET_IS_LEGACY_CAPABLE(regs) (((regs)->capabilities & HPET_CAP_MASK_LEGACY) >> 15) +#define HPET_GET_VENDOR_ID(regs) (((regs)->capabilities & HPET_CAP_MASK_VENDOR_ID) >> 16) +#define HPET_GET_PERIOD(regs) (((regs)->capabilities & HPET_CAP_MASK_PERIOD) >> 32) /* Global Config Register Masks */ #define HPET_CONF_MASK_ENABLED 0x00000001 @@ -32,53 +34,64 @@ #define HPET_IS_ENABLED(regs) ((regs)->config & HPET_CONF_MASK_ENABLED) #define HPET_IS_LEGACY(regs) (((regs)->config & HPET_CONF_MASK_LEGACY) >> 1) +/* Timer Configuration and Capabilities*/ +#define HPET_CAP_TIMER_MASK 0xFFFFFFFF00000000ULL +#define HPET_CONF_TIMER_INT_ROUTE_MASK 0x3e00UL +#define HPET_CONF_TIMER_INT_ROUTE_SHIFT 9 +#define HPET_CONF_TIMER_INT_TYPE 0x00000002UL +#define HPET_CONF_TIMER_INT_ENABLE 0x00000004UL +#define HPET_CONF_TIMER_TYPE 0x00000008UL +#define HPET_CONF_TIMER_VAL_SET 0x00000040UL +#define HPET_CONF_TIMER_32MODE 0x00000100UL +#define HPET_CONF_TIMER_FSB_ENABLE 0x00004000UL +#define HPET_CAP_TIMER_PER_INT 0x00000010UL +#define HPET_CAP_TIMER_SIZE 0x00000020UL +#define HPET_CAP_TIMER_FSB_INT_DEL 0x00008000UL + +#define HPET_GET_CAP_TIMER_ROUTE(timer) (((timer)->config & HPET_CAP_TIMER_MASK) >> 32) +#define HPET_GET_CONF_TIMER_INT_ROUTE(timer) (((timer)->config & HPET_CONF_TIMER_INT_ROUTE_MASK) >> HPET_CONF_TIMER_INT_ROUTE_SHIFT) + #define ACPI_HPET_SIGNATURE "HPET" struct hpet_timer { - /* Timer Configuration/Capability bits, Reversed because x86 is LSB */ - volatile uint32 config; - volatile uint32 interrupts; /* Each bit represents one allowed interrupt for this timer. */ - /* Read Only. If interrupt 16 is allowed, bit 16 will be 1. */ - - volatile uint64 comparator; /* Comparator value */ - /* non-periodic mode: fires once when main counter = this comparator */ + /* Timer Configuration/Capability bits, Reversed because x86 is LSB */ + volatile uint64 config; + /* R/W: Each bit represents one allowed interrupt for this timer. */ + /* If interrupt 16 is allowed, bit 16 will be 1. */ + union { + volatile uint64 comparator64; /* R/W: Comparator value */ + volatile uint32 comparator32; + } u0; /* non-periodic mode: fires once when main counter = this comparator */ /* periodic mode: fires when timer reaches this value, is increased by the original value */ - - /* FSB Interrupt Route values */ - volatile uint32 fsb_value; - volatile uint32 fsb_addr; /* Where fsb_value should be written */ - - volatile uint64 reserved; + + volatile uint64 fsb_route[2]; /* R/W: FSB Interrupt Route values */ }; struct hpet_regs { - /* Capability bits */ - volatile uint32 period; - volatile uint32 capability; /* Capabilities */ - + volatile uint64 capabilities; /* Read Only */ + volatile uint64 reserved1; - /* Config Bits */ - volatile uint64 config; + volatile uint64 config; /* R/W: Config Bits */ volatile uint64 reserved2; /* Interrupt Status bits */ - volatile uint64 timer_interrupts; /* Interrupt Config bits for timers 0-31 */ - /* Level Tigger: 0 = off, 1 = set by hardware, timer is active */ - /* Edge Trigger: ignored */ - /* Writing 0 will not clear these. Must write 1 again. */ + volatile uint64 interrupt_status; /* Interrupt Config bits for timers 0-31 */ + /* Level Tigger: 0 = off, 1 = set by hardware, timer is active */ + /* Edge Trigger: ignored */ + /* Writing 0 will not clear these. Must write 1 again. */ + volatile uint64 reserved3[25]; - volatile uint8 reserved3[200]; + union { + volatile uint64 counter64; /* R/W */ + volatile uint32 counter32; + } u0; - volatile uint64 counter; - volatile uint64 reserved4; - volatile struct hpet_timer timer0; - volatile struct hpet_timer timer1; - volatile struct hpet_timer timer2; + volatile struct hpet_timer timer[1]; }; Modified: haiku/branches/components/gallium3d/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -15,7 +15,7 @@ // must match SMP_MAX_CPUS in arch_smp.h -#define MAX_BOOT_CPUS 4 +#define MAX_BOOT_CPUS 8 #define MAX_PHYSICAL_MEMORY_RANGE 6 #define MAX_PHYSICAL_ALLOCATED_RANGE 6 #define MAX_VIRTUAL_ALLOCATED_RANGE 6 Modified: haiku/branches/components/gallium3d/headers/private/kernel/debug.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/debug.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/debug.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -131,6 +131,7 @@ extern int debug_call_with_fault_handler(jmp_buf jumpBuffer, void (*function)(void*), void* parameter); extern status_t debug_memcpy(void* to, const void* from, size_t size); +extern ssize_t debug_strlcpy(char* to, const char* from, size_t size); extern char kgetc(void); extern void kputs(const char *string); Modified: haiku/branches/components/gallium3d/headers/private/kernel/timer.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/timer.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/timer.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -20,7 +20,7 @@ /* Timer info structure */ struct timer_info { - char *name; + const char *name; int (*get_priority)(void); status_t (*set_hardware_timer)(bigtime_t timeout); status_t (*clear_hardware_timer)(void); Modified: haiku/branches/components/gallium3d/headers/private/kernel/user_debugger.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/user_debugger.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/user_debugger.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Copyright 2005-2009, Ingo Weinhold, ingo_weinhold at gmx.de. * Distributed under the terms of the MIT License. * * Userland debugger support. @@ -7,6 +7,7 @@ #ifndef _KERNEL_USER_DEBUGGER_H #define _KERNEL_USER_DEBUGGER_H + #include #include @@ -32,7 +33,7 @@ // (i.e. the struct team it lives in) isn't deleted. Thus one either needs to // acquire the global team lock, or one accesses the structure from a thread // of that team. -// 2) Access to the `flags' field is atomically. Reading via atomic_get() +// 2) Access to the `flags' field is atomic. Reading via atomic_get() // requires no further locks (in addition to 1) that is). Writing requires // `lock' being held and must be done atomically, too // (atomic_{set,and,or}()). Reading with `lock' being held doesn't need to @@ -148,6 +149,7 @@ B_TEAM_DEBUG_KERNEL_FLAG_MASK = 0xffff, B_TEAM_DEBUG_DEFAULT_FLAGS = 0, + B_TEAM_DEBUG_INHERITED_FLAGS = B_TEAM_DEBUG_DEBUGGER_DISABLED }; // thread debugging flags (user-specifiable flags are in ) Modified: haiku/branches/components/gallium3d/headers/private/kernel/vfs.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/kernel/vfs.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/kernel/vfs.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -81,7 +81,7 @@ int vfs_setrlimit(int resource, const struct rlimit *rlp); /* calls needed by the VM for paging and by the file cache */ -int vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode **_vnode); +status_t vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode **_vnode); status_t vfs_get_vnode_from_path(const char *path, bool kernel, struct vnode **_vnode); status_t vfs_get_vnode(dev_t mountID, ino_t vnodeID, bool canWait, @@ -91,6 +91,7 @@ void vfs_vnode_to_node_ref(struct vnode *vnode, dev_t *_mountID, ino_t *_vnodeID); +int vfs_open_vnode(struct vnode* vnode, int openMode, bool kernel); status_t vfs_lookup_vnode(dev_t mountID, ino_t vnodeID, struct vnode **_vnode); void vfs_put_vnode(struct vnode *vnode); @@ -107,14 +108,14 @@ io_request* request); status_t vfs_synchronous_io(io_request* request, status_t (*doIO)(void* cookie, off_t offset, void* buffer, - size_t* length), - void* cookie); + size_t* length), + void* cookie); status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache, bool allocate); status_t vfs_get_file_map(struct vnode *vnode, off_t offset, size_t size, struct file_io_vec *vecs, size_t *_count); status_t vfs_get_fs_node_from_path(fs_volume *volume, const char *path, - bool kernel, void **_node); + bool traverseLeafLink, bool kernel, void **_node); status_t vfs_stat_vnode(struct vnode *vnode, struct stat *stat); status_t vfs_stat_node_ref(dev_t device, ino_t inode, struct stat *stat); status_t vfs_get_vnode_name(struct vnode *vnode, char *name, Modified: haiku/branches/components/gallium3d/headers/private/locale/HashMapCatalog.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/locale/HashMapCatalog.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/locale/HashMapCatalog.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -54,7 +54,7 @@ bool operator== (const CatKey& right) const; bool operator!= (const CatKey& right) const; status_t GetStringParts(BString* str, BString* ctx, BString* cmt) const; - static uint32 HashFun(const char* s, int startvalue=0); + static uint32 HashFun(const char* s, int startvalue = 0); // The hash function is called 3 times, cumulating the 3 strings to // calculate the key uint32 GetHashCode() const { return fHashVal; } @@ -68,7 +68,7 @@ class BHashMapCatalog: public BCatalogAddOn { protected: uint32 ComputeFingerprint() const; - typedef HashMap CatMap; + typedef HashMap CatMap; CatMap fCatMap; public: Copied: haiku/branches/components/gallium3d/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h (from rev 33409, haiku/trunk/headers/private/screen_saver/BuildScreenSaverDefaultSettingsView.h) Modified: haiku/branches/components/gallium3d/headers/private/screen_saver/ScreenSaverRunner.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/screen_saver/ScreenSaverRunner.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/screen_saver/ScreenSaverRunner.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -53,4 +53,4 @@ volatile bool fQuitting; }; -#endif //SCREEN_SAVER_THREAD_H +#endif // SCREEN_SAVER_RUNNER_H Modified: haiku/branches/components/gallium3d/headers/private/shared/OpenWithTracker.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/shared/OpenWithTracker.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/shared/OpenWithTracker.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -40,14 +40,16 @@ status_t -OpenWithTracker(directory_which which, const char* relativePath, +OpenWithTracker(directory_which which, const char* relativePath = NULL, bool createDirectory = false, BVolume* volume = NULL) { status_t status; BPath path; find_directory(which, &path, createDirectory, volume); - path.Append(relativePath); + if (relativePath) + path.Append(relativePath); + entry_ref ref; BEntry entry(path.Path()); Modified: haiku/branches/components/gallium3d/headers/private/shared/Variant.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/shared/Variant.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/shared/Variant.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -64,13 +64,16 @@ inline BVariant& operator=(const BVariant& other); + bool operator==(const BVariant& other) const; + inline bool operator!=(const BVariant& other) const; + inline type_code Type() const { return fType; } size_t Size() const; const uint8* Bytes() const; - bool IsNumber() const; - bool IsInteger() const; - bool IsFloat() const; + inline bool IsNumber() const; + inline bool IsInteger(bool* _isSigned = NULL) const; + inline bool IsFloat() const; // floating point, not just float bool ToBool() const; @@ -93,6 +96,10 @@ // counting as scalar, not string, though) static size_t SizeOfType(type_code type); + static bool TypeIsNumber(type_code type); + static bool TypeIsInteger(type_code type, + bool* _isSigned = NULL); + static bool TypeIsFloat(type_code type); private: void _SetTo(const BVariant& other); @@ -245,6 +252,13 @@ } +bool +BVariant::operator!=(const BVariant& other) const +{ + return !(*this == other); +} + + void BVariant::SetTo(const BVariant& other) { @@ -365,4 +379,25 @@ } +bool +BVariant::IsNumber() const +{ + return TypeIsNumber(fType); +} + + +bool +BVariant::IsInteger(bool* _isSigned) const +{ + return TypeIsInteger(fType, _isSigned); +} + + +bool +BVariant::IsFloat() const +{ + return TypeIsFloat(fType); +} + + #endif // _VARIANT_H Modified: haiku/branches/components/gallium3d/headers/private/shared/cpu_type.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/shared/cpu_type.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/shared/cpu_type.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -115,6 +115,8 @@ return "Core 2"; case B_CPU_INTEL_PENTIUM_CORE_2_EXTREME: return "Core 2 Extreme"; + case B_CPU_INTEL_PENTIUM_CORE_I7: + return "Core i7"; case B_CPU_INTEL_PENTIUM_IV: case B_CPU_INTEL_PENTIUM_IV_MODEL_1: case B_CPU_INTEL_PENTIUM_IV_MODEL_2: Modified: haiku/branches/components/gallium3d/headers/private/storage/DiskDeviceTypes.h =================================================================== --- haiku/branches/components/gallium3d/headers/private/storage/DiskDeviceTypes.h 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/headers/private/storage/DiskDeviceTypes.h 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku Inc. + * Copyright 2003-2009, Haiku Inc. * Distributed under the terms of the MIT License. */ #ifndef _DISK_DEVICE_TYPES_H @@ -16,7 +16,6 @@ extern const char *kPartitionTypeUnrecognized; extern const char *kPartitionTypeMultisession; - extern const char *kPartitionTypeAudioSession; extern const char *kPartitionTypeDataSession; @@ -24,10 +23,8 @@ extern const char *kPartitionTypeApple; extern const char *kPartitionTypeEFI; extern const char *kPartitionTypeIntel; - -extern const char *kPartitionTypeIntelPrimary; extern const char *kPartitionTypeIntelExtended; -extern const char *kPartitionTypeIntelLogical; +extern const char *kPartitionTypeVMDK; extern const char *kPartitionTypeAmigaFFS; extern const char *kPartitionTypeBFS; Copied: haiku/branches/components/gallium3d/headers/private/system/disk_device_types.h (from rev 33409, haiku/trunk/headers/private/system/disk_device_types.h) Copied: haiku/branches/components/gallium3d/headers/private/vmdk (from rev 33409, haiku/trunk/headers/private/vmdk) Deleted: haiku/branches/components/gallium3d/headers/private/vmdk/vmdk.h Copied: haiku/branches/components/gallium3d/headers/private/vmdk/vmdk.h (from rev 33409, haiku/trunk/headers/private/vmdk/vmdk.h) Modified: haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_dac2.c =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-10-02 16:18:40 UTC (rev 33410) @@ -23,8 +23,10 @@ * actual secondary DAC function. */ /* (It DOES have a secondary palette RAM and pixelclock PLL though.) */ case NV11: - /* on NV40 arch (confirmed NV43) this routine always finds a monitor (doesn't work). */ + /* on NV40 arch (confirmed NV43, G71, G73) this routine doesn't work. */ case NV43: + case G71: + case G73: LOG(4,("DAC2: no load detection available. reporting no CRT detected on connector #2\n")); return false; } Modified: haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_general.c =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_general.c 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_general.c 2009-10-02 16:18:40 UTC (rev 33410) @@ -826,6 +826,14 @@ sprintf(si->adi.chipset, "NV44"); status = nvxx_general_powerup(); break; + case 0x024710de: /* Nvidia GeForce 6100 Go (NFORCE4 Integr.GPU) */ + si->ps.card_type = NV44; + si->ps.card_arch = NV40A; + si->ps.laptop = true; + sprintf(si->adi.name, "Nvidia GeForce 6100 Go"); + sprintf(si->adi.chipset, "NV44"); + status = nvxx_general_powerup(); + break; case 0x025010de: /* Nvidia GeForce4 Ti 4600 */ case 0x025110de: /* Nvidia GeForce4 Ti 4400 */ case 0x025210de: /* Nvidia GeForce4 Ti 4600 */ Modified: haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_info.c =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-10-02 16:18:40 UTC (rev 33410) @@ -2789,7 +2789,7 @@ * these cards connect head1 to connectors 1 and 2 simultaneously if * only one VGA screen is found being on connector 2. Which is the * case here. - * Confirmed on NV43, NV44, G71 and G72. */ + * Confirmed on NV43, NV44, G71 and G73. */ LOG(2,("INFO: Both card outputs are connected to head 1;\n")); LOG(2,("INFO: defaulting to head 1 for primary use.\n")); break; Modified: haiku/branches/components/gallium3d/src/add-ons/disk_systems/intel/Jamfile =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/disk_systems/intel/Jamfile 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/disk_systems/intel/Jamfile 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,6 +1,7 @@ SubDir HAIKU_TOP src add-ons disk_systems intel ; UsePrivateHeaders shared storage ; +UsePrivateSystemHeaders ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ; Modified: haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,7 +1,7 @@ /* * Copyright 2004-2006, J?r?me Duval. All rights reserved. * Copyright 2005-2008, Axel D?rfler, axeld at pinc-software.de. - * Copyright 2008, Stephan A?mus, superstippi at gmx.de. + * Copyright 2008-2009, Stephan A?mus, superstippi at gmx.de. * * Distributed under the terms of the MIT License. */ @@ -43,17 +43,17 @@ fFunctionDepth++; fPrepend.Append(' ', fFunctionDepth * 2); fFunctionName << className << "::" << functionName << "()"; - + debug_printf("%p -> %s%s {\n", fPointer, fPrepend.String(), fFunctionName.String()); } - + ~FunctionTracer() { debug_printf("%p -> %s}\n", fPointer, fPrepend.String()); fFunctionDepth--; } - + private: BString fFunctionName; BString fPrepend; @@ -733,10 +733,9 @@ msg->AddInt32("modifiers", fModifiers); msg->AddData("states", B_UINT8_TYPE, states, 16); if (numBytes > 0) { - for (int i = 0; i < numBytes; i++) { + for (int i = 0; i < numBytes; i++) msg->AddInt8("byte", (int8)string[i]); - } - msg->AddString("bytes", string); + msg->AddData("bytes", B_STRING_TYPE, string, numBytes); if (rawNumBytes <= 0) { rawNumBytes = 1; Modified: haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp 2009-10-02 16:18:40 UTC (rev 33410) @@ -372,7 +372,7 @@ void TeamDescriptionView::CtrlAltDelPressed(bool keyDown) { - if (!(keyDown ^ fRebootRunner != NULL)) + if (!(keyDown ^ (fRebootRunner != NULL))) return; delete fRebootRunner; Modified: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/Jamfile =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/input_server/filters/Jamfile 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/input_server/filters/Jamfile 2009-10-02 16:18:40 UTC (rev 33410) @@ -1,3 +1,4 @@ SubDir HAIKU_TOP src add-ons input_server filters ; SubInclude HAIKU_TOP src add-ons input_server filters screen_saver ; +SubInclude HAIKU_TOP src add-ons input_server filters vmware_mouse ; Copied: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse (from rev 33409, haiku/trunk/src/add-ons/input_server/filters/vmware_mouse) Deleted: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/Jamfile Copied: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/Jamfile (from rev 33409, haiku/trunk/src/add-ons/input_server/filters/vmware_mouse/Jamfile) Deleted: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.cpp Copied: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.cpp (from rev 33409, haiku/trunk/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.cpp) Deleted: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.h Copied: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.h (from rev 33409, haiku/trunk/src/add-ons/input_server/filters/vmware_mouse/VMWareMouse.h) Deleted: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareTypes.h Copied: haiku/branches/components/gallium3d/src/add-ons/input_server/filters/vmware_mouse/VMWareTypes.h (from rev 33409, haiku/trunk/src/add-ons/input_server/filters/vmware_mouse/VMWareTypes.h) Modified: haiku/branches/components/gallium3d/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c 2009-10-02 15:46:09 UTC (rev 33409) +++ haiku/branches/components/gallium3d/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c 2009-10-02 16:18:40 UTC (rev 33410) @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -35,6 +36,8 @@ #define ACPI_DEVICE_ID_LENGTH 0x08 extern pci_module_info* gPCIManager; +extern dpc_module_info* gDPC; +void* gDPCHandle = NULL; static ACPI_STATUS @@ -107,6 +110,14 @@ ERROR("ACPI disabled\n"); return ENOSYS; } + + if (gDPC->new_dpc_queue(&gDPCHandle, "acpi_task", + B_NORMAL_PRIORITY) != B_OK) { + ERROR("failed to create os execution queue\n"); + return B_ERROR; + } + + AcpiGbl_EnableInterpreterSlack = true; // AcpiGbl_CreateOSIMethod = true; @@ -116,26 +127,51 @@ #endif status = AcpiInitializeSubsystem(); - if (status != AE_OK) { + if (ACPI_FAILURE(status)) { ERROR("AcpiInitializeSubsystem failed (%s)\n", [... truncated: 27046 lines follow ...] From korli at users.berlios.de Fri Oct 2 18:36:05 2009 From: korli at users.berlios.de (=?ISO-8859-1?B?Suly9G1lIER1dmFs?=) Date: Fri, 2 Oct 2009 18:36:05 +0200 Subject: [Haiku-commits] r33408 - haiku/trunk/src/preferences/cpufrequency In-Reply-To: <200910021531.n92FVf1o031711@sheep.berlios.de> References: <200910021531.n92FVf1o031711@sheep.berlios.de> Message-ID: Hi Adrien, 2009/10/2 pulkomandy at BerliOS : > Fix CPUFrequency replicant localization to no longer crash. Sorry about that :) > > > - ? ? ? fLowEnergie = new BMenuItem(TR("Low Energy"), > + ? ? ? fLowEnergie = new BMenuItem(cat.GetString("Low Energy",TR_CONTEXT), Hmm, it doesn't look as simple as the original TR macro. Why such a change ? Bye, J?r?me From leavengood at gmail.com Fri Oct 2 20:37:35 2009 From: leavengood at gmail.com (Ryan Leavengood) Date: Fri, 2 Oct 2009 14:37:35 -0400 Subject: [Haiku-commits] r33404 - haiku/trunk/src/add-ons/screen_savers/debugnow In-Reply-To: <9989767937-BeMail@zon> References: <200910012103.n91L3i0b027915@sheep.berlios.de> <9989767937-BeMail@zon> Message-ID: On Fri, Oct 2, 2009 at 5:55 AM, Axel D?rfler wrote: > Are you suggesting that we should rename other components, too? Yes maybe Tracker should become Hacker and Terminal and can be TerminallyBroken. Just kidding :-D > On BeOS, you needed to set the correct low color as well (depending on > the drawing mode, that is, but that's the same on Haiku). It might just > have been less obvious since it uses a different font rendering (and > different fonts as well). Yeah this is definitely the more correct way to go. Do you have any ideas in regards to the text bounding boxes? I guess I just need to test on BeOS to see. > I assume you understand what's going on there exactly? At least this > sounds a bit like fixing symptoms rather than causes. I haven't looked at it deeply but basically the problem is that the preview view has a view color of black. Whenever that is obscured whatever was covered gets repainted in black. If the screensaver doesn't paint over that it stays black. I guess a proper solution would be for the ScreenSaver preferences to cache a bitmap of the last screensaver frame and use that for repainting when needed. But it sounds a lot more complicated and inefficient than this solution ;) -- Regards, Ryan From pulkomandy at gmail.com Fri Oct 2 20:37:29 2009 From: pulkomandy at gmail.com (PulkoMandy) Date: Fri, 02 Oct 2009 20:37:29 +0200 Subject: [Haiku-commits] r33408 - haiku/trunk/src/preferences/cpufrequency In-Reply-To: References: <200910021531.n92FVf1o031711@sheep.berlios.de> Message-ID: Le Fri, 02 Oct 2009 18:36:05 +0200, J?r?me Duval a ?crit: > Hi Adrien, > > 2009/10/2 pulkomandy at BerliOS : >> Fix CPUFrequency replicant localization to no longer crash. Sorry about >> that :) >> >> >> - fLowEnergie = new BMenuItem(TR("Low Energy"), >> + fLowEnergie = new BMenuItem(cat.GetString("Low >> Energy",TR_CONTEXT), > > Hmm, it doesn't look as simple as the original TR macro. Why such a > change ? > > Bye, > J?r?me The TR macro will use the application catalog. But the replicant live in the deskbar, and must make requests to a catalog with files from cpufrequency, not the deskbar app_catalog. There is no macro to do that, or maybe I just missed it :) Oh wait... I jsut remembered of CatalogInAddOn.h... will try that instead as it is probably more clean... -- Adrien Destugues / PulkoMandy http://pulkomandy.ath.cx From ingo_weinhold at gmx.de Sat Oct 3 04:49:57 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Sat, 03 Oct 2009 10:49:57 +0800 Subject: [Haiku-commits] r33408 - haiku/trunk/src/preferences/cpufrequency In-Reply-To: References: <200910021531.n92FVf1o031711@sheep.berlios.de> Message-ID: <20091003104957.372.1@knochen-vm.localdomain> On 2009-10-03 at 00:36:05 [+0800], J?r?me Duval wrote: > Hi Adrien, > > 2009/10/2 pulkomandy at BerliOS : > > Fix CPUFrequency replicant localization to no longer crash. Sorry about > > that :) > > > > > > - fLowEnergie = new BMenuItem(TR("Low Energy"), > > + fLowEnergie = new BMenuItem(cat.GetString("Low > > Energy",TR_CONTEXT), > > Hmm, it doesn't look as simple as the original TR macro. Why such a change ? It also introduces a coding style violation. CU, Ingo From pulkomandy at gmail.com Fri Oct 2 21:55:50 2009 From: pulkomandy at gmail.com (PulkoMandy) Date: Fri, 02 Oct 2009 21:55:50 +0200 Subject: [Haiku-commits] r33408 - haiku/trunk/src/preferences/cpufrequency In-Reply-To: References: <200910021531.n92FVf1o031711@sheep.berlios.de> Message-ID: Le Fri, 02 Oct 2009 18:36:05 +0200, J?r?me Duval a ?crit: > Hi Adrien, > > 2009/10/2 pulkomandy at BerliOS : >> Fix CPUFrequency replicant localization to no longer crash. Sorry about >> that :) >> >> >> - fLowEnergie = new BMenuItem(TR("Low Energy"), >> + fLowEnergie = new BMenuItem(cat.GetString("Low >> Energy",TR_CONTEXT), > > Hmm, it doesn't look as simple as the original TR macro. Why such a > change ? > > Bye, > J?r?me I just checked the CatalogInAddOn file, and unfortunately in this case the used trick is not working. CatalogInAddOn is tricking the locale kit system to replace the be_catalog for the add on by another one, to override the application one. However, if I do that in cpufrequency, the app catalog is removed from the whole preflet and nothing works. If someone has an idea about how to properly solve that, please tell us :) -- Adrien Destugues / PulkoMandy http://pulkomandy.ath.cx From zooey at hirschkaefer.de Sat Oct 3 20:00:22 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Sat, 03 Oct 2009 20:00:22 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> Message-ID: <20091003200022.57689.4@bepc.1254563253.fake> Hi Michael, On 2009-10-01 at 00:09:28 [+0200], Michael Weirauch wrote: > 2009/9/30 PulkoMandy : > > What other solution do you suggest, in order not to leak the be_catalog in > > any case and be able to use it as needed ? > > GSoC is finished now, I'd be happy if other people started to improve the > > code of the locale kit. I'm sure you can help :) > > In expectation that might be utterly wrong: :) > > Index: src/kits/locale/Locale.cpp > =================================================================== > --- src/kits/locale/Locale.cpp (revision 33370) > +++ src/kits/locale/Locale.cpp (working copy) > @@ -24,6 +24,8 @@ > > BLocale::~BLocale() > { > + delete be_app_catalog; > + delete be_catalog; > } This will most likely crash or at least do a double delete, as be_catalog and be_app_catalog point to the same object in the usual case (they're only different for an add-on). > @@ -46,9 +48,7 @@ > > status_t > BLocale::GetAppCatalog(BCatalog *catalog) { > - if (!catalog) > - return B_BAD_VALUE; > if (be_catalog) > debugger( "GetAppCatalog() has been called while > be_catalog != NULL"); > - return BCatalog::GetAppCatalog(catalog); > + return BCatalog::GetAppCatalog(catalog ? catalog : new BCatalog); > } > > > Allows for be_locale->GetAppCatalog(NULL); and makes sure the be_[app_]catalog > are being freed when my printfs() didn't fool me. > > Whenever the locale changes, call GetAppCatalog again and work with > be_[app_]catalog? We could provide BLocaleApplication as a locale-aware BApplication that automatically fetches the app's catalog and deletes it upon destruction. On top of that, the BLocaleApplication could help with implementing the handling of a language change. What do you think? cheers, Oliver From dev at m-phasis.de Mon Oct 5 10:25:54 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Mon, 5 Oct 2009 10:25:54 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: <20091003200022.57689.4@bepc.1254563253.fake> References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> <20091003200022.57689.4@bepc.1254563253.fake> Message-ID: 2009/10/3 Oliver Tappe : >> ?BLocale::~BLocale() >> ?{ >> + ? ? ? delete be_app_catalog; >> + ? ? ? delete be_catalog; >> ?} > > This will most likely crash or at least do a double delete, as be_catalog and > be_app_catalog point to the same object in the usual case (they're only > different for an add-on). This didn't crash when quickly checking the change. If be_app_catalog == be_catalog, then it unsets the be_catalog pointer to NULL in the BCatalog destructor. Then the call "delete be_catalog;" would simply do nothing. One could guard it with a NULL check but this would be a no-go according to the HCG. > We could provide BLocaleApplication as a locale-aware BApplication that > automatically fetches the app's catalog and deletes it upon destruction. On top > of that, the BLocaleApplication could help with implementing the handling of a > language change. > > What do you think? It might be an idea. It could intercept the B_LOCALE_CHANGED(?) and provide a ::LocaleChanged() for specific implementation in the derivate application class. Hm, the more I think of it... Each BView derivative should handle that stuff itself. So it would actually obsolete the above mentioned, no? Can't currently think of a special use for that BLocaleApplication class except for carrying around the BCatalog ptr which is actually held in the be_catalog, too... Am I missing the bigger picture? Michael From pulkomandy at gmail.com Mon Oct 5 10:56:41 2009 From: pulkomandy at gmail.com (PulkoMandy) Date: Mon, 5 Oct 2009 10:56:41 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> <20091003200022.57689.4@bepc.1254563253.fake> Message-ID: <36ed0c950910050156t24f24841pbb4bbb6d1a024525@mail.gmail.com> 2009/10/5 Michael Weirauch : > 2009/10/3 Oliver Tappe : >>> BLocale::~BLocale() >>> { >>> + delete be_app_catalog; >>> + delete be_catalog; >>> } >> >> This will most likely crash or at least do a double delete, as be_catalog and >> be_app_catalog point to the same object in the usual case (they're only >> different for an add-on). > > This didn't crash when quickly checking the change. If be_app_catalog > == be_catalog, > then it unsets the be_catalog pointer to NULL in the BCatalog > destructor. Then the > call "delete be_catalog;" would simply do nothing. One could guard it > with a NULL > check but this would be a no-go according to the HCG. > >> We could provide BLocaleApplication as a locale-aware BApplication that >> automatically fetches the app's catalog and deletes it upon destruction. On top >> of that, the BLocaleApplication could help with implementing the handling of a >> language change. >> >> What do you think? > > It might be an idea. It could intercept the B_LOCALE_CHANGED(?) and provide > a ::LocaleChanged() for specific implementation in the derivate > application class. > Hm, the more I think of it... Each BView derivative should handle that > stuff itself. > So it would actually obsolete the above mentioned, no? > Can't currently think of a special use for that BLocaleApplication > class except for carrying > around the BCatalog ptr which is actually held in the be_catalog, too... > Am I missing the bigger picture? > > Michael B_LOCALE_CHANGED will be sent to the application, either by the locale kit when you seldct a new global language, or by the user, using the hey command. Then the application should reload the catalog (can be done in BLocaleApplication) and then update all the views. The views currently don't know anything about localization, the translation is done before calling them, as in BView(TR("Text"));. It would be possible to create a BLocaleView, that would manage the translation itself, maybe. But I'm not sure it makes things so much simpler. -- Adrien Destugues / PulkoMandy El?ve ing?nieur ENSSAT EII1- www.enssat.fr GSoC student for Haiku - http://haiku-os.org GrafX2 project team - http://code.google.com/p/grafx2 From dev at m-phasis.de Mon Oct 5 12:12:24 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Mon, 5 Oct 2009 12:12:24 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: <36ed0c950910050156t24f24841pbb4bbb6d1a024525@mail.gmail.com> References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> <20091003200022.57689.4@bepc.1254563253.fake> <36ed0c950910050156t24f24841pbb4bbb6d1a024525@mail.gmail.com> Message-ID: 2009/10/5 PulkoMandy : > B_LOCALE_CHANGED will be sent to the application, either by the locale > kit when you seldct a new global language, or by the user, using the > hey command. Then the application should reload the catalog (can be > done in BLocaleApplication) and then update all the views. The views > currently don't know anything about localization, the translation is > done before calling them, as in BView(TR("Text"));. It would be > possible to create a BLocaleView, that would manage the translation > itself, maybe. But I'm not sure it makes things so much simpler. When you introduce a BLocaleView you'd actually need to tell it that the locale changed. That'd be the part where the BLocaleApplication could chime in when it receives the B_LOCALE_CHANGED message, but... for what use. Don't I recall correctly, that in BeOS/Dan0/ZETA appearance changes have been propagated to every single BView of your application? (Done through app_server?) I think it should be the same for locale changes. Only the specific BView implementation knows what texts to update in it's components. So it's kind of fruitless to know about the change in the application besides the fact that the catalog would be reloaded. (Which could also be done by intercepting the B_LOCALE_CHANGED in the BApplication::MesssageReceived().) So when providing the view notification facility in the BLocaleApplication, it would actually duplicate the view notification from the app_servers functionality which could perhaps easily do that for locale change notifications as well. I am still trying to understand what benefits a BLocaleApplication and BLocaleView would actually provide. Michael From stefano.ceccherini at gmail.com Mon Oct 5 12:15:07 2009 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Mon, 5 Oct 2009 12:15:07 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> <20091003200022.57689.4@bepc.1254563253.fake> <36ed0c950910050156t24f24841pbb4bbb6d1a024525@mail.gmail.com> Message-ID: <894b9700910050315o3066add7s30d761f06215fff3@mail.gmail.com> 2009/10/5 Michael Weirauch : > Don't I recall correctly, that in BeOS/Dan0/ZETA appearance changes > have been propagated to every single BView of your application? > (Done through app_server?) I guess it was done in BWindow::DispatchMessage(). From aljen at mail.berlios.de Fri Oct 2 19:18:43 2009 From: aljen at mail.berlios.de (aljen at mail.berlios.de) Date: Fri, 2 Oct 2009 19:18:43 +0200 Subject: [Haiku-commits] r33411 - in haiku/branches/components/gallium3d/src: add-ons/opengl/softpipe libs/mesa/gallium/auxiliary/util libs/mesa/gallium/drivers/i915simple libs/mesa/gallium/drivers/i915simple/gem libs/mesa/gallium/drivers/softpipe libs/mesa/gallium/include/pipe libs/mesa/mesa/drivers/common libs/mesa/mesa/main libs/mesa/mesa/shader libs/mesa/mesa/shader/slang libs/mesa/mesa/shader/slang/library libs/mesa/mesa/state_tracker libs/mesa/mesa/swrast libs/mesa/mesa/vbo Message-ID: <200910021718.n92HIhD4010529@sheep.berlios.de> Author: aljen Date: 2009-10-02 19:17:29 +0200 (Fri, 02 Oct 2009) New Revision: 33411 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=33411&view=rev Added: haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_video_context.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_video_context.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_video_context.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_video_state.h Removed: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_format_access.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_format_table.c Modified: haiku/branches/components/gallium3d/src/add-ons/opengl/softpipe/Jamfile haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/Jamfile haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_gen_mipmap.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_math.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_network.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_network.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_tile.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/i915simple/gem/intel_drm_api.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/i915simple/gem/intel_drm_buffer.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/i915simple/i915_prim_vbuf.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/i915simple/i915_texture.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/Jamfile haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_context.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_state_surface.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_texture.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_texture.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/drivers/softpipe/sp_tile_cache.c haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_config.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_defines.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_format.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_inlines.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_screen.h haiku/branches/components/gallium3d/src/libs/mesa/gallium/include/pipe/p_state.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/drivers/common/driverfuncs.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/drivers/common/meta.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/drivers/common/meta.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/accum.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/accum.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_arrayelt.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_arrayelt.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_exec.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_loopback.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_loopback.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_noop.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/api_noop.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/attrib.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/attrib.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/context.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/dlist.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/dlist.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/drawpix.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/drawpix.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/enable.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/eval.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/eval.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/execmem.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/extensions.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/fbobject.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/feedback.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/feedback.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/histogram.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/histogram.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/mfeatures.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/mtypes.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/queryobj.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/queryobj.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/rastpos.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/rastpos.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/shared.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/texgen.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/texgen.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/texobj.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/texstate.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/vtxfmt.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/main/vtxfmt.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/prog_execute.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/programopt.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/programopt.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/shader_api.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/library/slang_common_builtin.gc haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/library/slang_common_builtin_gc.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/slang_codegen.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/slang_compile.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/slang_emit.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/slang_ir.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/shader/slang/slang_ir.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_atom_depth.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_cb_accum.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_cb_texture.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_context.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_gen_mipmap.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/state_tracker/st_texture.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/swrast/s_span.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/vbo/vbo_exec.h haiku/branches/components/gallium3d/src/libs/mesa/mesa/vbo/vbo_exec_api.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/vbo/vbo_exec_draw.c haiku/branches/components/gallium3d/src/libs/mesa/mesa/vbo/vbo_save_api.c Log: Synched with mesa master git repository Modified: haiku/branches/components/gallium3d/src/add-ons/opengl/softpipe/Jamfile =================================================================== --- haiku/branches/components/gallium3d/src/add-ons/opengl/softpipe/Jamfile 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/add-ons/opengl/softpipe/Jamfile 2009-10-02 17:17:29 UTC (rev 33411) @@ -2,9 +2,9 @@ UsePrivateHeaders interface opengl ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa gallium auxiliary ] ; +UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa gallium auxiliary ] : true ; UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa gallium drivers softpipe ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa gallium include ] ; +UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa gallium include ] : true ; UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa ] ; #UseHeaders [ FDirName $(HAIKU_TOP) src add-ons opengl trace ] ; Modified: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/Jamfile =================================================================== --- haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/Jamfile 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/Jamfile 2009-10-02 17:17:29 UTC (rev 33411) @@ -29,8 +29,6 @@ u_debug_symbol.c u_draw_quad.c u_format.c - u_format_access.c - u_format_table.c u_gen_mipmap.c u_handle_table.c u_hash.c Modified: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.c =================================================================== --- haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.c 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.c 2009-10-02 17:17:29 UTC (rev 33411) @@ -24,23 +24,21 @@ * **************************************************************************/ -/* - * Based on the work of Eric Anholt +/** + * @file + * CPU feature detection. + * + * @author Dennis Smit + * @author Based on the work of Eric Anholt */ -/* FIXME: clean this entire file up */ +#include "pipe/p_config.h" +#include "u_debug.h" #include "u_cpu_detect.h" -#ifdef __linux__ -#define OS_LINUX -#endif -#ifdef WIN32 -#define OS_WIN32 -#endif - -#if defined(ARCH_POWERPC) -#if defined(OS_DARWIN) +#if defined(PIPE_ARCH_PPC) +#if defined(PIPE_OS_DARWIN) #include #else #include @@ -48,137 +46,140 @@ #endif #endif -#if defined(OS_NETBSD) || defined(OS_OPENBSD) +#if defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD) #include #include #include #endif -#if defined(OS_FREEBSD) +#if defined(PIPE_OS_FREEBSD) #include #include #endif -#if defined(OS_LINUX) +#if defined(PIPE_OS_LINUX) #include #endif -#if defined(OS_WIN32) +#ifdef PIPE_OS_UNIX +#include +#endif + +#if defined(PIPE_OS_WINDOWS) #include #endif -#include -#include -#include -#include +struct util_cpu_caps util_cpu_caps; -static struct cpu_detect_caps __cpu_detect_caps; -static int __cpu_detect_initialized = 0; - static int has_cpuid(void); static int cpuid(unsigned int ax, unsigned int *p); +#if defined(PIPE_ARCH_X86) + /* The sigill handlers */ -#if defined(ARCH_X86) /* x86 (linux katmai handler check thing) */ -#if defined(OS_LINUX) && defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) -static void sigill_handler_sse(int signal, struct sigcontext sc) +#if defined(PIPE_OS_LINUX) //&& defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) +static void +sigill_handler_sse(int signal, struct sigcontext sc) { - /* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1" - * instructions are 3 bytes long. We must increment the instruction - * pointer manually to avoid repeated execution of the offending - * instruction. - * - * If the SIGILL is caused by a divide-by-zero when unmasked - * exceptions aren't supported, the SIMD FPU status and control - * word will be restored at the end of the test, so we don't need - * to worry about doing it here. Besides, we may not be able to... - */ - sc.eip += 3; + /* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1" + * instructions are 3 bytes long. We must increment the instruction + * pointer manually to avoid repeated execution of the offending + * instruction. + * + * If the SIGILL is caused by a divide-by-zero when unmasked + * exceptions aren't supported, the SIMD FPU status and control + * word will be restored at the end of the test, so we don't need + * to worry about doing it here. Besides, we may not be able to... + */ + sc.eip += 3; - __cpu_detect_caps.hasSSE=0; + util_cpu_caps.has_sse=0; } -static void sigfpe_handler_sse(int signal, struct sigcontext sc) +static void +sigfpe_handler_sse(int signal, struct sigcontext sc) { - if (sc.fpstate->magic != 0xffff) { - /* Our signal context has the extended FPU state, so reset the - * divide-by-zero exception mask and clear the divide-by-zero - * exception bit. - */ - sc.fpstate->mxcsr |= 0x00000200; - sc.fpstate->mxcsr &= 0xfffffffb; - } else { - /* If we ever get here, we're completely hosed. - */ - } + if (sc.fpstate->magic != 0xffff) { + /* Our signal context has the extended FPU state, so reset the + * divide-by-zero exception mask and clear the divide-by-zero + * exception bit. + */ + sc.fpstate->mxcsr |= 0x00000200; + sc.fpstate->mxcsr &= 0xfffffffb; + } else { + /* If we ever get here, we're completely hosed. + */ + } } -#endif -#endif /* OS_LINUX && _POSIX_SOURCE && X86_FXSR_MAGIC */ +#endif /* PIPE_OS_LINUX && _POSIX_SOURCE && X86_FXSR_MAGIC */ -#if defined(OS_WIN32) -LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep) +#if defined(PIPE_OS_WINDOWS) +static LONG CALLBACK +win32_sig_handler_sse(EXCEPTION_POINTERS* ep) { - if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){ - ep->ContextRecord->Eip +=3; - __cpu_detect_caps.hasSSE=0; - return EXCEPTION_CONTINUE_EXECUTION; - } - return EXCEPTION_CONTINUE_SEARCH; + if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){ + ep->ContextRecord->Eip +=3; + util_cpu_caps.has_sse=0; + return EXCEPTION_CONTINUE_EXECUTION; + } + return EXCEPTION_CONTINUE_SEARCH; } -#endif /* OS_WIN32 */ +#endif /* PIPE_OS_WINDOWS */ +#endif /* PIPE_ARCH_X86 */ -#if defined(ARCH_POWERPC) && !defined(OS_DARWIN) + +#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_DARWIN) static sigjmp_buf __lv_powerpc_jmpbuf; static volatile sig_atomic_t __lv_powerpc_canjump = 0; -static void sigill_handler (int sig); - -static void sigill_handler (int sig) +static void +sigill_handler(int sig) { - if (!__lv_powerpc_canjump) { - signal (sig, SIG_DFL); - raise (sig); - } + if (!__lv_powerpc_canjump) { + signal (sig, SIG_DFL); + raise (sig); + } - __lv_powerpc_canjump = 0; - siglongjmp(__lv_powerpc_jmpbuf, 1); + __lv_powerpc_canjump = 0; + siglongjmp(__lv_powerpc_jmpbuf, 1); } -static void check_os_altivec_support(void) +static void +check_os_altivec_support(void) { -#if defined(OS_DARWIN) - int sels[2] = {CTL_HW, HW_VECTORUNIT}; - int has_vu = 0; - int len = sizeof (has_vu); - int err; +#if defined(PIPE_OS_DARWIN) + int sels[2] = {CTL_HW, HW_VECTORUNIT}; + int has_vu = 0; + int len = sizeof (has_vu); + int err; - err = sysctl(sels, 2, &has_vu, &len, NULL, 0); + err = sysctl(sels, 2, &has_vu, &len, NULL, 0); - if (err == 0) { - if (has_vu != 0) { - __cpu_detect_caps.hasAltiVec = 1; - } - } -#else /* !OS_DARWIN */ - /* no Darwin, do it the brute-force way */ - /* this is borrowed from the libmpeg2 library */ - signal(SIGILL, sigill_handler); - if (sigsetjmp(__lv_powerpc_jmpbuf, 1)) { - signal(SIGILL, SIG_DFL); - } else { - __lv_powerpc_canjump = 1; + if (err == 0) { + if (has_vu != 0) { + util_cpu_caps.has_altivec = 1; + } + } +#else /* !PIPE_OS_DARWIN */ + /* no Darwin, do it the brute-force way */ + /* this is borrowed from the libmpeg2 library */ + signal(SIGILL, sigill_handler); + if (sigsetjmp(__lv_powerpc_jmpbuf, 1)) { + signal(SIGILL, SIG_DFL); + } else { + __lv_powerpc_canjump = 1; - __asm __volatile - ("mtspr 256, %0\n\t" - "vand %%v0, %%v0, %%v0" - : - : "r" (-1)); + __asm __volatile + ("mtspr 256, %0\n\t" + "vand %%v0, %%v0, %%v0" + : + : "r" (-1)); - signal(SIGILL, SIG_DFL); - __cpu_detect_caps.hasAltiVec = 1; - } + signal(SIGILL, SIG_DFL); + util_cpu_caps.has_altivec = 1; + } #endif } #endif @@ -189,318 +190,312 @@ * and RedHat patched 2.2 kernels that have broken exception handling * support for user space apps that do SSE. */ -static void check_os_katmai_support(void) +static void +check_os_katmai_support(void) { -#if defined(ARCH_X86) -#if defined(OS_FREEBSD) - int has_sse=0, ret; - int len = sizeof (has_sse); +#if defined(PIPE_ARCH_X86) +#if defined(PIPE_OS_FREEBSD) + int has_sse=0, ret; + int len = sizeof (has_sse); - ret = sysctlbyname("hw.instruction_sse", &has_sse, &len, NULL, 0); - if (ret || !has_sse) - __cpu_detect_caps.hasSSE=0; + ret = sysctlbyname("hw.instruction_sse", &has_sse, &len, NULL, 0); + if (ret || !has_sse) + util_cpu_caps.has_sse=0; -#elif defined(OS_NETBSD) || defined(OS_OPENBSD) - int has_sse, has_sse2, ret, mib[2]; - int varlen; +#elif defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD) + int has_sse, has_sse2, ret, mib[2]; + int varlen; - mib[0] = CTL_MACHDEP; - mib[1] = CPU_SSE; - varlen = sizeof (has_sse); + mib[0] = CTL_MACHDEP; + mib[1] = CPU_SSE; + varlen = sizeof (has_sse); - ret = sysctl(mib, 2, &has_sse, &varlen, NULL, 0); - if (ret < 0 || !has_sse) { - __cpu_detect_caps.hasSSE = 0; - } else { - __cpu_detect_caps.hasSSE = 1; - } + ret = sysctl(mib, 2, &has_sse, &varlen, NULL, 0); + if (ret < 0 || !has_sse) { + util_cpu_caps.has_sse = 0; + } else { + util_cpu_caps.has_sse = 1; + } - mib[1] = CPU_SSE2; - varlen = sizeof (has_sse2); - ret = sysctl(mib, 2, &has_sse2, &varlen, NULL, 0); - if (ret < 0 || !has_sse2) { - __cpu_detect_caps.hasSSE2 = 0; - } else { - __cpu_detect_caps.hasSSE2 = 1; - } - __cpu_detect_caps.hasSSE = 0; /* FIXME ?!?!? */ + mib[1] = CPU_SSE2; + varlen = sizeof (has_sse2); + ret = sysctl(mib, 2, &has_sse2, &varlen, NULL, 0); + if (ret < 0 || !has_sse2) { + util_cpu_caps.has_sse2 = 0; + } else { + util_cpu_caps.has_sse2 = 1; + } + util_cpu_caps.has_sse = 0; /* FIXME ?!?!? */ -#elif defined(OS_WIN32) - LPTOP_LEVEL_EXCEPTION_FILTER exc_fil; - if (__cpu_detect_caps.hasSSE) { - exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse); - __asm __volatile ("xorps %xmm0, %xmm0"); - SetUnhandledExceptionFilter(exc_fil); - } -#elif defined(OS_LINUX) - struct sigaction saved_sigill; - struct sigaction saved_sigfpe; +#elif defined(PIPE_OS_WINDOWS) + LPTOP_LEVEL_EXCEPTION_FILTER exc_fil; + if (util_cpu_caps.has_sse) { + exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse); +#if defined(PIPE_CC_GCC) + __asm __volatile ("xorps %xmm0, %xmm0"); +#elif defined(PIPE_CC_MSVC) + __asm { + xorps xmm0, xmm0 // executing SSE instruction + } +#else +#error Unsupported compiler +#endif + SetUnhandledExceptionFilter(exc_fil); + } +#elif defined(PIPE_OS_LINUX) + struct sigaction saved_sigill; + struct sigaction saved_sigfpe; - /* Save the original signal handlers. - */ - sigaction(SIGILL, NULL, &saved_sigill); - sigaction(SIGFPE, NULL, &saved_sigfpe); + /* Save the original signal handlers. + */ + sigaction(SIGILL, NULL, &saved_sigill); + sigaction(SIGFPE, NULL, &saved_sigfpe); - signal(SIGILL, (void (*)(int))sigill_handler_sse); - signal(SIGFPE, (void (*)(int))sigfpe_handler_sse); + signal(SIGILL, (void (*)(int))sigill_handler_sse); + signal(SIGFPE, (void (*)(int))sigfpe_handler_sse); - /* Emulate test for OSFXSR in CR4. The OS will set this bit if it - * supports the extended FPU save and restore required for SSE. If - * we execute an SSE instruction on a PIII and get a SIGILL, the OS - * doesn't support Streaming SIMD Exceptions, even if the processor - * does. - */ - if (__cpu_detect_caps.hasSSE) { - __asm __volatile ("xorps %xmm1, %xmm0"); - } + /* Emulate test for OSFXSR in CR4. The OS will set this bit if it + * supports the extended FPU save and restore required for SSE. If + * we execute an SSE instruction on a PIII and get a SIGILL, the OS + * doesn't support Streaming SIMD Exceptions, even if the processor + * does. + */ + if (util_cpu_caps.has_sse) { + __asm __volatile ("xorps %xmm1, %xmm0"); + } - /* Emulate test for OSXMMEXCPT in CR4. The OS will set this bit if - * it supports unmasked SIMD FPU exceptions. If we unmask the - * exceptions, do a SIMD divide-by-zero and get a SIGILL, the OS - * doesn't support unmasked SIMD FPU exceptions. If we get a SIGFPE - * as expected, we're okay but we need to clean up after it. - * - * Are we being too stringent in our requirement that the OS support - * unmasked exceptions? Certain RedHat 2.2 kernels enable SSE by - * setting CR4.OSFXSR but don't support unmasked exceptions. Win98 - * doesn't even support them. We at least know the user-space SSE - * support is good in kernels that do support unmasked exceptions, - * and therefore to be safe I'm going to leave this test in here. - */ - if (__cpu_detect_caps.hasSSE) { - // test_os_katmai_exception_support(); - } + /* Emulate test for OSXMMEXCPT in CR4. The OS will set this bit if + * it supports unmasked SIMD FPU exceptions. If we unmask the + * exceptions, do a SIMD divide-by-zero and get a SIGILL, the OS + * doesn't support unmasked SIMD FPU exceptions. If we get a SIGFPE + * as expected, we're okay but we need to clean up after it. + * + * Are we being too stringent in our requirement that the OS support + * unmasked exceptions? Certain RedHat 2.2 kernels enable SSE by + * setting CR4.OSFXSR but don't support unmasked exceptions. Win98 + * doesn't even support them. We at least know the user-space SSE + * support is good in kernels that do support unmasked exceptions, + * and therefore to be safe I'm going to leave this test in here. + */ + if (util_cpu_caps.has_sse) { + // test_os_katmai_exception_support(); + } - /* Restore the original signal handlers. - */ - sigaction(SIGILL, &saved_sigill, NULL); - sigaction(SIGFPE, &saved_sigfpe, NULL); + /* Restore the original signal handlers. + */ + sigaction(SIGILL, &saved_sigill, NULL); + sigaction(SIGFPE, &saved_sigfpe, NULL); #else - /* We can't use POSIX signal handling to test the availability of - * SSE, so we disable it by default. - */ - __cpu_detect_caps.hasSSE = 0; + /* We can't use POSIX signal handling to test the availability of + * SSE, so we disable it by default. + */ + util_cpu_caps.has_sse = 0; #endif /* __linux__ */ #endif + +#if defined(PIPE_ARCH_X86_64) + util_cpu_caps.has_sse = 1; +#endif } static int has_cpuid(void) { -#if defined(ARCH_X86) - int a, c; +#if defined(PIPE_ARCH_X86) +#if defined(PIPE_OS_GCC) + int a, c; - __asm __volatile - ("pushf\n" - "popl %0\n" - "movl %0, %1\n" - "xorl $0x200000, %0\n" - "push %0\n" - "popf\n" - "pushf\n" - "popl %0\n" - : "=a" (a), "=c" (c) - : - : "cc"); + __asm __volatile + ("pushf\n" + "popl %0\n" + "movl %0, %1\n" + "xorl $0x200000, %0\n" + "push %0\n" + "popf\n" + "pushf\n" + "popl %0\n" + : "=a" (a), "=c" (c) + : + : "cc"); - return a != c; + return a != c; #else - return 0; + /* FIXME */ + return 1; #endif +#elif defined(PIPE_ARCH_X86_64) + return 1; +#else + return 0; +#endif } -static int cpuid(unsigned int ax, unsigned int *p) +static INLINE int +cpuid(unsigned int ax, unsigned int *p) { -#if defined(ARCH_X86) - unsigned int flags; + int ret = -1; - __asm __volatile - ("movl %%ebx, %%esi\n\t" - "cpuid\n\t" - "xchgl %%ebx, %%esi" - : "=a" (p[0]), "=S" (p[1]), - "=c" (p[2]), "=d" (p[3]) - : "0" (ax)); +#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) +#if defined(PIPE_CC_GCC) + __asm __volatile + ("movl %%ebx, %%esi\n\t" + "cpuid\n\t" + "xchgl %%ebx, %%esi" + : "=a" (p[0]), "=S" (p[1]), + "=c" (p[2]), "=d" (p[3]) + : "0" (ax)); - return 0; -#else - return -1; + ret = 0; +#elif defined(PIPE_CC_MSVC) + __cpuid(ax, p); + + ret = 0; #endif +#endif + + return ret; } -void cpu_detect_initialize() +void +util_cpu_detect(void) { - unsigned int regs[4]; - unsigned int regs2[4]; + static boolean util_cpu_detect_initialized = FALSE; - int mib[2], ncpu; - int len; + if(util_cpu_detect_initialized) + return; - memset(&__cpu_detect_caps, 0, sizeof (struct cpu_detect_caps)); + memset(&util_cpu_caps, 0, sizeof util_cpu_caps); - /* Check for arch type */ -#if defined(ARCH_MIPS) - __cpu_detect_caps.type = CPU_DETECT_TYPE_MIPS; -#elif defined(ARCH_ALPHA) - __cpu_detect_caps.type = CPU_DETECT_TYPE_ALPHA; -#elif defined(ARCH_SPARC) - __cpu_detect_caps.type = CPU_DETECT_TYPE_SPARC; -#elif defined(ARCH_X86) - __cpu_detect_caps.type = CPU_DETECT_TYPE_X86; -#elif defined(ARCH_POWERPC) - __cpu_detect_caps.type = CPU_DETECT_TYPE_POWERPC; + /* Check for arch type */ +#if defined(PIPE_ARCH_MIPS) + util_cpu_caps.arch = UTIL_CPU_ARCH_MIPS; +#elif defined(PIPE_ARCH_ALPHA) + util_cpu_caps.arch = UTIL_CPU_ARCH_ALPHA; +#elif defined(PIPE_ARCH_SPARC) + util_cpu_caps.arch = UTIL_CPU_ARCH_SPARC; +#elif defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) + util_cpu_caps.arch = UTIL_CPU_ARCH_X86; +#elif defined(PIPE_ARCH_PPC) + util_cpu_caps.arch = UTIL_CPU_ARCH_POWERPC; #else - __cpu_detect_caps.type = CPU_DETECT_TYPE_OTHER; + util_cpu_caps.arch = UTIL_CPU_ARCH_UNKNOWN; #endif - /* Count the number of CPUs in system */ -#if !defined(OS_WIN32) && !defined(OS_UNKNOWN) && defined(_SC_NPROCESSORS_ONLN) - __cpu_detect_caps.nrcpu = sysconf(_SC_NPROCESSORS_ONLN); - if (__cpu_detect_caps.nrcpu == -1) - __cpu_detect_caps.nrcpu = 1; + /* Count the number of CPUs in system */ +#if !defined(PIPE_OS_WINDOWS) && !defined(PIPE_OS_UNKNOWN) && defined(_SC_NPROCESSORS_ONLN) + util_cpu_caps.nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); + if (util_cpu_caps.nr_cpus == -1) + util_cpu_caps.nr_cpus = 1; -#elif defined(OS_NETBSD) || defined(OS_FREEBSD) || defined(OS_OPENBSD) +#elif defined(PIPE_OS_NETBSD) || defined(PIPE_OS_FREEBSD) || defined(PIPE_OS_OPENBSD) + { + int mib[2], ncpu; + int len; - mib[0] = CTL_HW; - mib[1] = HW_NCPU; + mib[0] = CTL_HW; + mib[1] = HW_NCPU; - len = sizeof (ncpu); - sysctl(mib, 2, &ncpu, &len, NULL, 0); - __cpu_detect_caps.nrcpu = ncpu; - + len = sizeof (ncpu); + sysctl(mib, 2, &ncpu, &len, NULL, 0); + util_cpu_caps.nr_cpus = ncpu; + } #else - __cpu_detect_caps.nrcpu = 1; + util_cpu_caps.nr_cpus = 1; #endif -#if defined(ARCH_X86) - /* No cpuid, old 486 or lower */ - if (has_cpuid() == 0) - return; +#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) + if (has_cpuid()) { + unsigned int regs[4]; + unsigned int regs2[4]; - __cpu_detect_caps.cacheline = 32; + util_cpu_caps.cacheline = 32; - /* Get max cpuid level */ - cpuid(0x00000000, regs); + /* Get max cpuid level */ + cpuid(0x00000000, regs); - if (regs[0] >= 0x00000001) { - unsigned int cacheline; + if (regs[0] >= 0x00000001) { + unsigned int cacheline; - cpuid (0x00000001, regs2); + cpuid (0x00000001, regs2); - __cpu_detect_caps.x86cpuType = (regs2[0] >> 8) & 0xf; - if (__cpu_detect_caps.x86cpuType == 0xf) - __cpu_detect_caps.x86cpuType = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */ + util_cpu_caps.x86_cpu_type = (regs2[0] >> 8) & 0xf; + if (util_cpu_caps.x86_cpu_type == 0xf) + util_cpu_caps.x86_cpu_type = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */ - /* general feature flags */ - __cpu_detect_caps.hasTSC = (regs2[3] & (1 << 8 )) >> 8; /* 0x0000010 */ - __cpu_detect_caps.hasMMX = (regs2[3] & (1 << 23 )) >> 23; /* 0x0800000 */ - __cpu_detect_caps.hasSSE = (regs2[3] & (1 << 25 )) >> 25; /* 0x2000000 */ - __cpu_detect_caps.hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; /* 0x4000000 */ - __cpu_detect_caps.hasSSE3 = (regs2[2] & (1)); /* 0x0000001 */ - __cpu_detect_caps.hasSSSE3 = (regs2[2] & (1 << 9 )) >> 9; /* 0x0000020 */ - __cpu_detect_caps.hasMMX2 = __cpu_detect_caps.hasSSE; /* SSE cpus supports mmxext too */ + /* general feature flags */ + util_cpu_caps.has_tsc = (regs2[3] & (1 << 8 )) >> 8; /* 0x0000010 */ + util_cpu_caps.has_mmx = (regs2[3] & (1 << 23 )) >> 23; /* 0x0800000 */ + util_cpu_caps.has_sse = (regs2[3] & (1 << 25 )) >> 25; /* 0x2000000 */ + util_cpu_caps.has_sse2 = (regs2[3] & (1 << 26 )) >> 26; /* 0x4000000 */ + util_cpu_caps.has_sse3 = (regs2[2] & (1)); /* 0x0000001 */ + util_cpu_caps.has_ssse3 = (regs2[2] & (1 << 9 )) >> 9; /* 0x0000020 */ + util_cpu_caps.has_sse4_1 = (regs2[2] & (1 << 19)) >> 19; + util_cpu_caps.has_mmx2 = util_cpu_caps.has_sse; /* SSE cpus supports mmxext too */ - cacheline = ((regs2[1] >> 8) & 0xFF) * 8; - if (cacheline > 0) - __cpu_detect_caps.cacheline = cacheline; - } + cacheline = ((regs2[1] >> 8) & 0xFF) * 8; + if (cacheline > 0) + util_cpu_caps.cacheline = cacheline; + } - cpuid(0x80000000, regs); + cpuid(0x80000000, regs); - if (regs[0] >= 0x80000001) { + if (regs[0] >= 0x80000001) { - cpuid(0x80000001, regs2); + cpuid(0x80000001, regs2); - __cpu_detect_caps.hasMMX |= (regs2[3] & (1 << 23 )) >> 23; /* 0x0800000 */ - __cpu_detect_caps.hasMMX2 |= (regs2[3] & (1 << 22 )) >> 22; /* 0x400000 */ - __cpu_detect_caps.has3DNow = (regs2[3] & (1 << 31 )) >> 31; /* 0x80000000 */ - __cpu_detect_caps.has3DNowExt = (regs2[3] & (1 << 30 )) >> 30; - } + util_cpu_caps.has_mmx |= (regs2[3] & (1 << 23 )) >> 23; /* 0x0800000 */ + util_cpu_caps.has_mmx2 |= (regs2[3] & (1 << 22 )) >> 22; /* 0x400000 */ + util_cpu_caps.has_3dnow = (regs2[3] & (1 << 31 )) >> 31; /* 0x80000000 */ + util_cpu_caps.has_3dnow_ext = (regs2[3] & (1 << 30 )) >> 30; + } - if (regs[0] >= 0x80000006) { - cpuid(0x80000006, regs2); - __cpu_detect_caps.cacheline = regs2[2] & 0xFF; - } + if (regs[0] >= 0x80000006) { + cpuid(0x80000006, regs2); + util_cpu_caps.cacheline = regs2[2] & 0xFF; + } +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_FREEBSD) || defined(PIPE_OS_NETBSD) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_OPENBSD) + if (util_cpu_caps.has_sse) + check_os_katmai_support(); -#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_CYGWIN) || defined(OS_OPENBSD) - if (__cpu_detect_caps.hasSSE) - check_os_katmai_support(); - - if (!__cpu_detect_caps.hasSSE) { - __cpu_detect_caps.hasSSE2 = 0; - __cpu_detect_caps.hasSSE3 = 0; - __cpu_detect_caps.hasSSSE3 = 0; - } + if (!util_cpu_caps.has_sse) { + util_cpu_caps.has_sse2 = 0; + util_cpu_caps.has_sse3 = 0; + util_cpu_caps.has_ssse3 = 0; + } #else - __cpu_detect_caps.hasSSE = 0; - __cpu_detect_caps.hasSSE2 = 0; - __cpu_detect_caps.hasSSE3 = 0; - __cpu_detect_caps.hasSSSE3 = 0; + util_cpu_caps.has_sse = 0; + util_cpu_caps.has_sse2 = 0; + util_cpu_caps.has_sse3 = 0; + util_cpu_caps.has_ssse3 = 0; #endif -#endif /* ARCH_X86 */ + } +#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ -#if defined(ARCH_POWERPC) - check_os_altivec_support(); -#endif /* ARCH_POWERPC */ +#if defined(PIPE_ARCH_PPC) + check_os_altivec_support(); +#endif /* PIPE_ARCH_PPC */ - __cpu_detect_initialized = 1; -} +#ifdef DEBUG + debug_printf("util_cpu_caps.arch = %i\n", util_cpu_caps.arch); + debug_printf("util_cpu_caps.nr_cpus = %u\n", util_cpu_caps.nr_cpus); -struct cpu_detect_caps *cpu_detect_get_caps() -{ - return &__cpu_detect_caps; -} + debug_printf("util_cpu_caps.x86_cpu_type = %u\n", util_cpu_caps.x86_cpu_type); + debug_printf("util_cpu_caps.cacheline = %u\n", util_cpu_caps.cacheline); -/* The getters and setters for feature flags */ -int cpu_detect_get_tsc() -{ - return __cpu_detect_caps.hasTSC; -} + debug_printf("util_cpu_caps.has_tsc = %u\n", util_cpu_caps.has_tsc); + debug_printf("util_cpu_caps.has_mmx = %u\n", util_cpu_caps.has_mmx); + debug_printf("util_cpu_caps.has_mmx2 = %u\n", util_cpu_caps.has_mmx2); + debug_printf("util_cpu_caps.has_sse = %u\n", util_cpu_caps.has_sse); + debug_printf("util_cpu_caps.has_sse2 = %u\n", util_cpu_caps.has_sse2); + debug_printf("util_cpu_caps.has_sse3 = %u\n", util_cpu_caps.has_sse3); + debug_printf("util_cpu_caps.has_ssse3 = %u\n", util_cpu_caps.has_ssse3); + debug_printf("util_cpu_caps.has_sse4_1 = %u\n", util_cpu_caps.has_sse4_1); + debug_printf("util_cpu_caps.has_3dnow = %u\n", util_cpu_caps.has_3dnow); + debug_printf("util_cpu_caps.has_3dnow_ext = %u\n", util_cpu_caps.has_3dnow_ext); + debug_printf("util_cpu_caps.has_altivec = %u\n", util_cpu_caps.has_altivec); +#endif -int cpu_detect_get_mmx() -{ - return __cpu_detect_caps.hasMMX; + util_cpu_detect_initialized = TRUE; } - -int cpu_detect_get_mmx2() -{ - return __cpu_detect_caps.hasMMX2; -} - -int cpu_detect_get_sse() -{ - return __cpu_detect_caps.hasSSE; -} - -int cpu_detect_get_sse2() -{ - return __cpu_detect_caps.hasSSE2; -} - -int cpu_detect_get_sse3() -{ - return __cpu_detect_caps.hasSSE3; -} - -int cpu_detect_get_ssse3() -{ - return __cpu_detect_caps.hasSSSE3; -} - -int cpu_detect_get_3dnow() -{ - return __cpu_detect_caps.has3DNow; -} - -int cpu_detect_get_3dnow2() -{ - return __cpu_detect_caps.has3DNowExt; -} - -int cpu_detect_get_altivec() -{ - return __cpu_detect_caps.hasAltiVec; -} - Modified: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.h =================================================================== --- haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.h 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_cpu_detect.h 2009-10-02 17:17:29 UTC (rev 33411) @@ -24,55 +24,53 @@ * ***************************************************************************/ -/* - * Based on the work of Eric Anholt +/** + * @file + * CPU feature detection. + * + * @author Dennis Smit + * @author Based on the work of Eric Anholt */ -#ifndef _CPU_DETECT_H -#define _CPU_DETECT_H +#ifndef _UTIL_CPU_DETECT_H +#define _UTIL_CPU_DETECT_H -typedef enum { - CPU_DETECT_TYPE_MIPS, - CPU_DETECT_TYPE_ALPHA, - CPU_DETECT_TYPE_SPARC, - CPU_DETECT_TYPE_X86, - CPU_DETECT_TYPE_POWERPC, - CPU_DETECT_TYPE_OTHER -} cpu_detect_type; +#include "pipe/p_compiler.h" -struct cpu_detect_caps { - cpu_detect_type type; - int nrcpu; +enum util_cpu_arch { + UTIL_CPU_ARCH_UNKNOWN = 0, + UTIL_CPU_ARCH_MIPS, + UTIL_CPU_ARCH_ALPHA, + UTIL_CPU_ARCH_SPARC, + UTIL_CPU_ARCH_X86, + UTIL_CPU_ARCH_POWERPC +}; - /* Feature flags */ - int x86cpuType; - int cacheline; +struct util_cpu_caps { + enum util_cpu_arch arch; + unsigned nr_cpus; - int hasTSC; - int hasMMX; - int hasMMX2; - int hasSSE; - int hasSSE2; - int hasSSE3; - int hasSSSE3; - int has3DNow; - int has3DNowExt; - int hasAltiVec; + /* Feature flags */ + int x86_cpu_type; + unsigned cacheline; + + unsigned has_tsc:1; + unsigned has_mmx:1; + unsigned has_mmx2:1; + unsigned has_sse:1; + unsigned has_sse2:1; + unsigned has_sse3:1; + unsigned has_ssse3:1; + unsigned has_sse4_1:1; + unsigned has_3dnow:1; + unsigned has_3dnow_ext:1; + unsigned has_altivec:1; }; -/* prototypes */ -void cpu_detect_initialize(void); -struct cpu_detect_caps *cpu_detect_get_caps(void); +extern struct util_cpu_caps +util_cpu_caps; -int cpu_detect_get_tsc(void); -int cpu_detect_get_mmx(void); -int cpu_detect_get_mmx2(void); -int cpu_detect_get_sse(void); -int cpu_detect_get_sse2(void); -int cpu_detect_get_sse3(void); -int cpu_detect_get_ssse3(void); -int cpu_detect_get_3dnow(void); -int cpu_detect_get_3dnow2(void); -int cpu_detect_get_altivec(void); +void util_cpu_detect(void); -#endif /* _CPU_DETECT_H */ + +#endif /* _UTIL_CPU_DETECT_H */ Deleted: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_format_access.c Deleted: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_format_table.c Modified: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_gen_mipmap.c =================================================================== --- haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_gen_mipmap.c 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_gen_mipmap.c 2009-10-02 17:17:29 UTC (rev 33411) @@ -1515,6 +1515,17 @@ uint zslice = 0; uint offset; + /* The texture object should have room for the levels which we're + * about to generate. + */ + assert(lastLevel <= pt->last_level); + + /* If this fails, why are we here? */ + assert(lastLevel > baseLevel); + + assert(filter == PIPE_TEX_FILTER_LINEAR || + filter == PIPE_TEX_FILTER_NEAREST); + /* check if we can render in the texture's format */ if (!screen->is_format_supported(screen, pt->format, PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) { Modified: haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_math.h =================================================================== --- haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_math.h 2009-10-02 16:18:40 UTC (rev 33410) +++ haiku/branches/components/gallium3d/src/libs/mesa/gallium/auxiliary/util/u_math.h 2009-10-02 17:17:29 UTC (rev 33411) @@ -471,6 +471,26 @@ /** + * Returns the smallest power of two >= x + */ +static INLINE unsigned +util_next_power_of_two(unsigned x) +{ + unsigned i; [... truncated: 6089 lines follow ...] From superstippi at gmx.de Mon Oct 5 12:48:15 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Mon, 05 Oct 2009 12:48:15 +0200 Subject: [Haiku-commits] r33375 - in haiku/trunk/src/preferences: appearance bluetooth In-Reply-To: <20091003200022.57689.4@bepc.1254563253.fake> References: <200909302103.n8UL3LTJ018040@sheep.berlios.de> <20091003200022.57689.4@bepc.1254563253.fake> Message-ID: <20091005124815.376.1@bepc.1254739215.fake> Hi, On 2009-10-03 at 20:00:22 [+0200], Oliver Tappe wrote: > > Allows for be_locale->GetAppCatalog(NULL); and makes sure the > > be_[app_]catalog are being freed when my printfs() didn't fool me. > > > > Whenever the locale changes, call GetAppCatalog again and work with > > be_[app_]catalog? > > We could provide BLocaleApplication as a locale-aware BApplication that > automatically fetches the app's catalog and deletes it upon destruction. > On top of that, the BLocaleApplication could help with implementing the > handling of a language change. > > What do you think? I don't understand why that would require an extra BLocaleApplication, that doesn't seem the right way to go about this to me. Why can't the be_app_catalog and be_catalog variables be allocated lazily and deleted via the same mechanisms that are used for other stuff like that, in InterfaceDefs.cpp for example, IIRC. Best regards, -Stephan From axeld at pinc-software.de Tue Oct 6 09:24:58 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Tue, 06 Oct 2009 09:24:58 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r33404_-_haiku/trunk/src/add-ons/screen?= =?utf-8?q?=5Fsavers/debugnow?= In-Reply-To: Message-ID: <1787293189-BeMail@zon> Ryan Leavengood wrote: > On Fri, Oct 2, 2009 at 5:55 AM, Axel D?rfler > wrote: > > On BeOS, you needed to set the correct low color as well (depending > > on > > the drawing mode, that is, but that's the same on Haiku). It might > > just > > have been less obvious since it uses a different font rendering > > (and > > different fonts as well). > Yeah this is definitely the more correct way to go. Do you have any > ideas in regards to the text bounding boxes? I guess I just need to > test on BeOS to see. I'm not sure if we need to stay compatible with BeOS in this regard (if it really differs); this might also be different on a per font basis. At least I'm not sure if this is actually a bug, or just a font that tries to tell us that something about its shape :-) OTOH the bounding boxes in FontDemo look pretty wrong, so something seems to be wrong in any case. > > I assume you understand what's going on there exactly? At least > > this > > sounds a bit like fixing symptoms rather than causes. > I haven't looked at it deeply but basically the problem is that the > preview view has a view color of black. Whenever that is obscured > whatever was covered gets repainted in black. If the screensaver > doesn't paint over that it stays black. I guess a proper solution > would be for the ScreenSaver preferences to cache a bitmap of the > last > screensaver frame and use that for repainting when needed. But it > sounds a lot more complicated and inefficient than this solution ;) It could render the screen saver to an offscreen bitmap; that doesn't sound so complicated to me, at least, and seems to be the correct solution (I would assume there are other screen savers doing it that way). Bye, Axel. From superstippi at gmx.de Tue Oct 6 10:10:52 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Tue, 06 Oct 2009 10:10:52 +0200 Subject: [Haiku-commits] r33404 - haiku/trunk/src/add-ons/screen_savers/debugnow In-Reply-To: <1787293189-BeMail@zon> References: <1787293189-BeMail@zon> Message-ID: <20091006101052.1415.1@bepc.1254811146.fake> On 2009-10-06 at 09:24:58 [+0200], Axel D?rfler wrote: > OTOH the bounding boxes in > FontDemo look pretty wrong, so something seems to be wrong in any case. Gosh, they do. This used to work perfectly... :-\ > > > I assume you understand what's going on there exactly? At least this > > > sounds a bit like fixing symptoms rather than causes. > > I haven't looked at it deeply but basically the problem is that the > > preview view has a view color of black. Whenever that is obscured > > whatever was covered gets repainted in black. If the screensaver > > doesn't paint over that it stays black. I guess a proper solution would > > be for the ScreenSaver preferences to cache a bitmap of the last > > screensaver frame and use that for repainting when needed. But it > > sounds a lot more complicated and inefficient than this solution ;) > > It could render the screen saver to an offscreen bitmap; that doesn't > sound so complicated to me, at least, and seems to be the correct > solution (I would assume there are other screen savers doing it that way). +1. Best regards, -Stephan From mmlr at mlotz.ch Mon Oct 12 20:35:40 2009 From: mmlr at mlotz.ch (Michael Lotz) Date: Mon, 12 Oct 2009 18:35:40 -0000 Subject: [Haiku-commits] =?windows-1252?q?r29291_-_in_haiku/trunk=3A_build?= =?windows-1252?q?/jam_headers/private/kernel__src/add-ons/kernel/bus=5Fma?= =?windows-1252?q?nagers/usb_src/add-ons/kernel/busses/usb__src/add-ons/ke?= =?windows-1252?q?rnel/debugger_src/add-ons/kernel/drivers/input/usb=5Fhid?= =?windows-1252?q?__src/system/kernel/debug?= In-Reply-To: Message-ID: <5837050311-BeMail@haiku> > On 2009-02-23, mmlr at mail.berlios.de wrote: > > Author: mmlr > > Date: 2009-02-22 21:46:27 +0100 (Sun, 22 Feb 2009) > > New Revision: 29291 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=29291&view=rev > > > Woot! :-) Hehe, and it actually works on real hardware just fine. Now finally able to use KDL on my "legacy free" system here. > Does this patch remove the code that prevents F12 working for USB > keyboards? Yes it does. Regards Michael From mattmadia at gmail.com Sun Oct 18 23:51:51 2009 From: mattmadia at gmail.com (mattmadia at gmail.com) Date: Sun, 18 Oct 2009 14:51:51 -0700 (PDT) Subject: [Haiku-commits] BOM: r33639 don't know how to make pcihdr.h Message-ID: <4adb8df7.9453f10a.6844.ffffd8ba@mx.google.com> Host Machine : FreeBSD 7.1-RELEASE i386 Host Machine 32|64bit : 32bit use-xattr : True use-32bit : False Architectures Tested : x86gcc2 Targets Affected & Last Known Good Revision : | | x86gcc2 | @nightly-cd | 33638 x86gcc2 | @nightly-raw | 33638 x86gcc2 | @nightly-vmware | 33638 Log Snippet : Building Haiku Nightly ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... don't know how to make pcihdr.h ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... don't know how to make usbdevs.h don't know how to make usbdevs_data.h ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... From mattmadia at gmail.com Mon Oct 19 01:23:55 2009 From: mattmadia at gmail.com (mattmadia at gmail.com) Date: Sun, 18 Oct 2009 16:23:55 -0700 (PDT) Subject: [Haiku-commits] BOM: r33562 ...failed C++ /objects/haiku/_arch_/release/add-ons/print/transports/lpr/Lpr.o ... Message-ID: <4adba38b.1408c00a.427c.ffff83d8@mx.google.com> Host Machine : FreeBSD 7.1-RELEASE i386 Host Machine 32|64bit : 32bit use-xattr : True use-32bit : False Architectures Tested : x86gcc4 Targets Affected & Last Known Good Revision : | | x86gcc4 | @nightly-cd | 33638 x86gcc4 | @nightly-raw | 33638 x86gcc4 | @nightly-vmware | 33638 Log Snippet : AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/generic AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/partitioning_systems AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/cpu AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/disk/scsi In file included from /storage/BOM/haiku/haiku/src/add-ons/print/transports/lpr/Lpr.cpp:4: /storage/BOM/haiku/haiku/src/add-ons/print/transports/lpr/LprTransport.h:31: error: 'fstream' does not name a type AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/power AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/drivers/bin AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/console AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/dprintf AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/keyboard AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/null AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/random AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/tty AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/zero AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/auich AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/auvia /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/bin/i586-pc-haiku-gcc -c "/storage/BOM/haiku/haiku/src/add-ons/print/transports/lpr/Lpr.cpp" -O -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -pipe -fno-strict-aliasing -fno-tree-vrp -nostdinc -Wno-deprecated -DHAIKU_INCLUDE_PATENTED_CODE=0 -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -D__HAIKU__ -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -D__INTEL__ -DARCH_x86 -DBOOT_ARCHIVE_IMAGE_OFFSET=300 -DHAIKU_TARGET_PLATFORM_HAIKU -iquote /storage/BOM/haiku/haiku/build/user_config_headers -iquote /storage/BOM/haiku/haiku/build/config_headers -iquote /storage/BOM/haiku/haiku/src/add-ons/print/transports/lpr -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/common/add-ons/print/transports/lpr -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/freebsd/x86/common/add-ons/print/transports/lpr -iquote /storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/common/add-ons/print/transports/lpr -iquote /storage/BOM/haiku/haiku/headers/libs/print/libprint -iquote /storage/BOM/haiku/haiku/src/add-ons/print/transports/shared -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3 -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/i586-pc-haiku -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/backward -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/../../../../i586-pc-haiku/include/c++/4.3.3/ext -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/include -I /storage/BOM/haiku/haiku/generated.x86gcc4/cross-tools/lib/gcc/i586-pc-haiku/4.3.3/include-fixed -I /storage/BOM/haiku/haiku/headers -I /storage/BOM/haiku/haiku/headers/posix -I /storage/BOM/haiku/haiku/headers/glibc -I /storage/BOM/haiku/haiku/headers/os -I /storage/BOM/haiku/haiku/headers/os/add-ons -I /storage/BOM/haiku/haiku/headers/os/add-ons/file_system -I /storage/BOM/haiku/haiku/headers/os/add-ons/graphics -I /storage/BOM/haiku/haiku/headers/os/add-ons/input_server -I /storage/BOM/haiku/haiku/headers/os/add-ons/registrar -I /storage/BOM/haiku/haiku/headers/os/add-ons/screen_saver -I /storage/BOM/haiku/haiku/headers/os/add-ons/tracker -I /storage/BOM/haiku/haiku/headers/os/app -I /storage/BOM/haiku/haiku/headers/os/device -I /storage/BOM/haiku/haiku/headers/os/drivers -I /storage/BOM/haiku/haiku/headers/os/game -I /storage/BOM/haiku/haiku/headers/os/interface -I /storage/BOM/haiku/haiku/headers/os/kernel -I /storage/BOM/haiku/haiku/headers/os/locale -I /storage/BOM/haiku/haiku/headers/os/media -I /storage/BOM/haiku/haiku/headers/os/mail -I /storage/BOM/haiku/haiku/headers/os/midi -I /storage/BOM/haiku/haiku/headers/os/midi2 -I /storage/BOM/haiku/haiku/headers/os/net -I /storage/BOM/haiku/haiku/headers/os/opengl -I /storage/BOM/haiku/haiku/headers/os/storage -I /storage/BOM/haiku/haiku/headers/os/support -I /storage/BOM/haiku/haiku/headers/os/translation -I /storage/BOM/haiku/haiku/headers/private/. -o "/storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/add-ons/print/transports/lpr/Lpr.o" ; ...failed C++ /storage/BOM/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/add-ons/print/transports/lpr/Lpr.o ... ...skipped LPR for lack of Lpr.o... ...skipped haiku.image-copy-files-dummy-system/add-ons/Print/transport for lack of LPR... AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/echo3g AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/emuxki AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/audio/hmulti/hda AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/midi/emuxki AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/midi/usb_midi AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/bus/usb_raw AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/bus/fw_raw AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/floppy/pc_floppy AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/usb/usb_disk AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/printer/usb/usb_printer AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/disk/virtual/nbd AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/dvb/cx23882 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/radeon AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/nvidia AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/neomagic AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/matrox AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/intel_extreme AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/s3 AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/vesa AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/graphics/ati AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/ps2_hid AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/usb_hid AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/input/wacom AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/poke AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/test AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/misc/mem AddSymlinkToContainerCopyFilesScript system/add-ons/kernel/drivers/dev/net/3com From mattmadia at gmail.com Mon Oct 19 01:27:57 2009 From: mattmadia at gmail.com (Matt Madia) Date: Sun, 18 Oct 2009 23:27:57 +0000 Subject: [Haiku-commits] BOM: r33562 ...failed C++ /objects/haiku/_arch_/release/add-ons/print/transports/lpr/Lpr.o ... In-Reply-To: <4adba38b.1408c00a.427c.ffff83d8@mx.google.com> References: <4adba38b.1408c00a.427c.ffff83d8@mx.google.com> Message-ID: <1e42d8c50910181627h5bfbd81bqae98c172ce96d068@mail.gmail.com> On Sun, Oct 18, 2009 at 23:23, wrote: > Host Machine : FreeBSD 7.1-RELEASE i386 > Host Machine 32|64bit : 32bit > use-xattr : True > use-32bit : False > Architectures Tested : > x86gcc4 > Targets Affected & Last Known Good Revision : > | | > > > x86gcc4 | @nightly-cd | 33638 > x86gcc4 | @nightly-raw | 33638 > x86gcc4 | @nightly-vmware | 33638 > Log Snippet : > > AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/kernel/generic > AppendToContainerCopyFilesScript ---This Is Not an Actual Build Failure------ ---This Is Not an Actual Build Failure------ My apologies... i was testing new error parsing and could have sworn i changed the address from haiku-commits to a personal one. --mmadia