History log of /haiku/src/kits/translation/TranslatorRoster.cpp
Revision Date Author Comments
# 0d1f89e1 05-Aug-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

TranslatorRoster: avoid a deadlock when launching BeLive

If be_app is not running yet, trying to lock it may easily end up in a
deadlock.

Fixes #2105

However, as a result of this, when this situation happens, the
translator roster will not be node monitoring added/removed translators.
This was already the case if BTranslatorRoster::Default was called
before BApplication constructor, now it's also the case if called inside
the BApplication constructor or from another thread before it finished
running.

Maybe BTranslatorRoster should try to register itself later on if it
detects this. But it's acceptable to have the app not monitor
translators, because adding and removing translators isn't a very common
occurence and restarting the app to get it to notice them is probably
ok.


# 62c7ec5c 23-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

Fix various instances of -Wset-but-unused.

Largely no functional change; most of these are just
removing the unused variables.


# be741f6e 13-Nov-2015 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup of translator roster commit, updated copyright.


# a1eccae9 08-Nov-2015 Markus Himmel <markus@himmel-villmar.de>

Make sure images containing BTranslators are not unloaded early

When a translator is uninstalled, BTranslatorPrivate::_RemoveTranslators is
called. This method used to unload the image containing the translator after
calling Release() on it resulting in several problems:

- If the translator was still busy, e.g. translating something while being
installed, it crashed since the image was unloaded even though its refcount
was larger than 0.
- Applications using code from one of the translators (e.g. its config view)
would crash when the translator is uninstalled (this is bug #12005).

This problem is now fixed. The roster keeps track of all translators whose
image it manages (even if the translator was already removed from the roster).
It also keeps a refcount to all images. When a translator's refcount drops to
zero and it belonged to a roster at some point, it does not delete itself, but
notifies the roster that it is ready to destruct, which then removes it from
the roster if the translator is still in it, destroys the translator, decrements
the refcount of the image and if the new refcount is zero, unloads the image.
All of this is done in a message handler, since if the translator called
TranslatorDeleted like before, the unloaded image would be referenced when
the stack is walked up.

Finally, the DataTranslations preflet is required to Acquire() the translator
whose config view it is showing, because otherwise its refcount could be reduced
to 0 and the image unloaded. BTranslatorRoster now enables users to acquire a
translator by ID. By the time the translator has to be released, it might not
be part of the roster anymore though. Since BTranslatorRoster tries not to give
out raw pointers to the translators it manages, users who acquire a translator
through a roster now are given a BTranslatorReleaseDelegate, which allows for
releasing the BTranslator exactly once and then self-destructs.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>


# 3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 4b7e2196 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# f99c6783 15-Aug-2009 Rene Gollent <anevilyak@gmail.com>

Skip directories when trying to find translators. This prevents the syslog from showing runtime_loader errors about trouble reading ELF headers on a hybrid build, as it would try to call load_add_on() on the subdir entry itself too.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6f2961ff 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added awareness for running with a non-native ABI (hybrid build). In this case
we test for a respective subdirectory for any translators path added and use
that instead, if existing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30859 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d69c4f6a 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed BeOS support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd8ff8aa 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Yummy, more style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30856 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9cfff5f 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30855 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c7bf264 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The 'extern "C"' was missing for the C function replacement of the Version()
method. Rather reintroduced the method (private) instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fac7960 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* fix gcc4 warning
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18cd67c7 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d618ee 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed wrong usage of Seek(). The return type is off_t, not status_t. It only
worked because (status_t)B_OK == (off_t)0.
* The translator_id version of Translate() does a (probably unnecessary?)
Identify(), but then forgets to seek the source BPositionIO back to 0
before calling translator's Translate(). This was the reason for none of
the WonderBrush Translation Kit export formats to work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b202f4e 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe
headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5abf416f 06-May-2008 Jérôme Duval <korli@users.berlios.de>

B_SAFEMODE_DISABLE_USER_ADD_ONS is also a safe mode we now honor in translation kit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25332 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe1885f2 01-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed a stupid copy&paste bug; one version of Translate() did not lock the private
translator handle - and therefore ran into a debugger call. Was triggered by
WonderBrush's export function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 618b37dc 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed various incorrect uses of the erase() method of several STL containers I introduced before. Thanks to Stefano for the hint!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21332 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df004988 05-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

ioExtension can of course be NULL...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20579 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 580d7b04 05-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

No longer let translators overwrite the ioExtension message when they aren't
the chosen one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 252f4767 12-Dec-2006 Ryan Leavengood <leavengood@gmail.com>

Added some needed stdio.h includes. I don't know what magic was used to compile
these for other people, but they wouldn't compile for me when building the
app_server test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19479 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 225a60f1 12-Sep-2006 Jérôme Duval <korli@users.berlios.de>

only load user addons when not in safe mode
fixes bug #842


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00363f80 27-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Can now be compiled again under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0bc48fb 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17515 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1826d5c8 01-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Node monitoring didn't work correctly, as the directories were not remembered
accidently.
* Additionally, B_ENTRY_MOVED worked not correctly, as the entry_ref for the
new entry was built upon the wrong node_ref.
* The default translator now also makes sure that the default system paths
exist. This helps node monitoring as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17291 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29dfc8d3 30-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

The BTranslatorRoster now locks the looper before it adds/removes it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17281 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 783f7f20 29-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented support for node monitoring - you can now be notified when new
translators are installed via BTranslatorRoster::StartWatching().
* Fixed GetTranslatorData() - some hooks are only optional (this puts the
JPEG, GIF, and some other translators back into the game).
* Made BTranslatorRoster::Default() thread-safe.
* Improved documentation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50823fe5 28-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a couple of bugs that prevented it from working as it should - dunno
how this didn't show up earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f90e4543 27-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* More or less rewrote BTranslatorRoster - it now has a private implementation
class, and only wraps around that one.
* Translating is no longer serialized, you can translate more than one object
at a time now.
* A BTranslator that is released (ie. deleted) will no longer let its BTranslatorRoster
crash.
* Removed BTranslatorRoster::Version() - this kind of call definitely makes no
sense at all. It's still exported from the sources, though, for backwards
compatibility.
* Simplified and improved code.
* Images are now unloaded only once.
* Added new method IsTranslator() that will be used by the DataTranslations preferences
application.
* Began implementing new methods StartWatching()/StopWatching() that will notify
you if new translators are installed or old ones removed (this will also be used
by DataTranslations once it's ready).
* The private BTranslatorRoster class will now add itself to the existing BApplication,
in order to provide automatic updating of the translators if needed (not yet implemented
though).
* Not heavily tested yet, there might be some regressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4821468 12-Feb-2005 Matthew Wilber <mwilber@nowhere.fake>

Moved FuncTranslator.h to private headers, moved #include <FuncTranslator.h> from TranslatorRoster.h to TranslatorRoster.cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfb8c585 05-Feb-2005 Matthew Wilber <mwilber@nowhere.fake>

Updated with new Translation Kit version macro names.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11257 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 969d8167 04-Jan-2005 Matthew Wilber <mwilber@nowhere.fake>

Removed silly PPMTranslator hack because it caused issues with the Haiku RTF-Translator and it really never should have been added in the first place.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a689e076 24-Oct-2004 Matthew Wilber <mwilber@nowhere.fake>

"Fixed" BTranslatorRoster so that it no longer stores the list of translators backwards. This is the order that applications assume, so this must be done to prevent inconsistent behavior between the R5 translation kit and the Haiku version.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9490 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d796ec82 29-Feb-2004 Matthew Wilber <mwilber@nowhere.fake>

Updated for version macro name changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6799 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5b989f7 28-Feb-2004 Matthew Wilber <mwilber@nowhere.fake>

Changed to use version macros


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01a21f20 17-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed GetTranslators to return the list of output formats in the order of most capable to least capable instead of before, where the list's order was the reverse of the order in which the translators were loaded.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ac0c35 10-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Changed GetAllTranslators to generate the list of Translators in the same order they were read in (instead of the reverse). This should cause the list of Translators in the DataTranslations pref and in Save As submenus to be in the same order as when using Be's version of the Translation Kit. Also changed the Translation Kit version string calculations to match those for the Translators. So, for R5, the version string becomes "Translation Kit v5.0.0" instead of "Translation Kit v12.8.0", which is what Be's version does, but doesn't appear right because it doesn't match the calculations the Translators use.. Note that the version number is still the same, only how it appears in the string is different.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6007 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6aabb5c 10-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed AddTranslator to behave like Be's version: Translators passed to the function are added even if they are already in the list.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b5dd3bc 08-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed LoadTranslator so that Translators won't be added to the roster if there is already a Translator loaded that has the same filename. Now Translators in /system/add-ons/Translators will not be loaded if there are Translators with the same names in /home/config/add-ons/Translators.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5997 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 755ac174 11-Jan-2003 Matthew Wilber <mwilber@nowhere.fake>

Changes made due to renaming of R4xTranslator to FuncTranslator


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2410 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4eaaa86 17-Oct-2002 Matthew Wilber <mwilber@nowhere.fake>

fixed spelling issue and changed casting from C-style to new C++ style


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 76bfea45 11-Sep-2002 Matthew Wilber <mwilber@nowhere.fake>

Fixed bug that caused programs to crash when the default BTranslatorRoster is deleted, then the default BTranslatorRoster is used again


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1015 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11e94630 13-Aug-2002 Matthew Wilber <mwilber@nowhere.fake>

made sure that when Translator add-on symbols are missing from the add-on they default to a NULL value


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3aeed6607cd07762c0e709633c012b3a632dbad9 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 4b7e219688450694efc9d1890f83f816758c16d3 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# f99c6783a31233c5c5bed90f4a62af6d1707f6c0 15-Aug-2009 Rene Gollent <anevilyak@gmail.com>

Skip directories when trying to find translators. This prevents the syslog from showing runtime_loader errors about trouble reading ELF headers on a hybrid build, as it would try to call load_add_on() on the subdir entry itself too.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6f2961ffab0af380ae03ee3be7cec0c4d6e86179 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added awareness for running with a non-native ABI (hybrid build). In this case
we test for a respective subdirectory for any translators path added and use
that instead, if existing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30859 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d69c4f6aa9dc87fe3762f534c1b3870df5f96f3c 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed BeOS support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd8ff8aa9fd9e90df254e3a38ccbeb6c26e35199 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Yummy, more style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30856 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9cfff5fc2be6134bcc901fc3f17641308e893d8 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30855 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c7bf264f50885b9aef730ab16eec8ce499a9bf5 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The 'extern "C"' was missing for the C function replacement of the Version()
method. Rather reintroduced the method (private) instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fac79601ed8a0e2e89ee357e652e52412375fc4 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* fix gcc4 warning
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18cd67c76072f825c4a7ba58414771d47fd1bfa2 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d618eebca7e8f1d9bcf89c4c4af0e834c5c765 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed wrong usage of Seek(). The return type is off_t, not status_t. It only
worked because (status_t)B_OK == (off_t)0.
* The translator_id version of Translate() does a (probably unnecessary?)
Identify(), but then forgets to seek the source BPositionIO back to 0
before calling translator's Translate(). This was the reason for none of
the WonderBrush Translation Kit export formats to work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b202f4e3da73d4c131355fcd82b792d153f84f6 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe
headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5abf416fd065e97c7fb9213b20cb19ca2944b62d 06-May-2008 Jérôme Duval <korli@users.berlios.de>

B_SAFEMODE_DISABLE_USER_ADD_ONS is also a safe mode we now honor in translation kit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25332 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe1885f2838f26d2126f9e3287c826db39e0b7e9 01-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed a stupid copy&paste bug; one version of Translate() did not lock the private
translator handle - and therefore ran into a debugger call. Was triggered by
WonderBrush's export function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 618b37dc4654dc94fd00d7ce6e0474c445633152 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed various incorrect uses of the erase() method of several STL containers I introduced before. Thanks to Stefano for the hint!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21332 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df004988d85daa41daa331f4eae5d28e6c350751 05-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

ioExtension can of course be NULL...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20579 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 580d7b0441ce0e60494ad4033125ab381f09d79b 05-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

No longer let translators overwrite the ioExtension message when they aren't
the chosen one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 252f4767828ef4564f9fcedca981234e26e7bd32 12-Dec-2006 Ryan Leavengood <leavengood@gmail.com>

Added some needed stdio.h includes. I don't know what magic was used to compile
these for other people, but they wouldn't compile for me when building the
app_server test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19479 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 225a60f1674de0f17dea02bcfa8e22c876b7b9c5 12-Sep-2006 Jérôme Duval <korli@users.berlios.de>

only load user addons when not in safe mode
fixes bug #842


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00363f807cb5630ee4c2a5101e39fd0ce33e3658 27-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Can now be compiled again under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0bc48fbd360f10cee1856e03393c63dcbdd180f 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17515 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1826d5c8b27b175aca34be90bdfe0e32bc11cd2e 01-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Node monitoring didn't work correctly, as the directories were not remembered
accidently.
* Additionally, B_ENTRY_MOVED worked not correctly, as the entry_ref for the
new entry was built upon the wrong node_ref.
* The default translator now also makes sure that the default system paths
exist. This helps node monitoring as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17291 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29dfc8d391c7971c965a4b708a23d7d29e9a4ae5 30-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

The BTranslatorRoster now locks the looper before it adds/removes it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17281 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 783f7f20bda751a26ddaf65bd690676a43f8234e 29-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented support for node monitoring - you can now be notified when new
translators are installed via BTranslatorRoster::StartWatching().
* Fixed GetTranslatorData() - some hooks are only optional (this puts the
JPEG, GIF, and some other translators back into the game).
* Made BTranslatorRoster::Default() thread-safe.
* Improved documentation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50823fe5c55c85c162a552f49971bce71f0dbc24 28-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a couple of bugs that prevented it from working as it should - dunno
how this didn't show up earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f90e454336acede69d40a108df3a4634cfd5a984 27-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* More or less rewrote BTranslatorRoster - it now has a private implementation
class, and only wraps around that one.
* Translating is no longer serialized, you can translate more than one object
at a time now.
* A BTranslator that is released (ie. deleted) will no longer let its BTranslatorRoster
crash.
* Removed BTranslatorRoster::Version() - this kind of call definitely makes no
sense at all. It's still exported from the sources, though, for backwards
compatibility.
* Simplified and improved code.
* Images are now unloaded only once.
* Added new method IsTranslator() that will be used by the DataTranslations preferences
application.
* Began implementing new methods StartWatching()/StopWatching() that will notify
you if new translators are installed or old ones removed (this will also be used
by DataTranslations once it's ready).
* The private BTranslatorRoster class will now add itself to the existing BApplication,
in order to provide automatic updating of the translators if needed (not yet implemented
though).
* Not heavily tested yet, there might be some regressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4821468d60bbd9a56ae30eb4f3097107a1f1a77 12-Feb-2005 Matthew Wilber <mwilber@nowhere.fake>

Moved FuncTranslator.h to private headers, moved #include <FuncTranslator.h> from TranslatorRoster.h to TranslatorRoster.cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfb8c585c62977839ef1b23d60b197227de81231 05-Feb-2005 Matthew Wilber <mwilber@nowhere.fake>

Updated with new Translation Kit version macro names.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11257 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 969d816792609300c32063a5ea2cbb6be66e16f1 04-Jan-2005 Matthew Wilber <mwilber@nowhere.fake>

Removed silly PPMTranslator hack because it caused issues with the Haiku RTF-Translator and it really never should have been added in the first place.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a689e076c376b803c55a6f5ba17c62fe56daa5cb 24-Oct-2004 Matthew Wilber <mwilber@nowhere.fake>

"Fixed" BTranslatorRoster so that it no longer stores the list of translators backwards. This is the order that applications assume, so this must be done to prevent inconsistent behavior between the R5 translation kit and the Haiku version.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9490 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d796ec827ae999581c99ed8b400132a0bd7cd3c5 29-Feb-2004 Matthew Wilber <mwilber@nowhere.fake>

Updated for version macro name changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6799 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5b989f7ffbaf2d209a5f1ce5c6e355ff5213f15 28-Feb-2004 Matthew Wilber <mwilber@nowhere.fake>

Changed to use version macros


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01a21f20276079a41df8242b3ed3d7342b15d31a 17-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed GetTranslators to return the list of output formats in the order of most capable to least capable instead of before, where the list's order was the reverse of the order in which the translators were loaded.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ac0c352313ee69c84cabc03c9c2f4415056d70 10-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Changed GetAllTranslators to generate the list of Translators in the same order they were read in (instead of the reverse). This should cause the list of Translators in the DataTranslations pref and in Save As submenus to be in the same order as when using Be's version of the Translation Kit. Also changed the Translation Kit version string calculations to match those for the Translators. So, for R5, the version string becomes "Translation Kit v5.0.0" instead of "Translation Kit v12.8.0", which is what Be's version does, but doesn't appear right because it doesn't match the calculations the Translators use.. Note that the version number is still the same, only how it appears in the string is different.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6007 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6aabb5c9505c6c6d08f1f6e29508e0d00ccef11 10-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed AddTranslator to behave like Be's version: Translators passed to the function are added even if they are already in the list.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b5dd3bc325350edf0d079e5fb81d9176b4f12f0 08-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed LoadTranslator so that Translators won't be added to the roster if there is already a Translator loaded that has the same filename. Now Translators in /system/add-ons/Translators will not be loaded if there are Translators with the same names in /home/config/add-ons/Translators.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5997 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 755ac1744b3882c6065c913554443ac6264bb5c1 11-Jan-2003 Matthew Wilber <mwilber@nowhere.fake>

Changes made due to renaming of R4xTranslator to FuncTranslator


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2410 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4eaaa86d5270ce80f4322da768094beffba1165 17-Oct-2002 Matthew Wilber <mwilber@nowhere.fake>

fixed spelling issue and changed casting from C-style to new C++ style


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 76bfea45a3d8033bc1ac1855fe7867e01d603642 11-Sep-2002 Matthew Wilber <mwilber@nowhere.fake>

Fixed bug that caused programs to crash when the default BTranslatorRoster is deleted, then the default BTranslatorRoster is used again


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1015 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11e946307aae0f178f61f6a95b27d93c2ee1e4ba 13-Aug-2002 Matthew Wilber <mwilber@nowhere.fake>

made sure that when Translator add-on symbols are missing from the add-on they default to a NULL value


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96