Commit Graph

6192 Commits

Author SHA1 Message Date
Clemens Zeidler 488c90defe Fix style issues, thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:15:13 +00:00
Alex Wilson 1d6c7b6cb6 Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
  may have slipped by.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 18:43:41 +00:00
Oliver Tappe 1195f511e5 * style adjustments - no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 16:47:14 +00:00
Clemens Zeidler 5836cd75c2 Add a BWindowStack interface class. Please review if adding a BWindowStack as a friend of BWindow in Window.h is ok.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:47:26 +00:00
Clemens Zeidler 19f43b9f6a SATDecorator implements event handling and handles the stacking api requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:41:35 +00:00
Clemens Zeidler c0494bc592 Add facility to communicate with the desktop listener over an app server link. The ServerWindow dispatch the message to the DesktopObservable which dispatch it to the correct listener.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:25:55 +00:00
Clemens Zeidler 38d80987f3 Add PortLinkRef class which use a existing sender and receiver for communication. Suggestion for a better name?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:12:30 +00:00
Oliver Tappe dbe1e23aa8 Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
  when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
  via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 22:01:28 +00:00
Oliver Tappe 560b10ff88 Implement tzset(), gmtime(), localtime() and mktime() on top of ICU
* no longer keep a separate time-backend, since the implementation needs to
  access (data of) the locale backend anyway
* moved more stuff from localtime_fading_out.c to localtime.cpp
* added respective tests to locale_test
* added two more tests copied from glibc, test_time.c and tst-mktime.c


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 21:14:23 +00:00
Oliver Tappe c639a77808 * moved BDateElement from BCountry to BLocale, as that's where it's being used
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:19:51 +00:00
Oliver Tappe f23b9d8a72 * added possibility to pass in the timezone when formatting the time
* added TODOs about the need to get rid of some of the date/time-formatting
  shortcut methods

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:03:54 +00:00
François Revol ef855c9edb Remove unwanted compatibility aliases before I get beaten by the Dano hunters...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 21:08:59 +00:00
François Revol 8e8634bf54 Add synonyms for tootip ui_color constants. Fix WindowShade to use the new official ones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 16:33:00 +00:00
Jérôme Duval 867b56657b use __haiku_addr_t instead of __haiku_uint32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 11:58:02 +00:00
Andreas Färber 902e646ceb Import glibc 2.11.2 regex.h for Solaris
Cygwin and Solaris rely on Haiku supplying a glibc-compatible regex.h header.
Before r38031, Solaris was able to reuse cygwin/regex.h successfully. Import
the latest stable 2.11 posix/regex.h to avoid local trickery and to silence
some RE_* errors.

It is very likely necessary to update cygwin/regex.h as well, but I don't have
a test setup to verify.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 11:10:40 +00:00
Rene Gollent 323e7fe567 Fix build error in IMAP client due to incorrect inequality check in one of BString's inlines. Fixes #6439.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 23:32:23 +00:00
Alex Wilson e70fa080b2 Should have been part of my previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 16:56:46 +00:00
Axel Dörfler 97ef73e074 * Added convenience methods FindAddress(), and FindFirstAddress().
* Added BNetworkInterfaceAddress::Destination() as synonym for Broadcast()
  (depending on the configuration, it could be either one).
* Media() will now return -1 in case of an error.
* Added "const" where it makes sense.
* Added convenience functions for AddAddress(), and RemoveAddress() that only
  take the actual address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:50:32 +00:00
Axel Dörfler 836c43f2b8 * Factored out a BNetworkAddressResolver from BNetworkAddress, that also allows
to iterate over all possible addresses, as suggested privately by Rene.
* Added flags to the resolving methods that allow more control over the
  addresses returned.
* Added setters to BNetworkAddress that accept a service name instead of port
  number, renamed PortName() to ServiceName().
* Made the sockaddr* cast operators return a const sockaddr as it was supposed
  to be, although I should probably add non-const ones as well.
* This also simplified the code somewhat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 11:27:14 +00:00
Oliver Tappe 2feea51f57 * cleanup and style fixes in WidthBuffer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 18:03:37 +00:00
Jérôme Duval 5091a866ec To be validated as part of bug #6386. Update glibc regex to 2.11, headers/posix/regex.h included. This imposes some changes in some of our sources using the regex.h,
mostly bin tools and mail kit. The use of __USE_GNU macro is needed for instance when the expected regex implementation is the GNU one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 16:49:58 +00:00
Axel Dörfler 23f2073215 * Implemented SetToMask(), and added PrefixLength() method, mostly reusing
code from ifconfig.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 13:53:31 +00:00
Axel Dörfler 9de96be375 * Added methods to get/set the media/metric.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 13:18:36 +00:00
Adrien Destugues 0417c0fd7e * Remove everything related to direct access to unicode.properties file. All of it should be done through ICU.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 12:00:59 +00:00
François Revol 3d08ac9237 Add the fmemopen() and open_memstream() POSIX extensions to libroot. Those can be used to build FILE pointers to in-memory buffers, a possible use would be to make resources available to ported applications. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 09:56:13 +00:00
Axel Dörfler cb7ce9a32f * Renamed DescriptorCloser to FileDescriptorCloser as suggested by Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 21:23:05 +00:00
Axel Dörfler c2808ea7b2 * Adapted API as needed, and implemented most of the C++ API - it's completely
untested at this point, though.
* Will port ifconfig, NetworkStatus, and the Network preferences application
  later in order to test the API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 16:31:40 +00:00
Axel Dörfler d91215d3f1 * Added DescriptorCloser helper class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 16:30:24 +00:00
Adrien Destugues 4a7b2e0484 * Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-07 11:22:16 +00:00
Jérôme Duval 40277b7b25 merged freetype 2.4.2
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 23:01:05 +00:00
Axel Dörfler bf58f252de * Adapted headers after Stippi's suggestions - I won't add the const until I
know how I implement that function :-)
* Cleaned up libbnetapi.so Jamfile, removed non-Haiku target code.
* Added empty files to the build to see that the headers are compiling.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 13:22:25 +00:00
Axel Dörfler 1f9c8c4576 * Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD).
* Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP
  wouldn't work anymore (and ifconfig wouldn't show the actual MAC address
  anymore).
* Changed the listing code to actually pad to ifreq size, and leave the length
  of the sockaddr untouched.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 12:58:02 +00:00
Axel Dörfler ff1b1ac7ff * Introduced first draft of a C++ network API. Comments welcome (I haven't
started implementing it yet, anyway).
* Note that BNetworkAddress is supposed to replace BNetAddress -- the latter
  does not provide enough space for a struct sockaddr_storage, and has a very
  IPv4 specific and incapable API, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 08:08:02 +00:00
Oliver Tappe 562ccb03cc * introduced stubbed TimeBackend to libroot, which will contain implementations
of localtime(), gmtime() and mktime()
* implemented tzset() to read the required info from libroot_timezone_info

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:50:26 +00:00
Oliver Tappe 85b54438f7 * the Time preflet now writes timezone info required by the POSIX layer into
a specific file (/boot/common/settings/libroot_timezone_info)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:46:05 +00:00
Oliver Tappe e4da3d6691 * added support for all the different names (std/dst, long/short) and daylight
support to BTimeZone

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:44:38 +00:00
Oliver Tappe 9d391816b7 * clearified that stime() has nothing to do with timezones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:42:56 +00:00
Oliver Tappe 2cb26c0ab0 * moved ErrnoMaintainer into its own header to be reusable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:41:29 +00:00
Axel Dörfler 481f986b59 * Added missing clear() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 11:23:01 +00:00
Adrien Destugues 4ebeabb639 * Remove GetLocaleName from BCountry
* Add GetName to BLocale instead


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 10:19:22 +00:00
Adrien Destugues 58fa4d5717 * The locale roster keeps its own Language instead of using the locale one, so that changing the locale doesn't reset the
language.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 09:27:13 +00:00
Oliver Tappe 6bb7a098b7 * added missing 'void' to make the get_timezone_offset() declaration a proper
prototype and not just a forward


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 21:57:44 +00:00
Oliver Tappe 34a79bff8a * renamed BPrivate::mutable_locale_roster to BPrivate::gMutableLocaleRoster,
to follow coding guidelines

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 21:34:12 +00:00
Adrien Destugues 5c3a303486 * Move the locale-related stuff away from BCountry to BLocale.
* Remove the be_locale global object and go through the be_locale_roster instead
 * Rework the storage of data for the be_locale_roster, since BLocale already holds a BCountry and a BLanguage.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 18:45:06 +00:00
Oliver Tappe e0ea55e0a0 * added get_timezone_offset() to kernel, which returns the offset in seconds
* made FAT add-on use get_timezone_offset(), this time correctly adjusted for
  the difference in units (minutes/seconds)
This makes the times in our FAT-fs agree with Linux again, at least :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 17:11:47 +00:00
Axel Dörfler 2b4154458a * Finished groundwork on ICMP by introducing a completely protocol agnostic
error mechanism.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 10:35:40 +00:00
Oliver Tappe 7e965f506d More consolidation of timezone code:
* dropped DaylightSavingTime from real_time_clock code in kernel, it was
  never really being used for what it meant (and just being referred to by
  gettimeofday(), which put a different meaning to it
* adjusted the syscalls get_timezone() & set_timezone() as well as their callers 
  accordingly
* got rid of get_rtc_info() and rtc_info struct in kernel, as it was only
  being referred to by the FAT add-on and that one (like gettimeofday()) put a
  different meaning to tz_minuteswest. Added a comment to FAT's util.c
  showing a possible solution, should the hardcoded GMT timezone pose a problem.
* fixed declaration of gettimeofday() to match POSIX base specs, issue 7
* changed implementation of gettimeofday() to not bother trying to fill struct
  timezone - it was using wrong values before, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 23:02:57 +00:00
Oliver Tappe 96ac47e312 Made some progress with consolidation of timezone-related code:
* renamed syscalls _kern_[gs]et_tzfilename 
  to _kern_[gs]et_real_time_clock_is_gmt, as the filename part is no longer
  relevant (and the two corresponding parameters were removed)
* C++-ified and reworked clockconfig to use the info from 'Time settings' 
  to setup the timezone info during boot
* removed invocation of _kern_get_tzfilename() from tzset(), as the syscall
  no longer exists and tzset() is currently broken anyway
* adjusted the Time preflet to use the renamed syscall when getting/setting 
  the RTC info


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 17:47:26 +00:00
Oliver Tappe 308ca58d67 * deprecated set_timezone(), as we no longer support (and need) timezone files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 16:50:28 +00:00
Axel Dörfler 2b1c0755dd * Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
  is currently being configured, or has been automatically configured.
  Those flags aren't used yet, but they will replace IFF_CONFIGURING and
  friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
  more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
  actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
  it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
  interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 15:51:54 +00:00
Axel Dörfler 2651e51d92 * Renamed net_datalink_module::send_data() to send_routed_data(), and
send_datagram() to send_data().
* Renamed DatagramSocket::SocketEnqueue() to EnqueueClone(), SocketDequeue()
  to Dequeue().
* Ordered the methods in ProtocolUtilities.h according to their declaration.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 12:00:06 +00:00
Axel Dörfler 03e02ed983 * Introduced a datalink layer (2) independent way of specifying the packet
type one wants to receive. Changed ipv6_datagram to use that (but note that
  it currently does not compile).
* Header cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 11:23:03 +00:00
Axel Dörfler 690acf8bd2 * Got rid of _SocketEnqueue().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 11:19:22 +00:00
Axel Dörfler e4f401b349 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 11:18:52 +00:00
Oliver Tappe 38ac8def5a Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes 
  out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
  but uses copies, instead - this makes locking superfluous, as the clients'
  BCountry objects can no longer be changed by the setting a new default 
  country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
  need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
  (the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time 
  preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-01 20:28:19 +00:00
Oliver Tappe b97e12926c * added operator-> for convenience
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-31 15:34:28 +00:00
Alex Wilson 6829d4174b Update BLayout::ItemAdded() and BLayout::ItemRemoved() to take an int32 index parameter, and ItemAdded() to return a bool indicating success or failure. Update BLayout::AddItem() to take the result of ItemAdded() into account. Also update BLayout::AllUnarchived() to take this into account. In either situation, if ItemAdded() returns false, the item does not get added to the layout. Removed various TODOs about code that could be removed once this change was made. In BSplitLayout, an item's LayoutData was lazy-initialized, but would always be created during ItemAdded(). Now we create the LayoutData explicitly, so that we can catch failed memory allocations. Closes #5524.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-30 02:28:17 +00:00
Oliver Tappe 99d2aa985b Improved the Time preflet (still not working properly, though)
* basically rewrote TimeZone to sport a nicer to use interface
* adjusted all users of TimeZone accordingly
* changed TZDisplay to show the Date next to the label, in
  order to avoid that long timezone names draw all over it
* the timezone listview is now properly sorted according
  to the current language (using BCollator)
* fixed a couple of bugs (overflows, etc.) that caused
  incorrect GMT offsets to be used during computations


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 20:10:26 +00:00
Oliver Tappe 96e5a8739a * added SetTo() in order to be able to set a new destination
string

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 20:03:05 +00:00
Axel Dörfler 9d771afb39 * Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
  and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
  header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:43:08 +00:00
Alex Wilson 106d8c4e5b Convert to unix line endings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 22:28:51 +00:00
Alex Wilson 5f844af738 Update BTabView for layout-friendly archiving. Added _InitContainerView() method that is called from _InitObject() but also called on its own during unarchival. Implemented BTabView::AllUnarchived() and implemented a case for this in BTabView::Perform().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 20:03:41 +00:00
Axel Dörfler 61729d9323 * Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
  complete, though, InterfaceAddresses need to hold references to their
  interface as well).
* There are two known regressions of this commit that I will fix later:
  - you cannot remove interfaces anymore
  - IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
  not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
  the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
  is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
  set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
  available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
  anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
  belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:38:23 +00:00
Axel Dörfler b216fbd077 * Applied next work in progress patch by Atis that takes into account most of
my comments so far. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:09:12 +00:00
Adrien Destugues 1c99030935 * Style fixes pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 14:45:54 +00:00
Adrien Destugues 2c6ebfaaea * Fix collator text
* Fix archiving/unarchiving to provide at least a valid object. However, ICU archiving system doesn't look like it's working well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 13:16:11 +00:00
Adrien Destugues 110649a1a4 * Collator API now actually uses ICU.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 11:29:14 +00:00
Alex Wilson 5c47e35e2a Updated BTextControl and its custom BLayoutItems. Also a bit of style cleanup. Broke up BTextControl::_InitData() method into _InitData() and _InitText() and moved initialization of the BTextView there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 22:16:46 +00:00
Alex Wilson 7a37b89be9 Updated BMenuField and its custom BLayoutItems for layout-safe archiving. Added an _InitMenu(const BMessage*) method that inits the menu during unarchival.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 20:59:47 +00:00
Adrien Destugues 1855b44cdf * Set the ICU default time zone from the locale preflet. Unfortunately it looks like this doesn't solve all the problems
yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 09:45:52 +00:00
Oliver Tappe c090a0fd84 * updated ICU build packages with newer builds that try a bit harder to avoid
warnings and incorporate some of the ICU-patches we had in our repo before
  we upgraded to 4.4.1
* fixed remaining warnings when building locale kit
* activated EnableWerror for locale kit
* added 'Unicode' license, which is the second license in use by ICU


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 22:05:39 +00:00
Clemens Zeidler a28bf6c79d Add conversion operator to the BReference class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 19:18:56 +00:00
Adrien Destugues 4ae5a45220 * Rewrote the timezone selection part of the time preflet to make use of ICU instead of our custom TZData.
* Not completely working yet, hte POSIX API isn't very happy about ICU timezone names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 13:56:50 +00:00
Alex Wilson 45a167a94d In BUnarchiver::IsInstantiated(), catch a possible NULL dereference, make archive parameter to BUnarchiver::IsArchiveManaged() const.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 08:02:33 +00:00
Oliver Tappe ad51686353 * improved the locale kit build rules and headers to use a different set of
B_TRANSLATE-macros when running collectcatkeys, simplifying the regex a lot
* added B_TRANSLATE_NOCOLLECT...-macros for the case where a non-literal
  string shall be translated, but not picked up by collectcatkeys


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 22:47:39 +00:00
Matt Madia 9072a31477 Added a boot splash header file that contains only the boot icons. Later,
video_splash.cpp and boot_splash.cpp will be updated to utilize it.

Relates to #6183. See #6255 for issues on using 'splash_logo-development.png'
with generate_boot_screen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 18:44:52 +00:00
Oliver Tappe a4823efd7d Fix problems with sed and gcc caused by reintegration of posix-locale:
* support invocation of ctype/wctype macros with EOF/WEOF (-1), which would
  access more or less random memory before - I don't know why this worked
  more or less reliably for the POSIX locale, but it didn't for any other


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-24 16:20:52 +00:00
Oliver Tappe c0f9765409 * minor cleanup (whitespace and superfluous include)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-24 16:04:43 +00:00
Oliver Tappe a3f665982e * reintegrated posix-locale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 23:13:00 +00:00
Oliver Tappe b891b0acae * broke out locale-related jam rules into their own file, LocaleRules
* made locale build tools shut up about anything except warnings or errors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 19:56:24 +00:00
Oliver Tappe bca50be432 Second go at fixing what should have been part of r31927:
* uncommented fwscanf() in wchar.h to make it available
* imported wcsftime() from FreeBSD-8 (which just wraps strftime()), so that we 
  not only declare it, but provide an implementation, too
As a result, the next build of gcc4 should be able to detect full support for wchar_t and in turn activate wchar_t-based template types (like std::wstring).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 17:34:33 +00:00
Adrien Destugues 282582c005 * Bcountry : private methods start with underscore. The timezone list isnow actually a list of BTimeZone objects, that holdsall the needed info, not only the code. Also tweak the listing code to
remove duplicatesfromthe list generated by ICU.
 * BTimeZone : remove Code, rename Name to GetName. The class is likely to change again for further optimization.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 16:25:43 +00:00
Adrien Destugues 2774e142e1 * Add a BTimeZone class for handling time zones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 13:19:33 +00:00
Adrien Destugues 6c178e1e73 * Add locking system to BCountry to avoid problems with the formatters being deleted while you use them, or created multiple times.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 11:38:37 +00:00
Axel Dörfler d62ee168ed * Corrected naming/visibility of the DatagramSocket methods (protected methods
do not get the '_' prefix, only private ones do).
* Added a "peek" argument to SocketStatus() (and generally renamed "clone" to
  "peek" where it made sense).
* Implemented the base version of SocketStatus() to return the actual socket
  error. This enables returning ICMP errors back to the socket user.
* Other minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:12:06 +00:00
Adrien Destugues f48ad0d968 * Style fixes (some pointed out by Axel, some others by the vim stylechecker).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:52:49 +00:00
Adrien Destugues d4f3002de9 * BCountry : add error checking in case the system runs out of memory, cleanup function prototypes (we don't need virtual, this was a leftover of
OpenTracker days)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:36:36 +00:00
Adrien Destugues 3bdfd7f340 * BCountry : use lazy initialisation for the date and time formatters, since they are not always used. Makes instancaiating a country faster, and
so, loading the locale preflet is also faster and use less memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 13:54:53 +00:00
Adrien Destugues a03aca6e06 WIP Timezone support
* BCountry can list the timezones applicable for the country
 * BCountry can give its name (for example France), or LocaleName (french (France)). The second one will later be moved to BLocale class along with 
most of the locale settings ; but this needs a bit of refactoring.
 * The Locale preflet now uses LocaleName instead of Name, since it deals with locales. The time preflet will want only country names, without te 
language information, for example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:47:00 +00:00
Axel Dörfler 74a4c33fda * Implemented a way to preserve header data while passing along a buffer to the
upper layers: you use the store_header() function to mark the header you want
  to preserve. All subsequent remove_header() calls won't claim the actual
  data, but only move the node start around.
* This header can then be restored by restore_header(). However, a call to
  prepend_data() will destroy the stored header. Also, if remove_header() cuts
  off a whole node, restoring the header won't succeed anymore.
* Discarded the no longer needed net_buffer::network_header field.
* Also discarded the hoplimit field which temporarily breaks the IPv6 build
  until Atis reworks it.
* IPv4 now also dumps the IP header in the send path if debug output is enabled.
* icmp_error_reply() might be called so early that the net_buffer's addresses
  do not point to the reply address; this is now detected, and the addresses are
  taken out of the IP header in that case.
* Improved dumping the net_buffer to also include its address, and flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:26:46 +00:00
Ingo Weinhold 4e08fb8589 Added rw_lock_read_lock_with_timeout().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:10:48 +00:00
Ingo Weinhold b349aae941 Should have been part of r37678. io_request_is_vip() support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:09:32 +00:00
Ingo Weinhold 0a1dabca7e Added public io_request_is_vip(), returning whether the given request has the
VIP flag set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:08:34 +00:00
Oliver Tappe 8ab6671aad * reverted r37669, as gcc4 enables wchar_t-related template types, but
then fails to build them because of wcsftime() missing
Needs more investigation ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 00:02:40 +00:00
Oliver Tappe eddec292d5 * applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 21:43:20 +00:00
Oliver Tappe 887a1066e4 Fix that should have been part of r31927:
* uncommented fwscanf() in wchar.h to make it available
As a result, the next build of gcc4 should be able to detect full support for wchar_t and in turn activate wchar_t-based template types (like std::wstring).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 20:11:48 +00:00
Adrien Destugues 719313afdd * Missing from the previous commit. Sorry ! Thanks to luroh for watching.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 17:49:00 +00:00
Axel Dörfler 68d1b69012 * Fixed broken decode function. I wonder how that one could have been missed
before...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 16:13:51 +00:00
Adrien Destugues 82a115e8bc * BCountry : add copy constructor and assignment operator
* The locale roster uses them instead of messing with pointers, to avoid ownership problems
 * The Locale preflet works on a copy of the default country instead of altering it directly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 14:09:48 +00:00
Axel Dörfler 1978fb81ee * First part of ICMP support: this is based on the work by Ivo Vachkov (GSoC
2007), and Yin Qiu (GSoC 2008). And even though I needed to rewrite pretty
  much all of it because of the countless bugs and problems it had, it still
  shares the same architectural problems of introducing a domain dependent
  error mechanism to the upper layers, and needing the
  net_buffer::network_header hack. This I will rework later.
* net_buffer's append_size(), and prepend_size() will now gracefully handle
  buffers without a data node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 12:00:27 +00:00
Axel Dörfler f6a57629c3 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 11:23:42 +00:00
Axel Dörfler 866e21d3a6 * Moved DatagramSocket::Socket() up to its parent.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 11:22:54 +00:00
Ingo Weinhold 83f46ed6ab file_cache_write() can get a NULL buffer and still a size != 0, which the
request handling wasn't taking into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 09:55:04 +00:00
Adrien Destugues 4b37c7f861 * Remove direct access to ICU in locale preflet, use the locale kit instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 15:47:16 +00:00
Adrien Destugues fe8d7c0225 * Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
 * Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 11:38:34 +00:00
Ingo Weinhold 814057885c Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:28:55 +00:00
Ingo Weinhold 12463fa891 Patch by Alex Wilson: Added archiving/unarchiving support to BSplitView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:24:19 +00:00
Axel Dörfler 8d1485fa06 Work in progress commit by Atis Elsts (I'm posting his ChangeLog comments
directly here), I made only a few style changes:
* introduced 'has_broadcast_address' field in
struct net_address_module_info
 - REVIEW: the name, and the status of this field for UNIX and L2CAP
	families
* ipv6 address family support
* ipv6 address printing	
* ipv6 protocol support	
* ipv6 multicast support
  - TODO: add and remove multicast routes in a more proper way
  - TODO: support MLD
* ipv6 datalink protocol support
* icmpv6 protocol support (EchoRequest and EchoResponse messages)
* ipv6 neigbor discovery protocol support
  (Advertisement and Solicitation messages)
  - TODO: only the very basic support is present,
	the protocol state machine is by no means completed
  - TODO: replying to Solicitation does not work too good ATM
	(visible, when pinging Haiku from outside)
* added Jenkin's hash algorith
* minor changes in existing IPv4 code - cleanup function
	ipv4_get_loopback_address(), written by myself
* add tests: raw, udp, tcp/udp, mullicast sender
* add 'hoplimit' field in struct net_buffer
  - TODO: this is just a hack, more generic approach would be  better.
* add 'receive_data' function pointer in
	struct net_datalink_protocol_module_info
  - TODO: this is also more like a hack, to support information
	passing from ICMPv6 to IPv6_datagram level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 16:55:55 +00:00
Adrien Destugues 3047815036 * Fix \x parsing in collectcatkeys again (thanks to Kaliber)
* Hide the CatalogStub::GetCatalog method so that if liblocalestub.a is missing from a localized image, it will not try to steal the catalog of another one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 15:47:06 +00:00
Axel Dörfler ca83261dd6 Patch by Atis Elsts with only minor changes by myself:
* Moved ip6.h header from FreeBSD private to posix/netinet.
* Added some more IPv6 support definitions to in.h, and in6.h.
* Added icmp6.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 15:03:37 +00:00
Adrien Destugues 7af097b973 * Add FormatDate variant returning fields positions and associated DateFields returning their identifiers
* Use them in the time preflet to display and edit the date in a local-aware way


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 12:24:57 +00:00
Fredrik Holmqvist a636d1e365 Patch by kaliber to fix some compiling errors with clang. Removed the #include <iostream> part, but otherwise not modified.
See http://clang.llvm.org/compatibility.html#c++ why it is needed. Note that HashMap.h Key and Value are typenames as well.
Afaict this is correctly done, builds and runs on gcc4. This fixes #5892.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 10:33:24 +00:00
Ingo Weinhold 39c72631a3 Patch by Alex Wilson:
* Added archiving/unarchving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 01:05:28 +00:00
Ingo Weinhold ff626c8e29 Patch by Alex Wilson: Added archiving/unarchiving support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:46:40 +00:00
Ingo Weinhold 3fb74eb796 Patch by Alex Wilson (with minor changes by myself):
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:41:56 +00:00
Ingo Weinhold a3d9e70188 dos2unix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:20:19 +00:00
Ingo Weinhold 849e11ad8d Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:15:31 +00:00
Ingo Weinhold d1535a45df Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:09:06 +00:00
Ingo Weinhold 80c2bbd8ae Patch by Alex Wilson (with small style changes by myself): Added support for
archiving/unarchiving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 18:11:24 +00:00
Ingo Weinhold 7ed1644c55 Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Style cleanup (also some by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:23:15 +00:00
Ingo Weinhold cbac1a2355 Patch by Alex Wilson: Added archiving/unarchiving of layout and layout
related data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:06:55 +00:00
Ingo Weinhold b137ab3eb3 Patch by Alex Wilson (minor changes by myself) related to the new archiving
features:
* Some cosmetic adjustments of the API, like using references instead of
  pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
  and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
  object ownership, now. This is necessary since an error while unarchiving
  could leave an already unarchived object without owning object, which would
  result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
  have an optional parameter to specify whether object ownership shall be
  transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 16:49:42 +00:00
Oliver Tappe 7ad694e346 Some more ICU-related improvements:
* updated icu-devel package to 4.4.1
* create appropriate devel lib links when icu-devel is being installed
  (which only works during build, not when using installoptionalpackage)
* dropped ICU headers from repository and instead fetch them from the
  icu-devel package when needed during the build
* adjusted Jamfiles that make use of ICU-headers accordingly (hopefully
  I didn't miss any)
* fixed license in OptionalPackage description of icu packages


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-15 21:23:45 +00:00
Adrien Destugues a7e183f8e5 BDateField is already used in ColumnListView, so use another name for this enum.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 19:43:46 +00:00
Adrien Destugues 57500c639c * Allow use of unicode character in time view
* Some support for languages having an order different than H:M:S:AM (like chinese). Does not seem to work too well, but I can't spot what I missed
 * API to get the infos about the type of each field in a time format


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 16:43:04 +00:00
Adrien Destugues c96d1da735 * Add an API to get a formatted time along with delimiters for the differrent fields, for further parsing/formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 13:20:20 +00:00
Stephan Aßmus b1008df2c2 Patch by Alex Wilson: Added convenience methods for storing BAlignment and BSize
in BMessages. Also added type codes for them in TypeConstants.h. Closes ticket
#6302. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 07:02:38 +00:00
Adrien Destugues 5098ba1b94 Update ICU to 4.4
* Remove 4.2 sourcecode
 * ICU is now an optional package (mandatory)
 * Adjust the namespaces and libraries names where needed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 19:04:40 +00:00
Ingo Weinhold b944766870 * Moved the vm_page initialization from vm_page.cpp:vm_page_init() to the new
vm_page::Init().
* Made vm_page::wired_count private and added accessor methods.
* Added VMCache::fWiredPagesCount (the number of wired pages the cache
  contains) and accessor methods.
* Made more use of vm_page::IsMapped().
* vm_copy_on_write_area(): Added vm_page_reservation* parameter that can be
  used to request a special handling for wired pages. If given the wired pages
  are replaced by copies and the original pages are moved to the upper cache.
* vm_copy_area():
  - We don't need to do any wired ranges handling, if the source area is a
    B_SHARED_AREA, since we don't touch the area's mappings in this case.
  - We no longer wait for wired ranges of the concerned areas to disappear.
    Instead we use the new vm_copy_on_write_area() feature and just let it
    copy the wired pages. This fixes #6288, an issue introduced with the use
    of user mutexes in libroot: When executing multiple concurrent fork()s all
    but the first one would wait on the fork mutex, which (being a user mutex)
    would wire a page that the vm_copy_area() of the first fork() would wait
    for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 15:08:13 +00:00
Axel Dörfler 268317bd9d * Style cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 16:04:41 +00:00
Adrien Destugues 27d84b482c Patch by Alex Wilson as part of GSoC 2010 : Archiving of Layouted BViews hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:40:49 +00:00
Ingo Weinhold fbb6335d2a Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:04:38 +00:00
Ingo Weinhold e5150e2847 Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 14:54:25 +00:00
Adrien Destugues 51145d87bd Support for setting 12/24Hr mode in locale preflet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 09:14:09 +00:00
Axel Dörfler 816d81b51b * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 06:52:16 +00:00
Ingo Weinhold f75e014cb8 Patch by Lucian Adrian Grijincu: Added support for loading kernel modules
with only a single readable/writable/executable text+data segment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-06 21:47:08 +00:00
Ingo Weinhold 7b2003907a * Replace remaining BeOS int types.
* Removed inclusion of <SupportDefs.h>, respectively replaced it with
  <stdint.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 16:11:43 +00:00
Jérôme Duval bafdc02b99 forgot an uint16 type for x86_64
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:38:45 +00:00
Jérôme Duval 5efd950f28 * followed Ingo's suggestion and used uint*_t types instead of public Haiku types.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:36:38 +00:00
Jérôme Duval 8386c959c4 Fixes uses of __uint16_t and __uint32_t which we don't define, also fixes the ppc buildtools build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 11:10:28 +00:00
Jérôme Duval 818786a83a Define ssize_t in Haiku headers when building with GCC4 (see also #5719). This could imply a conflict with old gcc4 Haiku builds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 16:39:29 +00:00
François Revol c31429c581 include sys/cdefs.h to hopefully fix building the cross tools for arm & ppc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 13:45:15 +00:00
Stefano Ceccherini 4225e5b785 Use the Bfont object to discriminate between fonts (as in Dano)
and not just size and code. Style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 09:34:59 +00:00
Adrien Destugues 2f0eb7b11e * Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 17:15:55 +00:00
Adrien Destugues be8fa2fb30 * Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
 * readonlybootprompt will no longer update the locale settings : the 
method used messed with internal undocumented things
 * external localized apps (webpositive for example) will not run 
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 11:36:13 +00:00
Wim van der Meer 15676f3a87 Code style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 03:07:18 +00:00
Adrien Destugues 76a4353b79 Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
 * Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the 
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 11:54:09 +00:00
François Revol dae84707ac Patch by "notzed" (Ticket #5380): Add support for setting video mode for OMAP3.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:39:36 +00:00
François Revol 6c6d79f7fa Add some defines for memory ranges. Missed in r37319.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:25:08 +00:00
François Revol 9020ce87e6 Patch by "notzed" (ticket #5368) (modified): Add bootloader support for BeagleBoard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:24:11 +00:00
Stefano Ceccherini 8460e00cc0 _AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed
by Ziusudra).
Also removed leftover fDynamicItemsAdded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 14:49:42 +00:00
François Revol 2e749db8bf Debug console on FreeRunner is on UART3, though you need a debug board.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 00:05:30 +00:00
Wim van der Meer b3df2c9a87 Fixing BeOS binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 22:16:07 +00:00
Philippe Houdoin 307ff45454 Promoted newest 3dfx video driver by Gerald Zajac in place of the outdated tdfx driver.
Added to Haiku image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 20:43:37 +00:00
Wim van der Meer e4eb2e7e45 Reverting r37289 because it breaks the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:45:04 +00:00
Wim van der Meer 2ec871140d Change the tempnam() prototype in stdio.h to match its implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:11:25 +00:00
Wim van der Meer 31f2baa4fd Changeset r37275 makes the name parameter in the BGLView class constructor a const char*, which breaks binary compatibility with R5.
This change uses _BEOS_R5_COMPATIBLE_ to determine which function prototype to use.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 09:03:55 +00:00
Andreas Färber d46ce4d62a kernel_ppc: Save caller's stack pointer in arch_debug_save_registers
Suggested by Ingo in ticket #6139. Code is adapted from x86.
Note that on ppc64 GPR1 needs to be 64-bit, thus the choice of addr_t.

Resolves part of ticket #6160.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-27 20:16:59 +00:00
Wim van der Meer 329e7bd264 Compiler warning fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-27 09:11:17 +00:00
Rene Gollent 8154643efe Updated AI_* flags to match up with our implementation. Should fix #3945.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:50:14 +00:00
Andreas Färber 04ec719a70 Convert line endings to LF
In r33670 the svn:eol-style property was dropped, which took care of
locally converting the line endings to the user's native style.
While most files use Unix-style LF line endings, some files have
Windows-style CR LF line endings.

Assure that the following r37262 directories use Unix-style line endings:

src/system/boot/
src/system/boot/arch/
src/system/boot/arch/ppc/
src/system/boot/loader/
src/system/boot/loader/net/
src/system/boot/platform/
src/system/boot/platform/openfirmware/
src/system/boot/platform/openfirmware/arch/
src/system/boot/platform/openfirmware/arch/ppc/
src/system/kernel/
src/system/kernel/arch/
src/system/kernel/arch/ppc/
src/system/kernel/platform/
src/system/kernel/platform/openfirmware/
headers/private/kernel/
headers/private/kernel/arch/
headers/private/kernel/arch/ppc/
headers/private/kernel/platform/
headers/private/kernel/platform/openfirmware/
headers/private/kernel/boot/
headers/private/kernel/boot/net/
headers/private/kernel/boot/platform/
headers/private/kernel/boot/platform/openfirmware/

This avoids patches containing irrelevant lines unintentionally converted.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:38:03 +00:00
Fredrik Holmqvist e5dca54f1a r37259 fails to compile on one of my systems without this header. Checking out fresh tree and reconfiguring didn't work so don't really know why.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:24:11 +00:00
Stefano Ceccherini 780b76dcf9 Applied patch by Ziusudra in ticket #4930 to avoid a deadlock when
navigating the menus via keyboard.
I also factored some code into functions, in particular the code to
add the dynamic items. Also keep track if the dynamic items have been added
or not (using a new boolean class member).
I tested for regressions but couldn't find any.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 12:29:17 +00:00
Ingo Weinhold 45bd7bb3db Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-25 22:16:10 +00:00
Philippe Houdoin a56bc48835 ImÃport new 3dfx graphics driver from Gerald Zajac (see #6215.
Supports Banshee, Voodoo3 and Voodoo5 chips.
It will be promoted as older tdfx replacement soon, but not until 
my small changes around phys_addr_t are validated.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-24 03:47:49 +00:00
Ingo Weinhold 7a0dca5c54 Moved SHA256 code to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 17:47:07 +00:00
Ingo Weinhold f3eead13e4 Changed to 64 bit physical addresses for x86. This enabled PAE support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:10:08 +00:00
Ingo Weinhold 2a25d16d33 * get_memory_map(): Changed parameters types to fixed-width types.
* Added BeOS compatibility wrappers for get_memory_map(), map_physical_memory(),
  and create_area().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:09:26 +00:00
Ingo Weinhold b46540452a Added vm_page_max_address() which returns the greatest address of accessible
physical memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:52:32 +00:00
Ingo Weinhold 9fb2d73772 Replaced B_32_BIT_MEMORY by B_32_BIT_FULL_LOCK and B_32_BIT_CONTIGUOUS, so
the constraint can be expressed more precisely. ATM B_32_BIT_FULL_LOCK is
implemented as B_32_BIT_CONTIGUOUS when B_HAIKU_PHYSICAL_BITS > 32, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:29:25 +00:00
Ingo Weinhold 7b1d69ecbb Added safe mode option B_SAFEMODE_4_GB_MEMORY_LIMIT (plus a boot loader menu
item) and kernel settings option "4gb_memory_limit". Enabling either one
causes the memory beyond 4 GB to be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:13:39 +00:00
Ingo Weinhold ff9151d11f Added ignore_physical_memory_ranges_beyond_4gb() which removes the memory
beyond 4 GB from the physical memory ranges.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:10:01 +00:00
Ingo Weinhold be87d0a03e * Added area creation "lock" constant B_32_BIT_MEMORY for physically
contiguous memory < 4 GB.
* vm_create_anonymous_area(): Implemented support for B_LOMEM and
  B_32_BIT_MEMORY.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:46:19 +00:00
Ingo Weinhold e7a5527b53 Some enum definitions were also defining variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:13:47 +00:00
Ingo Weinhold 13638944db Removed never read VMCache::scan_skip.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 15:10:37 +00:00
Ingo Weinhold 0d5ab7a14d Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and
ClearAccessedAndModified() implementations into helper methods PageUnmapped()
and UnaccessedPageUnmapped() in the base class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:32:33 +00:00
Wim van der Meer 2a2b528e73 Report ignored memory pages seperately, thanks to bonefish for the patch review. Closes ticket #6178
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-19 14:07:26 +00:00
Ingo Weinhold c955359cb6 Added vm_available_not_needed_memory_debug(), a
vm_available_not_needed_memory() version that can be called from within the
kernel debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-18 20:57:05 +00:00
Ingo Weinhold f8e263c184 Slipped by in r37138: Added VMCache::Dump() and removed GetLock().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-15 00:07:18 +00:00
Ingo Weinhold 377ecfe797 * Renamed cache_type_to_string() to vm_cache_type_to_string() and made in
kernel private.
* Moved dumping code from dump_cache() to new VMCache::Dump().
* Override VMCache::Dump() in VMVnodeCache to also print the vnode.
* Removed no longer needed VMCache::GetLock().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 23:57:00 +00:00
Ingo Weinhold 0f48aa877a The ConstIterator only needs a const tree.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 23:51:54 +00:00
Oliver Ruiz Dorantes a5bf12376d *Incorrect endianess handling from bdaddr at parsing from string.
*Remove bluetooth_util deprecated header
*Issue conn_req for socket connect() call



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 20:04:10 +00:00
Ingo Weinhold a8ad734f1c * Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
  - Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
    taken into account.
  - Takes a physical_address_restrictions instead of base/limit and also
    supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
  ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
  also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
  {virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
  - Fixed potential overflows of uint32 when initializing from device node
    attributes.
  - Fixed bounce buffer creation TODOs: By using create_area_etc() with the
    new restrictions parameters we can directly support physical high address,
    boundary, and alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 16:25:14 +00:00
Ingo Weinhold 84e9db7fb7 x86 mmu_init(): Sum up the physical memory we ignore for whatever reason --
stored in kernel_args::ignored_physical_memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-12 15:57:21 +00:00
Travis Geiselbrecht 9623c48284 SMP: remove the tracking of apic id -> cpu id. Don't pass between bootloader and kernel.
Kernel doesn't use it, and it could be regenerated in the kernel if it did need it.

This also unlocks the apic range the bios can use. Previously the apic ids would have
to fit within 0..MAX_CPUS or it'd reject the cpu. Some boxes (mine in particular)
seem to sparsely populate the apic id so that the range is pretty large.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-12 01:01:54 +00:00
Ingo Weinhold d382fc3a8e Added commented line to enable PAE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-11 16:26:11 +00:00
Ingo Weinhold f498c07968 Added STATIC_ASSERT() macro (from <Debug.h>, which cannot be included in the
kernel).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-10 17:31:57 +00:00
Ingo Weinhold 1d26c7248f vm_page_allocate_page_run(): Added parameter "limit", specifying the upper
physical address limit for the page run to allocate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-10 17:30:49 +00:00
Ingo Weinhold 9e101ddfcc Definition for CR4 PAE bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 21:21:48 +00:00
Ingo Weinhold 641b3c82df Renamed allocate_early_physical_page() to vm_allocate_early_physical_page()
and made it public.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 21:21:18 +00:00
Ingo Weinhold 2ea7b17cf3 * vm_allocate_early(): Replace "bool blockAlign" parameter by a more flexible
"addr_t aligmnent".
* X86PagingMethod32Bit::PhysicalPageSlotPool::InitInitial(),
  generic_vm_physical_page_mapper_init(): Use vm_allocate_early()'s alignment
  feature instead of aligning by hand.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 11:15:43 +00:00
Stephan Aßmus d698997098 Fixed misspelled header, closes ticket #6147.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-08 21:07:38 +00:00
Ingo Weinhold 5aa0503c7c * Removed i386_translation_map_get_pgdir() and adjusted the one place where it
was used.
* Renamed X86VMTranslationMap to X86VMTranslationMap32Bit and pulled the paging
  method agnostic part into new base class X86VMTranslationMap.
* Moved X86PagingStructures into its own header/source pair.
* Moved pgdir_virt from X86PagingStructures to X86PagingStructures32Bit where
  it is actually used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-08 00:20:34 +00:00
Axel Dörfler cdfd124b11 * Now phys_addr_t should be used where needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 09:39:38 +00:00
Axel Dörfler d48edac1a6 * Should fix #6132, PropertyInfo.h was not self contained.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 09:37:46 +00:00
Ingo Weinhold 1ba89e67ed Removed no-op VMTranslationMap::InitPostSem() and
VMAddressSpace::InitPostSem().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 22:20:34 +00:00
Ingo Weinhold c3e021e862 x86:
* Renamed i386_context_switch() to x86_context_switch().
* x86_context_switch() no longer sets the page directory.
  arch_thread_context_switch() does that explicitly, now. This allows to solve
  the TODO by reordering releasing the previous paging structures reference and
  setting the new page directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 22:09:24 +00:00
Ingo Weinhold fabdf00e6a Renamed i386_swap_pgdir() to x86_swap_pgdir.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 21:53:32 +00:00
Ingo Weinhold 8421714089 x86:
* Renamed vm_translation_map_arch_info to X86PagingStructures, and all
  members and local variables of that type accordingly.
* arch_thread_context_switch(): Added TODO: The still active paging structures
  can indeed be deleted before we stop using them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 21:51:05 +00:00
Ingo Weinhold 78dde7abd7 Consequently use uint32 for the physical page directory address.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-04 22:23:22 +00:00
Ingo Weinhold 8c9b84a588 Replaced the swap_addr_t and SWAP_SLOT_NONE in RadixBitmap.{h,cpp} by
radix_slot_t and RADIX_SLOT_NONE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 20:42:53 +00:00
Ingo Weinhold 435c43f591 * Introduced type generic_io_vec, which is similar to iovec, but uses types
that are wide enough for both virtual and physical addresses.
* DMABuffer, IORequest, IOScheduler,... and code using them: Use
  generic_io_vec and generic_{addr,size}_t where necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 18:42:20 +00:00
Ingo Weinhold 4a57f84396 Introduced types [__haiku_]generic_{addr,size}_t which are wide enough for
virtual and physical addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 18:22:38 +00:00
Axel Dörfler 455b379c27 * Added a read_write() function to the scsi_periph module.
* Internally, moved the contents of periph_io() into a static read_write()
  function, and use it from the new periph_read_write() as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-01 13:37:55 +00:00
Axel Dörfler 598a6d8517 * UTF8CountChars() was not 64-bit safe (and that in a hard to detect way).
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-28 18:37:36 +00:00
Axel Dörfler 9a063f059c * Fixed the AGP interface to correctly use phys_addr_t where needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-28 09:19:11 +00:00
Ingo Weinhold 64d79eff72 * Changed physical_entry::{address,size} to phys_{addr,size}_t and changed
map_physical_memory()'s physicalAddress parameter type from void* to
  phys_addr_t. This breaks source compatibility, but -- as long as
  phys_{addr,size}_t remain 32 bit wide -- keeps binary compatibility with
  BeOS.
* Adjusted all code using the affected interfaces (Oh what fun!). Added a few
  TODOs in places where the wrong types (e.g. void* for physical addresses
  are used). Looks like quite a few drivers aren't 64 bit safe and others
  will break with PAE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 22:07:27 +00:00
Stephan Aßmus 908967a199 Improved the BNotification API after suggestions from Karsten, thanks! Using
cosnt BString& instead of const char* could potentially save copying the string,
although in most use cases, it will probably ammount to the same thing. It may
provide more flexibility later on, like for example when BString knows its
encoding or something similar. Removed superfluous second version of
AddOnClickRef().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 21:13:11 +00:00
Stephan Aßmus f33637d9a8 * Improved BNotification API.
- No more manual memory management.
   - Make it clear who keeps or releases ownership of arguments passed.
   - Copy icon, arguments and entry_refs.
   - Do not expose implementation details (What do the BLists contain?!).
   - BRoster takes const BNotification& and bigtime_t timeout.

 * BRoster::Notify():
   - Proper error handling.
   - Fixed documentation.

 * Adjusted notify:
   - Renamed fOk to fHasGoodArguments.
   - The "const char*" members were really "char*" members (self-managed).
   - free() is NULL-safe.
   - fRefs contains BEntries, so passing void* to delete does no good.
   - Adjustments to the changed API.
   - Coding style fixes.

 * notification_server:
   - Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:50:12 +00:00
Ingo Weinhold e5846dfa61 Added shared sort_[physical_]address_ranges() to avoid code duplication. Also
fixes the m68k build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:08:47 +00:00
Axel Dörfler 0cf9610449 * Fixed incorrect spacing and blank lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 15:53:35 +00:00
Stephan Aßmus de9dcd41f8 Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 14:48:27 +00:00
Ingo Weinhold d73ddac5bf * Introduced phys_addr_range type, an equivalent to addr_range for physical
address ranges, and a set of support functions working with it.
* Changed the type of the kernel_args physical address range arrays to
  phys_addr_range and adjusted the code working with those.
* Removed a bunch of duplicated address range code in the PPC's mmu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 11:50:40 +00:00
Ingo Weinhold 147133b76c * First run through the kernel's private parts to use phys_{addr,size}_t
where appropriate.
* Typedef'ed page_num_t to phys_addr_t and used it in more places in
  vm_page.{h,cpp}.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 21:34:08 +00:00
Ingo Weinhold ea021b94d8 * Moved phys_addr_t definition to SupportDefs.h.
* Added phys_size_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 11:18:38 +00:00
Ingo Weinhold a9139aa356 * FS shell: Use 64 bit [s]size_t on 64 bit platforms.
* SupportDefs.h (build platform): Define [s]size_t printf() macros correctly
  on 64 bit hosts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 21:44:16 +00:00
Ingo Weinhold 9d570af7c8 Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 21:04:22 +00:00
Ingo Weinhold d34daac82a * config/{HaikuConfig.h,types.h}:
- Added macro __HAIKU_ARCH_BITS specifying the architecture bitness (32/64)
    (might be more convenient to use than __HAIKU_ARCH_{32,64}_BIT).
  - Added macros __HAIKU_ARCH_PHYSICAL_BITS, __HAIKU_ARCH_PHYSICAL_{32,64}_BIT,
    and the types __haiku_phys_[s]addr_t. The intention is to use separate
    macros and types for virtual and physical addresses, since for some
    architectures (e.g. x86 with PAE) those actually differ.
* sys/types.h, BeBuild.h, SupportDefs.h:
  - Added types phys_[s]addr_t and respective printf() format macros.
  - Added public macros B_HAIKU_BITS, B_HAIKU_PHYSICAL_BITS,
    B_HAIKU_PHYSICAL_{32,64}_BIT.

Might break the build under older Haiku installations. Will test next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 19:55:38 +00:00
Stephan Aßmus e4200ae30c Part of patch by kaliber: Fixed OpenHashElementArray<Element>::Add(
const Element &newElement), element is a pointer. See ticket #5892 (found
by compiling Haiku with clang).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-23 12:41:15 +00:00
Fredrik Holmqvist ffb873afec Merge acpi from acpica vendor branch 20100428:
* AcpiSetGpeType no longer exists, replaced with AcpiSetGpe. Since acpi changed gpe handling embedded controller might need improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-19 21:33:02 +00:00
Ingo Weinhold f51bcfb25b Added a heap_init_post_area() which is called right after areas can be
created, and moved the heap's grow and VIP heap initialization to it. Should
fix #5956.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-18 15:51:27 +00:00
Stephan Aßmus a2b1193e13 Fixed spelling, thanks Adrien!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-17 20:24:29 +00:00
Stephan Aßmus 0a93eaefb8 Patch by Jorma Karvonen: Add LocaleKit.h header and also add it to Be.h. Thanks!
Closes ticket #6004.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 16:07:55 +00:00
Stephan Aßmus 33394b856d Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 15:51:54 +00:00
Stephan Aßmus 1c73ffa102 Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 15:53:09 +00:00
Ingo Weinhold 97901ec593 Patch by Nathan Mentley:
* Added a few header files in headers/posix/arch that'll allow for an x86_64
  haiku target to be compiled. fenv.h is src/lib/msun/amd64/fenv.h from
  freebsd.
* configure: Added support for x86_64 arch when running
  build_cross_tools_gcc4.
* config[_build]/HaikuConfig.h, BuildSetup: Added x86_64 recognition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 19:40:06 +00:00
Matt Madia e1361e2e66 Additional TR*-->B_TRANSLATE* cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-10 14:44:54 +00:00
Jérôme Duval 6f1452f92f merge zlib 1.2.5 into trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-09 15:28:00 +00:00
François Revol 28e9f6c22a Patch by mmadia: Fix locale macros. Fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 22:59:42 +00:00
Oliver Ruiz Dorantes 125183f9e5 - Add possibility yo set a custom friendly name to our device. Which will be seen by remotes devices at discovery
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 18:25:09 +00:00
Axel Dörfler 96eaa02e8f * Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
  be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
  - GetName() now gets a BString reference, also
  - it now returns the name in its own language, ie. for German this would
    always be "deutsch", no matter the current language settings, and finally,
  - it now empties the string it gets before adding the name.
  - added GetTranslatedName() that behaves like the previous version.
  - added const where it made sense (ie. almost everywhere).
  - Code() now returns the code of the language only.
  - ID() now returns the full ID of this language, ie. including country,
    variant, and keywords if any.
  - added Country(), and Variant().
  - renamed IsCountry() to IsCountrySpecific().
  - added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
  only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
  for a language even if only one had been dragged, we now only mark the items
  that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
  like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
  language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
  is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
  looking spaghettie code - still, I think things have slightly improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:38:40 +00:00
Axel Dörfler 542aff1be0 * Added constructor that takes a name for the view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:24:22 +00:00
Axel Dörfler a77ec88a9d * Fixed Group(BWindow*, ...) and Grid(BWindow*, ...) constructors to no longer
leak a view.
* Also set the view's background color to B_PANEL_BACKGROUND_COLOR to make this
  better usable in applications.
* Removed the admittedly useless Group(BView*, ...) constructor I introduced
  earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 15:08:27 +00:00
Axel Dörfler 7628cd87bf * Added new BView variant of the BLayoutBuilder::Group() constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:32:11 +00:00
Axel Dörfler cac9f196d8 * Added BListItem::SetOutlineLevel() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:24:25 +00:00
Matt Madia 96949a0a8d Relating to #5408
* Added secondary macros, B_TRANSLATE* to replace TR*
 * For new localization patches, please use the newer B_TRANSLATE*
 * B_TRANSLATE* and TR* are functional during the transition to the new macros
 * Autmatic whitespace cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-06 15:42:48 +00:00
Ingo Weinhold 13fa4c845a * Introduced new area creation flag CREATE_AREA_DONT_COMMIT_MEMORY.
map_backing_store() doesn't commit memory when this flag is given.
* Used the new flag vm_copy_area(): We no longer commit memory for read-only
  areas. This prevents read-only mapped files from suddenly requiring memory
  after fork(). Might improve the situation on machines with very little RAM
  a bit.
  We should probably mark writable copies over-committing, since the usual
  case is fork() + exec() where the child normally doesn't need more than a
  few pages until calling exec(). That would significantly reduce the memory
  requirement for jamming the Haiku tree.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-06 14:59:14 +00:00
Ingo Weinhold 863c623f9a Added is_address_range_covered(), returning whether the given address range
is fully covered by the ranges in the array.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-05 21:09:11 +00:00
Axel Dörfler 8c8fcd770a * Moved the addition of the basic debugger commands directly after the VM init.
* Separated the other stuff previously done in debug_init_post_vm() to the new
  debug_init_post_settings().
* Removed superfluous status_t return codes - they are ignored, anyway, and if
  there really is a show stopper in the init process, panicking would be the
  thing one should do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-05 10:05:25 +00:00
Ingo Weinhold c1be1e0761 * VMTranslationMap::Map()/Protect(): Added "memoryType" parameter. Not
implemented for any architecture yet.
* vm_set_area_memory_type(): Call VMTranslationMap::ProtectArea() to change the
  memory type for the already mapped pages.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-01 21:33:12 +00:00
Ingo Weinhold 3b0c1b5227 * VMArea: Made memory_type private and added setter and getter methods.
* Don't set the VMArea's memory type in arch_vm_set_memory_type(), but let the
  callers do that.
* vm_set_area_memory_type(): Does nothing, if the memory type doesn't change.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-01 20:41:57 +00:00
Ingo Weinhold 907886143f * Changed some parameters of VM syscalls from int to uint32, mostly for sake
of consistency.
* Moved the B_OVERCOMMITTING_AREA flag from B_KERNEL_AREA_FLAGS to
  B_USER_AREA_FLAGS, since we really allow it to be passed from userland.
* Most VM syscalls check the provided protection against B_USER_AREA_FLAGS
  instead of B_USER_PROTECTION, now. This way they allow for
  B_OVERCOMMITTING_AREA as well.
* _user_map_file(), _user_set_memory_protection(): Check the protection like
  the other syscalls do and use fix_protection() instead of doing that
  manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-01 19:47:39 +00:00
Ingo Weinhold 7f987e49d7 Added a rendez-vous variable parameter to smp_trap_non_boot_cpus() and make
boot CPU wait until all other CPUs are ready to wait. This solves a
theoretical problem in main(): The boot CPU could run fully through the early
initialization and reset sCpuRendezvous2 before the other CPUs left
smp_cpu_rendezvous(). It's very unlikely on real hardware that the non-boot
CPUs are so much slower, but it might be a concern in emulation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-30 19:32:12 +00:00
Stephan Aßmus 59d0c2e45e * Introduced PaletteConverter::IndexForRGBA32() which checks if the alpha
component of a 32 bit color is below 128 and returns the special CMAP8 index
   for indicating transparency.
 * Changed the WriteCMAP() color conversion function to expext a 32bit RGBA
   value and use IndexForRGBA32().
 * Adapted B_CMAP8 target color space case of ConvertBits() to the new
   semantics.

This allows transparency in bitmaps when converting B_RGBA32 bitmaps to
B_CMAP8, tested only for this case and working as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-30 11:29:14 +00:00
Ingo Weinhold 28d05e026f Make scheduler_reschedule() an no-op until we're ready to start the
scheduler. This avoids the need to use the send_signal_etc() work-around for
resume_thread() during the early kernel initialization. Might fix #5851.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-29 15:10:37 +00:00
François Revol 79bda6fd6e Fix #5754 so at least the driver builds. It is not yet usable since we do not have a tty manager. For now it should be possible to get the BeOS one to work in Haiku though, but it's not tested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 09:58:18 +00:00
Ingo Weinhold b1e06d23ce * The "page_stats" command does now also print the longest contiguous runs of
free respective free and cached pages.
* Removed the unused vm_page_allocate_page_run_no_base().
* vm_page_allocate_page_run() (and allocate_page_run()):
  - Use vm_page_reserve_pages() instead of vm_page_try_reserve_pages(), i.e.
    wait until the reservation succeeds.
  - Now we iterates two times through the pages to find a suitable page run. In
    the first iteration it only looks for free/clear pages, in the second
    iteration it also considers cached pages. This increases the chance of the
    function to succeed, when a lot of caching is going on.
    This reduces the amount of memory required to use the IOCache when booting
    off the anyboot Live CD to around 160 MB in qemu. It also seems to work with
    128 MB, but the syslog indicates that some memory allocations fail, which
    is not exactly inspiring confidence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-26 13:56:09 +00:00
Artur Wyszynski 49a0c7942f Fixed build with GCC4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 17:51:39 +00:00
Oliver Ruiz Dorantes ddbc9a0f2a - I expected once Haiku sets a connection with a remote device, such connection
was to expire in a couple of minutes, but not, seems to stay forever.
- Implement a Disconnect button in prefrences&kit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 16:01:08 +00:00
Oliver Ruiz Dorantes 36cb67b24e - Style: alphabetize include directives
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 13:16:13 +00:00