Commit Graph

298 Commits

Author SHA1 Message Date
Stephan Aßmus
b0850e9ba1 * Code and header indentation cleanup
* Added operator== and !=
 * Added check for list != this in operator=
 * Added HasItem() and IndexOf() versions that take const void*, duplicating
   the code, since I didn't want to introduce another function call in these
   potentially time critical methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 12:44:38 +00:00
Ingo Weinhold
4736b6b9e5 * Made BReferenceable the class implementation and BPrivate::Referenceable the
typedef, so it's clearer which one is the preferred one.
* Added BReference, a clone of BPrivate::Reference.

BPrivate::{Referenceable,Reference} are being phased out. Only the B* versions
should be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-04 15:08:53 +00:00
Axel Dörfler
6f6dceac96 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 14:36:31 +00:00
Axel Dörfler
e90b90daf6 * Added desperately missing Trim() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 21:13:19 +00:00
Ingo Weinhold
1746066cde * Made _Allocate() static.
* Moved the private inline methods up in the source file, so they can actually
  be inlined.
* UnlockBuffer(): Removed superfluous "if". Maybe the one who wrote it can have
  a look and check whether something else was intended originally.
* _MakeWritable() (both versions): Removed the superfluous ref count increment
  and the matching decrements.
* _Resize(): Fixed ref count ASSERT. It would always be triggered when called
  from UnlockBuffer(), since the ref count is -1 in that case.
* Clarified some comments.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 21:59:27 +00:00
Axel Dörfler
e52400cf24 * Fixed a race condition in the former _Detach*() functions: since atomic_get()
was used, two different threads could decide to share the same mutable string.
* Renamed some functions to make clearer what they do, ie. _Detach() is now
  called _MakeWritable().
* Cleaned up some questionable semantics, like the const char* parameter in
  _DetachWith() - you can now choose to copy the original string or not with
  a boolean. This also makes sure that the string is actually copied when it
  has to, which wasn't the case before (but that was no problem with the way
  that function was used).
* Made the header compliant with our style guide.
* Further cleanup.
* All BString related unit tests are passed, so I guess I didn't break too
  much :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-06 11:23:17 +00:00
Axel Dörfler
584ba8989e * Fixed debug build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-04 09:57:31 +00:00
Jonas Sundström
03458c01a2 More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 22:19:42 +00:00
Jonas Sundström
a243916712 Hopefully fixed indentation in BUrl header. Made data members in BUrl private. Added some class methods. Adapted urlwrapper to use the BUrl class. Removed a few obvious comments and some code that was defined away. Turned off debugging. Stripped App suffix from class name. No intentional changes to the core functionality of urlwrapper.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 01:05:42 +00:00
Jonas Sundström
28e8dc8e80 Move Url class out of /bin/urlwrapper into BPrivate::Support. I plan to add a Launch()-method that will make it useful to /bin/open, AboutSystem, People and other applications.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-11 00:48:03 +00:00
Ingo Weinhold
96b5480b3f Simplification.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-06 15:26:30 +00:00
Ingo Weinhold
113a493073 * Removed the non-STL version of the code.
* Removed the _PointerList_ definition -- instead include <ObjectList.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-21 11:45:19 +00:00
Axel Dörfler
28a650e94d * Made the WeakReferenceable class templatized. Not really sure yet I like that
better, though :-)
* Also fixed a mixup of the unintuitive argument order of our
  atomic_test_and_set(); I guess I will change that sooner or later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 15:14:15 +00:00
Axel Dörfler
e1fed132d2 * Added a WeakReferenceable implementation, completely untested yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 12:01:30 +00:00
Ingo Weinhold
f451e14bc2 Added InitCheck() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 02:05:10 +00:00
Axel Dörfler
c58463ff10 * Seek() must always fail when the resulting offset would be smaller than 0
- "correcting" the offset to 0 is not what should happen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-18 21:29:04 +00:00
Axel Dörfler
1b21be7091 * BBufferIO did not implement Seek() and Position() correctly; it just passed
it to the stream. This caused Read()/Write() to need two syscalls for nothing
  (this only caused the actual stream to share the same position with the
  BBufferIO, something you just cannot rely on when using buffered I/O).
* Anyway, this reduces the time VirtualBox needs to open some RAW test images
  from over 4 minutes to less than 15 seconds...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:23:45 +00:00
Karsten Heimrich
23f4249171 * should have been part of r27883
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-06 19:51:17 +00:00
Karsten Heimrich
a4da9c8634 * fix of by one bug while moving from front to back
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 22:44:33 +00:00
Karsten Heimrich
68f40fccf7 * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 22:41:36 +00:00
Michael Lotz
0b559106bf * Only copy over the list content if resizing/allocating the list succeded.
Fixes CID 1268.
* Remove no more correct comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 19:07:13 +00:00
Ingo Weinhold
f974514476 BString::Append(, int32) methods have been broken in r26378. A local
variable "length" shadowed the "length" parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 23:21:47 +00:00
Stephan Aßmus
2cbb2916a7 * _DoAppend() no longer checks the string and the string length, which resulted
in duplicate work/checks. Instead the length is checked in the calling
  functions.
* operator=(const char*) now checks if the passed pointer is the strings
  own data pointer. I think it would have freed the memory before, not
  sure though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-11 11:32:07 +00:00
Rene Gollent
fe83a98715 Remove unneeded header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:33:13 +00:00
Rene Gollent
0c8bdbafd5 Revamp BList somewhat to further optimize the resizing behavior.
We now keep track of a lower bound as to when the list should scale
itself back down. When increasing the list size, we double the current,
with the lower bound set to 1/4 of the current size, not allowing it to
go any smaller than the block size. These combined allow us to do very
cheap tests to see if an operation requires a resize at all, and minimize
how often the list actually needs to be resized, since the difference in upper
and lower bounds prevents bouncing back and forth between a size in the case
of adding/removing an item while close to a boundary. All in all this should
make BList noticably more scalable when doing large numbers of add/remove
operations.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:30:28 +00:00
Rene Gollent
819eb21bbf Remove (invalid) TODO note. Rename variable more meaningfully. Remove stray whitespace that crept into previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 14:29:59 +00:00
Rene Gollent
34380ac48c Tracked down issue with previous commit. For some reason, modifying the passed in parameter's value directly results in a segfault in registrar, and I cannot see why. Thoughts?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 00:32:48 +00:00
Rene Gollent
22aef42481 Revert this change until I determine why it now crashes the app_server when it didn't during my tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 23:25:33 +00:00
Rene Gollent
864ace1845 Rework BList's Resize() functionality: instead of altering the size of the list a block at a time,
we now double/halve the current size of the list, starting with the constructor blocksize as a baseline.
This has the net effect that when doing large numbers of inserts/removes, the number of resize operations 
needed scales logarithmically to the number of operations, which should yield a decent performance 
improvement in such cases.

Review welcome. This does not yet affect ticket #2363 that I'm aware of, as I'm currently in the process
of attempting to find a copy of said app to test with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 22:10:13 +00:00
François Revol
8e3f5e8959 Make the BString& version of SetTo() behave like BeOS, that length < 0 is means "until the end". This makes CopyInto() acting alike too. Note the char * version crashes in BeOS, instead we act like the other version for consistency.
There are many other calls that crash in BeOS when called with invalid args, should we attempt to sanitize them or call debugger() instead ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 12:56:55 +00:00
Axel Dörfler
13bbfe422b * validate_instantiation() also needs to add the BPrivate namespace in case
it couldn't find the class on first try. This fixes the problems mentioned
  by Shinta as part of bug #2086.
* Got rid of GetNumber() - there is a POSIX function strtoul() for exactly
  this purpose.
* demangle_class_name() can now fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 14:28:16 +00:00
Axel Dörfler
89eb861a3e * Large cleanup. Removed inconsistent usage of errno in instantiate_object();
instead, it will now use the image_id parameter to store errors in.
* find_instantiation_func() and validate_instantiation() will no longer
  overwrite errno with B_OK.
* Made private functions static, and moved them to the top.
* If the class name starts with '_', it will now try to add a BPrivate namespace
  in case it could not find the class. This should help with the compatibility
  issues Shinta reported (also part of ticket #2086).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:56:03 +00:00
Ingo Weinhold
0970b97bed Added support_kit_config.h configuration header. ATM it only contains a
setting to force BLockers to be semaphore style. This may help with
debugging deadlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:04:01 +00:00
Axel Dörfler
4b83262008 * _Realloc() did not initialize the reference count either.
* _Alloc() can now preserve the original reference count, only _Clone()
  still initializes it to 1. As Karsten pointed out, this is necessary to
  preserve the "shareable" status of the private data.
* I hope that's finally it. What happened to our testing suite, anyway? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 22:56:27 +00:00
Axel Dörfler
bf4ddb61e1 * As found by Karsten, the reference count was not initialized in
_ReplaceAtPositions(), and _DoCharacterEscape() (we don't need to preserve
  it, though, as it must be 1).
* Factored out an _Alloc() method which is now always called when the private
  data is allocated. It also takes care of correct initialization (and thus
  fixes the above problem).
* This fix finally allows turning on reference counting again, thanks Karsten!
* Minor cleanup, renamed "oldAdr"/"newAdr" to "oldString", resp. "newString".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 19:14:05 +00:00
Axel Dörfler
7c58a46830 The result of some more proof-reading caused by Stephan's comments:
* _Realloc(), and _Detach[With]() may fail, but that wasn't accounted for
  everywhere.
* The Append(), Prepend(), and Insert() char versions all caused their
  backends to access invalid data (must use strncpy() instead of memcpy()
  here). 
* All Append(), Prepend(), and Insert() BString variants used an invalid
  check, and would therefore just do nothing in certain situations like this
  one:
    BString a = "-";
    BString b = a;
    a.Append(b);


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 16:41:43 +00:00
Axel Dörfler
688c14266c * After my last change, _IsShareable() was called on the wrong string in the
copy constructors, effectively turning of references completely.
* Since that caused troubles (NetPositive now crashes when started), I
  temporarily disabled references by letting _IsShareable() always return
  false until the issue is resolved.
* _FreePrivateData() now sets the fPrivateData member to NULL, and is also
  safe to be called when fPrivateData is NULL.
* Removed my comment about the threading problem in _Detach() and _DetachWith()
  as that just couldn't happen.
* _Clone() must not use memcpy() as the string pointed to by "data" might not
  be as long as "length".
* LockBuffer() now marks a string as unshareable.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 14:14:44 +00:00
Axel Dörfler
a1dac092fa Followed suggestion by Stephan.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 20:49:30 +00:00
Axel Dörfler
002b33b720 * Fixed a bunch or concurreny bugs and memory leaks of the new reference
string stuff.
* It's still not thread-safe for all usage patterns, though, so we might want
  to remove or disable it: if a string is shared between several threads, and
  one of those starts to use a reference, all kinds of problems can happen.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 19:05:09 +00:00
Stephan Aßmus
43361fc860 * Fixed "missing virtual constructor" warning (which is probably even a
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
2008-02-28 14:39:19 +00:00
Stefano Ceccherini
576e2bf833 Patch by Julun: implements a refcounted BString. Thank You!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 21:16:58 +00:00
Axel Dörfler
7bc5a06be6 * BShelf::_AddReplicant() did not recognize zombies if their object was not
inherited from BView.
* BShelf::_AddReplicant() did not honour the fAllowZombies flag correctly; if
  it wasn't allowed, no error message was given.
* Both of these changes fixes the crashing of the Deskbar as described in
  bug #555.
* instantiate_object() now also fires a message to the syslog if the object's
  image could not been loaded. Some cleanup, no longer resets errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 01:03:33 +00:00
Stefano Ceccherini
0e5fe45f13 Removed unused DataBuffer class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-19 19:59:09 +00:00
Michael Lotz
a156e74ad7 * Changed swap_data() to behave like the R5 version
* Added a todo about unsafe access of the buffer
* Removed some types from is_type_swapped() to exactly mirror R5

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 10:42:40 +00:00
Ingo Weinhold
da0f9ae040 Added Haiku as host platform supported by the build system ("haiku_host").
Completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 21:13:56 +00:00
Axel Dörfler
2851dbad53 * Moved Referenceable.cpp to src/kits/support (private libbe API), and its header to
private/shared.
* Made AddReference() and CountReferences() inlines.
* The registrar is now using the private Referenceable version in libbe.so.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:20:37 +00:00
Jérôme Duval
618aaaed08 added a copyright
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-19 22:07:38 +00:00
Jérôme Duval
31ebfe61e4 added default sound events
implemented system_beep() by sending an event to the media addon server


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-16 19:15:46 +00:00
Jérôme Duval
33c487a43e implemented add_system_beep_event()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 20:40:12 +00:00
Niels Sascha Reedijk
a36e40dcda Strip API documentation from these files: they are in separate dox files now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-02 11:25:43 +00:00
Axel Dörfler
087882c26e * Rewrote headers as necessary; only Errors.h and Debug.h still originate from a Be header now;
feel free to change that ;-)
* Cleaned up existing headers.
* Coding style guide update to BBufferIO (renamed m_* members to f*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:36:29 +00:00
Axel Dörfler
43cca04a9a Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 18:06:38 +00:00
Niels Sascha Reedijk
5b506de747 Remove strange character... Apparently I left some junk.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-01 18:47:23 +00:00
Niels Sascha Reedijk
da738868ba Fixed a bug where BString::FindLast(char,int32) might be fed an offset that was beyond the Length of the string.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-01 18:44:06 +00:00
Niels Sascha Reedijk
1ea1a6b46e Remove all the user API comments. There are still some superfluous comments (the name of every function before every function), but the person that coded this class should decide which are superfluous and which aren't.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-01 18:40:51 +00:00
Stefano Ceccherini
511b265ed8 commented out annoying debug messages
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 09:21:17 +00:00
Jérôme Duval
d479db5589 added mangling for gcc4, deskbar replicants are now loaded correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-28 21:11:01 +00:00
Jérôme Duval
e2ba090e41 fixed some gcc4 warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-25 21:49:41 +00:00
Ingo Weinhold
9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00
Axel Dörfler
64f10d7d89 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-30 12:40:15 +00:00
Axel Dörfler
d274c6a597 Added non-const form of BString::operator<<(BString&) for backwards compatibility
(see bug #418).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-15 21:17:05 +00:00
Stephan Aßmus
8cd531a9ba As Axel correctly pointed out, but even Ingo overlooked, we need
to export the previously virtual slot to be binary compatible...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 13:50:11 +00:00
Stephan Aßmus
39c991c0f3 Added BPositionIO::GetSize() and implemented it by means of Seek() and
Position(). This used up a virtual slot of BPositionIO. GetSize() needed to be
implemented in BFile, which uses the BStatable version as before. This should
hopefully be binary compatible. The only problem could be in source
compatibility when there are classes inheriting from BPositionIO implementing
their own GetSize().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 13:27:53 +00:00
Axel Dörfler
e6a6424e1c * Added a work-around to _Alloc() to allow R5 NetPositive to work on Haiku;
dunno if we want to keep this, though.
* Improved some methods by no longer calling strlen() more than once.
* We're now using snprintf() instead of sprintf() in the << operators to
  make them more secure (even though the string lengths should be long
  enough).
* Improved << operators by taking the return (the resulting string length) of
  snprintf() into account.
* Replaced calls to _GrowBy() with a negative argument with calls to
  _Alloc() which actually safes some computation.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 12:43:46 +00:00
Oliver Tappe
94a055c10d * fixed broken FindLast() taking a char and an offset
* added two more tests that exhibit the (now fixed) problem in FindLast()



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 18:27:50 +00:00
Axel Dörfler
5232a619c1 Fixed build, sorry again - sure, with a commit that big, I just had to mess it up :/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 21:19:55 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Ingo Weinhold
ca9e5772c3 * Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
  "haiku") -- added one more level of indirection to achieve that.
  (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
  (auto-included when compiling something that uses the Be API for platform
  "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
  which can be included when compiling something that can be built for both,
  Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
  under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
  to a BeOS compatible host platform target, with the exception, that instead
  of the host platform's libbe.so a special build of Haiku's libbe.so
  (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
  Haiku's public app, interface, storage, and support kit headers are used
  when compiling. This replaces the less nice way in which the test app server
  and applications for this test environment were built.
  When building for platform "libbe_test", the library name "be" is
  autotranslated to "libbe_haiku.so". Thus most applications don't need
  special fiddling when them building them for the app server test environment;
  usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
  (e.g. source files not including the needed headers directly).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Stefano Ceccherini
fd8b9c0dd9 Misc style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 09:34:32 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Jérôme Duval
b6389f3106 fix BStopWatch::Resume()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-20 11:34:22 +00:00
Michael Lotz
49b4f78f95 Minor correction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-07 17:49:38 +00:00
Philippe Houdoin
8c67c59ba9 Removed libhaiku.a from build, as it was only used by (now defunct) experimental StyledEdit+ app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-05 15:24:19 +00:00
Philippe Houdoin
459a7cfc36 Removed obsoleted .src includes files.
Removed Interface's kit BTextView Jamfile, as it's build right from src/kits/interface/Jamfile now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-05 10:18:26 +00:00
Philippe Houdoin
cb5da7de09 Cleanup libbe.so build system, using MergeObject power:
a) Make main Jamfile more easier to understand to new (and old even) developers. 
   Currently it looks a little too messy compared to usual Haiku's jamfiles.
b) Get ride of app.src, interface.src, storage.src and support.src includes files.
c) Move each kit objects files built back to their respective
   objects/x86.R1/kits/{app|interface|storage|support} location.
d) Move private headers and source search hints back to each respective kit
   Jamfiles. Most of them, at least.

{app|interface|storage|support}.src files effective deletion will come soon.
Hope I didn't break all *again* :-\



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-05 09:56:03 +00:00
Axel Dörfler
8e326c9cc1 Some style changes I forgot to commit.
Also, BLocker now accepts NULL as a name and won't crash anymore in that case
("some BLocker" is then chosen as name).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-25 23:29:44 +00:00
Michael Lotz
8c123e6dad Fixed build of StyledEdit for target r5. What's the matter with the second StyledEdit in there? Also added BString back to libhaiku.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-07 13:26:11 +00:00
Michael Lotz
c728a74e42 Cleanup. We don't need string_helper anymore as it's only function (strcasestr) is in libroot. It was a temporary solution more than two years ago.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 23:07:32 +00:00
Stefano Ceccherini
d0164ea34a Small style changes, just to improve my commit stats :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-20 08:28:12 +00:00
DarkWyrm
383050e5a6 Minor tweaks to be able to declare this one done. :)
Removal of the obsolete OpenBeOS namespace
Added header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-06 19:29:04 +00:00
Ingo Weinhold
4b8aafea9f BMessenger has no friends besides Private anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 14:46:28 +00:00
Stefano Ceccherini
d0733791ae Removed MallocIO.cpp as it wasn't being built, and BMallocIO implementation is in DataIO.cpp.
We might want to split them again, but keeping that old file around was counterproductive.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 08:44:03 +00:00
Michael Pfeiffer
cd6bfb01f3 Alternative implementation that uses STL.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 16:14:20 +00:00
ejakowatz
e4265bfbfe Modified BDataBuffer's copy constructor to let the user specify whether to create a copy of the buffer or just a reference. Also changed all void* params to be const.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 23:00:30 +00:00
Axel Dörfler
cbe8d2b0fe Applied some parts of our style guide.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 17:33:33 +00:00
Axel Dörfler
4bccccda2e Fixed two wrong cast types which broke the build over here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 17:28:42 +00:00
Michael Pfeiffer
ad867a27fb Implemented quick sort. Refactored source code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 09:39:05 +00:00
Michael Pfeiffer
38ded28eee Fixed bugs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-02 20:29:30 +00:00
Stefano Ceccherini
4826cc5f6a Added a (mostly not tested) _PointerList_ class. Please (Michael Pfeiffer or Ingo, whoever comes here first ) have a look at it :)
Note that I needed to write my own BSearch() because the compare functions used by _PointerList_ wants items as arguments, while the C bsearch() wants pointers to items as arguments.
The same applies to qsort(), though it's not been written yet.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 10:10:23 +00:00
shatty
1cd30f5d3d BString is the first recipient of libhaiku status
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-17 02:41:19 +00:00
Axel Dörfler
ba8e3cf1e4 Now exports B_EMPTY_STRING - maybe there is a better place for it, like
SupportDefs.cpp. Feel free to move it to a better place.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 12:50:22 +00:00
Axel Dörfler
63b2f72c39 Added missing beep functions - they are not yet implemented, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-27 20:33:29 +00:00
Axel Dörfler
47550b1e72 swap_data() now checks its argument before it decides if there is anything to
do at all; it will now also return B_BAD_VALUE for types where it doesn't need
to do anything (i.e. 8 bit types).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-27 18:23:00 +00:00
Axel Dörfler
2397827a6f Implemented swap_data() and is_type_swapped() - tests follow soon.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 14:40:07 +00:00
Stefano Ceccherini
20b628d310 Some cleanups for BStopWatch. Added the check for B_INTERRUPTED to the semaphore acquisition in BLocker
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 08:10:36 +00:00
DarkWyrm
76441bab6e Add header
Minor tweaks to BClipboard


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-15 16:23:58 +00:00
Axel Dörfler
cd58ac9968 Minitiure optimizations for BString: eliminated a superfluous variable,
and removed the "newData" calculation, since "dataLen" already contained
the same value.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-17 04:06:44 +00:00
shatty
81d54f9a85 moved character set and text encoding related files to current/src/kits/textencoding
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:30:34 +00:00
Stefano Ceccherini
5480b4590e Another patch from Oliver Tappe: BString behaves better when the user supplies out-of bounds values in Insert(), Remove(), etc.
Code is refactored, and it fully complies with our guidelines.
Tests have been updated too (hint: try the replace tests with R5 and our implementation...)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 07:35:16 +00:00
beveloper
16ce982290 better handling of low memory situations inside constructor
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 19:47:29 +00:00
Ingo Weinhold
340eed61d6 Moved definition of _FreeBlock to the source file and enabled its "magic{1,2}" fields on debug only.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-07 12:04:24 +00:00
Ingo Weinhold
1facca2109 Added BBlockCache to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-07 11:57:32 +00:00
Ingo Weinhold
369eef1343 Check in per Jeremy Rand: Adjusted implementation to behave like that in R5 -- no more tracking of excess blocks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-07 11:55:25 +00:00
haydentech
6cb536dd5b malloc.h is obsolete, use stdlib.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 19:57:56 +00:00
beveloper
a54e42d79a removed debugger call,
added name to BLocker


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-30 23:47:55 +00:00
beveloper
b93355ab58 it was missing these two functions...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 01:28:00 +00:00
beveloper
6ecb8ce9a0 removed stupid type cast
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 01:19:01 +00:00
beveloper
ad159f4343 cleaned up meaning of first constructor parameter
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 00:54:54 +00:00
beveloper
188ad70f3d Replaced the broken BBufferCache implementation.
According to the BeBook, it is NOT allowed to allocate one large
pool, instead the memory blocks must be allocated individually.
To achieve O(1) for both Save() and Get() function, only one list
of free blocks is maintained.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 00:25:56 +00:00
Ingo Weinhold
7c4d270b25 Check in per Jack Burton: Fixed invalid delete[] in destructor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-27 12:03:50 +00:00
ejakowatz
e9e500cb9e Minor tweak to BHandler::UnlockLooper()
Added calls to _init_message_(), _delete_message_(), and
_msg_cache_cleanup() to InitTerminateLibBe.cpp
Finished first implementation of BMessage::SendReply(), BMessage::_send_(),
and BMessage::_send_message()
Add BMessage to app.src, removed BBlockCache from support.src.
New BMessage::Private class has functions for twiddling BMessage internals


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-25 07:55:52 +00:00
shatty
884d2b83a6 error protection for Get functions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-13 10:12:46 +00:00
shatty
5b7ea503a7 refine the error handling behavior. note: we depart from the bebook specification for returning B_ERROR when no characters are converted. we do this in exactly one situation: when there are no bytes in the input. this behavior is the behavior given by the R5 libs themselves. not having this behavior caused an error in our stylededit as well. stylededit has been fixed to not exercise this functionality. also added in the two most popular chinese encodings for my own evil purposes. GB18030 support is required to legally sell an operating system in mainland china as well. GB18030 support encompasses GBK and GB2312, additionally.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-13 05:38:07 +00:00
shadow303
17e6de7a37 gcc 3 fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-04 00:46:53 +00:00
shatty
28f10fcaac no const for now
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-02 09:01:13 +00:00
shatty
fb2e95f496 dunno when beos changes the state, but it seems to leave at 0 for a while so I am going to have it be consistent that way
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 07:34:30 +00:00
shatty
d4d7d73937 remove debugging print things
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 07:18:15 +00:00
shatty
9c5fdc6c2a new and better working implementations for conversion functions, including better abstraction
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 07:17:30 +00:00
shatty
5f410263f9 added iconv_close to free resources and made a new input_buffer_t typedef to ease switching iconv implementations
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 04:57:37 +00:00
shatty
ec4fc3af6a fixed the 14th encoding, which is not FIXED japanese but rather JIS0208, yay!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 04:56:56 +00:00
shatty
1e4b516951 need libiconv.so for new libtextencodings.so to work
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 00:57:59 +00:00
shatty
b9de54c8ef written to use iconv.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 00:04:53 +00:00
shatty
fdab93a590 added checking again MIME name
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-27 22:06:27 +00:00
shatty
312e206dd3 IANA information on character sets
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-27 04:26:43 +00:00
shatty
172722fe52 added default constructor, which just happens to init to UTF-8. do not count on this feature. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-27 01:34:30 +00:00
shatty
dbfb944d44 added all the remaining R5 text encodings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-27 00:58:01 +00:00
shatty
a4b6e788fc build libtextencoding.so with new stubs and character set support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-26 21:28:35 +00:00
shatty
4e7a2f6c8b utf8 conversions file with stub implementations of convert_to_utf8 and convert_from_utf8
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-26 21:28:02 +00:00
shatty
2534c14ea1 initialize global character set array
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-26 21:27:13 +00:00
shatty
05c932b5ac add character set support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-26 21:26:36 +00:00
shadow303
ac3bb782a8 gcc 3 fix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-04 21:11:20 +00:00
haydentech
d2a9d5e5fe Namespace- and gcc3-related fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-03 18:34:34 +00:00
ejakowatz
2a5153718e Minor tweaks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-23 23:55:32 +00:00
ejakowatz
9abc4d2dcd Added params for specifying whether to copy the buffer on construction.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-23 23:07:30 +00:00
ejakowatz
b1055b4c2d This is all the code for the backing store for BMessage (BMessageBody &
BMessageField) for the "template madness" version.  Also included is
BDataBuffer which is a little reference counting raw data container.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-19 07:58:17 +00:00
Ingo Weinhold
5c905a2f6a Added missing newline at end of file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-15 20:11:18 +00:00
Ingo Weinhold
7319572398 Re-added BString to the built.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-15 20:10:14 +00:00
Ingo Weinhold
bd68efa667 Removed BString from the build. It is broken.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-14 23:14:08 +00:00
Stefano Ceccherini
1783edd55c Added a big patch from Oliver Tappe. BString now is much faster when it has to deal with very long strings. Thanks Oliver. Fixed the (in)famous LockBuffer(0)->UnlockBuffer(-1) R5 bug.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-11 19:16:18 +00:00
Stefano Ceccherini
2d4125b748 this should be the definitive (excluded bugfixes) implementation of BBufferIO. Buffered write should work fine, as buffered read did.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-22 16:40:56 +00:00
Stefano Ceccherini
51ee67dc8f Fixed an obvious bug, simplified a bit the code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 12:32:09 +00:00
Stefano Ceccherini
089f7debba Implemented buffered read in BBufferIO class, and added it to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 12:17:41 +00:00
Stefano Ceccherini
a8dee23ea0 A fix for a Replace function, some checks which makes the code
more robust, some style changes, some more comments.
Started to document the class with Doxygen comments.
(I made too many changes to keep the file local :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-10 10:19:56 +00:00
Stefano Ceccherini
005069f4e1 Changed a "" include to a <> one. Some cosmetic changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 11:14:33 +00:00
François Revol
a3d1f07f83 Fix by Jack Burton
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-10 16:30:39 +00:00
Stefano Ceccherini
d19f7b5dad Fixed the behaviour of DoForEach() functions (from Isaac Yonemoto implementation)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-10 13:02:00 +00:00
Stefano Ceccherini
9c81f09d9f Implemented some missing functions (MoveItems is still lacking), added the copyright header
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-06 14:25:05 +00:00
Stefano Ceccherini
a42a3ab57f A skeleton for the BBufferIO class.
(Since we have a header, I think we should also have an implementation...
;-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 09:26:32 +00:00
ejakowatz
d546b00e22 Undid the oh-so-1337 utf_char_len "optimization" (which is not only slower,
but doesn't handle invalid UTF-8 strings correctly) in CountChars().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 03:47:48 +00:00