Commit Graph

5170 Commits

Author SHA1 Message Date
Stephan Aßmus b1e235937a * Style cleanup.
* Added copyright.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 15:54:12 +00:00
Axel Dörfler 0d22b1a78c * Fixed copyright years, thanks Urias!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 14:14:08 +00:00
Rene Gollent 9fba8251e9 Since wchar support now works, the wstring typedef should now also be safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 14:09:43 +00:00
Axel Dörfler 533cba7eff bonefish + axeld:
* Reverted r31809 as it introduced a race condition; if the I/O request had been
  notified, it could already been deleted at that point.
* Instead, we need to notify the request in each file system/driver that uses
  it. Added new notify_io_request() function that does that exactly.
* Added a TODO comment to the userlandfs where the request notification needs
  a bit more thought.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 12:16:15 +00:00
Axel Dörfler c881516f65 * Accidently committed the wrong bash history line... these are the files that
were supposed to be deleted/changed with the previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 01:31:19 +00:00
Axel Dörfler d37f15ebee * Updated license header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 00:57:41 +00:00
Axel Dörfler 8ae594ffd4 * Introduced dedicated syscalls for the deprecated BeOS fs_attr API. Before,
each attribute access needed 3 syscalls, now only one as it should.
* Renamed the new Haiku call fs_open_attr() to fs_fopen_attr(), and added a new
  function fs_open_attr() that takes a path (same semantics as the
  fs_[f]open_attr_dir() functions already present in BeOS).
* Merged former _kern_open_attr(), and _kern_create_attr() into one syscall.
* Cleaned up vfs.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 00:34:44 +00:00
Ingo Weinhold 86e89f1207 Added BDebugEventInputStream::Seek() to seek in the stream. Works for data
buffer based stream only ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 18:51:38 +00:00
Stefano Ceccherini 8752f52d71 Added an (empty) destructor. Use a const BRegion (since we can now), honour
the 80 column limit. Some comment clarification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 16:56:29 +00:00
Stephan Aßmus 20f7be247e Actually, make B_PLAIN_BORDER look the default for simple separator lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 15:48:51 +00:00
Stephan Aßmus 79f2db07a8 Implemented a BSeparatorView. It can be a horizontal or vertical line/border,
or also a label, optionally with a BView for the label. Some aspects of it have
not been exposed to throughrough testing, yet (archiving, label view),
the BAlignment support is also not well tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 14:15:55 +00:00
Stefano Ceccherini 2e6adc56e4 Added a _BPictureExtent_::Flatten(), moved some code from BPicture::Flatten()
into it. Renamed ImportData() to Unflatten(). Some code shuffling.
No functional change.
Some style cleanup needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 12:33:47 +00:00
Axel Dörfler 47d9ed62d3 * Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
  workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 17:22:11 +00:00
François Revol bb1325a30e [GSoC] [ARM] Patch by Johannes Wischert.
Placeholder private headers for the kernel and libroot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 16:23:08 +00:00
Stephan Aßmus 5147963dcd headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than
Tracker's OpenHashTable.h which it should eventually replace. We've renamed the
class to BOpenHashTable and changed the interface slightly so that HashTableLink
became superfluous.
Adapted all the code that used it. Since the OpenHashTables no longer clash,
this should fix the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 00:39:12 +00:00
Michael Lotz 8e1857f795 * Completely rework the USB HID driver to make use of the HID framework
introduced earlier.
* Reworked the previous device classes to make them ProtocolHandlers handling
  their respective input_server <-> driver protocol.
* Implement setting report item data and building/sending reports based on that.
* Remove the old HID parsing code.

This enables us to use all HID devices as we now parse and use the HID
descriptors/reports. Non-boot-porotocol devices should therefore work.

The next step will be to implement a generic input/output framework in userland
that can communicate with a generic protocol handler in usb_hid. This will then
enable applications to make use of all the non-mapped HID stuff directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 00:35:21 +00:00
Stephan Aßmus e343673a0b * The app_server implements modifiers for performing decorator actions anywhere
inside the window. These are Command + Alt. In X11, it's just Alt, but that
  is already used in various Haiku/BeOS apps.
* Introduced new window flag B_NO_SERVER_SIDE_WINDOW_MODIFIERS to disable the
  above.
* Made click to front in FFM mode less strict, you can slightly move the mouse
  now and still click windows to front.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 20:45:04 +00:00
Axel Dörfler f75b8de3fc * Discarded the "parametersSize" parameter from various disk device manager
functions.
* Since we now use UserStringParameter, this fixes the missing null termination
  of the parameter string, and thus bug #4045.
* Removed UserMemoryParameter, as it's no longer in use.
* Adjusted syscalls accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:27:27 +00:00
Axel Dörfler 6ef35ef770 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:23:59 +00:00
Ingo Weinhold 64ccb6b58a Synced the different definitions of BUFSIZ with the internal one. What a mess...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 15:28:33 +00:00
Axel Dörfler 63c07622f6 * Some style cleanups, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 11:25:14 +00:00
Stefano Ceccherini ab53bb2086 Export get_bytes_per_row() from InterfacePrivate.h, and use it in ServerBitmap
in place of the own rolled implementation. Comment typo fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 07:59:16 +00:00
Ingo Weinhold d8c41ef38f Added support for containing BReferenceables of arbitrary actual type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:53 +00:00
Ingo Weinhold 6feb776265 Alias Referenceable as BReferenceable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:06 +00:00
Axel Dörfler b8e5a675e5 * Implemented missing date parsing; queries like "last_modified > %-5 minutes%"
are now working as they should.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 10:05:20 +00:00
Axel Dörfler 8315ac2417 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 09:45:54 +00:00
Axel Dörfler bdee97bc3a * Applied slightly changed patch by Alexander von Gluck.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 08:22:01 +00:00
François Revol 77777c5389 Of course, using warnings as placeholders for code to write works fine until it's included when building an arch with -Werror...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:14:32 +00:00
François Revol ff84453736 [GSoC] [ARM] Patch by Johannes Wischert.
Add dummy args structs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:10:06 +00:00
François Revol 735be9db97 [GSoC] [ARM] Patch by Johannes Wischert.
Include ARM struct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:04:35 +00:00
François Revol 8666a725ac [GSoC] [ARM] Patch by Johannes Wischert.
Add ARM header for debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:03:42 +00:00
François Revol 9463ff4cb7 [GSoC] [ARM] Patch by Johannes Wischert.
Add ARM defines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 17:19:02 +00:00
Ingo Weinhold 0b11ecb18c * Always include the public arch_debugger.h headers. The structures defined
there are prefixed with the respective architecture name. Useful for remote
  debugging a different architecture.
* <x86/arch_debugger.h>: Introduced a structure for the FPU state, so that it
  isn't left to the debugger.
* Removed the _kern_get_thread_cpu_state() syscall. Was originally intended for
  bdb compatiblity, but isn't really needed.
* Kernel x86 arch_get_debug_cpu_state(): The use of fnsave was broken, since
  it reinits the FPU after saving the state. This resulted in weird results
  when debugging functions using the FPU. We now use fxsave, if available.
  Otherwise fnsave + frstor should be used -- not fully implemented yet.
  Same for arch_set_debug_cpu_state().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 22:18:39 +00:00
Axel Dörfler 13aa1795dd * It seems we always have to specify all flags to make it work; removed "flags"
parameter from start_system_profiler().
* Added stack depth, and interval parameters to it, though.
* Profiling the boot process is now possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 12:09:15 +00:00
Axel Dörfler f74fedd9ba * Made header self-contained.
* Added missing license.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 09:24:07 +00:00
Ingo Weinhold 1746066cde * Made _Allocate() static.
* Moved the private inline methods up in the source file, so they can actually
  be inlined.
* UnlockBuffer(): Removed superfluous "if". Maybe the one who wrote it can have
  a look and check whether something else was intended originally.
* _MakeWritable() (both versions): Removed the superfluous ref count increment
  and the matching decrements.
* _Resize(): Fixed ref count ASSERT. It would always be triggered when called
  from UnlockBuffer(), since the ref count is -1 in that case.
* Clarified some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 00:04:46 +00:00
Axel Dörfler c755ecfe96 * Added an emergency key mechanism to the kernel, inspired by Jan Klötzke's
patch from about a year ago (I couldn't use any code of his yet, though,
  but there are a few things left). The emergency keys are triggered by
  pressing Alt-SysReq + key.
* By default, only Alt-SysReq+'d' is used as a means to deliberately enter
  the kernel debugger. F12 belongs to userland again, now :-)
* Debugger add-ons now have another optional method to implement their own
  emergency keys - 'd' for the debugger cannot be overridden, though.
* The mechanism can be turned off via a new kernel setting, so it's not that
  easy anymore to "crash" Haiku if you don't want to.
* Right now, the PS/2 driver, and the pre-input_server in-kernel debugger
  keyboard mini-driver support this, USB not yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:39:37 +00:00
Ingo Weinhold 7f96148cac Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
  and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
  disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
  partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
  partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
  - Replaced the "Create" submenu by a simple menu item. The type can now by
    chosen in the dialog.
  - Make use of initialization and child creation parameter editors. Some
    non-generic code has been moved to the respective editor implementations
    (BFS, intel partitioning system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:29:16 +00:00
Axel Dörfler c7544c1390 * Enabled default time for shutting off the monitor (after 20 minutes).
* Removed BeOS R5 network password retrieval code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 14:03:30 +00:00
Ingo Weinhold b5d6fc7173 * Added missing bool type support.
* Added Bytes(), returning a pointer to the "raw" data, and Size(), returning
  the data size.
* Added SetToTypedData(), which initializes the object from a data buffer and a
  type code.
* Added SwapEndianess() to swap the endianess of the contained data (if
  possible).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 23:01:48 +00:00
Axel Dörfler 5fbad060b3 * Work-in-progress on a kernel profile service that can be evaluated from
userland afterwards.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-17 16:21:06 +00:00
Oliver Tappe da82d38f42 * Removed hack used by BeOS to trick stl allocator into using malloc/free for
all allocations, instead we now directly request the use of malloc/free in
  stl_config.h. This avoids warnings about 'arrays of size 0' when building
  any stl-code with -pedantic (like e.g. ICU does).
  Alternatively, we could active pthread-type threading support, but since in
  some small tests, I have not been able to see any advantage, I've just added
  a respective comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 21:27:21 +00:00
Michael Lotz 63d557f06f Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 02:42:03 +00:00
Michael Lotz b78c74fdc4 Fix GCC4 build. Duplicate parameter names generate a warning there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 23:38:15 +00:00
Axel Dörfler 0ca5323479 * Changed the enum into defines, so that apps can check whether or not they
exist (as mDNSResponder does, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 15:28:49 +00:00
Axel Dörfler 78888c44da Applied patch by Ma Jie adding functionality needed by mDNSResponder:
* added new protocol method process_ancillary_data_no_container() that does not
  need a container to fill the cmsghdr data.
* Added support for the IP_RECVDSTADDR option using this call.
* Implemented support for IP_MULTICAST_IF.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 11:53:29 +00:00
Jérôme Duval 1a90d61b47 synth is already in the data directory, removed the one in the etc directory.
change B_SYNTH_DIRECTORY to use the data directory


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-14 17:05:57 +00:00
Ingo Weinhold 3b859de22e Added handy static method SizeOfType().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-13 18:33:06 +00:00
Michael Pfeiffer 504033fbbe Clean up. Renamed spool_file to spoolFile.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:37:11 +00:00
Ingo Weinhold a365e1cfbb Patch by Bryce Groff, some changes by myself:
* devfs:
  - devfs_[un]publish_partition(): They no longer get the partition path as
    parameter, but rather the device path and the partition name.
  - Added devfs_rename_partition(), which renames an already published
    partition node.
* KPartition/KDiskDevice:
  - Replaced the fPublished flag by fPublishedName, the name under which the
    partition is published. This simplifies UnpublishDevice() and makes it
    practically infallible.
  - Added GetFileName(), which only returns the partition's file name.
    Simplified GetPath() by using it.
  - When a partition is added/removed the subsequent sibling partitions get a
    new index. Now we also rename their published device nodes (and those of
    their descendents). When something goes wrong we unpublish the concerned
    partition's device to be on the safe side. Would be a shame to accidentally
    format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:35:04 +00:00
Oliver Ruiz Dorantes 111d946099 - Patch by Michael Weirauch, Finally a deskbar addon for bluetooth
- Functionality to stop services, start preferences, and show debug console
- Cleanups in signatures

-This line, and those below, will be ignored--

M    headers/private/bluetooth/bluetoothserver_p.h
M    src/servers/bluetooth/BluetoothServer.h
A    src/servers/bluetooth/DeskbarReplicant.cpp
A    src/servers/bluetooth/DeskbarReplicant.h
M    src/servers/bluetooth/Jamfile
M    src/servers/bluetooth/BluetoothServer.cpp
M    src/preferences/bluetooth/BluetoothMain.cpp
M    src/preferences/bluetooth/Jamfile
M    src/preferences/bluetooth/defs.h
M    src/preferences/bluetooth/BluetoothWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 15:12:51 +00:00
Oliver Ruiz Dorantes 981f1b1135 - Add method in LocalDevice class to write its class to the dongle
- Rework and style the DeviceClass class
- Implement option "Identify host as..." in preferences with mentioned method, this should allow us to be visible to more RemoteDevices



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 14:19:17 +00:00
Ingo Weinhold 3edae90975 Added BinarySearchIndexByKey().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 23:24:55 +00:00
Clemens Zeidler ceaa15b6a7 Forgot this, thanks to Andrea Bernardi!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 18:24:27 +00:00
Clemens Zeidler a635614420 Battery interface for the driver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 17:53:09 +00:00
Oliver Tappe 3a111f3310 Fixed what seems to be a typo:
* the default ABI for gcc2 builds should be B_HAIKU_ABI_GCC_2_HAIKU, not B_HAIKU_ABI_GCC_2, as the latter 
  is equal to B_HAIKU_ABI_GCC_2_ANCIENT and enforces the old symbol resolving behaviour.
  If our build isn't ..._HAIKU, what is? ;-)
This fixes a whole lot of perl tests, which failed because the required shared libs could not be loaded
(as they contained undefined symbols that are only found in second level dependencies).
Note: the existing perl optional package works, since it does not contain any ABI specification symbol yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 20:28:23 +00:00
Ingo Weinhold 1cc5e46925 Added offset and size parameters to create_child_partition() and
KPartition::CreateChild(). CreateChild() calls AddChild(), which publishes
the new partition, though at that point offset and size were not set, so that
the published devices would not be usable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 20:26:43 +00:00
Oliver Tappe 967294dbd8 * Turns out that the "upper" half of the old (gcc2) libio - the C++ classes -
keeps its own idea about what a wchar_t is and that was still a short.
  This of course made the data structure of a streambuf incompatible with the
  "lower" half - the glibc part - causing (potentially all sorts of) crashes
  when these classes were used.
  This should fix the crash of gensyscalls when building haiku natively
  on a gcc2-haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 16:31:01 +00:00
Oliver Tappe f612278f55 * switched back libiconv to a static library and remove all references to
it (headers and library) from the image. The libiconv in our tree is 
  only used internally as a backend for libtextencoding. The real libiconv
  is provided as an optional package.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 01:00:22 +00:00
Oliver Tappe 16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Jérôme Duval f38b4b110c we also call DirectConnected on FrameResized(), this is when bounds are updated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-05 17:56:33 +00:00
Ingo Weinhold 9774f385b5 Added debug_get_symbol(). It's not implemented particularly efficiently, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 14:20:27 +00:00
Axel Dörfler 4e23bc0383 * BMenu now scrolls when you press page up/down, if possible.
* BMenuWindow no longer uses a fixed scroll step - instead, the menu sets it
  to the height of its first item.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 12:09:16 +00:00
Oliver Ruiz Dorantes ddac407426 - Add initial code to unregister devices from server
- Handle Hardware error event
- Add function to retrieve an string from a bluetooth error
- Styling



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-02 20:07:26 +00:00
Axel Dörfler 7af3465eb5 * Made set_timezone() argument const - it's not supposed to mess with it.
* Renamed time.c to time.cpp.
* set_timezone() now uses localtime_r() instead of localtime(), and will also
  no longer fail in case there was no timezone symlink before.
* Cleaned up OS.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-02 14:07:46 +00:00
Ingo Weinhold 7aa7cb4b54 * Renamed {Add,Remove}Reference() to {Acquire,Release}Reference(). Methods with
the old names still exist as deprecated aliases for the time being.
* Introduced hooks FirstReferenceAcquired() and LastReferenceReleased(). Besides
  added flexibility this also makes the deleteWhenUnreferenced constructor
  parameter and the fDeleteWhenUnreferenced attribute superfluous, since the
  "don't delete" behavior can be obtained by overriding LastReferenceReleased().
  Parameter and attribute will be removed eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 21:59:27 +00:00
Ingo Weinhold ff293f209a Added (const char*) cast operator. That makes BString more convenient to pass
around, particularly returning it from methods instead of a const char*, if the
object stores the string as a BString anyway, thus leveraging CoW.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 13:11:30 +00:00
Ingo Weinhold a0747aad3b After the first call to BView::InvalidateLayout() further invocations don't
invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
  called by layout implementations whenever they have updated their cached
  information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-29 14:18:12 +00:00
Ingo Weinhold 59d799dabc * Moved the mapm library from src/apps/deskcalc to src/libs and headers/libs.
* Moved the ExpressionParser class to shared. It's now built into its own
  static library.
* Added hexadecimal number support to the expression parser as well as
  Evaluation*() methods to get a number instead of a string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 17:10:40 +00:00
Rudolf Cornelissen c8453f43a4 driver now sets up internal EDID info related to CRTCs next to earlier introcuded code for EDID info related to connectors which makes it much more useable later on. This commit also hopefully fixes the problem introduced in R31183 shutting off some screens in 'invalid' connector setups that the driver tries to correct.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 14:53:07 +00:00
Jérôme Duval c1094043c9 updated libpng to 1.2.37
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 13:46:52 +00:00
Oliver Tappe d157bf8522 [the first commit of this fix was applied to the 32bit-wchar_t-branch instead
of trunk]
Fixed a bug exposed by changes in the locale kit branch:
* the signature of stringbuf::setbuf() wasn't matching the one from streambuf,
  which caused the base version to be hidden instead of overridden - leading
  to crashes during cleanup of stringstream objects

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-26 21:54:46 +00:00
Axel Dörfler 7f5bbbdc56 * Removed PI, and PI2 from math.h.
* Replaced all occurences with the standard macros M_PI, and M_PI_2.
* Some coding style cleanup on the touched files, no other changes besides
  adding a missing check for a failed memory allocation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-26 11:58:43 +00:00
Axel Dörfler 65b5dd5064 * DatagramSocket::InitCheck() returned the sem_id instead of a status_t, causing
pings to fail (raw socket initialization) after r31079.
* Further cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-25 16:01:11 +00:00
Ingo Weinhold fab1c05c05 Split the commpage initialization into two parts. The second part is executed
after all CPUs have been queried for their features. On SMP machines
sysenter/sysexit weren't used before due to the non-boot CPUs appearing not
to have the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 13:53:58 +00:00
Ingo Weinhold 6a1f462e72 * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
  if the thread returns from a syscall. We don't want to skip breakpoints in
  that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 11:49:35 +00:00
Ingo Weinhold b0f12d64f4 Added transparent software breakpoint support for user debuggers:
* The bulk of the work -- i.e. juggling the software and hardware breakpoints,
  watchpoints, and memory reads/writes -- is done in the new class
  BreakpointManager.
* For the architectures a few capability macros have to be defined, one
  pointing to the software breakpoint instruction opcode. Done for x86.
* Some more simplifications in the user debugger code, made possible by the
  recently introduced debugger_changed_condition attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 21:03:57 +00:00
Stephan Aßmus 4aeb7a3cc2 * Made BTwoDimensionalLayout and BSplitLayout::GetInsets() const.
* Give access to BSplitLayout::SetInsets() and GetInsets() from BSplitView.
* Give access to BSplitView::SetInsets() from BSplitLayoutBuilder and
  LayoutBuilder.
* Some automatic white-space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 10:56:22 +00:00
Ingo Weinhold ba391bcc56 Added team_debug_info::debugger_changed_condition to serialize changes to the
installed team debugger and adjusted the code accordingly. It's not needed yet,
but I intend to add support for software breakpoints and those require a bit of
uninitialization that needs to be synchronized with debugger changes and can't
be done with interrupts disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:39:51 +00:00
Ingo Weinhold 91393e7810 InterruptsSpinLocking:
* Removed unused inner struct State.
* Added work-around for the extremely annoying "fState my be used
  uninitialized" warning gcc 4 produces. I'm not aware of any solution that
  doesn't generate unnecessary code. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:32:46 +00:00
Ingo Weinhold 5ea5f51d84 Changed ConditionVariable from class to struct to make it more C-friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:49:05 +00:00
Ingo Weinhold 6dcc2a7e00 Made destroy_team_debug_info() static, as it's not used outside the source
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:46:55 +00:00
Ingo Weinhold e20dc8a7b7 Added missing convenience methods for unsigned integers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 21:43:06 +00:00
Ingo Weinhold 6cd189c997 Added BinarySearchIndex().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 21:41:16 +00:00
Rudolf Cornelissen 8bdea4194a doing preparations for using analog widescreen detection. if all is right the driver's behaviour hasn't changed yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 20:33:17 +00:00
Oliver Tappe 510c100a8f * synced wchar.h with POSIX and the implementations provided by our libroot
* added WCHAR_MIN and WCHAR_MAX - already as 32-bit values, since that's
  what wchar_t is going to become, soon (and those values could not have
  been used before, since they were missing)
* this is still work-in-progress though, I need to run more tests to find
  out which of these functions are actually working, too


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 19:48:36 +00:00
Stephan Aßmus b3601d823c * Update indentation style in TabView.h
* Added _MinTabeSize() to BTabView. It makes sure that the BTabView displays
  at least two tabs. In the future it should also add the room to display some
  buttons for cycling the currently displayed tabs left/right if there is more
  than can fit.
* In BTabView::Min/Max/PreferredSize(), use _MinTabSize() to compute the
  respective size.
* Improve Tab rendering code so there are no ugly overlaps at the right edge
  if the tabs falls directly on the view edge.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-21 13:04:51 +00:00
Ingo Weinhold 697eb34c63 Moved libudis86 to headers/libs/udis86 and src/libs/udis86.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-21 12:58:16 +00:00
Stephan Aßmus 8f24c71102 Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 15:47:28 +00:00
Stephan Aßmus 1f9fd6d866 * Added BSplitView drawing code to ControlLook.
* BSplitView uses ControlLook to draw itself.
* Small refactoring in SplitLayout to implement IsAboveSplitter(BPoint).
* BSplitView updates the view cursor when the mouse is above a splitter.
* Standard splitter size is now 6 pixels, which is a bit easer to hit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 15:03:33 +00:00
Stephan Aßmus fa0ba1f855 Cache a view's server token. Avoids getting it for every
BView method that contacts the server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 14:12:30 +00:00
Stephan Aßmus 19e179ca4f * Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
  race condition with asynchronous SetViewCursor and deleting the
  cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
  just in case...
* Added TODOs for caching the BView token, it's currently resolved
  for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 12:11:49 +00:00
Stephan Aßmus 5d62f8e0e5 Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 10:10:01 +00:00
Ingo Weinhold b7c5bd634b Renamed Variant to BVariant and moved it to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 23:00:25 +00:00
Ingo Weinhold 2a3974d313 Added constructor versions of the Group and Grid layout builders that take a
BWindow* parameter. They set the newly created layout on the window, which saves
the API user to do that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 15:28:00 +00:00
Axel Dörfler 3609af391d * Renamed _kern_reserve_heap_address_range() to _kern_reserve_address_range(),
and added a _kern_unreserve_address_range() as well.
* The runtime loader now reserves the space needed for all its areas first
  to make sure there is enough space left for all areas of a single image.
* This also fixes the final part of bug #4008.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 11:09:21 +00:00
Axel Dörfler 82db8a9e15 * Added an "unmapAddressRange" argument to the file mapping syscall. This is
the first part of making the runtime loader behave itself; it should already
  make Clockwerk run okay with any number of translators (even if not all of
  them will work yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 08:23:11 +00:00
Clemens Zeidler 5f6906e1eb - Add some more acpi function to the acpi module and acpi device module. Need this functions for the embedded controller and battery driver.
- Now also use the acpi handle to call a function and not use the path to get a handle and then call the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-18 18:18:40 +00:00
Ingo Weinhold 1a726098ec New approach to layout building:
* The new builders are templatized and completely inline.
* They are easily nestable, which only worked for groups with the old approach.
* Added builder for split views.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 19:38:51 +00:00
Axel Dörfler f3b1ada54f * Moved class BStringItem into its own source file.
* Changed BStringItem::Update() to set a better baseline offset and height;
  this should improve vertical text placement.
* Fixed a bug in BStringItem::Update(): it used the owner to determine the
  width, but must use the font passed in instead.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 16:26:17 +00:00
Axel Dörfler 8e5744fe72 * Fixed style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:58:24 +00:00
Axel Dörfler 08a3563801 * Added layout-friendly constructor.
* Reordered functions to match the order in the header (and vice versa).
* Removed unused private functions.
* Updated the header to follow our coding style.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:56:57 +00:00
Axel Dörfler 160f2d1081 * Added private header defining __gUmask which is now used everywhere where
needed.
* Some cleanup in Directory.cpp, and File.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:09:40 +00:00
Stephan Aßmus 041b97a8b8 * Updated header indentation style and small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-16 14:02:18 +00:00
Ingo Weinhold 568ade58d0 User debugger support:
* Generalized address checks. The debugger can now also read the commpage.
* Added new syscall _kern_get_thread_cpu_state() to get the CPU state of a
  not running thread. Introduced arch_get_thread_debug_cpu_state() for that
  purpose, which is only implemented for x86 ATM (uses the new
  i386_get_thread_user_iframe()).
* Don't allow a debugger to change a thread's "esp" anymore. That's the esp
  register in the kernel. "user_esp" can still be changed.
* Generally set RF (resume flag) in eflags in interrupt handlers, not only
  after a instruction breakpoint debug exception. This should prevent
  breakpoints from being triggered more than once (e.g. when the breakpoint is
  on an instruction that can cause a page fault). I still saw those with bdb
  in VMware, but that might be a VMware bug.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 12:14:06 +00:00
Ingo Weinhold f664c6474b Updated comment to reality.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 11:03:39 +00:00
Oliver Ruiz Dorantes a1163de83e - Long events were locking the bluetooth server, as events can be more than 256 counting with the header.
- Add debug more information in H2 driver and Command Status event
- Change name of port for posting events(former was too long)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-13 19:17:10 +00:00
Jérôme Duval 581708b997 * fix the build by moving a typedef to public scope, and avoid returning a value in the destructor
* some clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-13 10:42:11 +00:00
Jérôme Duval 27e6c57b6a added some PCI capabilities, wireless class values
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 21:16:04 +00:00
Oliver Ruiz Dorantes 80ee40e10c License header & style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:25:57 +00:00
Oliver Ruiz Dorantes c6083519e7 Make a bit more elegant the processing of bluetooth events
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:14:51 +00:00
Axel Dörfler 4ab3fa3b5a * Added real_time_clock(), and real_time_clock_usecs().
* Added support for timespec stat times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 09:31:25 +00:00
Rene Gollent 8c310b36f0 Provide a default value for the leaf argument as is done in the const char * versions of the constructor/setter. This is consistent with the Be Book, though R5 and/or Dano's headers were likewise missing this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-09 20:41:04 +00:00
Stephan Aßmus 34068836d3 Fixed Remove() operations to be O(1) again, I just didn't get it. The item
sorting does not need to be preserved. Thanks Marcus!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-08 07:01:58 +00:00
Axel Dörfler eab2783a36 * Fixed license header to look like our others.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 21:18:32 +00:00
Stephan Aßmus b7cf537e50 Added BMediaFile::_UnInit() and implemented the two SetTo() methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 19:43:26 +00:00
Stephan Aßmus b5ec3e5669 * Coding style clean-up.
* Use std::nothrow and check allocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 19:35:14 +00:00
Rene Gollent c0e1e0eaac Fix GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 19:07:34 +00:00
Stephan Aßmus bb56a763a6 Resolved TODOs in PluginManager about leaking plugins when they are no longer
needed. I've added MediaPlugin* fields to Reader and Decoder plugin classes
which are set when the PluginManager hands out new instances. This way the
manager knows what plugin created the Decoder or Reader instance in the
Destroy*() methods and can decrease the reference count accordingly. Also added
some FBC stuffing to Decoder and Reader. All media plugins need to be recompiled,
in case anyone has some outside the Haiku tree.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 18:11:05 +00:00
Stephan Aßmus 5fa2230d99 Just saw that _Remove(index) here was as broken as in TList.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 18:04:32 +00:00
Stephan Aßmus 85af513ad6 Remove() was completely broken if not removing the very last item.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 17:56:59 +00:00
Axel Dörfler e52400cf24 * Fixed a race condition in the former _Detach*() functions: since atomic_get()
was used, two different threads could decide to share the same mutable string.
* Renamed some functions to make clearer what they do, ie. _Detach() is now
  called _MakeWritable().
* Cleaned up some questionable semantics, like the const char* parameter in
  _DetachWith() - you can now choose to copy the original string or not with
  a boolean. This also makes sure that the string is actually copied when it
  has to, which wasn't the case before (but that was no problem with the way
  that function was used).
* Made the header compliant with our style guide.
* Further cleanup.
* All BString related unit tests are passed, so I guess I didn't break too
  much :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-06 11:23:17 +00:00
Axel Dörfler 477a4ca70e * vfs_boot.cpp now also exports gReadOnlyBootDevice which is true when the
boot device is actually read-only (even if it's using the write overlay).
* Do not create a swap file on a read-only device - this would really be a
  stupid use of the write overlay (just saw this happening on an older
  machine).
* Made swap_file_{add|delete}() take a const char* path - there was no reason
  this was writable, and this also avoids casting away the const when adding
  the default swap file.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 15:52:58 +00:00
Axel Dörfler bfd4c59b63 * Added DPMS support to the VESA driver, in case the hardware/BIOS supports it.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 13:03:05 +00:00
Rene Gollent a63261ea5a Added files missed in previous commit. Thanks Urias.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 03:50:21 +00:00
Ingo Weinhold 360d4974b9 Replaced the temporary storage used in the kernel debug command parser. We now
have a simple dedicated heap for the kernel debugger with stacked allocation
pools (deleting a pool frees all memory allocated in it). The heap should
eventually be used for all commands that need temporary storage too large for
the stack instead of each using its own static buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-03 12:28:49 +00:00
Rudolf Cornelissen c1db4db3cc modified I2C code to read the third bus on cards that can support it. Dumping EDID scanning results in logfile only for now (testing..) Bumped version to 0.92.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-02 20:37:59 +00:00
Jérôme Duval 59d67522ea added lrint and llrint functions to math.h
added generic implementations for ppc and m68k


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-02 20:24:18 +00:00
Rudolf Cornelissen dd67a9b2d4 added enabling I2C buses for NV40 arch cards. hopefully this makes the buses work on GF6100 (noted in bug #2780) and maybe others. added a few registerdefines (wip).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-01 20:06:21 +00:00
Ingo Weinhold eb0262fc4c * Reworked vm_soft_fault() and friends:
- While walking down the cache chain, we keep all upper caches locked.
  - When we have to unlock -- when waiting for a busy page or reading a page in
    -- we unlock completely, including the address space, and restart
    vm_soft_fault().
  - Folded fault_get_page() and fault_find_page() into one.
  This simplifies and improves things considerably:
  - We no longer need dummy pages.
  - We no longer need vm_area::no_cache_change.
  - #2710 is fixed, since we no longer hold the address space lock while
    waiting.
* vm_soft_fault(): When we have found our page, we first check whether a page
  is already mapped at the address. If it is already our page, we just change
  its protection. If not, we unmap it first. Fixes race conditions when multiple
  threads fault at the same address at the same time.
* fault_get_page(): When copying a read-only page from a lower cache, no longer
  mark it active, since at least for the fault area it is shadowed from then on.
* vm_set_area_protection(): Fixed potential overflow for in the
  vm_translation_map::protect() call.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 12:55:25 +00:00
Ingo Weinhold 7515c32c1f Not sure, if this was only a gcc 4.3.3 bug or if I misunderstand something, but
gcc could apparently assume that the register assigned to the one in the
clobber list would keep its value (as can be observed when disassembling
add_debugger_command_etc()).
Using a dummy output register works around the problem and also avoids the
unnecessary initialization of the register.

Comments explaining the mystery welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 01:17:53 +00:00
Jérôme Duval 7abb735ac6 * Includes termios.h in sys/ioctl.h, for TIOCGWINSZ.
* added watch command, which executes a program periodically, showing output full screen. 
* added watch to the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 20:16:35 +00:00
Oliver Tappe 0964534941 * reverted r30883 and made these three headers private for the locale kit for
now, fixing the build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 10:36:33 +00:00
Oliver Tappe a8149000f0 * removed three locale-related headers which currently just pretend that
haiku would support any of the declared functions (none of which are
  provided by libroot)
  These will come back once the locale kit has been integrated
  

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 20:46:49 +00:00
Rudolf Cornelissen f595427d00 fixed comment typos. No actual change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:57:01 +00:00
Rudolf Cornelissen 21bade017a added more EDID stuff. Now extracting needed monitor specs and placing them in shared_info. More dumping to logfile added. The EDID info is not yet actually used: more testing is needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:46:07 +00:00
Ingo Weinhold f3473d28c0 Patch by Scott McCreary: Replaced C++ by C comments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 12:24:37 +00:00
Oliver Tappe 440447ec2f closing #3481:
* applied a patch suggested by kaliber that seems to fix the issue for good,
  thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 11:21:56 +00:00
Ingo Weinhold c7d1aa192f Added system_info::abi field. It contains the system's ABI version, which
might be different from that of the caller (on hybrid builds).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 01:02:39 +00:00
Ingo Weinhold a9cfff5fc2 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 23:51:16 +00:00
Ingo Weinhold 8c7bf264f5 The 'extern "C"' was missing for the C function replacement of the Version()
method. Rather reintroduced the method (private) instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 23:32:53 +00:00
Ingo Weinhold 42c9b01aa6 * {BEntry,BNode}::GetStat() were still passing the BeOS struct stat size to
the syscall. Anything beyond st_mtim was therefore not filled in. Fixes
  the incorrectly shown creation times in Tracker.
* The BStatable::GetStat() solution was not sufficient yet. We still have to
  provide the old GetStat() symbol for BNode and BEntry, since those could be
  used by old applications/libraries. We also still have to implement the old
  GetStat() slots in the derived classes, but don't need to implement it in
  the base class (was purely virtual before and is private now).
* The old BStatable::_OhSoStatable1() slot function was not implemented
  correctly. Calling the virtual function at the vtable slot obviously results
  in an infinite recursion. The correct implementation would make use of the
  Perform() method, but Be didn't provide one for BStatable, so we have to use
  the old GetStat() method. Fixed #3960.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 14:03:38 +00:00
Jérôme Duval 56d4690860 wakeup() means wake any waiting threads, so we use the relevant flags. this gives a reliable dv receive stream here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-24 23:15:04 +00:00
Ingo Weinhold bcfe344c53 * Made our struct stat POSIX compliant again -- the time_t fields have been
replaced by timespec fields. Via macros the structure is still source
  compatible with the old one.
* Introduced header <compat/sys/stat.h> that defines the old stat structure
  (as stat_beos) and conversion functions
* Introduced versions for [l,f]stat().
* Added symbol versions for BDirectory::GetStatFor() for sake of binary
  compatibility.
* BStatable::GetStat(): Renamed the old method, changed its parameter to
  stat_beos*, and and made it private. Added a new version (using up a
  reserved vtable slot). It remains source and binary compatible.
* BRefFilter::Filter(): Changed the struct stat* parameter to struct stat_beos*
  for sake of binary compatibility. This breaks source compatibility, though,
  which we can't help, since the class doesn't have reserved vtable slots.
* Fixed several issues with the stat structure change, mostly adjusted uses of
  BRefFilter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-22 15:15:16 +00:00
Ingo Weinhold 897514785a Introduced macro B_DEFINE_SYMBOL_VERSION() in <BeBuild.h> to help with
versioning symbols, and private macro DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION()
for symbols compiled into both libroot and kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-22 14:57:40 +00:00
Ingo Weinhold 9bf61a0ecc * Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-21 15:08:42 +00:00
Ingo Weinhold b3f709b800 Removed unused elf_version_info::hidden field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-21 13:11:54 +00:00
Ingo Weinhold 003ebb0e83 * Also define the build system variables TARGET_STATIC_{LIBSTDC++,LIBSUPC++}.
* runtime loader:
  - Fixed gcc 4 warnings.
  - Enabled -Werror.
  - Renamed all remaining *.c source files to *.cpp.
  - Implemented GNU style ELF symbol versioning support.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-20 02:22:36 +00:00
Axel Dörfler 49fb9a2eab * Flatten() would create an invalid entry ref if the path did not exist, or the
path was not yet initialized. It will now fail instead.
* Got rid of EBadInput - _MustNormalize() can now return an error code instead.
* Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-18 09:09:23 +00:00
Axel Dörfler 97970c5c26 * Applied a changed patch by Romain that fixes the non-working double click in
BListView. This fixes bug #3919. Got rid of the _TryInitiateDrag() method,
  and let MouseMoved() do it all.
* Style cleanup of the header, automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-17 16:49:05 +00:00