Commit Graph

37 Commits

Author SHA1 Message Date
Stefano Ceccherini
99b75a6f12 delete -> delete[]. CID 121
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:11:58 +00:00
Axel Dörfler
f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +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
ac0ff19664 While investigating why our UTF-16 files are broken (with a smaller output buffer),
I noticed that "state" was never set, but as expected this doesn't help at all:
we just can't use iconv() this way, I'll open a bug for this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 11:18:33 +00:00
Axel Dörfler
4ea89ce5c8 Looks like Be and Andrew mixed up UCS-2 and UTF-16; I added the UTF-16 conversion as well
now (which has a marker at the beginning of the file, unlike UCS-2).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 11:08:39 +00:00
Axel Dörfler
cf45491bc8 Unlike what shatty wrote in his commit messages, convert_from_utf8() does return
B_OK here when called with an empty string.
Since this is the natural thing to expect anyway, I changed our version to return
a sane value here as well - if this causes an error within our StyledEdit, as
shatty writes, we should just fix our StyledEdit.
Cleanup to match our style guides a bit better, added license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 12:00:38 +00:00
Jérôme Duval
9fe8bb2d91 as on R5, return an error when *srcLen == 0 and set dstLen to 0
fix bug #120


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-08 13:47:33 +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
Adi Oanca
b89fefc7c4 use DEBUG_CONV to print some output not the global DEBUG
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 17:33:47 +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
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
94fa227876 update third party lib : libiconv-1.10
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-19 08:42:03 +00:00
shatty
eed1255a5c putting textencoding.so into beos/system/lib is important so that the Deskbar replicant works
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 11:37:12 +00:00
shatty
ec5b4cac39 use const char for parameters, uint to avoid warnings, and strcasecmp for name comparisons
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 07:35:47 +00:00
shatty
e25788aa41 add mail kit aliases: shift_jisx0213, euc-jisx0213
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 07:34:18 +00:00
shatty
e254dca796 add libtextencoding.so to haiku-maildaemon-cvs package
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 05:17:19 +00:00
shatty
d026a4b550 search all standard names before looking at aliases
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 03:49:40 +00:00
shatty
f3479d994e add mail kit aliases
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 03:48:51 +00:00
shatty
2f28cee0ca add more aliases
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 02:49:11 +00:00
shatty
72764530c5 gracefully tolerate coder passing NULL for state pointer
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-24 00:20:56 +00:00
shatty
ea35f801c4 improved printing names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 21:42:41 +00:00
shatty
0cccf9ac6d fix mimetype bugs in some ISO encodings, clean up print names for japanese encodings, and change the JIS 0208 encoding to ISO-2022-JP
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 08:45:30 +00:00
shatty
a50f96fabc updated from 2004-02-06
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 05:00:16 +00:00
shatty
2f4a64dbc0 reduce namespace pollution
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-18 20:40:54 +00:00
Jérôme Duval
715f500dea added a link in develop/lib, lower warning level on libiconv
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-27 22:48:24 +00:00
shatty
1074cc24d5 fix stupid looping bug on large files - thanks kuye, Tim
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 11:09:44 +00:00
shatty
5707f9a19b implemented substitution behavior by using non-posix iconvctl. also implemented bad input bytes tolerance (via ignore)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 10:36:07 +00:00
shatty
cac6c93c3a use gnu iconv.h to get access to nonposix functions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 10:35:15 +00:00
shatty
059fa6fbb5 do not use iconv plug because we want nonposix functions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 10:34:50 +00:00
shatty
62a5973ec6 put in butchered version of libiconv.h from gnu libiconv, so we can have access to the non-posix functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 10:34:09 +00:00
shatty
f0b5e20620 GNU libiconv-1.9.1
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 07:44:22 +00:00
shatty
e5692b384e MOVED:
---------------------------------------------------------------------------
  RCS file: /cvsroot/open-beos/current/src/kits/support/utf8_conversions.cpp,v
  Working file: utf8_conversions.cpp
  head: 1.8
  branch:
  locks: strict
  access list:
  symbolic names:
  keyword substitution: kv
  total revisions: 8;     selected revisions: 8
  description:
  ----------------------------
  revision 1.8
  date: 2003/08/13 05:38:07;  author: shatty;  state: Exp;  lines: +24 -4
  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.
  ----------------------------
  revision 1.7
  date: 2003/08/02 09:01:13;  author: shatty;  state: Exp;  lines: +1 -1
  no const for now
  ----------------------------
  revision 1.6
  date: 2003/07/31 07:34:30;  author: shatty;  state: Exp;  lines: +0 -1
  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
  ----------------------------
  revision 1.5
  date: 2003/07/31 07:18:15;  author: shatty;  state: Exp;  lines: +0 -3
  remove debugging print things
  ----------------------------
  revision 1.4
  date: 2003/07/31 07:17:30;  author: shatty;  state: Exp;  lines: +35 -30
  new and better working implementations for conversion functions, including better abstraction
  ----------------------------
  revision 1.3
  date: 2003/07/31 04:57:37;  author: shatty;  state: Exp;  lines: +6 -2
  added iconv_close to free resources and made a new input_buffer_t typedef to ease switching iconv implementations
  ----------------------------
  revision 1.2
  date: 2003/07/31 00:04:53;  author: shatty;  state: Exp;  lines: +43 -4
  written to use iconv.h
  ----------------------------
  revision 1.1
  date: 2003/07/26 21:28:02;  author: shatty;  state: Exp;
  utf8 conversions file with stub implementations of convert_to_utf8 and convert_from_utf8


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:28:29 +00:00
shatty
9f0ebaadc9 MOVED:
---------------------------------------------------------------------------
  RCS file: /cvsroot/open-beos/current/src/kits/support/CharacterSetRoster.cpp,v
  Working file: CharacterSetRoster.cpp
  head: 1.3
  branch:
  locks: strict
  access list:
  symbolic names:
  keyword substitution: kv
  total revisions: 3;     selected revisions: 3
  description:
  ----------------------------
  revision 1.3
  date: 2003/08/13 10:12:46;  author: shatty;  state: Exp;  lines: +9 -0
  error protection for Get functions
  ----------------------------
  revision 1.2
  date: 2003/07/27 22:06:27;  author: shatty;  state: Exp;  lines: +4 -0
  added checking again MIME name
  ----------------------------
  revision 1.1
  date: 2003/07/26 21:26:36;  author: shatty;  state: Exp;
  add character set support


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:23:33 +00:00
shatty
99ff9094c7 MOVED:
---------------------------------------------------------------------------
  RCS file: /cvsroot/open-beos/current/src/kits/support/CharacterSet.cpp,v
  Working file: CharacterSet.cpp
  head: 1.3
  branch:
  locks: strict
  access list:
  symbolic names:
  keyword substitution: kv
  total revisions: 3;     selected revisions: 3
  description:
  ----------------------------
  revision 1.3
  date: 2003/07/27 01:34:30;  author: shatty;  state: Exp;  lines: +11 -0
  added default constructor, which just happens to init to UTF-8.  do not count on this feature. :-)
  ----------------------------
  revision 1.2
  date: 2003/07/27 00:58:01;  author: shatty;  state: Exp;  lines: +4 -2
  added all the remaining R5 text encodings
  ----------------------------
  revision 1.1
  date: 2003/07/26 21:26:36;  author: shatty;  state: Exp;
  add character set support


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:22:14 +00:00
shatty
aa19d24552 MOVED:
---------------------------------------------------------------------------
  RCS file: /cvsroot/open-beos/current/src/kits/support/character_sets.cpp,v
  Working file: character_sets.cpp
  head: 1.4
  branch:
  locks: strict
  access list:
  symbolic names:
  keyword substitution: kv
  total revisions: 4;     selected revisions: 4
  description:
  ----------------------------
  revision 1.4
  date: 2003/08/13 05:38:07;  author: shatty;  state: Exp;  lines: +9 -0
  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.
  ----------------------------
  revision 1.3
  date: 2003/07/31 04:56:56;  author: shatty;  state: Exp;  lines: +4 -6
  fixed the 14th encoding, which is not FIXED japanese but rather JIS0208, yay!
  ----------------------------
  revision 1.2
  date: 2003/07/27 00:58:01;  author: shatty;  state: Exp;  lines: +105 -370
  added all the remaining R5 text encodings
  ----------------------------
  revision 1.1
  date: 2003/07/26 21:27:13;  author: shatty;  state: Exp;
  initialize global character set array


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:20:46 +00:00
shatty
e01bf9460e MOVED:
-----------------------------------------------------------------------------
  RCS file: /cvsroot/open-beos/current/src/kits/support/character_sets.h,v
  Working file: character_sets.h
  head: 1.1
  branch:
  locks: strict
  access list:
  symbolic names:
  keyword substitution: kv
  total revisions: 1;	selected revisions: 1
  description:
  ----------------------------
  revision 1.1
  date: 2003/07/26 21:27:13;  author: shatty;  state: Exp;
  initialize global character set array


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:18:51 +00:00
shatty
60178a5e1f IANA information on character sets
http://www.iana.org/assignments/character-sets


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-30 03:16:10 +00:00