Commit Graph

8741 Commits

Author SHA1 Message Date
Adrien Destugues
a19a18f553 Rework BCollator API
- Strength is now set once, instead of at each comparison, to improve
  performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
2017-05-29 08:52:43 +02:00
Joseph C, Hill
17286dc70a pthread.h: Add PTHREAD_RWLOCK_INITIALIZER macro.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #8798. One tiny style fix by me (adding spaces around braces).
2017-05-27 12:46:47 -04:00
Akshay Agarwal
f5c544b59a Fix style formatting issue in BTimeUnitFormat, update BDurationFormat accordingly.
* Issue: BTimeUnitFormat doesn't incorporate style formatting while
formatting a time unit. Format() does take style as an argument but the
style is not used anywhere. So currently the abbreviated style doesn't
work and by default the time unit is formatted to the full style.

* Fix: Move the style flag from BTimeUnitFormat::Format() to the
BTimeUnitFormat constructors and call the relevant icu::TimeUnitFormat
constructor. Map the Haiku defined style unit to the corresponding ICU
unit. Move the style flag from BDurationFormat::Format() to the
BDurationFormat constructors to map the changes in BTimeUnitFormat.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13508
2017-05-17 19:53:46 +02:00
Jessica Hamilton
e888217124 loader: fetch all potential boot partitions for boot device.
This allows the loader to skip BFS partitions that don't contain
a bootable system. Useful when you have a BFS data partition that
comes before the system partition when iterated over.

Currently, only the UEFI loader actually returns more than one
possible partition.
2017-05-17 12:51:09 +12:00
Jérôme Duval
133e4131fe Added some support for GCC 8. 2017-05-13 11:37:22 +02:00
Andrew Lindesay
e6fa1be5fd Implementation of JSON Streaming Parser
Addition of missing files from previous commit
2017-05-13 19:35:51 +12:00
Alexander G. M. Smith
5e7964b0a9 Remove Spurious B_BEOS_DATA_DIRECTORY
There is no DATA directory in BeOS, and its FindDir() doesn't implement
it.  No need for a confusing backwards compatibility to something that
doesn't exist (had my hopes up, was going to move some non-executable
files from AddOns to Data in a program that works in BeOS and Haiku).

The removed enum label doesn't change the directory_which enum order
or count, as it was aliasing the value of another existing enum label
(B_SYSTEM_DATA_DIRECTORY).

Fixes #13470

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-05-08 22:17:53 +02:00
dsizzle
9b6b158b88 Implementation of BFont::Blocks
BFont::Blocks is now implemented in ServerFont, via a call through the
app_server.  It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.

A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-05-08 22:17:53 +02:00
Dario Casalinuovo
c0ef5b2b7c MediaFile: Little refactor to use the MediaStreamer class
* This clarify the ownership of the source when using the experimental
API.
* The extractor/writer are simplified and don't have to care about
adapters.
* MediaStreamer is able to provide a generic BAdapterIO that is
suitable also for different uses than the codecs API itself.
2017-05-04 14:08:07 +02:00
Dario Casalinuovo
9198105dbb MediaWriter/MediaExtractor: Remove BUrl constructors 2017-05-04 14:08:07 +02:00
Dario Casalinuovo
dfecb37aee Introduce new experimental class MediaStreamer 2017-05-04 14:08:07 +02:00
Axel Dörfler
e9843da357 KPath: Added LAZY_ALLOC flag.
* This allows KPath to not allocate a buffer when initialized
  without path.
* Added test cases for this.
* Added test for LockBuffer().
* Enhanced tests to allow building them in debug mode.
* Moved calling vfs_normalize_path() into own private method.
* Improved error codes; B_NO_MEMORY is now only returned if the
  allocation actually failed.
* If used with LAZY_ALLOC, Path() and LockBuffer() are now allowed
  to return a NULL path.
2017-04-30 17:14:45 +02:00
Axel Dörfler
eac83fb33e KPath: Replaced booleans with flags field.
* No functional change intended; I chose the flags in a way that it
  should still work even if I missed a reference.
2017-04-30 17:13:39 +02:00
Brian Hill
b8a6139981 Fix glitch in Screen prefs when changing background color.
When both Backgrounds and Screen are open, if the workspace color is changed
in Backgrounds the monitor preview in Screen will now refresh to the new color.

Also added a BAlert in BackgroundsView.cpp when failing to change the
background image.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13286.
2017-04-30 10:29:39 +02:00
Axel Dörfler
3582d4fe85 Minor style cleanup. 2017-04-29 14:37:56 +02:00
Dario Casalinuovo
a33c8f4c2a MediaClient: Some more consistency in args order 2017-04-28 02:13:51 +02:00
Jérôme Duval
43542cabdd runtime_loader: increase max length for image names.
* was previously 32, which would truncate longer shared object names.
* fixed #13436.
2017-04-20 18:23:36 +02:00
Jérôme Duval
41458d977a limits.h: define PIPE_BUF. 2017-04-19 17:52:28 +02:00
Jérôme Duval
00796434c6 limits.h: bump _POSIX_SEM_NSEMS_MAX to 256.
128 was too low for Python3.
2017-04-16 13:49:41 +02:00
Dario Casalinuovo
0cc5ecb8ca MediaClient: IDs should be signed integers
* It's very important to use a negative value to identify
non valid or uninitialized connections. Additionally, it's preferred
to don't interfere with media_kit types as long as the framework use
it in the backend.
2017-04-14 17:28:35 +02:00
Adrien Destugues
56403b6373 limits.h: define PAGE_SIZE only if XSI is requested
limits.h is part of the C standard, but POSIX and XSI extend it with
various defines. We should not add these unless the application requests
support for them.

In this case, PAGE_SIZE should only be defined if XSI support is
requested by defining _XOPEN_SOURCE. Note that PAGESIZE (plain POSIX for
the same thing) and B_PAGE_SIZE are alternatives that remain available.
2017-04-13 21:14:41 +02:00
Adrien Destugues
b68cf9d6f6 elf.h: add more architectures.
Mostly I need EM_AVR to build avrdude on Haiku.
2017-04-11 18:59:06 +02:00
Alexander von Gluck IV
6516aed58b network preflet: Make InterfaceListItem dumber
* Allows us to use InterfaceListItem for non-physical
  interface things (like a VPN connection)
2017-04-05 18:46:10 +00:00
Fredrik Holmqvist
e5c95a01ff Use 64 bit addressing for ACPI on 32 bit builds.
32 bit builds with PAE are so much fun. It's like
64 bit without all the extra registers...
2017-03-28 21:34:42 +02:00
Alexander von Gluck IV
8cc5325ad5 agg: Pull in updated scanline + basics header from 2.4
* Resolves #13382
2017-03-18 18:59:30 -05:00
Augustin Cavalier
ad05d1f087 libs/agg: Remove GPC.
It was licensed with a "no commercial usage allowed" license, which if
we were using it would be a gray area at best. We weren't using it at all,
and AGG seems to have disabled building it by default, so just remove it
from the tree entirely.

Briefly discussed on IRC.
2017-03-18 19:27:45 -04:00
Alexander von Gluck IV
63863c9849 cpu_type.h: Fix missing ;, sorry for spam 2017-03-12 15:11:02 -05:00
Alexander von Gluck IV
54066ddbb7 OS.h: Add AMD Ryzen CPU name identification.
* Update cpuidtool.c to new post-smp rework name
  calculation
2017-03-12 14:46:02 -05:00
Dario Casalinuovo
5854fc4a7a MediaClient: Add remaining wiring for input/output functionality
* BufferReceived is renamed HandleBuffer.
* Update doc.
* Implement buffer production private methods.
2017-03-10 01:02:15 +01:00
Jim Barry
d47434c2ec Added "explicit" specifier to constructors that would otherwise allow undesirable implicit conversion from integer types.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 15:59:46 -05:00
John Horigan
3c69a2e24d Add agg_renderer_base::fill(color&) method for blending a color. Complements the clear(color&) method, which copies the color.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 14:59:40 -05:00
John Horigan
cb743deb19 Add const qualifier to multiply and divide operators for agg_trans_affine/perspective
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 14:52:10 -05:00
Murai Takashi
58916d4a36 agg_scanline_u.h: fix wrong base_type
As pointed out at https://sourceforge.net/p/agg/svn/37

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 13:26:56 -05:00
Julian Harnath
6ced92452c FUSE compat: add MIME type faking
* Add special handling for reading the BEOS:TYPE attribute to supply
  on-the-fly fake MIME types for FUSE module filesystems, the same
  way it's done in our FAT and NTFS FS modules

* Reuse the mime_ext_table which we already have and put it into a
  shared location so we don't get further extra copies of it
2017-02-27 19:58:22 +00:00
Julian Harnath
1263be8fc4 FUSE compat: add Haiku extension
* Add a way for a FUSE module to supply Haiku-specific extensions.
  This allows it to integrate better with Haiku while only requiring
  minimal changes on the FUSE module itself.

* For now, there is only one extension: another function pointer for
  "get_fs_info", which lets the FUSE module fill in an fs_info struct.
  FUSE provides no good way to otherwise communicate extra information,
  such as the volume flags (e.g. B_FS_IS_SHARED).

* A FUSE module can signal that it supports the Haiku extensions by
    a) defining HAS_HAIKU_FUSE_EXTENSIONS before including the fuse
       headers
    b) setting the global variable gHasHaikuFuseExtensions to 1 in
       its initialization
  Otherwise, the Haiku extensions are completely invisible to the
  FUSE module.
2017-02-27 19:58:13 +00:00
John Scipione
388ac82baa BString: Add IStartsWith() and IEndsWith() methods
Case-insensitive version of StartsWith() and EndsWith()
2017-02-21 18:03:03 -08:00
Jérôme Duval
85566e032d posix: add _POSIX_SEM_NSEMS_MAX.
* have _SC__SEM_NSEMS_MAX return _POSIX_SEM_NSEMS_MAX, a per team limit
instead of the global limit.
2017-02-21 20:17:16 +01:00
Jérôme Duval
0bec83a85a pthread: add const for pthread_mutex*_get*()
according to the spec. Fixes #13324.
* code style clean up.
2017-02-21 20:05:02 +01:00
PulkoMandy
100775b790 Fix build on Linux
Stub out some translation macros for host build, so the now localized
package solver can be built there.
2017-02-11 14:15:38 +01:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Augustin Cavalier
6c9415e3ca BJson: Use the normal "input, output" argument ordering instead of the reverse.
Update all in-tree consumers of the BJson API to match. Also added
const-qualifiers to the BString versions of the API, and added the leading
"_" to the header guards.
2017-02-09 13:43:26 -05:00
Jérôme Duval
d0a92cb653 x86: added a MSR definition. 2017-02-01 16:57:03 +01:00
Adrien Destugues
f9e1854f19 libbnetapi: fix access to HTTP headers
The asynchronous listener had no reliable way to access HTTP result and
headers from the callbacks. As the callbacks are triggered
asynchronously, they can be run after the request has carried on and,
for example, followed an HTTP redirect, clearing its internal state.

The HeadersReceived callback now passes a reference to BUrlResult for
the request. There are two cases:
- Synchronous listener: passes a reference to the request's results
directly
- Asynchronous listener: archives a copy of the result into the
notification message, and passes a reference to the unarchived copy.

Unfortunately this comes with several ABI and API breakages:
- Change to the prototype of HeadersReceived()
- Change to the class hierarchy of BUrlResult (implements BArchivable)

All users of HTTP requests will need to be updated if they implemented
in HeadersReceived or used BUrlResult.
2017-01-30 20:27:52 +01:00
Kacper Kasper
2332ebfd52 ControlLook: Add side parameter to tab drawing functions.
* This allows drawing tabs on any side of the view.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-01-22 09:36:38 +01:00
Andrew Aldridge
a735975461 Sync atheros813x with FreeBSD
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12328.
Fixed a style error (2 lines between functions).
2017-01-22 09:20:01 +01:00
Dario Casalinuovo
991d9dbf6d MediaConnection: Implement auto release 2017-01-18 20:19:02 +01:00
Dario Casalinuovo
0844ddf4d9 MediaClient: Polish destructors
* Make Release() the only public way to destroy a connection.
2017-01-18 20:19:02 +01:00
Dario Casalinuovo
d64dd7beea MediaClient: Fix style for private methods and other cleanup
* Cleaned up some unneeded callbacks.
2017-01-18 20:19:02 +01:00
Dario Casalinuovo
7561d9ac5d Populate media/experimental with future media_kit classes
* Node implementations headers are move into src/kits/media.
2017-01-16 23:04:14 +01:00
Dario Casalinuovo
41acdd1d90 media_kit: Move some files and headers under docs/develop/media 2017-01-16 22:53:44 +01:00