- no need to initialize the buffer on stack
- no need to initialize "buffer" to NULL
- renamed "buf" to stackBuffer
- enlarged buffer on stack to 16384 bytes (we have a minimum of 192 kB of
stack per thread, anyway).
- check the actual size of the stack buffer against the message's flattened
size instead of the one of its pointer.
- check if the allocation of the helper buffer failed, and return B_NO_MEMORY
in this case.
* Moved static helper functions to the top of the file.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24204 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Allocate the buffer to flatten the message on the heap, if it's size is bigger then a given
buffer on the stack. It seem's to exceed the stack size (this might count for AddFlat() too).
Note: With this change one is able to copy the text into the clipboard (1mb), but it
is still impossible to paste it somewhere, as in BClipboard::_DownloadFromSystem()
SendMessage() fails transferring the data back in the reply msg because of the port size limit...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24196 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The mode list is now created by the common mode list creation code.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24190 a95241bf-73f2-0310-859d-f6bbb57e9c96
MIME type guessing.
* Now, if the specific MIME type exists, it will be chosen, if it doesn't,
the generic MIME type is chosen. If that does not exist either, the most
generic is chosen (a.k.a. "text/plain").
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24187 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Major cleanup of Appearance prefs - colors are now dynamically
read from the app_server, and updating them also works, but
triggers a bug: the state of the current window somehow gets
confused, i.e. if I update the panel background color, for some
reason the color of the BButtons in the appearance pref change color
and also the textviews begin misbehaving. Have not yet tracked down
the cause of this, but newly created windows after making the change
do show up with the updated color and behave properly. Also vastly
simplified the pref and cleaned up some obsolete definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24185 a95241bf-73f2-0310-859d-f6bbb57e9c96
version. This gets rid of the _IMPEXP* definitions so it should not cause
any trouble.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24184 a95241bf-73f2-0310-859d-f6bbb57e9c96
buffer and would thus overwrite foreign memory after a while resp. reading
invalid responses.
* Further cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24177 a95241bf-73f2-0310-859d-f6bbb57e9c96
bug #1875.
* This does not apply when retrieving the string from stdin, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24176 a95241bf-73f2-0310-859d-f6bbb57e9c96
correctly (or at all...)
* Use the common 0xfffd character as a substitute for invalid characters
* Corrected comment
This function is used by the app_server to convert the UTF8 strings to char
codes to feed FreeType. Using a non space substitute character at least for
now, as it makes it more obvious where invalid characters are present.
I tested this change with some UTF8 test files and it seems to work well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24175 a95241bf-73f2-0310-859d-f6bbb57e9c96
breaking out of the loop too early, and would therefore miss the last
character.
* Replaced UTF8CountChars() with a short and safe version as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24173 a95241bf-73f2-0310-859d-f6bbb57e9c96
of stuff. I think the trouble is that you keep decrementing charCount while
still inside the same UTF8 glyph. I cannot really tell, I am hoping you don't
mind me reverting to the old version, since the new one is only three lines,
so it should be easy to correct and re-commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24172 a95241bf-73f2-0310-859d-f6bbb57e9c96
and the net_server; the network stack now does this internally since r24170;
it worked for IPv4 only, anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24171 a95241bf-73f2-0310-859d-f6bbb57e9c96
to retrieve the default settings for the netmask/broadcast depending on the
specified address/netmask.
* interface_protocol_control() now uses this to reset the broadcast/netmask
to their default values on SIOCSIFADDR resp. the former only on
SIOCSIFNETMASK.
* This fixes bug #1861.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24170 a95241bf-73f2-0310-859d-f6bbb57e9c96
correct warning) for AbstractPointerListHelper. (libbe_build.so)
* I have had problems with implementing virtual functions inline in the
class declaration before, so I implemented the virtual destructor
externally.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24168 a95241bf-73f2-0310-859d-f6bbb57e9c96
maybe users on older hardware prefer 16 bpp, but that should be fixed by
supporting a vesa config file instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24167 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Also, a wall size of 64 byte is a bit large for every day use, too :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24163 a95241bf-73f2-0310-859d-f6bbb57e9c96
track down bug #1862.
* It's not complete for now, as it does not support memalign() or
posix_memalign() yet - handle with care, or feel free to complete :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24162 a95241bf-73f2-0310-859d-f6bbb57e9c96
parameter for the length of the arrays, so that even if the char/byte
counts do not match, no memory is overwritten anymore.
This fixes bug #1862; .canna obviously contains invalid UTF-8
characters, or there is a bug in StyledEdit (or deeper) and it doesn't
call BFont::GetEscapements() correctly.
* Fixed some cases of unchecked allocations in the font handling methods
of ServerApp, added TODOs to all other ones.
* Improved error code when creating a window fails.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24160 a95241bf-73f2-0310-859d-f6bbb57e9c96