From zooey at mail.berlios.de Wed Jul 1 01:17:08 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 01:17:08 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam Message-ID: <200906302317.n5UNH89k032464@sheep.berlios.de> Author: zooey Date: 2009-07-01 01:17:04 +0200 (Wed, 01 Jul 2009) New Revision: 31345 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31345&view=rev Modified: haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules Log: * adjust AddSharedObjectGlueCode to allow for requests to not link against libsupc++.a, which is required by libsupc++.so and libstdc++.so Modified: haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-06-30 23:14:40 UTC (rev 31344) +++ haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-06-30 23:17:04 UTC (rev 31345) @@ -23,6 +23,11 @@ if $(DONT_LINK_AGAINST_LIBROOT) { stdLibs = ; } + # special case for libsupc++.so: don't link it against itself + if $(DONT_LINK_AGAINST_LIBSUPC++) = true { + endGlue + = [ FFilter $(endGlue) : $(HAIKU_STATIC_LIBSUPC++) ] ; + } } LINK_BEGIN_GLUE on $(1) = $(beginGlue) ; From zooey at mail.berlios.de Wed Jul 1 01:19:20 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 01:19:20 +0200 Subject: [Haiku-commits] r31346 - haiku/branches/features/32bit-wchar_t Message-ID: <200906302319.n5UNJKmO004575@sheep.berlios.de> Author: zooey Date: 2009-07-01 01:19:18 +0200 (Wed, 01 Jul 2009) New Revision: 31346 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31346&view=rev Modified: haiku/branches/features/32bit-wchar_t/configure Log: * no longer explicitly reset haikuSharedLibStdCxx and haikuSharedLibSupCxx, since we are now building them ourselves - the results that gcc gives for non-existing libs suits just fine Modified: haiku/branches/features/32bit-wchar_t/configure =================================================================== --- haiku/branches/features/32bit-wchar_t/configure 2009-06-30 23:17:04 UTC (rev 31345) +++ haiku/branches/features/32bit-wchar_t/configure 2009-06-30 23:19:18 UTC (rev 31346) @@ -180,15 +180,17 @@ if [ $haikuStaticLibStdCxx = libstdc++.a ]; then haikuStaticLibStdCxx= fi - if [ $haikuSharedLibStdCxx = libstdc++.so ]; then - haikuSharedLibStdCxx= - fi + # we build libstdc++.so ourselves, so we can leave it as is + # if [ $haikuSharedLibStdCxx = libstdc++.so ]; then + # haikuSharedLibStdCxx= + # fi if [ $haikuStaticLibSupCxx = libsupc++.a ]; then haikuStaticLibSupCxx= fi - if [ $haikuSharedLibSupCxx = libsupc++.so ]; then - haikuSharedLibSupCxx= - fi + # we build libsupc++.so ourselves, so we can leave it as is + # if [ $haikuSharedLibSupCxx = libsupc++.so ]; then + # haikuSharedLibSupCxx= + # fi ;; 2.9*) # check for correct (most up-to-date) legacy compiler and complain From zooey at mail.berlios.de Wed Jul 1 01:19:58 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 01:19:58 +0200 Subject: [Haiku-commits] r31347 - haiku/branches/features/32bit-wchar_t/build/jam Message-ID: <200906302319.n5UNJwKP005736@sheep.berlios.de> Author: zooey Date: 2009-07-01 01:19:56 +0200 (Wed, 01 Jul 2009) New Revision: 31347 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31347&view=rev Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages Log: * squashed TOO about libstdc++.so missing for gcc4-builds Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-06-30 23:19:18 UTC (rev 31346) +++ haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-06-30 23:19:56 UTC (rev 31347) @@ -267,16 +267,6 @@ : ../tools/current/include/g++ : cpp ; } - if $(HAIKU_GCC_VERSION[1]) = 4 { - # symlink to libstdc++.so - # TODO: This needs to be solved differently! I.e. the build system - # (configure) should already produce libstdc++.so. - AddSymlinkToHaikuImage system lib - : /boot/develop/abi/x86/gcc4/tools/current/lib/libstdc++.so ; - AddSymlinkToAlternativeGCCArchive system lib gcc4 - : /boot/develop/abi/x86/gcc4/tools/current/lib/libstdc++.so ; - } - # other commonly used tools local baseURL = http://haiku-files.org/files/optional-packages ; InstallOptionalHaikuImagePackage bison-2.4-gcc2-2008-11-09 From zooey at mail.berlios.de Wed Jul 1 01:21:16 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 01:21:16 +0200 Subject: [Haiku-commits] r31348 - haiku/branches/features/32bit-wchar_t/build/jam Message-ID: <200906302321.n5UNLGcB007517@sheep.berlios.de> Author: zooey Date: 2009-07-01 01:21:14 +0200 (Wed, 01 Jul 2009) New Revision: 31348 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31348&view=rev Modified: haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage Log: * adding libsupc++.so (which exists for gcc4 systems, only) to the image Modified: haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-06-30 23:19:56 UTC (rev 31347) +++ haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-06-30 23:21:14 UTC (rev 31348) @@ -83,7 +83,7 @@ libmail.so libtextencoding.so libz.so libfreetype.so libpng.so libmidi.so libmidi2.so libdevice.so libgame.so libscreensaver.so libroot.so libGL.so libfluidsynth.so liblpsolve55.so liblinprog.so libalm.so - libilmimf.so libiconv.so liblocale.so + libilmimf.so libiconv.so liblocale.so $(HAIKU_SHARED_LIBSUPC++) ; SYSTEM_SERVERS = registrar debug_server syslog_daemon media_server net_server media_addon_server input_server app_server fake_app_server From zooey at mail.berlios.de Wed Jul 1 01:28:57 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 01:28:57 +0200 Subject: [Haiku-commits] r31349 - in buildtools/branches/32bit-wchar_t: gcc/gcc/config legacy/gcc/gcc/config/i386 Message-ID: <200906302328.n5UNSvc5017989@sheep.berlios.de> Author: zooey Date: 2009-07-01 01:28:55 +0200 (Wed, 01 Jul 2009) New Revision: 31349 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31349&view=rev Modified: buildtools/branches/32bit-wchar_t/gcc/gcc/config/haiku.h buildtools/branches/32bit-wchar_t/legacy/gcc/gcc/config/i386/haiku.h Log: * added glibc folder to the default include paths Modified: buildtools/branches/32bit-wchar_t/gcc/gcc/config/haiku.h =================================================================== --- buildtools/branches/32bit-wchar_t/gcc/gcc/config/haiku.h 2009-06-30 23:21:14 UTC (rev 31348) +++ buildtools/branches/32bit-wchar_t/gcc/gcc/config/haiku.h 2009-06-30 23:28:55 UTC (rev 31349) @@ -112,9 +112,10 @@ { "/boot/develop/headers/os/be_apps/Deskbar", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers/os/be_apps/NetPositive", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers/os/be_apps/Tracker", 0, 0, 0, 0, 0 }, \ + { "/boot/develop/headers/cpp", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers/3rdparty", 0, 0, 0, 0, 0 }, \ - { "/boot/develop/headers/cpp", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers/bsd", 0, 0, 0, 0, 0 }, \ + { "/boot/develop/headers/glibc", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers/posix", 0, 0, 0, 0, 0 }, \ { "/boot/develop/headers", 0, 0, 0, 0, 0 }, \ { 0, 0, 0, 0, 0, 0 } \ @@ -153,9 +154,10 @@ { CROSS_INCLUDE_DIR "/os/be_apps/Deskbar", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR "/os/be_apps/NetPositive", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR "/os/be_apps/Tracker", 0, 0, 0, 1, 0 }, \ + { CROSS_INCLUDE_DIR "/cpp", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR "/3rdparty", 0, 0, 0, 1, 0 }, \ - { CROSS_INCLUDE_DIR "/cpp", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR "/bsd", 0, 0, 0, 1, 0 }, \ + { CROSS_INCLUDE_DIR "/glibc", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR "/posix", 0, 0, 0, 1, 0 }, \ { CROSS_INCLUDE_DIR , 0, 0, 0, 1, 0 }, \ { 0, 0, 0, 0, 0, 0 } \ Modified: buildtools/branches/32bit-wchar_t/legacy/gcc/gcc/config/i386/haiku.h =================================================================== --- buildtools/branches/32bit-wchar_t/legacy/gcc/gcc/config/i386/haiku.h 2009-06-30 23:21:14 UTC (rev 31348) +++ buildtools/branches/32bit-wchar_t/legacy/gcc/gcc/config/i386/haiku.h 2009-06-30 23:28:55 UTC (rev 31349) @@ -387,9 +387,10 @@ { "/boot/develop/headers/os/be_apps/Deskbar", 0, 0, 0 },\ { "/boot/develop/headers/os/be_apps/NetPositive", 0, 0, 0 },\ { "/boot/develop/headers/os/be_apps/Tracker", 0, 0, 0 },\ + { "/boot/develop/headers/cpp", 0, 0, 0 },\ { "/boot/develop/headers/3rdparty", 0, 0, 0 },\ { "/boot/develop/headers/bsd", 0, 0, 0 },\ - { "/boot/develop/headers/cpp", 0, 0, 0 },\ + { "/boot/develop/headers/glibc", 0, 0, 0 },\ { "/boot/develop/headers/posix", 0, 0, 0 },\ { "/boot/develop/headers", 0, 0, 0 }, \ { 0, 0, 0, 0 } \ @@ -425,9 +426,10 @@ { CROSS_INCLUDE_DIR "/os/be_apps/Deskbar", 0, 0, 0 },\ { CROSS_INCLUDE_DIR "/os/be_apps/NetPositive", 0, 0, 0 },\ { CROSS_INCLUDE_DIR "/os/be_apps/Tracker", 0, 0, 0 },\ + { CROSS_INCLUDE_DIR "/cpp", 0, 0, 0 },\ { CROSS_INCLUDE_DIR "/3rdparty", 0, 0, 0 },\ { CROSS_INCLUDE_DIR "/bsd", 0, 0, 0 },\ - { CROSS_INCLUDE_DIR "/cpp", 0, 0, 0 },\ + { CROSS_INCLUDE_DIR "/glibc", 0, 0, 0 },\ { CROSS_INCLUDE_DIR "/posix", 0, 0, 0 },\ { CROSS_INCLUDE_DIR , 0, 0, 0 }, \ { 0, 0, 0, 0 } \ From ingo_weinhold at gmx.de Wed Jul 1 02:36:04 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 01 Jul 2009 02:36:04 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <200906302317.n5UNH89k032464@sheep.berlios.de> References: <200906302317.n5UNH89k032464@sheep.berlios.de> Message-ID: <20090701003604.19760@gmx.net> -------- Original-Nachricht -------- > Datum: Wed, 1 Jul 2009 01:17:08 +0200 > Von: zooey at BerliOS > Author: zooey > Date: 2009-07-01 01:17:04 +0200 (Wed, 01 Jul 2009) > New Revision: 31345 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31345&view=rev > > Modified: > haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules > Log: > * adjust AddSharedObjectGlueCode to allow for requests to not link against > libsupc++.a, which is required by libsupc++.so and libstdc++.so > > > Modified: haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules > =================================================================== > --- > haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-06-30 23:14:40 UTC (rev 31344) > +++ > haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-06-30 23:17:04 UTC (rev 31345) > @@ -23,6 +23,11 @@ > if $(DONT_LINK_AGAINST_LIBROOT) { > stdLibs = ; > } > + # special case for libsupc++.so: don't link it against itself > + if $(DONT_LINK_AGAINST_LIBSUPC++) = true { > + endGlue > + = [ FFilter $(endGlue) : $(HAIKU_STATIC_LIBSUPC++) ] ; > + } > } > > LINK_BEGIN_GLUE on $(1) = $(beginGlue) ; Mmh, libsupc++ being in the end glue was mostly due to laziness (there's a TODO in BuildSetup). The better solution would be to add it explicitly to the libraries and executables that actually need it. I'm afraid that's tedious work no-one really wants to do, though. CU, Ingo From umccullough at gmail.com Wed Jul 1 02:43:37 2009 From: umccullough at gmail.com (Urias McCullough) Date: Tue, 30 Jun 2009 17:43:37 -0700 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090701003604.19760@gmx.net> References: <200906302317.n5UNH89k032464@sheep.berlios.de> <20090701003604.19760@gmx.net> Message-ID: <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> On Tue, Jun 30, 2009 at 5:36 PM, Ingo Weinhold wrote: > Mmh, libsupc++ being in the end glue was mostly due to laziness (there's a TODO in BuildSetup). The better solution would be to add it explicitly to the libraries and executables that actually need it. I'm afraid that's tedious work no-one really wants to do, though. Sounds like the kind of menial grunt-work someone could be doing when they have nothing better to do ;) Best way to go about the process of finding and fixing these? - Urias From zooey at mail.berlios.de Wed Jul 1 10:14:55 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 10:14:55 +0200 Subject: [Haiku-commits] r31350 - haiku/branches/features/32bit-wchar_t/data/system/boot Message-ID: <200907010814.n618Etbu009189@sheep.berlios.de> Author: zooey Date: 2009-07-01 10:14:54 +0200 (Wed, 01 Jul 2009) New Revision: 31350 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31350&view=rev Modified: haiku/branches/features/32bit-wchar_t/data/system/boot/SetupEnvironment Log: * updated BEINCLUDES to contain the 'glibc' include path and removed the non-existing 'be/precompiled' Modified: haiku/branches/features/32bit-wchar_t/data/system/boot/SetupEnvironment =================================================================== --- haiku/branches/features/32bit-wchar_t/data/system/boot/SetupEnvironment 2009-06-30 23:28:55 UTC (rev 31349) +++ haiku/branches/features/32bit-wchar_t/data/system/boot/SetupEnvironment 2009-07-01 08:14:54 UTC (rev 31350) @@ -24,7 +24,7 @@ BELIBRARIES="$BUILDHOME/abi/current/library-paths/common:$BUILDHOME/lib/$BE_HOST_CPU" BH=$BUILDHOME/headers -BEINCLUDES="$BH;$BH/be;$BH/be/precompiled;$BH/be/bone;$BH/posix;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/Deskbar;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker" +BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/Deskbar;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker" export BUILDHOME export BETOOLS From zooey at mail.berlios.de Wed Jul 1 10:17:35 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 10:17:35 +0200 Subject: [Haiku-commits] r31351 - in haiku/branches/features/32bit-wchar_t: build/jam headers/glibc src/system/libroot/posix/glibc/stdio-common Message-ID: <200907010817.n618HZCp009630@sheep.berlios.de> Author: zooey Date: 2009-07-01 10:17:34 +0200 (Wed, 01 Jul 2009) New Revision: 31351 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31351&view=rev Added: haiku/branches/features/32bit-wchar_t/headers/glibc/printf.h Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages haiku/branches/features/32bit-wchar_t/src/system/libroot/posix/glibc/stdio-common/Jamfile Log: * added new glibc-specific header printf.h and added printf_size.c to the build, in order to complete the support for printf_fp * adjusted 'DevelopmentMin' package to create the new include path 'glibc' to the image and copy _G_config.h and printf.h there Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-07-01 08:14:54 UTC (rev 31350) +++ haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-07-01 08:17:34 UTC (rev 31351) @@ -354,13 +354,10 @@ # headers AddHeaderDirectoryToHaikuImage gnu : 3rdparty ; + AddHeaderDirectoryToHaikuImage glibc ; AddHeaderDirectoryToHaikuImage os ; AddHeaderDirectoryToHaikuImage posix ; - # add _G_config.h to posix/ - SEARCH on
_G_config.h = [ FDirName $(HAIKU_TOP) headers glibc ] ; - AddFilesToHaikuImage develop headers posix :
_G_config.h ; - # create be -> os symlink for now AddSymlinkToHaikuImage develop headers : os : be ; Added: haiku/branches/features/32bit-wchar_t/headers/glibc/printf.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/glibc/printf.h 2009-07-01 08:14:54 UTC (rev 31350) +++ haiku/branches/features/32bit-wchar_t/headers/glibc/printf.h 2009-07-01 08:17:34 UTC (rev 31351) @@ -0,0 +1,145 @@ +/* Copyright (C) 1991-1993,1995-1999,2000,2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _PRINTF_H + +#define _PRINTF_H 1 +#include + +__BEGIN_DECLS + +#define __need_FILE +#include +#define __need_size_t +#define __need_wchar_t +#include + + +struct printf_info +{ + int prec; /* Precision. */ + int width; /* Width. */ + wchar_t spec; /* Format letter. */ + unsigned int is_long_double:1;/* L flag. */ + unsigned int is_short:1; /* h flag. */ + unsigned int is_long:1; /* l flag. */ + unsigned int alt:1; /* # flag. */ + unsigned int space:1; /* Space flag. */ + unsigned int left:1; /* - flag. */ + unsigned int showsign:1; /* + flag. */ + unsigned int group:1; /* ' flag. */ + unsigned int extra:1; /* For special use. */ + unsigned int is_char:1; /* hh flag. */ + unsigned int wide:1; /* Nonzero for wide character streams. */ + unsigned int i18n:1; /* I flag. */ + wchar_t pad; /* Padding character. */ +}; + + +/* Type of a printf specifier-handler function. + STREAM is the FILE on which to write output. + INFO gives information about the format specification. + ARGS is a vector of pointers to the argument data; + the number of pointers will be the number returned + by the associated arginfo function for the same INFO. + + The function should return the number of characters written, + or -1 for errors. */ + +typedef int printf_function (FILE *__stream, + __const struct printf_info *__info, + __const void *__const *__args); + +/* Type of a printf specifier-arginfo function. + INFO gives information about the format specification. + N, ARGTYPES, and return value are as for parse_printf_format. */ + +typedef int printf_arginfo_function (__const struct printf_info *__info, + size_t __n, int *__argtypes); + + +/* Register FUNC to be called to format SPEC specifiers; ARGINFO must be + specified to determine how many arguments a SPEC conversion requires and + what their types are. */ + +extern int register_printf_function (int __spec, printf_function __func, + printf_arginfo_function __arginfo); + + +/* Parse FMT, and fill in N elements of ARGTYPES with the + types needed for the conversions FMT specifies. Returns + the number of arguments required by FMT. + + The ARGINFO function registered with a user-defined format is passed a + `struct printf_info' describing the format spec being parsed. A width + or precision of INT_MIN means a `*' was used to indicate that the + width/precision will come from an arg. The function should fill in the + array it is passed with the types of the arguments it wants, and return + the number of arguments it wants. */ + +extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n, + int *__restrict __argtypes) __THROW; + + +/* Codes returned by `parse_printf_format' for basic types. + + These values cover all the standard format specifications. + Users can add new values after PA_LAST for their own types. */ + +enum +{ /* C type: */ + PA_INT, /* int */ + PA_CHAR, /* int, cast to char */ + PA_WCHAR, /* wide char */ + PA_STRING, /* const char *, a '\0'-terminated string */ + PA_WSTRING, /* const wchar_t *, wide character string */ + PA_POINTER, /* void * */ + PA_FLOAT, /* float */ + PA_DOUBLE, /* double */ + PA_LAST +}; + +/* Flag bits that can be set in a type returned by `parse_printf_format'. */ +#define PA_FLAG_MASK 0xff00 +#define PA_FLAG_LONG_LONG (1 << 8) +#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG +#define PA_FLAG_LONG (1 << 9) +#define PA_FLAG_SHORT (1 << 10) +#define PA_FLAG_PTR (1 << 11) + + + +/* Function which can be registered as `printf'-handlers. */ + +/* Print floating point value using using abbreviations for the orders + of magnitude used for numbers ('k' for kilo, 'm' for mega etc). If + the format specifier is a uppercase character powers of 1000 are + used. Otherwise powers of 1024. */ +extern int printf_size (FILE *__restrict __fp, + __const struct printf_info *__info, + __const void *__const *__restrict __args) __THROW; + +/* This is the appropriate argument information function for `printf_size'. */ +extern int printf_size_info (__const struct printf_info *__restrict + __info, size_t __n, int *__restrict __argtypes) + __THROW; + + +__END_DECLS + +#endif /* printf.h */ Modified: haiku/branches/features/32bit-wchar_t/src/system/libroot/posix/glibc/stdio-common/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/system/libroot/posix/glibc/stdio-common/Jamfile 2009-07-01 08:14:54 UTC (rev 31350) +++ haiku/branches/features/32bit-wchar_t/src/system/libroot/posix/glibc/stdio-common/Jamfile 2009-07-01 08:17:34 UTC (rev 31351) @@ -30,7 +30,7 @@ printf.c printf_fp.c printf_fphex.c -# printf_size.c + printf_size.c putw.c reg-printf.c scanf.c From zooey at hirschkaefer.de Wed Jul 1 10:22:18 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Wed, 01 Jul 2009 10:22:18 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> References: <200906302317.n5UNH89k032464@sheep.berlios.de> <20090701003604.19760@gmx.net> <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> Message-ID: <20090701102218.2458.9@bepc.1246350430.fake> On 2009-07-01 at 02:43:37 [+0200], Urias McCullough wrote: > On Tue, Jun 30, 2009 at 5:36 PM, Ingo Weinhold wrote: > > Mmh, libsupc++ being in the end glue was mostly due to laziness (there's a > > TODO in BuildSetup). The better solution would be to add it explicitly to > > the libraries and executables that actually need it. I'm afraid that's > > tedious work no-one really wants to do, though. > > Sounds like the kind of menial grunt-work someone could be doing when > they have nothing better to do ;) > > Best way to go about the process of finding and fixing these? I'm on it - trying to build, adding $(HAIKU_SHARED_LIBSUPC++) wherever it is missing, only libroot.so will have to use $(HAIKU_STATIC_LIBSUPC++). I'm not fed up yet - but it's only 10:21 in the morning ;-) cheers, Oliver From zooey at mail.berlios.de Wed Jul 1 11:26:13 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 11:26:13 +0200 Subject: [Haiku-commits] r31352 - in haiku/branches/components/gsoc-locale-kit: headers/private/locale src/add-ons/locale/catalogs/plaintext src/bin/locale src/kits/locale Message-ID: <200907010926.n619QDvw018227@sheep.berlios.de> Author: zooey Date: 2009-07-01 11:26:12 +0200 (Wed, 01 Jul 2009) New Revision: 31352 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31352&view=rev Modified: haiku/branches/components/gsoc-locale-kit/headers/private/locale/HashMapCatalog.h haiku/branches/components/gsoc-locale-kit/src/add-ons/locale/catalogs/plaintext/Catalog.cpp haiku/branches/components/gsoc-locale-kit/src/bin/locale/dumpcatalog.cpp haiku/branches/components/gsoc-locale-kit/src/kits/locale/DefaultCatalog.cpp Log: applying patch by Adrien: * use uint32 instead of size_t for the hash value and be consistent about the use as unsigned * insert strings, context and comment when reading from file to be more robust against hash collisions Modified: haiku/branches/components/gsoc-locale-kit/headers/private/locale/HashMapCatalog.h =================================================================== --- haiku/branches/components/gsoc-locale-kit/headers/private/locale/HashMapCatalog.h 2009-07-01 08:17:34 UTC (rev 31351) +++ haiku/branches/components/gsoc-locale-kit/headers/private/locale/HashMapCatalog.h 2009-07-01 09:26:12 UTC (rev 31352) @@ -37,7 +37,7 @@ // A comment that can be used to separate strings that // are identical otherwise in the native language, but different in the // translation (useful for the translator) - size_t fHashVal; + uint32 fHashVal; // the hash-value of the key, computed from the three strings uint32 fFlags; // with respect to the catalog-editor, each translation can be @@ -50,7 +50,7 @@ bool operator== (const CatKey& right) const; status_t GetStringParts(BString* str, BString* ctx, BString* cmt) const; - static size_t HashFun(const char* s, int startvalue=0); + static uint32 HashFun(const char* s, int startvalue=0); // The hash function is called 3 times, cumulating the 3 strings to calculate the key }; Modified: haiku/branches/components/gsoc-locale-kit/src/add-ons/locale/catalogs/plaintext/Catalog.cpp =================================================================== --- haiku/branches/components/gsoc-locale-kit/src/add-ons/locale/catalogs/plaintext/Catalog.cpp 2009-07-01 08:17:34 UTC (rev 31351) +++ haiku/branches/components/gsoc-locale-kit/src/add-ons/locale/catalogs/plaintext/Catalog.cpp 2009-07-01 09:26:12 UTC (rev 31352) @@ -277,11 +277,12 @@ } // We could do that : - // setstring(originalString, translated, context, comment); - // But we already have the key, and we have to make sure it does not - // change. - SetString(key, translated.c_str()); - log_team(LOG_DEBUG, "Added string %s (key %d) from file %s", + // SetString(key, translated.c_str()); + // but we want to keep the strings in the new catkey. Hash collisions + // happen, you know. (and CatKey::== will fail) + SetString(originalString.c_str(), translated.c_str(), context.c_str(), + comment.c_str()); + log_team(LOG_DEBUG, "Added string %s (key %u) from file %s", originalString.c_str(), key, path); } Modified: haiku/branches/components/gsoc-locale-kit/src/bin/locale/dumpcatalog.cpp =================================================================== --- haiku/branches/components/gsoc-locale-kit/src/bin/locale/dumpcatalog.cpp 2009-07-01 08:17:34 UTC (rev 31351) +++ haiku/branches/components/gsoc-locale-kit/src/bin/locale/dumpcatalog.cpp 2009-07-01 09:26:12 UTC (rev 31352) @@ -57,8 +57,8 @@ while (!walker.AtEnd()) { const CatKey &key(walker.GetKey()); key.GetStringParts(&str, &ctx, &cmt); - printf("Hash:\t\t%ld\nKey:\t\t<%s:%s:%s>\nTranslation:\t%s\n-----\n", - key.fHashVal, str.String(), ctx.String(), cmt.String(), + printf("Hash:\t\t%lu\nKey:\t\t<%s:%s:%s>\nTranslation:\t%s\n-----\n", + key.fHashVal, str.String(), ctx.String(), cmt.String(), walker.GetValue()); walker.Next(); } Modified: haiku/branches/components/gsoc-locale-kit/src/kits/locale/DefaultCatalog.cpp =================================================================== --- haiku/branches/components/gsoc-locale-kit/src/kits/locale/DefaultCatalog.cpp 2009-07-01 08:17:34 UTC (rev 31351) +++ haiku/branches/components/gsoc-locale-kit/src/kits/locale/DefaultCatalog.cpp 2009-07-01 09:26:12 UTC (rev 31352) @@ -309,7 +309,7 @@ return res; BMallocIO mallocIO; - mallocIO.SetBlockSize(max(fCatMap.size()*20, 256UL)); + mallocIO.SetBlockSize(max(fCatMap.size()*20, 256U)); // set a largish block-size in order to avoid reallocs res = Flatten(&mallocIO); if (res == B_OK) { @@ -342,7 +342,7 @@ return res; BMallocIO mallocIO; - mallocIO.SetBlockSize(max(fCatMap.size()*20, 256UL)); + mallocIO.SetBlockSize(max(fCatMap.size()*20, 256U)); // set a largish block-size in order to avoid reallocs res = Flatten(&mallocIO); @@ -373,7 +373,7 @@ return res; BMallocIO mallocIO; - mallocIO.SetBlockSize(max(fCatMap.size()*20, 256UL)); + mallocIO.SetBlockSize(max(fCatMap.size()*20, 256U)); // set a largish block-size in order to avoid reallocs res = Flatten(&mallocIO); From ingo_weinhold at gmx.de Wed Jul 1 13:05:25 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 01 Jul 2009 13:05:25 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090701102218.2458.9@bepc.1246350430.fake> References: <200906302317.n5UNH89k032464@sheep.berlios.de> <20090701003604.19760@gmx.net> <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> <20090701102218.2458.9@bepc.1246350430.fake> Message-ID: <20090701130525.480.2@knochen-vm.localdomain> On 2009-07-01 at 10:22:18 [+0200], Oliver Tappe wrote: > On 2009-07-01 at 02:43:37 [+0200], Urias McCullough > wrote: > > On Tue, Jun 30, 2009 at 5:36 PM, Ingo Weinhold > > wrote: > > > Mmh, libsupc++ being in the end glue was mostly due to laziness > > > (there's a > > > TODO in BuildSetup). The better solution would be to add it explicitly > > > to > > > the libraries and executables that actually need it. I'm afraid that's > > > tedious work no-one really wants to do, though. > > > > Sounds like the kind of menial grunt-work someone could be doing when > > they have nothing better to do ;) > > > > Best way to go about the process of finding and fixing these? > > I'm on it - trying to build, adding $(HAIKU_SHARED_LIBSUPC++) wherever it is > missing, only libroot.so will have to use $(HAIKU_STATIC_LIBSUPC++). > > I'm not fed up yet - but it's only 10:21 in the morning ;-) Oh, I hope you're not too shocked to hear that I thought of a relatively easy solution that would avoid this work: The C++ rule could mark the respective object that it is C++ and the MainFromObjects rule would add $(HAIKU_SHARED_LIBSUPC++), if any is. That would still require special handling for libroot and libsupc++.so itself, though. Anyway, I suppose you're already through with the changes by now? CU, Ingo From zooey at hirschkaefer.de Wed Jul 1 14:19:56 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Wed, 01 Jul 2009 14:19:56 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090701130525.480.2@knochen-vm.localdomain> References: <200906302317.n5UNH89k032464@sheep.berlios.de> <20090701003604.19760@gmx.net> <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> <20090701102218.2458.9@bepc.1246350430.fake> <20090701130525.480.2@knochen-vm.localdomain> Message-ID: <20090701141956.2721.11@bepc.1246350430.fake> On 2009-07-01 at 13:05:25 [+0200], Ingo Weinhold wrote: > On 2009-07-01 at 10:22:18 [+0200], Oliver Tappe wrote: [ ... ] > > I'm on it - trying to build, adding $(HAIKU_SHARED_LIBSUPC++) wherever it is > > missing, only libroot.so will have to use $(HAIKU_STATIC_LIBSUPC++). > > > > I'm not fed up yet - but it's only 10:21 in the morning ;-) > > Oh, I hope you're not too shocked to hear that I thought of a relatively easy > solution that would avoid this work: The C++ rule could mark the respective > object that it is C++ and the MainFromObjects rule would add > $(HAIKU_SHARED_LIBSUPC++), if any is. That would still require special > handling for libroot and libsupc++.so itself, though. Anyway, I suppose > you're already through with the changes by now? Yes, and it wasn't too bad after all ;-) Here are some effects: | gcc2 | gcc4-static | gcc4-shared ------------------------------------------------------ mem-usage | 85 MB | 78 MB | 77 MB (about system) | | | ------------------------------------------------------ /system size | 88 MB | 104 MB | 86 MB (du -hs) | | | All measurements were done on vmware images with no optional packages (but a set of wchar-related tests). cheers, Oliver From zooey at mail.berlios.de Wed Jul 1 14:38:30 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 14:38:30 +0200 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/devices/wacom src/add-ons/input_server/filters/screen_saver src/add-ons/input_server/methods/canna src/add-ons/mail_daemon/inbound_filters/match_header src/add-ons/mail_daemon/inbound_filters/r5_filter src/add-ons/mail_daemon/inbound_filters/spam_filter src/add-ons/mail_daemon/inbound_protocols/imap src/add-ons/mail_daemon/inbound_protocols/pop3 src/add-ons/mail_daemon/outbound_filters/fortune src/add-ons/mail_daemon/system_filters/inbox src/add-ons/mail_daemon/system_filters/notifier src/add-ons/mail_daemon/system_filters/outbox src/add-ons/mail_daemon/system_filters/parser src/add-ons/media/media-add-ons/dvb src/add-ons/media/media-add-ons/firewire_dv src/add-ons/media/media-add-ons/mixer src/add-ons/media/media-add-ons/multi_audio src/add-o! ns/media/media-add-ons/opensound src/add-ons/media/media-add-ons/tone_producer_demo src/add-ons/media/media-add-ons/usb_webcam src/add-ons/media/media-add-ons/video_producer_demo src/add-ons/media/media-add-ons/videowindow src/add-ons/media/plugins/aiff_reader src/add-ons/media/plugins/ape_reader src/add-ons/media/plugins/au_reader src/add-ons/media/plugins/avcodec src/add-ons/media/plugins/mp3_decoder src/add-ons/media/plugins/mp3_reader src/add-ons/media/plugins/musepack src/add-ons/media/plugins/raw_decoder src/add-ons/media/plugins/speex src/add-ons/media/plugins/vorbis src/add-ons/media/plugins/wav_reader src/add-ons/opengl/mesa_software_renderer src/add-ons/print/drivers/pdf/source src/add-ons/print/transports/hp_jetdirect src/add-ons/print/transports/parallel_port src/add-ons/print/transports/print_to_file src/add-ons/print/transports/serial_port src/add-ons/print/transports/usb_port src/add-ons/screen_savers/debugnow src/add-ons/screen_savers/flurry src/add-ons/scre! en_savers/haiku src/add-ons/screen_savers/ifs src/add-ons/scre! en_saver Message-ID: <200907011238.n61CcU1r019189@sheep.berlios.de> Author: zooey Date: 2009-07-01 14:38:16 +0200 (Wed, 01 Jul 2009) New Revision: 31353 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31353&view=rev Modified: haiku/branches/features/32bit-wchar_t/build/jam/BuildSetup haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/bfs/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/keyboard/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/mouse/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/wacom/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/filters/screen_saver/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/methods/canna/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/match_header/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/r5_filter/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/spam_filter/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/imap/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/pop3/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/outbound_filters/fortune/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/inbox/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/notifier/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/outbox/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/parser/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/dvb/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/mixer/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/multi_audio/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/opensound/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/tone_producer_demo/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/usb_webcam/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/video_producer_demo/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/videowindow/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/aiff_reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ape_reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/au_reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/avcodec/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_decoder/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/musepack/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/raw_decoder/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/speex/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/vorbis/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/wav_reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/opengl/mesa_software_renderer/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/hp_jetdirect/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/parallel_port/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/print_to_file/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/serial_port/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/usb_port/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/debugnow/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/flurry/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/haiku/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/ifs/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/message/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/spider/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/opentargetfolder/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/zipomatic/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/bmp/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/gif/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/jpeg2000/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/pcx/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/png/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ppm/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/raw/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/rtf/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/sgi/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/stxt/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tga/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tiff/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/wonderbrush/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/bootman/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/bsnow/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/charactermap/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/clock/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/AudioAdapter/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/Flanger/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/deskbar/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/diskprobe/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/expander/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/fontdemo/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/glteapot/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/gradients/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/launchbox/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/magnify/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/mandelbrot/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/midiplayer/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/networkstatus/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/packageinstaller/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/people/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/powerstatus/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/processcontroller/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/pulse/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/screenshot/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/showimage/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/stylededit/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/terminal/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/text_search/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/tv/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/workspaces/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/desklink/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/keymap/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/locale/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/makebootable/platform/bios_ia32/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/makebootable/platform/pxe_ia32/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/network/mount_nfs/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/playsound/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/screen_blanker/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/screenmode/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/unrar/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/vim/src/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/debug/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/device/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/game/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/media/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/midi/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/midi2/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/network/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/network/libnetapi/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/screensaver/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/textencoding/Jamfile haiku/branches/features/32bit-wchar_t/src/libs/alm/Jamfile haiku/branches/features/32bit-wchar_t/src/libs/linprog/Jamfile haiku/branches/features/32bit-wchar_t/src/libs/stdc++/current/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/backgrounds/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/cpufrequency/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/datatranslations/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/filetypes/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/fonts/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/keyboard/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/locale/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/mail/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/media/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/mouse/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/network/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/print/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/screen/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/sounds/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/time/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/touchpad/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/cddb_daemon/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/media_addon/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/midi/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/print/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/syslog_daemon/Jamfile haiku/branches/features/32bit-wchar_t/src/system/libroot/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/apps/fake_app_server/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/game/chart/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/net/tcptester/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/opengl/direct_mode/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/playground/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/system/consoled/Jamfile Log: squash another TODO: * instead of implicitly linking everything against libsupc++.a (on gcc4), every executable, library and add-on that requires it must request that explicitly now (by specifying $(TARGET_LIBSUPC++) in the link libraries This works, but only for items currently in the image - I will work on the remaining targets next Modified: haiku/branches/features/32bit-wchar_t/build/jam/BuildSetup =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/BuildSetup 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/build/jam/BuildSetup 2009-07-01 12:38:16 UTC (rev 31353) @@ -394,8 +394,6 @@ init_term_dyn.o ; HAIKU_LIBRARY_END_GLUE_CODE = - # TODO: For the time being always link against libsupc++.a. - $(HAIKU_STATIC_LIBSUPC++) crtend.o crtn.o ; @@ -434,6 +432,7 @@ HAIKU_LIBRARY_NAME_MAP_$(i) = lib$(i).so ; } HAIKU_LIBRARY_NAME_MAP_libstdc++ = $(HAIKU_LIBSTDC++) ; + HAIKU_LIBRARY_NAME_MAP_libsupc++ = $(HAIKU_LIBSUPC++) ; HAIKU_LIBRARY_NAME_MAP_input_server = input_server ; } Modified: haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/build/jam/MainBuildRules 2009-07-01 12:38:16 UTC (rev 31353) @@ -23,11 +23,6 @@ if $(DONT_LINK_AGAINST_LIBROOT) { stdLibs = ; } - # special case for libsupc++.so: don't link it against itself - if $(DONT_LINK_AGAINST_LIBSUPC++) = true { - endGlue - = [ FFilter $(endGlue) : $(HAIKU_STATIC_LIBSUPC++) ] ; - } } LINK_BEGIN_GLUE on $(1) = $(beginGlue) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/bfs/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/bfs/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/bfs/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,5 +10,5 @@ bfs_disk_system.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -20,5 +20,5 @@ # kernel sources PartitionMap.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/keyboard/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/keyboard/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/keyboard/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -12,7 +12,7 @@ TeamMonitorWindow.cpp TeamListItem.cpp - : input_server be ; + : input_server be $(TARGET_LIBSUPC++) ; Package haiku-inputkit-cvs : keyboard : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/mouse/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/mouse/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/mouse/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,7 +6,7 @@ Addon mouse : MouseInputDevice.cpp - : be input_server ; + : be input_server $(TARGET_LIBSUPC++) ; Package haiku-inputkit-cvs : mouse : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/wacom/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/wacom/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/devices/wacom/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ PointingDevice.cpp PointingDeviceFactory.cpp TabletDevice.cpp - : be input_server ; + : be input_server $(TARGET_LIBSUPC++) ; Package haiku-inputkit-cvs : tablet : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/filters/screen_saver/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/filters/screen_saver/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/filters/screen_saver/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,7 +6,7 @@ Addon screen_saver : ScreenSaverFilter.cpp - : be libscreensaver.so input_server ; + : be libscreensaver.so input_server $(TARGET_LIBSUPC++) ; Package haiku-screensaverkit-cvs : screen_saver : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/methods/canna/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/methods/canna/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/input_server/methods/canna/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -17,7 +17,7 @@ CannaMethod.cpp KouhoWindow.cpp PaletteWindow.cpp - : be textencoding input_server libcanna.a librk.a ; + : be textencoding input_server libcanna.a librk.a $(TARGET_LIBSUPC++) ; Package haiku-cannaIM-cvs : canna : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/match_header/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/match_header/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/match_header/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -17,7 +17,7 @@ StringMatcher.cpp ; LinkAgainst Match\ Header : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Match\ Header : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/r5_filter/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/r5_filter/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/r5_filter/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -15,7 +15,7 @@ filter.cpp ; LinkAgainst R5\ Daemon\ Filter : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : R5\ Daemon\ Filter : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/spam_filter/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/spam_filter/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_filters/spam_filter/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -16,7 +16,7 @@ SpamFilter.cpp ; LinkAgainst Spam\ Filter : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Spam\ Filter : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/imap/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/imap/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/imap/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -31,7 +31,8 @@ Addon IMAP : $(sources) - : be libmail.so $(TARGET_NETWORK_LIBS) $(HAIKU_OPENSSL_LIBS) + : be libmail.so $(TARGET_NETWORK_LIBS) $(HAIKU_OPENSSL_LIBS) + $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/pop3/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/pop3/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/inbound_protocols/pop3/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -33,6 +33,7 @@ Addon POP3 : $(sources) : be libmail.so $(TARGET_NETWORK_LIBS) $(HAIKU_OPENSSL_LIBS) + $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/outbound_filters/fortune/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/outbound_filters/fortune/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/outbound_filters/fortune/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -16,7 +16,7 @@ filter.cpp ; LinkAgainst Fortune : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Fortune : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/inbox/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/inbox/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/inbox/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -15,7 +15,7 @@ filter.cpp ; LinkAgainst Inbox : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Inbox : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/notifier/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/notifier/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/notifier/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -15,7 +15,7 @@ filter.cpp ConfigView.cpp ; LinkAgainst New\ Mail\ Notification : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : New\ Mail\ Notification : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/outbox/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/outbox/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/outbox/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -15,7 +15,7 @@ filter.cpp ; LinkAgainst Outbox : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Outbox : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/parser/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/parser/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/mail_daemon/system_filters/parser/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -15,7 +15,7 @@ filter.cpp ; LinkAgainst Message\ Parser : - be libmail.so ; + be libmail.so $(TARGET_LIBSUPC++) ; Package haiku-maildaemon-cvs : Message\ Parser : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/dvb/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/dvb/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/dvb/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -12,5 +12,5 @@ PacketQueue.cpp pes.cpp TransportStreamDemux.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,5 +10,5 @@ FireWireCard.cpp FireWireDVAddOn.cpp FireWireDVNode.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/mixer/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/mixer/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/mixer/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -12,7 +12,7 @@ MixerSettings.cpp MixerUtils.cpp Resampler.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Package haiku-mixer-cvs Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/multi_audio/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/multi_audio/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/multi_audio/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -13,7 +13,7 @@ MultiAudioDevice.cpp MultiAudioNode.cpp MultiAudioUtility.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Package haiku-multi_audio-cvs Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/opensound/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/opensound/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/opensound/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -14,7 +14,7 @@ OpenSoundDeviceEngine.cpp OpenSoundDeviceMixer.cpp OpenSoundNode.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Package haiku-opensound-cvs Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/tone_producer_demo/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/tone_producer_demo/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/tone_producer_demo/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -3,5 +3,5 @@ Addon tone_producer_demo.media_addon : ToneProducerAddOn.cpp ToneProducer.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/usb_webcam/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/usb_webcam/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/usb_webcam/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -81,7 +81,7 @@ CamRoster.cpp CamSensor.cpp CamStreamingDeframer.cpp - : be media $(usbKitLibraryName) + : be media $(usbKitLibraryName) $(TARGET_LIBSUPC++) ; # force dependancies Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/video_producer_demo/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/video_producer_demo/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/video_producer_demo/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -3,5 +3,5 @@ Addon video_producer_demo.media_addon : AddOn.cpp Producer.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/videowindow/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/videowindow/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/videowindow/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -5,5 +5,5 @@ VideoNode.cpp VideoView.cpp VideoWindow.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/aiff_reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/aiff_reader/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/aiff_reader/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,4 +6,4 @@ Addon aiff_reader : aiff_reader.cpp - : be libmedia.so ; + : be libmedia.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ape_reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ape_reader/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ape_reader/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -9,7 +9,7 @@ Addon ape_reader : APEReader.cpp - : libMonkeysAudio.a MAClib.a be libmedia.so + : libMonkeysAudio.a MAClib.a be libmedia.so $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins ape_reader LibMonkeysAudio ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/au_reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/au_reader/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/au_reader/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,5 +6,5 @@ Addon au_reader : au_reader.cpp - : be libmedia.so + : be libmedia.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/avcodec/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/avcodec/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/avcodec/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -23,6 +23,7 @@ be libmedia.so libz.a + $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins avcodec libavcodec ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_decoder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_decoder/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_decoder/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -12,6 +12,7 @@ libmpglib.a be libmedia.so + $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins mp3_decoder mpglib ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_reader/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/mp3_reader/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,5 +6,5 @@ Addon mp3_reader : MP3ReaderPlugin.cpp - : be libmedia.so + : be libmedia.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/musepack/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/musepack/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/musepack/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ MusePack.cpp MusePackReader.cpp MusePackDecoder.cpp - : libmusepack.a be libmedia.so + : libmusepack.a be libmedia.so $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins musepack mpc ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/raw_decoder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/raw_decoder/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/raw_decoder/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,6 +7,6 @@ Addon raw_decoder : AudioConversion.cpp RawDecoderPlugin.cpp - : be libmedia.so + : be libmedia.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/speex/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/speex/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/speex/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -11,7 +11,7 @@ Addon speex : speexCodecPlugin.cpp speexCodecDefaults.cpp - : libspeex.a be libmedia.so + : libspeex.a be libmedia.so $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins speex libspeex ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/vorbis/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/vorbis/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/vorbis/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ Addon vorbis : vorbisCodecPlugin.cpp - : libvorbis.a libogg.a be libmedia.so + : libvorbis.a libogg.a be libmedia.so $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins vorbis libvorbis ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/wav_reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/wav_reader/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/wav_reader/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,5 +6,5 @@ Addon wav_reader : WavReaderPlugin.cpp - : be libmedia.so + : be libmedia.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/opengl/mesa_software_renderer/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/opengl/mesa_software_renderer/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/opengl/mesa_software_renderer/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -36,7 +36,7 @@ Addon Mesa\ Software\ Renderer : MesaSoftwareRenderer.cpp - : libGL.so libmesa.a be + : libGL.so libmesa.a be $(TARGET_LIBSUPC++) ; Package haiku-opengl-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -49,6 +49,7 @@ libpdf.a libprint.a libprintutils.a + $(TARGET_LIBSUPC++) ; Package haiku-pdf_writer-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/hp_jetdirect/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/hp_jetdirect/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/hp_jetdirect/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -8,7 +8,7 @@ print_transport.cpp HPJetDirectTransport.cpp SetupWindow.cpp - : be $(TARGET_NETAPI_LIB) + : be $(TARGET_NETAPI_LIB) $(TARGET_LIBSUPC++) ; Package haiku-printingkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/parallel_port/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/parallel_port/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/parallel_port/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,7 +7,7 @@ Addon Parallel\ Port : ParallelTransport.cpp - : be libprintutils.a + : be libprintutils.a $(TARGET_LIBSUPC++) ; Package haiku-printingkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/print_to_file/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/print_to_file/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/print_to_file/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -8,7 +8,7 @@ Addon Print\ To\ File : print_transport.cpp FileSelector.cpp - : be tracker + : be tracker $(TARGET_LIBSUPC++) ; Package haiku-printingkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/serial_port/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/serial_port/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/serial_port/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,7 +7,7 @@ Addon Serial\ Port : SerialTransport.cpp - : be libprintutils.a + : be libprintutils.a $(TARGET_LIBSUPC++) ; Package haiku-printingkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/usb_port/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/usb_port/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/print/transports/usb_port/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,7 +7,7 @@ Addon USB\ Port : USBTransport.cpp - : be libprintutils.a + : be libprintutils.a $(TARGET_LIBSUPC++) ; Package haiku-printingkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/debugnow/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/debugnow/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/debugnow/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -4,7 +4,7 @@ ScreenSaver DebugNow : DebugNow.cpp : - be libscreensaver.so ; + be libscreensaver.so $(TARGET_LIBSUPC++) ; Package haiku-screensaverkit-cvs : DebugNow : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/flurry/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/flurry/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/flurry/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -8,6 +8,6 @@ Spark.cpp Star.cpp Texture.cpp - : be screensaver GL libshared.a + : be screensaver GL libshared.a $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/haiku/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/haiku/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/haiku/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -4,7 +4,7 @@ Addon Haiku : ScreenSaver.cpp - : be screensaver + : be screensaver $(TARGET_LIBSUPC++) ; Package haiku-screensaverkit-cvs : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/ifs/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/ifs/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/ifs/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,6 +6,6 @@ IFS.cpp IFSSaver.cpp - : be libscreensaver.so + : be libscreensaver.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/message/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/message/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/message/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,7 +7,7 @@ ScreenSaver Message : Message.cpp : - be libscreensaver.so ; + be libscreensaver.so $(TARGET_LIBSUPC++) ; Package haiku-screensaverkit-cvs : Message : Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/spider/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/spider/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/spider/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -7,6 +7,6 @@ PolygonQueue.cpp SpiderSaver.cpp - : be libscreensaver.so + : be libscreensaver.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/opentargetfolder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/opentargetfolder/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/opentargetfolder/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -3,6 +3,6 @@ Application Open\ Target\ Folder-T : opentargetfolder.cpp - : be tracker + : be tracker $(TARGET_LIBSUPC++) : opentargetfolder.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/zipomatic/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/zipomatic/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/tracker/zipomatic/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,6 +10,6 @@ ZipOMaticWindow.cpp ZipperThread.cpp - : be tracker + : be tracker $(TARGET_LIBSUPC++) : ZipOMatic.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/bmp/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/bmp/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/bmp/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -9,7 +9,7 @@ BMPTranslator.cpp BMPView.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/gif/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/gif/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/gif/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -16,7 +16,7 @@ SavePalette.cpp SFHash.cpp : - be translation + be translation $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/jpeg2000/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/jpeg2000/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/jpeg2000/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -66,7 +66,7 @@ $(jasper_files) - : be translation + : be translation $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/pcx/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/pcx/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/pcx/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ PCXTranslator.cpp ConfigView.cpp PCX.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/png/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/png/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/png/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ PNGTranslator.cpp PNGView.cpp - : be translation libpng.a z libtranslatorsutils.a + : be translation libpng.a z libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ppm/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ppm/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ppm/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -4,7 +4,7 @@ Translator PPMTranslator : PPMMain.cpp PPMTranslator.cpp colorspace.cpp - : be translation + : be translation $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/raw/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/raw/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/raw/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ RAWTranslator.cpp ConfigView.cpp RAW.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/rtf/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/rtf/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/rtf/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -17,7 +17,7 @@ ConfigView.cpp RTF.cpp convert.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/sgi/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/sgi/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/sgi/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,7 +10,7 @@ SGITranslator.cpp SGIView.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/stxt/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/stxt/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/stxt/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -12,7 +12,8 @@ STXTMain.cpp STXTTranslator.cpp STXTView.cpp - : be translation libtextencoding.so libtranslatorsutils.a + : be translation libtextencoding.so libtranslatorsutils.a + $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tga/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tga/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tga/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -8,7 +8,7 @@ TGAMain.cpp TGATranslator.cpp TGAView.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tiff/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tiff/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/tiff/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -54,7 +54,7 @@ TIFFTranslator.cpp TIFFView.cpp - : be translation z libtranslatorsutils.a + : be translation z libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/wonderbrush/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/wonderbrush/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/wonderbrush/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -21,7 +21,7 @@ blending.cpp lab_convert.cpp - : be translation z libtranslatorsutils.a + : be translation z libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/bootman/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/bootman/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/bootman/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -18,6 +18,6 @@ WizardController.cpp WizardPageView.cpp WizardView.cpp - : be tracker + : be tracker $(TARGET_LIBSUPC++) : bootman.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/bsnow/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/bsnow/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/bsnow/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,6 +6,6 @@ Flakes.cpp SnowView.cpp SnowApp.cpp - : be + : be $(TARGET_LIBSUPC++) : BSnow.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/charactermap/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/charactermap/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/charactermap/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -11,6 +11,6 @@ UnicodeBlocks.cpp UnicodeBlockView.cpp - : be + : be $(TARGET_LIBSUPC++) : CharacterMap.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/clock/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/clock/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/clock/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -6,6 +6,6 @@ cl_view.cpp cl_wind.cpp clock.cpp - : be + : be $(TARGET_LIBSUPC++) : Clock.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/AudioAdapter/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/AudioAdapter/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/AudioAdapter/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -21,5 +21,5 @@ RawBuffer.cpp SoundUtils.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/Flanger/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/Flanger/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/Flanger/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -10,6 +10,6 @@ MediaNodeControlApp.cpp RawBuffer.cpp SoundUtils.cpp - : be media + : be media $(TARGET_LIBSUPC++) : Resource.rsrc ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/deskbar/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/deskbar/Jamfile 2009-07-01 09:26:12 UTC (rev 31352) +++ haiku/branches/features/32bit-wchar_t/src/apps/deskbar/Jamfile 2009-07-01 12:38:16 UTC (rev 31353) @@ -44,5 +44,5 @@ [... truncated: 1119 lines follow ...] From ingo_weinhold at gmx.de Wed Jul 1 15:02:01 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 01 Jul 2009 15:02:01 +0200 Subject: [Haiku-commits] r31345 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090701141956.2721.11@bepc.1246350430.fake> References: <200906302317.n5UNH89k032464@sheep.berlios.de> <20090701003604.19760@gmx.net> <1e80d8750906301743q7a01d439m3513cf3e4226ee2@mail.gmail.com> <20090701102218.2458.9@bepc.1246350430.fake> <20090701130525.480.2@knochen-vm.localdomain> <20090701141956.2721.11@bepc.1246350430.fake> Message-ID: <20090701150201.353.1@knochen-vm.localdomain> On 2009-07-01 at 14:19:56 [+0200], Oliver Tappe wrote: > > On 2009-07-01 at 13:05:25 [+0200], Ingo Weinhold > wrote: > > On 2009-07-01 at 10:22:18 [+0200], Oliver Tappe > > wrote: > [ ... ] > > > I'm on it - trying to build, adding $(HAIKU_SHARED_LIBSUPC++) wherever > > > it is > > > missing, only libroot.so will have to use $(HAIKU_STATIC_LIBSUPC++). > > > > > > I'm not fed up yet - but it's only 10:21 in the morning ;-) > > > > Oh, I hope you're not too shocked to hear that I thought of a relatively > > easy > > solution that would avoid this work: The C++ rule could mark the > > respective > > object that it is C++ and the MainFromObjects rule would add > > $(HAIKU_SHARED_LIBSUPC++), if any is. That would still require special > > handling for libroot and libsupc++.so itself, though. Anyway, I suppose > > you're already through with the changes by now? > > Yes, and it wasn't too bad after all ;-) Great, thanks a lot! > Here are some effects: > > | gcc2 | gcc4-static | gcc4-shared > ------------------------------------------------------ > mem-usage | 85 MB | 78 MB | 77 MB > (about system) | | | > ------------------------------------------------------ > /system size | 88 MB | 104 MB | 86 MB > (du -hs) | | | > > > All measurements were done on vmware images with no optional packages (but a > set of wchar-related tests). Nice! CU, Ingo From bonefish at mail.berlios.de Wed Jul 1 15:11:31 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Wed, 1 Jul 2009 15:11:31 +0200 Subject: [Haiku-commits] r31354 - haiku/trunk/headers/os/support Message-ID: <200907011311.n61DBVTp024009@sheep.berlios.de> Author: bonefish Date: 2009-07-01 15:11:30 +0200 (Wed, 01 Jul 2009) New Revision: 31354 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31354&view=rev Modified: haiku/trunk/headers/os/support/String.h Log: Added (const char*) cast operator. That makes BString more convenient to pass around, particularly returning it from methods instead of a const char*, if the object stores the string as a BString anyway, thus leveraging CoW. Modified: haiku/trunk/headers/os/support/String.h =================================================================== --- haiku/trunk/headers/os/support/String.h 2009-07-01 12:38:16 UTC (rev 31353) +++ haiku/trunk/headers/os/support/String.h 2009-07-01 13:11:30 UTC (rev 31354) @@ -113,6 +113,8 @@ bool operator>(const char* string) const; bool operator!=(const char* string) const; + operator const char*() const; + // strcmp()-style compare functions int Compare(const BString& string) const; int Compare(const char* string) const; @@ -423,6 +425,13 @@ } +inline +BString::operator const char*() const +{ + return String(); +} + + inline bool operator<(const char *str, const BString &string) { From joe.prostko+haiku at gmail.com Wed Jul 1 15:34:01 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Wed, 1 Jul 2009 09:34:01 -0400 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev Message-ID: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> On Wed, Jul 1, 2009 at 8:38 AM, zooey at BerliOS wrote: > Author: zooey > Date: 2009-07-01 14:38:16 +0200 (Wed, 01 Jul 2009) > New Revision: 31353 Hi, I've been using your work-in-progress branches and encountered some problems. I will paste the errors, and then a diff below that that addresses them. I haven't tried with 4.3.3 yet, but I applied all of your changes to the GCC 4.4.1-pre I am working with currently. Link /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/bin/bt_discovery /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/bin/bt_discovery.o: In function `DumpInfo(Bluetooth::LocalDevice*)': bt_discovery.cpp:(.text+0x113): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/bin/bt_discovery.o:(.data.rel.ro._ZTI11BObjectListIN9Bluetooth12RemoteDeviceEE[typeinfo for BObjectList]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' collect2: ld returned 1 exit status Link /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/Bluetooth /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/BluetoothDeviceView.o: In function `BluetoothDeviceView::BluetoothDeviceView(BRect, Bluetooth::BluetoothDevice*, unsigned long, unsigned long)': BluetoothDeviceView.cpp:(.text+0x715): undefined reference to `operator new(unsigned long)' BluetoothDeviceView.cpp:(.text+0x759): undefined reference to `operator new(unsigned long)' BluetoothDeviceView.cpp:(.text+0x7de): undefined reference to `operator new(unsigned long)' BluetoothDeviceView.cpp:(.text+0x813): undefined reference to `operator new(unsigned long)' BluetoothDeviceView.cpp:(.text+0x85e): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/BluetoothDeviceView.o:BluetoothDeviceView.cpp:(.text+0x8a9): more undefined references to `operator new(unsigned long)' follow /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/InquiryPanel.o:(.data.rel.ro._ZTI11BObjectListIN9Bluetooth12RemoteDeviceEE[typeinfo for BObjectList]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/RemoteDevicesView.o: In function `RemoteDevicesView::MessageReceived(BMessage*)': RemoteDevicesView.cpp:(.text+0x7b): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/RemoteDevicesView.o: In function `RemoteDevicesView::RemoteDevicesView(char const*, unsigned long)': RemoteDevicesView.cpp:(.text+0x349): undefined reference to `operator new(unsigned long)' RemoteDevicesView.cpp:(.text+0x3ca): undefined reference to `operator new(unsigned long)' RemoteDevicesView.cpp:(.text+0x44b): undefined reference to `operator new(unsigned long)' RemoteDevicesView.cpp:(.text+0x4cc): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/preferences/bluetooth/RemoteDevicesView.o:RemoteDevicesView.cpp:(.text+0x54d): more undefined references to `operator new(unsigned long)' follow collect2: ld returned 1 exit status Link /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/add-ons/media/plugins/ac3_decoder/ac3_decoder /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/add-ons/media/plugins/ac3_decoder/ac3_decoder.o: In function `instantiate_plugin': ac3_decoder.cpp:(.text+0x136): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/add-ons/media/plugins/ac3_decoder/ac3_decoder.o: In function `AC3DecoderPlugin::NewDecoder(unsigned int)': ac3_decoder.cpp:(.text+0xd5f): undefined reference to `operator new(unsigned long)' /home/joe/haiku/trunk/generated-gcc-4.4.1/objects/haiku/x86/release/add-ons/media/plugins/ac3_decoder/ac3_decoder.o:(.data.rel.ro._ZTIN8BPrivate5media13DecoderPluginE[typeinfo for BPrivate::media::DecoderPlugin]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' collect2: ld returned 1 exit status Here's the diff text: Index: src/bin/Jamfile =================================================================== --- src/bin/Jamfile (revision 31353) +++ src/bin/Jamfile (working copy) @@ -171,7 +171,7 @@ StdBinCommands bt_discovery.cpp - : be libbluetooth.so : $(haiku-utils_rsrc) ; + : be libbluetooth.so $(TARGET_LIBSUPC++) : $(haiku-utils_rsrc) ; # standard commands that need libbe.so, libtracker.so Index: src/preferences/bluetooth/Jamfile =================================================================== --- src/preferences/bluetooth/Jamfile (revision 31353) +++ src/preferences/bluetooth/Jamfile (working copy) @@ -13,6 +13,6 @@ ExtendedLocalDeviceView.cpp InquiryPanel.cpp RemoteDevicesView.cpp - : be libbluetooth.so + : be libbluetooth.so $(TARGET_LIBSUPC++) ; Index: src/add-ons/media/plugins/ac3_decoder/Jamfile =================================================================== --- src/add-ons/media/plugins/ac3_decoder/Jamfile (revision 31353) +++ src/add-ons/media/plugins/ac3_decoder/Jamfile (working copy) @@ -4,7 +4,7 @@ Addon ac3_decoder : ac3_decoder.cpp - : liba52.a be libmedia.so + : liba52.a be libmedia.so $(TARGET_LIBSUPC++) ; SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder liba52 ; From stippi at mail.berlios.de Wed Jul 1 16:46:21 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 16:46:21 +0200 Subject: [Haiku-commits] r31355 - in haiku/trunk/src/add-ons/media/plugins/avcodec: . libavcodec libavformat libavutil Message-ID: <200907011446.n61EkLg2005512@sheep.berlios.de> Author: stippi Date: 2009-07-01 16:45:20 +0200 (Wed, 01 Jul 2009) New Revision: 31355 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31355&view=rev Added: haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h haiku/trunk/src/add-ons/media/plugins/avcodec/config.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/4xm.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/Jamfile haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/Makefile haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/adtsenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/aiff.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/allformats.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/amr.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/apc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ape.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asf.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asf.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asfcrypt.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asfcrypt.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asfdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/asfenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/assdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/assenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/au.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/audiointerleave.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/audiointerleave.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avc.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avformat.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avi.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avidec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avienc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avio.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avio.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/aviobuf.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avisynth.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/avs.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/bethsoftvid.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/bfi.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/c93.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/crcenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/cutils.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/daud.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/dsicin.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/dv.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/dv.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/dvenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/dxa.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/eacdata.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/electronicarts.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ffm.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ffmdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ffmenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/file.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flacdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flacenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flacenc.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flic.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flv.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flvdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/flvenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/framecrcenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/framehook.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/framehook.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/gif.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/gopher.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/gxf.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/gxf.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/gxfenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/http.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/id3v2.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/id3v2.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/idcin.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/idroq.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/iff.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/img2.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/internal.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ipmovie.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/isom.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/isom.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/iss.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/libnut.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/lmlm4.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/matroska.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/matroska.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/matroskadec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/matroskaenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/metadata.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/metadata.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/metadata_compat.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mm.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mmf.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mov.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/movenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mp3.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpc8.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpeg.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpeg.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpegenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpegts.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpegts.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpegtsenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mpjpeg.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/msnwc_tcp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mtv.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mvi.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mxf.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mxf.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mxfdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/mxfenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ncdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/network.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nsvdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nut.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nut.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nutdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nutenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/nuv.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggdec.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggparseflac.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggparseogm.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggparsespeex.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggparsetheora.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oggparsevorbis.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/oma.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/options.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/os_support.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/os_support.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/psxstr.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/pva.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/qtpalette.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/r3d.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/raw.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/raw.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rdt.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rdt.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/riff.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/riff.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rl2.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rm.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rm.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rmdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rmenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rpl.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp_aac.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp_h264.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp_h264.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtp_mpv.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpdec.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpenc.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpenc_h264.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtpproto.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtsp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtsp.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/rtspcodes.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/sdp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/segafilm.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/sierravmd.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/siff.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/smacker.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/sol.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/swf.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/swfdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/swfenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/tcp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/thp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/tiertexseq.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/tta.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/txd.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/udp.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/utils.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/vc1test.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/vc1testenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/voc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/voc.h haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/vocdec.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/vocenc.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/wav.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/wc3movie.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/westwood.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/wv.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/xa.c haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/yuv4mpeg.c Removed: haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/config.h Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/libavutil/common.h Log: * Added libavformat. I would like to rename the plugin from "avcodec" to "ffmpeg" and export multiple plugin types from the same plugin (Decoder and Reader). * Work in progress on an libavformat based Reader plugin, does nothing yet. * Moved config.h from libavcodec subfolder up one level, so that it's used by libavformat as well. Adjusted libavutil/common.h accordingly. * Turned off GPL code in config.h * Turned off BeOS muxers in config.h * Turned on HAVE_THREADS and HAVE_PTHREADS, although that is nowhere used in the ffmpeg code (it appears). * Indentation cleanup in avcodecplugin.h I have built this with GCC4, but last night I built libavformat.a with GCC2 so I am hoping this doesn't break the GCC2 built. Added: haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp 2009-07-01 13:11:30 UTC (rev 31354) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp 2009-07-01 14:45:20 UTC (rev 31355) @@ -0,0 +1,235 @@ +/* + * Copyright 2009, Stephan A?mus + * All rights reserved. Distributed under the terms of the GNU L-GPL license. + */ + +#include "AVFormatReader.h" + +#include +#include +#include + +#include + +#include +#include +//#include +#include + +extern "C" { + #include "avformat.h" +} + +//#include "RawFormats.h" + + +//#define TRACE_AVFORMAT_READER +#ifdef TRACE_AVFORMAT_READER +# define TRACE printf +#else +# define TRACE(a...) +#endif + +#define ERROR(a...) fprintf(stderr, a) + + + +// #pragma mark - BPositionIO protocol + + +static int +position_io_open(URLContext* h, const char* filename, int flags) +{ + // always successful, priv_data is set elsewhere + return 0; +} + + +static int +position_io_read(URLContext* h, unsigned char* buffer, int size) +{ + BPositionIO* source = reinterpret_cast(h->priv_data); + return source->Read(buffer, size); +} + + +static int +position_io_write(URLContext* h, unsigned char* buffer, int size) +{ + BPositionIO* source = reinterpret_cast(h->priv_data); + return source->Write(buffer, size); +} + + +static int64_t +position_io_seek(URLContext *h, int64_t position, int whence) +{ + BPositionIO* source = reinterpret_cast(h->priv_data); + return source->Seek(position, whence); +} + + +static int +position_io_close(URLContext *h) +{ + // We do not close ourselves here. + return 0; +} + + +static URLProtocol position_io_protocol = { + "position_io", + position_io_open, + position_io_read, + position_io_write, + position_io_seek, + position_io_close +}; + + +void +avcodec_register_all() +{ + // av_register_all() will call libavcodec's avcodec_register_all(), + // but we do not link against libavcodec in this plugin. +} + + +static int +init_libavformat() +{ + av_register_all(); + return av_register_protocol(&position_io_protocol); +} + + +static int dummy = init_libavformat(); + + +// #pragma mark - AVFormatReader + + +AVFormatReader::AVFormatReader() + : + fContext(NULL) +{ + TRACE("AVFormatReader::AVFormatReader\n"); +} + + +AVFormatReader::~AVFormatReader() +{ + TRACE("AVFormatReader::~AVFormatReader\n"); + + // TODO: Deallocate fContext +} + + +// #pragma mark - + + +const char* +AVFormatReader::Copyright() +{ + // TODO: Return copyright of the file instead! + return "Copyright 2009, Stephan A?mus"; +} + + +status_t +AVFormatReader::Sniff(int32* streamCount) +{ + TRACE("AVFormatReader::Sniff\n"); + + return B_ERROR; +} + + +void +AVFormatReader::GetFileFormatInfo(media_file_format* mff) +{ + TRACE("AVFormatReader::GetFileFormatInfo\n"); + + mff->capabilities = media_file_format::B_READABLE + | media_file_format::B_KNOWS_ENCODED_VIDEO + | media_file_format::B_KNOWS_ENCODED_AUDIO + | media_file_format::B_IMPERFECTLY_SEEKABLE; + mff->family = B_MISC_FORMAT_FAMILY; + mff->version = 100; + strcpy(mff->mime_type, "video/mpg"); + strcpy(mff->file_extension, "mpg"); + strcpy(mff->short_name, "MPEG"); + strcpy(mff->pretty_name, "MPEG (Motion Picture Experts Group)"); +} + + +// #pragma mark - + + +status_t +AVFormatReader::AllocateCookie(int32 streamNumber, void** _cookie) +{ + TRACE("AVFormatReader::AllocateCookie(%ld)\n", streamNumber); + + return B_ERROR; +} + + +status_t +AVFormatReader::FreeCookie(void *_cookie) +{ + return B_ERROR; +} + + +// #pragma mark - + + +status_t +AVFormatReader::GetStreamInfo(void* _cookie, int64* frameCount, + bigtime_t* duration, media_format* format, const void** infoBuffer, + size_t* infoSize) +{ + return B_ERROR; +} + + +status_t +AVFormatReader::Seek(void* _cookie, uint32 seekTo, int64* frame, + bigtime_t* time) +{ + return B_ERROR; +} + + +status_t +AVFormatReader::FindKeyFrame(void* _cookie, uint32 flags, int64* frame, + bigtime_t* time) +{ + return B_ERROR; +} + + +status_t +AVFormatReader::GetNextChunk(void* _cookie, const void** chunkBuffer, + size_t* chunkSize, media_header* mediaHeader) +{ + return B_ERROR; +} + + +// #pragma mark - + + +Reader* +AVFormatPlugin::NewReader() +{ + return new(std::nothrow) AVFormatReader; +} + + +MediaPlugin* +instantiate_plugin() +{ + return new(std::nothrow) AVFormatPlugin; +} Added: haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h 2009-07-01 13:11:30 UTC (rev 31354) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h 2009-07-01 14:45:20 UTC (rev 31355) @@ -0,0 +1,56 @@ +/* + * Copyright 2009, Stephan A?mus + * All rights reserved. Distributed under the terms of the GNU L-GPL license. + */ +#ifndef AV_FORMAT_READER_H +#define AV_FORMAT_READER_H + + +#include "ReaderPlugin.h" + + +struct AVFormatContext; + + +class AVFormatReader : public Reader { +public: + AVFormatReader(); + ~AVFormatReader(); + + virtual const char* Copyright(); + + virtual status_t Sniff(int32* streamCount); + + virtual void GetFileFormatInfo(media_file_format* mff); + + virtual status_t AllocateCookie(int32 streamNumber, + void** cookie); + virtual status_t FreeCookie(void* cookie); + + virtual status_t GetStreamInfo(void* cookie, int64* frameCount, + bigtime_t* duration, media_format* format, + const void** infoBuffer, + size_t* infoSize); + + virtual status_t Seek(void* cookie, uint32 flags, int64* frame, + bigtime_t* time); + virtual status_t FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time); + + virtual status_t GetNextChunk(void* cookie, + const void** chunkBuffer, size_t* chunkSize, + media_header* mediaHeader); + +private: + AVFormatContext* fContext; +}; + + +class AVFormatPlugin : public ReaderPlugin { +public: + Reader* NewReader(); +}; + +MediaPlugin *instantiate_plugin(); + +#endif // AV_FORMAT_READER_H Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile 2009-07-01 13:11:30 UTC (rev 31354) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile 2009-07-01 14:45:20 UTC (rev 31355) @@ -5,6 +5,7 @@ UsePrivateHeaders media ; SubDirHdrs [ FDirName $(SUBDIR) libavcodec ] ; +SubDirHdrs [ FDirName $(SUBDIR) libavformat ] ; SubDirHdrs [ FDirName $(SUBDIR) libavutil ] ; SubDirHdrs [ FDirName $(SUBDIR) libswscale ] ; @@ -25,6 +26,17 @@ libz.a ; +Addon avformat : + AVFormatReader.cpp + : + libavformat.a + libavutil.a + be + libmedia.so + libz.a +; + SubInclude HAIKU_TOP src add-ons media plugins avcodec libavcodec ; +SubInclude HAIKU_TOP src add-ons media plugins avcodec libavformat ; SubInclude HAIKU_TOP src add-ons media plugins avcodec libavutil ; SubInclude HAIKU_TOP src add-ons media plugins avcodec libswscale ; Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h 2009-07-01 13:11:30 UTC (rev 31354) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h 2009-07-01 14:45:20 UTC (rev 31355) @@ -1,16 +1,14 @@ /* -** File avcodec.h -** -** libavcodec based decoder for OpenBeOS -** -** Copyright (C) 2001 Carlos Hasan. All Rights Reserved. -** Copyright (C) 2001 Fran?ois Revol. All Rights Reserved. -** Copyright (C) 2001 Axel D?rfler. All Rights Reserved. -** Copyright (C) 2004 Marcus Overhagen. All Rights Reserved. -** -** Distributed under the terms of the MIT License. -*/ + * Copyright (C) 2001 Carlos Hasan. All Rights Reserved. + * Copyright (C) 2001 Fran?ois Revol. All Rights Reserved. + * Copyright (C) 2001 Axel D?rfler. All Rights Reserved. + * Copyright (C) 2004 Marcus Overhagen. All Rights Reserved. + * + * Distributed under the terms of the MIT License. + */ +//! libavcodec based decoder for Haiku + #ifndef __AVCODEC_PLUGIN_H__ #define __AVCODEC_PLUGIN_H__ @@ -22,81 +20,91 @@ #include "gfx_util.h" -struct codec_table { CodecID id; media_type type; media_format_family family; uint64 fourcc; const char *prettyname;}; +struct codec_table { + CodecID id; + media_type type; + media_format_family family; + uint64 fourcc; + const char* prettyname; +}; extern const struct codec_table gCodecTable[]; extern const int num_codecs; extern media_format avcodec_formats[]; -class avCodec : public Decoder -{ - public: - avCodec(); +class avCodec : public Decoder { +public: + avCodec(); - virtual ~avCodec(); + virtual ~avCodec(); - virtual void GetCodecInfo(media_codec_info *mci); - - virtual status_t Setup(media_format *ioEncodedFormat, - const void *infoBuffer, size_t infoSize); - - virtual status_t NegotiateOutputFormat(media_format *output_format); - - virtual status_t Decode(void *out_buffer, int64 *out_frameCount, - media_header *mh, media_decode_info *info); + virtual void GetCodecInfo(media_codec_info* mci); - virtual status_t Seek(uint32 seekTo, int64 seekFrame, int64 *frame, - bigtime_t seekTime, bigtime_t *time); + virtual status_t Setup(media_format* ioEncodedFormat, + const void* infoBuffer, size_t infoSize); + + virtual status_t NegotiateOutputFormat( + media_format* outputFormat); + virtual status_t Decode(void* outBuffer, int64* outFrameCount, + media_header* mediaHeader, + media_decode_info* info); + + virtual status_t Seek(uint32 seekTo, int64 seekFrame, + int64* frame, bigtime_t seekTime, + bigtime_t* time); - protected: - media_header fHeader; - media_decode_info fInfo; - friend class avCodecInputStream; +protected: + media_header fHeader; + media_decode_info fInfo; + + friend class avCodecInputStream; - private: - media_format fInputFormat; - media_raw_video_format fOutputVideoFormat; +private: + media_format fInputFormat; + media_raw_video_format fOutputVideoFormat; - int64 fFrame; - bool isAudio; + int64 fFrame; + bool isAudio; - int ffcodec_index_in_table; // helps to find codecpretty + int ffcodec_index_in_table; + // helps to find codecpretty - // ffmpeg related datas - AVCodec *fCodec; - AVCodecContext *ffc; - AVFrame *ffpicture, *opicture; + // ffmpeg related datas + AVCodec* fCodec; + AVCodecContext* ffc; + AVFrame* ffpicture; + AVFrame* opicture; - bool fCodecInitDone; + bool fCodecInitDone; - gfx_convert_func conv_func; // colorspace convert func + gfx_convert_func conv_func; // colorspace convert func - char * fExtraData; - int fExtraDataSize; - int fBlockAlign; + char* fExtraData; + int fExtraDataSize; + int fBlockAlign; - bigtime_t fStartTime; - int32 fOutputFrameCount; - float fOutputFrameRate; - int fOutputFrameSize; // sample size * channel count + bigtime_t fStartTime; + int32 fOutputFrameCount; + float fOutputFrameRate; + int fOutputFrameSize; // sample size * channel count - const void *fChunkBuffer; - int32 fChunkBufferOffset; - size_t fChunkBufferSize; + const void* fChunkBuffer; + int32 fChunkBufferOffset; + size_t fChunkBufferSize; - char * fOutputBuffer; - int32 fOutputBufferOffset; - int32 fOutputBufferSize; + char* fOutputBuffer; + int32 fOutputBufferOffset; + int32 fOutputBufferSize; }; -class avCodecPlugin : public DecoderPlugin -{ +class avCodecPlugin : public DecoderPlugin { public: - Decoder * NewDecoder(uint index); - status_t GetSupportedFormats(media_format ** formats, size_t * count); + Decoder* NewDecoder(uint index); + status_t GetSupportedFormats(media_format** formats, + size_t* count); }; Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp 2009-07-01 13:11:30 UTC (rev 31354) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp 2009-07-01 14:45:20 UTC (rev 31355) @@ -203,6 +203,9 @@ {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('IV31'), "Indeo 3"}, {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('IV32'), "Indeo 3"}, + {CODEC_ID_INDEO5, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('iv50'), "Indeo 5"}, + {CODEC_ID_INDEO5, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('IV50'), "Indeo 5"}, + {CODEC_ID_VP3, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'VP31', "On2 VP3"}, {CODEC_ID_CYUV, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'cyuv', "CYUV"}, Copied: haiku/trunk/src/add-ons/media/plugins/avcodec/config.h (from rev 31322, haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/config.h) =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/config.h 2009-06-30 10:14:54 UTC (rev 31322) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/config.h 2009-07-01 14:45:20 UTC (rev 31355) @@ -0,0 +1,747 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H +#define FFMPEG_CONFIGURATION "--prefix=/boot/common/ --enable-shared --enable-gpl --disable-debug --disable-mmx --disable-demuxer=audio-beos --disable-muxer=audio-beos --disable-encoders --disable-parsers --disable-demuxers --disable-muxers" +#define FFMPEG_DATADIR "/boot/common//share/ffmpeg" +#define ARCH_ALPHA 0 +#define ARCH_ARM 0 +#define ARCH_BFIN 0 +#define ARCH_IA64 0 +#define ARCH_M68K 0 +#define ARCH_MIPS 0 +#define ARCH_PARISC 0 +// #define ARCH_PPC 0 +#define ARCH_S390 0 +#define ARCH_SH4 0 +// #define ARCH_SPARC 0 +#define ARCH_SPARC64 0 +// #define ARCH_X86 1 +// #define ARCH_X86_32 1 +#define ARCH_X86_64 0 +// #define HAVE_ALTIVEC 0 +// #define HAVE_AMD3DNOW 0 +// #define HAVE_AMD3DNOWEXT 0 +#define HAVE_ARMV5TE 0 +#define HAVE_ARMV6 0 +#define HAVE_ARMV6T2 0 +#define HAVE_ARMVFP 0 +#define HAVE_IWMMXT 0 +#define HAVE_MMI 0 +// #define HAVE_MMX 1 +// #define HAVE_MMX2 1 +#define HAVE_NEON 0 +#define HAVE_PPC4XX 0 +// #define HAVE_SSE 0 +// #define HAVE_SSSE3 1 +// #define HAVE_VIS 0 +#define HAVE_BEOSTHREADS 0 +#define HAVE_OS2THREADS 0 +#define HAVE_PTHREADS 1 +#define HAVE_W32THREADS 0 +#define HAVE_ALSA_ASOUNDLIB_H 0 +// #define HAVE_ALTIVEC_H 0 +#define HAVE_ARPA_INET_H 0 +#define HAVE_BSWAP 1 +#define HAVE_CLOSESOCKET 0 +#define HAVE_CMOV 0 +#define HAVE_CONIO_H 0 +#define HAVE_DCBZL 0 +#define HAVE_DEV_BKTR_IOCTL_BT848_H 0 +#define HAVE_DEV_BKTR_IOCTL_METEOR_H 0 +#define HAVE_DEV_IC_BT8XX_H 0 +#define HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0 +#define HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0 +#define HAVE_DLFCN_H 0 +#define HAVE_DLOPEN 0 +#define HAVE_DOS_PATHS 0 +// Jamfile must have -fomit_frame_pointer +#define HAVE_EBP_AVAILABLE 1 +// We use position independant code so no EBX +#define HAVE_EBX_AVAILABLE 0 +#define HAVE_FAST_64BIT 0 +#define HAVE_FAST_CMOV 0 +#define HAVE_FAST_UNALIGNED 1 +#define HAVE_FORK 1 +#define HAVE_FREETYPE2 0 +#define HAVE_GETHRTIME 0 +#define HAVE_GETPROCESSTIMES 0 +#define HAVE_GETRUSAGE 1 +#define HAVE_IMLIB2 0 +#define HAVE_INET_ATON 0 +#define HAVE_INLINE_ASM 1 +#define HAVE_LIBDC1394_1 0 +#define HAVE_LIBDC1394_2 0 +#define HAVE_LLRINT 1 +#define HAVE_LRINT 1 +#define HAVE_LRINTF 1 +#define HAVE_MACHINE_IOCTL_BT848_H 0 +#define HAVE_MACHINE_IOCTL_METEOR_H 0 +#define HAVE_MALLOC_H 1 +#define HAVE_MEMALIGN 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PLD 0 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PPC64 0 +#define HAVE_ROUND 1 +#define HAVE_ROUNDF 1 +#define HAVE_SDL 0 +#define HAVE_SDL_VIDEO_SIZE 0 +#define HAVE_SETMODE 0 +#define HAVE_SOCKLEN_T 0 +#define HAVE_SOUNDCARD_H 0 +#define HAVE_POLL_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOUNDCARD_H 0 +#define HAVE_SYS_VIDEOIO_H 0 +#define HAVE_TEN_OPERANDS 0 +#define HAVE_TERMIOS_H 1 +#define HAVE_THREADS 1 +#define HAVE_TRUNCF 1 +#define HAVE_WINSOCK2_H 0 +#define HAVE_YASM 1 +#define CONFIG_BSFS 1 +#define CONFIG_DECODERS 1 +#define CONFIG_DEMUXERS 1 +#define CONFIG_ENCODERS 0 +#define CONFIG_FILTERS 1 +#define CONFIG_INDEVS 0 +#define CONFIG_MUXERS 1 +#define CONFIG_OUTDEVS 0 +#define CONFIG_PARSERS 0 +#define CONFIG_PROTOCOLS 1 +#define CONFIG_AANDCT 1 +#define CONFIG_AVFILTER 0 +#define CONFIG_AVFILTER_LAVF 0 +#define CONFIG_AVISYNTH 0 +#define CONFIG_BEOS_NETSERVER 0 +#define CONFIG_BZLIB 0 +#define CONFIG_FASTDIV 1 +#define CONFIG_FFMPEG 0 +#define CONFIG_FFPLAY 0 +#define CONFIG_FFSERVER 0 +#define CONFIG_FFT 1 +#define CONFIG_GOLOMB 1 +#define CONFIG_GPL 0 +#define CONFIG_GPROF 0 +#define CONFIG_GRAY 0 +#define CONFIG_HARDCODED_TABLES 1 +#define CONFIG_IPV6 0 +#define CONFIG_LIBAMR_NB 0 +#define CONFIG_LIBAMR_WB 0 +#define CONFIG_LIBDC1394 0 +#define CONFIG_LIBDIRAC 0 +#define CONFIG_LIBFAAC 0 +#define CONFIG_LIBFAAD 0 +#define CONFIG_LIBFAADBIN 0 +#define CONFIG_LIBGSM 0 +#define CONFIG_LIBMP3LAME 0 +#define CONFIG_LIBNUT 0 +#define CONFIG_LIBOPENJPEG 0 +#define CONFIG_LIBSCHROEDINGER 0 +#define CONFIG_LIBSPEEX 0 +#define CONFIG_LIBTHEORA 0 +#define CONFIG_LIBVORBIS 0 +#define CONFIG_LIBX264 0 +#define CONFIG_LIBXVID 0 +#define CONFIG_MDCT 1 +#define CONFIG_MEMALIGN_HACK 0 +#define CONFIG_MLIB 0 +#define CONFIG_MPEGAUDIO_HP 1 +#define CONFIG_NETWORK 0 +#define CONFIG_NONFREE 0 +#define CONFIG_POSTPROC 0 +#define CONFIG_POWERPC_PERF 0 +#define CONFIG_RDFT 1 +#define CONFIG_SHARED 0 +#define CONFIG_SMALL 0 +#define CONFIG_STATIC 1 +#define CONFIG_SWSCALE 0 +#define CONFIG_VDPAU 0 +#define CONFIG_VHOOK 0 +#define CONFIG_X11GRAB 0 +#define CONFIG_ZLIB 1 +#define CONFIG_OLDSCALER 1 +#define CONFIG_AASC_DECODER 1 +#define CONFIG_AMV_DECODER 1 +#define CONFIG_ASV1_DECODER 1 +#define CONFIG_ASV2_DECODER 1 +#define CONFIG_AVS_DECODER 1 +#define CONFIG_BETHSOFTVID_DECODER 1 +#define CONFIG_BFI_DECODER 1 +#define CONFIG_BMP_DECODER 1 +#define CONFIG_C93_DECODER 1 +#define CONFIG_CAVS_DECODER 0 // TODO: Confirm +#define CONFIG_CINEPAK_DECODER 1 +#define CONFIG_CLJR_DECODER 1 +#define CONFIG_CSCD_DECODER 1 +#define CONFIG_CYUV_DECODER 1 +#define CONFIG_DNXHD_DECODER 1 +#define CONFIG_DSICINVIDEO_DECODER 1 +#define CONFIG_DVVIDEO_DECODER 1 +#define CONFIG_DXA_DECODER 1 +#define CONFIG_EACMV_DECODER 1 +#define CONFIG_EATGQ_DECODER 1 +#define CONFIG_EATGV_DECODER 1 +#define CONFIG_EATQI_DECODER 1 +#define CONFIG_EIGHTBPS_DECODER 1 +#define CONFIG_EIGHTSVX_EXP_DECODER 1 +#define CONFIG_EIGHTSVX_FIB_DECODER 1 +#define CONFIG_ESCAPE124_DECODER 1 +#define CONFIG_FFV1_DECODER 1 +#define CONFIG_FFVHUFF_DECODER 1 +#define CONFIG_FLASHSV_DECODER 1 +#define CONFIG_FLIC_DECODER 1 +#define CONFIG_FLV_DECODER 1 +#define CONFIG_FOURXM_DECODER 1 +#define CONFIG_FRAPS_DECODER 1 +#define CONFIG_GIF_DECODER 1 +#define CONFIG_H261_DECODER 1 +#define CONFIG_H263_DECODER 1 +#define CONFIG_H263I_DECODER 1 +#define CONFIG_H264_DECODER 1 +#define CONFIG_H264_VDPAU_DECODER 0 +#define CONFIG_HUFFYUV_DECODER 1 +#define CONFIG_IDCIN_DECODER 1 +#define CONFIG_INDEO2_DECODER 1 +#define CONFIG_INDEO3_DECODER 1 +#define CONFIG_INTERPLAY_VIDEO_DECODER 1 +#define CONFIG_JPEGLS_DECODER 1 +#define CONFIG_KMVC_DECODER 1 +#define CONFIG_LOCO_DECODER 1 +#define CONFIG_MDEC_DECODER 1 +#define CONFIG_MIMIC_DECODER 1 +#define CONFIG_MJPEG_DECODER 1 +#define CONFIG_MJPEGB_DECODER 1 +#define CONFIG_MMVIDEO_DECODER 1 +#define CONFIG_MOTIONPIXELS_DECODER 1 +#define CONFIG_MPEG_XVMC_DECODER 0 +#define CONFIG_MPEG1VIDEO_DECODER 1 +#define CONFIG_MPEG2VIDEO_DECODER 1 +#define CONFIG_MPEG4_DECODER 1 +#define CONFIG_MPEGVIDEO_DECODER 1 +#define CONFIG_MPEG_VDPAU_DECODER 0 +#define CONFIG_MPEG1_VDPAU_DECODER 0 +#define CONFIG_MSMPEG4V1_DECODER 1 +#define CONFIG_MSMPEG4V2_DECODER 1 +#define CONFIG_MSMPEG4V3_DECODER 1 +#define CONFIG_MSRLE_DECODER 1 +#define CONFIG_MSVIDEO1_DECODER 1 +#define CONFIG_MSZH_DECODER 1 +#define CONFIG_NUV_DECODER 1 +#define CONFIG_PCX_DECODER 1 +#define CONFIG_PNG_DECODER 1 +#define CONFIG_PTX_DECODER 1 +#define CONFIG_QDRAW_DECODER 1 +#define CONFIG_QPEG_DECODER 1 +#define CONFIG_QTRLE_DECODER 1 +#define CONFIG_RAWVIDEO_DECODER 1 +#define CONFIG_RL2_DECODER 1 +#define CONFIG_ROQ_DECODER 1 +#define CONFIG_RPZA_DECODER 1 +#define CONFIG_RV10_DECODER 1 +#define CONFIG_RV20_DECODER 1 +#define CONFIG_RV30_DECODER 1 +#define CONFIG_RV40_DECODER 1 +#define CONFIG_SGI_DECODER 1 +#define CONFIG_SMACKER_DECODER 1 +#define CONFIG_SMC_DECODER 1 +#define CONFIG_SNOW_DECODER 0 // TODO: Confirm +#define CONFIG_SP5X_DECODER 1 +#define CONFIG_SUNRAST_DECODER 1 +#define CONFIG_SVQ1_DECODER 1 +#define CONFIG_SVQ3_DECODER 1 +#define CONFIG_TARGA_DECODER 1 +#define CONFIG_THEORA_DECODER 1 +#define CONFIG_THP_DECODER 1 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 1 +#define CONFIG_TIFF_DECODER 1 +#define CONFIG_TRUEMOTION1_DECODER 1 +#define CONFIG_TRUEMOTION2_DECODER 1 +#define CONFIG_TSCC_DECODER 1 +#define CONFIG_TXD_DECODER 1 +#define CONFIG_ULTI_DECODER 1 +#define CONFIG_VB_DECODER 1 +#define CONFIG_VC1_DECODER 1 +#define CONFIG_VC1_VDPAU_DECODER 0 +#define CONFIG_VCR1_DECODER 1 +#define CONFIG_VMDVIDEO_DECODER 1 +#define CONFIG_VMNC_DECODER 1 +#define CONFIG_VP3_DECODER 1 +#define CONFIG_VP5_DECODER 1 +#define CONFIG_VP6_DECODER 1 +#define CONFIG_VP6A_DECODER 1 +#define CONFIG_VP6F_DECODER 1 +#define CONFIG_VQA_DECODER 1 +#define CONFIG_WMV1_DECODER 1 +#define CONFIG_WMV2_DECODER 1 +#define CONFIG_WMV3_DECODER 1 +#define CONFIG_WMV3_VDPAU_DECODER 0 +#define CONFIG_WNV1_DECODER 1 +#define CONFIG_XAN_WC3_DECODER 1 +#define CONFIG_XL_DECODER 1 +#define CONFIG_ZLIB_DECODER 1 +#define CONFIG_ZMBV_DECODER 1 +#define CONFIG_AAC_DECODER 1 +#define CONFIG_AC3_DECODER 1 +#define CONFIG_ALAC_DECODER 1 +#define CONFIG_APE_DECODER 1 +#define CONFIG_ATRAC3_DECODER 1 +#define CONFIG_COOK_DECODER 1 +#define CONFIG_DCA_DECODER 1 +#define CONFIG_DSICINAUDIO_DECODER 1 +#define CONFIG_EAC3_DECODER 1 +#define CONFIG_FLAC_DECODER 1 +#define CONFIG_IMC_DECODER 1 +#define CONFIG_MACE3_DECODER 1 +#define CONFIG_MACE6_DECODER 1 +#define CONFIG_MLP_DECODER 1 +#define CONFIG_MP1_DECODER 1 +#define CONFIG_MP2_DECODER 1 +#define CONFIG_MP3_DECODER 1 +#define CONFIG_MP3ADU_DECODER 1 +#define CONFIG_MP3ON4_DECODER 1 +#define CONFIG_MPC7_DECODER 1 +#define CONFIG_MPC8_DECODER 1 +#define CONFIG_NELLYMOSER_DECODER 1 +#define CONFIG_QCELP_DECODER 1 +#define CONFIG_QDM2_DECODER 1 +#define CONFIG_RA_144_DECODER 1 +#define CONFIG_RA_288_DECODER 1 +#define CONFIG_SHORTEN_DECODER 1 +#define CONFIG_SMACKAUD_DECODER 1 +#define CONFIG_SONIC_DECODER 1 +#define CONFIG_TRUESPEECH_DECODER 1 +#define CONFIG_TTA_DECODER 1 +#define CONFIG_VMDAUDIO_DECODER 1 +#define CONFIG_VORBIS_DECODER 1 +#define CONFIG_WAVPACK_DECODER 1 +#define CONFIG_WMAV1_DECODER 1 +#define CONFIG_WMAV2_DECODER 1 +#define CONFIG_WS_SND1_DECODER 1 +#define CONFIG_PCM_ALAW_DECODER 1 +#define CONFIG_PCM_DVD_DECODER 1 +#define CONFIG_PCM_F32BE_DECODER 1 +#define CONFIG_PCM_F32LE_DECODER 1 +#define CONFIG_PCM_F64BE_DECODER 1 +#define CONFIG_PCM_F64LE_DECODER 1 +#define CONFIG_PCM_MULAW_DECODER 1 +#define CONFIG_PCM_S8_DECODER 1 +#define CONFIG_PCM_S16BE_DECODER 1 +#define CONFIG_PCM_S16LE_DECODER 1 +#define CONFIG_PCM_S16LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S24BE_DECODER 1 +#define CONFIG_PCM_S24DAUD_DECODER 1 +#define CONFIG_PCM_S24LE_DECODER 1 +#define CONFIG_PCM_S32BE_DECODER 1 +#define CONFIG_PCM_S32LE_DECODER 1 +#define CONFIG_PCM_U8_DECODER 1 +#define CONFIG_PCM_U16BE_DECODER 1 +#define CONFIG_PCM_U16LE_DECODER 1 +#define CONFIG_PCM_U24BE_DECODER 1 +#define CONFIG_PCM_U24LE_DECODER 1 +#define CONFIG_PCM_U32BE_DECODER 1 +#define CONFIG_PCM_U32LE_DECODER 1 +#define CONFIG_PCM_ZORK_DECODER 1 +#define CONFIG_INTERPLAY_DPCM_DECODER 1 +#define CONFIG_ROQ_DPCM_DECODER 1 +#define CONFIG_SOL_DPCM_DECODER 1 +#define CONFIG_XAN_DPCM_DECODER 1 +#define CONFIG_ADPCM_4XM_DECODER 1 +#define CONFIG_ADPCM_ADX_DECODER 1 +#define CONFIG_ADPCM_CT_DECODER 1 +#define CONFIG_ADPCM_EA_DECODER 1 +#define CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1 +#define CONFIG_ADPCM_EA_R1_DECODER 1 +#define CONFIG_ADPCM_EA_R2_DECODER 1 +#define CONFIG_ADPCM_EA_R3_DECODER 1 +#define CONFIG_ADPCM_EA_XAS_DECODER 1 +#define CONFIG_ADPCM_G726_DECODER 1 +#define CONFIG_ADPCM_IMA_AMV_DECODER 1 +#define CONFIG_ADPCM_IMA_DK3_DECODER 1 +#define CONFIG_ADPCM_IMA_DK4_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_EACS_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1 +#define CONFIG_ADPCM_IMA_ISS_DECODER 1 +#define CONFIG_ADPCM_IMA_QT_DECODER 1 +#define CONFIG_ADPCM_IMA_SMJPEG_DECODER 1 +#define CONFIG_ADPCM_IMA_WAV_DECODER 1 +#define CONFIG_ADPCM_IMA_WS_DECODER 1 +#define CONFIG_ADPCM_MS_DECODER 1 +#define CONFIG_ADPCM_SBPRO_2_DECODER 1 +#define CONFIG_ADPCM_SBPRO_3_DECODER 1 +#define CONFIG_ADPCM_SBPRO_4_DECODER 1 +#define CONFIG_ADPCM_SWF_DECODER 1 +#define CONFIG_ADPCM_THP_DECODER 1 +#define CONFIG_ADPCM_XA_DECODER 1 +#define CONFIG_ADPCM_YAMAHA_DECODER 1 +#define CONFIG_DVBSUB_DECODER 1 +#define CONFIG_DVDSUB_DECODER 1 +#define CONFIG_XSUB_DECODER 1 +#define CONFIG_LIBAMR_NB_DECODER 0 +#define CONFIG_LIBAMR_WB_DECODER 0 +#define CONFIG_LIBDIRAC_DECODER 0 +#define CONFIG_LIBFAAD_DECODER 0 +#define CONFIG_LIBGSM_DECODER 0 +#define CONFIG_LIBGSM_MS_DECODER 0 +#define CONFIG_LIBOPENJPEG_DECODER 0 +#define CONFIG_LIBSCHROEDINGER_DECODER 0 +#define CONFIG_LIBSPEEX_DECODER 0 +#define CONFIG_ASV1_ENCODER 0 +#define CONFIG_ASV2_ENCODER 0 +#define CONFIG_BMP_ENCODER 0 +#define CONFIG_DNXHD_ENCODER 0 +#define CONFIG_DVVIDEO_ENCODER 0 +#define CONFIG_FFV1_ENCODER 0 +#define CONFIG_FFVHUFF_ENCODER 0 +#define CONFIG_FLASHSV_ENCODER 0 +#define CONFIG_FLV_ENCODER 0 +#define CONFIG_GIF_ENCODER 0 +#define CONFIG_H261_ENCODER 0 +#define CONFIG_H263_ENCODER 0 +#define CONFIG_H263P_ENCODER 0 +#define CONFIG_HUFFYUV_ENCODER 0 +#define CONFIG_JPEGLS_ENCODER 0 +#define CONFIG_LJPEG_ENCODER 0 +#define CONFIG_MJPEG_ENCODER 0 +#define CONFIG_MPEG1VIDEO_ENCODER 0 +#define CONFIG_MPEG2VIDEO_ENCODER 0 +#define CONFIG_MPEG4_ENCODER 0 +#define CONFIG_MSMPEG4V1_ENCODER 0 +#define CONFIG_MSMPEG4V2_ENCODER 0 +#define CONFIG_MSMPEG4V3_ENCODER 0 +#define CONFIG_PAM_ENCODER 0 +#define CONFIG_PBM_ENCODER 0 +#define CONFIG_PGM_ENCODER 0 +#define CONFIG_PGMYUV_ENCODER 0 +#define CONFIG_PNG_ENCODER 0 +#define CONFIG_PPM_ENCODER 0 +#define CONFIG_QTRLE_ENCODER 0 +#define CONFIG_RAWVIDEO_ENCODER 0 +#define CONFIG_ROQ_ENCODER 0 +#define CONFIG_RV10_ENCODER 0 +#define CONFIG_RV20_ENCODER 0 +#define CONFIG_SGI_ENCODER 0 +#define CONFIG_SNOW_ENCODER 0 +#define CONFIG_SVQ1_ENCODER 0 +#define CONFIG_TARGA_ENCODER 0 +#define CONFIG_TIFF_ENCODER 0 +#define CONFIG_WMV1_ENCODER 0 +#define CONFIG_WMV2_ENCODER 0 +#define CONFIG_ZLIB_ENCODER 0 +#define CONFIG_ZMBV_ENCODER 0 +#define CONFIG_AC3_ENCODER 0 +#define CONFIG_ALAC_ENCODER 0 +#define CONFIG_FLAC_ENCODER 0 +#define CONFIG_MP2_ENCODER 0 +#define CONFIG_NELLYMOSER_ENCODER 0 +#define CONFIG_SONIC_ENCODER 0 +#define CONFIG_SONIC_LS_ENCODER 0 +#define CONFIG_VORBIS_ENCODER 0 +#define CONFIG_WMAV1_ENCODER 0 +#define CONFIG_WMAV2_ENCODER 0 +#define CONFIG_PCM_ALAW_ENCODER 0 +#define CONFIG_PCM_F32BE_ENCODER 0 +#define CONFIG_PCM_F32LE_ENCODER 0 +#define CONFIG_PCM_F64BE_ENCODER 0 +#define CONFIG_PCM_F64LE_ENCODER 0 +#define CONFIG_PCM_MULAW_ENCODER 0 +#define CONFIG_PCM_S8_ENCODER 0 +#define CONFIG_PCM_S16BE_ENCODER 0 +#define CONFIG_PCM_S16LE_ENCODER 0 +#define CONFIG_PCM_S24BE_ENCODER 0 +#define CONFIG_PCM_S24DAUD_ENCODER 0 +#define CONFIG_PCM_S24LE_ENCODER 0 +#define CONFIG_PCM_S32BE_ENCODER 0 +#define CONFIG_PCM_S32LE_ENCODER 0 +#define CONFIG_PCM_U8_ENCODER 0 +#define CONFIG_PCM_U16BE_ENCODER 0 +#define CONFIG_PCM_U16LE_ENCODER 0 +#define CONFIG_PCM_U24BE_ENCODER 0 +#define CONFIG_PCM_U24LE_ENCODER 0 +#define CONFIG_PCM_U32BE_ENCODER 0 +#define CONFIG_PCM_U32LE_ENCODER 0 +#define CONFIG_PCM_ZORK_ENCODER 0 +#define CONFIG_ROQ_DPCM_ENCODER 0 +#define CONFIG_ADPCM_ADX_ENCODER 0 +#define CONFIG_ADPCM_G726_ENCODER 0 +#define CONFIG_ADPCM_IMA_QT_ENCODER 0 +#define CONFIG_ADPCM_IMA_WAV_ENCODER 0 +#define CONFIG_ADPCM_MS_ENCODER 0 +#define CONFIG_ADPCM_SWF_ENCODER 0 +#define CONFIG_ADPCM_YAMAHA_ENCODER 0 [... truncated: 65072 lines follow ...] From revol at free.fr Wed Jul 1 18:19:10 2009 From: revol at free.fr (=?utf-8?q?Fran=C3=A7ois?= Revol) Date: Wed, 01 Jul 2009 18:19:10 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r31355_-_in_haiku/trunk/src/add-ons/med?= =?utf-8?q?ia/plugins/avcodec=3A_=2E_libavcodec_libavformat_libavutil?= In-Reply-To: <200907011446.n61EkLg2005512@sheep.berlios.de> Message-ID: <4260755158-BeMail@Zeta> > Author: stippi > Date: 2009-07-01 16:45:20 +0200 (Wed, 01 Jul 2009) > New Revision: 31355 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31355&view=rev > > Added: > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h Hopefully you'll get more success than my attempt... Actually it worked quite well until you tried seeking :D > haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/ How come we don't have ffmpeg in the vendor branch yet ?? Fran?ois. From zooey at hirschkaefer.de Wed Jul 1 18:49:17 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Wed, 01 Jul 2009 18:49:17 +0200 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev In-Reply-To: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> References: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> Message-ID: <20090701184917.18848.1@bepc.1246454724.fake> Hi Joseph, On 2009-07-01 at 15:34:01 [+0200], Joseph Prostko wrote: > On Wed, Jul 1, 2009 at 8:38 AM, zooey at BerliOS wrote: > > Author: zooey > > Date: 2009-07-01 14:38:16 +0200 (Wed, 01 Jul 2009) > > New Revision: 31353 > > I've been using your work-in-progress branches and encountered some > problems. I will paste the errors, and then a diff below that that > addresses them. Thanks - currently applying those. I expect several more problems to show, as I have only built all targets that are put onto the image by default, so the bluetooth stuff was not tested yet. BTW: does anyone know a way to ask jam to build all targets? cheers, Oliver From korli at users.berlios.de Wed Jul 1 18:59:16 2009 From: korli at users.berlios.de (=?ISO-8859-1?B?Suly9G1lIER1dmFs?=) Date: Wed, 1 Jul 2009 18:59:16 +0200 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev In-Reply-To: <20090701184917.18848.1@bepc.1246454724.fake> References: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> <20090701184917.18848.1@bepc.1246454724.fake> Message-ID: 2009/7/1 Oliver Tappe > > BTW: does anyone know a way to ask jam to build all targets? > > jam -a Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From zooey at mail.berlios.de Wed Jul 1 19:30:14 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 19:30:14 +0200 Subject: [Haiku-commits] r31356 - in haiku/branches/features/32bit-wchar_t: . build/jam headers/libs headers/libs/png headers/os/interface headers/os/kernel headers/os/support headers/posix headers/private/graphics/nvidia headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 headers/private/net headers/private/shared src/add-ons/accelerants/intel_extreme src/add-ons/accelerants/nvidia src/add-ons/accelerants/nvidia/engine src/add-ons/disk_systems/intel src/add-ons/kernel/debugger/demangle src/add-ons/kernel/debugger/disasm src/add-ons/kernel/drivers/graphics/nvidia src/add-ons/kernel/drivers/midi/usb_midi src/add-ons/kernel/drivers/power/acpi_embedded_controller src/add-ons/kernel/file_systems/bfs src/add-ons/kernel/file_systems/fat src/add-ons/kernel/network/protocols/ipv4 src/add-ons/media/media-add-ons/firewire_dv src/add-ons/print/drivers/pdf/source src/apps/cortex/addons/Flanger src/apps/debuganalyzer src/apps/debuganalyzer/gui/table src/apps/debuganalyzer/! gui/thread_window src/apps/debugger src/apps/debugger/arch src/apps/debugger/arch/x86 src/apps/debugger/arch/x86/disasm src/apps/debugger/debug_info src/apps/debugger/debugger_interface src/apps/debugger/demangler src/apps/debugger/dwarf src/apps/debugger/gui/team_window src/apps/debugger/model src/apps/deskcalc src/apps/diskprobe src/apps/drivesetup src/apps/fontdemo src/apps/icon-o-matic/generic/support src/apps/icon-o-matic/transformable src/apps/magnify src/apps/mediaplayer src/bin/coreutils/src src/bin/desklink src/bin/keymap src/kits/interface src/kits/media src/kits/opengl/mesa/main src/kits/opengl/mesa/shader/slang src/kits/opengl/mesa/swrast src/kits/opengl/mesa/vbo src/kits/shared src/kits/storage/disk_device src/kits/tracker src/libs src/libs/icon/shape src/libs/icon/transformable src/libs/png src/preferences/screensaver src/preferences/time src/servers/app src/servers/app/drawing/Painter src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc sr! c/system/kernel/arch/x86 src/system/kernel/debug src/system/ke! rnel/dev Message-ID: <200907011730.n61HUEF0018177@sheep.berlios.de> Author: zooey Date: 2009-07-01 19:29:45 +0200 (Wed, 01 Jul 2009) New Revision: 31356 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31356&view=rev Added: haiku/branches/features/32bit-wchar_t/headers/libs/mapm/ haiku/branches/features/32bit-wchar_t/headers/private/shared/ExpressionParser.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/BreakpointManager.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/BreakpointManager.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/ThreadHandler.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/ThreadHandler.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/InstructionInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/InstructionInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerImageDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerImageDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfImageDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/SpecificImageDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/SpecificImageDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/SpecificTeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/TeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/TeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AbbreviationTable.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AbbreviationTable.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AttributeClasses.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AttributeClasses.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/CompilationUnit.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/CompilationUnit.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/Dwarf.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfFile.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfFile.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfTypes.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfUtils.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfUtils.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/TagNames.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/TagNames.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/elf/ haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ImageFunctionsView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ImageFunctionsView.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/TeamMemory.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/TeamMemory.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/types/ haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/CreateParamsPanel.cpp haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/CreateParamsPanel.h haiku/branches/features/32bit-wchar_t/src/kits/shared/ExpressionParser.cpp haiku/branches/features/32bit-wchar_t/src/libs/mapm/ haiku/branches/features/32bit-wchar_t/src/system/kernel/debug/BreakpointManager.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/debug/BreakpointManager.h haiku/branches/features/32bit-wchar_t/src/system/libroot/os/fs_attr.cpp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/VS2002/ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/VS2008/ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/VS2002/ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/VS2008/ haiku/branches/features/32bit-wchar_t/src/tests/system/libroot/os/fs_attr_test.cpp Removed: haiku/branches/features/32bit-wchar_t/src/apps/debugger/ElfFile.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/ElfFile.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/ArchitectureTypes.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/TargetAddressRange.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/attribute_classes.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/attribute_classes.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/dwarf.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/tag_names.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/tag_names.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/types.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/SourceLocation.h haiku/branches/features/32bit-wchar_t/src/apps/deskcalc/ExpressionParser.cpp haiku/branches/features/32bit-wchar_t/src/apps/deskcalc/ExpressionParser.h haiku/branches/features/32bit-wchar_t/src/apps/deskcalc/mapm_4.9.5/ haiku/branches/features/32bit-wchar_t/src/system/libroot/os/fs_attr.c haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/BeManager/GroupProperties.d haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/BeManager/Groups.d haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.001 haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.def haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.exp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.plg haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.sln haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.suo haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/FileSharing.vcproj haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/FileSharing-Windows/scanappl.suo haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/Menus/ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/bt_fs/backups/ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/NTServApp.aps haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.001 haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.dsp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.dsw haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.mak haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.mdp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.plg haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.sln haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.suo haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.vcp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/ntservice.vcproj haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/transport/beserved_transport.cpp-old haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/transport/beserved_transport.h-old Modified: haiku/branches/features/32bit-wchar_t/ReadMe haiku/branches/features/32bit-wchar_t/build/jam/FileRules haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage haiku/branches/features/32bit-wchar_t/configure haiku/branches/features/32bit-wchar_t/headers/libs/png/png.h haiku/branches/features/32bit-wchar_t/headers/libs/png/pngconf.h haiku/branches/features/32bit-wchar_t/headers/os/interface/View.h haiku/branches/features/32bit-wchar_t/headers/os/kernel/debugger.h haiku/branches/features/32bit-wchar_t/headers/os/support/String.h haiku/branches/features/32bit-wchar_t/headers/posix/math.h haiku/branches/features/32bit-wchar_t/headers/private/graphics/nvidia/DriverInterface.h haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/debug.h haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/user_debugger.h haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/x86/arch_user_debugger.h haiku/branches/features/32bit-wchar_t/headers/private/kernel/commpage.h haiku/branches/features/32bit-wchar_t/headers/private/kernel/user_debugger.h haiku/branches/features/32bit-wchar_t/headers/private/net/ProtocolUtilities.h haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/intel_extreme/mode.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/intel_extreme/overlay.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/ProposeDisplayMode.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_crtc.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_crtc2.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_general.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_info.c haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/disk_systems/intel/PartitionMapAddOn.h haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/debugger/demangle/demangle.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/debugger/demangle/demangle.h haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/debugger/demangle/gcc3+.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/debugger/disasm/disasm.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/graphics/nvidia/README.html haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/graphics/nvidia/driver.c haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/graphics/nvidia/nvidia.settings haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.c haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/power/acpi_embedded_controller/acpi_embedded_controller.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/drivers/power/acpi_embedded_controller/acpi_embedded_controller.h haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/BlockAllocator.h haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/Inode.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/Inode.h haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/Journal.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/bfs/Volume.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/fat/dosfs.c haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/fat/fat.c haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/firewire_dv/glue.h haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/PDFText.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/PDFWriter.cpp haiku/branches/features/32bit-wchar_t/src/add-ons/print/drivers/pdf/source/PDFWriter.h haiku/branches/features/32bit-wchar_t/src/apps/cortex/addons/Flanger/FlangerNode.cpp haiku/branches/features/32bit-wchar_t/src/apps/debuganalyzer/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debuganalyzer/gui/table/TreeTable.cpp haiku/branches/features/32bit-wchar_t/src/apps/debuganalyzer/gui/table/TreeTable.h haiku/branches/features/32bit-wchar_t/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.cpp haiku/branches/features/32bit-wchar_t/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/Array.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/Debugger.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/MessageCodes.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/Architecture.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/Architecture.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/CpuState.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/ArchitectureX86.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/ArchitectureX86.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/CpuStateX86.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/CpuStateX86.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/disasm/DisassemblerX86.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/disasm/DisassemblerX86.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/arch/x86/disasm/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/FunctionDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/FunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/ImageDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/ImageDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debugger_interface/DebugEvent.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debugger_interface/DebuggerInterface.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debugger_interface/DebuggerInterface.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/demangler/Demangler.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/demangler/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AttributeValue.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/AttributeValue.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DataReader.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DebugInfoEntries.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DebugInfoEntries.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DebugInfoEntry.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DebugInfoEntry.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfManager.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfManager.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/SourceLanguageInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ImageListView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ImageListView.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/SourceView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/SourceView.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/StackTraceView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/TeamWindow.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/TeamWindow.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Breakpoint.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Image.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Image.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/ImageInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/StackFrame.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/StackFrame.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Statement.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/SymbolInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Team.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Team.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/TeamDebugModel.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/TeamDebugModel.h haiku/branches/features/32bit-wchar_t/src/apps/deskcalc/CalcView.cpp haiku/branches/features/32bit-wchar_t/src/apps/deskcalc/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/diskprobe/DataView.cpp haiku/branches/features/32bit-wchar_t/src/apps/diskprobe/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/diskprobe/ProbeView.cpp haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/DriveSetup.rdef haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/InitParamsPanel.h haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/MainWindow.cpp haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/MainWindow.h haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/Support.cpp haiku/branches/features/32bit-wchar_t/src/apps/drivesetup/Support.h haiku/branches/features/32bit-wchar_t/src/apps/fontdemo/FontDemoView.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/generic/support/support.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/transformable/CanvasTransformBox.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/transformable/ChannelTransform.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/transformable/TransformBox.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/transformable/TransformBoxStates.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/transformable/TransformGradientBox.cpp haiku/branches/features/32bit-wchar_t/src/apps/magnify/Magnify.cpp haiku/branches/features/32bit-wchar_t/src/apps/magnify/Magnify.h haiku/branches/features/32bit-wchar_t/src/apps/mediaplayer/Controller.cpp haiku/branches/features/32bit-wchar_t/src/apps/mediaplayer/Controller.h haiku/branches/features/32bit-wchar_t/src/apps/mediaplayer/MainWin.cpp haiku/branches/features/32bit-wchar_t/src/apps/mediaplayer/MainWin.h haiku/branches/features/32bit-wchar_t/src/apps/mediaplayer/VideoView.cpp haiku/branches/features/32bit-wchar_t/src/bin/coreutils/src/copy.c haiku/branches/features/32bit-wchar_t/src/bin/desklink/MixerControl.cpp haiku/branches/features/32bit-wchar_t/src/bin/desklink/MixerControl.h haiku/branches/features/32bit-wchar_t/src/bin/desklink/VolumeControl.cpp haiku/branches/features/32bit-wchar_t/src/bin/desklink/VolumeControl.h haiku/branches/features/32bit-wchar_t/src/bin/keymap/Keymap.cpp haiku/branches/features/32bit-wchar_t/src/bin/keymap/Keymap.h haiku/branches/features/32bit-wchar_t/src/kits/interface/CardLayout.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/ColumnListView.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/SplitLayout.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/TwoDimensionalLayout.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/View.cpp haiku/branches/features/32bit-wchar_t/src/kits/media/Buffer.cpp haiku/branches/features/32bit-wchar_t/src/kits/media/DefaultMediaTheme.cpp haiku/branches/features/32bit-wchar_t/src/kits/media/MediaRoster.cpp haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/context.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/context.h haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/fbobject.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/get.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/image.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/matrix.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/mtypes.h haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/state.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/texrender.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/texstate.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/main/version.h haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/shader/slang/slang_preprocess.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/swrast/s_texfilter.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/vbo/vbo_exec_array.c haiku/branches/features/32bit-wchar_t/src/kits/opengl/mesa/vbo/vbo_exec_draw.c haiku/branches/features/32bit-wchar_t/src/kits/shared/Jamfile haiku/branches/features/32bit-wchar_t/src/kits/storage/disk_device/MutablePartition.cpp haiku/branches/features/32bit-wchar_t/src/kits/tracker/PoseView.cpp haiku/branches/features/32bit-wchar_t/src/kits/tracker/Tracker.cpp haiku/branches/features/32bit-wchar_t/src/kits/tracker/TrackerSettingsWindow.cpp haiku/branches/features/32bit-wchar_t/src/libs/Jamfile haiku/branches/features/32bit-wchar_t/src/libs/icon/shape/VectorPath.cpp haiku/branches/features/32bit-wchar_t/src/libs/icon/transformable/Transformable.cpp haiku/branches/features/32bit-wchar_t/src/libs/png/png.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngerror.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngget.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngmem.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngpread.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngread.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngrio.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngrtran.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngrutil.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngset.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngtrans.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngwio.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngwrite.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngwtran.c haiku/branches/features/32bit-wchar_t/src/libs/png/pngwutil.c haiku/branches/features/32bit-wchar_t/src/preferences/screensaver/ScreenCornerSelector.cpp haiku/branches/features/32bit-wchar_t/src/preferences/time/AnalogClock.cpp haiku/branches/features/32bit-wchar_t/src/servers/app/ServerFont.cpp haiku/branches/features/32bit-wchar_t/src/servers/app/drawing/Painter/AGGTextRenderer.cpp haiku/branches/features/32bit-wchar_t/src/servers/app/drawing/Painter/Painter.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/m68k/arch_commpage.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/m68k/arch_debug.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/ppc/arch_commpage.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/ppc/arch_debug.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/x86/arch_commpage.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/x86/arch_debug.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/arch/x86/arch_user_debugger.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/commpage.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/debug/Jamfile haiku/branches/features/32bit-wchar_t/src/system/kernel/debug/user_debugger.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/device_manager/legacy_drivers.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/disk_device_manager/KPartitioningSystem.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/main.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/scheduler/scheduler_tracing.h haiku/branches/features/32bit-wchar_t/src/system/libroot/os/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/BeServed-MimeMap haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/BeServed.cpp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/authentication.cpp haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/beserved/server-Windows/readerWriter.cpp haiku/branches/features/32bit-wchar_t/src/tests/system/libroot/os/Jamfile haiku/branches/features/32bit-wchar_t/src/tools/fs_shell/partition_support.cpp haiku/branches/features/32bit-wchar_t/src/tools/fs_shell/unistd.cpp haiku/branches/features/32bit-wchar_t/src/tools/vmdkimage/vmdkimage.cpp Log: * merged changes from trunk revisions 31209:31354 Modified: haiku/branches/features/32bit-wchar_t/ReadMe =================================================================== --- haiku/branches/features/32bit-wchar_t/ReadMe 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/ReadMe 2009-07-01 17:29:45 UTC (rev 31356) @@ -31,11 +31,11 @@ * bone * dano (also for Zeta) -The configure script generates a file named "BuildConfig" in the "build" -directory. As long as configure is not modified (!), there is no need to call -it again. That is for re-building you only need to invoke jam (see below). -If you don't update the source tree very frequently, you may want to execute -'configure' after each update just to be on the safe side. +The configure script generates a file named "BuildConfig" in the +"generated/build" directory. As long as configure is not modified (!), there +is no need to call it again. That is for re-building you only need to invoke +jam (see below). If you don't update the source tree very frequently, you may +want to execute 'configure' after each update just to be on the safe side. Building @@ -75,43 +75,22 @@ Bootable CD-ROM Image --------------------- -* UNSUPPORTED yet * - This _requires_ having the mkisofs tool installed. On Debian GNU/Linux for example you can install it with: apt-get install mkisofs On BeOS you can get it from http://bebits.com/app/3964 along with cdrecord. -Creating a bootable CD requires burning 2 tracks on a single CD. -The first track is an El-Torito bootable ISO file-system containing a boot -floppy image, and is created with: +This creates a bootable 'haiku-cd.iso' in your 'generated/' folder: - jam -q haiku-boot-cd + jam -q haiku-cd -This generates an image file named 'haiku-boot-cd.iso' in your output directory -under 'generated/'. -The second track is the raw BFS image 'haiku.image' in 'generated/' created -with: - - jam -q haiku-image - Under Unix/Linux, and BeOS you can use cdrecord to create a CD with: - cdrecord dev=x,y,z -v -eject -dao -data generated/haiku-boot-cd.iso generated/haiku.image + cdrecord dev=x,y,z -v -eject -dao -data generated/haiku-cd.iso -Here x,y,z is the device number as found with cdrecord -scanbus, it can also +Here x,y,z is the device number as found with cdrecord -scanbus, it can also be a device path on Linux. -Windows users will find '3rdparty/nero/haiku-cd.cue' useful. - -Since the CD has two tracks it is not easy to test it from an emulator. -Instead it is simpler to use the 'haiku.image' as CD image and the floppy -image 'haiku-boot-floppy.image' to boot from it. - -For Qemu: - -qemu -cdrom generated/haiku.image -fda generated/haiku-boot-floppy.image -boot a - Building Components ------------------- Modified: haiku/branches/features/32bit-wchar_t/build/jam/FileRules =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/FileRules 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/build/jam/FileRules 2009-07-01 17:29:45 UTC (rev 31356) @@ -315,14 +315,19 @@ actions CopySetHaikuRevision1 { $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) - revision=`LC_ALL=C LANG=C svn info $(HAIKU_TOP) 2> /dev/null | - grep Revision | awk '{printf $2}'` + # Try svn or git-svn + # Extract from "Revision: 12345" line + revision=`(LC_ALL=C LANG=C svn info $(HAIKU_TOP) || + (cd $(HAIKU_TOP) && LC_ALL=C LANG=C git svn info)) 2> /dev/null | + grep Revision | awk '{printf $2}'` if [ "$revision" = 0 -o "$revision" = "" ]; then - revision=`(cd $(HAIKU_TOP) && LC_ALL=C LANG=C git svn info) - 2> /dev/null || - (git log --max-count=1 --grep="git-svn-id:" 2> /dev/null | - grep git-svn-id: | cut -d '@' -f 2 | - awk '{printf $1}') 2> /dev/null` + # git-svn not present or not configured for this repository + # Try searching git logs for last git-svn commit + # Extract from " git-svn-id: .../haiku/trunk at 12345 ..." line + revision=`cd $(HAIKU_TOP) && + git log --max-count=1 --grep="git-svn-id:" 2> /dev/null | + grep "git-svn-id:" | cut -d '@' -f 2 | + awk '{printf $1}'` fi if [ "$revision" = "" ]; then revision=0 Modified: haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-07-01 17:29:45 UTC (rev 31356) @@ -145,7 +145,7 @@ $(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware $(X86_ONLY)ati ; -SYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki ; +SYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki usb_midi ; SYSTEM_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x $(X86_ONLY)broadcom570x etherpci $(X86_ONLY)ipro1000 pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 Modified: haiku/branches/features/32bit-wchar_t/configure =================================================================== --- haiku/branches/features/32bit-wchar_t/configure 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/configure 2009-07-01 17:29:45 UTC (rev 31356) @@ -81,7 +81,7 @@ HAIKU_CXXFLAGS The C++ flags. Defaults to "". HAIKU_LDFLAGS The linker flags. Defaults to "". HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. - Defaults to "ru". + Defaults to "cru". HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. Defaults to "x". @@ -288,7 +288,7 @@ set_default_value HAIKU_CCFLAGS "" set_default_value HAIKU_CXXFLAGS "" set_default_value HAIKU_LDFLAGS "" -set_default_value HAIKU_ARFLAGS ru +set_default_value HAIKU_ARFLAGS cru set_default_value HAIKU_UNARFLAGS x # parse parameters Copied: haiku/branches/features/32bit-wchar_t/headers/libs/mapm (from rev 31354, haiku/trunk/headers/libs/mapm) Modified: haiku/branches/features/32bit-wchar_t/headers/libs/png/png.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/libs/png/png.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/libs/png/png.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -1,6 +1,6 @@ /* png.h - header file for PNG reference library * - * libpng version 1.2.35 - February 14, 2009 + * libpng version 1.2.37 - June 4, 2009 * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -8,7 +8,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.2.35 - February 14, 2009: Glenn + * libpng versions 0.97, January 1998, through 1.2.37 - June 4, 2009: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -222,6 +222,13 @@ * 1.2.35rc01-02 13 10235 12.so.0.35[.0] * 1.0.43 10 10043 10.so.0.43[.0] * 1.2.35 13 10235 12.so.0.35[.0] + * 1.2.36beta01-05 13 10236 12.so.0.36[.0] + * 1.2.36rc01 13 10236 12.so.0.36[.0] + * 1.0.44 10 10044 10.so.0.44[.0] + * 1.2.36 13 10236 12.so.0.36[.0] + * 1.2.37beta01-03 13 10237 12.so.0.37[.0] + * 1.2.37rc01 13 10237 12.so.0.37[.0] + * 1.2.37 13 10237 12.so.0.37[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -251,8 +258,8 @@ * If you modify libpng you may insert additional notices immediately following * this sentence. * - * libpng versions 1.2.6, August 15, 2004, through 1.2.35, February 14, 2009, are - * Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are + * libpng versions 1.2.6, August 15, 2004, through 1.2.37, June 4, 2009, are + * Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: * @@ -363,13 +370,13 @@ * Y2K compliance in libpng: * ========================= * - * February 14, 2009 + * June 4, 2009 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.2.35 are Y2K compliant. It is my belief that earlier + * upward through 1.2.37 are Y2K compliant. It is my belief that earlier * versions were also Y2K compliant. * * Libpng only has three year fields. One is a 2-byte unsigned integer @@ -425,9 +432,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.2.35" +#define PNG_LIBPNG_VER_STRING "1.2.37" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.2.35 - February 14, 2009\n" + " libpng version 1.2.37 - June 4, 2009\n" #define PNG_LIBPNG_VER_SONUM 0 #define PNG_LIBPNG_VER_DLLNUM 13 @@ -435,7 +442,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 2 -#define PNG_LIBPNG_VER_RELEASE 35 +#define PNG_LIBPNG_VER_RELEASE 37 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ @@ -463,7 +470,7 @@ * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10235 /* 1.2.35 */ +#define PNG_LIBPNG_VER 10237 /* 1.2.37 */ #ifndef PNG_VERSION_INFO_ONLY /* include the compression library's header */ @@ -1487,7 +1494,7 @@ /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef png_structp version_1_2_35; +typedef png_structp version_1_2_37; typedef png_struct FAR * FAR * png_structpp; @@ -1987,6 +1994,11 @@ * If buffered output is not used, then output_flush_fn can be set to NULL. * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. */ extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); @@ -2556,64 +2568,72 @@ #ifndef PNG_DEBUG_FILE #define PNG_DEBUG_FILE stderr #endif /* PNG_DEBUG_FILE */ + #if (PNG_DEBUG > 1) -#ifndef png_debug /* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on * non-ISO compilers */ -#ifdef __STDC__ -#define png_debug(l,m) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ -} -#endif -#ifndef png_debug1 -#define png_debug1(l,m,p1) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ -} -#endif -#ifndef png_debug2 -#define png_debug2(l,m,p1,p2) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ -} -#endif -#else /* __STDC __ */ -#ifndef png_debug -#define png_debug(l,m) \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format); -#endif -#ifndef png_debug1 -#define png_debug1(l,m,p1) \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1); -#endif -#ifndef png_debug2 -#define png_debug2(l,m,p1,p2) \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1,p2); -#endif -#endif /* __STDC __ */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } +# endif +# endif /* __STDC __ */ #endif /* (PNG_DEBUG > 1) */ + #endif /* _MSC_VER */ #endif /* (PNG_DEBUG > 0) */ #endif /* PNG_DEBUG */ @@ -2708,6 +2728,7 @@ #if !defined(PNG_1_0_X) /* png.c, pnggccrd.c, or pngvcrd.c */ extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); +#endif /* PNG_1_0_X */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ /* Strip the prepended error numbers ("#nnn ") from error and warning @@ -2717,8 +2738,6 @@ png_ptr, png_uint_32 strip_mode)); #endif -#endif /* PNG_1_0_X */ - /* Added at libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp Modified: haiku/branches/features/32bit-wchar_t/headers/libs/png/pngconf.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/libs/png/pngconf.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/libs/png/pngconf.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.2.35 - February 14, 2009 + * libpng version 1.2.37 - June 4, 2009 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -314,21 +314,29 @@ #ifdef PNG_SETJMP_SUPPORTED /* This is an attempt to force a single setjmp behaviour on Linux. If * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. + * + * You can bypass this test if you know that your application uses exactly + * the same setjmp.h that was included when libpng was built. Only define + * PNG_SKIP_SETJMP_CHECK while building your application, prior to the + * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK + * while building a separate libpng library for general use. */ -# ifdef __linux__ -# ifdef _BSD_SOURCE -# define PNG_SAVE_BSD_SOURCE -# undef _BSD_SOURCE -# endif -# ifdef _SETJMP_H - /* If you encounter a compiler error here, see the explanation - * near the end of INSTALL. - */ - __pngconf.h__ already includes setjmp.h; - __dont__ include it again.; -# endif -# endif /* __linux__ */ +# ifndef PNG_SKIP_SETJMP_CHECK +# ifdef __linux__ +# ifdef _BSD_SOURCE +# define PNG_SAVE_BSD_SOURCE +# undef _BSD_SOURCE +# endif +# ifdef _SETJMP_H + /* If you encounter a compiler error here, see the explanation + * near the end of INSTALL. + */ + __pngconf.h__ in libpng already includes setjmp.h; + __dont__ include it again.; +# endif +# endif /* __linux__ */ +# endif /* PNG_SKIP_SETJMP_CHECK */ /* include setjmp.h for error handling */ # include @@ -800,7 +808,6 @@ # define PNG_USER_HEIGHT_MAX 1000000L #endif - /* Added at libpng-1.2.34 and 1.4.0 */ #ifndef PNG_STRING_NEWLINE #define PNG_STRING_NEWLINE "\n" Modified: haiku/branches/features/32bit-wchar_t/headers/os/interface/View.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/interface/View.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/os/interface/View.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006, Haiku. + * Copyright 2001-2009, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -532,6 +532,7 @@ void EnableLayoutInvalidation(); void DisableLayoutInvalidation(); bool IsLayoutValid() const; + void ResetLayoutInvalidation(); BLayoutContext* LayoutContext() const; Modified: haiku/branches/features/32bit-wchar_t/headers/os/kernel/debugger.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/kernel/debugger.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/os/kernel/debugger.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -455,9 +455,6 @@ typedef struct { debug_origin origin; debug_cpu_state cpu_state; // cpu state - bool software; // true, if the is a software breakpoint - // (i.e. caused by a respective trap - // instruction) } debug_breakpoint_hit; // B_DEBUGGER_MESSAGE_WATCHPOINT_HIT Modified: haiku/branches/features/32bit-wchar_t/headers/os/support/String.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/support/String.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/os/support/String.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -113,6 +113,8 @@ bool operator>(const char* string) const; bool operator!=(const char* string) const; + operator const char*() const; + // strcmp()-style compare functions int Compare(const BString& string) const; int Compare(const char* string) const; @@ -423,6 +425,13 @@ } +inline +BString::operator const char*() const +{ + return String(); +} + + inline bool operator<(const char *str, const BString &string) { Modified: haiku/branches/features/32bit-wchar_t/headers/posix/math.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/posix/math.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/posix/math.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006, Haiku. + * Copyright 2001-2009, Haiku. * Distributed under the terms of the MIT License. */ #ifndef _MATH_H_ @@ -20,9 +20,6 @@ #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ -#define PI M_PI -#define PI2 M_PI_2 - /* platform independent IEEE floating point special values */ #define __HUGE_VAL_v 0x7ff0000000000000LL #define __huge_val_t union { unsigned char __c[8]; long long __ll; double __d; } @@ -34,7 +31,7 @@ #define __huge_valf_t union { unsigned char __c[4]; long __l; float __f; } #define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) -/* ToDo: define HUGE_VALL for long doubles */ +/* TODO: define HUGE_VALL for long doubles */ #define __NAN_VALF_v 0x7fc00000L #define NAN (((__huge_valf_t) { __l: __NAN_VALF_v }).__f) @@ -79,149 +76,149 @@ #endif /* float math functions */ -extern float acosf(float x); -extern float acoshf(float x); -extern float asinf(float x); -extern float asinhf(float x); -extern float atan2f(float y, float x); -extern float atanf(float x); -extern float atanhf(float x); -extern float cbrtf(float x); -extern float ceilf(float x); -extern float cosf(float x); -extern float coshf(float x); -extern float expf(float x); -extern float expm1f(float x); -extern float fabsf(float x); -extern float floorf(float x); -extern float fmodf(float x, float y); -extern float frexpf(float x, int *_exponent); -extern float gammaf(float x); -extern float hypotf(float x, float y); -extern float ldexpf(float x, int exponent); -extern float lgammaf(float x); -extern long long llrintf(float x); -extern float log10f(float x); -extern float log1pf(float x); -extern float logbf(float x); -extern float logf(float x); -extern long lrintf(float x); -extern long lroundf(float x); -extern float modff(float x, float *y); -extern float nearbyintf(float x); -extern float powf(float x, float y); -extern float remquof(float x, float y, int *quo); -extern float roundf(float x); -extern float sinf(float x); -extern float sinhf(float x); -extern float sqrtf(float x); -extern float tanf(float x); -extern float tanhf(float x); +extern float acosf(float x); +extern float acoshf(float x); +extern float asinf(float x); +extern float asinhf(float x); +extern float atan2f(float y, float x); +extern float atanf(float x); +extern float atanhf(float x); +extern float cbrtf(float x); +extern float ceilf(float x); +extern float cosf(float x); +extern float coshf(float x); +extern float expf(float x); +extern float expm1f(float x); +extern float fabsf(float x); +extern float floorf(float x); +extern float fmodf(float x, float y); +extern float frexpf(float x, int *_exponent); +extern float gammaf(float x); +extern float hypotf(float x, float y); +extern float ldexpf(float x, int exponent); +extern float lgammaf(float x); +extern long long llrintf(float x); +extern float log10f(float x); +extern float log1pf(float x); +extern float logbf(float x); +extern float logf(float x); +extern long lrintf(float x); +extern long lroundf(float x); +extern float modff(float x, float *y); +extern float nearbyintf(float x); +extern float powf(float x, float y); +extern float remquof(float x, float y, int *quo); +extern float roundf(float x); +extern float sinf(float x); +extern float sinhf(float x); +extern float sqrtf(float x); +extern float tanf(float x); +extern float tanhf(float x); /* double math functions */ -extern double acos(double x); -extern double acosh(double x); -extern double asin(double x); -extern double asinh(double x); -extern double atan(double x); -extern double atan2(double x, double y); -extern double atanh(double x); -extern double ceil(double x); -extern double cos(double x); -extern double cosh(double x); -extern double exp(double x); -extern double fabs(double x); -extern double floor(double x); -extern double fmod(double x, double y); -extern double frexp(double x, int *_exponent); -extern double gamma(double x); -extern double ldexp(double x, int exponent); -extern double lgamma(double x); -extern long long llrint(double x); -extern double log(double x); -extern double log10(double x); -extern long lrint(double x); -extern long lround(double x); -extern double modf(double x, double *y); -extern double nearbyint(double x); -extern double pow(double x, double y); -extern double remquo(double x, double y, int *quo); -extern double round(double x); -extern double sin(double x); -extern double sinh(double x); -extern double sqrt(double x); -extern double tan(double x); -extern double tanh(double x); -extern double trunc(double x); +extern double acos(double x); +extern double acosh(double x); +extern double asin(double x); +extern double asinh(double x); +extern double atan(double x); +extern double atan2(double x, double y); +extern double atanh(double x); +extern double ceil(double x); +extern double cos(double x); +extern double cosh(double x); +extern double exp(double x); +extern double fabs(double x); +extern double floor(double x); +extern double fmod(double x, double y); +extern double frexp(double x, int *_exponent); +extern double gamma(double x); +extern double ldexp(double x, int exponent); +extern double lgamma(double x); +extern long long llrint(double x); +extern double log(double x); +extern double log10(double x); +extern long lrint(double x); +extern long lround(double x); +extern double modf(double x, double *y); +extern double nearbyint(double x); +extern double pow(double x, double y); +extern double remquo(double x, double y, int *quo); +extern double round(double x); +extern double sin(double x); +extern double sinh(double x); +extern double sqrt(double x); +extern double tan(double x); +extern double tanh(double x); +extern double trunc(double x); /* long double math functions */ -extern long double acosl(long double x); -extern long double acoshl(long double x); -extern long double asinl(long double x); -extern long double atanl(long double x); -extern long double atanhl(long double x); -extern long double atan2l(long double y, long double x); +extern long double acosl(long double x); +extern long double acoshl(long double x); +extern long double asinl(long double x); +extern long double atanl(long double x); +extern long double atanhl(long double x); +extern long double atan2l(long double y, long double x); extern long double lgammal(long double x); -extern long double nearbyintl(long double x); +extern long double nearbyintl(long double x); extern long long llrintl(long double x); -extern long lrintl(long double x); -extern long lroundl(long double x); -extern long double remquol(long double x, long double y, int *quo); +extern long lrintl(long double x); +extern long lroundl(long double x); +extern long double remquol(long double x, long double y, int *quo); extern long double roundl(long double x); /* some BSD non-ANSI or POSIX math functions */ -extern double cbrt(double x); -extern double erf(double x); -extern double erfc(double x); -extern double expm1(double x); -extern double gamma_r(double x, int *y); -extern double hypot(double x, double y); -extern int ilogb(double x); -extern double j0(double x); -extern double j1(double x); -extern double jn(int x, double y); -extern double lgamma_r(double x, int *y); -extern double log1p(double x); -extern double logb(double x); -extern double nextafter(double x, double y); -extern double nexttoward(double x, long double y); -extern double remainder(double x, double y); -extern double rint(double x); -extern double scalb (double x, double y); -extern double y0(double x); -extern double y1(double x); -extern double yn(int x, double y); +extern double cbrt(double x); +extern double erf(double x); +extern double erfc(double x); +extern double expm1(double x); +extern double gamma_r(double x, int *y); +extern double hypot(double x, double y); +extern int ilogb(double x); +extern double j0(double x); +extern double j1(double x); +extern double jn(int x, double y); +extern double lgamma_r(double x, int *y); +extern double log1p(double x); +extern double logb(double x); +extern double nextafter(double x, double y); +extern double nexttoward(double x, long double y); +extern double remainder(double x, double y); +extern double rint(double x); +extern double scalb (double x, double y); +extern double y0(double x); +extern double y1(double x); +extern double yn(int x, double y); /* other stuff as defined in BeOS */ -extern int isinff(float value); -extern int finitef(float value); -extern float dremf(float x, float y); -extern float significandf(float x); -extern float copysignf(float x, float y); -extern int isnanf(float value); -extern double significand(double x); -extern double copysign(double x, double y); -extern double scalbln(double x, long n); -extern double scalbn(double x, int y); -extern double drem(double x, double y); -extern int finite(double x); -extern float j0f(float x); -extern float j1f(float x); -extern float jnf(int x, float y); -extern float y0f(float x); -extern float y1f(float x); -extern float ynf(int x, float y); -extern float erff(float x); -extern float erfcf(float x); -extern float gammaf_r(float x, int *y); -extern float lgammaf_r(float x, int *y); -extern float rintf(float x); -extern float nextafterf(float x, float y); -extern float nexttowardf(float x, long double y); -extern float remainderf(float x, float y); -extern float scalbf(float x, float n); -extern float scalbnf(float x, int n); -extern int ilogbf(float x); +extern int isinff(float value); +extern int finitef(float value); +extern float dremf(float x, float y); +extern float significandf(float x); +extern float copysignf(float x, float y); +extern int isnanf(float value); +extern double significand(double x); +extern double copysign(double x, double y); +extern double scalbln(double x, long n); +extern double scalbn(double x, int y); +extern double drem(double x, double y); +extern int finite(double x); +extern float j0f(float x); +extern float j1f(float x); +extern float jnf(int x, float y); +extern float y0f(float x); +extern float y1f(float x); +extern float ynf(int x, float y); +extern float erff(float x); +extern float erfcf(float x); +extern float gammaf_r(float x, int *y); +extern float lgammaf_r(float x, int *y); +extern float rintf(float x); +extern float nextafterf(float x, float y); +extern float nexttowardf(float x, long double y); +extern float remainderf(float x, float y); +extern float scalbf(float x, float n); +extern float scalbnf(float x, int n); +extern int ilogbf(float x); extern long double nextafterl(long double x, long double y); extern long double nexttowardl(long double x, long double y); @@ -231,23 +228,23 @@ extern long double scalblnl(long double x, long n); /* prototypes for functions used in the macros below */ -extern int __fpclassifyf(float value); -extern int __signbitf(float value); -extern int __finitef(float value); -extern int __isnanf(float value); -extern int __isinff(float value); +extern int __fpclassifyf(float value); +extern int __signbitf(float value); +extern int __finitef(float value); +extern int __isnanf(float value); +extern int __isinff(float value); -extern int __fpclassifyl(long double value); -extern int __signbitl(long double value); -extern int __finitel(long double value); -extern int __isnanl(long double value); -extern int __isinfl(long double value); +extern int __fpclassifyl(long double value); +extern int __signbitl(long double value); +extern int __finitel(long double value); +extern int __isnanl(long double value); +extern int __isinfl(long double value); -extern int __fpclassify(double value); -extern int __signbit(double value); -extern int __finite(double value); -extern int __isnan(double value); -extern int __isinf(double value); +extern int __fpclassify(double value); +extern int __signbit(double value); +extern int __finite(double value); +extern int __isnan(double value); +extern int __isinf(double value); /* returns number of classification appropriate for 'value' */ #define fpclassify(value) \ Modified: haiku/branches/features/32bit-wchar_t/headers/private/graphics/nvidia/DriverInterface.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/graphics/nvidia/DriverInterface.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/private/graphics/nvidia/DriverInterface.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -350,12 +350,12 @@ bool slaved_tmds2; /* external TMDS encoder active on CRTC2 */ bool master_tmds1; /* on die TMDS encoder active on CRTC1 */ bool master_tmds2; /* on die TMDS encoder active on CRTC2 */ - display_timing p1_timing; /* 'modeline' fetched for panel 1 */ - display_timing p2_timing; /* 'modeline' fetched for panel 2 */ - float crtc1_aspect; /* screen's aspect ratio */ - float crtc2_aspect; /* screen's aspect ratio */ + display_timing p1_timing; /* 'modeline' fetched for panel at CRTC1 */ + display_timing p2_timing; /* 'modeline' fetched for panel at CRTC2 */ edid_specs con1_screen; /* EDID properties of the screen connected to connector 1 */ edid_specs con2_screen; /* EDID properties of the screen connected to connector 2 */ + edid_specs crtc1_screen; /* EDID properties of the screen connected to CRTC1 */ + edid_specs crtc2_screen; /* EDID properties of the screen connected to CRTC2 */ bool crtc2_prim; /* using CRTC2 as primary CRTC */ bool i2c_bus0; /* we have a wired I2C bus 0 on board */ bool i2c_bus1; /* we have a wired I2C bus 1 on board */ Modified: haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/debug.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/debug.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/debug.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -23,7 +23,7 @@ void *arch_debug_get_caller(void); int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount, int32 skipIframes, int32 skipFrames, bool userOnly); -void *arch_debug_get_interrupt_pc(); +void* arch_debug_get_interrupt_pc(bool* _isSyscall); bool arch_debug_contains_call(struct thread *thread, const char *symbol, addr_t start, addr_t end); void arch_debug_save_registers(int *); Modified: haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/user_debugger.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/user_debugger.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/user_debugger.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -50,6 +50,34 @@ #include +// Defaults for macros defined by the architecture specific header: + +// maximum number of instruction breakpoints +#ifndef DEBUG_MAX_BREAKPOINTS +# define DEBUG_MAX_BREAKPOINTS 0 +#endif + +// maximum number of data watchpoints +#ifndef DEBUG_MAX_WATCHPOINTS +# define DEBUG_MAX_WATCHPOINTS 0 +#endif + +// the software breakpoint instruction +#if !defined(DEBUG_SOFTWARE_BREAKPOINT) \ + || !defined(DEBUG_SOFTWARE_BREAKPOINT_SIZE) +# undef DEBUG_SOFTWARE_BREAKPOINT +# undef DEBUG_SOFTWARE_BREAKPOINT_SIZE +# define DEBUG_SOFTWARE_BREAKPOINT NULL +# define DEBUG_SOFTWARE_BREAKPOINT_SIZE 0 +#endif + +// Boolean whether break- and watchpoints use the same registers. If != 0, then +// DEBUG_MAX_BREAKPOINTS == DEBUG_MAX_WATCHPOINTS and either specifies the +// total count of break- plus watchpoints. +#ifndef DEBUG_SHARED_BREAK_AND_WATCHPOINTS +# define DEBUG_SHARED_BREAK_AND_WATCHPOINTS 0 +#endif + #endif // _ASSEMBLER #endif // KERNEL_ARCH_USER_DEBUGGER_H Modified: haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/x86/arch_user_debugger.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/x86/arch_user_debugger.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/branches/features/32bit-wchar_t/headers/private/kernel/arch/x86/arch_user_debugger.h 2009-07-01 17:29:45 UTC (rev 31356) @@ -1,5 +1,5 @@ /* - * Copyright 2005, Ingo Weinhold, bonefish at users.sf.net. + * Copyright 2005-2009, Ingo Weinhold, bonefish at users.sf.net. * Distributed under the terms of the MIT License. */ #ifndef _KERNEL_ARCH_X86_USER_DEBUGGER_H @@ -9,9 +9,7 @@ // number of breakpoints the CPU supports // Actually it supports 4, but DR3 is used to hold the struct thread*. -enum { - X86_BREAKPOINT_COUNT = 3, -}; +#define X86_BREAKPOINT_COUNT 3 // debug status register DR6 enum { @@ -110,6 +108,9 @@ uint32 flags; }; +// The software breakpoint instruction (int3). +extern const uint8 kX86SoftwareBreakpoint[1]; + #ifdef __cplusplus extern "C" { #endif @@ -129,4 +130,11 @@ } #endif +// Feature macros we're supposed to define. +#define DEBUG_MAX_BREAKPOINTS X86_BREAKPOINT_COUNT +#define DEBUG_MAX_WATCHPOINTS X86_BREAKPOINT_COUNT +#define DEBUG_SOFTWARE_BREAKPOINT kX86SoftwareBreakpoint +#define DEBUG_SOFTWARE_BREAKPOINT_SIZE 1 +#define DEBUG_SHARED_BREAK_AND_WATCHPOINTS 1 + #endif // _KERNEL_ARCH_X86_USER_DEBUGGER_H [... truncated: 32990 lines follow ...] From umccullough at gmail.com Wed Jul 1 19:30:28 2009 From: umccullough at gmail.com (Urias McCullough) Date: Wed, 1 Jul 2009 10:30:28 -0700 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev In-Reply-To: References: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> <20090701184917.18848.1@bepc.1246454724.fake> Message-ID: <1e80d8750907011030oc17057dgbd2e8a9bb6c09f5f@mail.gmail.com> 2009/7/1 J?r?me Duval : > 2009/7/1 Oliver Tappe >> >> BTW: does anyone know a way to ask jam to build all targets? >> > > jam -a I suspect he meant - *all* targets, including those that aren't part of the "haiku image" (which is the default target if none is specified) - Urias From anevilyak at gmail.com Wed Jul 1 19:32:31 2009 From: anevilyak at gmail.com (Rene Gollent) Date: Wed, 1 Jul 2009 12:32:31 -0500 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev In-Reply-To: <1e80d8750907011030oc17057dgbd2e8a9bb6c09f5f@mail.gmail.com> References: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> <20090701184917.18848.1@bepc.1246454724.fake> <1e80d8750907011030oc17057dgbd2e8a9bb6c09f5f@mail.gmail.com> Message-ID: On Wed, Jul 1, 2009 at 12:30 PM, Urias McCullough wrote: > I suspect he meant - *all* targets, including those that aren't part > of the "haiku image" (which is the default target if none is > specified) Yeah, that's precisely what he meant. Unfortunately, I don't know how myself. Regards, Rene From ingo_weinhold at gmx.de Wed Jul 1 20:17:47 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 01 Jul 2009 20:17:47 +0200 Subject: [Haiku-commits] r31353 - in haiku/branches/features/32bit-wchar_t: build/jam src/add-ons/disk_systems/bfs src/add-ons/disk_systems/intel src/add-ons/input_server/devices/keyboard src/add-ons/input_server/devices/mouse src/add-ons/input_server/dev In-Reply-To: <20090701184917.18848.1@bepc.1246454724.fake> References: <7e5795b0907010634l7f82d0eh947670d6db638228@mail.gmail.com> <20090701184917.18848.1@bepc.1246454724.fake> Message-ID: <20090701201747.373.1@knochen-vm.localdomain> On 2009-07-01 at 18:49:17 [+0200], Oliver Tappe wrote: > BTW: does anyone know a way to ask jam to build all targets? You'll have to go into the individual subdirectories of src/ and invoke jam there. I suppose you don't want to build everything (or anything) in src/tests anyway. CU, Ingo From stippi at mail.berlios.de Wed Jul 1 20:50:27 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 20:50:27 +0200 Subject: [Haiku-commits] r31357 - haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview Message-ID: <200907011850.n61IoQDb011818@sheep.berlios.de> Author: stippi Date: 2009-07-01 20:50:22 +0200 (Wed, 01 Jul 2009) New Revision: 31357 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31357&view=rev Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.cpp haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.h haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.cpp haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.h Log: Extended the ScrollView API a bit. Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.cpp 2009-07-01 17:29:45 UTC (rev 31356) +++ haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.cpp 2009-07-01 18:50:22 UTC (rev 31357) @@ -37,6 +37,9 @@ virtual void ValueChanged(float value); + virtual void MouseDown(BPoint where); + virtual void MouseUp(BPoint where); + private: ScrollView* fScrollView; }; @@ -64,6 +67,26 @@ fScrollView->_ScrollValueChanged(this, value); } +// MouseDown +void +InternalScrollBar::MouseDown(BPoint where) +{ + if (fScrollView) + fScrollView->_SetScrolling(true); + BScrollBar::MouseDown(where); +} + +// MouseUp +void +InternalScrollBar::MouseUp(BPoint where) +{ + BScrollBar::MouseUp(where); + if (fScrollView) + fScrollView->_SetScrolling(false); +} + + + // #pragma mark -ScrollCorner class ScrollCorner : public BView { @@ -124,7 +147,7 @@ int32 bpr = fBitmaps[0]->BytesPerRow(); for (int i = 0; i <= sBitmapHeight; i++, bits += bpr) memcpy(bits, &sScrollCornerNormalBits[i * sBitmapHeight * 4], sBitmapWidth * 4); - + //printf("setting up bitmap 1\n"); fBitmaps[1] = new BBitmap(BRect(0.0f, 0.0f, sBitmapWidth, sBitmapHeight), sColorSpace); // fBitmaps[1]->SetBits((void *)sScrollCornerPushedBits, fBitmaps[1]->BitsLength(), 0L, sColorSpace); @@ -257,63 +280,35 @@ } } + // #pragma mark - ScrollView + // constructor ScrollView::ScrollView(BView* child, uint32 scrollingFlags, BRect frame, - const char *name, uint32 resizingMode, uint32 viewFlags, - uint32 borderStyle, uint32 borderFlags) - : BView(frame, name, resizingMode, viewFlags | B_FRAME_EVENTS | B_WILL_DRAW - | B_FULL_UPDATE_ON_RESIZE), - Scroller(), - fChild(NULL), - fScrollingFlags(scrollingFlags), + const char* name, uint32 resizingMode, uint32 viewFlags, + uint32 borderStyle, uint32 borderFlags) + : BView(frame, name, resizingMode, + viewFlags | B_FRAME_EVENTS | B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE), + Scroller() +{ + _Init(child, scrollingFlags, borderStyle, borderFlags); +} - fHScrollBar(NULL), - fVScrollBar(NULL), - fScrollCorner(NULL), +#ifdef __HAIKU__ - fHVisible(true), - fVVisible(true), - fCornerVisible(true), - - fWindowActive(false), - fChildFocused(false), - - fHSmallStep(1), - fVSmallStep(1), - - fBorderStyle(borderStyle), - fBorderFlags(borderFlags) +// constructor +ScrollView::ScrollView(BView* child, uint32 scrollingFlags, const char* name, + uint32 viewFlags, uint32 borderStyle, uint32 borderFlags) + : BView(name, viewFlags | B_FRAME_EVENTS | B_WILL_DRAW + | B_FULL_UPDATE_ON_RESIZE), + Scroller() { - // Set transparent view color -- our area is completely covered by - // our children. - SetViewColor(B_TRANSPARENT_32_BIT); - // create scroll bars - if (fScrollingFlags & (SCROLL_HORIZONTAL | SCROLL_HORIZONTAL_MAGIC)) { - fHScrollBar = new InternalScrollBar(this, - BRect(0.0, 0.0, 100.0, B_H_SCROLL_BAR_HEIGHT), B_HORIZONTAL); - AddChild(fHScrollBar); - } - if (fScrollingFlags & (SCROLL_VERTICAL | SCROLL_VERTICAL_MAGIC)) { - fVScrollBar = new InternalScrollBar(this, - BRect(0.0, 0.0, B_V_SCROLL_BAR_WIDTH, 100.0), B_VERTICAL); - AddChild(fVScrollBar); - } - // Create a scroll corner, if we can scroll into both direction. - if (fHScrollBar && fVScrollBar) { - fScrollCorner = new ScrollCorner(this); - AddChild(fScrollCorner); - } - // add child - if (child) { - fChild = child; - AddChild(child); - if (Scrollable* scrollable = dynamic_cast(child)) - SetScrollTarget(scrollable); - } + _Init(child, scrollingFlags, borderStyle, borderFlags); } +#endif // __HAIKU__ + // destructor ScrollView::~ScrollView() { @@ -528,6 +523,21 @@ return fVSmallStep; } +// IsScrolling +bool +ScrollView::IsScrolling() const +{ + return fScrolling; +} + +void +ScrollView::SetScrollingEnabled(bool enabled) +{ + Scroller::SetScrollingEnabled(enabled); + if (IsScrollingEnabled()) + SetScrollOffset(ScrollOffset()); +} + // #pragma mark - // DataRectChanged @@ -583,10 +593,69 @@ */ } +// _Init +void +ScrollView::_Init(BView* child, uint32 scrollingFlags, uint32 borderStyle, + uint32 borderFlags) +{ + fChild = NULL; + fScrollingFlags = scrollingFlags; + + fHScrollBar = NULL; + fVScrollBar = NULL; + fScrollCorner = NULL; + + fHVisible = true; + fVVisible = true; + fCornerVisible = true; + + fWindowActive = false; + fChildFocused = false; + + fScrolling = false; + + fHSmallStep = 1; + fVSmallStep = 1; + + fBorderStyle = borderStyle; + fBorderFlags = borderFlags; + + // Set transparent view color -- our area is completely covered by + // our children. + SetViewColor(B_TRANSPARENT_32_BIT); + // create scroll bars + if (fScrollingFlags & (SCROLL_HORIZONTAL | SCROLL_HORIZONTAL_MAGIC)) { + fHScrollBar = new InternalScrollBar(this, + BRect(0.0, 0.0, 100.0, B_H_SCROLL_BAR_HEIGHT), B_HORIZONTAL); + AddChild(fHScrollBar); + } + if (fScrollingFlags & (SCROLL_VERTICAL | SCROLL_VERTICAL_MAGIC)) { + fVScrollBar = new InternalScrollBar(this, + BRect(0.0, 0.0, B_V_SCROLL_BAR_WIDTH, 100.0), B_VERTICAL); + AddChild(fVScrollBar); + } + // Create a scroll corner, if we can scroll into both direction. + if (fHScrollBar && fVScrollBar) { + fScrollCorner = new ScrollCorner(this); + AddChild(fScrollCorner); + } + // add child + if (child) { + fChild = child; + AddChild(child); + if (Scrollable* scrollable = dynamic_cast(child)) + SetScrollTarget(scrollable); + } +} + + // _ScrollValueChanged void ScrollView::_ScrollValueChanged(InternalScrollBar* scrollBar, float value) { + if (!IsScrollingEnabled()) + return; + switch (scrollBar->Orientation()) { case B_HORIZONTAL: if (fHScrollBar) @@ -682,14 +751,14 @@ dataRect.Set(0.0, 0.0, 0.0, 0.0); visibleBounds.Set(0.0, 0.0, 0.0, 0.0); } - float hProportion = min(1.0f, (visibleBounds.Width() + 1.0f) / - (dataRect.Width() + 1.0f)); - float hMaxValue = max(dataRect.left, - dataRect.right - visibleBounds.Width()); - float vProportion = min(1.0f, (visibleBounds.Height() + 1.0f) / - (dataRect.Height() + 1.0f)); - float vMaxValue = max(dataRect.top, - dataRect.bottom - visibleBounds.Height()); + float hProportion = min_c(1.0f, (visibleBounds.Width() + 1.0f) + / (dataRect.Width() + 1.0f)); + float hMaxValue = max_c(dataRect.left, + dataRect.right - visibleBounds.Width()); + float vProportion = min_c(1.0f, (visibleBounds.Height() + 1.0f) + / (dataRect.Height() + 1.0f)); + float vMaxValue = max_c(dataRect.top, + dataRect.bottom - visibleBounds.Height()); // update horizontal scroll bar if (fHScrollBar) { fHScrollBar->SetProportion(hProportion); @@ -894,6 +963,7 @@ } #ifdef __HAIKU__ + BSize ScrollView::_Size(BSize size) { @@ -939,5 +1009,12 @@ return BLayoutUtils::ComposeSize(ExplicitMinSize(), size); } + #endif // __HAIKU__ +// _SetScrolling +void +ScrollView::_SetScrolling(bool scrolling) +{ + fScrolling = scrolling; +} Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.h =================================================================== --- haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.h 2009-07-01 17:29:45 UTC (rev 31356) +++ haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.h 2009-07-01 18:50:22 UTC (rev 31357) @@ -1,11 +1,4 @@ -/* - * Copyright 2006, Haiku. - * Distributed under the terms of the MIT License. - * - * Authors: - * Stephan A?mus - * Ingo Weinhold - */ +// ScrollView.h #ifndef SCROLL_VIEW_H #define SCROLL_VIEW_H @@ -23,7 +16,9 @@ SCROLL_VERTICAL = 0x02, SCROLL_HORIZONTAL_MAGIC = 0x04, SCROLL_VERTICAL_MAGIC = 0x08, - SCROLL_VISIBLE_RECT_IS_CHILD_BOUNDS = 0x10 + SCROLL_VISIBLE_RECT_IS_CHILD_BOUNDS = 0x10, + SCROLL_NO_FRAME = 0x20, + SCROLL_LIST_FRAME = 0x40, }; enum { @@ -36,12 +31,18 @@ class ScrollView : public BView, public Scroller { - public: +public: ScrollView(BView* child, uint32 scrollingFlags, BRect frame, const char *name, uint32 resizingMode, uint32 viewFlags, uint32 borderStyle = B_FANCY_BORDER, uint32 borderFlags = BORDER_ALL); +#ifdef __HAIKU__ + ScrollView(BView* child, uint32 scrollingFlags, + const char *name, uint32 viewFlags, + uint32 borderStyle = B_FANCY_BORDER, + uint32 borderFlags = BORDER_ALL); +#endif // __HAIKU__ virtual ~ScrollView(); virtual void AllAttached(); @@ -50,10 +51,11 @@ virtual void WindowActivated(bool activated); #ifdef __HAIKU__ + virtual BSize MinSize(); virtual BSize PreferredSize(); -#endif +#endif // __HAIKU__ uint32 ScrollingFlags() const; void SetVisibleRectIsChildBounds(bool flag); @@ -74,6 +76,9 @@ float HSmallStep() const; float VSmallStep() const; + virtual bool IsScrolling() const; + virtual void SetScrollingEnabled(bool enabled); + protected: virtual void DataRectChanged(BRect oldDataRect, BRect newDataRect); @@ -97,12 +102,16 @@ bool fCornerVisible; // scroll corner visible flag bool fWindowActive; bool fChildFocused; + bool fScrolling; float fHSmallStep; float fVSmallStep; uint32 fBorderStyle; uint32 fBorderFlags; + void _Init(BView* child, uint32 scrollingFlags, + uint32 borderStyle, uint32 borderFlags); + void _ScrollValueChanged( InternalScrollBar* scrollBar, float value); @@ -124,6 +133,8 @@ virtual BSize _Size(BSize childSize); #endif + void _SetScrolling(bool scrolling); + friend class InternalScrollBar; friend class ScrollCorner; }; Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.cpp 2009-07-01 17:29:45 UTC (rev 31356) +++ haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.cpp 2009-07-01 18:50:22 UTC (rev 31357) @@ -17,7 +17,8 @@ // constructor Scroller::Scroller() - : fScrollTarget(NULL) + : fScrollTarget(NULL), + fScrollingEnabled(true) { } @@ -135,7 +136,20 @@ return BRect(); } +// SetScrollingEnabled +void +Scroller::SetScrollingEnabled(bool enabled) +{ + fScrollingEnabled = enabled; +} +// IsScrolling +bool +Scroller::IsScrolling() const +{ + return false; +} + // hooks // DataRectChanged Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.h =================================================================== --- haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.h 2009-07-01 17:29:45 UTC (rev 31356) +++ haiku/trunk/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.h 2009-07-01 18:50:22 UTC (rev 31357) @@ -5,7 +5,6 @@ * Authors: * Ingo Weinhold */ - #ifndef SCROLLER_H #define SCROLLER_H @@ -31,6 +30,12 @@ BRect VisibleBounds() const; BRect VisibleRect() const; + virtual void SetScrollingEnabled(bool enabled); + bool IsScrollingEnabled() const + { return fScrollingEnabled; } + + virtual bool IsScrolling() const; + protected: virtual void DataRectChanged(BRect oldDataRect, BRect newDataRect); @@ -45,6 +50,7 @@ protected: Scrollable* fScrollTarget; + bool fScrollingEnabled; friend class Scrollable; }; From stippi at mail.berlios.de Wed Jul 1 20:52:55 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 20:52:55 +0200 Subject: [Haiku-commits] r31358 - in haiku/trunk: build/jam src/add-ons/media/plugins/avcodec Message-ID: <200907011852.n61Iqt5R011976@sheep.berlios.de> Author: stippi Date: 2009-07-01 20:52:48 +0200 (Wed, 01 Jul 2009) New Revision: 31358 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31358&view=rev Added: haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.h haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.h haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.h Removed: haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp Modified: haiku/trunk/build/jam/HaikuImage haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile Log: Cleaned up the source file names and code locations in the avcodec plugin, unified the Reader and Decoder plugins and renamed the add-on to "ffmpeg". Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2009-07-01 18:50:22 UTC (rev 31357) +++ haiku/trunk/build/jam/HaikuImage 2009-07-01 18:52:48 UTC (rev 31358) @@ -122,7 +122,7 @@ #legacy.media_addon ; SYSTEM_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder - aiff_reader asf_reader au_reader $(X86_ONLY)avcodec avi_reader + aiff_reader asf_reader au_reader avi_reader $(X86_ONLY)ffmpeg matroska mov_reader mp3_decoder mp3_reader mp4_reader musepack Copied: haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.cpp (from rev 31322, haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp) =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp 2009-06-30 10:14:54 UTC (rev 31322) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.cpp 2009-07-01 18:52:48 UTC (rev 31358) @@ -0,0 +1,617 @@ +/* + * Copyright (C) 2001 Carlos Hasan + * Copyright (C) 2001 Fran?ois Revol + * Copyright (C) 2001 Axel D?rfler + * Copyright (C) 2004 Marcus Overhagen + * Copyright (C) 2009 Stephan Am?us + * + * All rights reserved. Distributed under the terms of the MIT License. + */ + +//! libavcodec based decoder for Haiku + +#include "AVCodecDecoder.h" + +#include +#include +#include +#include + +#define DO_PROFILING 0 + +#undef TRACE +#define TRACE_AV_CODEC +#ifdef TRACE_AV_CODEC +# define TRACE(x...) printf(x) +#else +# define TRACE(x...) +#endif + +struct wave_format_ex { + uint16 format_tag; + uint16 channels; + uint32 frames_per_sec; + uint32 avg_bytes_per_sec; + uint16 block_align; + uint16 bits_per_sample; + uint16 extra_size; + // extra_data[extra_size] +} _PACKED; + +static bigtime_t diff1 = 0, diff2 = 0; +static long prof_cnt = 0; + +// uncommenting will make Decode() set the current thread priority to time +// sharing, so it won't totally freeze if you busy-loop in there (to help debug +// with CD Manager) +//#define UNREAL + +AVCodecDecoder::AVCodecDecoder() + : fHeader(), + fInfo(), + fInputFormat(), + fOutputVideoFormat(), + fFrame(0), + isAudio(false), + fCodec(NULL), + ffc(NULL), + fCodecInitDone(false), + conv_func(NULL), + fExtraData(NULL), + fExtraDataSize(0), + fBlockAlign(0), + fOutputBuffer(0) +{ + TRACE("AVCodecDecoder::AVCodecDecoder()\n"); + + // prevent multiple inits + static volatile vint32 ff_init_count = 0; + static bool ff_init_done = false; + if (atomic_add(&ff_init_count, 1) > 1) { + atomic_add(&ff_init_count, -1); + // spin until the thread that is initing is done + while (!ff_init_done) + snooze(20000); + } else { + avcodec_init(); + avcodec_register_all(); + ff_init_done = true; + } + + ffc = avcodec_alloc_context(); + ffpicture = avcodec_alloc_frame(); + opicture = avcodec_alloc_frame(); +} + + +AVCodecDecoder::~AVCodecDecoder() +{ + TRACE("[%c] AVCodecDecoder::~AVCodecDecoder()\n", isAudio?('a'):('v')); + +#ifdef DO_PROFILING + if (prof_cnt > 0) { + printf("[%c] profile: d1 = %lld, d2 = %lld (%Ld)\n", + isAudio?('a'):('v'), diff1/prof_cnt, diff2/prof_cnt, + fFrame); + } +#endif + + if (fCodecInitDone) + avcodec_close(ffc); + + free(opicture); + free(ffpicture); + free(ffc); + + delete [] fExtraData; + delete [] fOutputBuffer; +} + + +void +AVCodecDecoder::GetCodecInfo(media_codec_info *mci) +{ + sprintf(mci->short_name, "ff:%s", fCodec->name); + sprintf(mci->pretty_name, "%s (libavcodec %s)", + gCodecTable[ffcodec_index_in_table].prettyname, fCodec->name); +} + + +status_t +AVCodecDecoder::Setup(media_format *ioEncodedFormat, const void *infoBuffer, + size_t infoSize) +{ + if (ioEncodedFormat->type != B_MEDIA_ENCODED_AUDIO + && ioEncodedFormat->type != B_MEDIA_ENCODED_VIDEO) + return B_ERROR; + + isAudio = (ioEncodedFormat->type == B_MEDIA_ENCODED_AUDIO); + TRACE("[%c] AVCodecDecoder::Setup()\n", isAudio?('a'):('v')); + + if (isAudio && !fOutputBuffer) + fOutputBuffer = new char[AVCODEC_MAX_AUDIO_FRAME_SIZE]; + +//#if DEBUG + char buffer[1024]; + string_for_format(*ioEncodedFormat, buffer, sizeof(buffer)); + TRACE("[%c] input_format=%s\n", isAudio?('a'):('v'), buffer); + TRACE("[%c] infoSize=%ld\n", isAudio?('a'):('v'), infoSize); + TRACE("[%c] user_data_type=%08lx\n", isAudio?('a'):('v'), ioEncodedFormat->user_data_type); + TRACE("[%c] meta_data_size=%ld\n", isAudio?('a'):('v'), ioEncodedFormat->MetaDataSize()); + TRACE("[%c] info_size=%ld\n", isAudio?('a'):('v'), infoSize); +//#endif + + media_format_description descr; + for (int32 i = 0; gCodecTable[i].id; i++) { + ffcodec_index_in_table = i; + uint64 cid; + + if (BMediaFormats().GetCodeFor(*ioEncodedFormat, gCodecTable[i].family, + &descr) == B_OK + && gCodecTable[i].type == ioEncodedFormat->type) { + switch(gCodecTable[i].family) { + case B_WAV_FORMAT_FAMILY: + cid = descr.u.wav.codec; + break; + case B_AIFF_FORMAT_FAMILY: + cid = descr.u.aiff.codec; + break; + case B_AVI_FORMAT_FAMILY: + cid = descr.u.avi.codec; + break; + case B_MPEG_FORMAT_FAMILY: + cid = descr.u.mpeg.id; + break; + case B_QUICKTIME_FORMAT_FAMILY: + cid = descr.u.quicktime.codec; + break; + case B_MISC_FORMAT_FAMILY: + cid = (((uint64)descr.u.misc.file_format) << 32) + | descr.u.misc.codec; + break; + default: + puts("ERR family"); + return B_ERROR; + } + TRACE(" 0x%04lx codec id = \"%c%c%c%c\"\n", uint32(cid), (char)((cid >> 24) & 0xff), + (char)((cid >> 16) & 0xff), (char)((cid >> 8) & 0xff), + (char)(cid & 0xff)); + + if (gCodecTable[i].family == descr.family + && gCodecTable[i].fourcc == cid) { + fCodec = avcodec_find_decoder(gCodecTable[i].id); + if (!fCodec) { + TRACE("AVCodecDecoder: unable to find the correct ffmpeg decoder " + "(id = %d)!!!\n",gCodecTable[i].id); + return B_ERROR; + } + TRACE("AVCodecDecoder: found decoder %s\n",fCodec->name); + + if (gCodecTable[i].family == B_WAV_FORMAT_FAMILY && infoSize >= sizeof(wave_format_ex)) { + const wave_format_ex *wfmt_data + = (const wave_format_ex *)infoBuffer; + size_t wfmt_size = infoSize; + if (wfmt_data && wfmt_size) { + fBlockAlign = wfmt_data->block_align; + fExtraDataSize = wfmt_data->extra_size; + if (fExtraDataSize) { + fExtraData = new char [fExtraDataSize]; + memcpy(fExtraData, wfmt_data + 1, fExtraDataSize); + } + } + } else { + fBlockAlign = ioEncodedFormat->u.encoded_audio.output.buffer_size; + TRACE("AVCodecDecoder: extra data size %ld\n",infoSize); + fExtraDataSize = infoSize; + if (fExtraDataSize) { + fExtraData = new char [fExtraDataSize]; + memcpy(fExtraData, infoBuffer, fExtraDataSize); + } + } + + fInputFormat = *ioEncodedFormat; + return B_OK; + } + } + } + printf("AVCodecDecoder::Setup failed!\n"); + return B_ERROR; +} + + +status_t +AVCodecDecoder::Seek(uint32 seekTo, + int64 seekFrame, int64 *frame, + bigtime_t seekTime, bigtime_t *time) +{ + // reset the ffmpeg codec + // to flush buffers, so we keep the sync + if (isAudio && fCodecInitDone) { + fCodecInitDone = false; + avcodec_close(ffc); + fCodecInitDone = (avcodec_open(ffc, fCodec) >= 0); + } + + if (seekTo == B_MEDIA_SEEK_TO_TIME) { + TRACE("AVCodecDecoder::Seek by time "); + TRACE("from frame %Ld and time %.6f TO Required Time %.6f. ", fFrame, fStartTime / 1000000.0, seekTime / 1000000.0); + + *frame = (int64)(seekTime * fOutputFrameRate / 1000000LL); + *time = seekTime; + } else if (seekTo == B_MEDIA_SEEK_TO_FRAME) { + TRACE("AVCodecDecoder::Seek by Frame "); + TRACE("from time %.6f and frame %Ld TO Required Frame %Ld. ", fStartTime / 1000000.0, fFrame, seekFrame); + + *time = (bigtime_t)(seekFrame * 1000000LL / fOutputFrameRate); + *frame = seekFrame; + } else + return B_BAD_VALUE; + + fFrame = *frame; + fStartTime = *time; + TRACE("so new frame is %Ld at time %.6f\n", *frame, *time / 1000000.0); + return B_OK; +} + + +status_t +AVCodecDecoder::NegotiateOutputFormat(media_format *inout_format) +{ + TRACE("[%c] AVCodecDecoder::NegotiateOutputFormat()\n", isAudio?('a'):('v')); + + int result; + +#if DEBUG + char buffer[1024]; + string_for_format(*inout_format, buffer, sizeof(buffer)); + TRACE("[%c] in_format=%s\n", isAudio?('a'):('v'), buffer); +#endif + + if (isAudio) { + media_multi_audio_format outputAudioFormat; + outputAudioFormat = media_raw_audio_format::wildcard; + outputAudioFormat.format = media_raw_audio_format::B_AUDIO_SHORT; + outputAudioFormat.byte_order = B_MEDIA_HOST_ENDIAN; + outputAudioFormat.frame_rate + = fInputFormat.u.encoded_audio.output.frame_rate; + outputAudioFormat.channel_count + = fInputFormat.u.encoded_audio.output.channel_count; + outputAudioFormat.buffer_size + = 1024 * fInputFormat.u.encoded_audio.output.channel_count; + inout_format->type = B_MEDIA_RAW_AUDIO; + inout_format->u.raw_audio = outputAudioFormat; + + ffc->bit_rate = (int) fInputFormat.u.encoded_audio.bit_rate; + ffc->sample_rate = (int) fInputFormat.u.encoded_audio.output.frame_rate; + ffc->channels = fInputFormat.u.encoded_audio.output.channel_count; + ffc->block_align = fBlockAlign; + ffc->extradata = (uint8_t *)fExtraData; + ffc->extradata_size = fExtraDataSize; + + TRACE("bit_rate %d, sample_rate %d, channels %d, block_align %d, " + "extradata_size %d\n", ffc->bit_rate, ffc->sample_rate, + ffc->channels, ffc->block_align, ffc->extradata_size); + + // close any previous instance + if (fCodecInitDone) { + fCodecInitDone = false; + avcodec_close(ffc); + } + + // open new + result = avcodec_open(ffc, fCodec); + fCodecInitDone = (result >= 0); + + TRACE("audio: bit_rate = %d, sample_rate = %d, chans = %d Init = %d\n", + ffc->bit_rate, ffc->sample_rate, ffc->channels, result); + + fStartTime = 0; + fOutputFrameSize = 2 * outputAudioFormat.channel_count; + fOutputFrameCount = outputAudioFormat.buffer_size / fOutputFrameSize; + fOutputFrameRate = outputAudioFormat.frame_rate; + fChunkBuffer = 0; + fChunkBufferOffset = 0; + fChunkBufferSize = 0; + fOutputBufferOffset = 0; + fOutputBufferSize = 0; + + inout_format->require_flags = 0; + inout_format->deny_flags = B_MEDIA_MAUI_UNDEFINED_FLAGS; + + if (!fCodecInitDone) { + TRACE("avcodec_open() failed!\n"); + return B_ERROR; + } + + return B_OK; + + } else { // VIDEO + + fOutputVideoFormat = fInputFormat.u.encoded_video.output; + + ffc->width = fOutputVideoFormat.display.line_width; + ffc->height = fOutputVideoFormat.display.line_count; +// ffc->frame_rate = (int)(fOutputVideoFormat.field_rate +// * ffc->frame_rate_base); + + fOutputFrameRate = fOutputVideoFormat.field_rate; + + ffc->extradata = (uint8_t *)fExtraData; + ffc->extradata_size = fExtraDataSize; + +// if (fInputFormat.MetaDataSize() > 0) { +// ffc->extradata = (uint8_t *)fInputFormat.MetaData(); +// ffc->extradata_size = fInputFormat.MetaDataSize(); +// } + + TRACE("#### requested video format 0x%x\n", + inout_format->u.raw_video.display.format); + + // make MediaPlayer happy (if not in rgb32 screen depth and no overlay, + // it will only ask for YCbCr, which DrawBitmap doesn't handle, so the + // default colordepth is RGB32) + if (inout_format->u.raw_video.display.format == B_YCbCr422) + fOutputVideoFormat.display.format = B_YCbCr422; + else + fOutputVideoFormat.display.format = B_RGB32; + + // search for a pixel-format the codec handles + // XXX We should try this a couple of times until it succeeds, each time + // XXX using another format pixel-format that is supported by the + // XXX decoder. But libavcodec doesn't seem to offer any way to tell the + // XXX decoder which format it should use. + conv_func = 0; + for (int i = 0; i < 1; i++) { // iterate over supported codec formats + // close any previous instance + if (fCodecInitDone) { + fCodecInitDone = false; + avcodec_close(ffc); + } + // XXX set n-th ffc->pix_fmt here + if (avcodec_open(ffc, fCodec) >= 0) { + fCodecInitDone = true; + + conv_func = resolve_colorspace(fOutputVideoFormat.display.format, ffc->pix_fmt); + } + if (conv_func != 0) + break; + } + + if (!fCodecInitDone) { + TRACE("avcodec_open() failed to init codec!\n"); + return B_ERROR; + } + + if (!conv_func) { + TRACE("no conv_func found or decoder has not set the pixel format yet!\n"); + } + + if (fOutputVideoFormat.display.format == B_YCbCr422) { + fOutputVideoFormat.display.bytes_per_row + = 2 * fOutputVideoFormat.display.line_width; + } else { + fOutputVideoFormat.display.bytes_per_row + = 4 * fOutputVideoFormat.display.line_width; + } + + inout_format->type = B_MEDIA_RAW_VIDEO; + inout_format->u.raw_video = fOutputVideoFormat; + + inout_format->require_flags = 0; + inout_format->deny_flags = B_MEDIA_MAUI_UNDEFINED_FLAGS; + + #if DEBUG + string_for_format(*inout_format, buffer, sizeof(buffer)); + TRACE("[%c] out_format=%s\n", isAudio?('a'):('v'), buffer); + #endif + + TRACE("#### returned video format 0x%x\n", + inout_format->u.raw_video.display.format); + + return B_OK; + } +} + + +status_t +AVCodecDecoder::Decode(void *out_buffer, int64 *out_frameCount, + media_header *mh, media_decode_info *info) +{ + const void *data; + + if (!fCodecInitDone) + return B_BAD_VALUE; + +#ifdef DO_PROFILING + bigtime_t prof_t1, prof_t2, prof_t3; +#endif + +#ifdef UNREAL + set_thread_priority(find_thread(NULL), B_NORMAL_PRIORITY); +#endif + +// TRACE("[%c] AVCodecDecoder::Decode() for time %Ld\n", isAudio?('a'):('v'), fStartTime); + + mh->start_time = fStartTime; + + if (isAudio) { + +// TRACE("audio start_time %.6f\n", mh->start_time / 1000000.0); + + char *output_buffer = (char *)out_buffer; + *out_frameCount = 0; + while (*out_frameCount < fOutputFrameCount) { + if (fOutputBufferSize < 0) { + TRACE("############ fOutputBufferSize %ld\n", + fOutputBufferSize); + fOutputBufferSize = 0; + } + if (fChunkBufferSize < 0) { + TRACE("############ fChunkBufferSize %ld\n", + fChunkBufferSize); + fChunkBufferSize = 0; + } + + if (fOutputBufferSize > 0) { + int32 frames = min_c(fOutputFrameCount - *out_frameCount, + fOutputBufferSize / fOutputFrameSize); + memcpy(output_buffer, fOutputBuffer + fOutputBufferOffset, + frames * fOutputFrameSize); + fOutputBufferOffset += frames * fOutputFrameSize; + fOutputBufferSize -= frames * fOutputFrameSize; + output_buffer += frames * fOutputFrameSize; + *out_frameCount += frames; + fStartTime += (bigtime_t)((1000000LL * frames) / fOutputFrameRate); + continue; + } + if (fChunkBufferSize == 0) { + media_header chunk_mh; + status_t err; + err = GetNextChunk(&fChunkBuffer, &fChunkBufferSize, &chunk_mh); + if (err == B_LAST_BUFFER_ERROR) { + TRACE("Last Chunk with chunk size %ld\n",fChunkBufferSize); + fChunkBufferSize = 0; + return err; + } + if (err != B_OK || fChunkBufferSize < 0) { + printf("GetNextChunk error %ld\n",fChunkBufferSize); + fChunkBufferSize = 0; + break; + } + fChunkBufferOffset = 0; + fStartTime = chunk_mh.start_time; + if (*out_frameCount == 0) + mh->start_time = chunk_mh.start_time; + continue; + } + if (fOutputBufferSize == 0) { + int len; + int out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; + len = avcodec_decode_audio2(ffc, (short *)fOutputBuffer, + &out_size, (uint8_t*)fChunkBuffer + fChunkBufferOffset, + fChunkBufferSize); + if (len < 0) { + TRACE("########### audio decode error, " + "fChunkBufferSize %ld, fChunkBufferOffset %ld\n", + fChunkBufferSize, fChunkBufferOffset); + out_size = 0; + len = 0; + fChunkBufferOffset = 0; + fChunkBufferSize = 0; +// } else { +// TRACE("audio decode: len %d, out_size %d\n", len, out_size); + } + fChunkBufferOffset += len; + fChunkBufferSize -= len; + fOutputBufferOffset = 0; + fOutputBufferSize = out_size; + } + } + fFrame += *out_frameCount; + +// TRACE("Played %Ld frames at time %Ld\n",*out_frameCount, mh->start_time); + + } else { // Video + + media_header chunk_mh; + status_t err; + size_t size; + + err = GetNextChunk(&data, &size, &chunk_mh); + if (err != B_OK) { + TRACE("AVCodecDecoder::Decode(): error 0x%08lx from GetNextChunk()\n", err); + return err; + } + + mh->type = B_MEDIA_RAW_VIDEO; +// mh->start_time = chunk_mh.start_time; + mh->file_pos = 0; + mh->orig_size = 0; + mh->u.raw_video.field_gamma = 1.0; + mh->u.raw_video.field_sequence = fFrame; + mh->u.raw_video.field_number = 0; + mh->u.raw_video.pulldown_number = 0; + mh->u.raw_video.first_active_line = 1; + mh->u.raw_video.line_count = fOutputVideoFormat.display.line_count; + + TRACE("[%c] start_time=%02d:%02d.%02d field_sequence=%lu\n", + isAudio ? ('a') : ('v'), + int((mh->start_time / 60000000) % 60), + int((mh->start_time / 1000000) % 60), + int((mh->start_time / 10000) % 100), + mh->u.raw_video.field_sequence); + +#ifdef DO_PROFILING + prof_t1 = system_time(); +#endif + + int got_picture = 0; + int len; + len = avcodec_decode_video(ffc, ffpicture, &got_picture, + (uint8_t *)data, size); + +//TRACE("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld " +// "ffc->frame_rate = %ld\n", (int)(ffc->pts / (60*60*1000000)), +// (int)(ffc->pts / (60*1000000)), (int)(ffc->pts / (1000000)), +// (int)(ffc->pts % 1000000), ffc->frame_number, ffc->frame_rate); +//TRACE("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld " +// "ffc->frame_rate = %ld\n", (int)(ffpicture->pts / (60*60*1000000)), +// (int)(ffpicture->pts / (60*1000000)), (int)(ffpicture->pts / (1000000)), +// (int)(ffpicture->pts % 1000000), ffc->frame_number, ffc->frame_rate); + + if (len < 0) { + printf("[%c] AVCodecDecoder: error in decoding frame %lld\n", + isAudio?('a'):('v'), *out_frameCount); + } + + if (got_picture) { +#ifdef DO_PROFILING + prof_t2 = system_time(); +#endif +// TRACE("ONE FRAME OUT !! len=%d size=%ld (%s)\n", len, size, +// pixfmt_to_string(ffc->pix_fmt)); + + // Some decoders do not set pix_fmt until they have decoded 1 frame + if (conv_func == 0) { + conv_func = resolve_colorspace(fOutputVideoFormat.display.format, ffc->pix_fmt); + } + opicture->data[0] = (uint8_t *)out_buffer; + opicture->linesize[0] = fOutputVideoFormat.display.bytes_per_row; + + if (conv_func) { + (*conv_func)(ffpicture, opicture, + fOutputVideoFormat.display.line_width, + fOutputVideoFormat.display.line_count); + } +#ifdef DEBUG + dump_ffframe(ffpicture, "ffpict"); +// dump_ffframe(opicture, "opict"); +#endif + *out_frameCount = 1; + fFrame++; + +#ifdef DO_PROFILING + prof_t3 = system_time(); + diff1 += prof_t2 - prof_t1; + diff2 += prof_t3 - prof_t2; + prof_cnt++; + if (!(fFrame % 10)) { + if (info) { + TRACE("[%c] profile: d1 = %lld, d2 = %lld (%Ld) required %Ld\n", + isAudio?('a'):('v'), diff1/prof_cnt, diff2/prof_cnt, + fFrame, info->time_to_decode); + } else { + TRACE("[%c] profile: d1 = %lld, d2 = %lld (%Ld) required %Ld\n", + isAudio?('a'):('v'), diff1/prof_cnt, diff2/prof_cnt, + fFrame, bigtime_t(1000000LL / fOutputFrameRate)); + } + } +#endif + } + } + + fStartTime = (bigtime_t) (1000000LL * fFrame / fOutputFrameRate); + + return B_OK; +} + Copied: haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.h (from rev 31355, haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h) =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.h 2009-07-01 18:52:48 UTC (rev 31358) @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2001 Carlos Hasan. + * Copyright (C) 2001 Fran?ois Revol. + * Copyright (C) 2001 Axel D?rfler. + * Copyright (C) 2004 Marcus Overhagen. + * Copyright (C) 2009 Stephan A?mus . + * + * All rights reserved. Distributed under the terms of the MIT License. + */ +#ifndef AVCODEC_DECODER_H +#define AVCODEC_DECODER_H + +//! libavcodec based decoder for Haiku + +#include + +#include "DecoderPlugin.h" +#include "ReaderPlugin.h" + +#include "CodecTable.h" + + +class AVCodecDecoder : public Decoder { +public: + AVCodecDecoder(); + + virtual ~AVCodecDecoder(); + + virtual void GetCodecInfo(media_codec_info* mci); + + virtual status_t Setup(media_format* ioEncodedFormat, + const void* infoBuffer, size_t infoSize); + + virtual status_t NegotiateOutputFormat( + media_format* outputFormat); + + virtual status_t Decode(void* outBuffer, int64* outFrameCount, + media_header* mediaHeader, + media_decode_info* info); + + virtual status_t Seek(uint32 seekTo, int64 seekFrame, + int64* frame, bigtime_t seekTime, + bigtime_t* time); + + +protected: + media_header fHeader; + media_decode_info fInfo; + +// friend class avCodecInputStream; + +private: + media_format fInputFormat; + media_raw_video_format fOutputVideoFormat; + + int64 fFrame; + bool isAudio; + + int ffcodec_index_in_table; + // helps to find codecpretty + + // ffmpeg related datas + AVCodec* fCodec; + AVCodecContext* ffc; + AVFrame* ffpicture; + AVFrame* opicture; + + bool fCodecInitDone; + + gfx_convert_func conv_func; // colorspace convert func + + char* fExtraData; + int fExtraDataSize; + int fBlockAlign; + + bigtime_t fStartTime; + int32 fOutputFrameCount; + float fOutputFrameRate; + int fOutputFrameSize; // sample size * channel count + + const void* fChunkBuffer; + int32 fChunkBufferOffset; + size_t fChunkBufferSize; + + char* fOutputBuffer; + int32 fOutputBufferOffset; + int32 fOutputBufferSize; + +}; + +#endif // AVCODEC_DECODER_H Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp 2009-07-01 18:50:22 UTC (rev 31357) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp 2009-07-01 18:52:48 UTC (rev 31358) @@ -87,14 +87,6 @@ }; -void -avcodec_register_all() -{ - // av_register_all() will call libavcodec's avcodec_register_all(), - // but we do not link against libavcodec in this plugin. -} - - static int init_libavformat() { @@ -103,9 +95,6 @@ } -static int dummy = init_libavformat(); - - // #pragma mark - AVFormatReader @@ -218,18 +207,3 @@ } -// #pragma mark - - - -Reader* -AVFormatPlugin::NewReader() -{ - return new(std::nothrow) AVFormatReader; -} - - -MediaPlugin* -instantiate_plugin() -{ - return new(std::nothrow) AVFormatPlugin; -} Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h 2009-07-01 18:50:22 UTC (rev 31357) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h 2009-07-01 18:52:48 UTC (rev 31358) @@ -46,11 +46,4 @@ }; -class AVFormatPlugin : public ReaderPlugin { -public: - Reader* NewReader(); -}; - -MediaPlugin *instantiate_plugin(); - #endif // AV_FORMAT_READER_H Copied: haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.cpp (from rev 31355, haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp) =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp 2009-07-01 14:45:20 UTC (rev 31355) +++ haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.cpp 2009-07-01 18:52:48 UTC (rev 31358) @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2001 Carlos Hasan. All Rights Reserved. + * Copyright (C) 2001 Fran?ois Revol. All Rights Reserved. + * Copyright (C) 2001 Axel D?rfler. All Rights Reserved. + * + * Distributed under the terms of the MIT License. + */ + +#include "CodecTable.h" + +#define HAS_WMA_AUDIO +//#define HAS_MACE_AUDIO +#define HAS_PHOTO_JPEG +#define HAS_MOTION_JPEG + +#define FOURCC(a) B_SWAP_INT32(a) + +const struct codec_table gCodecTable[] = { + + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x06, "aLaw"}, + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_AIFF_FORMAT_FAMILY, 'alaw' , "aLaw"}, + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_AIFF_FORMAT_FAMILY, 'ALAW' , "aLaw"}, + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_MISC_FORMAT_FAMILY, (uint64('au') << 32) | 27, "aLaw"}, + + {CODEC_ID_PCM_MULAW, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'ulaw', "?Law"}, + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'alaw', "aLaw"}, + {CODEC_ID_PCM_ALAW, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'ALAW', "aLaw"}, + + {CODEC_ID_PCM_MULAW, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x07, "?Law"}, + {CODEC_ID_PCM_MULAW, B_MEDIA_ENCODED_AUDIO, B_AIFF_FORMAT_FAMILY, 'ulaw', "?Law"}, + {CODEC_ID_PCM_MULAW, B_MEDIA_ENCODED_AUDIO, B_AIFF_FORMAT_FAMILY, 'ULAW', "?Law"}, + {CODEC_ID_PCM_MULAW, B_MEDIA_ENCODED_AUDIO, B_MISC_FORMAT_FAMILY, (uint64('au') << 32) | 1, "?Law"}, + + {CODEC_ID_ADPCM_IMA_WAV, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x0011, "IMA ADPCM"}, + {CODEC_ID_ADPCM_MS, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x0002, "MS ADPCM"}, + {CODEC_ID_ADPCM_IMA_WAV, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 0x6D730011, "IMA ADPCM"}, + {CODEC_ID_ADPCM_MS, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 0x6D730002, "MS ADPCM"}, + {CODEC_ID_MP2, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 0x6D730050, "MP Layer2"}, + {CODEC_ID_MP2, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 0x6D730055, "MP Layer3"}, + {CODEC_ID_ADPCM_IMA_QT, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'ima4', "Quicktime IMA4"}, + {CODEC_ID_ADPCM_IMA_QT, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'IMA4', "Quicktime IMA4"}, + {CODEC_ID_AAC, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'mp4a', "MPEG4 AAC"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'mp4v', "MPEG4 Video"}, + {CODEC_ID_AAC, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'a4pm', "MPEG4 AAC"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'v4pm', "MPEG4 Video"}, + {CODEC_ID_AAC, B_MEDIA_ENCODED_AUDIO, B_MISC_FORMAT_FAMILY, 'mp4a', "MPEG4 AAC"}, /* For matroska */ + {CODEC_ID_AAC, B_MEDIA_ENCODED_AUDIO, B_MISC_FORMAT_FAMILY, 'a4pm', "MPEG4 AAC"}, /* For matroska */ + +#ifdef HAS_MACE_AUDIO + {CODEC_ID_MACE3, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'MAC3', "MACE 3:1"}, + {CODEC_ID_MACE6, B_MEDIA_ENCODED_AUDIO, B_QUICKTIME_FORMAT_FAMILY, 'MAC6', "MACE 6:1"}, +#endif + +#if 0 + {CODEC_ID_MP2, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x0050, "MPEG Audio Layer 2"}, /* mpeg audio layer 2 */ + {CODEC_ID_MP2, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x0055, "MPEG Audio Layer 3"}, /* mpeg audio layer 3 */ +#endif + + {CODEC_ID_WMAV1, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x160, "MS WMA v1"}, + {CODEC_ID_WMAV2, B_MEDIA_ENCODED_AUDIO, B_WAV_FORMAT_FAMILY, 0x161, "MS WMA v2"}, + + {CODEC_ID_CINEPAK, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('cvid'), "Cinepak Video"}, + {CODEC_ID_CINEPAK, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'cvid', "Cinepak Video"}, + + {CODEC_ID_MSRLE, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, FOURCC(' elr'), "MS RLE"}, // ??? + + {CODEC_ID_MSRLE, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('RLE '), "MS RLE"}, // ??? + {CODEC_ID_MSRLE, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('mrle'), "MS RLE"}, // ??? + + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MSVC'), "MS Video 1 (MSVC)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('msvc'), "MS Video 1 (msvc)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('CRAM'), "MS Video 1 (CRAM)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('cram'), "MS Video 1 (cram)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('WHAM'), "MS Video 1 (WHAM)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('wham'), "MS Video 1 (wham)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 0x01, "MS Video 1 (1)"}, + {CODEC_ID_MSVIDEO1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC(0x01), "MS Video 1 (not 1)"}, + + {CODEC_ID_H263, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('U263'), "U263"}, + {CODEC_ID_H263, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('H263'), "U263"}, +// {CODEC_ID_H263P, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('U263'), "U263"}, + {CODEC_ID_H263I, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('I263'), "Intel H263"}, /* intel h263 */ + {CODEC_ID_H263, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'h263', "H263"}, + {CODEC_ID_H263, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'H263', "H263"}, + + {CODEC_ID_H264, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'h264', "H264"}, + {CODEC_ID_H264, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'H264', "H264"}, + {CODEC_ID_H264, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'x264', "H264"}, + {CODEC_ID_H264, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'avc1', "AVC"}, /* MPEG-4 AVC */ + +#ifdef HAS_PHOTO_JPEG + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'JPEG', "Photo-JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'jpeg', "Photo-JPEG"}, /* used in BeOS_BBC.mov */ + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'GEPJ', "Photo-JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'gepj', "Photo-JPEG"}, /* used in BeOS_BBC.mov */ +#endif +#ifdef HAS_MOTION_JPEG + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MJPG'), "Motion JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('mjpg'), "Motion JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'AVDJ', "Motion JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'mjpa', "Motion JPEG"}, + {CODEC_ID_MJPEGB, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'mjpb', "Motion JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'JDVA', "Motion JPEG"}, + {CODEC_ID_MJPEG, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'apjm', "Motion JPEG"}, + {CODEC_ID_MJPEGB, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'bpjm', "Motion JPEG"}, +#endif + + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'FMP4', "ffmpeg MPEG4"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, '4PMF', "ffmpeg MPEG4"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'DIVX', "MPEG4"}, /* OpenDivX */ /* XXX: doesn't seem to work */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'divx', "MPEG4"}, /* OpenDivX */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'mp4v', "MPEG4"}, /* MPEG-4 ASP */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'XVID', "XviD (MPEG4)"}, /* OpenDivX ??? XXX: test */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'FMP4', "ffmpeg MPEG4"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, '4PMF', "ffmpeg MPEG4"}, + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DIVX'), "MPEG4"}, /* OpenDivX */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('divx'), "MPEG4"}, /* OpenDivX */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('XVID'), "XviD (MPEG4)"}, /* XVID */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('xvid'), "XviD (MPEG4)"}, /* XVID */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DX50'), "DivX 5 (MPEG4)"}, /* DivX 5.0 */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('dx50'), "DivX 5 (MPEG4)"}, /* DivX 5.0 */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('3IV2'), "3ivx v2"}, /* 3ivx v2 */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('3iv2'), "3ivx v2"}, /* 3ivx v2 */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('ffds'), "ff DirectShow"}, /* XVID Variant */ + + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('\004\0\0\0'), "MPEG4"}, /* some broken avi use this */ + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DIV3'), "DivX ;-) (MS MPEG4 v3)"}, /* default signature when using MSMPEG4 */ + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('div3'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DIV4'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('div4'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DIV5'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('div5'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DIV6'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('div6'), "DivX ;-) (MS MPEG4 v3)"}, + {CODEC_ID_MSMPEG4V1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MP41'), "MS MPEG4 v1"}, /* microsoft mpeg4 v1 */ + {CODEC_ID_MSMPEG4V1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('mp41'), "MS MPEG4 v1"}, /* microsoft mpeg4 v1 */ + {CODEC_ID_MSMPEG4V2, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MP42'), "MS MPEG4 v2"}, /* seems to be broken */ + {CODEC_ID_MSMPEG4V2, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('mp42'), "MS MPEG4 v2"}, /* seems to be broken */ + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MP43'), "MS MPEG4 v3"}, /* microsoft mpeg4 v3 */ + {CODEC_ID_MPEG4, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('S4PM'), "MPEG4"}, /* mpeg4 */ + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('34PM'), "MS MPEG4 v3"}, /* microsoft mpeg4 v3 */ + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('mp43'), "MS MPEG4 v3"}, /* microsoft mpeg4 v3 */ + {CODEC_ID_MSMPEG4V1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('MPG4'), "MS MPEG4"}, + {CODEC_ID_MSMPEG4V3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('AP41'), "Angel Potion (MS MPEG4 v3)"}, /* AngelPotion 1 (it's so simple to release a new codec... :^) ) */ + + {CODEC_ID_WMV1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('WMV1'), "Microsoft WMV v1"}, + {CODEC_ID_WMV2, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('WMV2'), "Microsoft WMV v2"}, + {CODEC_ID_WMV3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('WMV3'), "Microsoft WMV v3"}, + +//SVQ1 + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'SVQ1', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'svq1', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'SVQ1', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'svq1', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'svqi', "Sorenson Video v1"}, /* (from QT specs) */ + + {CODEC_ID_SVQ3, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'SVQ3', "Sorenson Video v3"}, + {CODEC_ID_SVQ3, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'svq3', "Sorenson Video v3"}, + + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, '1QVS', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, '1qvs', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, '1QVS', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, '1qvs', "Sorenson Video v1"}, + {CODEC_ID_SVQ1, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'iqvs', "Sorenson Video v1"}, /* (from QT specs) */ + + {CODEC_ID_SVQ3, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, '3QVS', "Sorenson Video v3"}, + {CODEC_ID_SVQ3, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, '3qvs', "Sorenson Video v3"}, + +/* + {CODEC_ID_RV10, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'RV10', "RealVideo v1"}, + {CODEC_ID_RV10, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, 'rv10', "RealVideo v1"}, + {CODEC_ID_RV10, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'RV10', "RealVideo v1"}, + {CODEC_ID_RV10, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'rv10', "RealVideo v1"}, +*/ + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('dvsd'), "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('DVSD'), "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('dvhd'), "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('dvsl'), "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('dv25'), "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'dvc ', "DV Video"}, + {CODEC_ID_DVVIDEO, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'dvcp', "DV Video"}, + + {CODEC_ID_MPEG1VIDEO, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'MPG1', "MPEG1 Video"}, + {CODEC_ID_MPEG1VIDEO, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'MPG2', "MPEG1 Video"}, + {CODEC_ID_MPEG1VIDEO, B_MEDIA_ENCODED_VIDEO, B_QUICKTIME_FORMAT_FAMILY, 'PIM1', "MPEG1 Video"}, + + {CODEC_ID_MPEG1VIDEO, B_MEDIA_ENCODED_VIDEO, B_MPEG_FORMAT_FAMILY, B_MPEG_1_VIDEO, "MPEG1 Video"}, + {CODEC_ID_MPEG2VIDEO, B_MEDIA_ENCODED_VIDEO, B_MPEG_FORMAT_FAMILY, B_MPEG_2_VIDEO, "MPEG2 Video"}, + + {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('iv31'), "Indeo 3"}, + {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('iv32'), "Indeo 3"}, + {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('IV31'), "Indeo 3"}, + {CODEC_ID_INDEO3, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('IV32'), "Indeo 3"}, + + {CODEC_ID_INDEO5, B_MEDIA_ENCODED_VIDEO, B_AVI_FORMAT_FAMILY, FOURCC('iv50'), "Indeo 5"}, [... truncated: 242 lines follow ...] From mattmadia at gmail.com Wed Jul 1 21:02:55 2009 From: mattmadia at gmail.com (Matt Madia) Date: Wed, 1 Jul 2009 19:02:55 +0000 Subject: [Haiku-commits] r31358 - in haiku/trunk: build/jam src/add-ons/media/plugins/avcodec In-Reply-To: <200907011852.n61Iqt5R011976@sheep.berlios.de> References: <200907011852.n61Iqt5R011976@sheep.berlios.de> Message-ID: <1e42d8c50907011202m6c98eb74lc356be301e3f8af5@mail.gmail.com> On Wed, Jul 1, 2009 at 18:52, wrote: > Author: stippi > Date: 2009-07-01 20:52:48 +0200 (Wed, 01 Jul 2009) > New Revision: 31358 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31358&view=rev > > Added: > haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.h > haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.h > haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.h > Removed: > haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h > haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp > Modified: > haiku/trunk/build/jam/HaikuImage > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h > haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile > Log: > Cleaned up the source file names and code locations in the avcodec plugin, > unified the Reader and Decoder plugins and renamed the add-on to "ffmpeg". this is broken on x86gcc2 , all targets: building from FreeBSD --use-xattr jam -q -j1 @alpha-raw Cc /haiku-src/haiku/haiku/generated.x86gcc2/objects/haiku/x86/release/add-ons/media/plugins/avcodec/libavformat/4xm.o In file included from /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/../libavcodec/avcodec.h:3347, from /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/avformat.h:45, from /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/4xm.c:31: /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/internal.h:29: parse error before `*' /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/internal.h:35: parse error before `*' /haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/internal.h:36: parse error before `*' /haiku-src/haiku/haiku/generated.x86gcc2/cross-tools/bin/i586-pc-haiku-gcc -O -Wno-trigraphs -Wcast-align -Wno-multichar -pipe -nostdinc -fomit-frame-pointer -DPIC -DHAVE_AV_CONFIG_H=1 -DARCH_X86=1 -DARCH_X86_32=1 -DARCH_PPC=0 -DARCH_SPARC=0 -DHAVE_AMD3DNOW=0 -DHAVE_AMD3DNOWEXT=0 -DHAVE_MMX=1 -DHAVE_MMX2=1 -DHAVE_SSE=0 -DHAVE_SSE3=1 -DHAVE_ALTIVEC=0 -DHAVE_VIS=0 -c "/haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/4xm.c" -D__HAIKU__ -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -D__INTEL__ -DARCH_x86 -DBOOT_ARCHIVE_IMAGE_OFFSET=300 -D_BEOS_R5_COMPATIBLE_ -DHAIKU_TARGET_PLATFORM_HAIKU -I/haiku-src/haiku/haiku/build/user_config_headers -I/haiku-src/haiku/haiku/build/config_headers -I/haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat -I/haiku-src/haiku/haiku/generated.x86gcc2/objects/common/add-ons/media/plugins/avcodec/libavformat -I/haiku-src/haiku/haiku/generated.x86gcc2/objects/freebsd/x86/common/add-ons/media/plugins/avcodec/libavformat -I/haiku-src/haiku/haiku/generated.x86gcc2/objects/haiku/x86/common/add-ons/media/plugins/avcodec/libavformat -I/haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/.. -I/haiku-src/haiku/haiku/src/add-ons/media/plugins/avcodec/libavformat/../libavutil -I- -I/haiku-src/haiku/haiku/headers/libs/zlib -I/haiku-src/haiku/haiku/headers/cpp -I/haiku-src/haiku/haiku/headers/build/gcc-2.95.3 -I/haiku-src/haiku/haiku/headers -I/haiku-src/haiku/haiku/headers/posix -I/haiku-src/haiku/haiku/headers/gnu -I/haiku-src/haiku/haiku/headers/glibc -I/haiku-src/haiku/haiku/headers/os -I/haiku-src/haiku/haiku/headers/os/add-ons -I/haiku-src/haiku/haiku/headers/os/add-ons/file_system -I/haiku-src/haiku/haiku/headers/os/add-ons/graphics -I/haiku-src/haiku/haiku/headers/os/add-ons/input_server -I/haiku-src/haiku/haiku/headers/os/add-ons/registrar -I/haiku-src/haiku/haiku/headers/os/add-ons/screen_saver -I/haiku-src/haiku/haiku/headers/os/add-ons/tracker -I/haiku-src/haiku/haiku/headers/os/app -I/haiku-src/haiku/haiku/headers/os/device -I/haiku-src/haiku/haiku/headers/os/drivers -I/haiku-src/haiku/haiku/headers/os/game -I/haiku-src/haiku/haiku/headers/os/interface -I/haiku-src/haiku/haiku/headers/os/kernel -I/haiku-src/haiku/haiku/headers/os/media -I/haiku-src/haiku/haiku/headers/os/mail -I/haiku-src/haiku/haiku/headers/os/midi -I/haiku-src/haiku/haiku/headers/os/midi2 -I/haiku-src/haiku/haiku/headers/os/net -I/haiku-src/haiku/haiku/headers/os/opengl -I/haiku-src/haiku/haiku/headers/os/storage -I/haiku-src/haiku/haiku/headers/os/support -I/haiku-src/haiku/haiku/headers/os/translation -I/haiku-src/haiku/haiku/headers/private/. -o "/haiku-src/haiku/haiku/generated.x86gcc2/objects/haiku/x86/release/add-ons/media/plugins/avcodec/libavformat/4xm.o" ; ...failed Cc /haiku-src/haiku/haiku/generated.x86gcc2/objects/haiku/x86/release/add-ons/media/plugins/avcodec/libavformat/4xm.o ... ...skipped libavformat.a for lack of libavformat.a(4xm.o)... ...skipped ffmpeg for lack of libavformat.a... ...skipped haiku.image-copy-files-dummy-system/add-ons/media/plugins for lack of ffmpeg... ...skipped haiku-alpha.image for lack of haiku.image-copy-files... ...failed updating 1 target(s)... ...skipped 4 target(s)... ...updated 249 target(s)... From stippi at mail.berlios.de Wed Jul 1 21:19:53 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 21:19:53 +0200 Subject: [Haiku-commits] r31359 - in haiku/trunk/src/add-ons/media/plugins: . ffmpeg ffmpeg/libavcodec ffmpeg/libavcodec/ppc ffmpeg/libavcodec/sparc ffmpeg/libavcodec/x86 ffmpeg/libavformat ffmpeg/libavutil ffmpeg/libswscale Message-ID: <200907011919.n61JJrCW013758@sheep.berlios.de> Author: stippi Date: 2009-07-01 21:19:49 +0200 (Wed, 01 Jul 2009) New Revision: 31359 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31359&view=rev Added: haiku/trunk/src/add-ons/media/plugins/ffmpeg/ Removed: haiku/trunk/src/add-ons/media/plugins/avcodec/ Modified: haiku/trunk/src/add-ons/media/plugins/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/ppc/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/sparc/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile haiku/trunk/src/add-ons/media/plugins/ffmpeg/libswscale/Jamfile Log: * Renamed avcodec folder to ffmpeg. * Cleaned up plugins Jamfile. Modified: haiku/trunk/src/add-ons/media/plugins/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -3,27 +3,24 @@ SetSubDirSupportedPlatformsBeOSCompatible ; SubInclude HAIKU_TOP src add-ons media plugins aiff_reader ; +SubInclude HAIKU_TOP src add-ons media plugins ape_reader ; +SubInclude HAIKU_TOP src add-ons media plugins asf_reader ; SubInclude HAIKU_TOP src add-ons media plugins au_reader ; SubInclude HAIKU_TOP src add-ons media plugins avi_reader ; -SubInclude HAIKU_TOP src add-ons media plugins mp3_reader ; -SubInclude HAIKU_TOP src add-ons media plugins wav_reader ; -SubInclude HAIKU_TOP src add-ons media plugins ape_reader ; - +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg ; SubInclude HAIKU_TOP src add-ons media plugins matroska ; +SubInclude HAIKU_TOP src add-ons media plugins mov_reader ; +SubInclude HAIKU_TOP src add-ons media plugins mp3_decoder ; +SubInclude HAIKU_TOP src add-ons media plugins mp3_reader ; +SubInclude HAIKU_TOP src add-ons media plugins mp4_reader ; SubInclude HAIKU_TOP src add-ons media plugins musepack ; SubInclude HAIKU_TOP src add-ons media plugins ogg ; - -SubInclude HAIKU_TOP src add-ons media plugins mp3_decoder ; SubInclude HAIKU_TOP src add-ons media plugins raw_decoder ; - -SubInclude HAIKU_TOP src add-ons media plugins avcodec ; -SubInclude HAIKU_TOP src add-ons media plugins vorbis ; SubInclude HAIKU_TOP src add-ons media plugins speex ; -SubInclude HAIKU_TOP src add-ons media plugins mov_reader ; -SubInclude HAIKU_TOP src add-ons media plugins mp4_reader ; +#SubInclude HAIKU_TOP src add-ons media plugins theora ; +SubInclude HAIKU_TOP src add-ons media plugins vorbis ; +SubInclude HAIKU_TOP src add-ons media plugins wav_reader ; -SubInclude HAIKU_TOP src add-ons media plugins asf_reader ; - # The following add-ons are GPL licensed, and can only be used with # software whose license is GPL compatible. To include these GPL # licensed add-ons, you need to run configure with the --include-gpl-addons Copied: haiku/trunk/src/add-ons/media/plugins/ffmpeg (from rev 31358, haiku/trunk/src/add-ons/media/plugins/avcodec) Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg ; SetSubDirSupportedPlatformsBeOSCompatible ; @@ -31,7 +31,7 @@ libz.a ; -SubInclude HAIKU_TOP src add-ons media plugins avcodec libavcodec ; -SubInclude HAIKU_TOP src add-ons media plugins avcodec libavformat ; -SubInclude HAIKU_TOP src add-ons media plugins avcodec libavutil ; -SubInclude HAIKU_TOP src add-ons media plugins avcodec libswscale ; +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ; +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavformat ; +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavutil ; +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libswscale ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavcodec ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ; @@ -310,5 +310,6 @@ zmbv.c ; -SubInclude HAIKU_TOP src add-ons media plugins avcodec libavcodec $(TARGET_ARCH) ; +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec + $(TARGET_ARCH) ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/ppc/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/ppc/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/ppc/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavcodec ppc ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ppc ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) ../.. ] ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/sparc/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/sparc/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/sparc/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavcodec sparc ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavcodec sparc ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) ../.. ] ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavcodec/x86/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavcodec x86 ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavcodec x86 ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) ../.. ] ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavformat/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavformat ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavformat ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) ../libavutil ] ; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libavutil/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libavutil ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavutil ; # filter warnings we don't want here TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS) Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libswscale/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/avcodec/libswscale/Jamfile 2009-07-01 18:52:48 UTC (rev 31358) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libswscale/Jamfile 2009-07-01 19:19:49 UTC (rev 31359) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons media plugins avcodec libswscale ; +SubDir HAIKU_TOP src add-ons media plugins ffmpeg libswscale ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; SubDirHdrs [ FDirName $(SUBDIR) ../libavutil ] ; From stippi at mail.berlios.de Wed Jul 1 21:20:53 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 21:20:53 +0200 Subject: [Haiku-commits] r31360 - haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat Message-ID: <200907011920.n61JKrjx013847@sheep.berlios.de> Author: stippi Date: 2009-07-01 21:20:52 +0200 (Wed, 01 Jul 2009) New Revision: 31360 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31360&view=rev Removed: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Makefile Log: Removed ffmpeg build system left-over. Deleted: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Makefile From superstippi at gmx.de Wed Jul 1 21:34:10 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 01 Jul 2009 21:34:10 +0200 Subject: [Haiku-commits] r31358 - in haiku/trunk: build/jam src/add-ons/media/plugins/avcodec In-Reply-To: <1e42d8c50907011202m6c98eb74lc356be301e3f8af5@mail.gmail.com> References: <200907011852.n61Iqt5R011976@sheep.berlios.de> <1e42d8c50907011202m6c98eb74lc356be301e3f8af5@mail.gmail.com> Message-ID: <20090701213410.78807.4@bepc.1246458641.fake> On 2009-07-01 at 21:02:55 [+0200], Matt Madia wrote: > On Wed, Jul 1, 2009 at 18:52, wrote: > > Author: stippi > > Date: 2009-07-01 20:52:48 +0200 (Wed, 01 Jul 2009) New Revision: 31358 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31358&view=rev > > > > Added: > > haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.cpp > > haiku/trunk/src/add-ons/media/plugins/avcodec/AVCodecDecoder.h > > haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.cpp > > haiku/trunk/src/add-ons/media/plugins/avcodec/CodecTable.h > > haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.cpp > > haiku/trunk/src/add-ons/media/plugins/avcodec/FFmpegPlugin.h > > Removed: > > haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp > > haiku/trunk/src/add-ons/media/plugins/avcodec/avcodecplugin.h > > haiku/trunk/src/add-ons/media/plugins/avcodec/codectbl.cpp > > Modified: > > haiku/trunk/build/jam/HaikuImage > > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.cpp > > haiku/trunk/src/add-ons/media/plugins/avcodec/AVFormatReader.h > > haiku/trunk/src/add-ons/media/plugins/avcodec/Jamfile > > Log: > > Cleaned up the source file names and code locations in the avcodec > > plugin, unified the Reader and Decoder plugins and renamed the add-on > > to "ffmpeg". > > this is broken on x86gcc2 , all targets: Looking into it, thanks to the handy setgcc script. :-) Best regards, -Stephan From rudolfc at mail.berlios.de Wed Jul 1 21:54:28 2009 From: rudolfc at mail.berlios.de (rudolfc at mail.berlios.de) Date: Wed, 1 Jul 2009 21:54:28 +0200 Subject: [Haiku-commits] r31361 - haiku/trunk/src/add-ons/accelerants/nvidia/engine Message-ID: <200907011954.n61JsSp6016323@sheep.berlios.de> Author: rudolfc Date: 2009-07-01 21:54:23 +0200 (Wed, 01 Jul 2009) New Revision: 31361 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31361&view=rev Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c Log: fixed digitally connected panel at crtc2 detection, stupid typo. This lead to the driver exporting and accepting zero modes if a panel was at crtc2. Result was a black screen. Error was introduced when updating for EDID use. Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c =================================================================== --- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-01 19:20:52 UTC (rev 31360) +++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-01 19:54:23 UTC (rev 31361) @@ -1,7 +1,7 @@ /* Read initialisation information from card */ /* some bits are hacks, where PINS is not known */ /* Author: - Rudolf Cornelissen 7/2003-6/2009 + Rudolf Cornelissen 7/2003-7/2009 */ #define MODULE_BIT 0x00002000 @@ -2623,16 +2623,16 @@ * Also the BIOS might have programmed for a lower mode than EDID reports: * which limits our use of the panel (LVDS link setup too slow). */ if(si->ps.monitors & CRTC2_TMDS) { - si->ps.crtc2_screen.timing.pixel_clock = si->ps.p1_timing.pixel_clock; - si->ps.crtc2_screen.timing.h_display = si->ps.p1_timing.h_display; - si->ps.crtc2_screen.timing.h_sync_start = si->ps.p1_timing.h_sync_start; - si->ps.crtc2_screen.timing.h_sync_end = si->ps.p1_timing.h_sync_end; - si->ps.crtc2_screen.timing.h_total = si->ps.p1_timing.h_total; - si->ps.crtc2_screen.timing.v_display = si->ps.p1_timing.h_display; - si->ps.crtc2_screen.timing.v_sync_start = si->ps.p1_timing.v_sync_start; - si->ps.crtc2_screen.timing.v_sync_end = si->ps.p1_timing.v_sync_end; - si->ps.crtc2_screen.timing.v_total = si->ps.p1_timing.v_total; - si->ps.crtc2_screen.timing.flags = si->ps.p1_timing.flags; + si->ps.crtc2_screen.timing.pixel_clock = si->ps.p2_timing.pixel_clock; + si->ps.crtc2_screen.timing.h_display = si->ps.p2_timing.h_display; + si->ps.crtc2_screen.timing.h_sync_start = si->ps.p2_timing.h_sync_start; + si->ps.crtc2_screen.timing.h_sync_end = si->ps.p2_timing.h_sync_end; + si->ps.crtc2_screen.timing.h_total = si->ps.p2_timing.h_total; + si->ps.crtc2_screen.timing.v_display = si->ps.p2_timing.h_display; + si->ps.crtc2_screen.timing.v_sync_start = si->ps.p2_timing.v_sync_start; + si->ps.crtc2_screen.timing.v_sync_end = si->ps.p2_timing.v_sync_end; + si->ps.crtc2_screen.timing.v_total = si->ps.p2_timing.v_total; + si->ps.crtc2_screen.timing.flags = si->ps.p2_timing.flags; si->ps.crtc2_screen.have_edid = true; si->ps.crtc2_screen.aspect = (si->ps.p2_timing.h_display / ((float)si->ps.p2_timing.v_display)); From rudolfc at mail.berlios.de Wed Jul 1 22:18:17 2009 From: rudolfc at mail.berlios.de (rudolfc at mail.berlios.de) Date: Wed, 1 Jul 2009 22:18:17 +0200 Subject: [Haiku-commits] r31362 - haiku/trunk/src/add-ons/accelerants/nvidia/engine Message-ID: <200907012018.n61KIHdI018387@sheep.berlios.de> Author: rudolfc Date: 2009-07-01 22:18:15 +0200 (Wed, 01 Jul 2009) New Revision: 31362 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31362&view=rev Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac.c haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac2.c Log: and fix the PLL setting dumping code for extended PLL's. BIOS settings now make sense on extended PLL's. This fix does not change the drivers behaviour. Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac.c =================================================================== --- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac.c 2009-07-01 19:54:23 UTC (rev 31361) +++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac.c 2009-07-01 20:18:15 UTC (rev 31362) @@ -1,6 +1,6 @@ /* program the DAC */ /* Author: - Rudolf Cornelissen 12/2003-6/2009 + Rudolf Cornelissen 12/2003-7/2009 */ #define MODULE_BIT 0x00010000 @@ -222,7 +222,7 @@ if (si->ps.ext_pll) { dividers2 = DACR(PIXPLLC2); - if (dividers2 & 0x8000000) { + if (dividers2 & 0x80000000) { /* the extended PLL part is enabled */ m2 = (dividers2 & 0x000000ff); n2 = (dividers2 & 0x0000ff00) >> 8; Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac2.c =================================================================== --- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-07-01 19:54:23 UTC (rev 31361) +++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-07-01 20:18:15 UTC (rev 31362) @@ -1,6 +1,6 @@ /* program the secondary DAC */ /* Author: - Rudolf Cornelissen 12/2003-6/2009 + Rudolf Cornelissen 12/2003-7/2009 */ #define MODULE_BIT 0x00001000 @@ -225,7 +225,7 @@ if (si->ps.ext_pll) { dividers2 = DAC2R(PIXPLLC2); - if (dividers2 & 0x8000000) { + if (dividers2 & 0x80000000) { /* the extended PLL part is enabled */ m2 = (dividers2 & 0x000000ff); n2 = (dividers2 & 0x0000ff00) >> 8; From oruizdorantes at mail.berlios.de Wed Jul 1 22:31:02 2009 From: oruizdorantes at mail.berlios.de (oruizdorantes at BerliOS) Date: Wed, 1 Jul 2009 22:31:02 +0200 Subject: [Haiku-commits] r31363 - haiku/trunk/src/kits/bluetooth Message-ID: <200907012031.n61KV28o019550@sheep.berlios.de> Author: oruizdorantes Date: 2009-07-01 22:31:02 +0200 (Wed, 01 Jul 2009) New Revision: 31363 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31363&view=rev Modified: haiku/trunk/src/kits/bluetooth/CommandManager.cpp Log: Add Strings for bluetooth errors Modified: haiku/trunk/src/kits/bluetooth/CommandManager.cpp =================================================================== --- haiku/trunk/src/kits/bluetooth/CommandManager.cpp 2009-07-01 20:18:15 UTC (rev 31362) +++ haiku/trunk/src/kits/bluetooth/CommandManager.cpp 2009-07-01 20:31:02 UTC (rev 31363) @@ -549,70 +549,130 @@ const char* bluetoothEvents[] = { -"Inquiry Complete", -"Inquiry Result", -"Conn Complete", -"Conn Request", -"Disconnection Complete", -"Auth Complete", -"Remote Name Request Complete", -"Encrypt Change", -"Change Conn Link Key Complete", -"Master Link Key Compl", -"Rmt Features", -"Rmt Version", -"Qos Setup Complete", -"Command Complete", -"Command Status", -"Hardware Error", -"Flush Occur", -"Role Change", -"Num Comp Pkts", -"Mode Change", -"Return Link Keys", -"Pin Code Req", -"Link Key Req", -"Link Key Notify", -"Loopback Command", -"Data Buffer Overflow", -"Max Slot Change", -"Read Clock Offset Compl", -"Con Pkt Type Changed", -"Qos Violation", -"Reserved", -"Page Scan Rep Mode Change", -"Flow Specification", -"Inquiry Result With Rssi", -"Remote Extended Features", -"Reserved", -"Reserved", -"Reserved", -"Reserved", -"Reserved", -"Reserved", -"Reserved", -"Reserved", -"Synchronous Connection Completed", -"Synchronous Connection Changed", -"Reserved", -"Extended Inquiry Result", -"Encryption Key Refersh Complete", -"Io Capability Request", -"Io Capability Response", -"User Confirmation Request", -"User Passkey Request", -"Oob Data Request", -"Simple Pairing Complete", -"Reserved", -"Link Supervision Timeout Changed", -"Enhanced Flush Complete", -"Reserved", -"Reserved", -"Keypress Notification", -"Remote Host Supported Features Notification" + "Inquiry Complete", + "Inquiry Result", + "Conn Complete", + "Conn Request", + "Disconnection Complete", + "Auth Complete", + "Remote Name Request Complete", + "Encrypt Change", + "Change Conn Link Key Complete", + "Master Link Key Compl", + "Rmt Features", + "Rmt Version", + "Qos Setup Complete", + "Command Complete", + "Command Status", + "Hardware Error", + "Flush Occur", + "Role Change", + "Num Comp Pkts", + "Mode Change", + "Return Link Keys", + "Pin Code Req", + "Link Key Req", + "Link Key Notify", + "Loopback Command", + "Data Buffer Overflow", + "Max Slot Change", + "Read Clock Offset Compl", + "Con Pkt Type Changed", + "Qos Violation", + "Reserved", + "Page Scan Rep Mode Change", + "Flow Specification", + "Inquiry Result With Rssi", + "Remote Extended Features", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Synchronous Connection Completed", + "Synchronous Connection Changed", + "Reserved", + "Extended Inquiry Result", + "Encryption Key Refersh Complete", + "Io Capability Request", + "Io Capability Response", + "User Confirmation Request", + "User Passkey Request", + "Oob Data Request", + "Simple Pairing Complete", + "Reserved", + "Link Supervision Timeout Changed", + "Enhanced Flush Complete", + "Reserved", + "Reserved", + "Keypress Notification", + "Remote Host Supported Features Notification" }; +const char* bluetoothErrors[] = { + "No Error", + "Unknown Command", + "No Connection", + "Hardware Failure", + "Page Timeout", + "Authentication Failure", + "Pin Or Key Missing", + "Memory Full", + "Connection Timeout", + "Max Number Of Connections", + "Max Number Of Sco Connections", + "Acl Connection Exists", + "Command Disallowed", + "Rejected Limited Resources", + "Rejected Security", + "Rejected Personal", + "Host Timeout", + "Unsupported Feature", + "Invalid Parameters", + "Remote User Ended Connection", + "Remote Low Resources", + "Remote Power Off", + "Connection Terminated", + "Repeated Attempts", + "Pairing Not Allowed", + "Unknown Lmp Pdu", + "Unsupported Remote Feature", + "Sco Offset Rejected", + "Sco Interval Rejected", + "Air Mode Rejected", + "Invalid Lmp Parameters", + "Unspecified Error", + "Unsupported Lmp Parameter Value", + "Role Change Not Allowed", + "Lmp Response Timeout", + "Lmp Error Transaction Collision", + "Lmp Pdu Not Allowed", + "Encryption Mode Not Accepted", + "Unit Link Key Used", + "Qos Not Supported", + "Instant Passed", + "Pairing With Unit Key Not Supported", + "Different Transaction Collision", + "Qos Unacceptable Parameter", + "Qos Rejected", + "Classification Not Supported", + "Insufficient Security", + "Parameter Out Of Range", + "Reserved", + "Role Switch Pending", + "Reserved", + "Slot Violation", + "Role Switch Failed", + "Extended Inquiry Response Too Large", + "Simple Pairing Not Supported By Host", + "Host Busy Pairing" +}; + + const char* hciVersion[] = { "1.0B" , "1.1 " , "1.2 " , "2.0 " , "2.1 "}; const char* lmpVersion[] = { "1.0 " , "1.1 " , "1.2 " , "2.0 " , "2.1 "}; @@ -695,3 +755,14 @@ return "not assigned"; } } + + +const char* +GetError(uint8 error) { + if (error < sizeof(bluetoothErrors)/sizeof(const char*)) { + return bluetoothErrors[error]; + } else { + return "not specified"; + } +} + From dev at m-phasis.de Wed Jul 1 22:38:49 2009 From: dev at m-phasis.de (Michael Weirauch) Date: Wed, 1 Jul 2009 22:38:49 +0200 Subject: [Haiku-commits] r31363 - haiku/trunk/src/kits/bluetooth In-Reply-To: <200907012031.n61KV28o019550@sheep.berlios.de> References: <200907012031.n61KV28o019550@sheep.berlios.de> Message-ID: 2009/7/1 oruizdorantes at BerliOS : > + ? ? ? "Encryption Key Refersh Complete", A little typo. And no, I didn't proofread all :) Michael From stippi at mail.berlios.de Wed Jul 1 22:39:20 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 22:39:20 +0200 Subject: [Haiku-commits] r31364 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: libavcodec libavformat Message-ID: <200907012039.n61KdKRW021058@sheep.berlios.de> Author: stippi Date: 2009-07-01 22:39:18 +0200 (Wed, 01 Jul 2009) New Revision: 31364 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31364&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/avcodec.h haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile Log: * Added libavcodec to include dirs of libavformat * Removed inclusion of internal.h from libavcodec.h, it's not there in the plain FFmpeg 0.5 version of the file. The last item fixes the GCC2 build, at least AFAICT. Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/avcodec.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/avcodec.h 2009-07-01 20:31:02 UTC (rev 31363) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/avcodec.h 2009-07-01 20:39:18 UTC (rev 31364) @@ -3344,6 +3344,4 @@ */ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel); -#include "internal.h" - #endif /* AVCODEC_AVCODEC_H */ Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile 2009-07-01 20:31:02 UTC (rev 31363) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) @@ -1,6 +1,7 @@ SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavformat ; SubDirHdrs [ FDirName $(SUBDIR) .. ] ; +SubDirHdrs [ FDirName $(SUBDIR) ../libavcodec ] ; SubDirHdrs [ FDirName $(SUBDIR) ../libavutil ] ; UseLibraryHeaders zlib ; From zooey at mail.berlios.de Wed Jul 1 22:58:25 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Wed, 1 Jul 2009 22:58:25 +0200 Subject: [Haiku-commits] r31365 - in haiku/branches/features/32bit-wchar_t/src: add-ons/kernel/file_systems/userlandfs/server add-ons/kernel/file_systems/userlandfs/server/beos add-ons/kernel/file_systems/userlandfs/server/fuse add-ons/kernel/file_systems/userlandfs/server/haiku add-ons/locale/catalogs/zeta add-ons/locale/collators add-ons/media/media-add-ons/esound_sink add-ons/media/media-add-ons/legacy add-ons/media/media-add-ons/reader add-ons/media/plugins/ac3_decoder add-ons/screen_savers/simpleclock add-ons/translators/hpgs add-ons/translators/hvif add-ons/translators/ico bin preferences/bluetooth Message-ID: <200907012058.n61KwP7v022585@sheep.berlios.de> Author: zooey Date: 2009-07-01 22:58:23 +0200 (Wed, 01 Jul 2009) New Revision: 31365 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31365&view=rev Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/beos/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/fuse/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/locale/catalogs/zeta/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/locale/collators/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/esound_sink/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/legacy/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/reader/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ac3_decoder/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/simpleclock/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hpgs/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hvif/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ico/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/bluetooth/Jamfile Log: * added missing references to libsubc++ in src/add-ons Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -43,6 +43,7 @@ : be + $(TARGET_LIBSUPC++) ; HaikuSubInclude beos ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/beos/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/beos/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/beos/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -27,4 +27,5 @@ : userlandfs_server + $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/fuse/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/fuse/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/fuse/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -29,5 +29,5 @@ FUSEVolume.cpp : - userlandfs_server libshared.a be + userlandfs_server libshared.a be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -51,6 +51,7 @@ : userlandfs_server be # for BLocker only + $(TARGET_LIBSUPC++) ; SEARCH on [ FGristFiles Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/locale/catalogs/zeta/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/locale/catalogs/zeta/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/locale/catalogs/zeta/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -4,5 +4,5 @@ Addon zeta : Catalog.cpp - : be liblocale.so + : be liblocale.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/locale/collators/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/locale/collators/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/locale/collators/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -12,11 +12,11 @@ Addon GermanDIN-2 : GermanDIN-2.cpp - : be liblocale.so + : be liblocale.so $(TARGET_LIBSUPC++) ; Addon French : French.cpp - : be liblocale.so + : be liblocale.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/esound_sink/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/esound_sink/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/esound_sink/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -10,7 +10,7 @@ ESDEndpoint.cpp ESDSinkAddOn.cpp ESDSinkNode.cpp - : be media network + : be media network $(TARGET_LIBSUPC++) ; #Package haiku-multi_audio-cvs Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/legacy/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/legacy/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/legacy/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -7,5 +7,5 @@ LegacyAudioDevice.cpp LegacyAudioProducer.cpp LegacyMediaAddOn.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/reader/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/reader/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/media-add-ons/reader/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -10,5 +10,5 @@ MediaReader.cpp MediaReaderAddOn.cpp misc.cpp - : be media + : be media $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ac3_decoder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ac3_decoder/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ac3_decoder/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -4,7 +4,7 @@ Addon ac3_decoder : ac3_decoder.cpp - : liba52.a be libmedia.so + : liba52.a be libmedia.so $(TARGET_LIBSUPC++) ; SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder liba52 ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/simpleclock/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/simpleclock/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/screen_savers/simpleclock/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -5,6 +5,6 @@ ScreenSaver SimpleClock : SimpleClock.cpp - : be libscreensaver.so + : be libscreensaver.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hpgs/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hpgs/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hpgs/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -45,6 +45,7 @@ HPGSTranslator.cpp $(sources) : be translation libpng.so libtextencoding.so libz.so libtranslatorsutils.a + $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hvif/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hvif/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/hvif/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -8,6 +8,6 @@ HVIFMain.cpp HVIFTranslator.cpp HVIFView.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ico/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ico/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/translators/ico/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -10,7 +10,7 @@ ICOTranslator.cpp ConfigView.cpp ICO.cpp - : be translation libtranslatorsutils.a + : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) : true ; Modified: haiku/branches/features/32bit-wchar_t/src/bin/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/bin/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/bin/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -171,7 +171,7 @@ StdBinCommands bt_discovery.cpp - : be libbluetooth.so : $(haiku-utils_rsrc) ; + : be libbluetooth.so $(TARGET_LIBSUPC++) : $(haiku-utils_rsrc) ; # standard commands that need libbe.so, libtracker.so Modified: haiku/branches/features/32bit-wchar_t/src/preferences/bluetooth/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/preferences/bluetooth/Jamfile 2009-07-01 20:39:18 UTC (rev 31364) +++ haiku/branches/features/32bit-wchar_t/src/preferences/bluetooth/Jamfile 2009-07-01 20:58:23 UTC (rev 31365) @@ -13,6 +13,6 @@ ExtendedLocalDeviceView.cpp InquiryPanel.cpp RemoteDevicesView.cpp - : be libbluetooth.so + : be libbluetooth.so $(TARGET_LIBSUPC++) ; From mattmadia at gmail.com Wed Jul 1 23:02:22 2009 From: mattmadia at gmail.com (Matt Madia) Date: Wed, 1 Jul 2009 21:02:22 +0000 Subject: [Haiku-commits] r31364 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: libavcodec libavformat In-Reply-To: <200907012039.n61KdKRW021058@sheep.berlios.de> References: <200907012039.n61KdKRW021058@sheep.berlios.de> Message-ID: <1e42d8c50907011402w16c90952h40c2e0899836d5ef@mail.gmail.com> On Wed, Jul 1, 2009 at 20:39, wrote: > The last item fixes the GCC2 build, at least AFAICT. confirmed. From stippi at mail.berlios.de Wed Jul 1 23:16:59 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Jul 2009 23:16:59 +0200 Subject: [Haiku-commits] r31366 - haiku/trunk/src/add-ons/media/plugins/ffmpeg Message-ID: <200907012116.n61LGxoI024293@sheep.berlios.de> Author: stippi Date: 2009-07-01 23:16:55 +0200 (Wed, 01 Jul 2009) New Revision: 31366 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31366&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.h Log: * Use a static global object to initialize libavformat and libavcodec. * Turn off tracing in the AVCodecDecoder which I accidentally turned on in a previous commit. Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp 2009-07-01 20:58:23 UTC (rev 31365) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp 2009-07-01 21:16:55 UTC (rev 31366) @@ -20,7 +20,7 @@ #define DO_PROFILING 0 #undef TRACE -#define TRACE_AV_CODEC +//#define TRACE_AV_CODEC #ifdef TRACE_AV_CODEC # define TRACE(x...) printf(x) #else @@ -64,20 +64,6 @@ { TRACE("AVCodecDecoder::AVCodecDecoder()\n"); - // prevent multiple inits - static volatile vint32 ff_init_count = 0; - static bool ff_init_done = false; - if (atomic_add(&ff_init_count, 1) > 1) { - atomic_add(&ff_init_count, -1); - // spin until the thread that is initing is done - while (!ff_init_done) - snooze(20000); - } else { - avcodec_init(); - avcodec_register_all(); - ff_init_done = true; - } - ffc = avcodec_alloc_context(); ffpicture = avcodec_alloc_frame(); opicture = avcodec_alloc_frame(); Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-01 20:58:23 UTC (rev 31365) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-01 21:16:55 UTC (rev 31366) @@ -77,7 +77,7 @@ } -static URLProtocol position_io_protocol = { +URLProtocol sPositionIOProtocol = { "position_io", position_io_open, position_io_read, @@ -87,14 +87,6 @@ }; -static int -init_libavformat() -{ - av_register_all(); - return av_register_protocol(&position_io_protocol); -} - - // #pragma mark - AVFormatReader Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-01 20:58:23 UTC (rev 31365) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-01 21:16:55 UTC (rev 31366) @@ -12,13 +12,41 @@ #include "FFmpegPlugin.h" +#include + #include +extern "C" { + #include "avformat.h" +} + #include "AVCodecDecoder.h" #include "AVFormatReader.h" #include "CodecTable.h" +FFmpegPlugin::GlobalInitilizer::GlobalInitilizer() +{ + av_register_all(); + // This will also call av_codec_init() by registering codecs. + + extern URLProtocol sPositionIOProtocol; + av_register_protocol(&sPositionIOProtocol); +} + + +FFmpegPlugin::GlobalInitilizer::~GlobalInitilizer() +{ + // TODO: uninit anything here? +} + + +FFmpegPlugin::GlobalInitilizer FFmpegPlugin::sInitilizer; + + +// #pragma mark - + + Decoder* FFmpegPlugin::NewDecoder(uint index) { Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.h 2009-07-01 20:58:23 UTC (rev 31365) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.h 2009-07-01 21:16:55 UTC (rev 31366) @@ -24,6 +24,15 @@ virtual Decoder* NewDecoder(uint index); virtual status_t GetSupportedFormats(media_format** formats, size_t* count); + +private: + class GlobalInitilizer { + public: + GlobalInitilizer(); + ~GlobalInitilizer(); + }; + + static GlobalInitilizer sInitilizer; }; From superstippi at gmx.de Wed Jul 1 23:18:57 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 01 Jul 2009 23:18:57 +0200 Subject: [Haiku-commits] r31364 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: libavcodec libavformat In-Reply-To: <1e42d8c50907011402w16c90952h40c2e0899836d5ef@mail.gmail.com> References: <200907012039.n61KdKRW021058@sheep.berlios.de> <1e42d8c50907011402w16c90952h40c2e0899836d5ef@mail.gmail.com> Message-ID: <20090701231857.106547.5@bepc.1246458641.fake> On 2009-07-01 at 23:02:22 [+0200], Matt Madia wrote: > On Wed, Jul 1, 2009 at 20:39, wrote: > > The last item fixes the GCC2 build, at least AFAICT. > > confirmed. Thanks! I wasn't sure since I was getting some linking problems most likely from switching to GCC2 without reconfiguring my Haiku tree (only manually switching buil/jam/BuildConfig). Best regards, -Stephan From bonefish at mail.berlios.de Wed Jul 1 23:59:27 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Jul 2009 23:59:27 +0200 Subject: [Haiku-commits] r31367 - in haiku/trunk: headers/private/shared src/kits/support Message-ID: <200907012159.n61LxRPO027691@sheep.berlios.de> Author: bonefish Date: 2009-07-01 23:59:27 +0200 (Wed, 01 Jul 2009) New Revision: 31367 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31367&view=rev Modified: haiku/trunk/headers/private/shared/Referenceable.h haiku/trunk/src/kits/support/Referenceable.cpp Log: * 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. Modified: haiku/trunk/headers/private/shared/Referenceable.h =================================================================== --- haiku/trunk/headers/private/shared/Referenceable.h 2009-07-01 21:16:55 UTC (rev 31366) +++ haiku/trunk/headers/private/shared/Referenceable.h 2009-07-01 21:59:27 UTC (rev 31367) @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007, Ingo Weinhold, bonefish at users.sf.net. All rights reserved. + * Copyright 2004-2009, Ingo Weinhold, ingo_weinhold at gmx.de. * Distributed under the terms of the MIT License. */ #ifndef _REFERENCEABLE_H @@ -15,21 +15,46 @@ public: Referenceable( bool deleteWhenUnreferenced = true); + // TODO: The parameter is deprecated. + // Override LastReferenceReleased() + // instead! virtual ~Referenceable(); - void AddReference() - { atomic_add(&fReferenceCount, 1); } + void AcquireReference(); + bool ReleaseReference(); + // returns true after last - bool RemoveReference(); // returns true after last - int32 CountReferences() const { return fReferenceCount; } + // deprecate aliases + inline void AddReference(); + inline bool RemoveReference(); + protected: + virtual void FirstReferenceAcquired(); + virtual void LastReferenceReleased(); + +protected: vint32 fReferenceCount; bool fDeleteWhenUnreferenced; }; + +void +Referenceable::AddReference() +{ + AcquireReference(); +} + + +bool +Referenceable::RemoveReference() +{ + return ReleaseReference(); +} + + // Reference template class Reference { Modified: haiku/trunk/src/kits/support/Referenceable.cpp =================================================================== --- haiku/trunk/src/kits/support/Referenceable.cpp 2009-07-01 21:16:55 UTC (rev 31366) +++ haiku/trunk/src/kits/support/Referenceable.cpp 2009-07-01 21:59:27 UTC (rev 31367) @@ -1,30 +1,50 @@ /* - * Copyright 2005-2007, Ingo Weinhold, bonefish at users.sf.net. All rights reserved. + * Copyright 2005-2009, Ingo Weinhold, ingo_weinhold at gmx.de. * Distributed under the terms of the MIT License. */ - #include -// constructor Referenceable::Referenceable(bool deleteWhenUnreferenced) : fReferenceCount(1), fDeleteWhenUnreferenced(deleteWhenUnreferenced) { } -// destructor + Referenceable::~Referenceable() { } -// RemoveReference + +void +Referenceable::AcquireReference() +{ + if (atomic_add(&fReferenceCount, 1) == 0) + FirstReferenceAcquired(); +} + + bool -Referenceable::RemoveReference() +Referenceable::ReleaseReference() { bool unreferenced = (atomic_add(&fReferenceCount, -1) == 1); - if (fDeleteWhenUnreferenced && unreferenced) - delete this; + if (unreferenced) + LastReferenceReleased(); return unreferenced; } + + +void +Referenceable::FirstReferenceAcquired() +{ +} + + +void +Referenceable::LastReferenceReleased() +{ + if (fDeleteWhenUnreferenced) + delete this; +} From bonefish at mail.berlios.de Thu Jul 2 00:09:34 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 2 Jul 2009 00:09:34 +0200 Subject: [Haiku-commits] r31368 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files model util Message-ID: <200907012209.n61M9Yb5028382@sheep.berlios.de> Author: bonefish Date: 2009-07-02 00:09:33 +0200 (Thu, 02 Jul 2009) New Revision: 31368 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31368&view=rev Added: haiku/trunk/src/apps/debugger/files/ haiku/trunk/src/apps/debugger/files/FileManager.cpp haiku/trunk/src/apps/debugger/files/FileManager.h haiku/trunk/src/apps/debugger/files/LocatableDirectory.cpp haiku/trunk/src/apps/debugger/files/LocatableDirectory.h haiku/trunk/src/apps/debugger/files/LocatableEntry.cpp haiku/trunk/src/apps/debugger/files/LocatableEntry.h haiku/trunk/src/apps/debugger/files/LocatableFile.cpp haiku/trunk/src/apps/debugger/files/LocatableFile.h haiku/trunk/src/apps/debugger/util/ haiku/trunk/src/apps/debugger/util/Array.h haiku/trunk/src/apps/debugger/util/StringUtils.cpp haiku/trunk/src/apps/debugger/util/StringUtils.h Removed: haiku/trunk/src/apps/debugger/Array.h Modified: haiku/trunk/src/apps/debugger/Jamfile haiku/trunk/src/apps/debugger/Jobs.cpp haiku/trunk/src/apps/debugger/MessageCodes.h haiku/trunk/src/apps/debugger/TeamDebugger.cpp haiku/trunk/src/apps/debugger/TeamDebugger.h haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h haiku/trunk/src/apps/debugger/dwarf/Jamfile haiku/trunk/src/apps/debugger/model/Image.cpp haiku/trunk/src/apps/debugger/model/Image.h haiku/trunk/src/apps/debugger/model/Team.cpp haiku/trunk/src/apps/debugger/model/Team.h Log: * Moved Array.h to new directory "types". * Added StringUtils with string hash functions. * Added Locatable{Entry,File,Directory} and FileManager classes to manage the mapping from debug info/target file names to local file names. * Image does now have a LocatableFile referring to the image's shared object file. Added listening to location changes of these files to TeamDebugger. No action is taken yet (should trigger reloading the debug info). Deleted: haiku/trunk/src/apps/debugger/Array.h Modified: haiku/trunk/src/apps/debugger/Jamfile =================================================================== --- haiku/trunk/src/apps/debugger/Jamfile 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/Jamfile 2009-07-01 22:09:33 UTC (rev 31368) @@ -11,9 +11,11 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) debug_info ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) debugger_interface ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) elf ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) files ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) gui team_window ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) model ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) types ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) util ] ; local debugAnalyzerSources = [ FDirName $(HAIKU_TOP) src apps debuganalyzer ] ; @@ -68,6 +70,12 @@ # elf ElfFile.cpp + # files + FileManager.cpp + LocatableDirectory.cpp + LocatableEntry.cpp + LocatableFile.cpp + # gui/team_window ImageFunctionsView.cpp ImageListView.cpp @@ -96,6 +104,9 @@ # types TargetAddressRangeList.cpp + # util + StringUtils.cpp + : Debugger_demangler.o Debugger_disasm_x86.o Modified: haiku/trunk/src/apps/debugger/Jobs.cpp =================================================================== --- haiku/trunk/src/apps/debugger/Jobs.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/Jobs.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -253,7 +253,7 @@ // create the debug info ImageDebugInfo* debugInfo; status_t error = fImage->GetTeam()->DebugInfo()->LoadImageDebugInfo( - imageInfo, debugInfo); + imageInfo, fImage->ImageFile(), debugInfo); // set the result locker.Lock(); Modified: haiku/trunk/src/apps/debugger/MessageCodes.h =================================================================== --- haiku/trunk/src/apps/debugger/MessageCodes.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/MessageCodes.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -19,6 +19,7 @@ MSG_THREAD_CPU_STATE_CHANGED = 'tcsc', MSG_THREAD_STACK_TRACE_CHANGED = 'tstc', MSG_IMAGE_DEBUG_INFO_CHANGED = 'idic', + MSG_IMAGE_FILE_CHANGED = 'ifch', MSG_FUNCTION_SOURCE_CODE_CHANGED = 'fnsc', MSG_USER_BREAKPOINT_CHANGED = 'ubrc', MSG_DEBUGGER_EVENT = 'dbge', Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp =================================================================== --- haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -20,13 +20,94 @@ #include "BreakpointManager.h" #include "CpuState.h" #include "DebuggerInterface.h" +#include "FileManager.h" #include "Jobs.h" +#include "LocatableFile.h" #include "MessageCodes.h" #include "Statement.h" #include "TeamDebugInfo.h" #include "TeamDebugModel.h" +// #pragma mark - ImageHandler + +struct TeamDebugger::ImageHandler : public Referenceable, + public HashTableLink, private LocatableFile::Listener { +public: + ImageHandler(TeamDebugger* teamDebugger, Image* image) + : + fTeamDebugger(teamDebugger), + fImage(image) + { + fImage->AcquireReference(); + if (fImage->ImageFile() != NULL) + fImage->ImageFile()->AddListener(this); + } + + ~ImageHandler() + { + if (fImage->ImageFile() != NULL) + fImage->ImageFile()->RemoveListener(this); + fImage->ReleaseReference(); + } + + Image* GetImage() const + { + return fImage; + } + + image_id ImageID() const + { + return fImage->ID(); + } + +private: + // LocatableFile::Listener + virtual void LocatableFileChanged(LocatableFile* file) + { + BMessage message(MSG_IMAGE_FILE_CHANGED); + message.AddInt32("image", fImage->ID()); + fTeamDebugger->PostMessage(&message); + } + +private: + TeamDebugger* fTeamDebugger; + Image* fImage; +}; + + +// #pragma mark - ImageHandlerHashDefinition + + +struct TeamDebugger::ImageHandlerHashDefinition { + typedef image_id KeyType; + typedef ImageHandler ValueType; + + size_t HashKey(image_id key) const + { + return (size_t)key; + } + + size_t Hash(const ImageHandler* value) const + { + return HashKey(value->ImageID()); + } + + bool Compare(image_id key, const ImageHandler* value) const + { + return value->ImageID() == key; + } + + HashTableLink* GetLink(ImageHandler* value) const + { + return value; + } +}; + + +// #pragma mark - TeamDebugger + + TeamDebugger::TeamDebugger(Listener* listener) : BLooper("team debugger"), @@ -34,7 +115,9 @@ fTeam(NULL), fDebugModel(NULL), fTeamID(-1), + fImageHandlers(NULL), fDebuggerInterface(NULL), + fFileManager(NULL), fWorker(NULL), fBreakpointManager(NULL), fDebugEventListener(-1), @@ -73,15 +156,25 @@ ThreadHandler* threadHandler = fThreadHandlers.Clear(true); while (threadHandler != NULL) { ThreadHandler* next = threadHandler->fNext; - threadHandler->RemoveReference(); + threadHandler->ReleaseReference(); threadHandler = next; } + ImageHandler* imageHandler = fImageHandlers->Clear(true); + while (imageHandler != NULL) { + ImageHandler* next = imageHandler->fNext; + imageHandler->ReleaseReference(); + imageHandler = next; + } + + delete fImageHandlers; + delete fBreakpointManager; delete fDebuggerInterface; delete fWorker; delete fDebugModel; delete fTeam; + delete fFileManager; fListener->TeamDebuggerQuit(this); } @@ -90,6 +183,9 @@ status_t TeamDebugger::Init(team_id teamID, thread_id threadID, bool stopInMain) { + bool targetIsLocal = true; + // TODO: Support non-local targets! + fTeamID = teamID; // create debugger interface @@ -101,6 +197,15 @@ if (error != B_OK) return error; + // create file manager + fFileManager = new(std::nothrow) FileManager; + if (fFileManager == NULL) + return B_NO_MEMORY; + + error = fFileManager->Init(targetIsLocal); + if (error != B_OK) + return error; + // create team debug info TeamDebugInfo* teamDebugInfo = new(std::nothrow) TeamDebugInfo( fDebuggerInterface, fDebuggerInterface->GetArchitecture()); @@ -137,6 +242,15 @@ if (error != B_OK) return error; + // create image handler table + fImageHandlers = new(std::nothrow) ImageHandlerTable; + if (fImageHandlers == NULL) + return B_NO_MEMORY; + + error = fImageHandlers->Init(); + if (error != B_OK) + return error; + // create our worker fWorker = new(std::nothrow) Worker; if (fWorker == NULL) @@ -198,7 +312,7 @@ BObjectList imageInfos(20, true); status_t error = fDebuggerInterface->GetImageInfos(imageInfos); for (int32 i = 0; ImageInfo* info = imageInfos.ItemAt(i); i++) { - error = fTeam->AddImage(*info); + error = _AddImage(*info); if (error != B_OK) return error; } @@ -320,6 +434,16 @@ break; } + case MSG_IMAGE_FILE_CHANGED: + { + int32 imageID; + if (message->FindInt32("image", &imageID) != B_OK) + break; + + _HandleImageFileChanged(imageID); + break; + } + case MSG_DEBUGGER_EVENT: { DebugEvent* event; @@ -663,7 +787,7 @@ TeamDebugger::_HandleImageCreated(ImageCreatedEvent* event) { AutoLocker< ::Team> locker(fTeam); - fTeam->AddImage(event->GetImageInfo()); + _AddImage(event->GetImageInfo()); return false; } @@ -673,11 +797,27 @@ { AutoLocker< ::Team> locker(fTeam); fTeam->RemoveImage(event->GetImageInfo().ImageID()); + + ImageHandler* imageHandler = fImageHandlers->Lookup( + event->GetImageInfo().ImageID()); + if (imageHandler != NULL) { + fImageHandlers->Remove(imageHandler); + imageHandler->ReleaseReference(); + } + return false; } void +TeamDebugger::_HandleImageFileChanged(image_id imageID) +{ +printf("TeamDebugger::_HandleImageFileChanged(%ld)\n", imageID); +// TODO: Reload the debug info! +} + + +void TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) { printf("TeamDebugger::_HandleSetUserBreakpoint(%#llx, %d)\n", address, enabled); @@ -710,6 +850,27 @@ } +status_t +TeamDebugger::_AddImage(const ImageInfo& imageInfo) +{ + LocatableFile* file = NULL; + if (strchr(imageInfo.Name(), '/') != NULL) + file = fFileManager->GetTargetFile(imageInfo.Name()); + Reference imageFileReference(file, true); + + Image* image; + status_t error = fTeam->AddImage(imageInfo, file, &image); + if (error != B_OK) + return error; + + ImageHandler* imageHandler = new(std::nothrow) ImageHandler(this, image); + if (imageHandler != NULL) + fImageHandlers->Insert(imageHandler); + + return B_OK; +} + + void TeamDebugger::_NotifyUser(const char* title, const char* text,...) { Modified: haiku/trunk/src/apps/debugger/TeamDebugger.h =================================================================== --- haiku/trunk/src/apps/debugger/TeamDebugger.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/TeamDebugger.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -18,6 +18,7 @@ class DebuggerInterface; +class FileManager; class TeamDebugInfo; class TeamDebugModel; @@ -65,6 +66,11 @@ const ::Team::ThreadEvent& event); private: + struct ImageHandler; + struct ImageHandlerHashDefinition; + typedef OpenHashTable ImageHandlerTable; + +private: static status_t _DebugEventListenerEntry(void* data); status_t _DebugEventListener(); @@ -79,14 +85,17 @@ bool _HandleImageDeleted( ImageDeletedEvent* event); + void _HandleImageFileChanged(image_id imageID); + void _HandleSetUserBreakpoint(target_addr_t address, bool enabled); void _HandleClearUserBreakpoint( target_addr_t address); - ThreadHandler* _GetThreadHandler(thread_id threadID); + status_t _AddImage(const ImageInfo& imageInfo); + void _NotifyUser(const char* title, const char* text,...); @@ -97,8 +106,10 @@ team_id fTeamID; ThreadHandlerTable fThreadHandlers; // protected by the team lock + ImageHandlerTable* fImageHandlers; DebuggerInterface* fDebuggerInterface; TeamDebugInfo* fTeamDebugInfo; + FileManager* fFileManager; Worker* fWorker; BreakpointManager* fBreakpointManager; thread_id fDebugEventListener; Modified: haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -33,7 +33,7 @@ status_t DebuggerTeamDebugInfo::CreateImageDebugInfo(const ImageInfo& imageInfo, - SpecificImageDebugInfo*& _imageDebugInfo) + LocatableFile* imageFile, SpecificImageDebugInfo*& _imageDebugInfo) { DebuggerImageDebugInfo* debuggerInfo = new(std::nothrow) DebuggerImageDebugInfo(imageInfo, Modified: haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -23,6 +23,7 @@ status_t Init(); virtual status_t CreateImageDebugInfo(const ImageInfo& imageInfo, + LocatableFile* imageFile, SpecificImageDebugInfo*& _imageDebugInfo); private: Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -11,6 +11,7 @@ #include "DwarfImageDebugInfo.h" #include "DwarfManager.h" +#include "LocatableFile.h" DwarfTeamDebugInfo::DwarfTeamDebugInfo(Architecture* architecture) @@ -44,15 +45,16 @@ status_t DwarfTeamDebugInfo::CreateImageDebugInfo(const ImageInfo& imageInfo, - SpecificImageDebugInfo*& _imageDebugInfo) + LocatableFile* imageFile, SpecificImageDebugInfo*& _imageDebugInfo) { - // We only want images that belong to shared objects. - if (strchr(imageInfo.Name(), '/') == NULL) + // We only like images whose file we can play with. + BString filePath; + if (imageFile == NULL || !imageFile->GetLocatedPath(filePath)) return B_ENTRY_NOT_FOUND; // try to load the DWARF file DwarfFile* file; - status_t error = fManager->LoadFile(imageInfo.Name(), file); + status_t error = fManager->LoadFile(filePath, file); if (error == B_OK) error = fManager->FinishLoading(); if (error != B_OK) Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -21,6 +21,7 @@ status_t Init(); virtual status_t CreateImageDebugInfo(const ImageInfo& imageInfo, + LocatableFile* imageFile, SpecificImageDebugInfo*& _imageDebugInfo); private: Modified: haiku/trunk/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -9,6 +9,7 @@ class ImageInfo; +class LocatableFile; class SpecificImageDebugInfo; @@ -17,6 +18,7 @@ virtual ~SpecificTeamDebugInfo(); virtual status_t CreateImageDebugInfo(const ImageInfo& imageInfo, + LocatableFile* imageFile, SpecificImageDebugInfo*& _imageDebugInfo) = 0; }; Modified: haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -67,7 +67,7 @@ status_t TeamDebugInfo::LoadImageDebugInfo(const ImageInfo& imageInfo, - ImageDebugInfo*& _imageDebugInfo) + LocatableFile* imageFile, ImageDebugInfo*& _imageDebugInfo) { ImageDebugInfo* imageDebugInfo = new(std::nothrow) ImageDebugInfo( imageInfo); @@ -79,7 +79,7 @@ = fSpecificInfos.ItemAt(i); i++) { SpecificImageDebugInfo* specificImageInfo; status_t error = specificTeamInfo->CreateImageDebugInfo(imageInfo, - specificImageInfo); + imageFile, specificImageInfo); if (error == B_OK) { if (!imageDebugInfo->AddSpecificInfo(specificImageInfo)) { delete specificImageInfo; Modified: haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h 2009-07-01 22:09:33 UTC (rev 31368) @@ -15,6 +15,7 @@ class DebuggerInterface; class ImageDebugInfo; class ImageInfo; +class LocatableFile; class SpecificTeamDebugInfo; @@ -28,6 +29,7 @@ status_t Init(); status_t LoadImageDebugInfo(const ImageInfo& imageInfo, + LocatableFile* imageFile, ImageDebugInfo*& _imageDebugInfo); private: Modified: haiku/trunk/src/apps/debugger/dwarf/Jamfile =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/Jamfile 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/dwarf/Jamfile 2009-07-01 22:09:33 UTC (rev 31368) @@ -9,6 +9,7 @@ SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) elf ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) types ] ; +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) util ] ; MergeObject Debugger_dwarf.o Added: haiku/trunk/src/apps/debugger/files/FileManager.cpp =================================================================== --- haiku/trunk/src/apps/debugger/files/FileManager.cpp 2009-07-01 21:59:27 UTC (rev 31367) +++ haiku/trunk/src/apps/debugger/files/FileManager.cpp 2009-07-01 22:09:33 UTC (rev 31368) @@ -0,0 +1,541 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + +#include "FileManager.h" + +#include + +#include + +#include "LocatableDirectory.h" +#include "LocatableFile.h" +#include "StringUtils.h" + + +// #pragma mark - EntryPath + + +struct FileManager::EntryPath { + const char* directory; + const char* name; + + EntryPath(const char* directory, const char* name) + : + directory(directory), + name(name) + { + } + + EntryPath(const BString& directory, const BString& name) + : + directory(directory.Length() > 0 ? directory.String() : NULL), + name(name.String()) + { + } + + EntryPath(const LocatableEntry* entry) + : + directory(entry->Parent() != NULL ? entry->Parent()->Path() : NULL), + name(entry->Name()) + { + } + + EntryPath(const EntryPath& other) + : + directory(other.directory), + name(other.name) + { + } + + size_t HashValue() const + { + return StringUtils::HashValue(directory) + ^ StringUtils::HashValue(name); + } + + bool operator==(const EntryPath& other) const + { + if (directory != other.directory + && (directory == NULL || other.directory == NULL + || strcmp(directory, other.directory) != 0)) { + return false; + } + + return strcmp(name, other.name) == 0; + } +}; + + +// #pragma mark - EntryHashDefinition + + +struct FileManager::EntryHashDefinition { + typedef EntryPath KeyType; + typedef LocatableEntry ValueType; + + size_t HashKey(const EntryPath& key) const + { + return key.HashValue(); + } + + size_t Hash(const LocatableEntry* value) const + { + return HashKey(EntryPath(value)); + } + + bool Compare(const EntryPath& key, const LocatableEntry* value) const + { + return EntryPath(value) == key; + } + + HashTableLink* GetLink(LocatableEntry* value) const + { + return value; + } +}; + + +// #pragma mark - Domain + + +class FileManager::Domain : private LocatableEntryOwner { +public: + Domain(FileManager* manager, bool isLocal) + : + fManager(manager), + fIsLocal(isLocal) + { + } + + ~Domain() + { + LocatableEntry* entry = fEntries.Clear(true); + while (entry != NULL) { + LocatableEntry* next = entry->fNext; + entry->RemoveReference(); + entry = next; + } + } + + status_t Init() + { + status_t error = fEntries.Init(); + if (error != B_OK) + return error; + + return B_OK; + } + + LocatableFile* GetFile(const BString& directoryPath, const BString& name) + { + BString normalizedDirectoryPath; + _NormalizePath(directoryPath, normalizedDirectoryPath); + LocatableFile* file = _GetFile(normalizedDirectoryPath, name); + if (file == NULL) + return NULL; + + // try to auto-locate the file + if (LocatableDirectory* directory = file->Parent()) { + if (directory->State() == LOCATABLE_ENTRY_UNLOCATED) { + // parent not yet located -- try locate with the entry's path + BString path; + file->GetPath(path); + _LocateEntry(file, path, true, true); + } else { + // parent already located -- locate the entry in the parent + BString locatedDirectoryPath; + if (directory->GetLocatedPath(locatedDirectoryPath)) + _LocateEntryInParentDir(file, locatedDirectoryPath); + } + } + + return file; + } + + LocatableFile* GetFile(const BString& path) + { + BString directoryPath; + BString name; + _SplitPath(path, directoryPath, name); + return _GetFile(directoryPath, name); + } + + void EntryLocated(const BString& path, const BString& locatedPath) + { + BString directory; + BString name; + _SplitPath(path, directory, name); + + LocatableEntry* entry = fEntries.Lookup(EntryPath(directory, name)); + if (entry == NULL) + return; + + _LocateEntry(entry, locatedPath, false, true); + } + +private: + virtual bool Lock() + { + return fManager->Lock(); + } + + virtual void Unlock() + { + fManager->Unlock(); + } + + virtual bool LocatableEntryUnused(LocatableEntry* entry) + { + fEntries.Remove(entry); + return true; + } + + bool _LocateDirectory(LocatableDirectory* directory, + const BString& locatedPath) + { + if (directory == NULL + || directory->State() != LOCATABLE_ENTRY_UNLOCATED) { + return false; + } + + // locate the parent, if possible, otherwise this directory + BString locatedDirectory; + BString locatedName; + _SplitNormalizedPath(locatedPath, locatedDirectory, locatedName); + if (locatedName != directory->Name() + || !_LocateDirectory(directory->Parent(), locatedDirectory)) { + directory->SetLocatedPath(locatedPath, true); + _LocateEntries(directory, locatedPath); + } + + return true; + } + + bool _LocateEntry(LocatableEntry* entry, const BString& locatedPath, + bool implicit, bool locateAncestors) + { + if (implicit && entry->State() == LOCATABLE_ENTRY_LOCATED_EXPLICITLY) + return false; + + struct stat st; + if (stat(locatedPath, &st) != 0) + return false; + + if (S_ISDIR(st.st_mode)) { + LocatableDirectory* directory + = dynamic_cast(entry); + if (directory == NULL) + return false; + entry->SetLocatedPath(locatedPath, implicit); + } else if (S_ISREG(st.st_mode)) { + LocatableFile* file = dynamic_cast(entry); + if (file == NULL) + return false; + entry->SetLocatedPath(locatedPath, implicit); + } + + // locate the ancestor directories, if requested + if (locateAncestors) { + BString locatedDirectory; + BString locatedName; + _SplitPath(locatedPath, locatedDirectory, locatedName); + if (locatedName == entry->Name()) + _LocateDirectory(entry->Parent(), locatedDirectory); + } + + return true; + } + + bool _LocateEntryInParentDir(LocatableEntry* entry, + const BString& locatedDirectoryPath) + { + // construct the located entry path + BString locatedEntryPath(locatedDirectoryPath); + int32 pathLength = locatedEntryPath.Length(); + if (pathLength >= 1 && locatedEntryPath.ByteAt(pathLength - 1) != '/') + locatedEntryPath << '/'; + locatedEntryPath << entry->Name(); + + return _LocateEntry(entry, locatedEntryPath, true, false); + } + + void _LocateEntries(LocatableDirectory* directory, + const BString& locatedPath) + { + for (LocatableEntryList::ConstIterator it + = directory->Entries().GetIterator(); + LocatableEntry* entry = it.Next();) { + if (entry->State() == LOCATABLE_ENTRY_LOCATED_EXPLICITLY) + continue; + + if (_LocateEntryInParentDir(entry, locatedPath)) { + // recurse for directories + if (LocatableDirectory* subDir + = dynamic_cast(entry)) { + BString locatedEntryPath; + if (subDir->GetLocatedPath(locatedEntryPath)) + _LocateEntries(subDir, locatedEntryPath); + } + } + } + } + + LocatableFile* _GetFile(const BString& directoryPath, const BString& name) + { + // if already know return the file + LocatableEntry* entry = fEntries.Lookup(EntryPath(directoryPath, name)); + if (entry != NULL) { + LocatableFile* file = dynamic_cast(entry); + if (file == NULL) + return NULL; + + file->AcquireReference(); + return file; + } + + // no such file yet -- create it + BString normalizedDirPath; + _NormalizePath(directoryPath, normalizedDirPath); + LocatableDirectory* directory = _GetDirectory(normalizedDirPath); + if (directory == NULL) + return NULL; + + LocatableFile* file = new(std::nothrow) LocatableFile(this, directory, + name); + if (file == NULL) { + directory->ReleaseReference(); + return NULL; + } + + fEntries.Insert(file); + return file; + } + + LocatableDirectory* _GetDirectory(const BString& path) + { + BString directoryPath; + BString fileName; + _SplitNormalizedPath(path, directoryPath, fileName); + + // if already know return the directory + LocatableEntry* entry + = fEntries.Lookup(EntryPath(directoryPath, fileName)); + if (entry != NULL) { + LocatableDirectory* directory + = dynamic_cast(entry); + if (directory == NULL) + return NULL; + directory->AcquireReference(); + return directory; + } + + // get the parent directory + LocatableDirectory* parentDirectory = NULL; + if (directoryPath.Length() > 0) { + parentDirectory = _GetDirectory(directoryPath); + if (parentDirectory == NULL) + return NULL; + } + + // create a new directory + LocatableDirectory* directory = new(std::nothrow) LocatableDirectory( + this, parentDirectory, path); + if (directory == NULL) { + parentDirectory->ReleaseReference(); + return NULL; + } + + // auto-locate, if possible + if (fIsLocal) { + BString dirPath; + directory->GetPath(dirPath); + directory->SetLocatedPath(dirPath, false); + } else if (parentDirectory != NULL + && parentDirectory->State() != LOCATABLE_ENTRY_UNLOCATED) { +// TODO:... + } + + fEntries.Insert(directory); + return directory; + } + + void _NormalizePath(const BString& path, BString& _normalizedPath) + { + BString normalizedPath; + char* buffer = normalizedPath.LockBuffer(path.Length()); + int32 outIndex = 0; + const char* remaining = path.String(); + + while (*remaining != '\0') { + // collapse repeated slashes + if (*remaining == '/') { + buffer[outIndex++] = '/'; + remaining++; + while (*remaining == '/') + remaining++; + } + + if (*remaining == '\0') { + // remove trailing slash (unless it's "/" only) + if (outIndex > 1) + outIndex--; + break; + } + + // skip "." components + if (*remaining == '.') { + if (remaining[1] == '\0') + break; + + if (remaining[1] == '/') { + remaining += 2; + while (*remaining == '/') + remaining++; + continue; + } + } + + // copy path component + while (*remaining != '\0' && *remaining != '/') + buffer[outIndex++] = *(remaining++); + } + + // If the path didn't change, use the original path (BString's copy on + // write mechanism) rather than the new string. + if (outIndex == path.Length()) { + _normalizedPath = path; + } else { + normalizedPath.UnlockBuffer(outIndex); + _normalizedPath = normalizedPath; + } + } + + void _SplitPath(const BString& path, BString& _directory, BString& _name) + { + BString normalized; + _NormalizePath(path, normalized); + _SplitNormalizedPath(normalized, _directory, _name); + } + + void _SplitNormalizedPath(const BString& path, BString& _directory, + BString& _name) + { + // handle single component (including root dir) cases + int32 lastSlash = path.FindLast('/'); + if (lastSlash < 0 || path.Length() == 1) { + _directory = (const char*)NULL; + _name = path; + return; + } + + // handle root dir + one component and multi component cases + if (lastSlash == 0) + _directory = "/"; + else + _directory.SetTo(path, lastSlash); + _name = path.String() + (lastSlash + 1); + } + +private: + FileManager* fManager; + LocatableEntryTable fEntries; + bool fIsLocal; +}; + + +// #pragma mark - FileManager + [... truncated: 791 lines follow ...] From joe.prostko+haiku at gmail.com Thu Jul 2 01:43:50 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Wed, 1 Jul 2009 19:43:50 -0400 Subject: [Haiku-commits] r31365 - in haiku/branches/features/32bit-wchar_t/src: add-ons/kernel/file_systems/userlandfs/server add-ons/kernel/file_systems/userlandfs/server/beos add-ons/kernel/file_systems/userlandfs/server/fuse add-ons/kernel/file_systems Message-ID: <7e5795b0907011643t43c5e714n7459700339622ce0@mail.gmail.com> On Wed, Jul 1, 2009 at 4:58 PM, zooey at BerliOS wrote: > Author: zooey > Date: 2009-07-01 22:58:23 +0200 (Wed, 01 Jul 2009) > New Revision: 31365 Oliver, Just for reference, whenever you merge mainline back into the branch, you'll have to add in a $(TARGET_LIBSUSP++) for the newly added ffmpeg as well. If not, it'll bomb out with undefined references to new, delete, and std::nothrow and the like. Below is a tiny diff for that. Index: src/add-ons/media/plugins/ffmpeg/Jamfile =================================================================== --- src/add-ons/media/plugins/ffmpeg/Jamfile (revision 31368) +++ src/add-ons/media/plugins/ffmpeg/Jamfile (working copy) @@ -28,7 +28,7 @@ libswscale.a be libmedia.so - libz.a + libz.a $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ; From axeld at pinc-software.de Thu Jul 2 08:52:01 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Thu, 02 Jul 2009 08:52:01 +0200 CEST Subject: [Haiku-commits] r31363 - haiku/trunk/src/kits/bluetooth In-Reply-To: <200907012031.n61KV28o019550@sheep.berlios.de> Message-ID: <593042056-BeMail@zon> oruizdorantes at BerliOS wrote: > +const char* > +GetError(uint8 error) { > + if (error < sizeof(bluetoothErrors)/sizeof(const char*)) { Coding style... const char* GetError(uint8 error) { ... ) / sizeof(... } Bye, Axel. From stippi at mail.berlios.de Thu Jul 2 15:31:53 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Thu, 2 Jul 2009 15:31:53 +0200 Subject: [Haiku-commits] r31369 - haiku/trunk/src/add-ons/media/plugins/ffmpeg Message-ID: <200907021331.n62DVrUa003859@sheep.berlios.de> Author: stippi Date: 2009-07-02 15:31:50 +0200 (Thu, 02 Jul 2009) New Revision: 31369 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31369&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp Log: Work in Progress of trying to get libavformat to detect anything... unsuccessful so far. Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-01 22:09:33 UTC (rev 31368) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-02 13:31:50 UTC (rev 31369) @@ -18,12 +18,13 @@ extern "C" { #include "avformat.h" + #include "libavutil/avstring.h" } //#include "RawFormats.h" -//#define TRACE_AVFORMAT_READER +#define TRACE_AVFORMAT_READER #ifdef TRACE_AVFORMAT_READER # define TRACE printf #else @@ -40,7 +41,35 @@ static int position_io_open(URLContext* h, const char* filename, int flags) { - // always successful, priv_data is set elsewhere + TRACE("position_io_open(%s)\n", filename); + + // Strip the URL prefix + av_strstart(filename, "position_io:", &filename); + + void* pointer; + if (sscanf(filename, "%p", &pointer) != 1) { + TRACE("position_io_open(%s) - unable to scan BPositionIO pointer\n", + filename); + return AVERROR(ENOENT); + } + + // When the pointer was placed, it was a BDataIO*. Try to convert that + // into a BPositionIO. + // TODO: Later we may implement two different protocols, one which + // supports seeking (BPositionIO) and one that does not (BDataIO). + BDataIO* dataIO = reinterpret_cast(pointer); + BPositionIO* positionIO = dynamic_cast(dataIO); + if (positionIO == NULL) { + TRACE("position_io_open(%s) - unable to cast BDataIO pointer %p\n", + filename, dataIO); + return AVERROR(ENOENT); + } + + TRACE("position_io_open(%s) - success: BPositionIO: %p\n", + filename, positionIO); + + h->priv_data = reinterpret_cast(positionIO); + return 0; } @@ -48,6 +77,8 @@ static int position_io_read(URLContext* h, unsigned char* buffer, int size) { + TRACE("position_io_read(%d)\n", size); + BPositionIO* source = reinterpret_cast(h->priv_data); return source->Read(buffer, size); } @@ -56,22 +87,28 @@ static int position_io_write(URLContext* h, unsigned char* buffer, int size) { + TRACE("position_io_write(%d)\n", size); + BPositionIO* source = reinterpret_cast(h->priv_data); return source->Write(buffer, size); } static int64_t -position_io_seek(URLContext *h, int64_t position, int whence) +position_io_seek(URLContext* h, int64_t position, int whence) { + TRACE("position_io_seek(%lld, %d)\n", position, whence); + BPositionIO* source = reinterpret_cast(h->priv_data); return source->Seek(position, whence); } static int -position_io_close(URLContext *h) +position_io_close(URLContext* h) { + TRACE("position_io_close()\n"); + // We do not close ourselves here. return 0; } @@ -122,6 +159,72 @@ { TRACE("AVFormatReader::Sniff\n"); +#if 0 + // Construct an URL string that allows us to get the Source() + // BPositionIO pointer and try to open the stream. + char urlString[64]; + snprintf(urlString, sizeof(urlString), "position_io:%p", (void*)Source()); + + if (av_open_input_file(&fContext, urlString, NULL, 0, NULL) < 0) { + TRACE("AVFormatReader::Sniff() - av_open_input_file(%s) failed!\n", + urlString); + return B_ERROR; + } + +#else + size_t bufferSize = 64 * 1024; + uint8 buffer[bufferSize]; + AVProbeData probeData; + probeData.filename = ""; + probeData.buf = buffer; + probeData.buf_size = bufferSize; + + // Read a bit of the input + _ReadPacket(Source(), buffer, bufferSize); + + // Probe the input format + AVInputFormat* inputFormat = av_probe_input_format(&probeData, 1); + + if (inputFormat == NULL) { + TRACE("AVFormatReader::Sniff() - av_probe_input_format() failed!\n"); + return B_ERROR; + } + + TRACE("AVFormatReader::Sniff() - av_probe_input_format(): %s\n", + inputFormat->name); + + ByteIOContext ioContext; + + // Init io module for input + if (init_put_byte(&ioContext, buffer, bufferSize, 0, Source(), + _ReadPacket, 0, _Seek) != 0) { + TRACE("AVFormatReader::Sniff() - init_put_byte() failed!\n"); + return B_ERROR; + } + + AVFormatParameters params; + memset(¶ms, 0, sizeof(params)); + + if (av_open_input_stream(&fContext, &ioContext, "", inputFormat, + ¶ms) < 0) { + TRACE("AVFormatReader::Sniff() - av_open_input_file() failed!\n"); + return B_ERROR; + } +#endif + + TRACE("AVFormatReader::Sniff() - av_open_input_file() success!\n"); + + // Retrieve stream information + if (av_find_stream_info(fContext) < 0) { + TRACE("AVFormatReader::Sniff() - av_find_stream_info() failed!\n"); + return B_ERROR; + } + + TRACE("AVFormatReader::Sniff() - av_find_stream_info() success!\n"); + + // Dump information about stream onto standard error + dump_format(fContext, 0, "", 0); + return B_ERROR; } @@ -177,7 +280,7 @@ status_t AVFormatReader::Seek(void* _cookie, uint32 seekTo, int64* frame, - bigtime_t* time) + bigtime_t* time) { return B_ERROR; } @@ -199,3 +302,38 @@ } +// #pragma mark - + + +/*static*/ int +AVFormatReader::_ReadPacket(void* cookie, uint8* buffer, int bufferSize) +{ + TRACE("AVFormatReader::_ReadPacket(%p, %p, %d)\n", cookie, buffer, + bufferSize); + + BDataIO* dataIO = reinterpret_cast(cookie); + ssize_t read = dataIO->Read(buffer, bufferSize); + + TRACE(" read: %ld\n", read); + return read; +} + + +/*static*/ off_t +AVFormatReader::_Seek(void* cookie, off_t offset, int whence) +{ + TRACE("AVFormatReader::_Seek(%p, %lld, %d)\n", cookie, offset, whence); + + BDataIO* dataIO = reinterpret_cast(cookie); + BPositionIO* positionIO = dynamic_cast(dataIO); + if (positionIO == NULL) { + TRACE(" not a BPositionIO\n"); + return -1; + } + + off_t position = positionIO->Seek(offset, whence); + + TRACE(" position: %lld\n", position); + return position; +} + Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-01 22:09:33 UTC (rev 31368) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-02 13:31:50 UTC (rev 31369) @@ -42,6 +42,12 @@ media_header* mediaHeader); private: + static int _ReadPacket(void* cookie, + uint8* buffer, int bufferSize); + + static off_t _Seek(void* cookie, + off_t offset, int whence); + AVFormatContext* fContext; }; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-01 22:09:33 UTC (rev 31368) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-02 13:31:50 UTC (rev 31369) @@ -32,6 +32,12 @@ extern URLProtocol sPositionIOProtocol; av_register_protocol(&sPositionIOProtocol); + +// // Dump the supported protocols to stdout. +// URLProtocol* p = NULL; +// while ((p = av_protocol_next(p)) != NULL) { +// printf("supported protocol: %s\n", p->name); +// } } From axeld at mail.berlios.de Thu Jul 2 16:05:44 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Jul 2009 16:05:44 +0200 Subject: [Haiku-commits] r31370 - haiku/trunk/src/system/kernel Message-ID: <200907021405.n62E5ibR007953@sheep.berlios.de> Author: axeld Date: 2009-07-02 16:05:44 +0200 (Thu, 02 Jul 2009) New Revision: 31370 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31370&view=rev Modified: haiku/trunk/src/system/kernel/real_time_clock.c Log: * _user_{get|set}_tzfilename() can now be used with NULL filename pointers in case one just want to get or set the timezone. * Minor cleanup. Modified: haiku/trunk/src/system/kernel/real_time_clock.c =================================================================== --- haiku/trunk/src/system/kernel/real_time_clock.c 2009-07-02 13:31:50 UTC (rev 31369) +++ haiku/trunk/src/system/kernel/real_time_clock.c 2009-07-02 14:05:44 UTC (rev 31370) @@ -297,18 +297,18 @@ if (geteuid() != 0) return B_NOT_ALLOWED; - if (!IS_USER_ADDRESS(filename) - || filename == NULL - || user_strlcpy(sTimezoneFilename, filename, - B_PATH_NAME_LENGTH) < B_OK) - return B_BAD_ADDRESS; + if (filename != NULL && length > 0) { + if (!IS_USER_ADDRESS(filename) + || user_strlcpy(sTimezoneFilename, filename, B_PATH_NAME_LENGTH) < 0) + return B_BAD_ADDRESS; + } sIsGMT = isGMT; if (wasGMT != sIsGMT) { arch_rtc_set_system_time_offset(sRealTimeData, - arch_rtc_get_system_time_offset(sRealTimeData) + (((sIsGMT) ? 1 : -1) - * sTimezoneOffset)); + arch_rtc_get_system_time_offset(sRealTimeData) + + (sIsGMT ? 1 : -1) * sTimezoneOffset); } return B_OK; @@ -316,14 +316,21 @@ status_t -_user_get_tzfilename(char *filename, size_t length, bool *_isGMT) +_user_get_tzfilename(char *userFilename, size_t length, bool *_userIsGMT) { - if (filename == NULL || _isGMT == NULL - || !IS_USER_ADDRESS(filename) || !IS_USER_ADDRESS(_isGMT) - || user_strlcpy(filename, sTimezoneFilename, length) < B_OK - || user_memcpy(_isGMT, &sIsGMT, sizeof(bool)) < B_OK) + if ((userFilename == NULL || length == 0) && _userIsGMT == NULL) + return B_BAD_VALUE; + + if (userFilename != NULL + && (!IS_USER_ADDRESS(userFilename) + || user_strlcpy(userFilename, sTimezoneFilename, length) < 0)) return B_BAD_ADDRESS; + if (_userIsGMT != NULL + && (!IS_USER_ADDRESS(_userIsGMT) + || user_memcpy(_userIsGMT, &sIsGMT, sizeof(bool)) != B_OK)) + return B_BAD_ADDRESS; + return B_OK; } From axeld at mail.berlios.de Thu Jul 2 16:07:47 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Jul 2009 16:07:47 +0200 Subject: [Haiku-commits] r31371 - in haiku/trunk: headers/os/kernel src/system/libroot/os Message-ID: <200907021407.n62E7lg5008108@sheep.berlios.de> Author: axeld Date: 2009-07-02 16:07:46 +0200 (Thu, 02 Jul 2009) New Revision: 31371 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31371&view=rev Added: haiku/trunk/src/system/libroot/os/time.cpp Removed: haiku/trunk/src/system/libroot/os/time.c Modified: haiku/trunk/headers/os/kernel/OS.h haiku/trunk/src/system/libroot/os/Jamfile Log: * Made set_timezone() argument const - it's not supposed to mess with it. * Renamed time.c to time.cpp. * set_timezone() now uses localtime_r() instead of localtime(), and will also no longer fail in case there was no timezone symlink before. * Cleaned up OS.h header. Modified: haiku/trunk/headers/os/kernel/OS.h =================================================================== --- haiku/trunk/headers/os/kernel/OS.h 2009-07-02 14:05:44 UTC (rev 31370) +++ haiku/trunk/headers/os/kernel/OS.h 2009-07-02 14:07:46 UTC (rev 31371) @@ -1,11 +1,11 @@ -/* Kernel specific structures and functions - * - * Copyright 2004-2006, Haiku Inc. All Rights Reserved. +/* + * Copyright 2004-2009, Haiku Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _OS_H #define _OS_H +//! Kernel specific structures and functions #include @@ -17,7 +17,6 @@ extern "C" { #endif -/*-------------------------------------------------------------*/ /* System constants */ #define B_OS_NAME_LENGTH 32 @@ -37,7 +36,7 @@ | B_TIMEOUT_REAL_TIME_BASE }; -/*-------------------------------------------------------------*/ + /* Types */ typedef int32 area_id; @@ -47,7 +46,6 @@ typedef int32 thread_id; -/*-------------------------------------------------------------*/ /* Areas */ typedef struct area_info { @@ -82,28 +80,28 @@ #define B_READ_AREA 1 #define B_WRITE_AREA 2 -extern area_id create_area(const char *name, void **startAddress, uint32 addressSpec, - size_t size, uint32 lock, uint32 protection); -extern area_id clone_area(const char *name, void **destAddress, uint32 addressSpec, - uint32 protection, area_id source); -extern area_id find_area(const char *name); -extern area_id area_for(void *address); -extern status_t delete_area(area_id id); -extern status_t resize_area(area_id id, size_t newSize); -extern status_t set_area_protection(area_id id, uint32 newProtection); +extern area_id create_area(const char *name, void **startAddress, + uint32 addressSpec, size_t size, uint32 lock, + uint32 protection); +extern area_id clone_area(const char *name, void **destAddress, + uint32 addressSpec, uint32 protection, area_id source); +extern area_id find_area(const char *name); +extern area_id area_for(void *address); +extern status_t delete_area(area_id id); +extern status_t resize_area(area_id id, size_t newSize); +extern status_t set_area_protection(area_id id, uint32 newProtection); /* system private, use macros instead */ -extern status_t _get_area_info(area_id id, area_info *areaInfo, size_t size); -extern status_t _get_next_area_info(team_id team, int32 *cookie, - area_info *areaInfo, size_t size); +extern status_t _get_area_info(area_id id, area_info *areaInfo, size_t size); +extern status_t _get_next_area_info(team_id team, int32 *cookie, + area_info *areaInfo, size_t size); #define get_area_info(id, areaInfo) \ - _get_area_info((id), (areaInfo),sizeof(*(areaInfo))) + _get_area_info((id), (areaInfo),sizeof(*(areaInfo))) #define get_next_area_info(team, cookie, areaInfo) \ - _get_next_area_info((team), (cookie), (areaInfo), sizeof(*(areaInfo))) + _get_next_area_info((team), (cookie), (areaInfo), sizeof(*(areaInfo))) -/*-------------------------------------------------------------*/ /* Ports */ typedef struct port_info { @@ -115,31 +113,35 @@ int32 total_count; /* total # msgs read so far */ } port_info; -extern port_id create_port(int32 capacity, const char *name); -extern port_id find_port(const char *name); -extern ssize_t read_port(port_id port, int32 *code, void *buffer, size_t bufferSize); -extern ssize_t read_port_etc(port_id port, int32 *code, void *buffer, size_t bufferSize, - uint32 flags, bigtime_t timeout); -extern status_t write_port(port_id port, int32 code, const void *buffer, size_t bufferSize); -extern status_t write_port_etc(port_id port, int32 code, const void *buffer, - size_t bufferSize, uint32 flags, bigtime_t timeout); -extern status_t close_port(port_id port); -extern status_t delete_port(port_id port); +extern port_id create_port(int32 capacity, const char *name); +extern port_id find_port(const char *name); +extern ssize_t read_port(port_id port, int32 *code, void *buffer, + size_t bufferSize); +extern ssize_t read_port_etc(port_id port, int32 *code, void *buffer, + size_t bufferSize, uint32 flags, bigtime_t timeout); +extern status_t write_port(port_id port, int32 code, const void *buffer, + size_t bufferSize); +extern status_t write_port_etc(port_id port, int32 code, const void *buffer, + size_t bufferSize, uint32 flags, bigtime_t timeout); +extern status_t close_port(port_id port); +extern status_t delete_port(port_id port); -extern ssize_t port_buffer_size(port_id port); -extern ssize_t port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout); -extern ssize_t port_count(port_id port); -extern status_t set_port_owner(port_id port, team_id team); +extern ssize_t port_buffer_size(port_id port); +extern ssize_t port_buffer_size_etc(port_id port, uint32 flags, + bigtime_t timeout); +extern ssize_t port_count(port_id port); +extern status_t set_port_owner(port_id port, team_id team); /* system private, use the macros instead */ -extern status_t _get_port_info(port_id port, port_info *portInfo, size_t portInfoSize); -extern status_t _get_next_port_info(team_id team, int32 *cookie, port_info *portInfo, - size_t portInfoSize); +extern status_t _get_port_info(port_id port, port_info *portInfo, + size_t portInfoSize); +extern status_t _get_next_port_info(team_id team, int32 *cookie, + port_info *portInfo, size_t portInfoSize); #define get_port_info(port, info) \ - _get_port_info((port), (info), sizeof(*(info))) + _get_port_info((port), (info), sizeof(*(info))) #define get_next_port_info(team, cookie, info) \ - _get_next_port_info((team), (cookie), (info), sizeof(*(info))) + _get_next_port_info((team), (cookie), (info), sizeof(*(info))) /* WARNING: The following is Haiku experimental API. It might be removed or @@ -153,15 +155,14 @@ } port_message_info; /* similar to port_buffer_size_etc(), but returns (more) info */ -extern status_t _get_port_message_info_etc(port_id port, - port_message_info *info, size_t infoSize, uint32 flags, - bigtime_t timeout); +extern status_t _get_port_message_info_etc(port_id port, + port_message_info *info, size_t infoSize, uint32 flags, + bigtime_t timeout); #define get_port_message_info_etc(port, info, flags, timeout) \ - _get_port_message_info_etc((port), (info), sizeof(*(info)), flags, \ - timeout) + _get_port_message_info_etc((port), (info), sizeof(*(info)), flags, timeout) -/*-------------------------------------------------------------*/ + /* Semaphores */ typedef struct sem_info { @@ -191,33 +192,34 @@ threads waiting */ }; -extern sem_id create_sem(int32 count, const char *name); -extern status_t delete_sem(sem_id id); -extern status_t acquire_sem(sem_id id); -extern status_t acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout); -extern status_t release_sem(sem_id id); -extern status_t release_sem_etc(sem_id id, int32 count, uint32 flags); -/* ToDo: the following two calls are not part of the BeOS API, and might be +extern sem_id create_sem(int32 count, const char *name); +extern status_t delete_sem(sem_id id); +extern status_t acquire_sem(sem_id id); +extern status_t acquire_sem_etc(sem_id id, int32 count, uint32 flags, + bigtime_t timeout); +extern status_t release_sem(sem_id id); +extern status_t release_sem_etc(sem_id id, int32 count, uint32 flags); +/* TODO: the following two calls are not part of the BeOS API, and might be changed or even removed for the final release of Haiku R1 */ -extern status_t switch_sem(sem_id semToBeReleased, sem_id id); -extern status_t switch_sem_etc(sem_id semToBeReleased, sem_id id, int32 count, - uint32 flags, bigtime_t timeout); -extern status_t get_sem_count(sem_id id, int32 *threadCount); -extern status_t set_sem_owner(sem_id id, team_id team); +extern status_t switch_sem(sem_id semToBeReleased, sem_id id); +extern status_t switch_sem_etc(sem_id semToBeReleased, sem_id id, + int32 count, uint32 flags, bigtime_t timeout); +extern status_t get_sem_count(sem_id id, int32 *threadCount); +extern status_t set_sem_owner(sem_id id, team_id team); /* system private, use the macros instead */ -extern status_t _get_sem_info(sem_id id, struct sem_info *info, size_t infoSize); -extern status_t _get_next_sem_info(team_id team, int32 *cookie, struct sem_info *info, - size_t infoSize); +extern status_t _get_sem_info(sem_id id, struct sem_info *info, + size_t infoSize); +extern status_t _get_next_sem_info(team_id team, int32 *cookie, + struct sem_info *info, size_t infoSize); #define get_sem_info(sem, info) \ - _get_sem_info((sem), (info), sizeof(*(info))) + _get_sem_info((sem), (info), sizeof(*(info))) #define get_next_sem_info(team, cookie, info) \ - _get_next_sem_info((team), (cookie), (info), sizeof(*(info))) + _get_next_sem_info((team), (cookie), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ /* Teams */ typedef struct { @@ -236,18 +238,19 @@ #define B_CURRENT_TEAM 0 #define B_SYSTEM_TEAM 1 -extern status_t kill_team(team_id team); +extern status_t kill_team(team_id team); /* see also: send_signal() */ /* system private, use macros instead */ -extern status_t _get_team_info(team_id id, team_info *info, size_t size); -extern status_t _get_next_team_info(int32 *cookie, team_info *info, size_t size); +extern status_t _get_team_info(team_id id, team_info *info, size_t size); +extern status_t _get_next_team_info(int32 *cookie, team_info *info, + size_t size); #define get_team_info(id, info) \ - _get_team_info((id), (info), sizeof(*(info))) + _get_team_info((id), (info), sizeof(*(info))) #define get_next_team_info(cookie, info) \ - _get_next_team_info((cookie), (info), sizeof(*(info))) + _get_next_team_info((cookie), (info), sizeof(*(info))) /* team usage info */ @@ -263,12 +266,13 @@ }; /* system private, use macros instead */ -extern status_t _get_team_usage_info(team_id team, int32 who, team_usage_info *info, size_t size); +extern status_t _get_team_usage_info(team_id team, int32 who, + team_usage_info *info, size_t size); #define get_team_usage_info(team, who, info) \ - _get_team_usage_info((team), (who), (info), sizeof(*(info))) + _get_team_usage_info((team), (who), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ + /* Threads */ typedef enum { @@ -311,7 +315,8 @@ #define thread_entry thread_func /* thread_entry is for backward compatibility only! Use thread_func */ -extern thread_id spawn_thread(thread_func, const char *name, int32 priority, void *data); +extern thread_id spawn_thread(thread_func, const char *name, int32 priority, + void *data); extern status_t kill_thread(thread_id thread); extern status_t resume_thread(thread_id thread); extern status_t suspend_thread(thread_id thread); @@ -319,14 +324,16 @@ extern status_t rename_thread(thread_id thread, const char *newName); extern status_t set_thread_priority (thread_id thread, int32 newPriority); extern void exit_thread(status_t status); -extern status_t wait_for_thread (thread_id thread, status_t *threadReturnValue); +extern status_t wait_for_thread (thread_id thread, + status_t *threadReturnValue); extern status_t on_exit_thread(void (*callback)(void *), void *data); extern thread_id find_thread(const char *name); extern status_t send_data(thread_id thread, int32 code, const void *buffer, size_t bufferSize); -extern int32 receive_data(thread_id *sender, void *buffer, size_t bufferSize); +extern int32 receive_data(thread_id *sender, void *buffer, + size_t bufferSize); extern bool has_data(thread_id thread); extern status_t snooze(bigtime_t amount); @@ -339,23 +346,22 @@ thread_info *info, size_t size); #define get_thread_info(id, info) \ - _get_thread_info((id), (info), sizeof(*(info))) + _get_thread_info((id), (info), sizeof(*(info))) #define get_next_thread_info(team, cookie, info) \ - _get_next_thread_info((team), (cookie), (info), sizeof(*(info))) + _get_next_thread_info((team), (cookie), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ /* Time */ extern uint32 real_time_clock(void); -extern void set_real_time_clock(uint32 secs_since_jan1_1970); +extern void set_real_time_clock(uint32 secsSinceJan1st1970); extern bigtime_t real_time_clock_usecs(void); -extern status_t set_timezone(char *timezone); -extern bigtime_t system_time(void); /* time since booting in microseconds */ +extern status_t set_timezone(const char *timezone); +extern bigtime_t system_time(void); + /* time since booting in microseconds */ -/*-------------------------------------------------------------*/ /* Alarm */ enum { @@ -364,13 +370,12 @@ B_PERIODIC_ALARM /* "when" specifies the period */ }; -extern bigtime_t set_alarm(bigtime_t when, uint32 flags); +extern bigtime_t set_alarm(bigtime_t when, uint32 flags); -/*-------------------------------------------------------------*/ /* Debugger */ -extern void debugger(const char *message); +extern void debugger(const char *message); /* calling this function with a non-zero value will cause your thread @@ -380,18 +385,17 @@ to re-enable the default debugger pass a zero. */ -extern int disable_debugger(int state); +extern int disable_debugger(int state); /* TODO: Remove. Temporary debug helper. */ -extern void debug_printf(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); -extern void debug_vprintf(const char *format, va_list args); -extern void ktrace_printf(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); -extern void ktrace_vprintf(const char *format, va_list args); +extern void debug_printf(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); +extern void debug_vprintf(const char *format, va_list args); +extern void ktrace_printf(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); +extern void ktrace_vprintf(const char *format, va_list args); -/*-------------------------------------------------------------*/ /* System information */ #if __INTEL__ @@ -409,10 +413,8 @@ # define B_MAX_CPU_COUNT 1 #endif -#define OBOS_CPU_TYPES - typedef enum cpu_types { - /* ToDo: add latest models */ + /* TODO: add latest models */ /* Motorola/IBM */ B_CPU_PPC_UNKNOWN = 0, @@ -641,7 +643,8 @@ } regs; } cpuid_info; -extern status_t get_cpuid(cpuid_info *info, uint32 eaxRegister, uint32 cpuNum); +extern status_t get_cpuid(cpuid_info *info, uint32 eaxRegister, + uint32 cpuNum); #endif @@ -672,20 +675,20 @@ typedef int32 machine_id[2]; /* unique machine ID */ typedef struct { - machine_id id; /* unique machine ID */ - bigtime_t boot_time; /* time of boot (usecs since 1/1/1970) */ + machine_id id; /* unique machine ID */ + bigtime_t boot_time; /* time of boot (usecs since 1/1/1970) */ - int32 cpu_count; /* number of cpus */ - enum cpu_types cpu_type; /* type of cpu */ - int32 cpu_revision; /* revision # of cpu */ + int32 cpu_count; /* number of cpus */ + enum cpu_types cpu_type; /* type of cpu */ + int32 cpu_revision; /* revision # of cpu */ cpu_info cpu_infos[B_MAX_CPU_COUNT]; /* info about individual cpus */ - int64 cpu_clock_speed; /* processor clock speed (Hz) */ - int64 bus_clock_speed; /* bus clock speed (Hz) */ - enum platform_types platform_type; /* type of machine we're on */ + int64 cpu_clock_speed; /* processor clock speed (Hz) */ + int64 bus_clock_speed; /* bus clock speed (Hz) */ + enum platform_types platform_type; /* type of machine we're on */ - int32 max_pages; /* total # physical pages */ - int32 used_pages; /* # physical pages in use */ - int32 page_faults; /* # of page faults */ + int32 max_pages; /* total # physical pages */ + int32 used_pages; /* # physical pages in use */ + int32 page_faults; /* # of page faults */ int32 max_sems; int32 used_sems; int32 max_ports; @@ -695,27 +698,27 @@ int32 max_teams; int32 used_teams; - char kernel_name[B_FILE_NAME_LENGTH]; /* name of kernel */ - char kernel_build_date[B_OS_NAME_LENGTH]; /* date kernel built */ - char kernel_build_time[B_OS_NAME_LENGTH]; /* time kernel built */ - int64 kernel_version; /* version of this kernel */ + char kernel_name[B_FILE_NAME_LENGTH]; + char kernel_build_date[B_OS_NAME_LENGTH]; + char kernel_build_time[B_OS_NAME_LENGTH]; + int64 kernel_version; - bigtime_t _busy_wait_time; /* reserved for whatever */ + bigtime_t _busy_wait_time; /* reserved for whatever */ int32 cached_pages; - uint32 abi; /* the system API */ + uint32 abi; /* the system API */ - int32 pad[2]; /* just in case... */ + int32 pad[2]; } system_info; /* system private, use macro instead */ -extern status_t _get_system_info(system_info *info, size_t size); +extern status_t _get_system_info(system_info *info, size_t size); #define get_system_info(info) \ - _get_system_info((info), sizeof(*(info))) + _get_system_info((info), sizeof(*(info))) -extern int32 is_computer_on(void); -extern double is_computer_on_fire(void); +extern int32 is_computer_on(void); +extern double is_computer_on_fire(void); /* WARNING: Experimental API! */ @@ -758,9 +761,9 @@ and B_EVENT_DISCONNECTED don't need to be specified. They will always be reported, when they occur. */ -extern ssize_t wait_for_objects(object_wait_info* infos, int numInfos); -extern ssize_t wait_for_objects_etc(object_wait_info* infos, int numInfos, - uint32 flags, bigtime_t timeout); +extern ssize_t wait_for_objects(object_wait_info* infos, int numInfos); +extern ssize_t wait_for_objects_etc(object_wait_info* infos, int numInfos, + uint32 flags, bigtime_t timeout); #ifdef __cplusplus Modified: haiku/trunk/src/system/libroot/os/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/os/Jamfile 2009-07-02 14:05:44 UTC (rev 31370) +++ haiku/trunk/src/system/libroot/os/Jamfile 2009-07-02 14:07:46 UTC (rev 31371) @@ -24,7 +24,7 @@ system_info.c team.c thread.c - time.c + time.cpp syscalls.S wait_for_objects.cpp Deleted: haiku/trunk/src/system/libroot/os/time.c Copied: haiku/trunk/src/system/libroot/os/time.cpp (from rev 31368, haiku/trunk/src/system/libroot/os/time.c) =================================================================== --- haiku/trunk/src/system/libroot/os/time.c 2009-07-01 22:09:33 UTC (rev 31368) +++ haiku/trunk/src/system/libroot/os/time.cpp 2009-07-02 14:07:46 UTC (rev 31371) @@ -0,0 +1,101 @@ +/* + * Copyright 2002-2009, Axel D?rfler, axeld at pinc-software.de. + * Distributed under the terms of the MIT License. + */ + + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + + +static struct real_time_data* sRealTimeData; + + +void +__init_time(void) +{ + sRealTimeData = (struct real_time_data*) + USER_COMMPAGE_TABLE[COMMPAGE_ENTRY_REAL_TIME_DATA]; + + __arch_init_time(sRealTimeData, false); +} + + +// #pragma mark - public API + + +uint32 +real_time_clock(void) +{ + return (__arch_get_system_time_offset(sRealTimeData) + system_time()) + / 1000000; +} + + +bigtime_t +real_time_clock_usecs(void) +{ + return __arch_get_system_time_offset(sRealTimeData) + system_time(); +} + + +void +set_real_time_clock(uint32 secs) +{ + _kern_set_real_time_clock(secs); +} + + +status_t +set_timezone(const char* timezone) +{ + char path[B_PATH_NAME_LENGTH]; + status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, -1, true, path, + B_PATH_NAME_LENGTH); + if (status != B_OK) { + syslog(LOG_ERR, "can't find settings directory: %s\n", strerror(status)); + return status; + } + + strlcat(path, "/timezone", sizeof(path)); + + if (unlink(path) != 0 && errno != ENOENT) { + syslog(LOG_ERR, "can't unlink: %s\n", strerror(errno)); + return errno; + } + + if (symlink(timezone, path) != 0) { + syslog(LOG_ERR, "can't symlink: %s\n", strerror(errno)); + return errno; + } + + bool isGMT; + _kern_get_tzfilename(NULL, 0, &isGMT); + _kern_set_tzfilename(timezone, strlen(timezone), isGMT); + + tzset(); + + time_t seconds; + time(&seconds); + struct tm tm; + localtime_r(&seconds, &tm); + + return _kern_set_timezone(tm.tm_gmtoff, tm.tm_isdst); +} + + +bigtime_t +set_alarm(bigtime_t when, uint32 mode) +{ + return _kern_set_alarm(when, mode); +} Property changes on: haiku/trunk/src/system/libroot/os/time.cpp ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:mergeinfo + Name: svn:eol-style + native From axeld at mail.berlios.de Thu Jul 2 16:16:05 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Jul 2009 16:16:05 +0200 Subject: [Haiku-commits] r31372 - haiku/trunk/src/preferences/time Message-ID: <200907021416.n62EG51c008798@sheep.berlios.de> Author: axeld Date: 2009-07-02 16:16:04 +0200 (Thu, 02 Jul 2009) New Revision: 31372 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31372&view=rev Modified: haiku/trunk/src/preferences/time/DateTimeView.cpp haiku/trunk/src/preferences/time/ZoneView.cpp Log: * DateTimeView::_UpdateGmtSettings() will now update the GMT setting even if there is no timezone link yet. This also fixes the time jump when setting the timezone for the first time. * _ReadRTCSettings() will no longer write the defaults. * _WriteRTCSettings() will now also make sure the settings directory exists. * ZoneView::MessageReceived() will no longer post an kRTCUpdate message on changes - no idea what that was for (and that also caused the time jump). * Now uses localtime_r() instead of localtime() everywhere. * Minor cleanup. Modified: haiku/trunk/src/preferences/time/DateTimeView.cpp =================================================================== --- haiku/trunk/src/preferences/time/DateTimeView.cpp 2009-07-02 14:07:46 UTC (rev 31371) +++ haiku/trunk/src/preferences/time/DateTimeView.cpp 2009-07-02 14:16:04 UTC (rev 31372) @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2004-2009, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -107,10 +107,10 @@ DateTimeView::MessageReceived(BMessage *message) { int32 change; - switch(message->what) { + switch (message->what) { case B_OBSERVER_NOTICE_CHANGE: message->FindInt32(B_OBSERVE_WHAT_CHANGE, &change); - switch(change) { + switch (change) { case H_TM_CHANGED: _UpdateDateTime(message); break; @@ -119,7 +119,7 @@ BView::MessageReceived(message); break; } - break; + break; case kDayChanged: { @@ -144,6 +144,7 @@ fTimeEdit->MakeFocus(false); fClock->ChangeTimeFinished(); break; + default: BView::MessageReceived(message); break; @@ -170,7 +171,7 @@ DateTimeView::_Revert() { // Set the clock and calendar as they were at launch time + - // time ellapsed since application launch. + // time elapsed since application launch. fUseGmtTime = fOldUseGmtTime; _UpdateGmtSettings(); @@ -293,8 +294,7 @@ if (strncmp(buffer, "gmt", 3) == 0) fUseGmtTime = true; } - } else - _UpdateGmtSettings(); + } } @@ -302,7 +302,7 @@ DateTimeView::_WriteRTCSettings() { BPath path; - if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) + if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) != B_OK) return; path.Append("RTC_time_settings"); @@ -323,19 +323,20 @@ _WriteRTCSettings(); BPath path; - if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) - return; + if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { + path.Append("timezone"); + BEntry entry(path.Path(), true); + if (entry.Exists()) { + entry.GetPath(&path); - path.Append("timezone"); - BEntry entry(path.Path(), true); + // take the existing timezone and set it's gmt use + _kern_set_tzfilename(path.Path(), B_PATH_NAME_LENGTH, fUseGmtTime); + return; + } + } - if (!entry.Exists()) - return; - - entry.GetPath(&path); - - // take the existing timezone and set it's gmt use - _kern_set_tzfilename(path.Path(), B_PATH_NAME_LENGTH, fUseGmtTime); + // Only update GMT + _kern_set_tzfilename(NULL, 0, fUseGmtTime); } @@ -347,8 +348,7 @@ int32 year; if (message->FindInt32("month", &month) == B_OK && message->FindInt32("day", &day) == B_OK - && message->FindInt32("year", &year) == B_OK) - { + && message->FindInt32("year", &year) == B_OK) { fDateEdit->SetDate(year, month, day); fCalendarView->SetDate(year, month, day); } @@ -358,8 +358,7 @@ int32 second; if (message->FindInt32("hour", &hour) == B_OK && message->FindInt32("minute", &minute) == B_OK - && message->FindInt32("second", &second) == B_OK) - { + && message->FindInt32("second", &second) == B_OK) { fClock->SetTime(hour, minute, second); fTimeEdit->SetTime(hour, minute, second); } Modified: haiku/trunk/src/preferences/time/ZoneView.cpp =================================================================== --- haiku/trunk/src/preferences/time/ZoneView.cpp 2009-07-02 14:07:46 UTC (rev 31371) +++ haiku/trunk/src/preferences/time/ZoneView.cpp 2009-07-02 14:16:04 UTC (rev 31372) @@ -168,9 +168,6 @@ case H_SET_TIME_ZONE: { SetTimeZone(); - BMessage msg(*message); - msg.what = kRTCUpdate; - Window()->PostMessage(&msg); ((TTimeWindow*)Window())->SetRevertStatus(); break; } @@ -437,12 +434,13 @@ SetTimeZone(item->Path()); // calc preview time - time_t current = time(0); - struct tm *ltime = localtime(¤t); + time_t current = time(NULL); + struct tm localTime; + localtime_r(¤t, &localTime); // update prview fPreview->SetText(item->Text()); - fPreview->SetTime(ltime->tm_hour, ltime->tm_min); + fPreview->SetTime(localTime.tm_hour, localTime.tm_min); // set timezone back to current SetTimeZone(fCurrentZone.Path()); @@ -457,11 +455,12 @@ { SetTimeZone(fCurrentZone.Path()); - time_t current = time(0); - struct tm *ltime = localtime(¤t); + time_t current = time(NULL); + struct tm localTime; + localtime_r(¤t, &localTime); fCurrent->SetText(text); - fCurrent->SetTime(ltime->tm_hour, ltime->tm_min); + fCurrent->SetTime(localTime.tm_hour, localTime.tm_min); } @@ -504,22 +503,21 @@ SetTimeZone(target.Path()); // update display - time_t current = time(0); - struct tm *ltime = localtime(¤t); + time_t current = time(NULL); + struct tm localTime; + localtime_r(¤t, &localTime); - char tza[B_PATH_NAME_LENGTH]; - sprintf(tza, "%s", target.Path()); - set_timezone(tza); + set_timezone(target.Path()); // disable button fSetZone->SetEnabled(false); - time_t newtime = mktime(ltime); - ltime = localtime(&newtime); - stime(&newtime); + time_t newTime = mktime(&localTime); + localtime_r(&newTime, &localTime); + stime(&newTime); - fHour = ltime->tm_hour; - fMinute = ltime->tm_min; + fHour = localTime.tm_hour; + fMinute = localTime.tm_min; fCurrentZone.SetTo(target.Path()); SetCurrent(((TZoneItem *)fCityList->ItemAt(selection))->Text()); } From marcusoverhagen at arcor.de Thu Jul 2 16:34:37 2009 From: marcusoverhagen at arcor.de (Marcus Overhagen) Date: Thu, 2 Jul 2009 16:34:37 +0200 (CEST) Subject: [Haiku-commits] r31363 - haiku/trunk/src/kits/bluetooth In-Reply-To: <593042056-BeMail@zon> References: <593042056-BeMail@zon> Message-ID: <18806595.1246545277197.JavaMail.ngmail@webmail18.arcor-online.net> Axel D?rfler wrote: > oruizdorantes at BerliOS wrote: > > +const char* > > +GetError(uint8 error) { > > + if (error < sizeof(bluetoothErrors)/sizeof(const char*)) { > > Coding style... > > const char* > GetError(uint8 error) > { > ... ) / sizeof(... > } Even more coding guidelines: A GetXXX() function should use a pointer argument to return the value, i.e. void GetError(const char ** _string, uint8 error) { } or it should not have the "Get" prefix, i.e. const char * Error(uint8 error) { } regards Marcus Jetzt neu: Arcor- Online Butler 5.0 als kostenfreier Download! Der Arcor-Online Butler loggt Sie automatisch in unsere Online-Dienste ein und Sie kommen mit einem Klick zu Ihren E-Mails, zum Chat und vielem mehr. www.arcor.de/rd/butler From zooey at mail.berlios.de Thu Jul 2 17:01:03 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Thu, 2 Jul 2009 17:01:03 +0200 Subject: [Haiku-commits] r31373 - in haiku/branches/features/32bit-wchar_t/src: apps/3dmov apps/debugger/gui/running_teams_window apps/installedpackages apps/resedit apps/webwatch bin preferences/devices servers/power servers/services_daemon tests/add-ons/kernel/file_systems/bfs/queries tests/add-ons/kernel/file_systems/userlandfs/bfs tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface tests/add-ons/kernel/file_systems/userlandfs/reiserfs tests/add-ons/kernel/file_systems/userlandfs/reiserfs/beos_interface tests/add-ons/media/plugins/musepack tests/add-ons/print/pdf/bezierbounds tests/add-ons/print/pdf/linepathbuilder tests/add-ons/print/ppd/test tests/add-ons/print/transports tests/add-ons/translators/exif tests/apps/miniterminal tests/apps/partitioner tests/apps/terminal_replicant tests/kits/game/direct_window_info_test tests/kits/game/direct_window_test tests/kits/game/page_flipper tests/kits/game/simple_game_sound_test tests/kits/interface tests/kits/interface/bshelf tests! /kits/interface/flatten_picture tests/kits/interface/layout tests/kits/interface/look tests/kits/interface/picture tests/kits/interface/pictureprint tests/kits/locale tests/kits/media tests/kits/media/media_decoder tests/kits/media/mp3_reader_test tests/kits/media/notificationtest tests/kits/media/playwav tests/kits/media/wav_reader_test tests/kits/net tests/kits/net/preflet tests/kits/opengl/glinfo tests/kits/storage/testapps tests/kits/support/barchivable/remoteobjectdef tests/libs/alm tests/libs/linprog tests/misc tests/misc/exception-test tests/servers/app/async_drawing tests/servers/app/avoid_focus tests/servers/app/benchmark tests/servers/app/bitmap_bounds tests/servers/app/bitmap_drawing tests/servers/app/constrain_clipping_region tests/servers/app/copy_bits tests/servers/app/cursor_test tests/servers/app/desktop_window tests/servers/app/drawing_debugger tests/servers/app/event_mask tests/servers/app/find_view tests/servers/app/following tests/servers/app/hide_and_sh! ow tests/servers/app/lagging_get_mouse tests/servers/app/lock_! focus te Message-ID: <200907021501.n62F13VI012775@sheep.berlios.de> Author: zooey Date: 2009-07-02 17:00:57 +0200 (Thu, 02 Jul 2009) New Revision: 31373 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31373&view=rev Modified: haiku/branches/features/32bit-wchar_t/src/apps/3dmov/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/running_teams_window/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/installedpackages/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/resedit/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/webwatch/Jamfile haiku/branches/features/32bit-wchar_t/src/bin/Jamfile haiku/branches/features/32bit-wchar_t/src/preferences/devices/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/power/Jamfile haiku/branches/features/32bit-wchar_t/src/servers/services_daemon/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/bfs/queries/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/bfs/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/beos_interface/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/media/plugins/musepack/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/bezierbounds/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/linepathbuilder/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/ppd/test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/transports/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/add-ons/translators/exif/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/apps/miniterminal/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/apps/partitioner/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/apps/terminal_replicant/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_info_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/game/page_flipper/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/game/simple_game_sound_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/bshelf/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/flatten_picture/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/layout/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/look/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/picture/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/pictureprint/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/locale/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/media_decoder/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/mp3_reader_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/notificationtest/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/playwav/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/media/wav_reader_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/net/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/net/preflet/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/opengl/glinfo/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/storage/testapps/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/kits/support/barchivable/remoteobjectdef/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/libs/alm/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/libs/linprog/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/misc/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/misc/exception-test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/async_drawing/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/avoid_focus/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/benchmark/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_bounds/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_drawing/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/constrain_clipping_region/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/copy_bits/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/cursor_test/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/desktop_window/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/drawing_debugger/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/event_mask/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/find_view/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/following/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/hide_and_show/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/lagging_get_mouse/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/lock_focus/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/look_and_feel/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/menu_crash/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/resize_limits/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/scrollbar/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/scrolling/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/statusbar/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/textview/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/view_state/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/view_transit/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/app/workspace_activated/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/input/replicant/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/servers/registrar/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/system/kernel/Jamfile haiku/branches/features/32bit-wchar_t/src/tests/system/libroot/posix/bonnie++-1.03d/Jamfile haiku/branches/features/32bit-wchar_t/src/tools/translation/bitsinfo/Jamfile haiku/branches/features/32bit-wchar_t/src/tools/translation/inspector/Jamfile haiku/branches/features/32bit-wchar_t/src/tools/translation/pnginfo/Jamfile haiku/branches/features/32bit-wchar_t/src/tools/translation/stxtinfo/Jamfile Log: * fixed linking of many more targets - most of which were missing libsupc++.so Modified: haiku/branches/features/32bit-wchar_t/src/apps/3dmov/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/3dmov/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/apps/3dmov/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -7,6 +7,6 @@ GLMovApp.cpp GLMovView.cpp GLMovWindow.cpp - : be GL game + : be GL game $(TARGET_LIBSUPC++) : 3dmov.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/running_teams_window/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/running_teams_window/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/running_teams_window/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -12,5 +12,5 @@ TeamsListView.cpp TeamWindow.cpp - : be tracker translation libdebug.so + : be tracker translation libdebug.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/installedpackages/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/installedpackages/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/apps/installedpackages/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -13,5 +13,5 @@ main.cpp UninstallWindow.cpp UninstallView.cpp - : be tracker + : be tracker $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/resedit/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/resedit/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/apps/resedit/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -26,5 +26,5 @@ ResourceRoster.cpp ResView.cpp ResWindow.cpp - : be tracker translation libcolumnlistview.a + : be tracker translation libcolumnlistview.a $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/apps/webwatch/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/webwatch/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/apps/webwatch/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -10,7 +10,7 @@ Application WebWatch : WatchApp.cpp WatchView.cpp - : be + : be $(TARGET_LIBSUPC++) : WebWatch.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/bin/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/bin/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/bin/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -96,7 +96,6 @@ roster.cpp setdecor.cpp setversion.cpp - spybmessage.cpp trash.cpp version.cpp WindowShade.cpp @@ -110,6 +109,7 @@ hey.cpp reindex.cpp settype.cpp + spybmessage.cpp urlwrapper.cpp : be $(TARGET_LIBSUPC++) : $(haiku-utils_rsrc) ; Modified: haiku/branches/features/32bit-wchar_t/src/preferences/devices/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/preferences/devices/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/preferences/devices/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -64,7 +64,7 @@ cm_wrapper.c DevicesInfo.cpp ConfigurationWindow.cpp - : be + : be $(TARGET_LIBSUPC++) : Devices.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/servers/power/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/servers/power/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/servers/power/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -7,4 +7,4 @@ power_button_monitor.cpp ; -LinkAgainst power_daemon : be ; +LinkAgainst power_daemon : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/servers/services_daemon/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/servers/services_daemon/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/servers/services_daemon/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -4,6 +4,6 @@ Application services_daemon : ServicesDaemon.cpp - : be media + : be media $(TARGET_LIBSUPC++) : ServicesDaemon.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/bfs/queries/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/bfs/queries/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/bfs/queries/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,5 +2,5 @@ SimpleTest queryTest : test.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/bfs/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/bfs/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/bfs/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -42,5 +42,5 @@ kernel_interface.cpp - : libuserlandfs_haiku_kernel.so + : libuserlandfs_haiku_kernel.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -59,4 +59,5 @@ Volume.cpp : libuserlandfs_beos_kernel.so be # for BLocker only + $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -32,6 +32,7 @@ : libuserlandfs_haiku_kernel.so be # for BLocker only + $(TARGET_LIBSUPC++) ; HaikuSubInclude beos_interface ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/beos_interface/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/beos_interface/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/beos_interface/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -33,5 +33,5 @@ String.cpp SuperBlock.cpp - : libuserlandfs_beos_kernel.so + : libuserlandfs_beos_kernel.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/media/plugins/musepack/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/media/plugins/musepack/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/media/plugins/musepack/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -15,7 +15,7 @@ MusePackReader.cpp MusePackDecoder.cpp - : libmusepack.a media be + : libmusepack.a media be $(TARGET_LIBSUPC++) ; # Tell Jam where to find these sources Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/bezierbounds/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/bezierbounds/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/bezierbounds/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -13,7 +13,7 @@ SimpleTest BezierBounds : $(sources) - : be root + : be $(TARGET_LIBSUPC++) root ; # Tell Jam where to find these sources: Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/linepathbuilder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/linepathbuilder/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/pdf/linepathbuilder/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -13,7 +13,7 @@ SimpleTest LinePathBuilder : $(sources) - : be root + : be $(TARGET_LIBSUPC++) root ; # Tell Jam where to find these sources: Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/ppd/test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/ppd/test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/ppd/test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -11,7 +11,7 @@ SimpleTest PPDConfig : PPDConfigApplication.cpp - : be root libppdtest.a + : be root libppdtest.a $(TARGET_LIBSUPC++) ; SimpleTest PPDTest : @@ -19,6 +19,6 @@ TestParser.cpp TestScanner.cpp : - be root libppdtest.a + be root libppdtest.a $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/transports/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/transports/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/print/transports/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -1,4 +1,4 @@ SubDir HAIKU_TOP src tests add-ons print transports ; -SimpleTest print_transport_loader : main.cpp : be ; +SimpleTest print_transport_loader : main.cpp : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/add-ons/translators/exif/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/add-ons/translators/exif/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/add-ons/translators/exif/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -10,7 +10,7 @@ dump_exif.cpp exif_parser.cpp - : be + : be $(TARGET_LIBSTDC++) ; SEARCH on [ FGristFiles Modified: haiku/branches/features/32bit-wchar_t/src/tests/apps/miniterminal/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/apps/miniterminal/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/apps/miniterminal/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -14,5 +14,5 @@ MiniView.cpp MiniWin.cpp ViewBuffer.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/apps/partitioner/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/apps/partitioner/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/apps/partitioner/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -6,5 +6,5 @@ SimpleTest Partitioner : Partitioner.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/apps/terminal_replicant/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/apps/terminal_replicant/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/apps/terminal_replicant/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -6,7 +6,7 @@ Application RepliTerminal : main.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_info_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_info_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_info_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,6 +2,6 @@ SimpleTest dw_info : dwinfo.cpp - : game be root + : game be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/game/direct_window_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -5,7 +5,7 @@ SimpleTest DirectWindowStars : Stars.cpp StarWindow.cpp - : game be + : game be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/game/page_flipper/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/game/page_flipper/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/game/page_flipper/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,6 +2,6 @@ SimpleTest PageFlipper : page_flip.cpp - : game be root + : game be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/game/simple_game_sound_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/game/simple_game_sound_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/game/simple_game_sound_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,5 +2,5 @@ SimpleTest simple_game_sound_test : SimpleSoundTest.cpp - : game tracker be root + : game tracker be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -58,26 +58,26 @@ SimpleTest ScrollViewTest_r5 : ScrollViewTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest ScrollViewTest : ScrollViewTest.cpp ScrollView.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest ChannelSliderTest : ChannelSliderTest.cpp ChannelSlider.cpp ChannelControl.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest CheckBoxTest : CheckBoxTest.cpp CheckBox.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest ScreenTest : @@ -87,40 +87,40 @@ SimpleTest StatusBarTest : StatusBarTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest GetMouseTest : GetMouseTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest PulseTest : PulseTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest SliderTest_r5 : SliderTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest SliderTest : SliderTest.cpp Slider.cpp Control.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest MenuBeginningTest : MenuBeginningTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; Application MenuTriggerTest : MenuTriggerTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; @@ -132,24 +132,24 @@ SimpleTest ClippingPlusRedraw : ClippingPlusRedraw.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest SetDiskModeTest : SetDiskModeTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest SetBorderScrollViewTest : ScrollViewSetBorderTest.cpp ScrollView.cpp - : be + : be $(TARGET_LIBSUPC++) ; SimpleTest TextViewTest : TextViewTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SEARCH on [ FGristFiles Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/bshelf/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/bshelf/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/bshelf/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -12,7 +12,7 @@ SimpleTest ShelfTest : ShelfTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; SEARCH on [ FGristFiles Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/flatten_picture/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/flatten_picture/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/flatten_picture/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -11,4 +11,5 @@ LinkAgainst FlattenPictureTest : be root + $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/layout/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/layout/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/layout/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -5,7 +5,7 @@ SimpleTest LayoutTest1 : LayoutTest1.cpp : - be + be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/look/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/look/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/look/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -4,5 +4,5 @@ SimpleTest LookTest : Look.cpp - : be tracker libcolumnlistview.a + : be tracker libcolumnlistview.a $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/picture/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/picture/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/picture/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -21,5 +21,5 @@ SimpleTest PictureTest : PictureTest.cpp SVGViewView.cpp - : be translation libexpat.a + : be translation libexpat.a $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/pictureprint/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/pictureprint/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/interface/pictureprint/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -13,6 +13,7 @@ be root libprintutils.a + $(TARGET_LIBSUPC++) ; SimpleTest DumpPrintJob : Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/locale/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/locale/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/locale/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -20,7 +20,7 @@ # LocaleTest ; local sources = $(1) ; local name = $(sources[1]:B) ; - Application $(name) : $(sources) : be liblocale.so ; + Application $(name) : $(sources) : be liblocale.so $(TARGET_LIBSUPC++) ; } LocaleTest catalogSpeed.cpp ; @@ -32,7 +32,7 @@ Addon catalogTestAddOn : catalogTestAddOn.cpp - : be liblocale.so + : be liblocale.so ; SubInclude HAIKU_TOP src tests kits locale number_format ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -1,8 +1,8 @@ SubDir HAIKU_TOP src tests kits media ; -SimpleTest AreaTest : AreaTest.cpp : be ; +SimpleTest AreaTest : AreaTest.cpp : be $(TARGET_LIBSUPC++) ; -SimpleTest BufferTest : BufferTest.cpp : libmedia.so be ; +SimpleTest BufferTest : BufferTest.cpp : libmedia.so be $(TARGET_LIBSUPC++) ; SimpleTest SizeofTest : SizeofTest.cpp : be ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/media_decoder/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/media_decoder/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/media_decoder/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -4,5 +4,5 @@ SimpleTest media_decoder : media_decoder.cpp - : libmedia.so be root + : libmedia.so be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/mp3_reader_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/mp3_reader_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/mp3_reader_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ MediaPlugin.cpp ReaderPlugin.cpp MP3ReaderPlugin.cpp - : media be root + : media be root $(TARGET_LIBSUPC++) ; # Tell Jam where to find these sources Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/notificationtest/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/notificationtest/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/notificationtest/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,6 +2,6 @@ SimpleTest NotificationTest : main.cpp - : media be root + : media be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/playwav/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/playwav/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/playwav/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -4,5 +4,5 @@ SimpleTest playwav : playwav.cpp - : media be root + : media be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/media/wav_reader_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/media/wav_reader_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/media/wav_reader_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ MediaPlugin.cpp ReaderPlugin.cpp WavReaderPlugin.cpp - : media be root + : media be root $(TARGET_LIBSUPC++) ; # Tell Jam where to find these sources Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/net/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/net/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/net/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -20,7 +20,7 @@ : $(TARGET_NETWORK_LIBS) $(HAIKU_NETAPI_LIB) ; SimpleTest NetEndpointTest : NetEndpointTest.cpp - : $(TARGET_NETWORK_LIBS) $(HAIKU_NETAPI_LIB) be ; + : $(TARGET_NETWORK_LIBS) $(HAIKU_NETAPI_LIB) be $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src tests kits net DialUpPreflet ; SubInclude HAIKU_TOP src tests kits net multicast ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/net/preflet/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/net/preflet/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/net/preflet/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -6,5 +6,5 @@ NetworkSetupProfile.cpp NetworkSetupAddOn.cpp BoneyardAddOn.cpp - : be root + : be root $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/opengl/glinfo/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/opengl/glinfo/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/opengl/glinfo/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -11,5 +11,5 @@ SimpleTest GLInfo : GLInfo.cpp - : be libGL.so + : be libGL.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/storage/testapps/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/storage/testapps/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/storage/testapps/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -14,7 +14,7 @@ : dump_mime_types.cpp : be ; SimpleTest NodeMonitorTest - : NodeMonitorTest.cpp : be ; + : NodeMonitorTest.cpp : be $(TARGET_LIBSUPC++) ; SimpleTest PathMonitorTest : PathMonitorTest.cpp PathMonitor.cpp Modified: haiku/branches/features/32bit-wchar_t/src/tests/kits/support/barchivable/remoteobjectdef/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/kits/support/barchivable/remoteobjectdef/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/kits/support/barchivable/remoteobjectdef/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -5,6 +5,6 @@ UnitTestLib libsupporttest_RemoteTestObject.so : RemoteTestObject.cpp - : be $(LIBSTDC++) + : be $(TARGET_LIBSTDC++) : RemoteTestObject.rdef ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/libs/alm/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/libs/alm/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/libs/alm/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -7,24 +7,24 @@ Application ALMTableTest : TableTest.cpp : - be liblpsolve55.so liblinprog.so libalm.so + be liblpsolve55.so liblinprog.so libalm.so $(TARGET_LIBSUPC++) ; Application ALMTest1 : Test1.cpp : - be liblpsolve55.so be liblinprog.so libalm.so + be liblpsolve55.so be liblinprog.so libalm.so $(TARGET_LIBSUPC++) ; Application ALMTest2 : Test2.cpp : - be liblpsolve55.so be liblinprog.so libalm.so + be liblpsolve55.so be liblinprog.so libalm.so $(TARGET_LIBSUPC++) ; Application ALMSimpleTest : SimpleTest.cpp : - be liblpsolve55.so be liblinprog.so libalm.so + be liblpsolve55.so be liblinprog.so libalm.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/libs/linprog/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/libs/linprog/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/libs/linprog/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -7,5 +7,5 @@ SimpleTest linprog_test : Program.cpp : - be liblpsolve55.so liblinprog.so + be liblpsolve55.so liblinprog.so $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/misc/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/misc/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/misc/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -2,7 +2,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ; -SimpleTest rtti-test : rtti-test.cpp : be ; +SimpleTest rtti-test : rtti-test.cpp : be $(TARGET_LIBSUPC++) ; SimpleTest writev-test : writev-test.cpp : be ; SubInclude HAIKU_TOP src tests misc exception-test ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/misc/exception-test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/misc/exception-test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/misc/exception-test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -4,6 +4,7 @@ SharedLibrary libexceptiontest.so : exceptions.cpp + : $(TARGET_LIBSUPC++) ; SimpleTest exception-test Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/async_drawing/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/async_drawing/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/async_drawing/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ SimpleTest AsyncDrawing : main.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : AsyncDrawing Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/avoid_focus/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/avoid_focus/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/avoid_focus/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application AvoidFocus : AvoidFocus.cpp - : be + : be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/benchmark/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/benchmark/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/benchmark/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -15,7 +15,7 @@ Test.cpp TestWindow.cpp VerticalLineTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_bounds/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_bounds/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_bounds/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ SimpleTest BitmapBounds : main.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : BitmapBounds Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_drawing/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_drawing/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/bitmap_drawing/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application BitmapDrawing : main.cpp - : be + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/constrain_clipping_region/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/constrain_clipping_region/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/constrain_clipping_region/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ SimpleTest ClippingRegion : main.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : ClippingRegion Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/copy_bits/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/copy_bits/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/copy_bits/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ SimpleTest CopyBits : main.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; #if ( $(TARGET_PLATFORM) = libbe_test ) { # HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : CopyBits Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/cursor_test/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/cursor_test/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/cursor_test/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application CursorTest : CursorTest.cpp - : be + : be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/desktop_window/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/desktop_window/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/desktop_window/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -9,7 +9,7 @@ Application DesktopWindow : DesktopWindow.cpp - : be + : be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/drawing_debugger/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/drawing_debugger/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/drawing_debugger/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,5 +8,5 @@ Application DrawingDebugger : DrawingDebugger.cpp - : be + : be $(TARGET_LIBSUPC++) ; Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/event_mask/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/event_mask/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/event_mask/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application EventMask : EventMask.cpp - : be + : be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/find_view/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/find_view/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/find_view/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application FindView : FindView.cpp - : be + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/following/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/following/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/following/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ SimpleTest Following : main.cpp - : be ; + : be $(TARGET_LIBSUPC++) ; if ( $(TARGET_PLATFORM) = libbe_test ) { HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Following Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/hide_and_show/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/hide_and_show/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/hide_and_show/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -8,7 +8,7 @@ Application HideAndShow : HideAndShow.cpp - : be + : be $(TARGET_LIBSUPC++) ; if $(TARGET_PLATFORM) = libbe_test { Modified: haiku/branches/features/32bit-wchar_t/src/tests/servers/app/lagging_get_mouse/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/tests/servers/app/lagging_get_mouse/Jamfile 2009-07-02 14:16:04 UTC (rev 31372) +++ haiku/branches/features/32bit-wchar_t/src/tests/servers/app/lagging_get_mouse/Jamfile 2009-07-02 15:00:57 UTC (rev 31373) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src tests servers app statusbar ; +SubDir HAIKU_TOP src tests servers app lagging_get_mouse ; SetSubDirSupportedPlatformsBeOSCompatible ; AddSubDirSupportedPlatforms libbe_test ; @@ -8,7 +8,7 @@ SimpleTest LaggingGetMouse : main.cpp [... truncated: 264 lines follow ...] From axeld at mail.berlios.de Thu Jul 2 17:32:20 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Jul 2009 17:32:20 +0200 Subject: [Haiku-commits] r31374 - haiku/trunk/src/preferences/time Message-ID: <200907021532.n62FWKoR016263@sheep.berlios.de> Author: axeld Date: 2009-07-02 17:32:19 +0200 (Thu, 02 Jul 2009) New Revision: 31374 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31374&view=rev Modified: haiku/trunk/src/preferences/time/DateTimeEdit.cpp haiku/trunk/src/preferences/time/DateTimeEdit.h haiku/trunk/src/preferences/time/SectionEdit.cpp haiku/trunk/src/preferences/time/SectionEdit.h Log: * Made TSectionEdit use be_control_look to draw its frame. Also, it no longer uses those ugly bitmaps for the up/down buttons - while the updated drawing is far from nice either, it at least fits our UI style a lot better. * Fixed typo "seperator" -> "separator". * Coding style cleanup (still some stuff left). Modified: haiku/trunk/src/preferences/time/DateTimeEdit.cpp =================================================================== --- haiku/trunk/src/preferences/time/DateTimeEdit.cpp 2009-07-02 15:00:57 UTC (rev 31373) +++ haiku/trunk/src/preferences/time/DateTimeEdit.cpp 2009-07-02 15:32:19 UTC (rev 31374) @@ -24,9 +24,10 @@ using BPrivate::B_LOCAL_TIME; -TTimeEdit::TTimeEdit(BRect frame, const char *name, uint32 sections) - : TSectionEdit(frame, name, sections), - fLastKeyDownTime(0) +TTimeEdit::TTimeEdit(BRect frame, const char* name, uint32 sections) + : + TSectionEdit(frame, name, sections), + fLastKeyDownTime(0) { InitView(); fTime = BTime::CurrentTime(B_LOCAL_TIME); @@ -51,7 +52,7 @@ int32 section = FocusIndex(); if (section < 0 || section > 2) return; - + bigtime_t currentTime = system_time(); if (currentTime - fLastKeyDownTime < 1000000) { int32 doubleDigi = number + fLastKeyDownInt * 10; @@ -63,12 +64,12 @@ fLastKeyDownTime = currentTime; fLastKeyDownInt = number; } - + // update display value fHoldValue = number; - + _CheckRange(); - + // send message to change time DispatchMessage(); } @@ -105,8 +106,8 @@ BString text; switch (index) { - case 0: - { // hour + case 0: + // hour if (value > 12) { if (value < 22) text << "0"; @@ -117,67 +118,65 @@ if (value < 10) text << "0"; text << value; - } - } break; + } + break; case 1: case 2: - { // minute + // minute // second if (value < 10) text << "0"; text << value; - } break; + break; case 3: - { // am/pm + // am/pm value = fTime.Hour(); if (value >= 12) text << "PM"; - else + else text << "AM"; - } break; - + break; + default: return; - break; } // calc and center text in section rect float width = be_plain_font->StringWidth(text.String()); - - BPoint offset(-((bounds.Width()- width) / 2.0) -1.0 - , bounds.Height() / 2.0 -6.0); - + + BPoint offset(-((bounds.Width()- width) / 2.0) -1.0, + bounds.Height() / 2.0 -6.0); + SetHighColor(0, 0, 0, 255); FillRect(bounds, B_SOLID_LOW); - DrawString(text.String(), bounds.LeftBottom() - offset); + DrawString(text.String(), bounds.LeftBottom() - offset); } void -TTimeEdit::DrawSeperator(uint32 index) +TTimeEdit::DrawSeparator(uint32 index) { if (index == 3) - return; + return; TSection *section = NULL; section = static_cast (fSectionList->ItemAt(index)); - + if (!section) return; BRect bounds = section->Frame(); - float sepWidth = SeperatorWidth(); + float sepWidth = SeparatorWidth(); char* sep = ":"; if (index == 2) sep = "-"; float width = be_plain_font->StringWidth(sep); - BPoint offset(-((sepWidth - width) / 2.0) -1.0 - , bounds.Height() / 2.0 -6.0); - DrawString(sep, bounds.RightBottom() - offset); + BPoint offset(-((sepWidth - width) / 2.0) -1.0, bounds.Height() / 2.0 -6.0); + DrawString(sep, bounds.RightBottom() - offset); } @@ -186,16 +185,16 @@ { // by default divide up the sections evenly BRect bounds(area); - - float sepWidth = SeperatorWidth(); - + + float sepWidth = SeparatorWidth(); + float sep_2 = ceil(sepWidth / fSectionCount +1); float width = bounds.Width() / fSectionCount -sep_2; bounds.right = bounds.left + (width -sepWidth / fSectionCount); - + for (uint32 idx = 0; idx < fSectionCount; idx++) { fSectionList->AddItem(new TSection(bounds)); - + bounds.left = bounds.right + sepWidth; if (idx == fSectionCount -2) bounds.right = area.right -1; @@ -206,7 +205,7 @@ float -TTimeEdit::SeperatorWidth() const +TTimeEdit::SeparatorWidth() const { return 10.0f; } @@ -225,7 +224,7 @@ void TTimeEdit::SetTime(int32 hour, int32 minute, int32 second) { - if (fTime.Hour() == hour && fTime.Minute() == minute + if (fTime.Hour() == hour && fTime.Minute() == minute && fTime.Second() == second) return; @@ -239,17 +238,17 @@ { if (fFocus == -1) SectionFocus(0); - + // update displayed value fHoldValue += 1; - + _CheckRange(); - + // send message to change time DispatchMessage(); } - + void TTimeEdit::DoDownPress() { @@ -258,27 +257,27 @@ // update display value fHoldValue -= 1; - + _CheckRange(); - + // send message to change time DispatchMessage(); } - - + + void TTimeEdit::BuildDispatch(BMessage *message) { const char *fields[3] = { "hour", "minute", "second" }; - + message->AddBool("time", true); - + for (int32 index = 0; index < fSectionList->CountItems() -1; ++index) { uint32 data = _SectionValue(index); - + if (fFocus == index) data = fHoldValue; - + message->AddInt32(fields[index], data); } } @@ -290,37 +289,37 @@ int32 value = fHoldValue; switch (fFocus) { case 0: - { // hour - if (value > 23) + // hour + if (value > 23) value = 0; - else if (value < 0) + else if (value < 0) value = 23; fTime.SetTime(value, fTime.Minute(), fTime.Second()); - } break; + break; case 1: - { // minute + // minute if (value> 59) value = 0; else if (value < 0) value = 59; fTime.SetTime(fTime.Hour(), value, fTime.Second()); - } break; + break; case 2: - { // second + // second if (value > 59) value = 0; else if (value < 0) value = 59; fTime.SetTime(fTime.Hour(), fTime.Minute(), value); - } break; + break; case 3: - { + // AM/PM value = fTime.Hour(); if (value < 13) value += 12; @@ -331,7 +330,7 @@ // modify hour value to reflect change in am/ pm fTime.SetTime(value, fTime.Minute(), fTime.Second()); - } break; + break; default: return; @@ -348,22 +347,22 @@ bool isInRange = false; switch (fFocus) { case 0: - { // hour - if (value <= 23) + // hour + if (value <= 23) isInRange = true; - } break; + break; case 1: - { // minute + // minute if (value <= 59) isInRange = true; - } break; + break; case 2: - { // second + // second if (value <= 59) isInRange = true; - } break; + break; default: return isInRange; @@ -381,7 +380,7 @@ case 0: value = fTime.Hour(); break; - + case 1: value = fTime.Minute(); break; @@ -428,7 +427,7 @@ int32 section = FocusIndex(); if (section < 1 || section > 2) return; - + bigtime_t currentTime = system_time(); if (currentTime - fLastKeyDownTime < 1000000) { int32 doubleDigi = number + fLastKeyDownInt * 10; @@ -440,7 +439,7 @@ fLastKeyDownTime = currentTime; fLastKeyDownInt = number; } - + // if year add 2000 if (section == 2) { int32 oldCentury = int32(fHoldValue / 100) * 100; @@ -450,9 +449,9 @@ } // update display value fHoldValue = number; - + _CheckRange(); - + // send message to change time DispatchMessage(); } @@ -496,17 +495,17 @@ // calc and center text in section rect float width = StringWidth(text.String()); - BPoint offset(-(bounds.Width() - width) / 2.0 - 1.0 - , (bounds.Height() / 2.0 - 6.0)); + BPoint offset(-(bounds.Width() - width) / 2.0 - 1.0, + (bounds.Height() / 2.0 - 6.0)); SetHighColor(0, 0, 0, 255); FillRect(bounds, B_SOLID_LOW); - DrawString(text.String(), bounds.LeftBottom() - offset); + DrawString(text.String(), bounds.LeftBottom() - offset); } void -TDateEdit::DrawSeperator(uint32 index) +TDateEdit::DrawSeparator(uint32 index) { if (index == 3) return; @@ -515,14 +514,14 @@ section = static_cast (fSectionList->ItemAt(index)); BRect bounds = section->Frame(); - float sepWidth = SeperatorWidth(); + float sepWidth = SeparatorWidth(); float width = be_plain_font->StringWidth("/"); - BPoint offset(-(sepWidth / 2.0 - width / 2.0) -1.0 - , bounds.Height() / 2.0 -6.0); + BPoint offset(-(sepWidth / 2.0 - width / 2.0) -1.0, + bounds.Height() / 2.0 -6.0); SetHighColor(0, 0, 0, 255); - DrawString("/", bounds.RightBottom() - offset); + DrawString("/", bounds.RightBottom() - offset); } @@ -534,7 +533,7 @@ fSectionList->AddItem(new TSection(area)); BRect bounds(area); - float sepWidth = SeperatorWidth(); + float sepWidth = SeparatorWidth(); // year TSection *section = NULL; @@ -560,7 +559,7 @@ float -TDateEdit::SeperatorWidth() const +TDateEdit::SeparatorWidth() const { return 10.0f; } @@ -602,7 +601,7 @@ DispatchMessage(); } - + void TDateEdit::DoDownPress() { @@ -617,8 +616,8 @@ // send message to change Date DispatchMessage(); } - - + + void TDateEdit::BuildDispatch(BMessage *message) { @@ -642,22 +641,21 @@ TDateEdit::_CheckRange() { int32 value = fHoldValue; - + switch (fFocus) { case 0: - { - // month + // month if (value > 12) value = 1; else if (value < 1) value = 12; fDate.SetDate(fDate.Year(), value, fDate.Day()); - } break; + break; case 1: { - //day + // day int32 days = fDate.DaysInMonth(); if (value > days) value = 1; @@ -665,18 +663,18 @@ value = days; fDate.SetDate(fDate.Year(), fDate.Month(), value); - } break; + break; + } case 2: - { - //year + // year if (value > 2037) value = 2037; else if (value < 1970) value = 1970; fDate.SetDate(value, fDate.Month(), fDate.Day()); - } break; + break; default: return; @@ -694,19 +692,22 @@ int32 year = 0; switch (fFocus) { case 1: - { // day - //day + { + // day int32 days = fDate.DaysInMonth(); if (value <= days) isInRange = true; - } break; + break; + } case 2: - { //year + { + // year year = int32(fHoldValue / 100) * 100 + value; if (year <= 2037 && year >= 1970) isInRange = true; - } break; + break; + } default: return isInRange; Modified: haiku/trunk/src/preferences/time/DateTimeEdit.h =================================================================== --- haiku/trunk/src/preferences/time/DateTimeEdit.h 2009-07-02 15:00:57 UTC (rev 31373) +++ haiku/trunk/src/preferences/time/DateTimeEdit.h 2009-07-02 15:32:19 UTC (rev 31374) @@ -30,11 +30,11 @@ virtual void InitView(); virtual void DrawSection(uint32 index, bool isfocus); - virtual void DrawSeperator(uint32 index); + virtual void DrawSeparator(uint32 index); virtual void SetSections(BRect area); virtual void SectionFocus(uint32 index); - virtual float SeperatorWidth() const; + virtual float SeparatorWidth() const; virtual void DoUpPress(); virtual void DoDownPress(); @@ -63,11 +63,11 @@ virtual void InitView(); virtual void DrawSection(uint32 index, bool isfocus); - virtual void DrawSeperator(uint32 index); + virtual void DrawSeparator(uint32 index); virtual void SetSections(BRect area); virtual void SectionFocus(uint32 index); - virtual float SeperatorWidth() const; + virtual float SeparatorWidth() const; virtual void DoUpPress(); virtual void DoDownPress(); Modified: haiku/trunk/src/preferences/time/SectionEdit.cpp =================================================================== --- haiku/trunk/src/preferences/time/SectionEdit.cpp 2009-07-02 15:00:57 UTC (rev 31373) +++ haiku/trunk/src/preferences/time/SectionEdit.cpp 2009-07-02 15:32:19 UTC (rev 31374) @@ -9,25 +9,24 @@ */ #include "SectionEdit.h" -#include "Bitmaps.h" -#include "TimeMessages.h" - #include +#include #include #include +#include "TimeMessages.h" + const uint32 kArrowAreaWidth = 16; TSectionEdit::TSectionEdit(BRect frame, const char *name, uint32 sections) - : BControl(frame, name, NULL, NULL, B_FOLLOW_NONE, B_NAVIGABLE | B_WILL_DRAW), - fUpArrow(NULL), - fDownArrow(NULL), - fSectionList(NULL), - fFocus(-1), - fSectionCount(sections) + : + BControl(frame, name, NULL, NULL, B_FOLLOW_NONE, B_NAVIGABLE | B_WILL_DRAW), + fSectionList(NULL), + fFocus(-1), + fSectionCount(sections) { InitView(); } @@ -35,9 +34,6 @@ TSectionEdit::~TSectionEdit() { - delete fUpArrow; - delete fDownArrow; - int32 count = fSectionList->CountItems(); if (count > 0) { for (int32 index = 0; index < count; index++) @@ -50,22 +46,20 @@ void TSectionEdit::AttachedToWindow() { - if (Parent()) { + if (Parent()) SetViewColor(Parent()->ViewColor()); - ReplaceTransparentColor(fUpArrow, ViewColor()); - ReplaceTransparentColor(fDownArrow, ViewColor()); - } } void TSectionEdit::Draw(BRect updateRect) { - DrawBorder(); + DrawBorder(updateRect); + for (uint32 idx = 0; idx < fSectionCount; idx++) { DrawSection(idx, ((uint32)fFocus == idx) && IsFocus()); if (idx < fSectionCount -1) - DrawSeperator(idx); + DrawSeparator(idx); } } @@ -74,7 +68,7 @@ TSectionEdit::MouseDown(BPoint where) { MakeFocus(true); - + if (fUpRect.Contains(where)) DoUpPress(); else if (fDownRect.Contains(where)) @@ -87,7 +81,7 @@ SectionFocus(idx); return; } - } + } } } @@ -99,7 +93,7 @@ return; BControl::MakeFocus(focused); - + if (fFocus == -1) SectionFocus(0); else @@ -112,33 +106,33 @@ { if (fFocus == -1) SectionFocus(0); - + switch (bytes[0]) { case B_LEFT_ARROW: fFocus -= 1; if (fFocus < 0) fFocus = fSectionCount -1; SectionFocus(fFocus); - break; - + break; + case B_RIGHT_ARROW: fFocus += 1; if ((uint32)fFocus >= fSectionCount) fFocus = 0; SectionFocus(fFocus); - break; - + break; + case B_UP_ARROW: DoUpPress(); - break; - + break; + case B_DOWN_ARROW: DoDownPress(); - break; - + break; + default: BControl::KeyDown(bytes, numbytes); - break; + break; } Draw(Bounds()); } @@ -170,103 +164,60 @@ void TSectionEdit::InitView() { - // create arrow bitmaps - BRect rect(0, 0, kUpArrowWidth -1, kUpArrowHeight -1); - fUpArrow = new BBitmap(rect, kUpArrowColorSpace); - fUpArrow->SetBits(kUpArrowBits, (kUpArrowWidth) *(kUpArrowHeight+1), 0 - , kUpArrowColorSpace); - - rect = BRect(0, 0, kDownArrowWidth -1, kDownArrowHeight -2); - fDownArrow = new BBitmap(rect, kDownArrowColorSpace); - fDownArrow->SetBits(kDownArrowBits, (kDownArrowWidth) *(kDownArrowHeight) - , 0, kDownArrowColorSpace); - // setup sections fSectionList = new BList(fSectionCount); fSectionArea = Bounds().InsetByCopy(2, 2); - fSectionArea.right -= kArrowAreaWidth; + fSectionArea.right -= kArrowAreaWidth; } void -TSectionEdit::Draw3DFrame(BRect frame, bool inset) +TSectionEdit::DrawBorder(const BRect& updateRect) { - rgb_color color1 = LowColor(); - rgb_color color2 = HighColor(); - - if (inset) { - color1 = HighColor(); - color2 = LowColor(); - } + BRect bounds(Bounds()); + fShowFocus = (IsFocus() && Window() && Window()->IsActive()); - BeginLineArray(4); - // left side - AddLine(frame.LeftBottom(), frame.LeftTop(), color2); - // right side - AddLine(frame.RightTop(), frame.RightBottom(), color1); - // bottom side - AddLine(frame.RightBottom(), frame.LeftBottom(), color1); - // top side - AddLine(frame.LeftTop(), frame.RightTop(), color2); - EndLineArray(); -} + be_control_look->DrawBorder(this, bounds, updateRect, ViewColor(), + B_FANCY_BORDER, fShowFocus ? BControlLook::B_FOCUSED : 0); + // draw up/down control -void -TSectionEdit::DrawBorder() -{ - rgb_color bgcolor = ViewColor(); - rgb_color light = tint_color(bgcolor, B_LIGHTEN_MAX_TINT); - rgb_color dark = tint_color(bgcolor, B_DARKEN_1_TINT); - rgb_color darker = tint_color(bgcolor, B_DARKEN_3_TINT); + bounds.left = bounds.right - kArrowAreaWidth; + bounds.right = Bounds().right - 2; + fUpRect.Set(bounds.left + 3, bounds.top + 2, bounds.right, + bounds.bottom / 2.0); + fDownRect = fUpRect.OffsetByCopy(0, fUpRect.Height() + 2); - SetHighColor(light); - SetLowColor(dark); - - BRect bounds(Bounds()); - Draw3DFrame(bounds, true); - StrokeLine(bounds.LeftBottom(), bounds.LeftBottom(), B_SOLID_LOW); - - bounds.InsetBy(1, 1); - bounds.right -= kArrowAreaWidth; - - fShowFocus = (IsFocus() && Window() && Window()->IsActive()); - if (fShowFocus) { - rgb_color navcolor = keyboard_navigation_color(); - - SetHighColor(navcolor); - StrokeRect(bounds); - } else { - // draw border thickening (erase focus) - SetHighColor(darker); - SetLowColor(bgcolor); - Draw3DFrame(bounds, false); + BPoint middle(floorf(fUpRect.left + fUpRect.Width() / 2), fUpRect.top + 1); + BPoint left(fUpRect.left + 3, fUpRect.bottom - 1); + BPoint right(left.x + 2 * (middle.x - left.x), fUpRect.bottom - 1); + + SetPenSize(2); + + if (updateRect.Intersects(fUpRect)) { + FillRect(fUpRect, B_SOLID_LOW); + BeginLineArray(2); + AddLine(left, middle, HighColor()); + AddLine(middle, right, HighColor()); + EndLineArray(); } + if (updateRect.Intersects(fDownRect)) { + middle.y = fDownRect.bottom - 1; + left.y = right.y = fDownRect.top + 1; - // draw up/down control - SetHighColor(light); - bounds.left = bounds.right +1; - bounds.right = Bounds().right -1; - fUpRect.Set(bounds.left +3, bounds.top +2, bounds.right, bounds.bottom /2.0); - fDownRect = fUpRect.OffsetByCopy(0, fUpRect.Height()+2); - - if (fUpArrow) - DrawBitmap(fUpArrow, fUpRect.LeftTop()); - - if (fDownArrow) - DrawBitmap(fDownArrow, fDownRect.LeftTop()); - - Draw3DFrame(bounds, false); - SetHighColor(dark); - StrokeLine(bounds.LeftBottom(), bounds.RightBottom()); - StrokeLine(bounds.RightBottom(), bounds.RightTop()); - SetHighColor(light); - StrokeLine(bounds.RightTop(), bounds.RightTop()); + FillRect(fDownRect, B_SOLID_LOW); + BeginLineArray(2); + AddLine(left, middle, HighColor()); + AddLine(middle, right, HighColor()); + EndLineArray(); + } + + SetPenSize(1); } float -TSectionEdit::SeperatorWidth() const +TSectionEdit::SeparatorWidth() const { return 0.0f; } Modified: haiku/trunk/src/preferences/time/SectionEdit.h =================================================================== --- haiku/trunk/src/preferences/time/SectionEdit.h 2009-07-02 15:00:57 UTC (rev 31373) +++ haiku/trunk/src/preferences/time/SectionEdit.h 2009-07-02 15:32:19 UTC (rev 31374) @@ -22,8 +22,8 @@ public: TSection(BRect frame) : fFrame(frame) {} - - BRect Bounds() const + + BRect Bounds() const { BRect frame(fFrame); return frame.OffsetByCopy(B_ORIGIN); @@ -31,7 +31,7 @@ void SetFrame(BRect frame) { fFrame = frame; } - + BRect Frame() const { return fFrame; } @@ -44,50 +44,47 @@ public: TSectionEdit(BRect frame, const char *name, uint32 sections); virtual ~TSectionEdit(); - + virtual void AttachedToWindow(); virtual void Draw(BRect updateRect); virtual void MouseDown(BPoint point); virtual void MakeFocus(bool focused = true); virtual void KeyDown(const char *bytes, int32 numBytes); - + uint32 CountSections() const; int32 FocusIndex() const; BRect SectionArea() const; protected: virtual void InitView(); - - //hooks - virtual void DrawBorder(); + + // hooks + virtual void DrawBorder(const BRect& updateRect); virtual void DrawSection(uint32 index, bool isFocus) {} - virtual void DrawSeperator(uint32 index) {} - virtual void Draw3DFrame(BRect frame, bool inset); - + virtual void DrawSeparator(uint32 index) {} + virtual void SectionFocus(uint32 index) {} virtual void SectionChange(uint32 index, uint32 value) {} virtual void SetSections(BRect area) {} - virtual float SeperatorWidth() const; - + virtual float SeparatorWidth() const; + virtual void DoUpPress() {} virtual void DoDownPress() {} - + virtual void DispatchMessage(); virtual void BuildDispatch(BMessage *message) = 0; - + protected: - BBitmap *fUpArrow; - BBitmap *fDownArrow; BList *fSectionList; - + BRect fUpRect; BRect fDownRect; BRect fSectionArea; - + int32 fFocus; uint32 fSectionCount; uint32 fHoldValue; - + bool fShowFocus; }; From axeld at mail.berlios.de Thu Jul 2 17:33:07 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Jul 2009 17:33:07 +0200 Subject: [Haiku-commits] r31375 - haiku/trunk/src/kits/shared Message-ID: <200907021533.n62FX7HH016410@sheep.berlios.de> Author: axeld Date: 2009-07-02 17:33:06 +0200 (Thu, 02 Jul 2009) New Revision: 31375 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31375&view=rev Modified: haiku/trunk/src/kits/shared/CalendarView.cpp Log: * Minor cleanup. Modified: haiku/trunk/src/kits/shared/CalendarView.cpp =================================================================== --- haiku/trunk/src/kits/shared/CalendarView.cpp 2009-07-02 15:32:19 UTC (rev 31374) +++ haiku/trunk/src/kits/shared/CalendarView.cpp 2009-07-02 15:33:06 UTC (rev 31375) @@ -1,52 +1,53 @@ /* - * Copyright 2007-2008, Haiku, Inc. All Rights Reserved. + * Copyright 2007-2009, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: * Julun */ + #include "CalendarView.h" +#include #include -#include - - namespace BPrivate { - namespace { - float - FontHeight(const BView *view) - { - if (!view) - return 0.0; - BFont font; - view->GetFont(&font); - font_height fheight; - font.GetHeight(&fheight); - return ceilf(fheight.ascent + fheight.descent + fheight.leading); - } +float +FontHeight(const BView *view) +{ + if (!view) + return 0.0; + + BFont font; + view->GetFont(&font); + font_height fheight; + font.GetHeight(&fheight); + return ceilf(fheight.ascent + fheight.descent + fheight.leading); } +} // private namespace + BCalendarView::BCalendarView(BRect frame, const char *name, uint32 resizeMask, uint32 flags) - : BView(frame, name, resizeMask, flags), - BInvoker(), - fSelectionMessage(NULL), - fDay(0), - fYear(0), - fMonth(0), - fFocusChanged(false), - fSelectionChanged(false), - fWeekStart(B_WEEK_START_SUNDAY), - fDayNameHeaderVisible(true), - fWeekNumberHeaderVisible(true) + : + BView(frame, name, resizeMask, flags), + BInvoker(), + fSelectionMessage(NULL), + fDay(0), + fYear(0), + fMonth(0), + fFocusChanged(false), + fSelectionChanged(false), + fWeekStart(B_WEEK_START_SUNDAY), + fDayNameHeaderVisible(true), + fWeekNumberHeaderVisible(true) { _InitObject(); } @@ -54,17 +55,18 @@ BCalendarView::BCalendarView(BRect frame, const char *name, week_start start, uint32 resizeMask, uint32 flags) - : BView(frame, name, resizeMask, flags), - BInvoker(), - fSelectionMessage(NULL), - fDay(0), - fYear(0), - fMonth(0), - fFocusChanged(false), - fSelectionChanged(false), - fWeekStart(start), - fDayNameHeaderVisible(true), - fWeekNumberHeaderVisible(true) + : + BView(frame, name, resizeMask, flags), + BInvoker(), + fSelectionMessage(NULL), + fDay(0), + fYear(0), + fMonth(0), + fFocusChanged(false), + fSelectionChanged(false), + fWeekStart(start), + fDayNameHeaderVisible(true), + fWeekNumberHeaderVisible(true) { _InitObject(); } @@ -77,17 +79,18 @@ BCalendarView::BCalendarView(BMessage *archive) - : BView(archive), - BInvoker(), - fSelectionMessage(NULL), - fDay(0), - fYear(0), - fMonth(0), - fFocusChanged(false), - fSelectionChanged(false), - fWeekStart(B_WEEK_START_SUNDAY), - fDayNameHeaderVisible(true), - fWeekNumberHeaderVisible(true) + : + BView(archive), + BInvoker(), + fSelectionMessage(NULL), + fDay(0), + fYear(0), + fMonth(0), + fFocusChanged(false), + fSelectionChanged(false), + fWeekStart(B_WEEK_START_SUNDAY), + fDayNameHeaderVisible(true), + fWeekNumberHeaderVisible(true) { if (archive->HasMessage("_invokeMsg")) { BMessage *invokationMessage = new BMessage; @@ -104,8 +107,8 @@ if (archive->FindInt32("_day", &fDay) != B_OK || archive->FindInt32("_month", &fMonth) != B_OK || archive->FindInt32("_year", &fYear) != B_OK) { - BDate date = BDate::CurrentDate(B_LOCAL_TIME); - date.GetDate(&fYear, &fMonth, &fDay); + BDate date = BDate::CurrentDate(B_LOCAL_TIME); + date.GetDate(&fYear, &fMonth, &fDay); } int32 start; @@ -335,6 +338,7 @@ BView::MakeFocus(state); + // TODO: solve this better fFocusChanged = true; Draw(_RectOfDay(fFocusedDay)); fFocusChanged = false; From oliver.ruiz.dorantes at gmail.com Thu Jul 2 20:54:23 2009 From: oliver.ruiz.dorantes at gmail.com (Oliver Ruiz Dorantes) Date: Thu, 2 Jul 2009 18:54:23 +0000 Subject: [Haiku-commits] r31363 - haiku/trunk/src/kits/bluetooth In-Reply-To: <18806595.1246545277197.JavaMail.ngmail@webmail18.arcor-online.net> References: <593042056-BeMail@zon> <18806595.1246545277197.JavaMail.ngmail@webmail18.arcor-online.net> Message-ID: Hi > A GetXXX() function should use a pointer argument to return the value, i.e. If this is a must also for non class member functions, please note it someone/somewhere in the guidelines. Other changes are on the way... Regards & thanks pointing! -- Oliver, -------------- next part -------------- An HTML attachment was scrubbed... URL: From oruizdorantes at mail.berlios.de Thu Jul 2 22:07:27 2009 From: oruizdorantes at mail.berlios.de (oruizdorantes at BerliOS) Date: Thu, 2 Jul 2009 22:07:27 +0200 Subject: [Haiku-commits] r31376 - in haiku/trunk: headers/os/bluetooth/HCI headers/private/bluetooth src/kits/bluetooth src/preferences/bluetooth src/servers/bluetooth Message-ID: <200907022007.n62K7RNn030279@sheep.berlios.de> Author: oruizdorantes Date: 2009-07-02 22:07:26 +0200 (Thu, 02 Jul 2009) New Revision: 31376 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31376&view=rev Modified: haiku/trunk/headers/os/bluetooth/HCI/btHCI.h haiku/trunk/headers/os/bluetooth/HCI/btHCI_command.h haiku/trunk/headers/os/bluetooth/HCI/btHCI_event.h haiku/trunk/headers/private/bluetooth/bluetoothserver_p.h haiku/trunk/src/kits/bluetooth/CommandManager.cpp haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp haiku/trunk/src/servers/bluetooth/BluetoothServer.cpp haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h Log: - Add initial code to unregister devices from server - Handle Hardware error event - Add function to retrieve an string from a bluetooth error - Styling Modified: haiku/trunk/headers/os/bluetooth/HCI/btHCI.h =================================================================== --- haiku/trunk/headers/os/bluetooth/HCI/btHCI.h 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/headers/os/bluetooth/HCI/btHCI.h 2009-07-02 20:07:26 UTC (rev 31376) @@ -20,6 +20,13 @@ HCI_NUM_PACKET_TYPES } bt_packet_t; +const char* BluetoothCommandOpcode(uint16 opcode); +const char* BluetoothEvent(uint8 event); +const char* BluetoothManufacturer(uint16 manufacturer); +const char* BluetoothHciVersion(uint16 ver); +const char* BluetoothLmpVersion(uint16 ver); +const char* BluetoothError(uint8 error); + /* packets sizes */ #define HCI_MAX_ACL_SIZE 1024 #define HCI_MAX_SCO_SIZE 255 Modified: haiku/trunk/headers/os/bluetooth/HCI/btHCI_command.h =================================================================== --- haiku/trunk/headers/os/bluetooth/HCI/btHCI_command.h 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/headers/os/bluetooth/HCI/btHCI_command.h 2009-07-02 20:07:26 UTC (rev 31376) @@ -10,12 +10,6 @@ #define HCI_COMMAND_HDR_SIZE 3 -const char* GetCommand(uint16 command); -const char* GetEvent(uint8 event); -const char* GetManufacturer(uint16 manufacturer); -const char* GetHciVersion(uint16 ver); -const char* GetLmpVersion(uint16 ver); - struct hci_command_header { uint16 opcode; /* OCF & OGF */ uint8 clen; Modified: haiku/trunk/headers/os/bluetooth/HCI/btHCI_event.h =================================================================== --- haiku/trunk/headers/os/bluetooth/HCI/btHCI_event.h 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/headers/os/bluetooth/HCI/btHCI_event.h 2009-07-02 20:07:26 UTC (rev 31376) @@ -292,7 +292,7 @@ // TODO: Define remaining Bluetooth 2.1 events structures #define HCI_EVENT_EXTENDED_INQUIRY_RESULT 0x2F -#define HCI_EVENT_ENCRYPTION_KEY_REFERSH_COMPLETE 0x30 +#define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30 #define HCI_EVENT_IO_CAPABILITY_REQUEST 0x31 Modified: haiku/trunk/headers/private/bluetooth/bluetoothserver_p.h =================================================================== --- haiku/trunk/headers/private/bluetooth/bluetoothserver_p.h 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/headers/private/bluetooth/bluetoothserver_p.h 2009-07-02 20:07:26 UTC (rev 31376) @@ -11,6 +11,7 @@ #define BT_MSG_ACQUIRE_LOCAL_DEVICE 'btAd' #define BT_MSG_HANDLE_SIMPLE_REQUEST 'btsR' #define BT_MSG_ADD_DEVICE 'btDD' +#define BT_MSG_REMOVE_DEVICE 'btrD' #define BT_MSG_GET_PROPERTY 'btgP' // Discovery Modified: haiku/trunk/src/kits/bluetooth/CommandManager.cpp =================================================================== --- haiku/trunk/src/kits/bluetooth/CommandManager.cpp 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/src/kits/bluetooth/CommandManager.cpp 2009-07-02 20:07:26 UTC (rev 31376) @@ -596,7 +596,7 @@ "Synchronous Connection Changed", "Reserved", "Extended Inquiry Result", - "Encryption Key Refersh Complete", + "Encryption Key Refresh Complete", "Io Capability Request", "Io Capability Response", "User Confirmation Request", @@ -678,51 +678,51 @@ const char* -GetHciVersion(uint16 ver) +BluetoothHciVersion(uint16 ver) { return hciVersion[ver]; } const char* -GetLmpVersion(uint16 ver) +BluetoothLmpVersion(uint16 ver) { return lmpVersion[ver]; } const char* -GetCommand(uint16 command) +BluetoothCommandOpcode(uint16 opcode) { - // TODO: BT implementations beyond 2.1 + // NOTE: BT implementations beyond 2.1 // could specify new commands with OCF numbers // beyond the boundaries of the arrays and crash. // But only our stack could issue them so its under // our control. - switch (GET_OPCODE_OGF(command)) { + switch (GET_OPCODE_OGF(opcode)) { case OGF_LINK_CONTROL: - return linkControlCommands[GET_OPCODE_OCF(command)-1]; + return linkControlCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_LINK_POLICY: - return linkPolicyCommands[GET_OPCODE_OCF(command)-1]; + return linkPolicyCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_CONTROL_BASEBAND: - return controllerBasebandCommands[GET_OPCODE_OCF(command)-1]; + return controllerBasebandCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_INFORMATIONAL_PARAM: - return informationalParametersCommands[GET_OPCODE_OCF(command)-1]; + return informationalParametersCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_STATUS_PARAM: - return statusParametersCommands[GET_OPCODE_OCF(command)-1]; + return statusParametersCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_TESTING_CMD: - return testingCommands[GET_OPCODE_OCF(command)-1]; + return testingCommands[GET_OPCODE_OCF(opcode)-1]; break; case OGF_VENDOR_CMD: return "Vendor specific command"; @@ -736,8 +736,9 @@ const char* -GetEvent(uint8 event) { - if (event < sizeof(bluetoothEvents)/sizeof(const char*)) { +BluetoothEvent(uint8 event) { + + if (event < sizeof(bluetoothEvents) / sizeof(const char*)) { return bluetoothEvents[event-1]; } else { return "Event out of Range!"; @@ -746,8 +747,9 @@ const char* -GetManufacturer(uint16 manufacturer) { - if (manufacturer < sizeof(bluetoothManufacturers)/sizeof(const char*)) { +BluetoothManufacturer(uint16 manufacturer) { + + if (manufacturer < sizeof(bluetoothManufacturers) / sizeof(const char*)) { return bluetoothManufacturers[manufacturer]; } else if (manufacturer == 0xFFFF) { return "internal use"; @@ -758,8 +760,9 @@ const char* -GetError(uint8 error) { - if (error < sizeof(bluetoothErrors)/sizeof(const char*)) { +BluetoothError(uint8 error) { + + if (error < sizeof(bluetoothErrors) / sizeof(const char*)) { return bluetoothErrors[error]; } else { return "not specified"; Modified: haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp =================================================================== --- haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp 2009-07-02 20:07:26 UTC (rev 31376) @@ -105,7 +105,7 @@ str = ""; if (bDevice->GetProperty("hci_version", &value) == B_OK) - str << "HCI ver: " << GetHciVersion(value); + str << "HCI ver: " << BluetoothHciVersion(value); if (bDevice->GetProperty("hci_revision", &value) == B_OK) str << " HCI rev: " << value ; @@ -113,14 +113,14 @@ str = ""; if (bDevice->GetProperty("lmp_version", &value) == B_OK) - str << "LMP ver: " << GetLmpVersion(value); + str << "LMP ver: " << BluetoothLmpVersion(value); if (bDevice->GetProperty("lmp_subversion", &value) == B_OK) str << " LMP subver: " << value; fLMPVersionProperties->SetText(str.String()); str = ""; if (bDevice->GetProperty("manufacturer", &value) == B_OK) - str << "Manufacturer: " << GetManufacturer(value); + str << "Manufacturer: " << BluetoothManufacturer(value); fManufacturerProperties->SetText(str.String()); str = ""; Modified: haiku/trunk/src/servers/bluetooth/BluetoothServer.cpp =================================================================== --- haiku/trunk/src/servers/bluetooth/BluetoothServer.cpp 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/src/servers/bluetooth/BluetoothServer.cpp 2009-07-02 20:07:26 UTC (rev 31376) @@ -121,9 +121,8 @@ void BluetoothServer::MessageReceived(BMessage *message) { BMessage reply; - status_t status = B_WOULD_BLOCK; - // mark somehow.. do not reply anything - + status_t status = B_WOULD_BLOCK; // mark somehow to do not reply anything + switch(message->what) { case BT_MSG_ADD_DEVICE: @@ -132,38 +131,50 @@ message->FindString("name", &str); BPath path(str.String()); Output::Instance()->Postf(BLACKBOARD_GENERAL, - "Requested LocalDevice %s\n", str.String()); + "Requested LocalDevice %s\n", str.String()); LocalDeviceImpl* ldi = LocalDeviceImpl::CreateTransportAccessor(&path); if (ldi->GetID() >= 0) { fLocalDevicesList.AddItem(ldi); Output::Instance()->AddTab("Local Device", BLACKBOARD_LD(ldi->GetID())); Output::Instance()->Postf(BLACKBOARD_LD(ldi->GetID()), - "LocalDevice %s id=%x added\n", - str.String(), ldi->GetID()); + "LocalDevice %s id=%x added\n", str.String(), ldi->GetID()); + } else { Output::Instance()->Post("Adding LocalDevice failed\n", - BLACKBOARD_GENERAL); + BLACKBOARD_GENERAL); } status = B_WOULD_BLOCK; /* TODO: This should be by user request only! */ ldi->Launch(); + break; } - break; + + case BT_MSG_REMOVE_DEVICE: + { + LocalDeviceImpl* ldi; + message->FindPointer("device", (void**)&ldi); + fLocalDevicesList.RemoveItem(ldi); + delete ldi; + break; + } + case BT_MSG_COUNT_LOCAL_DEVICES: status = HandleLocalDevicesCount(message, &reply); - break; + break; + case BT_MSG_ACQUIRE_LOCAL_DEVICE: status = HandleAcquireLocalDevice(message, &reply); - break; + break; case BT_MSG_HANDLE_SIMPLE_REQUEST: status = HandleSimpleRequest(message, &reply); - break; + break; + case BT_MSG_GET_PROPERTY: status = HandleGetProperty(message, &reply); - break; + break; /* Handle if the bluetooth preferences is running?? */ case B_SOME_APP_LAUNCHED: @@ -181,7 +192,7 @@ default: BApplication::MessageReceived(message); - break; + break; } // Can we reply right now? Modified: haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp =================================================================== --- haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp 2009-07-02 20:07:26 UTC (rev 31376) @@ -85,31 +85,31 @@ printf("### \n"); Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"Incomming %s event\n", - GetEvent(event->ecode)); + BluetoothEvent(event->ecode)); // Events here might have not been initated by us // TODO: ML mark as handled pass a reply by parameter and reply in common switch (event->ecode) { case HCI_EVENT_HARDWARE_ERROR: - //HardwareError(event); + HardwareError((struct hci_ev_hardware_error*)(event+1)); return; - break; + case HCI_EVENT_CONN_REQUEST: ConnectionRequest((struct hci_ev_conn_request*)(event+1), NULL); return; - break; + case HCI_EVENT_CONN_COMPLETE: - // should belong to a request? can be sporadic or initiated by us??... + // should belong to a request? can be sporadic or initiated by us??... ConnectionComplete((struct hci_ev_conn_complete*)(event+1), NULL); return; - break; + case HCI_EVENT_PIN_CODE_REQ: PinCodeRequest((struct hci_ev_pin_code_req*)(event+1), NULL); return; - break; + default: // lets go on - break; + break; } BMessage* request = NULL; @@ -272,7 +272,7 @@ Output::Instance()->Post("Nobody waiting for the event\n", BLACKBOARD_KIT); Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s(%d) for %s\n",__FUNCTION__, - event->ncmd,GetCommand(opcodeExpected)); + event->ncmd, BluetoothCommandOpcode(opcodeExpected)); switch ((uint16)opcodeExpected) { @@ -455,7 +455,7 @@ reply.AddInt8("status", *(uint8*)(event+1)); Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s for %s status %x\n", - __FUNCTION__,GetCommand(opcodeExpected), *(uint8*)(event+1)); + __FUNCTION__, BluetoothCommandOpcode(opcodeExpected), *(uint8*)(event+1)); request->SendReply(&reply); @@ -482,7 +482,7 @@ request->FindInt16("opcodeExpected", index, &opcodeExpected); Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s(%d) %x for %s\n",__FUNCTION__, - event->ncmd, event->status, GetCommand(event->opcode)); + event->ncmd, event->status, BluetoothCommandOpcode(event->opcode)); if (request->IsSourceWaiting() == false) Output::Instance()->Post("Nobody waiting for the event\n", BLACKBOARD_KIT); @@ -584,14 +584,15 @@ BMessage reply; if (remotename->status == BT_OK) { - reply.AddString("friendlyname", (const char*)remotename->remote_name ); - Output::Instance()->Post("Positive reply for remote friendly name\n", BLACKBOARD_KIT); - } else { - Output::Instance()->Post("Negative reply for remote friendly name\n", BLACKBOARD_KIT); } reply.AddInt8("status", remotename->status); + + Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s for %s with status %s\n", + BluetoothEvent(HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE), + bdaddrUtils::ToString(remotename->bdaddr), BluetoothError(remotename->status)); + printf("Sending reply ... %ld\n", request->SendReply(&reply)); reply.PrintToStream(); @@ -724,6 +725,16 @@ } +void +LocalDeviceImpl::HardwareError(struct hci_ev_hardware_error *event) +{ + + Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s: hardware code=%#x\n", + __FUNCTION__, event->hardware_code); + +} + + #if 0 #pragma mark - Request Methods - #endif Modified: haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h =================================================================== --- haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h 2009-07-02 15:33:06 UTC (rev 31375) +++ haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h 2009-07-02 20:07:26 UTC (rev 31376) @@ -56,6 +56,8 @@ void LinkKeyNotify(struct hci_ev_link_key_notify* event, BMessage* request, int32 index); void PageScanRepetitionModeChange(struct hci_ev_page_scan_rep_mode_change* event, BMessage* request, int32 index); void MaxSlotChange(struct hci_ev_max_slot_change *event, BMessage *request, int32 index); + + void HardwareError(struct hci_ev_hardware_error *event); }; From oruizdorantes at mail.berlios.de Thu Jul 2 22:43:04 2009 From: oruizdorantes at mail.berlios.de (oruizdorantes at BerliOS) Date: Thu, 2 Jul 2009 22:43:04 +0200 Subject: [Haiku-commits] r31377 - haiku/trunk/src/servers/bluetooth Message-ID: <200907022043.n62Kh4e6001670@sheep.berlios.de> Author: oruizdorantes Date: 2009-07-02 22:43:04 +0200 (Thu, 02 Jul 2009) New Revision: 31377 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31377&view=rev Modified: haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h Log: Some stars to left Modified: haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp =================================================================== --- haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp 2009-07-02 20:07:26 UTC (rev 31376) +++ haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.cpp 2009-07-02 20:43:04 UTC (rev 31377) @@ -690,7 +690,7 @@ void -LocalDeviceImpl::RoleChange(hci_ev_role_change *event, BMessage* request, int32 index) +LocalDeviceImpl::RoleChange(hci_ev_role_change* event, BMessage* request, int32 index) { Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s: Address %s role=%d status=%d\n", __FUNCTION__, bdaddrUtils::ToString(event->bdaddr), event->role, event->status); @@ -726,7 +726,7 @@ void -LocalDeviceImpl::HardwareError(struct hci_ev_hardware_error *event) +LocalDeviceImpl::HardwareError(struct hci_ev_hardware_error* event) { Output::Instance()->Postf(BLACKBOARD_LD(GetID()),"%s: hardware code=%#x\n", Modified: haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h =================================================================== --- haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h 2009-07-02 20:07:26 UTC (rev 31376) +++ haiku/trunk/src/servers/bluetooth/LocalDeviceImpl.h 2009-07-02 20:43:04 UTC (rev 31377) @@ -39,12 +39,12 @@ /* Events handling */ void CommandComplete(struct hci_ev_cmd_complete* event, BMessage* request, int32 index); void CommandStatus(struct hci_ev_cmd_status* event, BMessage* request, int32 index); - + // Inquiry void InquiryResult(uint8* numberOfResponses, BMessage* request); void InquiryComplete(uint8* status, BMessage* request); void RemoteNameRequestComplete(struct hci_ev_remote_name_request_complete_reply* remotename, BMessage* request); - + // Connection void ConnectionComplete(struct hci_ev_conn_complete* event, BMessage* request); void ConnectionRequest(struct hci_ev_conn_request* event, BMessage* request); @@ -55,10 +55,10 @@ void RoleChange(struct hci_ev_role_change* event, BMessage* request, int32 index); void LinkKeyNotify(struct hci_ev_link_key_notify* event, BMessage* request, int32 index); void PageScanRepetitionModeChange(struct hci_ev_page_scan_rep_mode_change* event, BMessage* request, int32 index); - void MaxSlotChange(struct hci_ev_max_slot_change *event, BMessage *request, int32 index); - - void HardwareError(struct hci_ev_hardware_error *event); + void MaxSlotChange(struct hci_ev_max_slot_change* event, BMessage* request, int32 index); + void HardwareError(struct hci_ev_hardware_error* event); + }; #endif From aldeck at mail.berlios.de Fri Jul 3 02:11:20 2009 From: aldeck at mail.berlios.de (aldeck at BerliOS) Date: Fri, 3 Jul 2009 02:11:20 +0200 Subject: [Haiku-commits] r31378 - haiku/trunk/src/kits/tracker Message-ID: <200907030011.n630BKPJ006012@sheep.berlios.de> Author: aldeck Date: 2009-07-03 02:11:19 +0200 (Fri, 03 Jul 2009) New Revision: 31378 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31378&view=rev Modified: haiku/trunk/src/kits/tracker/PoseView.cpp haiku/trunk/src/kits/tracker/TitleView.cpp Log: * In single window navigation mode, when navigating into a directory which had no viewstate yet (new folder) or if fViewState didn't change, fTitleView wouldn't be reset and updated to the new column set. (unfortunately the column state is managed separately from the rest of the view state). That would cause crashes for example when switching to a directory with fewer columns and triggering a redraw of a column that shouldn't be there anymore. Fixes #3710. * TitleView::Reset didn't invalidate the view and would leave the old columns there until a redraw was triggered externally. * Minor cleanup Modified: haiku/trunk/src/kits/tracker/PoseView.cpp =================================================================== --- haiku/trunk/src/kits/tracker/PoseView.cpp 2009-07-02 20:43:04 UTC (rev 31377) +++ haiku/trunk/src/kits/tracker/PoseView.cpp 2009-07-03 00:11:19 UTC (rev 31378) @@ -7662,10 +7662,10 @@ viewStateRestored = (fViewState != previousState); } + // Make sure fTitleView is rebuilt, as fColumnList might have changed + fTitleView->Reset(); + if (viewStateRestored) { - // Make sure the title view reset its items - fTitleView->Reset(); - if (ViewMode() == kListMode && oldMode != kListMode) { MoveBy(0, kTitleViewHeight + 1); @@ -7720,7 +7720,8 @@ if (ContainerWindow()->IsTrash()) AddTrashPoses(); - else AddPoses(TargetModel()); + else + AddPoses(TargetModel()); TargetModel()->CloseNode(); Invalidate(); Modified: haiku/trunk/src/kits/tracker/TitleView.cpp =================================================================== --- haiku/trunk/src/kits/tracker/TitleView.cpp 2009-07-02 20:43:04 UTC (rev 31377) +++ haiku/trunk/src/kits/tracker/TitleView.cpp 2009-07-03 00:11:19 UTC (rev 31378) @@ -153,6 +153,7 @@ break; fTitleList.AddItem(new BColumnTitle(this, column)); } + Invalidate(); } From stippi at mail.berlios.de Fri Jul 3 02:26:14 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Fri, 3 Jul 2009 02:26:14 +0200 Subject: [Haiku-commits] r31379 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: . libavformat Message-ID: <200907030026.n630QEHI008648@sheep.berlios.de> Author: stippi Date: 2009-07-03 02:26:11 +0200 (Fri, 03 Jul 2009) New Revision: 31379 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31379&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/config.h haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile Log: * It actually helps a lot to turn on all the demuxers if you want to use any. * The URLProtocol idea seems not to work out, so I removed that code, but the other idea of setting up a ByteIOContext actually works, once I seek back to the beginning of the stream after reading the initial probe buffer, we may also offset the buffer pointer in the ByteIOContext to where we have already read, but I am not sure of possible side effects of that. We can now probe for the correct demuxer and detect streams. Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-03 00:11:19 UTC (rev 31378) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-03 00:26:11 UTC (rev 31379) @@ -27,106 +27,15 @@ #define TRACE_AVFORMAT_READER #ifdef TRACE_AVFORMAT_READER # define TRACE printf +# define TRACE_IO(a...) #else # define TRACE(a...) +# define TRACE_IO(a...) #endif #define ERROR(a...) fprintf(stderr, a) - -// #pragma mark - BPositionIO protocol - - -static int -position_io_open(URLContext* h, const char* filename, int flags) -{ - TRACE("position_io_open(%s)\n", filename); - - // Strip the URL prefix - av_strstart(filename, "position_io:", &filename); - - void* pointer; - if (sscanf(filename, "%p", &pointer) != 1) { - TRACE("position_io_open(%s) - unable to scan BPositionIO pointer\n", - filename); - return AVERROR(ENOENT); - } - - // When the pointer was placed, it was a BDataIO*. Try to convert that - // into a BPositionIO. - // TODO: Later we may implement two different protocols, one which - // supports seeking (BPositionIO) and one that does not (BDataIO). - BDataIO* dataIO = reinterpret_cast(pointer); - BPositionIO* positionIO = dynamic_cast(dataIO); - if (positionIO == NULL) { - TRACE("position_io_open(%s) - unable to cast BDataIO pointer %p\n", - filename, dataIO); - return AVERROR(ENOENT); - } - - TRACE("position_io_open(%s) - success: BPositionIO: %p\n", - filename, positionIO); - - h->priv_data = reinterpret_cast(positionIO); - - return 0; -} - - -static int -position_io_read(URLContext* h, unsigned char* buffer, int size) -{ - TRACE("position_io_read(%d)\n", size); - - BPositionIO* source = reinterpret_cast(h->priv_data); - return source->Read(buffer, size); -} - - -static int -position_io_write(URLContext* h, unsigned char* buffer, int size) -{ - TRACE("position_io_write(%d)\n", size); - - BPositionIO* source = reinterpret_cast(h->priv_data); - return source->Write(buffer, size); -} - - -static int64_t -position_io_seek(URLContext* h, int64_t position, int whence) -{ - TRACE("position_io_seek(%lld, %d)\n", position, whence); - - BPositionIO* source = reinterpret_cast(h->priv_data); - return source->Seek(position, whence); -} - - -static int -position_io_close(URLContext* h) -{ - TRACE("position_io_close()\n"); - - // We do not close ourselves here. - return 0; -} - - -URLProtocol sPositionIOProtocol = { - "position_io", - position_io_open, - position_io_read, - position_io_write, - position_io_seek, - position_io_close -}; - - -// #pragma mark - AVFormatReader - - AVFormatReader::AVFormatReader() : fContext(NULL) @@ -159,28 +68,19 @@ { TRACE("AVFormatReader::Sniff\n"); -#if 0 - // Construct an URL string that allows us to get the Source() - // BPositionIO pointer and try to open the stream. - char urlString[64]; - snprintf(urlString, sizeof(urlString), "position_io:%p", (void*)Source()); - - if (av_open_input_file(&fContext, urlString, NULL, 0, NULL) < 0) { - TRACE("AVFormatReader::Sniff() - av_open_input_file(%s) failed!\n", - urlString); - return B_ERROR; - } - -#else size_t bufferSize = 64 * 1024; + size_t probeSize = 1024; uint8 buffer[bufferSize]; AVProbeData probeData; probeData.filename = ""; probeData.buf = buffer; - probeData.buf_size = bufferSize; + probeData.buf_size = probeSize; - // Read a bit of the input - _ReadPacket(Source(), buffer, bufferSize); + // Read a bit of the input... + if (_ReadPacket(Source(), buffer, probeSize) != (ssize_t)probeSize) + return B_IO_ERROR; + // ...and seek back to the beginning of the file. + _Seek(Source(), 0, SEEK_SET); // Probe the input format AVInputFormat* inputFormat = av_probe_input_format(&probeData, 1); @@ -202,18 +102,15 @@ return B_ERROR; } - AVFormatParameters params; - memset(¶ms, 0, sizeof(params)); + AVFormatParameters formatParameters; + memset(&formatParameters, 0, sizeof(formatParameters)); if (av_open_input_stream(&fContext, &ioContext, "", inputFormat, - ¶ms) < 0) { - TRACE("AVFormatReader::Sniff() - av_open_input_file() failed!\n"); + &formatParameters) < 0) { + TRACE("AVFormatReader::Sniff() - av_open_input_stream() failed!\n"); return B_ERROR; } -#endif - TRACE("AVFormatReader::Sniff() - av_open_input_file() success!\n"); - // Retrieve stream information if (av_find_stream_info(fContext) < 0) { TRACE("AVFormatReader::Sniff() - av_find_stream_info() failed!\n"); @@ -308,21 +205,21 @@ /*static*/ int AVFormatReader::_ReadPacket(void* cookie, uint8* buffer, int bufferSize) { - TRACE("AVFormatReader::_ReadPacket(%p, %p, %d)\n", cookie, buffer, + TRACE_IO("AVFormatReader::_ReadPacket(%p, %p, %d)\n", cookie, buffer, bufferSize); BDataIO* dataIO = reinterpret_cast(cookie); ssize_t read = dataIO->Read(buffer, bufferSize); - TRACE(" read: %ld\n", read); - return read; + TRACE_IO(" read: %ld\n", read); + return (int)read; } /*static*/ off_t AVFormatReader::_Seek(void* cookie, off_t offset, int whence) { - TRACE("AVFormatReader::_Seek(%p, %lld, %d)\n", cookie, offset, whence); + TRACE_IO("AVFormatReader::_Seek(%p, %lld, %d)\n", cookie, offset, whence); BDataIO* dataIO = reinterpret_cast(cookie); BPositionIO* positionIO = dynamic_cast(dataIO); @@ -331,9 +228,17 @@ return -1; } + // Support for special file size retrieval API without seeking anywhere: + if (whence == AVSEEK_SIZE) { + off_t size; + if (positionIO->GetSize(&size) == B_OK) + return size; + return -1; + } + off_t position = positionIO->Seek(offset, whence); - TRACE(" position: %lld\n", position); + TRACE_IO(" position: %lld\n", position); return position; } Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-03 00:11:19 UTC (rev 31378) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-03 00:26:11 UTC (rev 31379) @@ -42,7 +42,7 @@ media_header* mediaHeader); private: - static int _ReadPacket(void* cookie, + static int _ReadPacket(void* cookie, uint8* buffer, int bufferSize); static off_t _Seek(void* cookie, Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-03 00:11:19 UTC (rev 31378) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.cpp 2009-07-03 00:26:11 UTC (rev 31379) @@ -29,15 +29,6 @@ { av_register_all(); // This will also call av_codec_init() by registering codecs. - - extern URLProtocol sPositionIOProtocol; - av_register_protocol(&sPositionIOProtocol); - -// // Dump the supported protocols to stdout. -// URLProtocol* p = NULL; -// while ((p = av_protocol_next(p)) != NULL) { -// printf("supported protocol: %s\n", p->name); -// } } Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/config.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/config.h 2009-07-03 00:11:19 UTC (rev 31378) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/config.h 2009-07-03 00:26:11 UTC (rev 31379) @@ -514,126 +514,126 @@ #define CONFIG_NOISE_BSF 1 #define CONFIG_REMOVE_EXTRADATA_BSF 1 #define CONFIG_TEXT2MOVSUB_BSF 1 -#define CONFIG_AAC_DEMUXER 0 -#define CONFIG_AC3_DEMUXER 0 -#define CONFIG_AIFF_DEMUXER 0 -#define CONFIG_AMR_DEMUXER 0 -#define CONFIG_APC_DEMUXER 0 -#define CONFIG_APE_DEMUXER 0 -#define CONFIG_ASF_DEMUXER 0 -#define CONFIG_ASS_DEMUXER 0 -#define CONFIG_AU_DEMUXER 0 -#define CONFIG_AVI_DEMUXER 0 +#define CONFIG_AAC_DEMUXER 1 +#define CONFIG_AC3_DEMUXER 1 +#define CONFIG_AIFF_DEMUXER 1 +#define CONFIG_AMR_DEMUXER 1 +#define CONFIG_APC_DEMUXER 1 +#define CONFIG_APE_DEMUXER 1 +#define CONFIG_ASF_DEMUXER 1 +#define CONFIG_ASS_DEMUXER 1 +#define CONFIG_AU_DEMUXER 1 +#define CONFIG_AVI_DEMUXER 1 #define CONFIG_AVISYNTH_DEMUXER 0 -#define CONFIG_AVS_DEMUXER 0 -#define CONFIG_BETHSOFTVID_DEMUXER 0 -#define CONFIG_BFI_DEMUXER 0 -#define CONFIG_C93_DEMUXER 0 -#define CONFIG_CAVSVIDEO_DEMUXER 0 -#define CONFIG_DAUD_DEMUXER 0 -#define CONFIG_DIRAC_DEMUXER 0 -#define CONFIG_DNXHD_DEMUXER 0 -#define CONFIG_DSICIN_DEMUXER 0 -#define CONFIG_DTS_DEMUXER 0 -#define CONFIG_DV_DEMUXER 0 -#define CONFIG_DXA_DEMUXER 0 -#define CONFIG_EA_DEMUXER 0 -#define CONFIG_EA_CDATA_DEMUXER 0 -#define CONFIG_EAC3_DEMUXER 0 -#define CONFIG_FFM_DEMUXER 0 -#define CONFIG_FLAC_DEMUXER 0 -#define CONFIG_FLIC_DEMUXER 0 -#define CONFIG_FLV_DEMUXER 0 -#define CONFIG_FOURXM_DEMUXER 0 -#define CONFIG_GSM_DEMUXER 0 -#define CONFIG_GXF_DEMUXER 0 -#define CONFIG_H261_DEMUXER 0 -#define CONFIG_H263_DEMUXER 0 -#define CONFIG_H264_DEMUXER 0 -#define CONFIG_IDCIN_DEMUXER 0 -#define CONFIG_IFF_DEMUXER 0 -#define CONFIG_IMAGE2_DEMUXER 0 -#define CONFIG_IMAGE2PIPE_DEMUXER 0 -#define CONFIG_INGENIENT_DEMUXER 0 -#define CONFIG_IPMOVIE_DEMUXER 0 -#define CONFIG_ISS_DEMUXER 0 +#define CONFIG_AVS_DEMUXER 1 +#define CONFIG_BETHSOFTVID_DEMUXER 1 +#define CONFIG_BFI_DEMUXER 1 +#define CONFIG_C93_DEMUXER 1 +#define CONFIG_CAVSVIDEO_DEMUXER 1 +#define CONFIG_DAUD_DEMUXER 1 +#define CONFIG_DIRAC_DEMUXER 1 +#define CONFIG_DNXHD_DEMUXER 1 +#define CONFIG_DSICIN_DEMUXER 1 +#define CONFIG_DTS_DEMUXER 1 +#define CONFIG_DV_DEMUXER 1 +#define CONFIG_DXA_DEMUXER 1 +#define CONFIG_EA_DEMUXER 1 +#define CONFIG_EA_CDATA_DEMUXER 1 +#define CONFIG_EAC3_DEMUXER 1 +#define CONFIG_FFM_DEMUXER 1 +#define CONFIG_FLAC_DEMUXER 1 +#define CONFIG_FLIC_DEMUXER 1 +#define CONFIG_FLV_DEMUXER 1 +#define CONFIG_FOURXM_DEMUXER 1 +#define CONFIG_GSM_DEMUXER 1 +#define CONFIG_GXF_DEMUXER 1 +#define CONFIG_H261_DEMUXER 1 +#define CONFIG_H263_DEMUXER 1 +#define CONFIG_H264_DEMUXER 1 +#define CONFIG_IDCIN_DEMUXER 1 +#define CONFIG_IFF_DEMUXER 1 +#define CONFIG_IMAGE2_DEMUXER 1 +#define CONFIG_IMAGE2PIPE_DEMUXER 1 +#define CONFIG_INGENIENT_DEMUXER 1 +#define CONFIG_IPMOVIE_DEMUXER 1 +#define CONFIG_ISS_DEMUXER 1 #define CONFIG_LMLM4_DEMUXER 0 -#define CONFIG_M4V_DEMUXER 0 -#define CONFIG_MATROSKA_DEMUXER 0 -#define CONFIG_MJPEG_DEMUXER 0 -#define CONFIG_MLP_DEMUXER 0 -#define CONFIG_MM_DEMUXER 0 -#define CONFIG_MMF_DEMUXER 0 -#define CONFIG_MOV_DEMUXER 0 -#define CONFIG_MP3_DEMUXER 0 -#define CONFIG_MPC_DEMUXER 0 -#define CONFIG_MPC8_DEMUXER 0 -#define CONFIG_MPEGPS_DEMUXER 0 -#define CONFIG_MPEGTS_DEMUXER 0 -#define CONFIG_MPEGTSRAW_DEMUXER 0 -#define CONFIG_MPEGVIDEO_DEMUXER 0 -#define CONFIG_MSNWC_TCP_DEMUXER 0 -#define CONFIG_MTV_DEMUXER 0 -#define CONFIG_MVI_DEMUXER 0 -#define CONFIG_MXF_DEMUXER 0 -#define CONFIG_NC_DEMUXER 0 -#define CONFIG_NSV_DEMUXER 0 +#define CONFIG_M4V_DEMUXER 1 +#define CONFIG_MATROSKA_DEMUXER 1 +#define CONFIG_MJPEG_DEMUXER 1 +#define CONFIG_MLP_DEMUXER 1 +#define CONFIG_MM_DEMUXER 1 +#define CONFIG_MMF_DEMUXER 1 +#define CONFIG_MOV_DEMUXER 1 +#define CONFIG_MP3_DEMUXER 1 +#define CONFIG_MPC_DEMUXER 1 +#define CONFIG_MPC8_DEMUXER 1 +#define CONFIG_MPEGPS_DEMUXER 1 +#define CONFIG_MPEGTS_DEMUXER 1 +#define CONFIG_MPEGTSRAW_DEMUXER 1 +#define CONFIG_MPEGVIDEO_DEMUXER 1 +#define CONFIG_MSNWC_TCP_DEMUXER 1 +#define CONFIG_MTV_DEMUXER 1 +#define CONFIG_MVI_DEMUXER 1 +#define CONFIG_MXF_DEMUXER 1 +#define CONFIG_NC_DEMUXER 1 +#define CONFIG_NSV_DEMUXER 1 #define CONFIG_NUT_DEMUXER 0 -#define CONFIG_NUV_DEMUXER 0 -#define CONFIG_OGG_DEMUXER 0 -#define CONFIG_OMA_DEMUXER 0 -#define CONFIG_PCM_ALAW_DEMUXER 0 -#define CONFIG_PCM_MULAW_DEMUXER 0 -#define CONFIG_PCM_F64BE_DEMUXER 0 -#define CONFIG_PCM_F64LE_DEMUXER 0 -#define CONFIG_PCM_F32BE_DEMUXER 0 -#define CONFIG_PCM_F32LE_DEMUXER 0 -#define CONFIG_PCM_S32BE_DEMUXER 0 -#define CONFIG_PCM_S32LE_DEMUXER 0 -#define CONFIG_PCM_S24BE_DEMUXER 0 -#define CONFIG_PCM_S24LE_DEMUXER 0 -#define CONFIG_PCM_S16BE_DEMUXER 0 -#define CONFIG_PCM_S16LE_DEMUXER 0 -#define CONFIG_PCM_S8_DEMUXER 0 -#define CONFIG_PCM_U32BE_DEMUXER 0 -#define CONFIG_PCM_U32LE_DEMUXER 0 -#define CONFIG_PCM_U24BE_DEMUXER 0 -#define CONFIG_PCM_U24LE_DEMUXER 0 -#define CONFIG_PCM_U16BE_DEMUXER 0 -#define CONFIG_PCM_U16LE_DEMUXER 0 -#define CONFIG_PCM_U8_DEMUXER 0 -#define CONFIG_PVA_DEMUXER 0 -#define CONFIG_R3D_DEMUXER 0 -#define CONFIG_RAWVIDEO_DEMUXER 0 +#define CONFIG_NUV_DEMUXER 1 +#define CONFIG_OGG_DEMUXER 1 +#define CONFIG_OMA_DEMUXER 1 +#define CONFIG_PCM_ALAW_DEMUXER 1 +#define CONFIG_PCM_MULAW_DEMUXER 1 +#define CONFIG_PCM_F64BE_DEMUXER 1 +#define CONFIG_PCM_F64LE_DEMUXER 1 +#define CONFIG_PCM_F32BE_DEMUXER 1 +#define CONFIG_PCM_F32LE_DEMUXER 1 +#define CONFIG_PCM_S32BE_DEMUXER 1 +#define CONFIG_PCM_S32LE_DEMUXER 1 +#define CONFIG_PCM_S24BE_DEMUXER 1 +#define CONFIG_PCM_S24LE_DEMUXER 1 +#define CONFIG_PCM_S16BE_DEMUXER 1 +#define CONFIG_PCM_S16LE_DEMUXER 1 +#define CONFIG_PCM_S8_DEMUXER 1 +#define CONFIG_PCM_U32BE_DEMUXER 1 +#define CONFIG_PCM_U32LE_DEMUXER 1 +#define CONFIG_PCM_U24BE_DEMUXER 1 +#define CONFIG_PCM_U24LE_DEMUXER 1 +#define CONFIG_PCM_U16BE_DEMUXER 1 +#define CONFIG_PCM_U16LE_DEMUXER 1 +#define CONFIG_PCM_U8_DEMUXER 1 +#define CONFIG_PVA_DEMUXER 1 +#define CONFIG_R3D_DEMUXER 1 +#define CONFIG_RAWVIDEO_DEMUXER 1 #define CONFIG_REDIR_DEMUXER 0 -#define CONFIG_RL2_DEMUXER 0 -#define CONFIG_RM_DEMUXER 0 -#define CONFIG_ROQ_DEMUXER 0 -#define CONFIG_RPL_DEMUXER 0 +#define CONFIG_RL2_DEMUXER 1 +#define CONFIG_RM_DEMUXER 1 +#define CONFIG_ROQ_DEMUXER 1 +#define CONFIG_RPL_DEMUXER 1 #define CONFIG_RTSP_DEMUXER 0 #define CONFIG_SDP_DEMUXER 0 -#define CONFIG_SEGAFILM_DEMUXER 0 -#define CONFIG_SHORTEN_DEMUXER 0 -#define CONFIG_SIFF_DEMUXER 0 -#define CONFIG_SMACKER_DEMUXER 0 -#define CONFIG_SOL_DEMUXER 0 -#define CONFIG_STR_DEMUXER 0 -#define CONFIG_SWF_DEMUXER 0 -#define CONFIG_THP_DEMUXER 0 -#define CONFIG_TIERTEXSEQ_DEMUXER 0 -#define CONFIG_TTA_DEMUXER 0 -#define CONFIG_TXD_DEMUXER 0 -#define CONFIG_VC1_DEMUXER 0 -#define CONFIG_VC1T_DEMUXER 0 -#define CONFIG_VMD_DEMUXER 0 -#define CONFIG_VOC_DEMUXER 0 -#define CONFIG_WAV_DEMUXER 0 -#define CONFIG_WC3_DEMUXER 0 -#define CONFIG_WSAUD_DEMUXER 0 -#define CONFIG_WSVQA_DEMUXER 0 -#define CONFIG_WV_DEMUXER 0 -#define CONFIG_XA_DEMUXER 0 -#define CONFIG_YUV4MPEGPIPE_DEMUXER 0 +#define CONFIG_SEGAFILM_DEMUXER 1 +#define CONFIG_SHORTEN_DEMUXER 1 +#define CONFIG_SIFF_DEMUXER 1 +#define CONFIG_SMACKER_DEMUXER 1 +#define CONFIG_SOL_DEMUXER 1 +#define CONFIG_STR_DEMUXER 1 +#define CONFIG_SWF_DEMUXER 1 +#define CONFIG_THP_DEMUXER 1 +#define CONFIG_TIERTEXSEQ_DEMUXER 1 +#define CONFIG_TTA_DEMUXER 1 +#define CONFIG_TXD_DEMUXER 1 +#define CONFIG_VC1_DEMUXER 1 +#define CONFIG_VC1T_DEMUXER 1 +#define CONFIG_VMD_DEMUXER 1 +#define CONFIG_VOC_DEMUXER 1 +#define CONFIG_WAV_DEMUXER 1 +#define CONFIG_WC3_DEMUXER 1 +#define CONFIG_WSAUD_DEMUXER 1 +#define CONFIG_WSVQA_DEMUXER 1 +#define CONFIG_WV_DEMUXER 1 +#define CONFIG_XA_DEMUXER 1 +#define CONFIG_YUV4MPEGPIPE_DEMUXER 1 #define CONFIG_LIBNUT_DEMUXER 0 #define CONFIG_AC3_MUXER 0 #define CONFIG_ADTS_MUXER 0 Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile 2009-07-03 00:11:19 UTC (rev 31378) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile 2009-07-03 00:26:11 UTC (rev 31379) @@ -161,8 +161,8 @@ rtpenc.c rtpenc_h264.c # rtpproto.c # (I/O protocol) - rtsp.c - sdp.c +# rtsp.c +# sdp.c segafilm.c sierravmd.c siff.c From bonefish at mail.berlios.de Fri Jul 3 02:33:37 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 02:33:37 +0200 Subject: [Haiku-commits] r31380 - haiku/trunk/src/apps/debugger/gui/team_window Message-ID: <200907030033.n630XbDB009060@sheep.berlios.de> Author: bonefish Date: 2009-07-03 02:33:36 +0200 (Fri, 03 Jul 2009) New Revision: 31380 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31380&view=rev Modified: haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp Log: Scroll to the active function, when selected manually. Modified: haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp 2009-07-03 00:26:11 UTC (rev 31379) +++ haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp 2009-07-03 00:33:36 UTC (rev 31380) @@ -527,6 +527,14 @@ fActiveSourceCode->AddReference(); fSourceView->SetSourceCode(fActiveSourceCode); + + // Scroll to the active function, if it doesn't match the stack frame (i.e. + // has been selected manually). + if (fActiveFunction != NULL && fActiveSourceCode != NULL + && (fActiveStackFrame == NULL + || fActiveStackFrame->Function() != fActiveFunction)) { + fSourceView->ScrollToAddress(fActiveFunction->Address()); + } } From bonefish at mail.berlios.de Fri Jul 3 02:34:48 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 02:34:48 +0200 Subject: [Haiku-commits] r31381 - haiku/trunk/src/apps/debugger/gui/team_window Message-ID: <200907030034.n630YmmR009344@sheep.berlios.de> Author: bonefish Date: 2009-07-03 02:34:48 +0200 (Fri, 03 Jul 2009) New Revision: 31381 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31381&view=rev Modified: haiku/trunk/src/apps/debugger/gui/team_window/SourceView.cpp Log: Display tabs correctly (hardcoded as 4 spaces ATM). Modified: haiku/trunk/src/apps/debugger/gui/team_window/SourceView.cpp =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/SourceView.cpp 2009-07-03 00:33:36 UTC (rev 31380) +++ haiku/trunk/src/apps/debugger/gui/team_window/SourceView.cpp 2009-07-03 00:34:48 UTC (rev 31381) @@ -28,6 +28,8 @@ static const int32 kLeftTextMargin = 3; static const float kMinViewHeight = 80.0f; +static const int32 kSpacesPerTab = 4; + // TODO: Should be settable! class SourceView::BaseView : public BView { @@ -204,6 +206,8 @@ private: float _MaxLineWidth(); + void _FormatLine(const char* line, + BString& formattedLine); private: float fMaxLineWidth; @@ -811,7 +815,9 @@ for (int32 i = minLine; i <= maxLine; i++) { float y = (float)(i + 1) * fFontInfo->lineHeight - fFontInfo->fontHeight.descent; - DrawString(fSourceCode->LineAt(i), BPoint(kLeftTextMargin, y)); + BString lineString; + _FormatLine(fSourceCode->LineAt(i), lineString); + DrawString(lineString, BPoint(kLeftTextMargin, y)); } } @@ -834,6 +840,24 @@ } +void +SourceView::TextView::_FormatLine(const char* line, BString& formattedLine) +{ + int32 column = 0; + for (; *line != '\0'; line++) { + // TODO: That's probably not very efficient! + if (*line == '\t') { + int32 nextTabStop = (column / kSpacesPerTab + 1) * kSpacesPerTab; + for (; column < nextTabStop; column++) + formattedLine << ' '; + } else { + formattedLine << *line; + column++; + } + } +} + + // #pragma mark - SourceView From bonefish at mail.berlios.de Fri Jul 3 02:56:42 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 02:56:42 +0200 Subject: [Haiku-commits] r31382 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files gui/team_window model Message-ID: <200907030056.n630uge9012376@sheep.berlios.de> Author: bonefish Date: 2009-07-03 02:56:39 +0200 (Fri, 03 Jul 2009) New Revision: 31382 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31382&view=rev Added: haiku/trunk/src/apps/debugger/dwarf/LineNumberProgram.cpp haiku/trunk/src/apps/debugger/dwarf/LineNumberProgram.h haiku/trunk/src/apps/debugger/files/SourceFile.cpp haiku/trunk/src/apps/debugger/files/SourceFile.h haiku/trunk/src/apps/debugger/model/FileSourceCode.cpp haiku/trunk/src/apps/debugger/model/FileSourceCode.h Modified: haiku/trunk/src/apps/debugger/Jamfile haiku/trunk/src/apps/debugger/TeamDebugger.cpp haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/FunctionDebugInfo.h haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h haiku/trunk/src/apps/debugger/dwarf/CompilationUnit.h haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp haiku/trunk/src/apps/debugger/dwarf/Jamfile haiku/trunk/src/apps/debugger/files/FileManager.cpp haiku/trunk/src/apps/debugger/files/FileManager.h haiku/trunk/src/apps/debugger/files/LocatableEntry.cpp haiku/trunk/src/apps/debugger/files/LocatableEntry.h haiku/trunk/src/apps/debugger/gui/team_window/ImageFunctionsView.cpp Log: * DWARF: - DwarfUtils::GetDeclarationLocation(): Line/column numbers are one-based. - Added line number program interpretation (LineNumberProgram). * FunctionDebugInfo: Return the source file (LocatableFile) instead of the file name. * FileManager/LocatableEntry: Fixed handling when a LocatableEntry is unreferenced. There was a race condition before, since an unreferenced entry could be referenced and unreferenced again before removing it from the hash table, which could lead to double deletion. Now we never reuse an unreferenced entry and just remove it from the hash table when encountering one. * FileManager/SourceFile: Added class SourceFile which loads a source file from disk and slices it into lines. Managed by FileManager. * Added class FileSourceCode, a SourceCode implementation using a SourceFile as line provider. The statement management works pretty much exactly as in DissassembledCode. * DwarfImageDebugInfo: Implemented LoadSourceCode for real. It creates a FileSourceCode and uses the DWARF line number information for the statement information. This basically gets the source level view going, though there are still several problems -- stepping doesn't work perfectly yet, the source isn't found for all functions, there's no handling of duplicate functions (no idea why gcc generates them in the first place), etc. Modified: haiku/trunk/src/apps/debugger/Jamfile =================================================================== --- haiku/trunk/src/apps/debugger/Jamfile 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/Jamfile 2009-07-03 00:56:39 UTC (rev 31382) @@ -75,6 +75,7 @@ LocatableDirectory.cpp LocatableEntry.cpp LocatableFile.cpp + SourceFile.cpp # gui/team_window ImageFunctionsView.cpp @@ -88,6 +89,7 @@ # model Breakpoint.cpp DisassembledCode.cpp + FileSourceCode.cpp Image.cpp ImageInfo.cpp SourceCode.cpp Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp =================================================================== --- haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -208,7 +208,8 @@ // create team debug info TeamDebugInfo* teamDebugInfo = new(std::nothrow) TeamDebugInfo( - fDebuggerInterface, fDebuggerInterface->GetArchitecture()); + fDebuggerInterface, fDebuggerInterface->GetArchitecture(), + fFileManager); if (teamDebugInfo == NULL) return B_NO_MEMORY; Reference teamDebugInfoReference(teamDebugInfo); Modified: haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -63,8 +63,8 @@ } -const char* -BasicFunctionDebugInfo::SourceFileName() const +LocatableFile* +BasicFunctionDebugInfo::SourceFile() const { return NULL; } Modified: haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -26,7 +26,7 @@ virtual const char* Name() const; virtual const char* PrettyName() const; - virtual const char* SourceFileName() const; + virtual LocatableFile* SourceFile() const; virtual SourceLocation SourceStartLocation() const; virtual SourceLocation SourceEndLocation() const; Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -7,29 +7,38 @@ #include "DebugInfoEntries.h" #include "DwarfImageDebugInfo.h" +#include "LocatableFile.h" #include "TargetAddressRangeList.h" DwarfFunctionDebugInfo::DwarfFunctionDebugInfo( - DwarfImageDebugInfo* imageDebugInfo, DIESubprogram* subprogramEntry, - TargetAddressRangeList* addressRanges, const BString& name, - const BString& sourceFile, const SourceLocation& sourceLocation) + DwarfImageDebugInfo* imageDebugInfo, CompilationUnit* compilationUnit, + DIESubprogram* subprogramEntry, TargetAddressRangeList* addressRanges, + const BString& name, LocatableFile* sourceFile, + const SourceLocation& sourceLocation) : fImageDebugInfo(imageDebugInfo), + fCompilationUnit(compilationUnit), fAddressRanges(addressRanges), fName(name), fSourceFile(sourceFile), fSourceLocation(sourceLocation) { - fImageDebugInfo->AddReference(); - fAddressRanges->AddReference(); + fImageDebugInfo->AcquireReference(); + fAddressRanges->AcquireReference(); + + if (fSourceFile != NULL) + fSourceFile->AcquireReference(); } DwarfFunctionDebugInfo::~DwarfFunctionDebugInfo() { - fAddressRanges->RemoveReference(); - fImageDebugInfo->RemoveReference(); + if (fSourceFile != NULL) + fSourceFile->ReleaseReference(); + + fAddressRanges->ReleaseReference(); + fImageDebugInfo->ReleaseReference(); } @@ -68,10 +77,10 @@ } -const char* -DwarfFunctionDebugInfo::SourceFileName() const +LocatableFile* +DwarfFunctionDebugInfo::SourceFile() const { - return fSourceFile.Length() > 0 ? fSourceFile.String() : NULL; + return fSourceFile; } Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -11,6 +11,7 @@ #include "SourceLocation.h" +class CompilationUnit; class DIESubprogram; class DwarfImageDebugInfo; class TargetAddressRangeList; @@ -20,10 +21,11 @@ public: DwarfFunctionDebugInfo( DwarfImageDebugInfo* imageDebugInfo, + CompilationUnit* compilationUnit, DIESubprogram* subprogramEntry, TargetAddressRangeList* addressRanges, const BString& name, - const BString& sourceFile, + LocatableFile* sourceFile, const SourceLocation& sourceLocation); virtual ~DwarfFunctionDebugInfo(); @@ -33,15 +35,19 @@ virtual const char* Name() const; virtual const char* PrettyName() const; - virtual const char* SourceFileName() const; + virtual LocatableFile* SourceFile() const; virtual SourceLocation SourceStartLocation() const; virtual SourceLocation SourceEndLocation() const; + CompilationUnit* GetCompilationUnit() const + { return fCompilationUnit; } + private: DwarfImageDebugInfo* fImageDebugInfo; + CompilationUnit* fCompilationUnit; TargetAddressRangeList* fAddressRanges; BString fName; - BString fSourceFile; + LocatableFile* fSourceFile; SourceLocation fSourceLocation; }; Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -11,6 +11,7 @@ #include #include +#include #include "Architecture.h" #include "CompilationUnit.h" @@ -20,28 +21,136 @@ #include "DwarfFunctionDebugInfo.h" #include "DwarfUtils.h" #include "ElfFile.h" +#include "FileManager.h" +#include "FileSourceCode.h" +#include "LocatableFile.h" +#include "SourceFile.h" +#include "Statement.h" +#include "StringUtils.h" +// #pragma mark - SourceCodeEntry + + +struct DwarfImageDebugInfo::SourceCodeKey { + CompilationUnit* unit; + BString filePath; + + SourceCodeKey(CompilationUnit* unit, const BString& filePath) + : + unit(unit), + filePath(filePath) + { + } + + SourceCodeKey(CompilationUnit* unit, LocatableFile* file) + : + unit(unit) + { + file->GetLocatedPath(filePath); + } + + uint32 HashValue() const + { + return (uint32)(addr_t)unit ^ StringUtils::HashValue(filePath); + } + + bool operator==(const SourceCodeKey& other) const + { + return unit == other.unit && filePath == other.filePath; + } +}; + + +struct DwarfImageDebugInfo::SourceCodeEntry : SourceCodeKey, + HashTableLink { + FileSourceCode* sourceCode; + + SourceCodeEntry(CompilationUnit* unit, LocatableFile* file, + FileSourceCode* sourceCode) + : + SourceCodeKey(unit, file), + sourceCode(sourceCode) + { + } +}; + + +// #pragma mark - SourceCodeHashDefinition + + +struct DwarfImageDebugInfo::SourceCodeHashDefinition { + typedef SourceCodeKey KeyType; + typedef SourceCodeEntry ValueType; + + size_t HashKey(const SourceCodeKey& key) const + { + return key.HashValue(); + } + + size_t Hash(const SourceCodeEntry* value) const + { + return value->HashValue(); + } + + bool Compare(const SourceCodeKey& key, const SourceCodeEntry* value) const + { + return key == *value; + } + + HashTableLink* GetLink(SourceCodeEntry* value) const + { + return value; + } +}; + + +// #pragma mark - DwarfImageDebugInfo + + DwarfImageDebugInfo::DwarfImageDebugInfo(const ImageInfo& imageInfo, - Architecture* architecture, DwarfFile* file) + Architecture* architecture, FileManager* fileManager, DwarfFile* file) : + fLock("dwarf image debug info"), fImageInfo(imageInfo), fArchitecture(architecture), + fFileManager(fileManager), fFile(file), fTextSegment(NULL), - fRelocationDelta(0) + fRelocationDelta(0), + fSourceCodes(NULL) { } DwarfImageDebugInfo::~DwarfImageDebugInfo() { + SourceCodeEntry* entry = fSourceCodes->Clear(true); + while (entry != NULL) { + SourceCodeEntry* next = entry->fNext; + entry->sourceCode->ReleaseReference(); + entry = next; + } + + delete fSourceCodes; } status_t DwarfImageDebugInfo::Init() { + status_t error = fLock.InitCheck(); + if (error != B_OK) + return error; + + fSourceCodes = new (std::nothrow) SourceCodeTable; + if (fSourceCodes == NULL) + return B_NO_MEMORY; + + error = fSourceCodes->Init(); + if (error != B_OK) + return error; + fTextSegment = fFile->GetElfFile()->TextSegment(); if (fTextSegment == NULL) return B_ENTRY_NOT_FOUND; @@ -118,27 +227,24 @@ } // get the source location - const char* directory = NULL; - const char* file = NULL; - uint32 line = 0; - uint32 column = 0; + const char* directoryPath = NULL; + const char* fileName = NULL; + uint32 line = -1; + uint32 column = -1; DwarfUtils::GetDeclarationLocation(fFile, subprogramEntry, - directory, file, line, column); - BString fileName; - if (file != NULL) { - if (directory != NULL) - fileName << directory << '/' << file; - else - fileName << file; + directoryPath, fileName, line, column); + + LocatableFile* file = NULL; + if (fileName != NULL) { + file = fFileManager->GetSourceFile(directoryPath, + fileName); } - // TODO: Avoid unnessecary string allocation! The source file name - // is the same for all contained functions, so they could share the - // string. + Reference fileReference(file, true); // create and add the functions DwarfFunctionDebugInfo* function - = new(std::nothrow) DwarfFunctionDebugInfo(this, - subprogramEntry, rangeList, name, fileName, + = new(std::nothrow) DwarfFunctionDebugInfo(this, unit, + subprogramEntry, rangeList, name, file, SourceLocation(line, column)); if (function == NULL || !functions.AddItem(function)) { delete function; @@ -185,8 +291,15 @@ DwarfImageDebugInfo::LoadSourceCode(FunctionDebugInfo* function, SourceCode*& _sourceCode) { + AutoLocker locker(fLock); + // TODO: Load the actual source code! + status_t error = _LoadSourceCode(function, _sourceCode); + if (error == B_OK) + return B_OK; + // fall back to disassembling + static const target_size_t kMaxBufferSize = 64 * 1024; target_size_t bufferSize = std::min(function->Size(), kMaxBufferSize); void* buffer = malloc(bufferSize); @@ -214,3 +327,140 @@ // TODO:... return fArchitecture->GetStatement(function, address, _statement); } + + +status_t +DwarfImageDebugInfo::_LoadSourceCode(FunctionDebugInfo* _function, + SourceCode*& _sourceCode) +{ + DwarfFunctionDebugInfo* function + = dynamic_cast(_function); + if (function == NULL) + return B_BAD_VALUE; + + // get the source file + LocatableFile* file = function->SourceFile(); + if (file == NULL) + return B_ENTRY_NOT_FOUND; + + // maybe it's already loaded + CompilationUnit* unit = function->GetCompilationUnit(); + FileSourceCode* sourceCode = _LookupSourceCode(unit, file); + if (sourceCode) { + sourceCode->AcquireReference(); + _sourceCode = sourceCode; + return B_OK; + } + + // get the index of the source file in the compilation unit for cheaper + // comparison below + const char* directory; + int32 fileIndex = -1; + for (int32 i = 0; const char* fileName = unit->FileAt(i, &directory); i++) { + LocatableFile* file = fFileManager->GetSourceFile(directory, fileName); + if (file != NULL) { + file->ReleaseReference(); + if (file == function->SourceFile()) { + fileIndex = i + 1; + // indices are one-based + break; + } + } + } +printf("DwarfImageDebugInfo::_LoadSourceCode(), file: %ld, function at: %#llx\n", fileIndex, function->Address()); + +for (int32 i = 0; const char* fileName = unit->FileAt(i, &directory); i++) { +printf(" file %ld: %s\n", i, fileName); +} + + + // not loaded yet -- get the source file + SourceFile* sourceFile; + status_t error = fFileManager->LoadSourceFile(file, sourceFile); + if (error != B_OK) + return error; + + // create the source code + sourceCode = new(std::nothrow) FileSourceCode(sourceFile); + sourceFile->ReleaseReference(); + if (sourceCode == NULL) + return B_NO_MEMORY; + + error = sourceCode->Init(); + if (error != B_OK) + return error; + ObjectDeleter sourceCodeDeleter(sourceCode); + + // Get the statements by executing the line number program for the + // compilation unit and filtering the rows for our source file. + LineNumberProgram& program = unit->GetLineNumberProgram(); + if (!program.IsValid()) + return B_BAD_DATA; + + LineNumberProgram::State state; + program.GetInitialState(state); + + target_addr_t statementAddress = 0; + int32 statementLine = -1; + int32 statementColumn = -1; + while (program.GetNextRow(state)) { +printf(" %#lx (%ld, %ld, %ld) %d\n", state.address, state.file, state.line, state.column, state.isStatement); + bool isOurFile = state.file == fileIndex; + + if (statementAddress != 0 + && (!isOurFile || state.isStatement || state.isSequenceEnd)) { + target_addr_t endAddress = state.address; + if (endAddress > statementAddress) { + // add the statement + ContiguousStatement* statement = new(std::nothrow) + ContiguousStatement( + SourceLocation(statementLine, statementColumn), + SourceLocation(statementLine, statementColumn), + TargetAddressRange(fRelocationDelta + statementAddress, + endAddress - statementAddress), true); + if (statement == NULL) + return B_NO_MEMORY; + + error = sourceCode->AddStatement(statement); + if (error != B_OK) { + delete statement; + return error; + } +printf(" -> statement: %#llx - %#llx, line: %ld\n", statement->AddressRange().Start(), +statement->AddressRange().End(), statementLine); + } + + statementAddress = 0; + } + + // skip statements of other files + if (!isOurFile) + continue; + + if (state.isStatement) { + statementAddress = state.address; + statementLine = state.line - 1; + statementColumn = state.column - 1; + } + } + + SourceCodeEntry* entry = new(std::nothrow) SourceCodeEntry(unit, file, + sourceCode); + if (entry == NULL) + return B_NO_MEMORY; + + fSourceCodes->Insert(entry); + + _sourceCode = sourceCodeDeleter.Detach(); + _sourceCode->AcquireReference(); + return B_OK; +} + + +FileSourceCode* +DwarfImageDebugInfo::_LookupSourceCode(CompilationUnit* unit, + LocatableFile* file) +{ + SourceCodeEntry* entry = fSourceCodes->Lookup(SourceCodeKey(unit, file)); + return entry != NULL ? entry->sourceCode : NULL; +} Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -5,20 +5,29 @@ #ifndef DWARF_IMAGE_DEBUG_INFO_H #define DWARF_IMAGE_DEBUG_INFO_H +#include + +#include + #include "ImageInfo.h" #include "SpecificImageDebugInfo.h" class Architecture; +class CompilationUnit; class DwarfFile; class ElfSegment; +class FileManager; +class FileSourceCode; +class LocatableFile; +class SourceCode; class DwarfImageDebugInfo : public SpecificImageDebugInfo { public: DwarfImageDebugInfo(const ImageInfo& imageInfo, Architecture* architecture, - DwarfFile* file); + FileManager* fileManager, DwarfFile* file); virtual ~DwarfImageDebugInfo(); status_t Init(); @@ -40,11 +49,27 @@ Statement*& _statement); private: + struct SourceCodeKey; + struct SourceCodeEntry; + struct SourceCodeHashDefinition; + + typedef OpenHashTable SourceCodeTable; + +private: + status_t _LoadSourceCode(FunctionDebugInfo* function, + SourceCode*& _sourceCode); + FileSourceCode* _LookupSourceCode(CompilationUnit* unit, + LocatableFile* file); + +private: + BLocker fLock; ImageInfo fImageInfo; Architecture* fArchitecture; + FileManager* fFileManager; DwarfFile* fFile; ElfSegment* fTextSegment; target_addr_t fRelocationDelta; + SourceCodeTable* fSourceCodes; }; Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -14,9 +14,11 @@ #include "LocatableFile.h" -DwarfTeamDebugInfo::DwarfTeamDebugInfo(Architecture* architecture) +DwarfTeamDebugInfo::DwarfTeamDebugInfo(Architecture* architecture, + FileManager* fileManager) : fArchitecture(architecture), + fFileManager(fileManager), fManager(NULL) { } @@ -62,7 +64,7 @@ // create the image debug info DwarfImageDebugInfo* debuggerInfo = new(std::nothrow) DwarfImageDebugInfo( - imageInfo, fArchitecture, file); + imageInfo, fArchitecture, fFileManager, file); if (debuggerInfo == NULL) return B_NO_MEMORY; Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -10,12 +10,14 @@ class Architecture; class DwarfManager; +class FileManager; class ImageInfo; class DwarfTeamDebugInfo : public SpecificTeamDebugInfo { public: - DwarfTeamDebugInfo(Architecture* architecture); + DwarfTeamDebugInfo(Architecture* architecture, + FileManager* fileManager); virtual ~DwarfTeamDebugInfo(); status_t Init(); @@ -26,6 +28,7 @@ private: Architecture* fArchitecture; + FileManager* fFileManager; DwarfManager* fManager; }; Modified: haiku/trunk/src/apps/debugger/debug_info/FunctionDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/FunctionDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/FunctionDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -20,6 +20,7 @@ }; +class LocatableFile; class SourceCode; class SpecificImageDebugInfo; @@ -38,7 +39,7 @@ virtual const char* Name() const = 0; virtual const char* PrettyName() const = 0; - virtual const char* SourceFileName() const = 0; + virtual LocatableFile* SourceFile() const = 0; virtual SourceLocation SourceStartLocation() const = 0; virtual SourceLocation SourceEndLocation() const = 0; Modified: haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -16,10 +16,11 @@ TeamDebugInfo::TeamDebugInfo(DebuggerInterface* debuggerInterface, - Architecture* architecture) + Architecture* architecture, FileManager* fileManager) : fDebuggerInterface(debuggerInterface), fArchitecture(architecture), + fFileManager(fileManager), fSpecificInfos(10, true) { } @@ -38,7 +39,7 @@ // DWARF DwarfTeamDebugInfo* dwarfInfo = new(std::nothrow) DwarfTeamDebugInfo( - fArchitecture); + fArchitecture, fFileManager); if (dwarfInfo == NULL || !fSpecificInfos.AddItem(dwarfInfo)) { delete dwarfInfo; return B_NO_MEMORY; Modified: haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -13,6 +13,7 @@ class Architecture; class DebuggerInterface; +class FileManager; class ImageDebugInfo; class ImageInfo; class LocatableFile; @@ -23,7 +24,8 @@ public: TeamDebugInfo( DebuggerInterface* debuggerInterface, - Architecture* architecture); + Architecture* architecture, + FileManager* fileManager); ~TeamDebugInfo(); status_t Init(); @@ -38,6 +40,7 @@ private: DebuggerInterface* fDebuggerInterface; Architecture* fArchitecture; + FileManager* fFileManager; SpecificInfoList fSpecificInfos; }; Modified: haiku/trunk/src/apps/debugger/dwarf/CompilationUnit.h =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/CompilationUnit.h 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/dwarf/CompilationUnit.h 2009-07-03 00:56:39 UTC (rev 31382) @@ -11,6 +11,7 @@ #include "Array.h" #include "DwarfTypes.h" +#include "LineNumberProgram.h" class AbbreviationTable; @@ -45,6 +46,9 @@ DIECompileUnitBase* UnitEntry() const { return fUnitEntry; } void SetUnitEntry(DIECompileUnitBase* entry); + LineNumberProgram& GetLineNumberProgram() + { return fLineNumberProgram; } + status_t AddDebugInfoEntry(DebugInfoEntry* entry, dwarf_off_t offset); int CountEntries() const; @@ -77,6 +81,7 @@ Array fEntryOffsets; DirectoryList fDirectories; FileList fFiles; + LineNumberProgram fLineNumberProgram; }; Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -5,6 +5,7 @@ #include "DwarfFile.h" +#include #include #include @@ -631,6 +632,9 @@ // unit length bool dwarf64; uint64 unitLength = dataReader.ReadInitialLength(dwarf64); + if (unitLength > (uint64)dataReader.BytesRemaining()) + return B_BAD_DATA; + off_t unitOffset = dataReader.Offset(); // version (uhalf) uint16 version = dataReader.Read(0); @@ -638,7 +642,11 @@ // header_length (4/8) uint64 headerLength = dwarf64 ? dataReader.Read(0) : (uint64)dataReader.Read(0); + off_t headerOffset = dataReader.Offset(); + if ((uint64)dataReader.BytesRemaining() < headerLength) + return B_BAD_DATA; + // minimum instruction length uint8 minInstructionLength = dataReader.Read(0); @@ -655,6 +663,7 @@ uint8 opcodeBase = dataReader.Read(0); // standard_opcode_lengths (ubyte[]) + const uint8* standardOpcodeLengths = (const uint8*)dataReader.Data(); dataReader.Skip(opcodeBase - 1); if (dataReader.HasOverflow()) @@ -702,7 +711,17 @@ return B_NO_MEMORY; } - return B_OK; + off_t readerOffset = dataReader.Offset(); + if ((uint64)readerOffset > readerOffset + headerLength) + return B_BAD_DATA; + off_t offsetToProgram = headerOffset + headerLength - readerOffset; + + const uint8* program = (uint8*)dataReader.Data() + offsetToProgram; + size_t programSize = unitLength - (readerOffset - unitOffset); + + return unit->GetLineNumberProgram().Init(program, programSize, + minInstructionLength, defaultIsStatement, lineBase, lineRange, + opcodeBase, standardOpcodeLengths); } Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -128,7 +128,7 @@ _directory = directoryName; _file = fileName; - _line = line; - _column = column; + _line = line - 1; + _column = column - 1; return true; } Modified: haiku/trunk/src/apps/debugger/dwarf/Jamfile =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/Jamfile 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/dwarf/Jamfile 2009-07-03 00:56:39 UTC (rev 31382) @@ -23,6 +23,7 @@ DwarfFile.cpp DwarfManager.cpp DwarfUtils.cpp + LineNumberProgram.cpp SourceLanguageInfo.cpp TagNames.cpp ; Added: haiku/trunk/src/apps/debugger/dwarf/LineNumberProgram.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/LineNumberProgram.cpp 2009-07-03 00:34:48 UTC (rev 31381) +++ haiku/trunk/src/apps/debugger/dwarf/LineNumberProgram.cpp 2009-07-03 00:56:39 UTC (rev 31382) @@ -0,0 +1,208 @@ +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + +#include "LineNumberProgram.h" + +#include + +#include +#include + +#include "Dwarf.h" + + +static const uint8 kLineNumberStandardOpcodeOperands[] + = { 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 }; +static const uint32 kLineNumberStandardOpcodeCount = 12; + + +LineNumberProgram::LineNumberProgram() + : + fProgram(NULL), + fProgramSize(0), + fMinInstructionLength(0), + fDefaultIsStatement(0), + fLineBase(0), + fLineRange(0), + fOpcodeBase(0), + fStandardOpcodeLengths(NULL) +{ +} + + +LineNumberProgram::~LineNumberProgram() +{ +} + + +status_t +LineNumberProgram::Init(const void* program, size_t programSize, + uint8 minInstructionLength, bool defaultIsStatement, int8 lineBase, + uint8 lineRange, uint8 opcodeBase, const uint8* standardOpcodeLengths) +{ + // first check the operand counts for the standard opcodes + uint8 standardOpcodeCount = std::min((uint32)opcodeBase - 1, + kLineNumberStandardOpcodeCount); + for (uint8 i = 0; i < standardOpcodeCount; i++) { + if (standardOpcodeLengths[i] != kLineNumberStandardOpcodeOperands[i]) { +printf("operand count for standard opcode %u does not what we expect\n", i + 1); + return B_BAD_DATA; + } + } + + fProgram = program; + fProgramSize = programSize; + fMinInstructionLength = minInstructionLength; + fDefaultIsStatement = defaultIsStatement; + fLineBase = lineBase; + fLineRange = lineRange; + fOpcodeBase = opcodeBase; + fStandardOpcodeLengths = standardOpcodeLengths; + + return B_OK; +} + + +void +LineNumberProgram::GetInitialState(State& state) const +{ + if (!IsValid()) + return; + + _SetToInitial(state); + state.dataReader.SetTo(fProgram, fProgramSize); +} + + +bool +LineNumberProgram::GetNextRow(State& state) const +{ + if (state.isSequenceEnd) + _SetToInitial(state); + + DataReader& dataReader = state.dataReader; + + while (dataReader.BytesRemaining() > 0) { + bool appendRow = false; + uint8 opcode = dataReader.Read(0); + if (opcode >= fOpcodeBase) { + // special opcode + uint adjustedOpcode = opcode - fOpcodeBase; + state.address += (adjustedOpcode / fLineRange) + * fMinInstructionLength; + state.line += adjustedOpcode % fLineRange + fLineBase; + state.isBasicBlock = false; + state.isPrologueEnd = false; + state.isEpilogueBegin = false; + appendRow = true; + } else if (opcode > 0) { + // standard opcode + switch (opcode) { + case DW_LNS_copy: + state.isBasicBlock = false; + state.isPrologueEnd = false; + state.isEpilogueBegin = false; + appendRow = true; + break; + case DW_LNS_advance_pc: + state.address += dataReader.ReadUnsignedLEB128(0) + * fMinInstructionLength; + break; + case DW_LNS_advance_line: + state.line += dataReader.ReadSignedLEB128(0); + break; + case DW_LNS_set_file: + state.file = dataReader.ReadUnsignedLEB128(0); + break; + case DW_LNS_set_column: + state.column = dataReader.ReadUnsignedLEB128(0); + break; + case DW_LNS_negate_stmt: + state.isStatement = !state.isStatement; + break; + case DW_LNS_set_basic_block: + state.isBasicBlock = true; + break; + case DW_LNS_const_add_pc: + state.address += ((255 - fOpcodeBase) / fLineRange) + * fMinInstructionLength; + break; + case DW_LNS_fixed_advance_pc: + state.address += dataReader.Read(0); + break; + case DW_LNS_set_prologue_end: + state.isPrologueEnd = true; + break; + case DW_LNS_set_epilogue_begin: + state.isEpilogueBegin = true; + break; + case DW_LNS_set_isa: + state.instructionSet = dataReader.ReadUnsignedLEB128(0); + break; + default: +printf("unsupported standard opcode %u\n", opcode); [... truncated: 1025 lines follow ...] From anevilyak at gmail.com Fri Jul 3 04:04:12 2009 From: anevilyak at gmail.com (Rene Gollent) Date: Thu, 2 Jul 2009 21:04:12 -0500 Subject: [Haiku-commits] r31382 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files gui/team_window model In-Reply-To: <200907030056.n630uge9012376@sheep.berlios.de> References: <200907030056.n630uge9012376@sheep.berlios.de> Message-ID: On Thu, Jul 2, 2009 at 7:56 PM, bonefish at BerliOS wrote: > Author: bonefish > Date: 2009-07-03 02:56:39 +0200 (Fri, 03 Jul 2009) > New Revision: 31382 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31382&view=rev FYI, gcc2 complains about (and thanks to -Werror fails to build) debug_info/DwarfImageDebugInfo.cpp, specifically lines 232 and 233 which assign -1 to a uint32. Regards, Rene From anevilyak at gmail.com Fri Jul 3 05:00:37 2009 From: anevilyak at gmail.com (Rene Gollent) Date: Thu, 2 Jul 2009 22:00:37 -0500 Subject: [Haiku-commits] r31382 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files gui/team_window model In-Reply-To: References: <200907030056.n630uge9012376@sheep.berlios.de> Message-ID: On Thu, Jul 2, 2009 at 9:04 PM, Rene Gollent wrote: > On Thu, Jul 2, 2009 at 7:56 PM, bonefish at > BerliOS wrote: >> Author: bonefish >> Date: 2009-07-03 02:56:39 +0200 (Fri, 03 Jul 2009) >> New Revision: 31382 >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31382&view=rev > On a different note, just tried it out with a gcc4 debug build of Vision....words can't adequately explain how nice it is to see a fully graphical debugger correctly picking up and showing where in the source it's currently executing. Kudos! Regards, Rene From axeld at mail.berlios.de Fri Jul 3 10:57:00 2009 From: axeld at mail.berlios.de (axeld at mail.berlios.de) Date: Fri, 3 Jul 2009 10:57:00 +0200 Subject: [Haiku-commits] r31383 - haiku/trunk/src/apps/debugger/debug_info Message-ID: <200907030857.n638v0vC008113@sheep.berlios.de> Author: axeld Date: 2009-07-03 10:56:59 +0200 (Fri, 03 Jul 2009) New Revision: 31383 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31383&view=rev Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp Log: * Fixed GCC2 build. Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 00:56:39 UTC (rev 31382) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 08:56:59 UTC (rev 31383) @@ -229,8 +229,8 @@ // get the source location const char* directoryPath = NULL; const char* fileName = NULL; - uint32 line = -1; - uint32 column = -1; + uint32 line = ~0U; + uint32 column = ~0U; DwarfUtils::GetDeclarationLocation(fFile, subprogramEntry, directoryPath, fileName, line, column); From bonefish at mail.berlios.de Fri Jul 3 11:39:43 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Fri, 3 Jul 2009 11:39:43 +0200 Subject: [Haiku-commits] r31384 - in haiku/trunk/src/apps/debugger: debug_info dwarf Message-ID: <200907030939.n639dhLn013297@sheep.berlios.de> Author: bonefish Date: 2009-07-03 11:39:42 +0200 (Fri, 03 Jul 2009) New Revision: 31384 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31384&view=rev Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.h Log: Changed the line and column parameter of DwarfUtils::GetDeclarationLocation() to int32&. The DWARF indices are one-based with 0 as invalid/no value, but we subtract one to get real indices and -1 as special value. Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 08:56:59 UTC (rev 31383) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 09:39:42 UTC (rev 31384) @@ -229,8 +229,8 @@ // get the source location const char* directoryPath = NULL; const char* fileName = NULL; - uint32 line = ~0U; - uint32 column = ~0U; + int32 line = -1; + int32 column = -1; DwarfUtils::GetDeclarationLocation(fFile, subprogramEntry, directoryPath, fileName, line, column); Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 08:56:59 UTC (rev 31383) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 09:39:42 UTC (rev 31384) @@ -85,7 +85,7 @@ /*static*/ bool DwarfUtils::GetDeclarationLocation(DwarfFile* dwarfFile, const DebugInfoEntry* entry, const char*& _directory, const char*& _file, - uint32& _line, uint32& _column) + int32& _line, int32& _column) { uint32 file; uint32 line; @@ -128,7 +128,7 @@ _directory = directoryName; _file = fileName; - _line = line - 1; - _column = column - 1; + _line = (int32)line - 1; + _column = (int32)column - 1; return true; } Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.h =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.h 2009-07-03 08:56:59 UTC (rev 31383) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.h 2009-07-03 09:39:42 UTC (rev 31384) @@ -27,7 +27,7 @@ const DebugInfoEntry* entry, const char*& _directory, const char*& _file, - uint32& _line, uint32& _column); + int32& _line, int32& _column); }; From bonefish at mail.berlios.de Fri Jul 3 11:41:39 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Fri, 3 Jul 2009 11:41:39 +0200 Subject: [Haiku-commits] r31385 - haiku/trunk/src/apps/debugger/dwarf Message-ID: <200907030941.n639fdp7013545@sheep.berlios.de> Author: bonefish Date: 2009-07-03 11:41:37 +0200 (Fri, 03 Jul 2009) New Revision: 31385 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31385&view=rev Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp Log: Don't require the .debug_str section. It's only needed for DW_FORM_strp attributes, but apparently those aren't generated by gcc 2. Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 09:39:42 UTC (rev 31384) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 09:41:37 UTC (rev 31385) @@ -74,9 +74,7 @@ // get the interesting sections fDebugInfoSection = fElfFile->GetSection(".debug_info"); fDebugAbbrevSection = fElfFile->GetSection(".debug_abbrev"); - fDebugStringSection = fElfFile->GetSection(".debug_str"); - if (fDebugInfoSection == NULL || fDebugAbbrevSection == NULL - || fDebugStringSection == NULL) { + if (fDebugInfoSection == NULL || fDebugAbbrevSection == NULL) { fprintf(stderr, "DwarfManager::File::Load(\"%s\"): no " ".debug_info, .debug_abbrev, or .debug_str section.\n", fileName); @@ -84,6 +82,7 @@ } // not mandatory sections + fDebugStringSection = fElfFile->GetSection(".debug_str"); fDebugRangesSection = fElfFile->GetSection(".debug_ranges"); fDebugLineSection = fElfFile->GetSection(".debug_line"); @@ -477,14 +476,20 @@ break; case DW_FORM_strp: { - dwarf_off_t offset = dataReader.Read(0); - if (offset >= fDebugStringSection->Size()) { - fprintf(stderr, "Invalid DW_FORM_strp offset: %lu\n", - offset); + if (fDebugStringSection != NULL) { + dwarf_off_t offset = dataReader.Read(0); + if (offset >= fDebugStringSection->Size()) { + fprintf(stderr, "Invalid DW_FORM_strp offset: %lu\n", + offset); + return B_BAD_DATA; + } + attributeValue.SetToString( + (const char*)fDebugStringSection->Data() + offset); + } else { + fprintf(stderr, "Invalid DW_FORM_strp: no string " + "section!\n"); return B_BAD_DATA; } - attributeValue.SetToString( - (const char*)fDebugStringSection->Data() + offset); break; } case DW_FORM_udata: From bonefish at mail.berlios.de Fri Jul 3 12:03:27 2009 From: bonefish at mail.berlios.de (bonefish at mail.berlios.de) Date: Fri, 3 Jul 2009 12:03:27 +0200 Subject: [Haiku-commits] r31386 - haiku/trunk/src/apps/debugger/dwarf Message-ID: <200907031003.n63A3Rew015903@sheep.berlios.de> Author: bonefish Date: 2009-07-03 12:03:27 +0200 (Fri, 03 Jul 2009) New Revision: 31386 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31386&view=rev Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp Log: Work-around for gcc 2 output. It can produce DW_AT_sibling attributes pointing to the end of the list. Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 09:41:37 UTC (rev 31385) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfFile.cpp 2009-07-03 10:03:27 UTC (rev 31386) @@ -570,8 +570,14 @@ attributeValue.SetToReference(_ResolveReference(value, localReference)); if (attributeValue.reference == NULL) { + // gcc 2 apparently somtimes produces DW_AT_sibling + // attributes pointing to the end of the sibling list. + // Just ignore those. + if (attributeName == DW_AT_sibling) + continue; + fprintf(stderr, "Failed to resolve reference: " - "%s (%#lx) %s (%#lx): value: %llu\n", + "%s (%#lx) %s (%#lx): value: %llu\n", get_attribute_name_name(attributeName), attributeName, get_attribute_form_name(attributeForm), From zooey at mail.berlios.de Fri Jul 3 12:26:07 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Fri, 3 Jul 2009 12:26:07 +0200 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam Message-ID: <200907031026.n63AQ7sc018752@sheep.berlios.de> Author: zooey Date: 2009-07-03 12:26:07 +0200 (Fri, 03 Jul 2009) New Revision: 31387 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31387&view=rev Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages Log: * switch to new optional packages of the 32bit-wchar_t compilers Modified: haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-07-03 10:03:27 UTC (rev 31386) +++ haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages 2009-07-03 10:26:07 UTC (rev 31387) @@ -252,15 +252,15 @@ && $(TARGET_ARCH) = x86 { # gcc and binutils if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) { - local baseURL = http://haiku-files.org/files/optional-packages ; - InstallOptionalHaikuImagePackage gcc-2.95.3-haiku-081024-1 - : $(baseURL)/gcc-2.95.3-haiku-081024-1.zip ; + local baseURL = http://dl.hirschkaefer.de/haiku ; + InstallOptionalHaikuImagePackage gcc-2.95.3-haiku-090629 + : $(baseURL)/gcc-2.95.3-haiku-090629.zip ; } if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) { - local baseURL = http://haiku-files.org/files/optional-packages ; - InstallOptionalHaikuImagePackage gcc-4.3.3-haiku-090313-1 - : $(baseURL)/gcc-4.3.3-haiku-090313-1.zip ; + local baseURL = http://dl.hirschkaefer.de/haiku ; + InstallOptionalHaikuImagePackage gcc-4.3.3-haiku-090628 + : $(baseURL)/gcc-4.3.3-haiku-090629.zip ; # symlink cpp to g++'s headers AddSymlinkToHaikuImage develop abi x86 gcc4 headers From axeld at mail.berlios.de Fri Jul 3 12:43:21 2009 From: axeld at mail.berlios.de (axeld at mail.berlios.de) Date: Fri, 3 Jul 2009 12:43:21 +0200 Subject: [Haiku-commits] r31388 - haiku/trunk/src/kits/interface Message-ID: <200907031043.n63AhLxD029251@sheep.berlios.de> Author: axeld Date: 2009-07-03 12:42:53 +0200 (Fri, 03 Jul 2009) New Revision: 31388 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31388&view=rev Modified: haiku/trunk/src/kits/interface/View.cpp Log: * The view always included the "error" in the reply, but that's only supposed to happen when an actual error occured. * The "set frame" property resized the view incorrectly. Modified: haiku/trunk/src/kits/interface/View.cpp =================================================================== --- haiku/trunk/src/kits/interface/View.cpp 2009-07-03 10:26:07 UTC (rev 31387) +++ haiku/trunk/src/kits/interface/View.cpp 2009-07-03 10:42:53 UTC (rev 31388) @@ -4219,13 +4219,13 @@ int32 index; BMessage specifier; int32 what; - const char *prop; + const char* property; - if (msg->GetCurrentSpecifier(&index, &specifier, &what, &prop) != B_OK) + if (msg->GetCurrentSpecifier(&index, &specifier, &what, &property) != B_OK) return BHandler::MessageReceived(msg); BPropertyInfo propertyInfo(sViewPropInfo); - switch (propertyInfo.FindMatch(msg, index, &specifier, what, prop)) { + switch (propertyInfo.FindMatch(msg, index, &specifier, what, property)) { case 0: if (msg->what == B_GET_PROPERTY) { err = replyMsg.AddRect("result", Frame()); @@ -4234,7 +4234,7 @@ err = msg->FindRect("data", &newFrame); if (err == B_OK) { MoveTo(newFrame.LeftTop()); - ResizeTo(newFrame.right, newFrame.bottom); + ResizeTo(newFrame.Width(), newFrame.Height()); } } break; @@ -4259,16 +4259,17 @@ return BHandler::MessageReceived(msg); } - if (err < B_OK) { + if (err != B_OK) { replyMsg.what = B_MESSAGE_NOT_UNDERSTOOD; if (err == B_BAD_SCRIPT_SYNTAX) replyMsg.AddString("message", "Didn't understand the specifier(s)"); else replyMsg.AddString("message", strerror(err)); + + replyMsg.AddInt32("error", err); } - replyMsg.AddInt32("error", err); msg->SendReply(&replyMsg); } From stefano.ceccherini at gmail.com Fri Jul 3 12:54:25 2009 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Fri, 3 Jul 2009 12:54:25 +0200 Subject: [Haiku-commits] r31388 - haiku/trunk/src/kits/interface In-Reply-To: <200907031043.n63AhLxD029251@sheep.berlios.de> References: <200907031043.n63AhLxD029251@sheep.berlios.de> Message-ID: <894b9700907030354y2e1615ebn1b122dc336d22d98@mail.gmail.com> 2009/7/3 : > Author: axeld > Date: 2009-07-03 12:42:53 +0200 (Fri, 03 Jul 2009) > New Revision: 31388 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31388&view=rev > > Modified: > ? haiku/trunk/src/kits/interface/View.cpp > Log: > * The view always included the "error" in the reply, but that's only supposed > ?to happen when an actual error occured. Axel, I think this breaks something. Check r18932 where this has been put back, after it had been changed already. From stefano.ceccherini at gmail.com Fri Jul 3 12:56:27 2009 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Fri, 3 Jul 2009 12:56:27 +0200 Subject: [Haiku-commits] r31388 - haiku/trunk/src/kits/interface In-Reply-To: <894b9700907030354y2e1615ebn1b122dc336d22d98@mail.gmail.com> References: <200907031043.n63AhLxD029251@sheep.berlios.de> <894b9700907030354y2e1615ebn1b122dc336d22d98@mail.gmail.com> Message-ID: <894b9700907030356i2e1352ccu6f175c8098be786@mail.gmail.com> 2009/7/3 Stefano Ceccherini : > 2009/7/3 ?: >> Author: axeld >> Date: 2009-07-03 12:42:53 +0200 (Fri, 03 Jul 2009) >> New Revision: 31388 >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31388&view=rev >> >> Modified: >> ? haiku/trunk/src/kits/interface/View.cpp >> Log: >> * The view always included the "error" in the reply, but that's only supposed >> ?to happen when an actual error occured. > > Axel, I think this breaks something. Check r18932 where this has been > put back, after it had been changed already. > By the way... Revision 18490 - Fri Aug 11 20:01:26 2006 UTC (2 years, 10 months ago) by axeld Fixed buggy scripting error responses: "error" is only included on error, and B_ERROR (-1) can hardly be a candidate for the BMessage::what field (uint32). and then: Revision 18932 - Mon Sep 25 20:27:19 2006 UTC (2 years, 9 months ago) by korli put back errors in scripting replies : it's part of the BeOS behavior MethodReplicant is now working again. From ingo_weinhold at gmx.de Fri Jul 3 13:24:01 2009 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Fri, 03 Jul 2009 13:24:01 +0200 Subject: [Haiku-commits] r31382 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files gui/team_window model In-Reply-To: References: <200907030056.n630uge9012376@sheep.berlios.de> Message-ID: <20090703132401.403.1@knochen-vm.localdomain> On 2009-07-03 at 05:00:37 [+0200], Rene Gollent wrote: > On Thu, Jul 2, 2009 at 9:04 PM, Rene Gollent wrote: > > On Thu, Jul 2, 2009 at 7:56 PM, bonefish at > > BerliOS wrote: > >> Author: bonefish > >> Date: 2009-07-03 02:56:39 +0200 (Fri, 03 Jul 2009) > >> New Revision: 31382 > >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31382&view=rev > > On a different note, just tried it out with a gcc4 debug build of > Vision....words can't adequately explain how nice it is to see a fully > graphical debugger correctly picking up and showing where in the > source it's currently executing. Kudos! Thanks! Still quite a bit of work left to do before it will really become usable, though. CU, Ingo From joe.prostko+haiku at gmail.com Fri Jul 3 13:46:02 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Fri, 3 Jul 2009 11:46:02 +0000 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <200907031026.n63AQ7sc018752@sheep.berlios.de> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> Message-ID: <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> On Fri, Jul 3, 2009 at 10:26 AM, zooey at BerliOS wrote: > Author: zooey > Date: 2009-07-03 12:26:07 +0200 (Fri, 03 Jul 2009) > New Revision: 31387 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31387&view=rev > > Modified: > haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages > Log: > * switch to new optional packages of the 32bit-wchar_t compilers Very nice! I had actually built the GCC 4.3.3 compiler myself last night seeing as it looked as if you were done with GCC-related changes. I thought I would save you some time by building it, but apparently you didn't need the help, haha. I did use the latest GMP/MPFR and Binutils, but that's about the only difference probably, other than the fact that I used a slightly different configure invocation and didn't package anything yet. ;) - joe From axeld at mail.berlios.de Fri Jul 3 14:09:19 2009 From: axeld at mail.berlios.de (axeld at mail.berlios.de) Date: Fri, 3 Jul 2009 14:09:19 +0200 Subject: [Haiku-commits] r31389 - in haiku/trunk: headers/private/interface src/kits/interface Message-ID: <200907031209.n63C9JsY007758@sheep.berlios.de> Author: axeld Date: 2009-07-03 14:09:16 +0200 (Fri, 03 Jul 2009) New Revision: 31389 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31389&view=rev Modified: haiku/trunk/headers/private/interface/MenuWindow.h haiku/trunk/src/kits/interface/Menu.cpp haiku/trunk/src/kits/interface/MenuWindow.cpp Log: * BMenu now scrolls when you press page up/down, if possible. * BMenuWindow no longer uses a fixed scroll step - instead, the menu sets it to the height of its first item. * Cleanup. Modified: haiku/trunk/headers/private/interface/MenuWindow.h =================================================================== --- haiku/trunk/headers/private/interface/MenuWindow.h 2009-07-03 10:42:53 UTC (rev 31388) +++ haiku/trunk/headers/private/interface/MenuWindow.h 2009-07-03 12:09:16 UTC (rev 31389) @@ -1,13 +1,13 @@ /* - * Copyright 2001-2006, Haiku, Inc. + * Copyright 2001-2009, Haiku, Inc. * Distributed under the terms of the MIT License. * * Authors: * Marc Flerackers (mflerackers at androme.be) * Stefano Ceccherini (burton666 at libero.it) */ -#ifndef __MENUWINDOW_H -#define __MENUWINDOW_H +#ifndef MENU_WINDOW_H +#define MENU_WINDOW_H #include @@ -22,34 +22,39 @@ class BMenuWindow : public BWindow { - public: - BMenuWindow(const char *name); - virtual ~BMenuWindow(); +public: + BMenuWindow(const char* name); + virtual ~BMenuWindow(); - virtual void DispatchMessage(BMessage *message, BHandler *handler); - - void AttachMenu(BMenu *menu); - void DetachMenu(); - - void AttachScrollers(); - void DetachScrollers(); + virtual void DispatchMessage(BMessage* message, + BHandler* handler); - bool CheckForScrolling(const BPoint &cursor); - bool TryScrollBy(const float &step); - - private: - BMenu *fMenu; - BMenuFrame *fMenuFrame; - BMenuScroller *fUpperScroller; - BMenuScroller *fLowerScroller; - - float fValue; - float fLimit; - - bool _Scroll(const BPoint &cursor); - void _ScrollBy(const float &step); + void AttachMenu(BMenu* menu); + void DetachMenu(); + + void AttachScrollers(); + void DetachScrollers(); + + void SetSmallStep(float step); + void GetSteps(float* _smallStep, float* _largeStep); + bool HasScrollers() const; + bool CheckForScrolling(const BPoint& cursor); + bool TryScrollBy(const float& step); + +private: + bool _Scroll(const BPoint& cursor); + void _ScrollBy(const float& step); + + BMenu* fMenu; + BMenuFrame* fMenuFrame; + BMenuScroller* fUpperScroller; + BMenuScroller* fLowerScroller; + + float fScrollStep; + float fValue; + float fLimit; }; } // namespace BPrivate -#endif // __MENUWINDOW_H +#endif // MENU_WINDOW_H Modified: haiku/trunk/src/kits/interface/Menu.cpp =================================================================== --- haiku/trunk/src/kits/interface/Menu.cpp 2009-07-03 10:42:53 UTC (rev 31388) +++ haiku/trunk/src/kits/interface/Menu.cpp 2009-07-03 12:09:16 UTC (rev 31389) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008, Haiku, Inc. + * Copyright 2001-2009, Haiku, Inc. * Distributed under the terms of the MIT License. * * Authors: @@ -8,6 +8,8 @@ * Rene Gollent (anevilyak at gmail.com) */ +#include + #include #include #include @@ -18,13 +20,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include @@ -819,9 +821,7 @@ switch (msg->what) { case B_MOUSE_WHEEL_CHANGED: { - //float deltaX = 0 float deltaY = 0; - //msg->FindFloat("be:wheel_delta_x", &deltaX); msg->FindFloat("be:wheel_delta_y", &deltaY); if (deltaY == 0) return; @@ -830,7 +830,9 @@ if (window == NULL) return; - window->TryScrollBy(deltaY); + float smallStep; + window->GetSteps(&smallStep, NULL); + window->TryScrollBy(deltaY * smallStep); break; } default: @@ -890,6 +892,21 @@ } break; + case B_PAGE_UP: + case B_PAGE_DOWN: + { + BMenuWindow *window = dynamic_cast(Window()); + if (window == NULL || !window->HasScrollers()) + break; + + int32 deltaY = bytes[0] == B_PAGE_UP ? -1 : 1; + + float largeStep; + window->GetSteps(NULL, &largeStep); + window->TryScrollBy(deltaY * largeStep); + break; + } + case B_ENTER: case B_SPACE: if (fSelected) { @@ -1426,6 +1443,13 @@ fAttachAborted = false; window->AttachMenu(this); + if (ItemAt(0) != NULL) { + float width, height; + ItemAt(0)->GetContentSize(&width, &height); + + window->SetSmallStep(ceilf(height)); + } + // Menu didn't have the time to add its items: aborting... if (fAttachAborted) { window->DetachMenu(); @@ -2213,7 +2237,7 @@ if (frame.right > screenFrame.right) frame.OffsetBy(screenFrame.right - frame.right, 0); } - + if (!scroll) { // basically, if this returns false, it means // that the menu frame won't fit completely inside the screen @@ -2221,10 +2245,10 @@ // not left/right scroll = screenFrame.Height() < frame.Height(); } - + if (scrollOn != NULL) *scrollOn = scroll; - + return frame; } @@ -2286,7 +2310,7 @@ rootMenu = parent; parent = rootMenu->Supermenu(); } while (parent != NULL); - + if (rootMenu->LockLooper()) { item->Invoke(); rootMenu->UnlockLooper(); Modified: haiku/trunk/src/kits/interface/MenuWindow.cpp =================================================================== --- haiku/trunk/src/kits/interface/MenuWindow.cpp 2009-07-03 10:42:53 UTC (rev 31388) +++ haiku/trunk/src/kits/interface/MenuWindow.cpp 2009-07-03 12:09:16 UTC (rev 31389) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007, Haiku, Inc. + * Copyright 2001-2009, Haiku, Inc. * Distributed under the terms of the MIT License. * * Authors: @@ -14,6 +14,8 @@ #include #include #include +#include + #include #include @@ -23,7 +25,7 @@ class BMenuScroller : public BView { public: BMenuScroller(BRect frame); - + bool IsEnabled() const; void SetEnabled(const bool &enabled); private: @@ -34,11 +36,11 @@ class BMenuFrame : public BView { public: BMenuFrame(BMenu *menu); - + virtual void AttachedToWindow(); virtual void DetachedFromWindow(); virtual void Draw(BRect updateRect); - + private: friend class BMenuWindow; @@ -67,14 +69,13 @@ const int kScrollerHeight = 10; -const int kScrollStep = 19; BMenuScroller::BMenuScroller(BRect frame) : BView(frame, "menu scroller", 0, B_WILL_DRAW | B_FRAME_EVENTS), fEnabled(false) { - SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR)); + SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR)); } @@ -112,11 +113,11 @@ if (IsEnabled()) SetHighColor(0, 0, 0); else - SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), + SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_2_TINT)); FillRect(Bounds(), B_SOLID_LOW); - + FillTriangle(BPoint(middle, (kScrollerHeight / 2) - 3), BPoint(middle + 5, (kScrollerHeight / 2) + 2), BPoint(middle - 5, (kScrollerHeight / 2) + 2)); @@ -137,7 +138,7 @@ LowerScroller::Draw(BRect updateRect) { SetLowColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT)); - + BRect frame = Bounds(); // Draw the lower arrow. if (IsEnabled()) @@ -164,16 +165,16 @@ fMenu(menu) { } - + void BMenuFrame::AttachedToWindow() { BView::AttachedToWindow(); - + if (fMenu != NULL) AddChild(fMenu); - + ResizeTo(Window()->Bounds().Width(), Window()->Bounds().Height()); if (fMenu != NULL) { BFont font; @@ -181,8 +182,8 @@ SetFont(&font); } } - + void BMenuFrame::DetachedFromWindow() { @@ -240,10 +241,11 @@ // The window will be resized by BMenu, so just pass a dummy rect : BWindow(BRect(0, 0, 0, 0), name, B_BORDERED_WINDOW_LOOK, kMenuWindowFeel, B_NOT_ZOOMABLE | B_AVOID_FOCUS), - fMenu(NULL), + fMenu(NULL), fMenuFrame(NULL), fUpperScroller(NULL), - fLowerScroller(NULL) + fLowerScroller(NULL), + fScrollStep(19) { SetSizeLimits(2, 10000, 2, 10000); } @@ -279,7 +281,7 @@ void BMenuWindow::DetachMenu() { - DetachScrollers(); + DetachScrollers(); if (fMenuFrame) { RemoveChild(fMenuFrame); delete fMenuFrame; @@ -296,30 +298,30 @@ // menu frame already existing. if (!fMenu || !fMenuFrame) return; - + fMenu->MakeFocus(true); BRect frame = Bounds(); - + if (fUpperScroller == NULL) { fUpperScroller = new UpperScroller( BRect(0, 0, frame.right, kScrollerHeight - 1)); AddChild(fUpperScroller); } - + if (fLowerScroller == NULL) { fLowerScroller = new LowerScroller( BRect(0, frame.bottom - kScrollerHeight + 1, frame.right, frame.bottom)); AddChild(fLowerScroller); } - + fUpperScroller->SetEnabled(false); fLowerScroller->SetEnabled(true); fMenuFrame->ResizeBy(0, -2 * kScrollerHeight); fMenuFrame->MoveBy(0, kScrollerHeight); - + fValue = 0; fLimit = fMenu->Bounds().Height() - (frame.Height() - 2 * kScrollerHeight); } @@ -330,7 +332,7 @@ { // BeOS doesn't remember the position where the last scrolling ended, // so we just scroll back to the beginning. - if (fMenu) + if (fMenu) fMenu->ScrollTo(0, 0); if (fLowerScroller) { @@ -343,48 +345,76 @@ RemoveChild(fUpperScroller); delete fUpperScroller; fUpperScroller = NULL; - } + } } +void +BMenuWindow::SetSmallStep(float step) +{ + fScrollStep = step; +} + + +void +BMenuWindow::GetSteps(float* _smallStep, float* _largeStep) +{ + if (_smallStep != NULL) + *_smallStep = fScrollStep; + if (_largeStep != NULL) { + if (fMenuFrame != NULL) + *_largeStep = fMenuFrame->Bounds().Height() - fScrollStep; + else + *_largeStep = fScrollStep * 2; + } +} + + bool +BMenuWindow::HasScrollers() const +{ + return fMenuFrame != NULL && fUpperScroller != NULL + && fLowerScroller != NULL; +} + + +bool BMenuWindow::CheckForScrolling(const BPoint &cursor) { if (!fMenuFrame || !fUpperScroller || !fLowerScroller) return false; - + return _Scroll(cursor); } bool -BMenuWindow::TryScrollBy(const float &step) +BMenuWindow::TryScrollBy(const float& step) { if (!fMenuFrame || !fUpperScroller || !fLowerScroller) return false; - + _ScrollBy(step); - return true; } bool -BMenuWindow::_Scroll(const BPoint &where) +BMenuWindow::_Scroll(const BPoint& where) { ASSERT((fLowerScroller != NULL)); ASSERT((fUpperScroller != NULL)); - + const BPoint cursor = ConvertFromScreen(where); BRect lowerFrame = fLowerScroller->Frame(); BRect upperFrame = fUpperScroller->Frame(); - if (fLowerScroller->IsEnabled() && lowerFrame.Contains(cursor)) { + if (fLowerScroller->IsEnabled() && lowerFrame.Contains(cursor)) _ScrollBy(1); - } else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor)) { + else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor)) _ScrollBy(-1); - } else + else return false; snooze(5000); @@ -394,7 +424,7 @@ void -BMenuWindow::_ScrollBy(const float &step) +BMenuWindow::_ScrollBy(const float& step) { if (step > 0) { if (fValue == 0) { @@ -402,17 +432,15 @@ fUpperScroller->Invalidate(); } - if (fValue + kScrollStep >= fLimit) { - // If we reached the limit, we don't want to scroll a whole - // 'step' if not needed. + if (fValue + step >= fLimit) { + // If we reached the limit, only scroll to the end fMenu->ScrollBy(0, fLimit - fValue); fValue = fLimit; fLowerScroller->SetEnabled(false); fLowerScroller->Invalidate(); - } else { - fMenu->ScrollBy(0, kScrollStep); - fValue += kScrollStep; + fMenu->ScrollBy(0, step); + fValue += step; } } else if (step < 0) { if (fValue == fLimit) { @@ -420,15 +448,14 @@ fLowerScroller->Invalidate(); } - if (fValue - kScrollStep <= 0) { + if (fValue + step <= 0) { fMenu->ScrollBy(0, -fValue); fValue = 0; fUpperScroller->SetEnabled(false); fUpperScroller->Invalidate(); - } else { - fMenu->ScrollBy(0, -kScrollStep); - fValue -= kScrollStep; + fMenu->ScrollBy(0, step); + fValue += step; } } } From bonefish at mail.berlios.de Fri Jul 3 14:25:09 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 14:25:09 +0200 Subject: [Haiku-commits] r31390 - haiku/trunk/src/apps/debugger/gui/team_window Message-ID: <200907031225.n63CP9Mq009616@sheep.berlios.de> Author: bonefish Date: 2009-07-03 14:25:09 +0200 (Fri, 03 Jul 2009) New Revision: 31390 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31390&view=rev Modified: haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.cpp haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.h Log: * ThreadListView: - Got rid of superfluous SetTeam(). - Aded SetThread() to select a thread. * TeamWindow: When a thread hits a debug event and no thread is selected or the selected thread is running, select the stopped thread and switch to the "Threads" tab view. Modified: haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp 2009-07-03 12:09:16 UTC (rev 31389) +++ haiku/trunk/src/apps/debugger/gui/team_window/TeamWindow.cpp 2009-07-03 12:25:09 UTC (rev 31390) @@ -27,6 +27,12 @@ #include "StackTraceView.h" +enum { + MAIN_TAB_INDEX_THREADS = 0, + MAIN_TAB_INDEX_IMAGES = 1 +}; + + // #pragma mark - TeamWindow @@ -286,6 +292,8 @@ void TeamWindow::_Init() { + ::Team* team = fDebugModel->GetTeam(); + BScrollView* sourceScrollView; BLayoutBuilder::Group<>(this, B_VERTICAL) @@ -317,7 +325,7 @@ threadGroup->SetName("Threads"); fTabView->AddTab(threadGroup); BLayoutBuilder::Split<>(threadGroup) - .Add(fThreadListView = ThreadListView::Create(this)) + .Add(fThreadListView = ThreadListView::Create(team, this)) .Add(fStackTraceView = StackTraceView::Create(this)); // add images tab @@ -325,8 +333,7 @@ imagesGroup->SetName("Images"); fTabView->AddTab(imagesGroup); BLayoutBuilder::Split<>(imagesGroup) - .Add(fImageListView = ImageListView::Create(fDebugModel->GetTeam(), - this)) + .Add(fImageListView = ImageListView::Create(team, this)) .Add(fImageFunctionsView = ImageFunctionsView::Create(this)); // add local variables tab @@ -337,8 +344,6 @@ tab = fRegisterView = RegisterView::Create(fDebugModel->GetArchitecture()); fLocalsTabView->AddTab(tab); - fThreadListView->SetTeam(fDebugModel->GetTeam()); - fRunButton->SetMessage(new BMessage(MSG_THREAD_RUN)); fStepOverButton->SetMessage(new BMessage(MSG_THREAD_STEP_OVER)); fStepIntoButton->SetMessage(new BMessage(MSG_THREAD_STEP_INTO)); @@ -377,6 +382,8 @@ locker.Unlock(); + fThreadListView->SetThread(fActiveThread); + _SetActiveStackTrace(stackTrace); _UpdateCpuState(); } @@ -597,11 +604,28 @@ void TeamWindow::_HandleThreadStateChanged(thread_id threadID) { - // ATM we're only interested in the currently selected thread - if (fActiveThread == NULL || threadID != fActiveThread->ID()) + AutoLocker locker(fDebugModel); + + ::Thread* thread = fDebugModel->GetTeam()->ThreadByID(threadID); + if (thread == NULL) return; - AutoLocker locker(fDebugModel); + // If the thread has been stopped and we don't have an active thread yet + // (or it isn't stopped), switch to this thread. Otherwise ignore the event. + if (thread->State() == THREAD_STATE_STOPPED + && (fActiveThread == NULL + || (thread != fActiveThread + && fActiveThread->State() != THREAD_STATE_STOPPED))) { + _SetActiveThread(thread); + } else if (thread != fActiveThread) { + // otherwise ignore the event, if the thread is not the active one + return; + } + + // Switch to the threads tab view when the thread has stopped. + if (thread->State() == THREAD_STATE_STOPPED) + fTabView->Select(MAIN_TAB_INDEX_THREADS); + _UpdateRunButtons(); } Modified: haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.cpp =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.cpp 2009-07-03 12:09:16 UTC (rev 31389) +++ haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.cpp 2009-07-03 12:25:09 UTC (rev 31390) @@ -129,10 +129,11 @@ // #pragma mark - ThreadListView -ThreadListView::ThreadListView(Listener* listener) +ThreadListView::ThreadListView(Team* team, Listener* listener) : BGroupView(B_VERTICAL), - fTeam(NULL), + fTeam(team), + fThread(NULL), fThreadsTable(NULL), fThreadsTableModel(NULL), fListener(listener) @@ -143,16 +144,16 @@ ThreadListView::~ThreadListView() { - SetTeam(NULL); + fTeam->RemoveListener(this); fThreadsTable->SetTableModel(NULL); delete fThreadsTableModel; } /*static*/ ThreadListView* -ThreadListView::Create(Listener* listener) +ThreadListView::Create(Team* team, Listener* listener) { - ThreadListView* self = new ThreadListView(listener); + ThreadListView* self = new ThreadListView(team, listener); try { self->_Init(); @@ -173,26 +174,29 @@ void -ThreadListView::SetTeam(Team* team) +ThreadListView::SetThread(Thread* thread) { - if (team == fTeam) + if (thread == fThread) return; - if (fTeam != NULL) { - fTeam->RemoveListener(this); - fThreadsTable->SetTableModel(NULL); - delete fThreadsTableModel; - fThreadsTableModel = NULL; - } + if (fThread != NULL) + fThread->ReleaseReference(); - fTeam = team; + fThread = thread; - if (fTeam != NULL) { - fThreadsTableModel = new(std::nothrow) ThreadsTableModel(fTeam); - fThreadsTable->SetTableModel(fThreadsTableModel); - fThreadsTable->ResizeAllColumnsToPreferred(); - fTeam->AddListener(this); + if (fThread != NULL) { + fThread->AcquireReference(); + + for (int32 i = 0; Thread* other = fThreadsTableModel->ThreadAt(i); + i++) { + if (fThread == other) { + fThreadsTable->SelectRow(i, false); + return; + } + } } + + fThreadsTable->DeselectAllRows(); } @@ -256,6 +260,11 @@ fThreadsTable->SetSelectionMode(B_SINGLE_SELECTION_LIST); fThreadsTable->AddTableListener(this); + + fThreadsTableModel = new(std::nothrow) ThreadsTableModel(fTeam); + fThreadsTable->SetTableModel(fThreadsTableModel); + fThreadsTable->ResizeAllColumnsToPreferred(); + fTeam->AddListener(this); } Modified: haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.h =================================================================== --- haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.h 2009-07-03 12:09:16 UTC (rev 31389) +++ haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.h 2009-07-03 12:25:09 UTC (rev 31390) @@ -20,15 +20,15 @@ class Listener; public: - ThreadListView(Listener* listener); + ThreadListView(Team* team, Listener* listener); ~ThreadListView(); - static ThreadListView* Create(Listener* listener); + static ThreadListView* Create(Team* team, Listener* listener); // throws void UnsetListener(); - void SetTeam(Team* team); + void SetThread(Thread* thread); virtual void MessageReceived(BMessage* message); @@ -47,6 +47,7 @@ private: Team* fTeam; + Thread* fThread; Table* fThreadsTable; ThreadsTableModel* fThreadsTableModel; Listener* fListener; From axeld at mail.berlios.de Fri Jul 3 14:59:56 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Fri, 3 Jul 2009 14:59:56 +0200 Subject: [Haiku-commits] r31391 - haiku/trunk/src/servers/input Message-ID: <200907031259.n63Cxuox013959@sheep.berlios.de> Author: axeld Date: 2009-07-03 14:59:56 +0200 (Fri, 03 Jul 2009) New Revision: 31391 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31391&view=rev Modified: haiku/trunk/src/servers/input/MethodReplicant.cpp Log: * Minor cleanup. Modified: haiku/trunk/src/servers/input/MethodReplicant.cpp =================================================================== --- haiku/trunk/src/servers/input/MethodReplicant.cpp 2009-07-03 12:25:09 UTC (rev 31390) +++ haiku/trunk/src/servers/input/MethodReplicant.cpp 2009-07-03 12:59:56 UTC (rev 31391) @@ -1,11 +1,12 @@ /* - * Copyright (c) 2004-2008, Haiku. All rights reserved. - * Distributed under the terms of the MIT/X11 license. + * Copyright 2004-2009, Haiku. All rights reserved. + * Distributed under the terms of the MIT license. * - * Authors: + * Authors: * J?r?me Duval */ + #include "MethodReplicant.h" #include @@ -26,28 +27,32 @@ #include "InputServerTypes.h" #ifdef DEBUG - #define CALLED() PRINT(("CALLED %s \n", __PRETTY_FUNCTION__)); +# define CALLED() PRINT(("CALLED %s \n", __PRETTY_FUNCTION__)); #else - #define CALLED() +# define CALLED() #endif MethodReplicant::MethodReplicant(const char* signature) - : BView(BRect(0, 0, 15, 15), REPLICANT_CTL_NAME, B_FOLLOW_ALL, B_WILL_DRAW), + : + BView(BRect(0, 0, 15, 15), REPLICANT_CTL_NAME, B_FOLLOW_ALL, B_WILL_DRAW), fMenu("", false, false) { // Background Bitmap - fSegments = new BBitmap(BRect(0, 0, kRemoteWidth - 1, kRemoteHeight - 1), kRemoteColorSpace); - fSegments->SetBits(kRemoteBits, kRemoteWidth*kRemoteHeight, 0, kRemoteColorSpace); + fSegments = new BBitmap(BRect(0, 0, kRemoteWidth - 1, kRemoteHeight - 1), + kRemoteColorSpace); + fSegments->SetBits(kRemoteBits, kRemoteWidth * kRemoteHeight, 0, + kRemoteColorSpace); // Background Color - //add dragger + // add dragger BRect rect(Bounds()); rect.left = rect.right - 7.0; rect.top = rect.bottom - 7.0; - BDragger *dragger = new BDragger(rect, this, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); + BDragger* dragger = new BDragger(rect, this, + B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); + dragger->SetViewColor(B_TRANSPARENT_32_BIT); AddChild(dragger); - dragger->SetViewColor(B_TRANSPARENT_32_BIT); ASSERT(signature != NULL); fSignature = strdup(signature); @@ -57,15 +62,18 @@ } -MethodReplicant::MethodReplicant(BMessage *message) - : BView(message), +MethodReplicant::MethodReplicant(BMessage* message) + : + BView(message), fMenu("", false, false) { // Background Bitmap - fSegments = new BBitmap(BRect(0, 0, kRemoteWidth - 1, kRemoteHeight - 1), kRemoteColorSpace); - fSegments->SetBits(kRemoteBits, kRemoteWidth*kRemoteHeight, 0, kRemoteColorSpace); + fSegments = new BBitmap(BRect(0, 0, kRemoteWidth - 1, kRemoteHeight - 1), + kRemoteColorSpace); + fSegments->SetBits(kRemoteBits, kRemoteWidth * kRemoteHeight, 0, + kRemoteColorSpace); - const char *signature = NULL; + const char* signature = NULL; message->FindString("add_on", &signature); ASSERT(signature != NULL); fSignature = strdup(signature); @@ -83,8 +91,8 @@ // archiving overrides -MethodReplicant * -MethodReplicant::Instantiate(BMessage *data) +MethodReplicant* +MethodReplicant::Instantiate(BMessage* data) { CALLED(); if (!validate_instantiation(data, REPLICANT_CTL_NAME)) @@ -94,7 +102,7 @@ status_t -MethodReplicant::Archive(BMessage *data, bool deep) const +MethodReplicant::Archive(BMessage* data, bool deep) const { BView::Archive(data, deep); @@ -115,22 +123,24 @@ msg.AddMessenger("address", messenger); BMessenger inputMessenger(fSignature); - if (inputMessenger.SendMessage(&msg) != B_OK) { + if (inputMessenger.SendMessage(&msg) != B_OK) printf("error when contacting input_server\n"); - } } void -MethodReplicant::MessageReceived(BMessage *message) +MethodReplicant::MessageReceived(BMessage* message) { - PRINT(("%s what:%c%c%c%c\n", __PRETTY_FUNCTION__, message->what >> 24, message->what >> 16, message->what >> 8, message->what)); + PRINT(("%s what:%c%c%c%c\n", __PRETTY_FUNCTION__, message->what >> 24, + message->what >> 16, message->what >> 8, message->what)); PRINT_OBJECT(*message); + switch (message->what) { case B_ABOUT_REQUESTED: - (new BAlert("About Method Replicant", "Method Replicant (Replicant)\n" + (new BAlert("About Method Replicant", + "Method Replicant (Replicant)\n" " Brought to you by J?r?me DUVAL.\n\n" - "Haiku, 2004", "OK"))->Go(); + "Haiku, 2004-2009", "OK"))->Go(); break; case IS_UPDATE_NAME: UpdateMethodName(message); @@ -179,10 +189,10 @@ where = ConvertToScreen(point); fMenu.SetTargetForItems(this); - BMenuItem *item = fMenu.Go(where, true, true, + BMenuItem* item = fMenu.Go(where, true, true, BRect(where - BPoint(4, 4), where + BPoint(4, 4))); - if (item && dynamic_cast(item)) { + if (dynamic_cast(item) != NULL) { BMessage msg(IS_SET_METHOD); msg.AddInt32("cookie", ((MethodMenuItem*)item)->Cookie()); BMessenger messenger(fSignature); @@ -199,7 +209,7 @@ void -MethodReplicant::UpdateMethod(BMessage *message) +MethodReplicant::UpdateMethod(BMessage* message) { CALLED(); int32 cookie; @@ -208,20 +218,21 @@ return; } - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item == NULL) { fprintf(stderr, "can't find item with cookie %lx\n", cookie); return; } item->SetMarked(true); - fSegments->SetBits(item->Icon(), kRemoteWidth*kRemoteHeight, 0, kRemoteColorSpace); + fSegments->SetBits(item->Icon(), kRemoteWidth * kRemoteHeight, 0, + kRemoteColorSpace); Invalidate(); } void -MethodReplicant::UpdateMethodIcon(BMessage *message) +MethodReplicant::UpdateMethodIcon(BMessage* message) { CALLED(); int32 cookie; @@ -230,14 +241,15 @@ return; } - const uchar *data; + const uchar* data; ssize_t numBytes; - if (message->FindData("icon", B_ANY_TYPE, (const void**)&data, &numBytes) != B_OK) { + if (message->FindData("icon", B_ANY_TYPE, (const void**)&data, &numBytes) + != B_OK) { fprintf(stderr, "can't find icon in message\n"); return; } - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item == NULL) { fprintf(stderr, "can't find item with cookie 0x%lx\n", cookie); return; @@ -248,7 +260,7 @@ void -MethodReplicant::UpdateMethodMenu(BMessage *message) +MethodReplicant::UpdateMethodMenu(BMessage* message) { CALLED(); int32 cookie; @@ -270,25 +282,26 @@ return; } - BMenu *menu = (BMenu *)BMenu::Instantiate(&msg); + BMenu* menu = (BMenu*)BMenu::Instantiate(&msg); if (menu == NULL) { PRINT(("can't instantiate menu\n")); } else menu->SetTargetForItems(messenger); - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item == NULL) { fprintf(stderr, "can't find item with cookie 0x%lx\n", cookie); return; } int32 index = fMenu.IndexOf(item); - MethodMenuItem *item2 = NULL; - if (menu) + MethodMenuItem* item2 = NULL; + if (menu) { item2 = new MethodMenuItem(cookie, item->Label(), item->Icon(), menu, messenger); - else + } else item2 = new MethodMenuItem(cookie, item->Label(), item->Icon()); + item = (MethodMenuItem*)fMenu.RemoveItem(index); fMenu.AddItem(item2, index); item2->SetMarked(item->IsMarked()); @@ -297,7 +310,7 @@ void -MethodReplicant::UpdateMethodName(BMessage *message) +MethodReplicant::UpdateMethodName(BMessage* message) { CALLED(); int32 cookie; @@ -306,13 +319,13 @@ return; } - const char *name; + const char* name; if (message->FindString("name", &name) != B_OK) { fprintf(stderr, "can't find name in message\n"); return; } - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item == NULL) { fprintf(stderr, "can't find item with cookie 0x%lx\n", cookie); return; @@ -322,11 +335,11 @@ } -MethodMenuItem * +MethodMenuItem* MethodReplicant::FindItemByCookie(int32 cookie) { for (int32 i = 0; i < fMenu.CountItems(); i++) { - MethodMenuItem *item = (MethodMenuItem *)fMenu.ItemAt(i); + MethodMenuItem* item = (MethodMenuItem*)fMenu.ItemAt(i); PRINT(("cookie : 0x%lx\n", item->Cookie())); if (item->Cookie() == cookie) return item; @@ -337,7 +350,7 @@ void -MethodReplicant::AddMethod(BMessage *message) +MethodReplicant::AddMethod(BMessage* message) { CALLED(); int32 cookie; @@ -346,20 +359,21 @@ return; } - const char *name; + const char* name; if (message->FindString("name", &name) != B_OK) { fprintf(stderr, "can't find name in message\n"); return; } - const uchar *icon; + const uchar* icon; ssize_t numBytes; - if (message->FindData("icon", B_ANY_TYPE, (const void**)&icon, &numBytes) != B_OK) { + if (message->FindData("icon", B_ANY_TYPE, (const void**)&icon, &numBytes) + != B_OK) { fprintf(stderr, "can't find icon in message\n"); return; } - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item != NULL) { fprintf(stderr, "item with cookie %lx already exists\n", cookie); return; @@ -375,7 +389,7 @@ void -MethodReplicant::RemoveMethod(BMessage *message) +MethodReplicant::RemoveMethod(BMessage* message) { CALLED(); int32 cookie; @@ -384,7 +398,7 @@ return; } - MethodMenuItem *item = FindItemByCookie(cookie); + MethodMenuItem* item = FindItemByCookie(cookie); if (item == NULL) { fprintf(stderr, "can't find item with cookie %lx\n", cookie); return; From axeld at pinc-software.de Fri Jul 3 15:01:35 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Fri, 03 Jul 2009 15:01:35 +0200 CEST Subject: [Haiku-commits] r31388 - haiku/trunk/src/kits/interface In-Reply-To: <894b9700907030356i2e1352ccu6f175c8098be786@mail.gmail.com> Message-ID: <22852999459-BeMail@zon> Stefano Ceccherini wrote: > >> Log: > >> * The view always included the "error" in the reply, but that's > > > only supposed > >> ?to happen when an actual error occured. > > Axel, I think this breaks something. Check r18932 where this has > > been > > put back, after it had been changed already. Thanks for the note, and looking these changes up! > By the way... > Revision 18490 - Fri Aug 11 20:01:26 2006 UTC (2 years, 10 months > ago) by axeld > Fixed buggy scripting error responses: "error" is only included on > error, and B_ERROR (-1) can hardly be a candidate for the > BMessage::what field (uint32). > > and then: > > Revision 18932 - Mon Sep 25 20:27:19 2006 UTC (2 years, 9 months ago) > by korli > > put back errors in scripting replies : it's part of the BeOS behavior > MethodReplicant is now working again. I've tested on BeOS, and it's definitely not the BeOS behaviour. The BeOS behaviour is what we're doing now again. Whatever problem MethodReplicant may have (I only looked at its source, but couldn't spot anything), the problem would be somewhere else. So please, if someone notices anything wrong now, don't revert this change again, watch out for the real thing :-) Bye, Axel. From zooey at hirschkaefer.de Fri Jul 3 15:56:15 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Fri, 03 Jul 2009 15:56:15 +0200 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> Message-ID: <20090703155615.1389.2@bepc.1246609415.fake> Hi Joseph, On 2009-07-03 at 13:46:02 [+0200], Joseph Prostko wrote: > On Fri, Jul 3, 2009 at 10:26 AM, zooey at BerliOS > wrote: > > Author: zooey > > Date: 2009-07-03 12:26:07 +0200 (Fri, 03 Jul 2009) > > New Revision: 31387 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31387&view=rev > > > > Modified: > > haiku/branches/features/32bit-wchar_t/build/jam/OptionalPackages > > Log: > > * switch to new optional packages of the 32bit-wchar_t compilers > > Very nice! Thanks :-) > I had actually built the GCC 4.3.3 compiler myself last night seeing > as it looked as if you were done with GCC-related changes. I thought > I would save you some time by building it, but apparently you didn't > need the help, haha. I did use the latest GMP/MPFR and Binutils, but > that's about the only difference probably, other than the fact that I > used a slightly different configure invocation and didn't package > anything yet. ;) Yeah, I thought about updating binutils, too, but then didn't want to to add more work on top - the aim is to merge the 32bit-wchar_t branch back to trunk, soon. In what way did your configure invocation differ? cheers, Oliver From bonefish at mail.berlios.de Fri Jul 3 16:20:27 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 16:20:27 +0200 Subject: [Haiku-commits] r31392 - in haiku/trunk: headers/private/debug src/kits/debug Message-ID: <200907031420.n63EKRI8025219@sheep.berlios.de> Author: bonefish Date: 2009-07-03 16:20:27 +0200 (Fri, 03 Jul 2009) New Revision: 31392 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31392&view=rev Modified: haiku/trunk/headers/private/debug/debug_support.h haiku/trunk/src/kits/debug/Image.cpp haiku/trunk/src/kits/debug/Image.h haiku/trunk/src/kits/debug/SymbolLookup.cpp haiku/trunk/src/kits/debug/SymbolLookup.h haiku/trunk/src/kits/debug/debug_support.cpp Log: Added debug_get_symbol(). It's not implemented particularly efficiently, though. Modified: haiku/trunk/headers/private/debug/debug_support.h =================================================================== --- haiku/trunk/headers/private/debug/debug_support.h 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/headers/private/debug/debug_support.h 2009-07-03 14:20:27 UTC (rev 31392) @@ -62,6 +62,9 @@ void debug_delete_symbol_lookup_context( debug_symbol_lookup_context *lookupContext); +status_t debug_get_symbol(debug_symbol_lookup_context* lookupContext, + image_id image, const char* name, int32 symbolType, + void** _symbolLocation, size_t* _symbolSize, int32* _symbolType); status_t debug_lookup_symbol_address(debug_symbol_lookup_context *lookupContext, const void *address, void **baseAddress, char *symbolName, int32 symbolNameSize, char *imageName, int32 imageNameSize, Modified: haiku/trunk/src/kits/debug/Image.cpp =================================================================== --- haiku/trunk/src/kits/debug/Image.cpp 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/src/kits/debug/Image.cpp 2009-07-03 14:20:27 UTC (rev 31392) @@ -34,6 +34,35 @@ } +status_t +Image::GetSymbol(const char* name, int32 symbolType, void** _symbolLocation, + size_t* _symbolSize, int32* _symbolType) const +{ + // TODO: At least for ImageFile we could do hash lookups! + int32 iterator = 0; + const char* foundName; + size_t foundNameLen; + addr_t foundAddress; + size_t foundSize; + int32 foundType; + while (NextSymbol(iterator, &foundName, &foundNameLen, &foundAddress, + &foundSize, &foundType) == B_OK) { + if ((symbolType == B_SYMBOL_TYPE_ANY || symbolType == foundType) + && strcmp(name, foundName) == 0) { + if (_symbolLocation != NULL) + *_symbolLocation = (void*)foundAddress; + if (_symbolSize != NULL) + *_symbolSize = foundSize; + if (_symbolType != NULL) + *_symbolType = foundType; + return B_OK; + } + } + + return B_ENTRY_NOT_FOUND; +} + + // #pragma mark - SymbolTableBasedImage Modified: haiku/trunk/src/kits/debug/Image.h =================================================================== --- haiku/trunk/src/kits/debug/Image.h 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/src/kits/debug/Image.h 2009-07-03 14:20:27 UTC (rev 31392) @@ -46,6 +46,10 @@ addr_t* _symbolAddress, size_t* _symbolSize, int32* _symbolType) const = 0; + virtual status_t GetSymbol(const char* name, int32 symbolType, + void** _symbolLocation, size_t* _symbolSize, + int32* _symbolType) const; + protected: image_info fInfo; }; Modified: haiku/trunk/src/kits/debug/SymbolLookup.cpp =================================================================== --- haiku/trunk/src/kits/debug/SymbolLookup.cpp 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/src/kits/debug/SymbolLookup.cpp 2009-07-03 14:20:27 UTC (rev 31392) @@ -426,6 +426,20 @@ } +// GetSymbol +status_t +SymbolLookup::GetSymbol(image_id imageID, const char* name, int32 symbolType, + void** _symbolLocation, size_t* _symbolSize, int32* _symbolType) const +{ + Image* image = _FindImageByID(imageID); + if (image == NULL) + return B_ENTRY_NOT_FOUND; + + return image->GetSymbol(name, symbolType, _symbolLocation, _symbolSize, + _symbolType); +} + + // _FindLoadedImageAtAddress const image_t * SymbolLookup::_FindLoadedImageAtAddress(addr_t address) const Modified: haiku/trunk/src/kits/debug/SymbolLookup.h =================================================================== --- haiku/trunk/src/kits/debug/SymbolLookup.h 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/src/kits/debug/SymbolLookup.h 2009-07-03 14:20:27 UTC (rev 31392) @@ -154,6 +154,9 @@ size_t* _symbolNameLen, addr_t* _symbolAddress, size_t* _symbolSize, int32* _symbolType) const; + status_t GetSymbol(image_id imageID, const char* name, int32 symbolType, + void** _symbolLocation, size_t* _symbolSize, int32* _symbolType) const; + private: class LoadedImage; friend class LoadedImage; Modified: haiku/trunk/src/kits/debug/debug_support.cpp =================================================================== --- haiku/trunk/src/kits/debug/debug_support.cpp 2009-07-03 12:59:56 UTC (rev 31391) +++ haiku/trunk/src/kits/debug/debug_support.cpp 2009-07-03 14:20:27 UTC (rev 31392) @@ -318,6 +318,22 @@ } } + +// debug_get_symbol +status_t +debug_get_symbol(debug_symbol_lookup_context* lookupContext, image_id image, + const char* name, int32 symbolType, void** _symbolLocation, + size_t* _symbolSize, int32* _symbolType) +{ + if (!lookupContext || !lookupContext->lookup) + return B_BAD_VALUE; + SymbolLookup* lookup = lookupContext->lookup; + + return lookup->GetSymbol(image, name, symbolType, _symbolLocation, + _symbolSize, _symbolType); +} + + // debug_lookup_symbol_address status_t debug_lookup_symbol_address(debug_symbol_lookup_context *lookupContext, From bonefish at mail.berlios.de Fri Jul 3 16:23:20 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 16:23:20 +0200 Subject: [Haiku-commits] r31393 - in haiku/trunk/src/apps/debugger: . debugger_interface model Message-ID: <200907031423.n63ENKb1025657@sheep.berlios.de> Author: bonefish Date: 2009-07-03 16:23:19 +0200 (Fri, 03 Jul 2009) New Revision: 31393 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31393&view=rev Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp haiku/trunk/src/apps/debugger/TeamDebugger.h haiku/trunk/src/apps/debugger/ThreadHandler.cpp haiku/trunk/src/apps/debugger/ThreadHandler.h haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.cpp haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.h haiku/trunk/src/apps/debugger/model/Image.h haiku/trunk/src/apps/debugger/model/ImageInfo.cpp haiku/trunk/src/apps/debugger/model/ImageInfo.h haiku/trunk/src/apps/debugger/model/SymbolInfo.cpp haiku/trunk/src/apps/debugger/model/SymbolInfo.h haiku/trunk/src/apps/debugger/model/Thread.cpp haiku/trunk/src/apps/debugger/model/Thread.h Log: * Extended ImageInfo and Image so they know the image type. * Added DebuggerInterface::GetSymbolInfo(). * Implementing stopping the thread in main() when the debugger started the debugged program. Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp =================================================================== --- haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/TeamDebugger.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -24,6 +24,7 @@ #include "Jobs.h" #include "LocatableFile.h" #include "MessageCodes.h" +#include "SymbolInfo.h" #include "Statement.h" #include "TeamDebugInfo.h" #include "TeamDebugModel.h" @@ -288,6 +289,7 @@ // get the initial state of the team AutoLocker< ::Team> teamLocker(fTeam); + ThreadHandler* mainThreadHandler = NULL; { BObjectList threadInfos(20, true); status_t error = fDebuggerInterface->GetThreadInfos(threadInfos); @@ -305,17 +307,24 @@ fThreadHandlers.Insert(handler); + if (thread->IsMainThread()) + mainThreadHandler = handler; + handler->Init(); } } + Image* appImage = NULL; { BObjectList imageInfos(20, true); status_t error = fDebuggerInterface->GetImageInfos(imageInfos); for (int32 i = 0; ImageInfo* info = imageInfos.ItemAt(i); i++) { - error = _AddImage(*info); + Image* image; + error = _AddImage(*info, &image); if (error != B_OK) return error; + if (image->Type() == B_APP_IMAGE) + appImage = image; } } @@ -348,7 +357,13 @@ // if requested, stop the given thread if (threadID >= 0) { if (stopInMain) { - // TODO: Set a temporary breakpoint in main and run the thread. + SymbolInfo symbolInfo; + if (appImage != NULL && mainThreadHandler != NULL + && fDebuggerInterface->GetSymbolInfo( + fTeam->ID(), appImage->ID(), "main", B_SYMBOL_TYPE_TEXT, + symbolInfo) == B_OK) { + mainThreadHandler->SetBreakpointAndRun(symbolInfo.Address()); + } } else { debug_thread(threadID); // TODO: Superfluous, if the thread is already stopped. @@ -852,7 +867,7 @@ status_t -TeamDebugger::_AddImage(const ImageInfo& imageInfo) +TeamDebugger::_AddImage(const ImageInfo& imageInfo, Image** _image) { LocatableFile* file = NULL; if (strchr(imageInfo.Name(), '/') != NULL) @@ -868,6 +883,9 @@ if (imageHandler != NULL) fImageHandlers->Insert(imageHandler); + if (_image != NULL) + *_image = image; + return B_OK; } Modified: haiku/trunk/src/apps/debugger/TeamDebugger.h =================================================================== --- haiku/trunk/src/apps/debugger/TeamDebugger.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/TeamDebugger.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -94,7 +94,8 @@ ThreadHandler* _GetThreadHandler(thread_id threadID); - status_t _AddImage(const ImageInfo& imageInfo); + status_t _AddImage(const ImageInfo& imageInfo, + Image** _image = NULL); void _NotifyUser(const char* title, const char* text,...); Modified: haiku/trunk/src/apps/debugger/ThreadHandler.cpp =================================================================== --- haiku/trunk/src/apps/debugger/ThreadHandler.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/ThreadHandler.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -70,6 +70,26 @@ } +status_t +ThreadHandler::SetBreakpointAndRun(target_addr_t address) +{ + status_t error = _InstallTemporaryBreakpoint(address); + if (error != B_OK) + return error; + + fPreviousInstructionPointer = 0; + resume_thread(ThreadID()); + // TODO: This should probably better be a DebuggerInterface method, + // but this method is used only when debugging a local team anyway. + // Pretend "step out" mode, so that the temporary breakpoint hit will not + // be ignored. + fStepMode = STEP_OUT; + fSingleStepping = false; + + return B_OK; +} + + bool ThreadHandler::HandleThreadDebugged(ThreadDebuggedEvent* event) { Modified: haiku/trunk/src/apps/debugger/ThreadHandler.h =================================================================== --- haiku/trunk/src/apps/debugger/ThreadHandler.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/ThreadHandler.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -37,6 +37,9 @@ thread_id ThreadID() const { return fThread->ID(); } Thread* GetThread() const { return fThread; } + status_t SetBreakpointAndRun(target_addr_t address); + // team lock held + // All Handle*() methods are invoked in team debugger thread, // looper lock held. bool HandleThreadDebugged( Modified: haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -423,8 +423,8 @@ int32 cookie = 0; while (get_next_image_info(fTeamID, &cookie, &imageInfo) == B_OK) { ImageInfo* info = new(std::nothrow) ImageInfo(fTeamID, imageInfo.id, - imageInfo.name, (addr_t)imageInfo.text, imageInfo.text_size, - (addr_t)imageInfo.data, imageInfo.data_size); + imageInfo.name, imageInfo.type, (addr_t)imageInfo.text, + imageInfo.text_size, (addr_t)imageInfo.data, imageInfo.data_size); if (info == NULL || !infos.AddItem(info)) { delete info; return B_NO_MEMORY; @@ -438,9 +438,9 @@ if ((addr_t)imageInfo.text >= USER_COMMPAGE_ADDR && (addr_t)imageInfo.text < USER_COMMPAGE_ADDR + COMMPAGE_SIZE) { ImageInfo* info = new(std::nothrow) ImageInfo(B_SYSTEM_TEAM, - imageInfo.id, imageInfo.name, (addr_t)imageInfo.text, - imageInfo.text_size, (addr_t)imageInfo.data, - imageInfo.data_size); + imageInfo.id, imageInfo.name, imageInfo.type, + (addr_t)imageInfo.text, imageInfo.text_size, + (addr_t)imageInfo.data, imageInfo.data_size); if (info == NULL || !infos.AddItem(info)) { delete info; return B_NO_MEMORY; @@ -499,6 +499,36 @@ status_t +DebuggerInterface::GetSymbolInfo(team_id team, image_id image, const char* name, + int32 symbolType, SymbolInfo& info) +{ + // create a lookup context + // TODO: It's a bit expensive to create a lookup context just for one + // symbol! + debug_symbol_lookup_context* lookupContext; + status_t error = debug_create_symbol_lookup_context(team, &lookupContext); + if (error != B_OK) + return error; + + // try to get the symbol + void* foundAddress; + size_t foundSize; + int32 foundType; + error = debug_get_symbol(lookupContext, image, name, symbolType, + &foundAddress, &foundSize, &foundType); + if (error == B_OK) { + info.SetTo((target_addr_t)(addr_t)foundAddress, foundSize, foundType, + name); + } + + // delete the lookup context + debug_delete_symbol_lookup_context(lookupContext); + + return error; +} + + +status_t DebuggerInterface::GetThreadInfo(thread_id thread, ThreadInfo& info) { thread_info threadInfo; @@ -638,8 +668,9 @@ const image_info& info = message.image_created.info; event = new(std::nothrow) ImageCreatedEvent(message.origin.team, message.origin.thread, - ImageInfo(fTeamID, info.id, info.name, (addr_t)info.text, - info.text_size, (addr_t)info.data, info.data_size)); + ImageInfo(fTeamID, info.id, info.name, info.type, + (addr_t)info.text, info.text_size, (addr_t)info.data, + info.data_size)); break; } case B_DEBUGGER_MESSAGE_IMAGE_DELETED: @@ -647,8 +678,9 @@ const image_info& info = message.image_deleted.info; event = new(std::nothrow) ImageDeletedEvent(message.origin.team, message.origin.thread, - ImageInfo(fTeamID, info.id, info.name, (addr_t)info.text, - info.text_size, (addr_t)info.data, info.data_size)); + ImageInfo(fTeamID, info.id, info.name, info.type, + (addr_t)info.text, info.text_size, (addr_t)info.data, + info.data_size)); break; } default: Modified: haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.h =================================================================== --- haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/debugger_interface/DebuggerInterface.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -47,6 +47,9 @@ virtual status_t GetImageInfos(BObjectList& infos); virtual status_t GetSymbolInfos(team_id team, image_id image, BObjectList& infos); + virtual status_t GetSymbolInfo(team_id team, image_id image, + const char* name, int32 symbolType, + SymbolInfo& info); virtual status_t GetThreadInfo(thread_id thread, ThreadInfo& info); Modified: haiku/trunk/src/apps/debugger/model/Image.h =================================================================== --- haiku/trunk/src/apps/debugger/model/Image.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/Image.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -39,6 +39,7 @@ image_id ID() const { return fInfo.ImageID(); } const char* Name() const { return fInfo.Name(); } const ImageInfo& Info() const { return fInfo; } + image_type Type() const { return fInfo.Type(); } LocatableFile* ImageFile() const { return fImageFile; } bool ContainsAddress(target_addr_t address) const; Modified: haiku/trunk/src/apps/debugger/model/ImageInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/model/ImageInfo.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/ImageInfo.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -23,6 +23,7 @@ fTeam(other.fTeam), fImage(other.fImage), fName(other.fName), + fType(other.fType), fTextBase(other.fTextBase), fTextSize(other.fTextSize), fDataBase(other.fDataBase), @@ -32,12 +33,13 @@ ImageInfo::ImageInfo(team_id team, image_id image, const BString& name, - target_addr_t textBase, target_size_t textSize, target_addr_t dataBase, - target_size_t dataSize) + image_type type, target_addr_t textBase, target_size_t textSize, + target_addr_t dataBase, target_size_t dataSize) : fTeam(team), fImage(image), fName(name), + fType(type), fTextBase(textBase), fTextSize(textSize), fDataBase(dataBase), @@ -48,12 +50,13 @@ void ImageInfo::SetTo(team_id team, image_id image, const BString& name, - target_addr_t textBase, target_size_t textSize, target_addr_t dataBase, - target_size_t dataSize) + image_type type, target_addr_t textBase, target_size_t textSize, + target_addr_t dataBase, target_size_t dataSize) { fTeam = team; fImage = image; fName = name; + fType = type; fTextBase = textBase; fTextSize = textSize; fDataBase = dataBase; Modified: haiku/trunk/src/apps/debugger/model/ImageInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/model/ImageInfo.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/ImageInfo.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -16,14 +16,14 @@ ImageInfo(); ImageInfo(const ImageInfo& other); ImageInfo(team_id team, image_id image, - const BString& name, + const BString& name, image_type type, target_addr_t textBase, target_size_t textSize, target_addr_t dataBase, target_size_t dataSize); void SetTo(team_id team, image_id image, - const BString& name, + const BString& name, image_type type, target_addr_t textBase, target_size_t textSize, target_addr_t dataBase, @@ -32,6 +32,7 @@ team_id TeamID() const { return fTeam; } image_id ImageID() const { return fImage; } const char* Name() const { return fName.String(); } + image_type Type() const { return fType; } target_addr_t TextBase() const { return fTextBase; } target_size_t TextSize() const { return fTextSize; } @@ -42,6 +43,7 @@ thread_id fTeam; image_id fImage; BString fName; + image_type fType; target_addr_t fTextBase; target_size_t fTextSize; target_addr_t fDataBase; Modified: haiku/trunk/src/apps/debugger/model/SymbolInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/model/SymbolInfo.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/SymbolInfo.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -6,6 +6,16 @@ #include "SymbolInfo.h" +SymbolInfo::SymbolInfo() + : + fAddress(0), + fSize(0), + fType(0), + fName() +{ +} + + SymbolInfo::SymbolInfo(target_addr_t address, target_size_t size, uint32 type, const BString& name) : @@ -20,3 +30,14 @@ SymbolInfo::~SymbolInfo() { } + + +void +SymbolInfo::SetTo(target_addr_t address, target_size_t size, uint32 type, + const BString& name) +{ + fAddress = address; + fSize = size; + fType = type; + fName = name; +} Modified: haiku/trunk/src/apps/debugger/model/SymbolInfo.h =================================================================== --- haiku/trunk/src/apps/debugger/model/SymbolInfo.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/SymbolInfo.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -12,11 +12,15 @@ class SymbolInfo { public: + SymbolInfo(); SymbolInfo(target_addr_t address, target_size_t size, uint32 type, const BString& name); ~SymbolInfo(); + void SetTo(target_addr_t address, target_size_t size, + uint32 type, const BString& name); + target_addr_t Address() const { return fAddress; } target_size_t Size() const { return fSize; } uint32 Type() const { return fType; } Modified: haiku/trunk/src/apps/debugger/model/Thread.cpp =================================================================== --- haiku/trunk/src/apps/debugger/model/Thread.cpp 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/Thread.cpp 2009-07-03 14:23:19 UTC (rev 31393) @@ -37,6 +37,13 @@ } +bool +Thread::IsMainThread() const +{ + return fID == fTeam->ID(); +} + + void Thread::SetName(const BString& name) { Modified: haiku/trunk/src/apps/debugger/model/Thread.h =================================================================== --- haiku/trunk/src/apps/debugger/model/Thread.h 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/trunk/src/apps/debugger/model/Thread.h 2009-07-03 14:23:19 UTC (rev 31393) @@ -34,6 +34,8 @@ Team* GetTeam() const { return fTeam; } thread_id ID() const { return fID; } + bool IsMainThread() const; + const char* Name() const { return fName.String(); } void SetName(const BString& name); From bonefish at mail.berlios.de Fri Jul 3 16:46:11 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 16:46:11 +0200 Subject: [Haiku-commits] r31394 - haiku/trunk/src/apps/debugger/files Message-ID: <200907031446.n63EkBro028500@sheep.berlios.de> Author: bonefish Date: 2009-07-03 16:46:10 +0200 (Fri, 03 Jul 2009) New Revision: 31394 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31394&view=rev Modified: haiku/trunk/src/apps/debugger/files/FileManager.cpp haiku/trunk/src/apps/debugger/files/FileManager.h Log: Apparently the file names in the .debug_line section can be relative paths, not only file names. Changed the FileManager::Get*File() method versions taking directory path and file name to also accept relative file paths. They just join the paths and use the single-argument versions, which now does all the work. Fixes finding source files for which a relative path is given in .debug_line. Modified: haiku/trunk/src/apps/debugger/files/FileManager.cpp =================================================================== --- haiku/trunk/src/apps/debugger/files/FileManager.cpp 2009-07-03 14:23:19 UTC (rev 31393) +++ haiku/trunk/src/apps/debugger/files/FileManager.cpp 2009-07-03 14:46:10 UTC (rev 31394) @@ -124,11 +124,20 @@ return B_OK; } - LocatableFile* GetFile(const BString& directoryPath, const BString& name) + LocatableFile* GetFile(const BString& directoryPath, + const BString& relativePath) { - BString normalizedDirectoryPath; - _NormalizePath(directoryPath, normalizedDirectoryPath); - LocatableFile* file = _GetFile(normalizedDirectoryPath, name); + if (directoryPath.Length() == 0) + return GetFile(relativePath); + return GetFile(BString(directoryPath) << '/' << relativePath); + } + + LocatableFile* GetFile(const BString& path) + { + BString directoryPath; + BString name; + _SplitPath(path, directoryPath, name); + LocatableFile* file = _GetFile(directoryPath, name); if (file == NULL) return NULL; @@ -150,14 +159,6 @@ return file; } - LocatableFile* GetFile(const BString& path) - { - BString directoryPath; - BString name; - _SplitPath(path, directoryPath, name); - return _GetFile(directoryPath, name); - } - void EntryLocated(const BString& path, const BString& locatedPath) { BString directory; @@ -580,10 +581,11 @@ LocatableFile* -FileManager::GetTargetFile(const BString& directory, const BString& name) +FileManager::GetTargetFile(const BString& directory, + const BString& relativePath) { AutoLocker locker(this); - return fTargetDomain->GetFile(directory, name); + return fTargetDomain->GetFile(directory, relativePath); } @@ -604,10 +606,11 @@ LocatableFile* -FileManager::GetSourceFile(const BString& directory, const BString& name) +FileManager::GetSourceFile(const BString& directory, + const BString& relativePath) { AutoLocker locker(this); - return fSourceDomain->GetFile(directory, name); + return fSourceDomain->GetFile(directory, relativePath); } Modified: haiku/trunk/src/apps/debugger/files/FileManager.h =================================================================== --- haiku/trunk/src/apps/debugger/files/FileManager.h 2009-07-03 14:23:19 UTC (rev 31393) +++ haiku/trunk/src/apps/debugger/files/FileManager.h 2009-07-03 14:46:10 UTC (rev 31394) @@ -26,7 +26,7 @@ void Unlock() { fLock.Unlock(); } LocatableFile* GetTargetFile(const BString& directory, - const BString& name); + const BString& relativePath); // returns a reference LocatableFile* GetTargetFile(const BString& path); // returns a reference @@ -34,7 +34,7 @@ const BString& locatedPath); LocatableFile* GetSourceFile(const BString& directory, - const BString& name); + const BString& relativePath); // returns a reference LocatableFile* GetSourceFile(const BString& path); // returns a reference From joe.prostko+haiku at gmail.com Fri Jul 3 17:13:07 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Fri, 3 Jul 2009 15:13:07 +0000 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090703155615.1389.2@bepc.1246609415.fake> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> <20090703155615.1389.2@bepc.1246609415.fake> Message-ID: <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> On Fri, Jul 3, 2009 at 1:56 PM, Oliver Tappe wrote: > Hi Joseph, > > On 2009-07-03 at 13:46:02 [+0200], Joseph Prostko > wrote: > > I had actually built the GCC 4.3.3 compiler myself last night seeing >> as it looked as if you were done with GCC-related changes. I thought >> I would save you some time by building it, but apparently you didn't >> need the help, haha. I did use the latest GMP/MPFR and Binutils, but >> that's about the only difference probably, other than the fact that I >> used a slightly different configure invocation and didn't package >> anything yet. ;) > > Yeah, I thought about updating binutils, too, but then didn't want to to add > more work on top - the aim is to merge the 32bit-wchar_t branch back to > trunk, soon. > Yeah, it's no big deal. As a quick pointer, the Binutils 2.19.1 patch from the GNU FTP applies cleanly to the Binutils we have now (2.19). The GMP/MPFR stuff I did was unnecessary too, as I don't really think we should bother with them in the repository until at least MPFR 2.4.2 is out...or at all. 2.4.1 seems to have some tests that bomb out with GCC 4.4.x thus far in my testing. > In what way did your configure invocation differ? Well, it's certainly not as clean as yours. I kind of used some hybrid of yours and what was the invocation from the previous optional package. Yours: ../gcc/configure --prefix=/boot/develop/tools/gnupro --target=i586-pc-haiku --disable-nls --disable-shared --disable-multilib --enable-languages=c,c++ Mine: ../gcc-4.3.3/configure --prefix=/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090702 --with-local-prefix=/boot/common --oldincludedir=/boot/develop/headers/posix --disable-nls --disable-multilib --disable-libstdcxx-pch --enable-shared=libstdc++ --enable-languages=c,c++ Okay, naturally, first off I had my GCC in a different directory. Secondly, I made my prefix kind of long, seeing as I just wanted to install it to the right place upon make install. I may do it your way in the future though in the interest of length, readability, and consistency amongst compiler builds, since using DESTDIR is simple enough. I specified a local prefix, whereas you didn't, and I used the oldincludedir. These were present in the previous optional package as well. I assumed that the local prefix had to be set, since GCC defaults to /usr/local if you don't specify it. That said, it seems like our haiku.h should cover all of that in the INCLUDE_DEFAULTS section, hence making both with-local-prefix adn oldincludedir redundant, I suppose. You can see I didn't mention the target at all, as I saw no point since I was building natively. I also built a shared libstdc++ right along with GCC to save a step. I still had to make the shared libsupc++ afterwards, so it didn't really save too much time. I also disabled precompiled headers during the build. In the past I recall the build bombing out because it was making some PCH at two different optimization levels during the build, and then got confused. Sometimes I also build with --disable-bootstrap since it saves me from having to edit the makefile to avoid the build from bombing out when the bootstrap comparisons fail. Naturally the build is also way faster overall this way. I didn't try your GCC yet, but I assume it's safe to get rid of the --with-local-prefix and --old-include-dir stuff then? Some more questions... During the build, I always have fixincludes crash twice, and then the build chugs along after that. Did you have that issue? If not, that'd be cool, and must mean it's my invocation. Have you ever had the PCH issue I mentioned? I haven't seen if it was the case this time around and just disabled it without checking, so perhaps it's not even relevant anymore...or then again, it could be invocation related. In any case, I mostly like your invocation better, as it was on my TODO list to try to trim any more possible fat off of mine. Oh yeah, and I noticed you put all HTML documentation instead of having "man" documentation. I didn't expect that one. :) Well, that's it for now. - joe From joe.prostko+haiku at gmail.com Fri Jul 3 17:30:26 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Fri, 3 Jul 2009 15:30:26 +0000 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> <20090703155615.1389.2@bepc.1246609415.fake> <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> Message-ID: <7e5795b0907030830u4bed6860v469c3ff5c31c5e14@mail.gmail.com> On Fri, Jul 3, 2009 at 3:13 PM, Joseph Prostko wrote: > > since I was building natively. I also built a shared libstdc++ right > along with GCC to save a step. I still had to make the shared > libsupc++ afterwards, so it didn't really save too much time. I also I did notice you symlinked to the ones in /boot/system/lib, but I guess I was speaking more from where I had done things at the time. So yeah, no need for that whole --enable-shared=libstdc++ part now, seeing as that should no longer be relevant. Time to reboot and update everything with your changes! - joe From zooey at hirschkaefer.de Fri Jul 3 17:51:53 2009 From: zooey at hirschkaefer.de (Oliver Tappe) Date: Fri, 03 Jul 2009 17:51:53 +0200 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> <20090703155615.1389.2@bepc.1246609415.fake> <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> Message-ID: <20090703175153.1673.4@bepc.1246609415.fake> On 2009-07-03 at 17:13:07 [+0200], Joseph Prostko wrote: > On Fri, Jul 3, 2009 at 1:56 PM, Oliver Tappe wrote: > > In what way did your configure invocation differ? > > Well, it's certainly not as clean as yours. I kind of used some > hybrid of yours and what was the invocation from the previous optional > package. > > Yours: > > ../gcc/configure --prefix=/boot/develop/tools/gnupro > --target=i586-pc-haiku --disable-nls --disable-shared > --disable-multilib --enable-languages=c,c++ > > > Mine: > > ../gcc-4.3.3/configure > --prefix=/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090702 > --with-local-prefix=/boot/common > --oldincludedir=/boot/develop/headers/posix --disable-nls > --disable-multilib --disable-libstdcxx-pch --enable-shared=libstdc++ > --enable-languages=c,c++ > > Okay, naturally, first off I had my GCC in a different directory. > > Secondly, I made my prefix kind of long, seeing as I just wanted to > install it to the right place upon make install. I may do it your way > in the future though in the interest of length, readability, and > consistency amongst compiler builds, since using DESTDIR is simple > enough. > > I specified a local prefix, whereas you didn't, and I used the > oldincludedir. These were present in the previous optional package as > well. I assumed that the local prefix had to be set, since GCC > defaults to /usr/local if you don't specify it. That said, it seems > like our haiku.h should cover all of that in the INCLUDE_DEFAULTS > section, hence making both with-local-prefix adn oldincludedir > redundant, I suppose. > > You can see I didn't mention the target at all, as I saw no point > since I was building natively. I also built a shared libstdc++ right > along with GCC to save a step. I still had to make the shared > libsupc++ afterwards, so it didn't really save too much time. I also > disabled precompiled headers during the build. In the past I recall > the build bombing out because it was making some PCH at two different > optimization levels during the build, and then got confused. > Sometimes I also build with --disable-bootstrap since it saves me from > having to edit the makefile to avoid the build from bombing out when > the bootstrap comparisons fail. Naturally the build is also way > faster overall this way. > > I didn't try your GCC yet, but I assume it's safe to get rid of the > --with-local-prefix and --old-include-dir stuff then? Hohum, I suppose I just missed most of that stuff, really. I'm not very familiar with build newer gcc releases, so it might very well be the case that my release contains bugs/problems. > Some more questions... > > During the build, I always have fixincludes crash twice, and then the > build chugs along after that. Did you have that issue? If not, > that'd be cool, and must mean it's my invocation. Yes, I've seen those, too. It feels kinda uncool to just let it continue, doesn't it? > Have you ever had the PCH issue I mentioned? I haven't seen if it was > the case this time around and just disabled it without checking, so > perhaps it's not even relevant anymore...or then again, it could be > invocation related. I had that at the first try, at least I think that's what you refer to: the build stopped after stage3 with failures during the comparison of the stage2 and stage3 compilers. Strangely enough, it worked when I tried again after a clean checkout. cheers, Oliver From zooey at mail.berlios.de Fri Jul 3 18:14:32 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Fri, 3 Jul 2009 18:14:32 +0200 Subject: [Haiku-commits] r31395 - in haiku/branches/features/32bit-wchar_t: build/jam headers/os/bluetooth/HCI headers/os/kernel headers/private/bluetooth headers/private/debug headers/private/interface headers/private/shared src/add-ons/accelerants/nvidia/engine src/add-ons/media/plugins src/add-ons/media/plugins/ffmpeg src/apps/debugger src/apps/debugger/debug_info src/apps/debugger/debugger_interface src/apps/debugger/dwarf src/apps/debugger/files src/apps/debugger/gui/team_window src/apps/debugger/model src/apps/icon-o-matic/generic/gui/scrollview src/kits/bluetooth src/kits/debug src/kits/interface src/kits/shared src/kits/support src/kits/tracker src/preferences/bluetooth src/preferences/time src/servers/bluetooth src/servers/input src/system/kernel src/system/libroot/os Message-ID: <200907031614.n63GEWJR006757@sheep.berlios.de> Author: zooey Date: 2009-07-03 18:14:11 +0200 (Fri, 03 Jul 2009) New Revision: 31395 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31395&view=rev Added: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ffmpeg/ haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/LineNumberProgram.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/LineNumberProgram.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/files/ haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/FileSourceCode.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/FileSourceCode.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/util/ haiku/branches/features/32bit-wchar_t/src/system/libroot/os/time.cpp Removed: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/avcodec/ haiku/branches/features/32bit-wchar_t/src/apps/debugger/Array.h haiku/branches/features/32bit-wchar_t/src/system/libroot/os/time.c Modified: haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI.h haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_command.h haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_event.h haiku/branches/features/32bit-wchar_t/headers/os/kernel/OS.h haiku/branches/features/32bit-wchar_t/headers/private/bluetooth/bluetoothserver_p.h haiku/branches/features/32bit-wchar_t/headers/private/debug/debug_support.h haiku/branches/features/32bit-wchar_t/headers/private/interface/MenuWindow.h haiku/branches/features/32bit-wchar_t/headers/private/shared/Referenceable.h haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac2.c haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_info.c haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/Jamfile haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ffmpeg/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/MessageCodes.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/ThreadHandler.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/ThreadHandler.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/BasicFunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DebuggerTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfImageDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/DwarfTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/FunctionDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/SpecificTeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/TeamDebugInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debug_info/TeamDebugInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/debugger_interface/DebuggerInterface.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/debugger_interface/DebuggerInterface.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/CompilationUnit.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfFile.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfUtils.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/DwarfUtils.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/dwarf/Jamfile haiku/branches/features/32bit-wchar_t/src/apps/debugger/files/FileManager.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/files/FileManager.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ImageFunctionsView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/SourceView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/TeamWindow.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ThreadListView.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/gui/team_window/ThreadListView.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Image.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Image.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/ImageInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/ImageInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/SymbolInfo.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/SymbolInfo.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Team.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Team.h haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Thread.cpp haiku/branches/features/32bit-wchar_t/src/apps/debugger/model/Thread.h haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/generic/gui/scrollview/ScrollView.h haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.cpp haiku/branches/features/32bit-wchar_t/src/apps/icon-o-matic/generic/gui/scrollview/Scroller.h haiku/branches/features/32bit-wchar_t/src/kits/bluetooth/CommandManager.cpp haiku/branches/features/32bit-wchar_t/src/kits/debug/Image.cpp haiku/branches/features/32bit-wchar_t/src/kits/debug/Image.h haiku/branches/features/32bit-wchar_t/src/kits/debug/SymbolLookup.cpp haiku/branches/features/32bit-wchar_t/src/kits/debug/SymbolLookup.h haiku/branches/features/32bit-wchar_t/src/kits/debug/debug_support.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/Menu.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/MenuWindow.cpp haiku/branches/features/32bit-wchar_t/src/kits/interface/View.cpp haiku/branches/features/32bit-wchar_t/src/kits/shared/CalendarView.cpp haiku/branches/features/32bit-wchar_t/src/kits/support/Referenceable.cpp haiku/branches/features/32bit-wchar_t/src/kits/tracker/PoseView.cpp haiku/branches/features/32bit-wchar_t/src/kits/tracker/TitleView.cpp haiku/branches/features/32bit-wchar_t/src/preferences/bluetooth/BluetoothDeviceView.cpp haiku/branches/features/32bit-wchar_t/src/preferences/time/DateTimeEdit.cpp haiku/branches/features/32bit-wchar_t/src/preferences/time/DateTimeEdit.h haiku/branches/features/32bit-wchar_t/src/preferences/time/DateTimeView.cpp haiku/branches/features/32bit-wchar_t/src/preferences/time/SectionEdit.cpp haiku/branches/features/32bit-wchar_t/src/preferences/time/SectionEdit.h haiku/branches/features/32bit-wchar_t/src/preferences/time/ZoneView.cpp haiku/branches/features/32bit-wchar_t/src/servers/bluetooth/BluetoothServer.cpp haiku/branches/features/32bit-wchar_t/src/servers/bluetooth/LocalDeviceImpl.cpp haiku/branches/features/32bit-wchar_t/src/servers/bluetooth/LocalDeviceImpl.h haiku/branches/features/32bit-wchar_t/src/servers/input/MethodReplicant.cpp haiku/branches/features/32bit-wchar_t/src/system/kernel/real_time_clock.c haiku/branches/features/32bit-wchar_t/src/system/libroot/os/Jamfile Log: * merging changes from trunk up to r31394 and fix linking problems Modified: haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage =================================================================== --- haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/build/jam/HaikuImage 2009-07-03 16:14:11 UTC (rev 31395) @@ -122,7 +122,7 @@ #legacy.media_addon ; SYSTEM_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder - aiff_reader asf_reader au_reader $(X86_ONLY)avcodec avi_reader + aiff_reader asf_reader au_reader avi_reader $(X86_ONLY)ffmpeg matroska mov_reader mp3_decoder mp3_reader mp4_reader musepack Modified: haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -20,6 +20,13 @@ HCI_NUM_PACKET_TYPES } bt_packet_t; +const char* BluetoothCommandOpcode(uint16 opcode); +const char* BluetoothEvent(uint8 event); +const char* BluetoothManufacturer(uint16 manufacturer); +const char* BluetoothHciVersion(uint16 ver); +const char* BluetoothLmpVersion(uint16 ver); +const char* BluetoothError(uint8 error); + /* packets sizes */ #define HCI_MAX_ACL_SIZE 1024 #define HCI_MAX_SCO_SIZE 255 Modified: haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_command.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_command.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_command.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -10,12 +10,6 @@ #define HCI_COMMAND_HDR_SIZE 3 -const char* GetCommand(uint16 command); -const char* GetEvent(uint8 event); -const char* GetManufacturer(uint16 manufacturer); -const char* GetHciVersion(uint16 ver); -const char* GetLmpVersion(uint16 ver); - struct hci_command_header { uint16 opcode; /* OCF & OGF */ uint8 clen; Modified: haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_event.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_event.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/os/bluetooth/HCI/btHCI_event.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -292,7 +292,7 @@ // TODO: Define remaining Bluetooth 2.1 events structures #define HCI_EVENT_EXTENDED_INQUIRY_RESULT 0x2F -#define HCI_EVENT_ENCRYPTION_KEY_REFERSH_COMPLETE 0x30 +#define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30 #define HCI_EVENT_IO_CAPABILITY_REQUEST 0x31 Modified: haiku/branches/features/32bit-wchar_t/headers/os/kernel/OS.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/os/kernel/OS.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/os/kernel/OS.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,11 +1,11 @@ -/* Kernel specific structures and functions - * - * Copyright 2004-2006, Haiku Inc. All Rights Reserved. +/* + * Copyright 2004-2009, Haiku Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _OS_H #define _OS_H +//! Kernel specific structures and functions #include @@ -17,7 +17,6 @@ extern "C" { #endif -/*-------------------------------------------------------------*/ /* System constants */ #define B_OS_NAME_LENGTH 32 @@ -37,7 +36,7 @@ | B_TIMEOUT_REAL_TIME_BASE }; -/*-------------------------------------------------------------*/ + /* Types */ typedef int32 area_id; @@ -47,7 +46,6 @@ typedef int32 thread_id; -/*-------------------------------------------------------------*/ /* Areas */ typedef struct area_info { @@ -82,28 +80,28 @@ #define B_READ_AREA 1 #define B_WRITE_AREA 2 -extern area_id create_area(const char *name, void **startAddress, uint32 addressSpec, - size_t size, uint32 lock, uint32 protection); -extern area_id clone_area(const char *name, void **destAddress, uint32 addressSpec, - uint32 protection, area_id source); -extern area_id find_area(const char *name); -extern area_id area_for(void *address); -extern status_t delete_area(area_id id); -extern status_t resize_area(area_id id, size_t newSize); -extern status_t set_area_protection(area_id id, uint32 newProtection); +extern area_id create_area(const char *name, void **startAddress, + uint32 addressSpec, size_t size, uint32 lock, + uint32 protection); +extern area_id clone_area(const char *name, void **destAddress, + uint32 addressSpec, uint32 protection, area_id source); +extern area_id find_area(const char *name); +extern area_id area_for(void *address); +extern status_t delete_area(area_id id); +extern status_t resize_area(area_id id, size_t newSize); +extern status_t set_area_protection(area_id id, uint32 newProtection); /* system private, use macros instead */ -extern status_t _get_area_info(area_id id, area_info *areaInfo, size_t size); -extern status_t _get_next_area_info(team_id team, int32 *cookie, - area_info *areaInfo, size_t size); +extern status_t _get_area_info(area_id id, area_info *areaInfo, size_t size); +extern status_t _get_next_area_info(team_id team, int32 *cookie, + area_info *areaInfo, size_t size); #define get_area_info(id, areaInfo) \ - _get_area_info((id), (areaInfo),sizeof(*(areaInfo))) + _get_area_info((id), (areaInfo),sizeof(*(areaInfo))) #define get_next_area_info(team, cookie, areaInfo) \ - _get_next_area_info((team), (cookie), (areaInfo), sizeof(*(areaInfo))) + _get_next_area_info((team), (cookie), (areaInfo), sizeof(*(areaInfo))) -/*-------------------------------------------------------------*/ /* Ports */ typedef struct port_info { @@ -115,31 +113,35 @@ int32 total_count; /* total # msgs read so far */ } port_info; -extern port_id create_port(int32 capacity, const char *name); -extern port_id find_port(const char *name); -extern ssize_t read_port(port_id port, int32 *code, void *buffer, size_t bufferSize); -extern ssize_t read_port_etc(port_id port, int32 *code, void *buffer, size_t bufferSize, - uint32 flags, bigtime_t timeout); -extern status_t write_port(port_id port, int32 code, const void *buffer, size_t bufferSize); -extern status_t write_port_etc(port_id port, int32 code, const void *buffer, - size_t bufferSize, uint32 flags, bigtime_t timeout); -extern status_t close_port(port_id port); -extern status_t delete_port(port_id port); +extern port_id create_port(int32 capacity, const char *name); +extern port_id find_port(const char *name); +extern ssize_t read_port(port_id port, int32 *code, void *buffer, + size_t bufferSize); +extern ssize_t read_port_etc(port_id port, int32 *code, void *buffer, + size_t bufferSize, uint32 flags, bigtime_t timeout); +extern status_t write_port(port_id port, int32 code, const void *buffer, + size_t bufferSize); +extern status_t write_port_etc(port_id port, int32 code, const void *buffer, + size_t bufferSize, uint32 flags, bigtime_t timeout); +extern status_t close_port(port_id port); +extern status_t delete_port(port_id port); -extern ssize_t port_buffer_size(port_id port); -extern ssize_t port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout); -extern ssize_t port_count(port_id port); -extern status_t set_port_owner(port_id port, team_id team); +extern ssize_t port_buffer_size(port_id port); +extern ssize_t port_buffer_size_etc(port_id port, uint32 flags, + bigtime_t timeout); +extern ssize_t port_count(port_id port); +extern status_t set_port_owner(port_id port, team_id team); /* system private, use the macros instead */ -extern status_t _get_port_info(port_id port, port_info *portInfo, size_t portInfoSize); -extern status_t _get_next_port_info(team_id team, int32 *cookie, port_info *portInfo, - size_t portInfoSize); +extern status_t _get_port_info(port_id port, port_info *portInfo, + size_t portInfoSize); +extern status_t _get_next_port_info(team_id team, int32 *cookie, + port_info *portInfo, size_t portInfoSize); #define get_port_info(port, info) \ - _get_port_info((port), (info), sizeof(*(info))) + _get_port_info((port), (info), sizeof(*(info))) #define get_next_port_info(team, cookie, info) \ - _get_next_port_info((team), (cookie), (info), sizeof(*(info))) + _get_next_port_info((team), (cookie), (info), sizeof(*(info))) /* WARNING: The following is Haiku experimental API. It might be removed or @@ -153,15 +155,14 @@ } port_message_info; /* similar to port_buffer_size_etc(), but returns (more) info */ -extern status_t _get_port_message_info_etc(port_id port, - port_message_info *info, size_t infoSize, uint32 flags, - bigtime_t timeout); +extern status_t _get_port_message_info_etc(port_id port, + port_message_info *info, size_t infoSize, uint32 flags, + bigtime_t timeout); #define get_port_message_info_etc(port, info, flags, timeout) \ - _get_port_message_info_etc((port), (info), sizeof(*(info)), flags, \ - timeout) + _get_port_message_info_etc((port), (info), sizeof(*(info)), flags, timeout) -/*-------------------------------------------------------------*/ + /* Semaphores */ typedef struct sem_info { @@ -191,33 +192,34 @@ threads waiting */ }; -extern sem_id create_sem(int32 count, const char *name); -extern status_t delete_sem(sem_id id); -extern status_t acquire_sem(sem_id id); -extern status_t acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout); -extern status_t release_sem(sem_id id); -extern status_t release_sem_etc(sem_id id, int32 count, uint32 flags); -/* ToDo: the following two calls are not part of the BeOS API, and might be +extern sem_id create_sem(int32 count, const char *name); +extern status_t delete_sem(sem_id id); +extern status_t acquire_sem(sem_id id); +extern status_t acquire_sem_etc(sem_id id, int32 count, uint32 flags, + bigtime_t timeout); +extern status_t release_sem(sem_id id); +extern status_t release_sem_etc(sem_id id, int32 count, uint32 flags); +/* TODO: the following two calls are not part of the BeOS API, and might be changed or even removed for the final release of Haiku R1 */ -extern status_t switch_sem(sem_id semToBeReleased, sem_id id); -extern status_t switch_sem_etc(sem_id semToBeReleased, sem_id id, int32 count, - uint32 flags, bigtime_t timeout); -extern status_t get_sem_count(sem_id id, int32 *threadCount); -extern status_t set_sem_owner(sem_id id, team_id team); +extern status_t switch_sem(sem_id semToBeReleased, sem_id id); +extern status_t switch_sem_etc(sem_id semToBeReleased, sem_id id, + int32 count, uint32 flags, bigtime_t timeout); +extern status_t get_sem_count(sem_id id, int32 *threadCount); +extern status_t set_sem_owner(sem_id id, team_id team); /* system private, use the macros instead */ -extern status_t _get_sem_info(sem_id id, struct sem_info *info, size_t infoSize); -extern status_t _get_next_sem_info(team_id team, int32 *cookie, struct sem_info *info, - size_t infoSize); +extern status_t _get_sem_info(sem_id id, struct sem_info *info, + size_t infoSize); +extern status_t _get_next_sem_info(team_id team, int32 *cookie, + struct sem_info *info, size_t infoSize); #define get_sem_info(sem, info) \ - _get_sem_info((sem), (info), sizeof(*(info))) + _get_sem_info((sem), (info), sizeof(*(info))) #define get_next_sem_info(team, cookie, info) \ - _get_next_sem_info((team), (cookie), (info), sizeof(*(info))) + _get_next_sem_info((team), (cookie), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ /* Teams */ typedef struct { @@ -236,18 +238,19 @@ #define B_CURRENT_TEAM 0 #define B_SYSTEM_TEAM 1 -extern status_t kill_team(team_id team); +extern status_t kill_team(team_id team); /* see also: send_signal() */ /* system private, use macros instead */ -extern status_t _get_team_info(team_id id, team_info *info, size_t size); -extern status_t _get_next_team_info(int32 *cookie, team_info *info, size_t size); +extern status_t _get_team_info(team_id id, team_info *info, size_t size); +extern status_t _get_next_team_info(int32 *cookie, team_info *info, + size_t size); #define get_team_info(id, info) \ - _get_team_info((id), (info), sizeof(*(info))) + _get_team_info((id), (info), sizeof(*(info))) #define get_next_team_info(cookie, info) \ - _get_next_team_info((cookie), (info), sizeof(*(info))) + _get_next_team_info((cookie), (info), sizeof(*(info))) /* team usage info */ @@ -263,12 +266,13 @@ }; /* system private, use macros instead */ -extern status_t _get_team_usage_info(team_id team, int32 who, team_usage_info *info, size_t size); +extern status_t _get_team_usage_info(team_id team, int32 who, + team_usage_info *info, size_t size); #define get_team_usage_info(team, who, info) \ - _get_team_usage_info((team), (who), (info), sizeof(*(info))) + _get_team_usage_info((team), (who), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ + /* Threads */ typedef enum { @@ -311,7 +315,8 @@ #define thread_entry thread_func /* thread_entry is for backward compatibility only! Use thread_func */ -extern thread_id spawn_thread(thread_func, const char *name, int32 priority, void *data); +extern thread_id spawn_thread(thread_func, const char *name, int32 priority, + void *data); extern status_t kill_thread(thread_id thread); extern status_t resume_thread(thread_id thread); extern status_t suspend_thread(thread_id thread); @@ -319,14 +324,16 @@ extern status_t rename_thread(thread_id thread, const char *newName); extern status_t set_thread_priority (thread_id thread, int32 newPriority); extern void exit_thread(status_t status); -extern status_t wait_for_thread (thread_id thread, status_t *threadReturnValue); +extern status_t wait_for_thread (thread_id thread, + status_t *threadReturnValue); extern status_t on_exit_thread(void (*callback)(void *), void *data); extern thread_id find_thread(const char *name); extern status_t send_data(thread_id thread, int32 code, const void *buffer, size_t bufferSize); -extern int32 receive_data(thread_id *sender, void *buffer, size_t bufferSize); +extern int32 receive_data(thread_id *sender, void *buffer, + size_t bufferSize); extern bool has_data(thread_id thread); extern status_t snooze(bigtime_t amount); @@ -339,23 +346,22 @@ thread_info *info, size_t size); #define get_thread_info(id, info) \ - _get_thread_info((id), (info), sizeof(*(info))) + _get_thread_info((id), (info), sizeof(*(info))) #define get_next_thread_info(team, cookie, info) \ - _get_next_thread_info((team), (cookie), (info), sizeof(*(info))) + _get_next_thread_info((team), (cookie), (info), sizeof(*(info))) -/*-------------------------------------------------------------*/ /* Time */ extern uint32 real_time_clock(void); -extern void set_real_time_clock(uint32 secs_since_jan1_1970); +extern void set_real_time_clock(uint32 secsSinceJan1st1970); extern bigtime_t real_time_clock_usecs(void); -extern status_t set_timezone(char *timezone); -extern bigtime_t system_time(void); /* time since booting in microseconds */ +extern status_t set_timezone(const char *timezone); +extern bigtime_t system_time(void); + /* time since booting in microseconds */ -/*-------------------------------------------------------------*/ /* Alarm */ enum { @@ -364,13 +370,12 @@ B_PERIODIC_ALARM /* "when" specifies the period */ }; -extern bigtime_t set_alarm(bigtime_t when, uint32 flags); +extern bigtime_t set_alarm(bigtime_t when, uint32 flags); -/*-------------------------------------------------------------*/ /* Debugger */ -extern void debugger(const char *message); +extern void debugger(const char *message); /* calling this function with a non-zero value will cause your thread @@ -380,18 +385,17 @@ to re-enable the default debugger pass a zero. */ -extern int disable_debugger(int state); +extern int disable_debugger(int state); /* TODO: Remove. Temporary debug helper. */ -extern void debug_printf(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); -extern void debug_vprintf(const char *format, va_list args); -extern void ktrace_printf(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); -extern void ktrace_vprintf(const char *format, va_list args); +extern void debug_printf(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); +extern void debug_vprintf(const char *format, va_list args); +extern void ktrace_printf(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); +extern void ktrace_vprintf(const char *format, va_list args); -/*-------------------------------------------------------------*/ /* System information */ #if __INTEL__ @@ -409,10 +413,8 @@ # define B_MAX_CPU_COUNT 1 #endif -#define OBOS_CPU_TYPES - typedef enum cpu_types { - /* ToDo: add latest models */ + /* TODO: add latest models */ /* Motorola/IBM */ B_CPU_PPC_UNKNOWN = 0, @@ -641,7 +643,8 @@ } regs; } cpuid_info; -extern status_t get_cpuid(cpuid_info *info, uint32 eaxRegister, uint32 cpuNum); +extern status_t get_cpuid(cpuid_info *info, uint32 eaxRegister, + uint32 cpuNum); #endif @@ -672,20 +675,20 @@ typedef int32 machine_id[2]; /* unique machine ID */ typedef struct { - machine_id id; /* unique machine ID */ - bigtime_t boot_time; /* time of boot (usecs since 1/1/1970) */ + machine_id id; /* unique machine ID */ + bigtime_t boot_time; /* time of boot (usecs since 1/1/1970) */ - int32 cpu_count; /* number of cpus */ - enum cpu_types cpu_type; /* type of cpu */ - int32 cpu_revision; /* revision # of cpu */ + int32 cpu_count; /* number of cpus */ + enum cpu_types cpu_type; /* type of cpu */ + int32 cpu_revision; /* revision # of cpu */ cpu_info cpu_infos[B_MAX_CPU_COUNT]; /* info about individual cpus */ - int64 cpu_clock_speed; /* processor clock speed (Hz) */ - int64 bus_clock_speed; /* bus clock speed (Hz) */ - enum platform_types platform_type; /* type of machine we're on */ + int64 cpu_clock_speed; /* processor clock speed (Hz) */ + int64 bus_clock_speed; /* bus clock speed (Hz) */ + enum platform_types platform_type; /* type of machine we're on */ - int32 max_pages; /* total # physical pages */ - int32 used_pages; /* # physical pages in use */ - int32 page_faults; /* # of page faults */ + int32 max_pages; /* total # physical pages */ + int32 used_pages; /* # physical pages in use */ + int32 page_faults; /* # of page faults */ int32 max_sems; int32 used_sems; int32 max_ports; @@ -695,27 +698,27 @@ int32 max_teams; int32 used_teams; - char kernel_name[B_FILE_NAME_LENGTH]; /* name of kernel */ - char kernel_build_date[B_OS_NAME_LENGTH]; /* date kernel built */ - char kernel_build_time[B_OS_NAME_LENGTH]; /* time kernel built */ - int64 kernel_version; /* version of this kernel */ + char kernel_name[B_FILE_NAME_LENGTH]; + char kernel_build_date[B_OS_NAME_LENGTH]; + char kernel_build_time[B_OS_NAME_LENGTH]; + int64 kernel_version; - bigtime_t _busy_wait_time; /* reserved for whatever */ + bigtime_t _busy_wait_time; /* reserved for whatever */ int32 cached_pages; - uint32 abi; /* the system API */ + uint32 abi; /* the system API */ - int32 pad[2]; /* just in case... */ + int32 pad[2]; } system_info; /* system private, use macro instead */ -extern status_t _get_system_info(system_info *info, size_t size); +extern status_t _get_system_info(system_info *info, size_t size); #define get_system_info(info) \ - _get_system_info((info), sizeof(*(info))) + _get_system_info((info), sizeof(*(info))) -extern int32 is_computer_on(void); -extern double is_computer_on_fire(void); +extern int32 is_computer_on(void); +extern double is_computer_on_fire(void); /* WARNING: Experimental API! */ @@ -758,9 +761,9 @@ and B_EVENT_DISCONNECTED don't need to be specified. They will always be reported, when they occur. */ -extern ssize_t wait_for_objects(object_wait_info* infos, int numInfos); -extern ssize_t wait_for_objects_etc(object_wait_info* infos, int numInfos, - uint32 flags, bigtime_t timeout); +extern ssize_t wait_for_objects(object_wait_info* infos, int numInfos); +extern ssize_t wait_for_objects_etc(object_wait_info* infos, int numInfos, + uint32 flags, bigtime_t timeout); #ifdef __cplusplus Modified: haiku/branches/features/32bit-wchar_t/headers/private/bluetooth/bluetoothserver_p.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/bluetooth/bluetoothserver_p.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/private/bluetooth/bluetoothserver_p.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -11,6 +11,7 @@ #define BT_MSG_ACQUIRE_LOCAL_DEVICE 'btAd' #define BT_MSG_HANDLE_SIMPLE_REQUEST 'btsR' #define BT_MSG_ADD_DEVICE 'btDD' +#define BT_MSG_REMOVE_DEVICE 'btrD' #define BT_MSG_GET_PROPERTY 'btgP' // Discovery Modified: haiku/branches/features/32bit-wchar_t/headers/private/debug/debug_support.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/debug/debug_support.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/private/debug/debug_support.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -62,6 +62,9 @@ void debug_delete_symbol_lookup_context( debug_symbol_lookup_context *lookupContext); +status_t debug_get_symbol(debug_symbol_lookup_context* lookupContext, + image_id image, const char* name, int32 symbolType, + void** _symbolLocation, size_t* _symbolSize, int32* _symbolType); status_t debug_lookup_symbol_address(debug_symbol_lookup_context *lookupContext, const void *address, void **baseAddress, char *symbolName, int32 symbolNameSize, char *imageName, int32 imageNameSize, Modified: haiku/branches/features/32bit-wchar_t/headers/private/interface/MenuWindow.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/interface/MenuWindow.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/private/interface/MenuWindow.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,13 +1,13 @@ /* - * Copyright 2001-2006, Haiku, Inc. + * Copyright 2001-2009, Haiku, Inc. * Distributed under the terms of the MIT License. * * Authors: * Marc Flerackers (mflerackers at androme.be) * Stefano Ceccherini (burton666 at libero.it) */ -#ifndef __MENUWINDOW_H -#define __MENUWINDOW_H +#ifndef MENU_WINDOW_H +#define MENU_WINDOW_H #include @@ -22,34 +22,39 @@ class BMenuWindow : public BWindow { - public: - BMenuWindow(const char *name); - virtual ~BMenuWindow(); +public: + BMenuWindow(const char* name); + virtual ~BMenuWindow(); - virtual void DispatchMessage(BMessage *message, BHandler *handler); - - void AttachMenu(BMenu *menu); - void DetachMenu(); - - void AttachScrollers(); - void DetachScrollers(); + virtual void DispatchMessage(BMessage* message, + BHandler* handler); - bool CheckForScrolling(const BPoint &cursor); - bool TryScrollBy(const float &step); - - private: - BMenu *fMenu; - BMenuFrame *fMenuFrame; - BMenuScroller *fUpperScroller; - BMenuScroller *fLowerScroller; - - float fValue; - float fLimit; - - bool _Scroll(const BPoint &cursor); - void _ScrollBy(const float &step); + void AttachMenu(BMenu* menu); + void DetachMenu(); + + void AttachScrollers(); + void DetachScrollers(); + + void SetSmallStep(float step); + void GetSteps(float* _smallStep, float* _largeStep); + bool HasScrollers() const; + bool CheckForScrolling(const BPoint& cursor); + bool TryScrollBy(const float& step); + +private: + bool _Scroll(const BPoint& cursor); + void _ScrollBy(const float& step); + + BMenu* fMenu; + BMenuFrame* fMenuFrame; + BMenuScroller* fUpperScroller; + BMenuScroller* fLowerScroller; + + float fScrollStep; + float fValue; + float fLimit; }; } // namespace BPrivate -#endif // __MENUWINDOW_H +#endif // MENU_WINDOW_H Modified: haiku/branches/features/32bit-wchar_t/headers/private/shared/Referenceable.h =================================================================== --- haiku/branches/features/32bit-wchar_t/headers/private/shared/Referenceable.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/headers/private/shared/Referenceable.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007, Ingo Weinhold, bonefish at users.sf.net. All rights reserved. + * Copyright 2004-2009, Ingo Weinhold, ingo_weinhold at gmx.de. * Distributed under the terms of the MIT License. */ #ifndef _REFERENCEABLE_H @@ -15,21 +15,46 @@ public: Referenceable( bool deleteWhenUnreferenced = true); + // TODO: The parameter is deprecated. + // Override LastReferenceReleased() + // instead! virtual ~Referenceable(); - void AddReference() - { atomic_add(&fReferenceCount, 1); } + void AcquireReference(); + bool ReleaseReference(); + // returns true after last - bool RemoveReference(); // returns true after last - int32 CountReferences() const { return fReferenceCount; } + // deprecate aliases + inline void AddReference(); + inline bool RemoveReference(); + protected: + virtual void FirstReferenceAcquired(); + virtual void LastReferenceReleased(); + +protected: vint32 fReferenceCount; bool fDeleteWhenUnreferenced; }; + +void +Referenceable::AddReference() +{ + AcquireReference(); +} + + +bool +Referenceable::RemoveReference() +{ + return ReleaseReference(); +} + + // Reference template class Reference { Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac.c =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac.c 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac.c 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,6 +1,6 @@ /* program the DAC */ /* Author: - Rudolf Cornelissen 12/2003-6/2009 + Rudolf Cornelissen 12/2003-7/2009 */ #define MODULE_BIT 0x00010000 @@ -222,7 +222,7 @@ if (si->ps.ext_pll) { dividers2 = DACR(PIXPLLC2); - if (dividers2 & 0x8000000) { + if (dividers2 & 0x80000000) { /* the extended PLL part is enabled */ m2 = (dividers2 & 0x000000ff); n2 = (dividers2 & 0x0000ff00) >> 8; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac2.c =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_dac2.c 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,6 +1,6 @@ /* program the secondary DAC */ /* Author: - Rudolf Cornelissen 12/2003-6/2009 + Rudolf Cornelissen 12/2003-7/2009 */ #define MODULE_BIT 0x00001000 @@ -225,7 +225,7 @@ if (si->ps.ext_pll) { dividers2 = DAC2R(PIXPLLC2); - if (dividers2 & 0x8000000) { + if (dividers2 & 0x80000000) { /* the extended PLL part is enabled */ m2 = (dividers2 & 0x000000ff); n2 = (dividers2 & 0x0000ff00) >> 8; Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_info.c =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-03 16:14:11 UTC (rev 31395) @@ -1,7 +1,7 @@ /* Read initialisation information from card */ /* some bits are hacks, where PINS is not known */ /* Author: - Rudolf Cornelissen 7/2003-6/2009 + Rudolf Cornelissen 7/2003-7/2009 */ #define MODULE_BIT 0x00002000 @@ -2623,16 +2623,16 @@ * Also the BIOS might have programmed for a lower mode than EDID reports: * which limits our use of the panel (LVDS link setup too slow). */ if(si->ps.monitors & CRTC2_TMDS) { - si->ps.crtc2_screen.timing.pixel_clock = si->ps.p1_timing.pixel_clock; - si->ps.crtc2_screen.timing.h_display = si->ps.p1_timing.h_display; - si->ps.crtc2_screen.timing.h_sync_start = si->ps.p1_timing.h_sync_start; - si->ps.crtc2_screen.timing.h_sync_end = si->ps.p1_timing.h_sync_end; - si->ps.crtc2_screen.timing.h_total = si->ps.p1_timing.h_total; - si->ps.crtc2_screen.timing.v_display = si->ps.p1_timing.h_display; - si->ps.crtc2_screen.timing.v_sync_start = si->ps.p1_timing.v_sync_start; - si->ps.crtc2_screen.timing.v_sync_end = si->ps.p1_timing.v_sync_end; - si->ps.crtc2_screen.timing.v_total = si->ps.p1_timing.v_total; - si->ps.crtc2_screen.timing.flags = si->ps.p1_timing.flags; + si->ps.crtc2_screen.timing.pixel_clock = si->ps.p2_timing.pixel_clock; + si->ps.crtc2_screen.timing.h_display = si->ps.p2_timing.h_display; + si->ps.crtc2_screen.timing.h_sync_start = si->ps.p2_timing.h_sync_start; + si->ps.crtc2_screen.timing.h_sync_end = si->ps.p2_timing.h_sync_end; + si->ps.crtc2_screen.timing.h_total = si->ps.p2_timing.h_total; + si->ps.crtc2_screen.timing.v_display = si->ps.p2_timing.h_display; + si->ps.crtc2_screen.timing.v_sync_start = si->ps.p2_timing.v_sync_start; + si->ps.crtc2_screen.timing.v_sync_end = si->ps.p2_timing.v_sync_end; + si->ps.crtc2_screen.timing.v_total = si->ps.p2_timing.v_total; + si->ps.crtc2_screen.timing.flags = si->ps.p2_timing.flags; si->ps.crtc2_screen.have_edid = true; si->ps.crtc2_screen.aspect = (si->ps.p2_timing.h_display / ((float)si->ps.p2_timing.v_display)); Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/Jamfile 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/Jamfile 2009-07-03 16:14:11 UTC (rev 31395) @@ -3,27 +3,24 @@ SetSubDirSupportedPlatformsBeOSCompatible ; SubInclude HAIKU_TOP src add-ons media plugins aiff_reader ; +SubInclude HAIKU_TOP src add-ons media plugins ape_reader ; +SubInclude HAIKU_TOP src add-ons media plugins asf_reader ; SubInclude HAIKU_TOP src add-ons media plugins au_reader ; SubInclude HAIKU_TOP src add-ons media plugins avi_reader ; -SubInclude HAIKU_TOP src add-ons media plugins mp3_reader ; -SubInclude HAIKU_TOP src add-ons media plugins wav_reader ; -SubInclude HAIKU_TOP src add-ons media plugins ape_reader ; - +SubInclude HAIKU_TOP src add-ons media plugins ffmpeg ; SubInclude HAIKU_TOP src add-ons media plugins matroska ; +SubInclude HAIKU_TOP src add-ons media plugins mov_reader ; +SubInclude HAIKU_TOP src add-ons media plugins mp3_decoder ; +SubInclude HAIKU_TOP src add-ons media plugins mp3_reader ; +SubInclude HAIKU_TOP src add-ons media plugins mp4_reader ; SubInclude HAIKU_TOP src add-ons media plugins musepack ; SubInclude HAIKU_TOP src add-ons media plugins ogg ; - -SubInclude HAIKU_TOP src add-ons media plugins mp3_decoder ; SubInclude HAIKU_TOP src add-ons media plugins raw_decoder ; - -SubInclude HAIKU_TOP src add-ons media plugins avcodec ; -SubInclude HAIKU_TOP src add-ons media plugins vorbis ; SubInclude HAIKU_TOP src add-ons media plugins speex ; -SubInclude HAIKU_TOP src add-ons media plugins mov_reader ; -SubInclude HAIKU_TOP src add-ons media plugins mp4_reader ; +#SubInclude HAIKU_TOP src add-ons media plugins theora ; +SubInclude HAIKU_TOP src add-ons media plugins vorbis ; +SubInclude HAIKU_TOP src add-ons media plugins wav_reader ; -SubInclude HAIKU_TOP src add-ons media plugins asf_reader ; - # The following add-ons are GPL licensed, and can only be used with # software whose license is GPL compatible. To include these GPL # licensed add-ons, you need to run configure with the --include-gpl-addons Copied: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ffmpeg (from rev 31392, haiku/trunk/src/add-ons/media/plugins/ffmpeg) Modified: haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ffmpeg/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile 2009-07-03 14:20:27 UTC (rev 31392) +++ haiku/branches/features/32bit-wchar_t/src/add-ons/media/plugins/ffmpeg/Jamfile 2009-07-03 16:14:11 UTC (rev 31395) @@ -29,6 +29,7 @@ be libmedia.so libz.a + $(TARGET_LIBSUPC++) ; SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ; Deleted: haiku/branches/features/32bit-wchar_t/src/apps/debugger/Array.h Modified: haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jamfile =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jamfile 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jamfile 2009-07-03 16:14:11 UTC (rev 31395) @@ -11,9 +11,11 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) debug_info ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) debugger_interface ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) elf ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) files ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) gui team_window ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) model ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) types ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) util ] ; local debugAnalyzerSources = [ FDirName $(HAIKU_TOP) src apps debuganalyzer ] ; @@ -68,6 +70,13 @@ # elf ElfFile.cpp + # files + FileManager.cpp + LocatableDirectory.cpp + LocatableEntry.cpp + LocatableFile.cpp + SourceFile.cpp + # gui/team_window ImageFunctionsView.cpp ImageListView.cpp @@ -80,6 +89,7 @@ # model Breakpoint.cpp DisassembledCode.cpp + FileSourceCode.cpp Image.cpp ImageInfo.cpp SourceCode.cpp @@ -96,6 +106,9 @@ # types TargetAddressRangeList.cpp + # util + StringUtils.cpp + : Debugger_demangler.o Debugger_disasm_x86.o Modified: haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.cpp =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.cpp 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/apps/debugger/Jobs.cpp 2009-07-03 16:14:11 UTC (rev 31395) @@ -253,7 +253,7 @@ // create the debug info ImageDebugInfo* debugInfo; status_t error = fImage->GetTeam()->DebugInfo()->LoadImageDebugInfo( - imageInfo, debugInfo); + imageInfo, fImage->ImageFile(), debugInfo); // set the result locker.Lock(); Modified: haiku/branches/features/32bit-wchar_t/src/apps/debugger/MessageCodes.h =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/debugger/MessageCodes.h 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/apps/debugger/MessageCodes.h 2009-07-03 16:14:11 UTC (rev 31395) @@ -19,6 +19,7 @@ MSG_THREAD_CPU_STATE_CHANGED = 'tcsc', MSG_THREAD_STACK_TRACE_CHANGED = 'tstc', MSG_IMAGE_DEBUG_INFO_CHANGED = 'idic', + MSG_IMAGE_FILE_CHANGED = 'ifch', MSG_FUNCTION_SOURCE_CODE_CHANGED = 'fnsc', MSG_USER_BREAKPOINT_CHANGED = 'ubrc', MSG_DEBUGGER_EVENT = 'dbge', Modified: haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.cpp =================================================================== --- haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.cpp 2009-07-03 14:46:10 UTC (rev 31394) +++ haiku/branches/features/32bit-wchar_t/src/apps/debugger/TeamDebugger.cpp 2009-07-03 16:14:11 UTC (rev 31395) @@ -20,13 +20,95 @@ #include "BreakpointManager.h" #include "CpuState.h" #include "DebuggerInterface.h" +#include "FileManager.h" #include "Jobs.h" +#include "LocatableFile.h" #include "MessageCodes.h" +#include "SymbolInfo.h" #include "Statement.h" #include "TeamDebugInfo.h" #include "TeamDebugModel.h" +// #pragma mark - ImageHandler + +struct TeamDebugger::ImageHandler : public Referenceable, + public HashTableLink, private LocatableFile::Listener { +public: + ImageHandler(TeamDebugger* teamDebugger, Image* image) + : + fTeamDebugger(teamDebugger), + fImage(image) + { + fImage->AcquireReference(); + if (fImage->ImageFile() != NULL) + fImage->ImageFile()->AddListener(this); + } + + ~ImageHandler() + { + if (fImage->ImageFile() != NULL) + fImage->ImageFile()->RemoveListener(this); + fImage->ReleaseReference(); + } + + Image* GetImage() const + { + return fImage; + } + + image_id ImageID() const + { + return fImage->ID(); + } + +private: + // LocatableFile::Listener + virtual void LocatableFileChanged(LocatableFile* file) + { + BMessage message(MSG_IMAGE_FILE_CHANGED); + message.AddInt32("image", fImage->ID()); + fTeamDebugger->PostMessage(&message); + } + +private: + TeamDebugger* fTeamDebugger; + Image* fImage; +}; + + +// #pragma mark - ImageHandlerHashDefinition + + +struct TeamDebugger::ImageHandlerHashDefinition { [... truncated: 5748 lines follow ...] From joe.prostko+haiku at gmail.com Fri Jul 3 18:45:11 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Fri, 3 Jul 2009 12:45:11 -0400 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <20090703175153.1673.4@bepc.1246609415.fake> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> <20090703155615.1389.2@bepc.1246609415.fake> <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> <20090703175153.1673.4@bepc.1246609415.fake> Message-ID: <7e5795b0907030945t75204545u3f8fe90cb62b86e5@mail.gmail.com> On Fri, Jul 3, 2009 at 11:51 AM, Oliver Tappe wrote: > > On 2009-07-03 at 17:13:07 [+0200], Joseph Prostko >> >> I didn't try your GCC yet, but I assume it's safe to get rid of the >> --with-local-prefix and --old-include-dir stuff then? > > Hohum, I suppose I just missed most of that stuff, really. I'm not very > familiar with build newer gcc releases, so it might very well be the case that > my release contains bugs/problems. > Alright, I suppose we'll see what happens then, hehe. At least if something comes up we'll have some idea where to look. >> During the build, I always have fixincludes crash twice, and then the >> build chugs along after that. ?Did you have that issue? ?If not, >> that'd be cool, and must mean it's my invocation. > > Yes, I've seen those, too. It feels kinda uncool to just let it continue, > doesn't it? Indeed it does. I've been meaning to investigate it, but kind of just ignored it for now. I did make some other little changes in the 4.4 patch I have for things that seem to be left over from the BeOS days. I think I'll try building the latest 4.4 snapshot of that later today with those changes to see if that magically changes anything, haha. >> Have you ever had the PCH issue I mentioned? > > I had that at the first try, at least I think that's what you refer to: the > build stopped after stage3 with failures during the comparison of the stage2 > and stage3 compilers. Strangely enough, it worked when I tried again after a > clean checkout. No, that is the bootstrap comparison problem I talked about. I generally get around that by building via --disable-bootstrap or else commenting out the three lines in the makefile that produce an error if there is a bootstrap comparison failure. I found what I am referring to in one of my older build logs: /boot/home/Downloads/GCC/440/gcc-4.4.0/libstdc++-v3/include/precompiled/extc++.h:29:28: warning: /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdtr1c++.h.gch/O2g.gch: too short to be a PCH file In file included from /boot/home/Downloads/GCC/440/gcc-4.4.0/libstdc++-v3/include/precompiled/extc++.h:29: /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdtr1c++.h:29:25: warning: /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdc++.h.gch/O0g.gch: not used because `__NO_INLINE__' not defined Maybe that was just a problem with Haiku at the time though when I was building. I do remember around that time that I had to keep changing libio.h around to get things like PPL (optional for GCC 4.4) to build. That issue has been fixed in the meantime. In any case, I'm fairly certain the PCH error occurred with GCC 4.3.3 (not just 4.4.0 as you see above). Naturally, it happens way late in the build, so it is always a let down when it happens. I started just unconditionally using --disable-libstdcxx-pch since it was bugging me way too much. I'll give a go without it on my next 4.4-related build to see what happens. - joe From joe.prostko+haiku at gmail.com Fri Jul 3 18:49:27 2009 From: joe.prostko+haiku at gmail.com (Joseph Prostko) Date: Fri, 3 Jul 2009 12:49:27 -0400 Subject: [Haiku-commits] r31387 - haiku/branches/features/32bit-wchar_t/build/jam In-Reply-To: <7e5795b0907030945t75204545u3f8fe90cb62b86e5@mail.gmail.com> References: <200907031026.n63AQ7sc018752@sheep.berlios.de> <7e5795b0907030446s5f3bb05fi1f1a4d846d58a818@mail.gmail.com> <20090703155615.1389.2@bepc.1246609415.fake> <7e5795b0907030813sc5ced42rdc6538531efc8d77@mail.gmail.com> <20090703175153.1673.4@bepc.1246609415.fake> <7e5795b0907030945t75204545u3f8fe90cb62b86e5@mail.gmail.com> Message-ID: <7e5795b0907030949l49eea9e4vfe8bcdbe505bfc26@mail.gmail.com> On Fri, Jul 3, 2009 at 12:45 PM, Joseph Prostko wrote: > I found what I am referring to in one of my older build logs: > > /boot/home/Downloads/GCC/440/gcc-4.4.0/libstdc++-v3/include/precompiled/extc++.h:29:28: > warning: /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdtr1c++.h.gch/O2g.gch: > too short to be a PCH file > In file included from > /boot/home/Downloads/GCC/440/gcc-4.4.0/libstdc++-v3/include/precompiled/extc++.h:29: > /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdtr1c++.h:29:25: > warning: /boot/home/Downloads/GCC/440/440build/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku/bits/stdc++.h.gch/O0g.gch: > not used because `__NO_INLINE__' not defined I must need to take a course on copy/paste, since I forgot the part with the ICE that happens right below the above "__NO_INLINE__" line... xgcc: Internal error: Kill Thread (program cc1plus) Please submit a full bug report. See for instructions. make[4]: *** [i586-pc-haiku/bits/extc++.h.gch/O2g.gch] Error 1 From axeld at mail.berlios.de Fri Jul 3 18:54:39 2009 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Fri, 3 Jul 2009 18:54:39 +0200 Subject: [Haiku-commits] r31396 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4 Message-ID: <200907031654.n63Gsd46024277@sheep.berlios.de> Author: axeld Date: 2009-07-03 18:54:23 +0200 (Fri, 03 Jul 2009) New Revision: 31396 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31396&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp Log: * Fixed getsockopt(), patch by Ma Jie - it would always assume IP_MULTICAST_TTL. Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp 2009-07-03 16:14:11 UTC (rev 31395) +++ haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp 2009-07-03 16:54:23 UTC (rev 31396) @@ -1122,7 +1122,7 @@ return get_int_option(value, *_length, protocol->time_to_live); if (option == IP_TOS) return get_int_option(value, *_length, protocol->service_type); - if (IP_MULTICAST_TTL) { + if (option == IP_MULTICAST_TTL) { return get_int_option(value, *_length, protocol->multicast_time_to_live); } From rudolfc at mail.berlios.de Fri Jul 3 21:14:36 2009 From: rudolfc at mail.berlios.de (rudolfc at BerliOS) Date: Fri, 3 Jul 2009 21:14:36 +0200 Subject: [Haiku-commits] r31397 - haiku/trunk/src/add-ons/accelerants/nvidia/engine Message-ID: <200907031914.n63JEaK1004122@sheep.berlios.de> Author: rudolfc Date: 2009-07-03 21:14:35 +0200 (Fri, 03 Jul 2009) New Revision: 31397 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31397&view=rev Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c Log: sometimes it's hard to not make copy and paste errors. This fixes modes showing up in screenprefs for higher vertical resolutions than the screen can display. Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c =================================================================== --- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-03 16:54:23 UTC (rev 31396) +++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c 2009-07-03 19:14:35 UTC (rev 31397) @@ -2598,7 +2598,7 @@ si->ps.crtc1_screen.timing.h_sync_start = si->ps.p1_timing.h_sync_start; si->ps.crtc1_screen.timing.h_sync_end = si->ps.p1_timing.h_sync_end; si->ps.crtc1_screen.timing.h_total = si->ps.p1_timing.h_total; - si->ps.crtc1_screen.timing.v_display = si->ps.p1_timing.h_display; + si->ps.crtc1_screen.timing.v_display = si->ps.p1_timing.v_display; si->ps.crtc1_screen.timing.v_sync_start = si->ps.p1_timing.v_sync_start; si->ps.crtc1_screen.timing.v_sync_end = si->ps.p1_timing.v_sync_end; si->ps.crtc1_screen.timing.v_total = si->ps.p1_timing.v_total; @@ -2628,7 +2628,7 @@ si->ps.crtc2_screen.timing.h_sync_start = si->ps.p2_timing.h_sync_start; si->ps.crtc2_screen.timing.h_sync_end = si->ps.p2_timing.h_sync_end; si->ps.crtc2_screen.timing.h_total = si->ps.p2_timing.h_total; - si->ps.crtc2_screen.timing.v_display = si->ps.p2_timing.h_display; + si->ps.crtc2_screen.timing.v_display = si->ps.p2_timing.v_display; si->ps.crtc2_screen.timing.v_sync_start = si->ps.p2_timing.v_sync_start; si->ps.crtc2_screen.timing.v_sync_end = si->ps.p2_timing.v_sync_end; si->ps.crtc2_screen.timing.v_total = si->ps.p2_timing.v_total; From bonefish at mail.berlios.de Fri Jul 3 22:58:02 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 22:58:02 +0200 Subject: [Haiku-commits] r31398 - haiku/trunk/src/apps/debugger/dwarf Message-ID: <200907032058.n63Kw2BS013268@sheep.berlios.de> Author: bonefish Date: 2009-07-03 22:58:02 +0200 (Fri, 03 Jul 2009) New Revision: 31398 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31398&view=rev Modified: haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.cpp haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.h Log: DIEClassBaseType: Also handle inner types. Modified: haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.cpp 2009-07-03 19:14:35 UTC (rev 31397) +++ haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.cpp 2009-07-03 20:58:02 UTC (rev 31398) @@ -471,7 +471,14 @@ // TODO: Templates! // TODO: Variants! default: + { + if (child->IsType()) { + fInnerTypes.Add(child); + return B_OK; + } + return DIECompoundType::AddChild(child); + } } } Modified: haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.h =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.h 2009-07-03 19:14:35 UTC (rev 31397) +++ haiku/trunk/src/apps/debugger/dwarf/DebugInfoEntries.h 2009-07-03 20:58:02 UTC (rev 31398) @@ -343,6 +343,7 @@ DebugInfoEntryList fFriends; DebugInfoEntryList fAccessDeclarations; DebugInfoEntryList fMemberFunctions; + DebugInfoEntryList fInnerTypes; }; From bonefish at mail.berlios.de Fri Jul 3 23:04:47 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 23:04:47 +0200 Subject: [Haiku-commits] r31399 - haiku/trunk/src/apps/debugger/dwarf Message-ID: <200907032104.n63L4lIQ013647@sheep.berlios.de> Author: bonefish Date: 2009-07-03 23:04:46 +0200 (Fri, 03 Jul 2009) New Revision: 31399 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31399&view=rev Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp Log: * Get*DIEName(): Also follow abstract origins to get the name. * GetDeclarationLocation(): - Don't fail already when the entry itself doesn't support a declaration location, since that fails for inlined functions. - Follow abstract origin and specification, even if they don't have a have a declaration location. The latter doesn't matter in this case, but we failed erroneously, if the abstract origin had a specification which in turn had the declaration location info. Modified: haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp =================================================================== --- haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 20:58:02 UTC (rev 31398) +++ haiku/trunk/src/apps/debugger/dwarf/DwarfUtils.cpp 2009-07-03 21:04:46 UTC (rev 31399) @@ -14,14 +14,25 @@ /*static*/ void DwarfUtils::GetDIEName(const DebugInfoEntry* entry, BString& _name) { - // If we don't seem to have a name but a specification, return the - // specification's name. + // If we don't seem to have a name but an abstract origin, return the + // origin's name. const char* name = entry->Name(); if (name == NULL) { - if (DebugInfoEntry* specification = entry->Specification()) - name = specification->Name(); + if (DebugInfoEntry* abstractOrigin = entry->AbstractOrigin()) { + entry = abstractOrigin; + name = entry->Name(); + } } + // If we still don't have a name but a specification, return the + // specification's name. + if (name == NULL) { + if (DebugInfoEntry* specification = entry->Specification()) { + entry = specification; + name = entry->Name(); + } + } + _name = name; } @@ -29,13 +40,22 @@ /*static*/ void DwarfUtils::GetFullDIEName(const DebugInfoEntry* entry, BString& _name) { - // If we don't seem to have a name but a specification, return the - // specification's name. + // If we don't seem to have a name but an abstract origin, return the + // origin's name. const char* name = entry->Name(); if (name == NULL) { + if (DebugInfoEntry* abstractOrigin = entry->AbstractOrigin()) { + entry = abstractOrigin; + name = entry->Name(); + } + } + + // If we still don't have a name but a specification, return the + // specification's name. + if (name == NULL) { if (DebugInfoEntry* specification = entry->Specification()) { entry = specification; - name = specification->Name(); + name = entry->Name(); } } @@ -49,7 +69,14 @@ DwarfUtils::GetFullyQualifiedDIEName(const DebugInfoEntry* entry, BString& _name) { - // If we don't seem to have a name but a specification, return the + // If we don't seem to have a name but an abstract origin, return the + // origin's name. + if (entry->Name() == NULL) { + if (DebugInfoEntry* abstractOrigin = entry->AbstractOrigin()) + entry = abstractOrigin; + } + + // If we don't still don't have a name but a specification, get the // specification's name. if (entry->Name() == NULL) { if (DebugInfoEntry* specification = entry->Specification()) @@ -87,29 +114,24 @@ const DebugInfoEntry* entry, const char*& _directory, const char*& _file, int32& _line, int32& _column) { - uint32 file; - uint32 line; - uint32 column; - if (!entry->GetDeclarationLocation(file, line, column)) - return false; + uint32 file = 0; + uint32 line = 0; + uint32 column = 0; + entry->GetDeclarationLocation(file, line, column); // if no info yet, try the abstract origin (if any) if (file == 0) { if (DebugInfoEntry* abstractOrigin = entry->AbstractOrigin()) { - if (abstractOrigin->GetDeclarationLocation(file, line, column) - && file != 0) { - entry = abstractOrigin; - } + entry = abstractOrigin; + entry->GetDeclarationLocation(file, line, column); } } // if no info yet, try the specification (if any) if (file == 0) { if (DebugInfoEntry* specification = entry->Specification()) { - if (specification->GetDeclarationLocation(file, line, column) - && file != 0) { - entry = specification; - } + entry = specification; + entry->GetDeclarationLocation(file, line, column); } } From bonefish at mail.berlios.de Fri Jul 3 23:09:30 2009 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 3 Jul 2009 23:09:30 +0200 Subject: [Haiku-commits] r31400 - haiku/trunk/src/apps/debugger/debug_info Message-ID: <200907032109.n63L9U7H013933@sheep.berlios.de> Author: bonefish Date: 2009-07-03 23:09:29 +0200 (Fri, 03 Jul 2009) New Revision: 31400 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31400&view=rev Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp Log: Don't skip subprogram entries that have an abstract origin. Only do so, when the function is actually inlined, which we already checked for anyway. Now the source location info should be retrieved correctly for all functions, even if if we get potential duplicates for non-inlined functions. This has to be dealt with differently, though. Modified: haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp =================================================================== --- haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 21:04:46 UTC (rev 31399) +++ haiku/trunk/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp 2009-07-03 21:09:29 UTC (rev 31400) @@ -197,8 +197,7 @@ if (subprogramEntry->IsDeclaration() || subprogramEntry->IsPrototyped() || subprogramEntry->Inline() == DW_INL_inlined - || subprogramEntry->Inline() == DW_INL_declared_inlined - || subprogramEntry->AbstractOrigin() != NULL) { + || subprogramEntry->Inline() == DW_INL_declared_inlined) { continue; } From zooey at mail.berlios.de Fri Jul 3 23:31:28 2009 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Fri, 3 Jul 2009 23:31:28 +0200 Subject: [Haiku-commits] r31401 - haiku/trunk/src/bin/network/ftpd Message-ID: <200907032131.n63LVSUx015580@sheep.berlios.de> Author: zooey Date: 2009-07-03 23:31:28 +0200 (Fri, 03 Jul 2009) New Revision: 31401 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31401&view=rev Modified: haiku/trunk/src/bin/network/ftpd/ftpcmd.y Log: * rearranged quoted C code such that the first reference of a token happens after the tokens have been declared - this fixes #3137 for good (without ftpcmd.y depending on itself) Modified: haiku/trunk/src/bin/network/ftpd/ftpcmd.y =================================================================== --- haiku/trunk/src/bin/network/ftpd/ftpcmd.y 2009-07-03 21:09:29 UTC (rev 31400) +++ haiku/trunk/src/bin/network/ftpd/ftpcmd.y 2009-07-03 21:31:28 UTC (rev 31401) @@ -76,10 +76,6 @@ #include "extern.h" #include "pathnames.h" -#ifdef YYPULL -#include "ftpcmd.h" -#endif - extern union sockunion data_dest, his_addr; extern int hostinfo; extern int logged_in; @@ -130,6 +126,49 @@ #define MAXASIZE 10240 /* Deny ASCII SIZE on files larger than that */ +%} + +%union { + struct { + off_t o; + int i; + } u; + char *s; +} + +%token + A B C E F I + L N P R S T + ALL + + SP CRLF COMMA + + USER PASS ACCT REIN QUIT PORT + PASV TYPE STRU MODE RETR STOR + APPE MLFL MAIL MSND MSOM MSAM + MRSQ MRCP ALLO REST RNFR RNTO + ABOR DELE CWD LIST NLST SITE + STAT HELP NOOP MKD RMD PWD + CDUP STOU SMNT SYST SIZE MDTM + LPRT LPSV EPRT EPSV FEAT + + UMASK IDLE CHMOD MDFIVE + + LEXERR NOTIMPL + +%token STRING +%token NUMBER + +%type check_login octal_number byte_size +%type check_login_ro check_login_epsv +%type struct_code mode_code type_code form_code +%type pathstring pathname password username +%type ALL NOTIMPL + +%start cmd_list + +%{ + struct tab { char *name; short token; @@ -223,45 +262,6 @@ %} -%union { - struct { - off_t o; - int i; - } u; - char *s; -} - -%token - A B C E F I - L N P R S T - ALL - - SP CRLF COMMA - - USER PASS ACCT REIN QUIT PORT - PASV TYPE STRU MODE RETR STOR - APPE MLFL MAIL MSND MSOM MSAM - MRSQ MRCP ALLO REST RNFR RNTO - ABOR DELE CWD LIST NLST SITE - STAT HELP NOOP MKD RMD PWD - CDUP STOU SMNT SYST SIZE MDTM - LPRT LPSV EPRT EPSV FEAT - - UMASK IDLE CHMOD MDFIVE - - LEXERR NOTIMPL - -%token STRING -%token NUMBER - -%type check_login octal_number byte_size -%type check_login_ro check_login_epsv -%type struct_code mode_code type_code form_code -%type pathstring pathname password username -%type ALL NOTIMPL - -%start cmd_list - %% cmd_list From stippi at mail.berlios.de Fri Jul 3 23:40:21 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Fri, 3 Jul 2009 23:40:21 +0200 Subject: [Haiku-commits] r31402 - haiku/trunk/src/add-ons/media/plugins/ffmpeg Message-ID: <200907032140.n63LeLeH015903@sheep.berlios.de> Author: stippi Date: 2009-07-03 23:40:19 +0200 (Fri, 03 Jul 2009) New Revision: 31402 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31402&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.h Log: * Fleshed out some more of the format detection. * Moved stuff from testing in Sniff() into class members. * Added function to gfx_utils() that converts an FFmpeg pix_fmt to color_space. Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-03 21:31:28 UTC (rev 31401) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 2009-07-03 21:40:19 UTC (rev 31402) @@ -13,13 +13,10 @@ #include #include -//#include +#include #include -extern "C" { - #include "avformat.h" - #include "libavutil/avstring.h" -} +#include "gfx_util.h" //#include "RawFormats.h" @@ -36,11 +33,18 @@ #define ERROR(a...) fprintf(stderr, a) +static const size_t kIOBufferSize = 64 * 1024; + // TODO: This could depend on the BMediaFile creation flags, IIRC, + // the allow to specify a buffering mode. + + AVFormatReader::AVFormatReader() : - fContext(NULL) + fContext(NULL), + fIOBuffer(NULL) { TRACE("AVFormatReader::AVFormatReader\n"); + memset(&fFormatParameters, 0, sizeof(fFormatParameters)); } @@ -48,7 +52,8 @@ { TRACE("AVFormatReader::~AVFormatReader\n"); - // TODO: Deallocate fContext + av_free(fContext); + free(fIOBuffer); } @@ -68,16 +73,17 @@ { TRACE("AVFormatReader::Sniff\n"); - size_t bufferSize = 64 * 1024; + free(fIOBuffer); + fIOBuffer = (uint8*)malloc(kIOBufferSize); + size_t probeSize = 1024; - uint8 buffer[bufferSize]; AVProbeData probeData; probeData.filename = ""; - probeData.buf = buffer; + probeData.buf = fIOBuffer; probeData.buf_size = probeSize; // Read a bit of the input... - if (_ReadPacket(Source(), buffer, probeSize) != (ssize_t)probeSize) + if (_ReadPacket(Source(), fIOBuffer, probeSize) != (ssize_t)probeSize) return B_IO_ERROR; // ...and seek back to the beginning of the file. _Seek(Source(), 0, SEEK_SET); @@ -93,20 +99,15 @@ TRACE("AVFormatReader::Sniff() - av_probe_input_format(): %s\n", inputFormat->name); - ByteIOContext ioContext; - - // Init io module for input - if (init_put_byte(&ioContext, buffer, bufferSize, 0, Source(), + // Init I/O context with buffer and hook functions + if (init_put_byte(&fIOContext, fIOBuffer, kIOBufferSize, 0, Source(), _ReadPacket, 0, _Seek) != 0) { TRACE("AVFormatReader::Sniff() - init_put_byte() failed!\n"); return B_ERROR; } - AVFormatParameters formatParameters; - memset(&formatParameters, 0, sizeof(formatParameters)); - - if (av_open_input_stream(&fContext, &ioContext, "", inputFormat, - &formatParameters) < 0) { + if (av_open_input_stream(&fContext, &fIOContext, "", inputFormat, + &fFormatParameters) < 0) { TRACE("AVFormatReader::Sniff() - av_open_input_stream() failed!\n"); return B_ERROR; } @@ -122,7 +123,11 @@ // Dump information about stream onto standard error dump_format(fContext, 0, "", 0); - return B_ERROR; + if (streamCount != NULL) + *streamCount = fContext->nb_streams; + +// return B_OK; +return B_ERROR; // For now... } @@ -131,16 +136,41 @@ { TRACE("AVFormatReader::GetFileFormatInfo\n"); + if (fContext == NULL || fContext->iformat == NULL) { + TRACE(" no context or AVInputFormat!\n"); + return; + } + mff->capabilities = media_file_format::B_READABLE | media_file_format::B_KNOWS_ENCODED_VIDEO | media_file_format::B_KNOWS_ENCODED_AUDIO | media_file_format::B_IMPERFECTLY_SEEKABLE; mff->family = B_MISC_FORMAT_FAMILY; mff->version = 100; - strcpy(mff->mime_type, "video/mpg"); - strcpy(mff->file_extension, "mpg"); - strcpy(mff->short_name, "MPEG"); - strcpy(mff->pretty_name, "MPEG (Motion Picture Experts Group)"); + strcpy(mff->mime_type, ""); + // TODO: Would be nice to be able to provide this, maybe by extending + // the FFmpeg code itself (all demuxers, see AVInputFormat struct). + + if (fContext->iformat->extensions != NULL) + strcpy(mff->file_extension, fContext->iformat->extensions); + else { + TRACE(" no file extensions for AVInputFormat.\n"); + strcpy(mff->file_extension, ""); + } + + if (fContext->iformat->name != NULL) + strcpy(mff->short_name, fContext->iformat->name); + else { + TRACE(" no short name for AVInputFormat.\n"); + strcpy(mff->short_name, ""); + } + + if (fContext->iformat->long_name != NULL) + strcpy(mff->pretty_name, fContext->iformat->long_name); + else { + TRACE(" no long name for AVInputFormat.\n"); + strcpy(mff->pretty_name, ""); + } } @@ -148,18 +178,132 @@ status_t -AVFormatReader::AllocateCookie(int32 streamNumber, void** _cookie) +AVFormatReader::AllocateCookie(int32 streamIndex, void** _cookie) { - TRACE("AVFormatReader::AllocateCookie(%ld)\n", streamNumber); + TRACE("AVFormatReader::AllocateCookie(%ld)\n", streamIndex); - return B_ERROR; + if (fContext == NULL) + return B_NO_INIT; + + if (streamIndex < 0 || streamIndex >= (int32)fContext->nb_streams) + return B_BAD_INDEX; + + if (_cookie == NULL) + return B_BAD_VALUE; + + StreamCookie* cookie = new(std::nothrow) StreamCookie; + if (cookie == NULL) + return B_NO_MEMORY; + + // Get a pointer to the codec context for the stream at sreamIndex. + AVCodecContext* codecContext = fContext->streams[streamIndex]->codec; + AVCodec* codec = avcodec_find_decoder(codecContext->codec_id); + if (codec == NULL || avcodec_open(codecContext, codec) < 0) { + delete cookie; + return B_ERROR; + } + +// codecContext->get_buffer = _GetBuffer; +// codecContext->release_buffer = _ReleaseBuffer; + + AVStream* stream = fContext->streams[streamIndex]; + + cookie->stream = stream; + cookie->codecContext = codecContext; + cookie->codec = codec; + + media_format* format = &cookie->format; + memset(format, 0, sizeof(media_format)); + + BMediaFormats formats; + media_format_description description; + + if (stream->codec->codec_type == CODEC_TYPE_VIDEO) { + // TODO: Fix this up! Maybe do this for AVI demuxer and MOV + // demuxer and use B_MISC_FORMAT_FAMILY for all the others? + description.family = B_AVI_FORMAT_FAMILY; + description.u.avi.codec = codecContext->codec_tag; + TRACE(" fourcc '%.4s'\n", (char*)&codecContext->codec_tag); + + if (formats.GetFormatFor(description, format) < B_OK) + format->type = B_MEDIA_ENCODED_VIDEO; + +// format->require_flags = +// format->deny_flags = + + format->user_data_type = B_CODEC_TYPE_INFO; + *(uint32*)format->user_data = codecContext->codec_tag; + format->user_data[4] = 0; + + // TODO: We don't actually know the bitrate for this stream, + // only the total bitrate! + format->u.encoded_video.avg_bit_rate = codecContext->bit_rate; + format->u.encoded_video.max_bit_rate = codecContext->bit_rate + + codecContext->bit_rate_tolerance; + + format->u.encoded_video.encoding = media_encoded_video_format::B_ANY; + + format->u.encoded_video.frame_size = 1; +// format->u.encoded_video.forward_history = 0; +// format->u.encoded_video.backward_history = 0; + + format->u.encoded_video.output.field_rate + = av_q2d(stream->r_frame_rate); + format->u.encoded_video.output.interlace = 1; + // TODO: Fix up for interlaced video + format->u.encoded_video.output.first_active = 0; + format->u.encoded_video.output.last_active = 0; + // TODO: Maybe libavformat actually provides that info somewhere... + format->u.encoded_video.output.orientation = B_VIDEO_TOP_LEFT_RIGHT; + + // TODO: Implement aspect ratio for real + format->u.encoded_video.output.pixel_width_aspect + = 1;//stream->sample_aspect_ratio.num; + format->u.encoded_video.output.pixel_height_aspect + = 1;//stream->sample_aspect_ratio.den; + + TRACE(" pixel width/height aspect: %d/%d or %.4f\n", + stream->sample_aspect_ratio.num, + stream->sample_aspect_ratio.den, + av_q2d(stream->sample_aspect_ratio)); + + format->u.encoded_video.output.display.format + = pixfmt_to_colorspace(codecContext->pix_fmt); + format->u.encoded_video.output.display.line_width = codecContext->width; + format->u.encoded_video.output.display.line_count = codecContext->height; + format->u.encoded_video.output.display.bytes_per_row = 0; + format->u.encoded_video.output.display.pixel_offset = 0; + format->u.encoded_video.output.display.line_offset = 0; + format->u.encoded_video.output.display.flags = 0; // TODO + + uint32 encoding = format->Encoding(); + TRACE(" encoding '%.4s'\n", (char*)&encoding); + + } else if (stream->codec->codec_type == CODEC_TYPE_AUDIO) { + format->type = B_MEDIA_ENCODED_AUDIO; +// format->require_flags = +// format->deny_flags = + +// format->u.encoded_audio. + } else { + return B_NOT_SUPPORTED; + } + + *_cookie = cookie; + + return B_OK; } status_t AVFormatReader::FreeCookie(void *_cookie) { - return B_ERROR; + StreamCookie* cookie = reinterpret_cast(_cookie); + + avcodec_close(cookie->codecContext); + delete cookie; + + return B_OK; } @@ -171,7 +315,35 @@ bigtime_t* duration, media_format* format, const void** infoBuffer, size_t* infoSize) { - return B_ERROR; + TRACE("AVFormatReader::GetStreamInfo()\n"); + + StreamCookie* cookie = reinterpret_cast(_cookie); + AVStream* stream = cookie->stream; + + double frameRate = av_q2d(stream->r_frame_rate); + + TRACE(" frameRate: %.4f\n", frameRate); + + *duration = (bigtime_t)(1000000LL * stream->duration + * av_q2d(stream->time_base)); + + TRACE(" duration: %lld\n", *duration); + + *frameCount = stream->nb_frames; + if (*frameCount == 0) { + // TODO: Calculate from duration and frame rate! + *frameCount = (int64)(*duration * frameRate / 1000000); + } + + TRACE(" frameCount: %lld\n", *frameCount); + + *format = cookie->format; + + // TODO: Possibly use stream->metadata for this: + *infoBuffer = 0; + *infoSize = 0; + + return B_OK; } Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-03 21:31:28 UTC (rev 31401) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatReader.h 2009-07-03 21:40:19 UTC (rev 31402) @@ -8,10 +8,11 @@ #include "ReaderPlugin.h" +extern "C" { + #include "avformat.h" +} -struct AVFormatContext; - class AVFormatReader : public Reader { public: AVFormatReader(); @@ -49,6 +50,20 @@ off_t offset, int whence); AVFormatContext* fContext; + AVFormatParameters fFormatParameters; + ByteIOContext fIOContext; + uint8* fIOBuffer; + + struct StreamCookie { + AVStream* stream; + AVCodecContext* codecContext; + AVCodec* codec; + media_format format; + // TODO: Maybe we don't need the codec after all, maybe we do + // for getting stream information... + // TODO: Some form of packet queue + }; + }; Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp 2009-07-03 21:31:28 UTC (rev 31401) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.cpp 2009-07-03 21:40:19 UTC (rev 31402) @@ -146,7 +146,8 @@ } } -const char *pixfmt_to_string(int p) +const char* +pixfmt_to_string(int p) { switch(p) { case PIX_FMT_NONE: return "PIX_FMT_NONE"; @@ -205,6 +206,69 @@ } } + +color_space +pixfmt_to_colorspace(int p) +{ + switch(p) { + default: + case PIX_FMT_NONE: + return B_NO_COLOR_SPACE; + + case PIX_FMT_YUV420P: return B_YUV420; ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples) + case PIX_FMT_YUYV422: return B_YUV422; ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr + case PIX_FMT_RGB24: return B_RGB24_BIG; ///< packed RGB 8:8:8, 24bpp, RGBRGB... + case PIX_FMT_BGR24: return B_RGB24; ///< packed RGB 8:8:8, 24bpp, BGRBGR... + case PIX_FMT_YUV422P: return B_YUV422; ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) + case PIX_FMT_YUV444P: return B_YUV444; ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples) + case PIX_FMT_RGB32: return B_RGBA32_BIG; ///< packed RGB 8:8:8, 32bpp, (msb)8A 8R 8G 8B(lsb), in CPU endianness + case PIX_FMT_YUV410P: return B_YUV9; ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) + case PIX_FMT_YUV411P: return B_YUV12; ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) + case PIX_FMT_RGB565: return B_RGB16_BIG; ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), in CPU endianness + case PIX_FMT_RGB555: return B_RGB15_BIG; ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in CPU endianness, most significant bit to 0 + case PIX_FMT_GRAY8: return B_GRAY8; ///< Y , 8bpp +// case PIX_FMT_MONOWHITE: return B_GRAY1; ///< Y , 1bpp, 0 is white, 1 is black + case PIX_FMT_MONOBLACK: return B_GRAY1; ///< Y , 1bpp, 0 is black, 1 is white + case PIX_FMT_PAL8: return B_CMAP8; ///< 8 bit with PIX_FMT_RGB32 palette +// case PIX_FMT_YUVJ420P: return "PIX_FMT_YUVJ420P - YUV420P (Jpeg)"; ///< planar YUV 4:2:0, 12bpp, full scale (JPEG) +// case PIX_FMT_YUVJ422P: return "PIX_FMT_YUVJ422P - YUV422P (Jpeg)"; ///< planar YUV 4:2:2, 16bpp, full scale (JPEG) +// case PIX_FMT_YUVJ444P: return "PIX_FMT_YUVJ444P"; ///< planar YUV 4:4:4, 24bpp, full scale (JPEG) +// case PIX_FMT_XVMC_MPEG2_MC: return "PIX_FMT_XVMC_MPEG2_MC";///< XVideo Motion Acceleration via common packet passing +// case PIX_FMT_XVMC_MPEG2_IDCT: return "PIX_FMT_XVMC_MPEG2_IDCT"; +// case PIX_FMT_UYVY422: return "PIX_FMT_UYVY422"; ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 +// case PIX_FMT_UYYVYY411: return "PIX_FMT_UYYVYY411"; ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 + case PIX_FMT_BGR32: return B_RGB32; ///< packed RGB 8:8:8, 32bpp, (msb)8A 8B 8G 8R(lsb), in CPU endianness + case PIX_FMT_BGR565: return B_RGB16; ///< packed RGB 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), in CPU endianness + case PIX_FMT_BGR555: return B_RGB15; ///< packed RGB 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), in CPU endianness, most significant bit to 1 +// case PIX_FMT_BGR8: return "PIX_FMT_BGR8"; ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) +// case PIX_FMT_BGR4: return "PIX_FMT_BGR4"; ///< packed RGB 1:2:1, 4bpp, (msb)1B 2G 1R(lsb) +// case PIX_FMT_BGR4_BYTE: return "PIX_FMT_BGR4_BYTE"; ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) +// case PIX_FMT_RGB8: return "PIX_FMT_RGB8"; ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) +// case PIX_FMT_RGB4: return "PIX_FMT_RGB4"; ///< packed RGB 1:2:1, 4bpp, (msb)1R 2G 1B(lsb) +// case PIX_FMT_RGB4_BYTE: return "PIX_FMT_RGB4_BYTE"; ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb) +// case PIX_FMT_NV12: return "PIX_FMT_NV12"; ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV +// case PIX_FMT_NV21: return "PIX_FMT_NV21"; ///< as above, but U and V bytes are swapped +// case PIX_FMT_RGB32_1: return "PIX_FMT_RGB32_1"; ///< packed RGB 8:8:8, 32bpp, (msb)8R 8G 8B 8A(lsb), in CPU endianness +// case PIX_FMT_BGR32_1: return "PIX_FMT_BGR32_1"; ///< packed RGB 8:8:8, 32bpp, (msb)8B 8G 8R 8A(lsb), in CPU endianness +// case PIX_FMT_GRAY16BE: return "PIX_FMT_GRAY16BE"; ///< Y , 16bpp, big-endian +// case PIX_FMT_GRAY16LE: return "PIX_FMT_GRAY16LE"; ///< Y , 16bpp, little-endian +// case PIX_FMT_YUV440P: return "PIX_FMT_YUV440P"; ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples) +// case PIX_FMT_YUVJ440P: return "PIX_FMT_YUVJ440P - YUV440P (Jpeg)"; ///< planar YUV 4:4:0 full scale (JPEG) +// case PIX_FMT_YUVA420P: return "PIX_FMT_YUVA420P - YUV420P (Alpha)"; ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples) +// case PIX_FMT_VDPAU_H264: return "PIX_FMT_VDPAU_H264";///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers +// case PIX_FMT_VDPAU_MPEG1: return "PIX_FMT_VDPAU_MPEG1";///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers +// case PIX_FMT_VDPAU_MPEG2: return "PIX_FMT_VDPAU_MPEG2";///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers +// case PIX_FMT_VDPAU_WMV3: return "PIX_FMT_VDPAU_WMV3";///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers +// case PIX_FMT_VDPAU_VC1: return "PIX_FMT_VDPAU_VC1"; ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers +// case PIX_FMT_RGB48BE: return "PIX_FMT_RGB48BE"; ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, big-endian +// case PIX_FMT_RGB48LE: return "PIX_FMT_RGB48LE"; ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, little-endian +// case PIX_FMT_VAAPI_MOCO: return "PIX_FMT_VAAPI_MOCO"; ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[0] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers +// case PIX_FMT_VAAPI_IDCT: return "PIX_FMT_VAAPI_IDCT"; ///< HW acceleration through VA API at IDCT entry-point, Picture.data[0] contains a vaapi_render_state struct which contains fields extracted from headers +// case PIX_FMT_VAAPI_VLD: return "PIX_FMT_VAAPI_VLD"; ///< HW decoding through VA API, Picture.data[0] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers + } +} + + #define BEGIN_TAG "\033[31m" #define END_TAG "\033[0m" Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.h 2009-07-03 21:31:28 UTC (rev 31401) +++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/gfx_util.h 2009-07-03 21:40:19 UTC (rev 31402) @@ -36,6 +36,8 @@ const char *pixfmt_to_string(int p); +color_space pixfmt_to_colorspace(int p); + void dump_ffframe(AVFrame *frame, const char *name); #endif From humdingerb at mail.berlios.de Sat Jul 4 06:28:06 2009 From: humdingerb at mail.berlios.de (humdingerb at mail.berlios.de) Date: Sat, 4 Jul 2009 06:28:06 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images Message-ID: <200907040428.n644S6Uo029141@sheep.berlios.de> Author: humdingerb Date: 2009-07-04 06:27:42 +0200 (Sat, 04 Jul 2009) New Revision: 31403 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31403&view=rev Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap128.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap16.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap32.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap64.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-gradients.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_16.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_32.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_64.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-overview.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-path-ab.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-add.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-bezier.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-delete.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-insert.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-path.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-shape.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-resize.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-rotate.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-select.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-shape.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap16.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap32.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector128.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector16.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector32.png haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector64.png haiku/trunk/docs/userguide/images/up.png Modified: haiku/trunk/docs/Haiku-doc.css haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html haiku/trunk/docs/userguide/en/preferences/prefs-keymap.html haiku/trunk/docs/userguide/en/queries.html haiku/trunk/docs/userguide/images/queries-images/basic-query.png Log: * Thanks to axel, "keymap" can now dump a text file directly. * New screenshot of Find window with improved(?) numbers style. * Haiku-doc.css: content font-size is now 0.9em * Added documentation for Icon-O-Matic. Comments/Corrections very welcome. Modified: haiku/trunk/docs/Haiku-doc.css =================================================================== --- haiku/trunk/docs/Haiku-doc.css 2009-07-03 21:40:19 UTC (rev 31402) +++ haiku/trunk/docs/Haiku-doc.css 2009-07-04 04:27:42 UTC (rev 31403) @@ -65,6 +65,7 @@ margin-left: 40px; margin-right: 40px; margin-bottom: 50px; + font-size: 0.9em; } /* heading and navigation */ Modified: haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html =================================================================== --- haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html 2009-07-03 21:40:19 UTC (rev 31402) +++ haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html 2009-07-04 04:27:42 UTC (rev 31403) @@ -1,61 +1,366 @@ - + + "../../../../html-dtd/xhtml1-strict.dtd"> - - - - - Icon-O-Matic - + + + + Icon-O-Matic +
-

- Applications -     - Previous: Expander -     - Next: Installer -

+

+ Applications +     + Previous: Expander +     + Next: Installer +

-

icon-o-matic-icon_64.pngIcon-O-Matic

+ + + + +
Contents
BeOS bitmap vs. Haiku vector icons
+ Icons are attributes
+ Creating icons with Icon-O-Matic
+   Path
+   Shape
+   Style
+   Transformer
+   Saving an icon
+   Tips & Tricks
+ +

icon-o-matic-icon_64.pngIcon-O-Matic

+
Deskbar:Applications
Location:/boot/system/apps/Icon-O-Matic
Settings:~/config/settings/Icon-O-Matic
-

Documentation is still missing. If you want to work on it, please announce it on the Documentation mailing list to avoid duplication.

+


+ +

Before we come to the actual creating of icons in Icon-O-Matic, a few words to Haiku's icons in general.

+ +

+contents +BeOS bitmap vs. Haiku vector icons

+

Contrary to the BeOS, Haiku uses vector icons instead of bitmap icons. A special Haiku Vector Icon Format (HVIF) was developed that is highly optimized for small file sizes and fast rendering. That's why our icons are for the most part much smaller than either a bitmap or the widely used SVG format. Also, unlike BeOS' bitmap icons, Haiku isn't limited to an 8bit palette (256 colors).
+Take this icon of the Terminal, for example:

+ + + + +
BitmapSVGHVIF
i-o-m-terminal-bitmap32 i-o-m-terminal-bitmap16terminal-icon_32terminal-icon_32
1,024 byte
+ 256 byte
7,192 byte 768 byte
+

Note that the BeOS used two versions of an icon, one 16x16 and 32x32, to achieve good visuals in List and Icon View mode.

+

This trick isn't needed with vector icons. Besides only taking up a few hundred bytes in a file, vector icons also scale much better than bitmaps. (Note: BeOS offered only a 16x16 and 32x32 display.)

+ + + + + + + + + + + + + +
16x1632x3264x64128x128
Bitmapi-o-m-bitmap16i-o-m-bitmap32i-o-m-bitmap64i-o-m-bitmap128
Vectori-o-m-vector16i-o-m-vector32i-o-m-vector64i-o-m-vector128
+ +

+contents +Icons are attributes

+

Icons are stored as an attribute with their file. However, that doesn't mean that every file has to have this attribute to appear with an icon in a Tracker window: data files inherit their icon from their filetype. To globally change the filetype's icon you use the FileTypes preferences. If you only want to add a special icon to an individual file, you use the FileType Add-On on it instead. See topic Filetypes for more information.

+
Being an attribute, it follows that only filesystems supporting metadata can retain a file's individual icon. So, if you move files off your BFS volume, consider zipping them up so you don't lose icons or other attributes.
+ +

+contents +Creating icons with Icon-O-Matic

+

Icon-O-Matic is Haiku's icon editor that can save your work as HVIF, SVG or PNG. The icon can also be directly attached as attribute to an existing file or exported as a resource or source file used by developers. Since the application was tailored to the optimized HVIF format, its usage reflects the inner workings of this format.

+

Other than your normal vector graphics software, you don't deal with separate objects that each include all their specific properties like path, stroke width, stroke and fill color etc. Rather, you assemble your objects ("shapes") from shared paths and colors ("styles") and set certain properties. This re-using of elements is one secret of HVIF's efficiency. Although that imposes some constraints on the icon designer, there are a few advantages, too.
+For example, by re-using a path, several objects can be modified together by manipulating this one path. Think of an object and its shadow. Modifying their shared path will change the object itself and automatically its (maybe slightly distorted/translated) shadow.

+ +

Here's a quick overview of Icon-O-Matic's window:

+i-o-m-overview.png + +

To create any visible object on the canvas, you need a shape with a path and a style. Conveniently, you can create one, two or all three of those together from the Shape menu. Every kind of object (Paths, Shapes, Transformers, and Styles) has a menu above its list of elements, offering various commands. Every element has certain options that are set in the Property view.

+ + +

+contents +Path

+

A path consists of several points which are connected with lines or Bezier curves. To add or change points, make sure, the path is selected in the path list.

+ +

Simply clicking in the canvas will set the first point. While setting a point, you decide if the resulting line will be straight or curved: a simple click and release produces a straight line, holding down the mouse button and moving the mouse will drag out the handles for a Bezier curve. Of course, you can also change it all later on.

+ +i-o-m-path-ab + +

To get from "A" to "B", you have to transform some points from corner-points to curve-points. That's done by holding ALT while clicking on a point and dragging out the handles. This results in a symmetrical Bezier: the second handle follows the movement of the other. If you need to move the handles independently, again click&drag on a Bezier handle while holding ALT.
+Vice versa, to go from Bezier to a corner-point, hold ALT and click on a point.

+ +

To move a point, simply click&drag it. To select more than one point, hold down SHIFT and draw a selection rectangle. Selected points are marked with a red border instead of the usual black.
+To insert a point into a path you click on the connecting line between two points.
+Selected points are deleted by pressing DEL or by clicking on any point while holding CTRL.

+ +

The mouse pointer indicates the current mode:

+ + + + + + + + + + + + + + + + + +
i-o-m-pointer-move-pathi-o-m-pointer-inserti-o-m-pointer-addi-o-m-pointer-deletei-o-m-pointer-bezieri-o-m-pointer-select
Move point(s)Insert pointAdd pointDelete point
CTRL
Corner↔Bezier
ALT
Select points
SHIFT
+ +

Path Menu

+

The Path menu offers a few obvious entries to Add Rectangle and Add Circle or to Duplicate or Remove a path. Here are some that may need a bit more explaining:

+ + + + + +
ReverseIf your path isn't "closed" (see Path Properties below), a click into the canvas always creates a new point, connecting it with the last one. "Reverse" will reverse this order and your new point will connect to original start point instead.
Clean UpMost useful with imported SVGs, this function will remove redundant points.
Rotate Indicesnot yet implemented.
+ +

Path Properties

+

The Property at the bottom left of the window offers all available settings of the currently selected object. A path only has two: a Name and if it's Closed or not.

+ + +

+contents +Shape

+

A shape groups together one or more paths with a style. Practically, it's the object that you'll actually see on the canvas. The grouping is done with the checkboxes in front of the paths and styles: Just select your shape and tick off the desired path(s) and a style.

+

A shape defines how a path and style is applied, e.g. if the object is filled or only stroked (which is done by using Transformers on the shape, we'll get to that later). Also, a shape can be moved, rotated or resized without touching the used path. That way, you can re-use a single path and get different, but related, shapes.

+ +i-o-m-shape + +

When a shape is selected from the list, a rectangle is drawn around it. Depending on where exactly you grab it, the shape is moved, resized or rotated around a point in its center, which itself can be moved. Holding SHIFT will lock direction when moving, limit resizing to 45?? angles and restrict the aspect ratio while resizing. The mouse pointer again indicates the current mode:

+ + + + + + + + + + + + + +
i-o-m- move-shapei-o-m-pointer-resizei-o-m-pointer-rotatei-o-m-pointer-move-rotation
MoveResizeRotateMove
rotation point
+ +

Shapes lie on top of each other, each is on its own layer, if you will. To reorder them you drag&drop their entry to a different position in the list.

+ +

Shape Menu

+

The Shape menu offers the before mentioned possibility to Add Empty, With Path/Style/Path&Style and to Duplicate or Remove a shape. Then, there is:

+ + + +
Reset TransformationReverts all the move, resize and rotate transformations you have applied to the shape.
Freeze TransformationWhen you transform a shape, its assigned path(s) stay in their original position. This may be intended; maybe more than one shape is using that path, maybe you intentionally used Options | Snap to Grid to set the points at precise pixel borders.
+If not, "Freeze Transformation" will apply the current shape transformation to the assigned path(s). A future "Reset Transformation" will then return to this new state.
+ +

Shape Properties

+

Besides a Name, the Property view for a shape has these options:

+ + + + + +
RoundingUnfinished feature. Once working correctly, it will do a kind of "hinting" for vector paths, rounding their coordinates to the next full pixel, giving it a crisper look.
Min LODMinimum Level of Detail
Max LODMaximum Level of Detail
+ +

Level of Detail (LOD)

+ + + + + + +
16x1632x3264x64
i-o-m-lod-icon_16i-o-m-lod-icon_32i-o-m-lod-icon_64
+

See how there are no numbers in the 16px version of the BeVexed icon? That's done with the "Level of Detail" setting of their shapes.
+With the LOD you control the visibility of a shape depending on its size. That way, you can leave away details of an icon that looks good on a bigger icon, but maybe not so much on its smaller version.

+

This is how it works: A LOD of 1.0 is defined as a 64px icon size. So, to get the LOD of a particular icon size you simply divide it by 64, e.g. a 16px icon has a LOD of 16/64 = 0,25. A shape won't be visible below its Min LOD and above its Max LOD.

+

So, if you set a shape's Min LOD to 0.0 and the Max LOD to 0.5, this means that the shape will only be visible for icon sizes smaller or equal to 32px. If you wanted to exclude the 32px icon size, you'd have to stay below 0.5, say 0.49.

+

The LOD is not only for leaving out detailing shapes, you can also use it to e.g. change the stroke width at different sizes, if you feel that's needed. Simply duplicate a shape, make your changes and set both of their LOD settings to show either one or the other. Here lies the only source of potential confusion, when you're unwittingly overlap LODs of shapes, and wonder why at some size both are visible...
+For example, if Shape 1 were to be shown below 48px and Shape 2 from 48px upward (LOD: 48/64 = 0.75):

+ + + + + + + + +
OKNot OK!
Shape 1Min LOD0.00Min LOD0.00
Max LOD0.74Max LOD0.75
Shape 2Min LOD0.75Min LOD0.75
Max LOD4.00Max LOD4.00
+ + +

+contents +Style

+

A style can either be a solid color or some type of gradient.
+Besides the predefined colors under Swatches, you can mix your own by clicking on the current color. Also, note the slider under the color spectrum which sets the alpha-channel (transparency).

+i-o-m-gradients +

You quickly create a new style by mixing your color and simply drag&dropping it into the list of styles.

+

If you go for a gradient, you set the type (Linear, Radial, Diamond, Cone) and then define the start and end colors. This is done with a drag&drop from a color bucket into the respective color indicator under the gradient.
+Of course you can move these indicators to change the gradient to your liking. You can also insert more indicators to add more colors by clicking into the gradient. Pressing DEL removes the selected indicator.

+

You can move, resize and rotate the representing box of a gradient on the canvas until it fits your needs. This works just like with shapes.

+ +

Style Menu

+

The Style menu offers the usual entries to Add, Duplicate or Remove a style and to Reset Transformation.

+ +

Style Properties

+

The Name is the only Property of a style.

+ + +

+contents +Transformer

+

A shape can have Transformers which change its appearance. The effects, however, are more subtle than a truck turning into a battle robot...

+ +

Transformer Add Menu

+ + + + + +
TransformationOffers the same move/resize/rotate options you have by manipulating a shape with your mouse directly.
Perspectivenot yet implemented
ContourAdds an outline to a shape.
StrokeStrokes the path of a shape instead of filling it with a style.
+ +

Depending on the kind of Transformer, you'll get a different set of properties.

+ +

Transformer Properties

+

Besides a Name and the actual Width for the transformer, the Property view has these (depending on its type slightly differing) options:

+ + + + + +
CapsStroke only. Defines the end caps of a line: Butt, Square or Round.
Detect Orient.Contour only. Makes sure the contour always extends outwards when you have self-intesecting paths.
JoinsDefines how lines are joint at a point: Miter, Round or Bevel.
Miter LimitOnly when the above Joins is set to "Miter" this setting influences the looks of the miter joint.
+ + +

+contents +Saving an icon

+

There's your usual menu bar at the top, File, Edit, Options. The usage is pretty much self-explaining, so we'll only look at how to save your work.

+

File | Save As... will save in a special Icon-O-Matic format that retains additional information like the names of paths, shapes and styles. These will be stripped from the actual icon once you export it to save space. It's a good idea to back-up your work like this, because without named objects everything's named "<path>/<shape>/<style>" which makes specific changes tedious.

+ +

File | Export As... opens a familiar save panel with a file format dropdown menu at the bottom, offering these choices:

+ + + + + + + + + +
HVIFHaiku Vector Icon Format
HVIF RDefSaves as resource used by programmers
HVIF Source CodeSaves as source code used by programmers
SVGSaves as SVG
PNGSaves as a 64px sized PNG
PNG SetSaves as 16, 32 and 64px sized PNGs
BEOS:ICON AttributeChoose a file and set its icon attribute directly
META:ICON AttributeChoose a file and attach the icon as mere meta data
+ + +

+contents +Tips & Tricks

+

A few things you should keep in mind when working with Icon-O-Matic and some general tips for its usage:

+
    +
  • Read the Icon Guidelines to learn about important characteristics of Haiku icons, e.g. perspective, colors and shadows.

  • +
  • You should always try to minimize your use of paths, those are the most expensive, file size wise. Re-use paths wherever possible and work with manipulated shapes and their transformers instead. Smart use of gradients can also save space.

  • +
  • Wherever possible, you should activate the lowest possible Snap-to-Grid resolution from the Options menu, i.e. 16x16 saves the most in file size. You'll also get the crispest look if points are set on exact pixel borders.

  • +
  • Check the preview to see if your icon still looks good in 16x16. You may want to use the Level Of Detail settings described in the Shapes section.

  • +
  • There's an easy way to produce letters, even if Icon-O-Matic doesn't provide such a tool. Just enter the text in a text editor, adjust font type and style, and drag&drop the selected text into Icon-O-Matic. This will create the according paths and shapes.

  • +
  • If you assign more than one path to a shape, their overlapping areas will cancel each other out. When one path is completely inside another, it practically creates a hole in the resulting shape.

  • +
  • You can zoom in and out of the canvas with the mouse wheel. Panning is done either by click&drag with the middle mouse button or with a normal left-click&drag while holding SPACE.

  • +
+ + + + + +
- + + + + + Modified: haiku/trunk/docs/userguide/en/preferences/prefs-keymap.html =================================================================== --- haiku/trunk/docs/userguide/en/preferences/prefs-keymap.html 2009-07-03 21:40:19 UTC (rev 31402) +++ haiku/trunk/docs/userguide/en/preferences/prefs-keymap.html 2009-07-04 04:27:42 UTC (rev 31403) @@ -63,11 +63,11 @@

Advanced keymap manipulation

There's another method to customize your keymap besides the Keymap preference panel. It involves editing a text file containing loads of hex values, which may appear daunting on first sight, but isn't really that impossible to grasp.

You can dump the current keymap with a command in Terminal:

-

keymap -d > MyKeymap
+
keymap -d MyKeymap

The generated text file can then be opened in a text editor. Make sure to use a fixed font in that editor or you'll never grok that file...
At the beginning of that file, you'll find a legend of a stylized keyboard with the hex value corresponding to each key. Below that are the actual assignments of every value. You can do all the customizing that's also available from the Keymap preference panel, and then some. If you happen to have some special keys on your keyboard, you may be able to activate them. That is, use them as ordinary keys or like an option or control key. You won't be able to, for example, have your multimedia keys de/increase the volume or start some application. For this you can use e.g. SpicyKeys.

-

When you're finished, you'll save the file and have your system use the modified keymap with this command:

-
keymap -l < MyKeymap
+

When you're finished, you'll save the file and have your system load the modified keymap with this command:

+
keymap -l MyKeymap

This is the dumped file (the rightmost keys of the stylized keyboard are cut-off for a nicer display on this page):

#!/bin/keymap -l

Modified: haiku/trunk/docs/userguide/en/queries.html
===================================================================
--- haiku/trunk/docs/userguide/en/queries.html	2009-07-03 21:40:19 UTC (rev 31402)
+++ haiku/trunk/docs/userguide/en/queries.html	2009-07-04 04:27:42 UTC (rev 31403)
@@ -40,7 +40,7 @@
 
 

The Find window

You start a query by invoking the Find... menu either from the Deskbar menu or any Tracker window or the Desktop (which is actually a fullscreen Tracker window). The shortcut is ALT F. You're presented with the Find window:

-basic-query.png +basic-query.png
  1. Select previous or saved queries or save the current query.

  2. Narrow down your search from "All files and folders" to specific file Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap128.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap128.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap16.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap32.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap64.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-bitmap64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-gradients.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-gradients.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_16.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_32.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_64.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-lod-icon_64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-overview.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-overview.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-path-ab.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-path-ab.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-add.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-add.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-bezier.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-bezier.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-delete.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-delete.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-insert.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-insert.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-path.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-path.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-shape.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-move-shape.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-resize.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-resize.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-rotate.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-rotate.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-select.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-pointer-select.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-shape.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-shape.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap16.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap32.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-terminal-bitmap32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector128.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector128.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector16.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector32.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector64.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/apps-images/i-o-m-vector64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/docs/userguide/images/queries-images/basic-query.png =================================================================== (Binary files differ) Added: haiku/trunk/docs/userguide/images/up.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/userguide/images/up.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From laplace at mail.berlios.de Sat Jul 4 09:19:52 2009 From: laplace at mail.berlios.de (laplace at BerliOS) Date: Sat, 4 Jul 2009 09:19:52 +0200 Subject: [Haiku-commits] r31404 - haiku/trunk/src/add-ons/print/drivers/postscript Message-ID: <200907040719.n647JqUj016955@sheep.berlios.de> Author: laplace Date: 2009-07-04 09:19:51 +0200 (Sat, 04 Jul 2009) New Revision: 31404 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31404&view=rev Modified: haiku/trunk/src/add-ons/print/drivers/postscript/PS.cpp Log: Rotate page contents in landscape mode. Modified: haiku/trunk/src/add-ons/print/drivers/postscript/PS.cpp =================================================================== --- haiku/trunk/src/add-ons/print/drivers/postscript/PS.cpp 2009-07-04 04:27:42 UTC (rev 31403) +++ haiku/trunk/src/add-ons/print/drivers/postscript/PS.cpp 2009-07-04 07:19:51 UTC (rev 31404) @@ -1,299 +1,307 @@ -/* - * PS.cpp - * Copyright 1999-2000 Y.Takagi. All Rights Reserved. - * Copyright 2003 Michael Pfeiffer. - */ - -#include -#include -#include -#include -#include -#include "PS.h" -#include "UIDriver.h" -#include "JobData.h" -#include "PrinterData.h" -#include "PSCap.h" -#include "PackBits.h" -#include "Halftone.h" -#include "ValidRect.h" -#include "DbgMsg.h" - - -#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE)) -using namespace std; -#else -#define std -#endif - -PSDriver::PSDriver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap) - : GraphicsDriver(msg, printer_data, printer_cap) -{ - fPrintedPages = 0; - fHalftone = NULL; -} - -bool PSDriver::startDoc() -{ - try { - jobStart(); - fHalftone = new Halftone(getJobData()->getSurfaceType(), getJobData()->getGamma(), getJobData()->getInkDensity(), getJobData()->getDitherType()); - return true; - } - catch (TransportException &err) { - return false; - } -} - -bool PSDriver::startPage(int page) -{ - page ++; - writeSpoolString("%%%%Page: %d %d\n", page, page); - writeSpoolString("gsave\n"); - setupCTM(); - return true; -} - -bool PSDriver::endPage(int) -{ - try { - fPrintedPages ++; - writeSpoolString("grestore\n"); - writeSpoolString("showpage\n"); - return true; - } - catch (TransportException &err) { - return false; - } -} - -void PSDriver::setupCTM() { - const float leftMargin = getJobData()->getPrintableRect().left; - const float topMargin = getJobData()->getPrintableRect().top; - // move origin from bottom left to top left - // and set margin - writeSpoolString("%f %f translate\n", leftMargin, getJobData()->getPaperRect().Height()-topMargin); - // y values increase from top to bottom - // units of measure is dpi - writeSpoolString("72 %d div 72 -%d div scale\n", getJobData()->getXres(), getJobData()->getYres()); -} - -bool PSDriver::endDoc(bool) -{ - try { - if (fHalftone) { - delete fHalftone; - } - jobEnd(); - return true; - } - catch (TransportException &err) { - return false; - } -} - -inline uchar hex_digit(uchar value) -{ - if (value <= 9) return '0'+value; - else return 'a'+(value-10); -} - -bool PSDriver::nextBand(BBitmap *bitmap, BPoint *offset) -{ - DBGMSG(("> nextBand\n")); - - try { - BRect bounds = bitmap->Bounds(); - - RECT rc; - rc.left = (int)bounds.left; - rc.top = (int)bounds.top; - rc.right = (int)bounds.right; - rc.bottom = (int)bounds.bottom; - - int height = rc.bottom - rc.top + 1; - - int x = (int)offset->x; - int y = (int)offset->y; - - int page_height = getPageHeight(); - - if (y + height > page_height) { - height = page_height - y; - } - - rc.bottom = height - 1; - - DBGMSG(("height = %d\n", height)); - DBGMSG(("x = %d\n", x)); - DBGMSG(("y = %d\n", y)); - - if (get_valid_rect(bitmap, &rc)) { - - DBGMSG(("validate rect = %d, %d, %d, %d\n", - rc.left, rc.top, rc.right, rc.bottom)); - - x = rc.left; - y += rc.top; - - bool color = getJobData()->getColor() == JobData::kColor; - int width = rc.right - rc.left + 1; - int widthByte = (width + 7) / 8; /* byte boundary */ - int height = rc.bottom - rc.top + 1; - int in_size = color ? width : widthByte; - int out_size = color ? width * 6: widthByte * 2; - int delta = bitmap->BytesPerRow(); - - DBGMSG(("width = %d\n", width)); - DBGMSG(("widthByte = %d\n", widthByte)); - DBGMSG(("height = %d\n", height)); - DBGMSG(("out_size = %d\n", out_size)); - DBGMSG(("delta = %d\n", delta)); - DBGMSG(("renderobj->get_pixel_depth() = %d\n", fHalftone->getPixelDepth())); - - uchar *ptr = (uchar *)bitmap->Bits() - + rc.top * delta - + (rc.left * fHalftone->getPixelDepth()) / 8; - - int compression_method; - int compressed_size; - const uchar *buffer; - - uchar *in_buffer = new uchar[in_size]; // gray values - uchar *out_buffer = new uchar[out_size]; // gray values in hexadecimal - - auto_ptr _in_buffer(in_buffer); - auto_ptr _out_buffer(out_buffer); - - DBGMSG(("move\n")); - - int size = color ? width*3 : in_size; - startRasterGraphics(x, y, width, height, size); - - for (int i = rc.top; i <= rc.bottom; i++) { - if (color) { - uchar* out = out_buffer; - uchar* in = ptr; - for (int w = width; w > 0; w --) { - *out++ = hex_digit((in[2]) >> 4); - *out++ = hex_digit((in[2]) & 15); - *out++ = hex_digit((in[1]) >> 4); - *out++ = hex_digit((in[1]) & 15); - *out++ = hex_digit((in[0]) >> 4); - *out++ = hex_digit((in[0]) & 15); - in += 4; - } - } else { - fHalftone->dither(in_buffer, ptr, x, y, width); - - uchar* in = in_buffer; - uchar* out = out_buffer; - - for (int w = in_size; w > 0; w --, in ++) { - *in = ~*in; // invert pixels - *out++ = hex_digit((*in) >> 4); - *out++ = hex_digit((*in) & 15); - } - } - - { - compression_method = 0; // uncompressed - buffer = out_buffer; - compressed_size = out_size; - } - - rasterGraphics( - compression_method, - buffer, - compressed_size); - - ptr += delta; - y++; - } - - endRasterGraphics(); - - } else { - DBGMSG(("band bitmap is clean.\n")); - } - - if (y >= page_height) { - offset->x = -1.0; - offset->y = -1.0; - } else { - offset->y += height; - } - - - DBGMSG(("< nextBand\n")); - return true; - } - catch (TransportException &err) { - BAlert *alert = new BAlert("", err.what(), "OK"); - alert->Go(); - return false; - } -} - -void PSDriver::jobStart() -{ - // PostScript header - writeSpoolString("%%!PS-Adobe-3.0\n"); - writeSpoolString("%%%%LanguageLevel: 1\n"); - writeSpoolString("%%%%Title: %s\n", getSpoolMetaData()->getDescription().c_str()); - writeSpoolString("%%%%Creator: %s\n", getSpoolMetaData()->getMimeType().c_str()); - writeSpoolString("%%%%CreationDate: %s", getSpoolMetaData()->getCreationTime().c_str()); - writeSpoolString("%%%%DocumentMedia: Plain %d %d white 0 ( )\n", getJobData()->getPaperRect().IntegerWidth(), getJobData()->getPaperRect().IntegerHeight()); - writeSpoolString("%%%%Pages: (atend)\n"); - writeSpoolString("%%%%EndComments\n"); - - writeSpoolString("%%%%BeginDefaults\n"); - writeSpoolString("%%%%PageMedia: Plain\n"); - writeSpoolString("%%%%EndDefaults\n"); -} - -void PSDriver::startRasterGraphics(int x, int y, int width, int height, int widthByte) -{ - bool color = getJobData()->getColor() == JobData::kColor; - fCompressionMethod = -1; - writeSpoolString("gsave\n"); - writeSpoolString("/s %d string def\n", widthByte); - writeSpoolString("%d %d translate\n", x, y); - writeSpoolString("%d %d scale\n", width, height); - if (color) { - writeSpoolString("%d %d 8\n", width, height); // 8 bpp - } else { - writeSpoolString("%d %d 1\n", width, height); // 1 bpp - } - writeSpoolString("[%d 0 0 %d 0 0]\n", width, height); - writeSpoolString("{ currentfile s readhexstring pop }\n"); - if (color) { - writeSpoolString("false 3\n"); // single data source, 3 color components - writeSpoolString("colorimage\n"); - } else { - writeSpoolString("image\n\n"); - } -} - -void PSDriver::endRasterGraphics() -{ - writeSpoolString("grestore\n"); -} - -void PSDriver::rasterGraphics( - int compression_method, - const uchar *buffer, - int size) -{ - if (fCompressionMethod != compression_method) { - fCompressionMethod = compression_method; - } - writeSpoolData(buffer, size); - writeSpoolString("\n"); -} - -void PSDriver::jobEnd() -{ - writeSpoolString("%%%%Pages: %d\n", fPrintedPages); - writeSpoolString("%%%%EOF\n"); -} +/* + * PS.cpp + * Copyright 1999-2000 Y.Takagi. All Rights Reserved. + * Copyright 2003 Michael Pfeiffer. + */ + +#include +#include +#include +#include +#include +#include "PS.h" +#include "UIDriver.h" +#include "JobData.h" +#include "PrinterData.h" +#include "PSCap.h" +#include "PackBits.h" +#include "Halftone.h" +#include "ValidRect.h" +#include "DbgMsg.h" + + +#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE)) +using namespace std; +#else +#define std +#endif + +PSDriver::PSDriver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap) + : GraphicsDriver(msg, printer_data, printer_cap) +{ + fPrintedPages = 0; + fHalftone = NULL; +} + +bool PSDriver::startDoc() +{ + try { + jobStart(); + fHalftone = new Halftone(getJobData()->getSurfaceType(), getJobData()->getGamma(), getJobData()->getInkDensity(), getJobData()->getDitherType()); + return true; + } + catch (TransportException &err) { + return false; + } +} + +bool PSDriver::startPage(int page) +{ + page ++; + writeSpoolString("%%%%Page: %d %d\n", page, page); + writeSpoolString("gsave\n"); + setupCTM(); + return true; +} + +bool PSDriver::endPage(int) +{ + try { + fPrintedPages ++; + writeSpoolString("grestore\n"); + writeSpoolString("showpage\n"); + return true; + } + catch (TransportException &err) { + return false; + } +} + +void PSDriver::setupCTM() { + const float leftMargin = getJobData()->getPrintableRect().left; + const float topMargin = getJobData()->getPrintableRect().top; + if (getJobData()->getOrientation() == JobData::kPortrait) { + // move origin from bottom left to top left + // and set margin + writeSpoolString("%f %f translate\n", leftMargin, getJobData()->getPaperRect().Height()-topMargin); + } else { + // landscape: + // move origin from bottom left to margin top and left + // and rotate page contents + writeSpoolString("%f %f translate\n", topMargin, leftMargin); + writeSpoolString("90 rotate\n"); + } + // y values increase from top to bottom + // units of measure is dpi + writeSpoolString("72 %d div 72 -%d div scale\n", getJobData()->getXres(), getJobData()->getYres()); +} + +bool PSDriver::endDoc(bool) +{ + try { + if (fHalftone) { + delete fHalftone; + } + jobEnd(); + return true; + } + catch (TransportException &err) { + return false; + } +} + +inline uchar hex_digit(uchar value) +{ + if (value <= 9) return '0'+value; + else return 'a'+(value-10); +} + +bool PSDriver::nextBand(BBitmap *bitmap, BPoint *offset) +{ + DBGMSG(("> nextBand\n")); + + try { + BRect bounds = bitmap->Bounds(); + + RECT rc; + rc.left = (int)bounds.left; + rc.top = (int)bounds.top; + rc.right = (int)bounds.right; + rc.bottom = (int)bounds.bottom; + + int height = rc.bottom - rc.top + 1; + + int x = (int)offset->x; + int y = (int)offset->y; + + int page_height = getPageHeight(); + + if (y + height > page_height) { + height = page_height - y; + } + + rc.bottom = height - 1; + + DBGMSG(("height = %d\n", height)); + DBGMSG(("x = %d\n", x)); + DBGMSG(("y = %d\n", y)); + + if (get_valid_rect(bitmap, &rc)) { + + DBGMSG(("validate rect = %d, %d, %d, %d\n", + rc.left, rc.top, rc.right, rc.bottom)); + + x = rc.left; + y += rc.top; + + bool color = getJobData()->getColor() == JobData::kColor; + int width = rc.right - rc.left + 1; + int widthByte = (width + 7) / 8; /* byte boundary */ + int height = rc.bottom - rc.top + 1; + int in_size = color ? width : widthByte; + int out_size = color ? width * 6: widthByte * 2; + int delta = bitmap->BytesPerRow(); + + DBGMSG(("width = %d\n", width)); + DBGMSG(("widthByte = %d\n", widthByte)); + DBGMSG(("height = %d\n", height)); + DBGMSG(("out_size = %d\n", out_size)); + DBGMSG(("delta = %d\n", delta)); + DBGMSG(("renderobj->get_pixel_depth() = %d\n", fHalftone->getPixelDepth())); + + uchar *ptr = (uchar *)bitmap->Bits() + + rc.top * delta + + (rc.left * fHalftone->getPixelDepth()) / 8; + + int compression_method; + int compressed_size; + const uchar *buffer; + + uchar *in_buffer = new uchar[in_size]; // gray values + uchar *out_buffer = new uchar[out_size]; // gray values in hexadecimal + + auto_ptr _in_buffer(in_buffer); + auto_ptr _out_buffer(out_buffer); + + DBGMSG(("move\n")); + + int size = color ? width*3 : in_size; + startRasterGraphics(x, y, width, height, size); + + for (int i = rc.top; i <= rc.bottom; i++) { + if (color) { + uchar* out = out_buffer; + uchar* in = ptr; + for (int w = width; w > 0; w --) { + *out++ = hex_digit((in[2]) >> 4); + *out++ = hex_digit((in[2]) & 15); + *out++ = hex_digit((in[1]) >> 4); + *out++ = hex_digit((in[1]) & 15); + *out++ = hex_digit((in[0]) >> 4); + *out++ = hex_digit((in[0]) & 15); + in += 4; + } + } else { + fHalftone->dither(in_buffer, ptr, x, y, width); + + uchar* in = in_buffer; + uchar* out = out_buffer; + + for (int w = in_size; w > 0; w --, in ++) { + *in = ~*in; // invert pixels + *out++ = hex_digit((*in) >> 4); + *out++ = hex_digit((*in) & 15); + } + } + + { + compression_method = 0; // uncompressed + buffer = out_buffer; + compressed_size = out_size; + } + + rasterGraphics( + compression_method, + buffer, + compressed_size); + + ptr += delta; + y++; + } + + endRasterGraphics(); + + } else { + DBGMSG(("band bitmap is clean.\n")); + } + + if (y >= page_height) { + offset->x = -1.0; + offset->y = -1.0; + } else { + offset->y += height; + } + + + DBGMSG(("< nextBand\n")); + return true; + } + catch (TransportException &err) { + BAlert *alert = new BAlert("", err.what(), "OK"); + alert->Go(); + return false; + } +} + +void PSDriver::jobStart() +{ + // PostScript header + writeSpoolString("%%!PS-Adobe-3.0\n"); + writeSpoolString("%%%%LanguageLevel: 1\n"); + writeSpoolString("%%%%Title: %s\n", getSpoolMetaData()->getDescription().c_str()); + writeSpoolString("%%%%Creator: %s\n", getSpoolMetaData()->getMimeType().c_str()); + writeSpoolString("%%%%CreationDate: %s", getSpoolMetaData()->getCreationTime().c_str()); + writeSpoolString("%%%%DocumentMedia: Plain %d %d white 0 ( )\n", getJobData()->getPaperRect().IntegerWidth(), getJobData()->getPaperRect().IntegerHeight()); + writeSpoolString("%%%%Pages: (atend)\n"); + writeSpoolString("%%%%EndComments\n"); + + writeSpoolString("%%%%BeginDefaults\n"); + writeSpoolString("%%%%PageMedia: Plain\n"); + writeSpoolString("%%%%EndDefaults\n"); +} + +void PSDriver::startRasterGraphics(int x, int y, int width, int height, int widthByte) +{ + bool color = getJobData()->getColor() == JobData::kColor; + fCompressionMethod = -1; + writeSpoolString("gsave\n"); + writeSpoolString("/s %d string def\n", widthByte); + writeSpoolString("%d %d translate\n", x, y); + writeSpoolString("%d %d scale\n", width, height); + if (color) { + writeSpoolString("%d %d 8\n", width, height); // 8 bpp + } else { + writeSpoolString("%d %d 1\n", width, height); // 1 bpp + } + writeSpoolString("[%d 0 0 %d 0 0]\n", width, height); + writeSpoolString("{ currentfile s readhexstring pop }\n"); + if (color) { + writeSpoolString("false 3\n"); // single data source, 3 color components + writeSpoolString("colorimage\n"); + } else { + writeSpoolString("image\n\n"); + } +} + +void PSDriver::endRasterGraphics() +{ + writeSpoolString("grestore\n"); +} + +void PSDriver::rasterGraphics( + int compression_method, + const uchar *buffer, + int size) +{ + if (fCompressionMethod != compression_method) { + fCompressionMethod = compression_method; + } + writeSpoolData(buffer, size); + writeSpoolString("\n"); +} + +void PSDriver::jobEnd() +{ + writeSpoolString("%%%%Pages: %d\n", fPrintedPages); + writeSpoolString("%%%%EOF\n"); +} From pulkomandy at gmail.com Sat Jul 4 10:11:25 2009 From: pulkomandy at gmail.com (PulkoMandy) Date: Sat, 4 Jul 2009 10:11:25 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <200907040428.n644S6Uo029141@sheep.berlios.de> References: <200907040428.n644S6Uo029141@sheep.berlios.de> Message-ID: <36ed0c950907040111v1f8346a0g22dbdfc3ca838d09@mail.gmail.com> > * Haiku-doc.css: content font-size is now 0.9em mh... why so ? 1em is the default size, if you find it too big you should configure your web browser to use smaller fonts. I use a quite small default size here and I think anything below 1 quickly becomes difficult to read. From mmu_man at mail.berlios.de Sat Jul 4 10:48:37 2009 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Sat, 4 Jul 2009 10:48:37 +0200 Subject: [Haiku-commits] r31405 - haiku/trunk/docs/userguide/en Message-ID: <200907040848.n648mbMt026144@sheep.berlios.de> Author: mmu_man Date: 2009-07-04 10:48:37 +0200 (Sat, 04 Jul 2009) New Revision: 31405 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31405&view=rev Modified: haiku/trunk/docs/userguide/en/applications.html Log: Since we do have the Icon-O-Matic doc, don't say it's missing anymore. Modified: haiku/trunk/docs/userguide/en/applications.html =================================================================== --- haiku/trunk/docs/userguide/en/applications.html 2009-07-04 07:19:51 UTC (rev 31404) +++ haiku/trunk/docs/userguide/en/applications.html 2009-07-04 08:48:37 UTC (rev 31405) @@ -86,7 +86,7 @@ iconExpander  A tool to unpack common archives. iconIcon-O-Matic  - An app to create Haiku's vector icons. [still missing] + An app to create Haiku's vector icons. iconInstaller  The tool to install Haiku to a partition. [still missing] iconMagnify  From superstippi at gmx.de Sat Jul 4 11:54:20 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Sat, 04 Jul 2009 11:54:20 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <36ed0c950907040111v1f8346a0g22dbdfc3ca838d09@mail.gmail.com> References: <200907040428.n644S6Uo029141@sheep.berlios.de> <36ed0c950907040111v1f8346a0g22dbdfc3ca838d09@mail.gmail.com> Message-ID: <20090704115420.655.1@bepc.1246692208.fake> On 2009-07-04 at 10:11:25 [+0200], PulkoMandy wrote: > > * Haiku-doc.css: content font-size is now 0.9em > > mh... why so ? 1em is the default size, if you find it too big you should > configure your web browser to use smaller fonts. I use a quite small > default size here and I think anything below 1 quickly becomes difficult > to read. Same thoughts here. The default text block font should always be 1em, IMHO. That said, I've been reading the new Icon-O-Matic guide and it's awesome! :-D Best regards, -Stephan From revol at free.fr Sat Jul 4 12:01:55 2009 From: revol at free.fr (=?utf-8?q?Fran=C3=A7ois?= Revol) Date: Sat, 04 Jul 2009 12:01:55 +0200 CEST Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <20090704115420.655.1@bepc.1246692208.fake> Message-ID: <5831391791-BeMail@Zeta> > > On 2009-07-04 at 10:11:25 [+0200], PulkoMandy > wrote: > > > * Haiku-doc.css: content font-size is now 0.9em > > > > mh... why so ? 1em is the default size, if you find it too big you > > should > > configure your web browser to use smaller fonts. I use a quite > > small > > default size here and I think anything below 1 quickly becomes > > difficult > > to read. > > Same thoughts here. The default text block font should always be 1em, > IMHO. You can always add buttons/links to increase/decrease the base font size manually like on: http://www.liberation.fr/medias/0101577674-hadopi-en-plus-fouillis Seems to be some javascript stuff though. Another way is to propose an alternate CSS in the section, sane browser should propose it in their View menu. So you can add a "small font" CSS. > That said, I've been reading the new Icon-O-Matic guide and it's > awesome! > :-D Looks quite complete yes :) Fran?ois. From stippi at mail.berlios.de Sat Jul 4 14:31:56 2009 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Sat, 4 Jul 2009 14:31:56 +0200 Subject: [Haiku-commits] r31406 - haiku/trunk/docs/userguide/en/applications Message-ID: <200907041231.n64CVuRE022326@sheep.berlios.de> Author: stippi Date: 2009-07-04 14:31:55 +0200 (Sat, 04 Jul 2009) New Revision: 31406 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31406&view=rev Modified: haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html Log: A small correction and one additional tip. Modified: haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html =================================================================== --- haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html 2009-07-04 08:48:37 UTC (rev 31405) +++ haiku/trunk/docs/userguide/en/applications/apps-icon-o-matic.html 2009-07-04 12:31:55 UTC (rev 31406) @@ -260,7 +260,7 @@ width="654" height="127" />

    You quickly create a new style by mixing your color and simply drag&dropping it into the list of styles.

    If you go for a gradient, you set the type (Linear, Radial, Diamond, Cone) and then define the start and end colors. This is done with a drag&drop from a color bucket into the respective color indicator under the gradient.
    -Of course you can move these indicators to change the gradient to your liking. You can also insert more indicators to add more colors by clicking into the gradient. Pressing DEL removes the selected indicator.

    +Of course you can move these indicators to change the gradient to your liking. You can also insert more indicators to add more colors by double-clicking into the gradient. Pressing DEL removes the selected indicator.

    You can move, resize and rotate the representing box of a gradient on the canvas until it fits your needs. This works just like with shapes.

    Style Menu

    @@ -321,9 +321,10 @@
    • Read the Icon Guidelines to learn about important characteristics of Haiku icons, e.g. perspective, colors and shadows.

    • You should always try to minimize your use of paths, those are the most expensive, file size wise. Re-use paths wherever possible and work with manipulated shapes and their transformers instead. Smart use of gradients can also save space.

    • -
    • Wherever possible, you should activate the lowest possible Snap-to-Grid resolution from the Options menu, i.e. 16x16 saves the most in file size. You'll also get the crispest look if points are set on exact pixel borders.

    • +
    • Wherever possible, you should activate Snap-to-Grid from the Options menu when editing paths. Path points that align with the 64x64 pixel grid use less storage space. You'll also get the crispest look if points are set on exact pixel borders. For example, it is important to align the most prominent outlines with the 16x16 grid.

    • Check the preview to see if your icon still looks good in 16x16. You may want to use the Level Of Detail settings described in the Shapes section.

    • -
    • There's an easy way to produce letters, even if Icon-O-Matic doesn't provide such a tool. Just enter the text in a text editor, adjust font type and style, and drag&drop the selected text into Icon-O-Matic. This will create the according paths and shapes.

    • +
    • It is possible to transform the selected path points by pressing T or invoking the context menu by right-clicking on selected points. From the context menu, you will also have access to a few more helpful path editing features.

    • +
    • There's an easy way to produce letters, even if Icon-O-Matic doesn't provide such a tool. Just enter the text in a text editor such as StyledEdit, adjust font type and style, and drag&drop or copy&paste the selected text into Icon-O-Matic. This will create the according paths and shapes.

    • If you assign more than one path to a shape, their overlapping areas will cancel each other out. When one path is completely inside another, it practically creates a hole in the resulting shape.

    • You can zoom in and out of the canvas with the mouse wheel. Panning is done either by click&drag with the middle mouse button or with a normal left-click&drag while holding SPACE.

    From axeld at pinc-software.de Sat Jul 4 15:48:25 2009 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Sat, 04 Jul 2009 15:48:25 +0200 CEST Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <20090704115420.655.1@bepc.1246692208.fake> Message-ID: <25390729184-BeMail@zon> Stephan Assmus wrote: > On 2009-07-04 at 10:11:25 [+0200], PulkoMandy > wrote: > > > * Haiku-doc.css: content font-size is now 0.9em > > mh... why so ? 1em is the default size, if you find it too big you > > should > > configure your web browser to use smaller fonts. I use a quite > > small > > default size here and I think anything below 1 quickly becomes > > difficult > > to read. > Same thoughts here. The default text block font should always be 1em, > IMHO. You had like 4 days to complain about that. All websites I know are using a smaller font than 1em, including the Haiku website, so I don't think this is much of a problem. Bye, Axel. From leavengood at gmail.com Sat Jul 4 16:40:41 2009 From: leavengood at gmail.com (Ryan Leavengood) Date: Sat, 4 Jul 2009 10:40:41 -0400 Subject: [Haiku-commits] r31382 - in haiku/trunk/src/apps/debugger: . debug_info dwarf files gui/team_window model In-Reply-To: <20090703132401.403.1@knochen-vm.localdomain> References: <200907030056.n630uge9012376@sheep.berlios.de> <20090703132401.403.1@knochen-vm.localdomain> Message-ID: On Fri, Jul 3, 2009 at 7:24 AM, Ingo Weinhold wrote: > > Thanks! Still quite a bit of work left to do before it will really become > usable, though. I haven't tried it yet but I've been reading the commits and I'll just add my appreciation for this work. It is really amazing to see something as complex as a graphical debugger coming together like this. I'm also using it as an example of how to develop a good Haiku application. Hopefully I'll learn a thing or two that makes the browser better. -- Regards, Ryan From superstippi at gmx.de Sun Jul 5 01:38:16 2009 From: superstippi at gmx.de (Stephan Assmus) Date: Sun, 05 Jul 2009 01:38:16 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <25390729184-BeMail@zon> References: <25390729184-BeMail@zon> Message-ID: <20090705013816.374.1@bepc.1246749932.fake> On 2009-07-04 at 15:48:25 [+0200], Axel D?rfler wrote: > Stephan Assmus wrote: > > On 2009-07-04 at 10:11:25 [+0200], PulkoMandy > > wrote: > > > > * Haiku-doc.css: content font-size is now 0.9em > > > mh... why so ? 1em is the default size, if you find it too big you > > > should > > > configure your web browser to use smaller fonts. I use a quite small > > > default size here and I think anything below 1 quickly becomes > > > difficult > > > to read. > > Same thoughts here. The default text block font should always be 1em, > > IMHO. > > You had like 4 days to complain about that. Huh? I don't understand what you mean by that. I thought Adrien pretty much replied right away and so did I. Or do you mean this change was up for discussion before it happened? If so I must have missed it. > All websites I know are using a smaller font than 1em, including the Haiku > website, so I don't think this is much of a problem. I am sorry to say, but that is not a convincing argument at all. 1em is called 1em for a reason. It should be "the default reading text size". It's like "the reference". What good is it to make 90% the new 100% and have everyone enlarge the default a bit so that 90% is back to what the original 100% were, only that all websites have to decrease the font size a bit so it doesn't look too large because every user has his default increased a bit so all those other websites which decreased their font size don't look to small. Huh? What kind of insane setup is that? Can we please keep 100% to mean what it was meant to mean? All that being said, it's no biggy, I don't care all that much. Best regards, -Stephan From humdingerb at googlemail.com Sun Jul 5 06:21:31 2009 From: humdingerb at googlemail.com (Humdinger) Date: Sun, 05 Jul 2009 06:21:31 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <20090705013816.374.1@bepc.1246749932.fake> References: <25390729184-BeMail@zon> <20090705013816.374.1@bepc.1246749932.fake> Message-ID: <4A502A4B.400@googlemail.com> Stephan Assmus wrote: >> You had like 4 days to complain about that. > > Huh? I don't understand what you mean by that. I thought Adrien pretty much > replied right away and so did I. Or do you mean this change was up for > discussion before it happened? If so I must have missed it. I did post about it a few days ago on the doc mailing list, but I should have considered that there's only a reduced audience there (BTW, it's a quite low traffic mailing list, I encourage more people to join). :) Also, I misjudged the impact of this change. >> All websites I know are using a smaller font than 1em, including the Haiku >> website, so I don't think this is much of a problem. > > I am sorry to say, but that is not a convincing argument at all. 1em is > called 1em for a reason. It should be "the default reading text size". I can agree with your argumentation. It just seemed like a quick fix. I do think when surfing around the web and then hitting the user guide, it's first like... whoa... big! "Haiku, the OS for the elderly"? :) Should this issue be further discussed (on the general mailing list)? Or chould I revert right away? Regards, Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=- Deutsche Haiku News @ http://www.haiku-gazette.de From humdingerb at googlemail.com Sun Jul 5 06:21:35 2009 From: humdingerb at googlemail.com (Humdinger) Date: Sun, 05 Jul 2009 06:21:35 +0200 Subject: [Haiku-commits] r31403 - in haiku/trunk/docs: . userguide/en userguide/en/applications userguide/en/preferences userguide/images userguide/images/apps-images userguide/images/queries-images In-Reply-To: <5831391791-BeMail@Zeta> References: <5831391791-BeMail@Zeta> Message-ID: <4A502A4F.6050401@googlemail.com> Fran?ois Revol wrote: > You can always add buttons/links to increase/decrease the base font > size manually like on: > http://www.liberation.fr/medias/0101577674-hadopi-en-plus-fouillis > Seems to be some javascript stuff though. Yeah, I thought about that, too. But introducing JS and widgets would take away the soothing simplicity of the user guide IMO. > Another way is to propose an alternate CSS in the section, sane > browser should propose it in their View menu. So you can add a "small > font" CSS. Would that be just another "" on the top of every page pointing to a copy of Haiku-doc.css with the difference of a font-size:0.9em? It's a simple solution that would probably nobody notice and use, but it's something. :) Stephan Assmus wrote: >> That said, I've been reading the new Icon-O-Matic guide and it's >> awesome! >> :-D > > Looks quite complete yes :) Thanks. :) Also thanks for all corrections and additions. Regards, Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=- Deutsche Haiku News @ http://www.haiku-gazette.de From leavengood at mail.berlios.de Sun Jul 5 06:36:28 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Sun, 5 Jul 2009 06:36:28 +0200 Subject: [Haiku-commits] r31407 - haiku/trunk/src/apps/deskbar Message-ID: <200907050436.n654aS29019244@sheep.berlios.de> Author: leavengood Date: 2009-07-05 06:36:26 +0200 (Sun, 05 Jul 2009) New Revision: 31407 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31407&view=rev Modified: haiku/trunk/src/apps/deskbar/Switcher.cpp Log: Having the delay for showing the Switcher window based on the keyboard delay seemed odd to me. The default settings made it feel too slow in coming up, and even the fastest settings still felt awkward. So after some trial and error I came up with a reasonable default that feels nice to me. Modified: haiku/trunk/src/apps/deskbar/Switcher.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/Switcher.cpp 2009-07-04 12:31:55 UTC (rev 31406) +++ haiku/trunk/src/apps/deskbar/Switcher.cpp 2009-07-05 04:36:26 UTC (rev 31407) @@ -658,14 +658,10 @@ void TSwitchManager::MainEntry(BMessage* message) { - bigtime_t keyRepeatRate; - get_key_repeat_delay(&keyRepeatRate); - - if (keyRepeatRate < 200000) - keyRepeatRate = 200000; - bigtime_t now = system_time(); - bigtime_t timeout = now + keyRepeatRate; + bigtime_t timeout = now + 180000; + // The delay above was arrived at by trial and error and + // has a good "feel" app_info appInfo; be_roster->GetActiveAppInfo(&appInfo); @@ -702,7 +698,8 @@ QuickSwitch(message); return; } - snooze(50000); + snooze(20000); + // Must be a multiple of the delay used above } Process((modifierKeys & B_SHIFT_KEY) == 0, From leavengood at mail.berlios.de Sun Jul 5 07:03:25 2009 From: leavengood at mail.berlios.de (leavengood at BerliOS) Date: Sun, 5 Jul 2009 07:03:25 +0200 Subject: [Haiku-commits] r31408 - haiku/trunk/docs/userguide/en Message-ID: <200907050503.n6553PNj010512@sheep.berlios.de> Author: leavengood Date: 2009-07-05 07:03:23 +0200 (Sun, 05 Jul 2009) New Revision: 31408 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31408&view=rev Modified: haiku/trunk/docs/userguide/en/twitcher.html Log: Some userguide tweaks for the Twitcher which I have learned more about recently. It is more advanced than I thought. Modified: haiku/trunk/docs/userguide/en/twitcher.html =================================================================== --- haiku/trunk/docs/userguide/en/twitcher.html 2009-07-05 04:36:26 UTC (rev 31407) +++ haiku/trunk/docs/userguide/en/twitcher.html 2009-07-05 05:03:23 UTC (rev 31408) @@ -38,8 +38,9 @@

    The Twitcher is a task switcher to jump between running applications and their windows.

    twitcher.png -

    Just tap CTRL TAB quickly to switch between the current and the last application/window. Or press CTRL TAB and hold the CTRL key to go through all running applications by repeatedly hitting TAB or /. If you need to get to a specific window of a program, move to its icon as described and then go through its open windows with the / keys.

    +

    Just tap CTRL TAB to switch between the current and the last application/window. Tapping CTRL TAB very quickly will switch between all applications. Or press and hold CTRL TAB to go through all running applications by repeatedly hitting TAB or /. If you need to get to a specific window of a program, move to its icon as described and then go through its open windows with the / keys.

    It's also possible to invoke the Twitcher with CTRL TAB and then use the mouse to choose the application/window you'll jump to when releasing the CTRL key.

    +

    For more advanced users the Twitcher also has other useful keyboard shortcuts. Press ESC to return to the current window. Press Q to quit the selected application. Press H to hide all windows of the selected application.

    - - - - Icon-O-Matic - + + + + Icon-O-Matic +
    -

    - Applications -     - Previous: Expander -     - Next: Installer -

    +

    + Applications +     + Previous: Expander +     + Next: Installer +

    -

    icon-o-matic-icon_64.pngIcon-O-Matic

    + + + + +
    Index
    BeOS bitmap vs. Haiku vector icons
    + Icons are attributes
    + Creating icons with Icon-O-Matic
    +   Path
    +   Shape
    +   Style
    +   Transformer
    +   Saving an icon
    +   Tips & Tricks
    + +

    icon-o-matic-icon_64.pngIcon-O-Matic

    +
    Deskbar:Applications
    Location:/boot/system/apps/Icon-O-Matic
    Settings:~/config/settings/Icon-O-Matic
    -

    Documentation is still missing. If you want to work on it, please announce it on the Documentation mailing list to avoid duplication.

    +


    + +

    Before we come to the actual creating of icons in Icon-O-Matic, a few words on Haiku's icons in general.

    + +

    +index +BeOS bitmap vs. Haiku vector icons

    +

    Contrary to the BeOS, Haiku uses vector icons instead of bitmap icons. A special Haiku Vector Icon Format (HVIF) was developed that is highly optimized for small file sizes and fast rendering. That's why our icons are for the most part much smaller than either a bitmap or the widely used SVG format. Also, unlike BeOS' bitmap icons, Haiku isn't limited to an 8bit palette (256 colors).
    +Take this icon of the Terminal, for example:

    + + + + +
    BitmapSVGHVIF
    i-o-m-terminal-bitmap32 i-o-m-terminal-bitmap16terminal-icon_32terminal-icon_32
    1,024 byte
    + 256 byte
    7,192 byte 768 byte
    +

    Note that the BeOS used two versions of an icon, one 16x16 and 32x32, to achieve good visuals in List and Icon View mode.

    +

    This trick isn't needed with vector icons. Besides only taking up a few hundred bytes in a file, vector icons also scale much better than bitmaps. (Note: BeOS offered only a 16x16 and 32x32 display.)

    + + + + + + + + + + + + + +
    16x1632x3264x64128x128
    Bitmapi-o-m-bitmap16i-o-m-bitmap32i-o-m-bitmap64i-o-m-bitmap128
    Vectori-o-m-vector16i-o-m-vector32i-o-m-vector64i-o-m-vector128
    + +

    +index +Icons are attributes

    +

    Icons are stored as an attribute with their file. However, that doesn't mean that every file has to have this attribute to appear with an icon in a Tracker window: data files inherit their icon from their filetype. To globally change the filetype's icon you use the FileTypes preferences. If you only want to add a special icon to an individual file, you use the FileType Add-On on it instead. See topic Filetypes for more information.

    +
    Being an attribute, it follows that only filesystems supporting metadata can retain a file's individual icon. So, if you move files off your BFS volume, consider zipping them up so you don't lose icons or other attributes.
    + +

    +index +Creating icons with Icon-O-Matic

    +

    Icon-O-Matic is Haiku's icon editor that can save your work as HVIF, SVG or PNG. The icon can also be directly attached as attribute to an existing file or exported as a resource or source file used by developers. Since the application was tailored to the optimized HVIF format, its usage reflects the inner workings of this format.

    +

    Other than your normal vector graphics software, you don't deal with separate objects that each include all their specific properties like path, stroke width, stroke and fill color etc. Rather, you assemble your objects ("shapes") from shared paths and colors ("styles") and set certain properties. This re-using of elements is one secret of HVIF's efficiency. Although that imposes some constraints on the icon designer, there are a few advantages, too.
    +For example, by re-using a path, several objects can be modified together by manipulating this one path. Think of an object and its shadow. Modifying their shared path will change the object itself and automatically its (maybe slightly distorted/translated) shadow.

    + +

    Here's a quick overview of Icon-O-Matic's window:

    +i-o-m-overview.png + +

    To create any visible object on the canvas, you need a shape with a path and a style. Conveniently, you can create one, two or all three of those together from the Shape menu. Every kind of object (Paths, Shapes, Transformers, and Styles) has a menu above its list of elements, offering various commands. Every element has certain options that are set in the Property view.

    + + +

    +index +Path

    +

    A path consists of several points which are connected with lines or Bezier curves. To add or change points, make sure, the path is selected in the path list.

    + +

    Simply clicking in the canvas will set the first point. While setting a point, you decide if the resulting line will be straight or curved: a simple click and release produces a straight line, holding down the mouse button and moving the mouse will drag out the handles for a Bezier curve. Of course, you can also change it all later on.

    + +i-o-m-path-ab + +

    To get from "A" to "B", you have to transform some points from corner-points to curve-points. That's done by holding ALT while clicking on a point and dragging out the handles. This results in a symmetrical Bezier: the second handle follows the movement of the other. If you need to move the handles independently, again click&drag on a Bezier handle while holding ALT.
    +Vice versa, to go from Bezier to a corner-point, hold ALT and click on a point.

    + +

    To move a point, simply click&drag it. To select more than one point, hold down SHIFT and draw a selection rectangle. Selected points are marked with a red border instead of the usual black.
    +To insert a point into a path you click on the connecting line between two points.
    +Selected points are deleted by pressing DEL or by clicking on any point while holding CTRL.

    + +

    The mouse pointer indicates the current mode:

    + + + + + + + + + + + + + + + + + +
    i-o-m-pointer-move-pathi-o-m-pointer-inserti-o-m-pointer-addi-o-m-pointer-deletei-o-m-pointer-bezieri-o-m-pointer-select
    Move point(s)Insert pointAdd pointDelete point
    CTRL
    Corner↔Bezier
    ALT
    Select points
    SHIFT
    +

    You can invoke a context menu by right-clicking a point or a selection of points:

    + + + + + + +
    Select allALT ASelects all points of the current path.
    TransformTPuts all selected points in a transformation box, so you can move, resize and rotate them together. It works just like with shapes, described a bit further down.
    SplitSplits selected points into two, one sitting on top of the other.
    FlipRotates selected points by 180?. Only has an effect on Bezier points.
    RemoveDELDeletes selected points.
    + +

    Path Menu

    +

    The Path menu offers a few obvious entries to Add Rectangle and Add Circle or to Duplicate or Remove a path. Here are some that may need a bit more explaining:

    + + + + + +
    ReverseIf your path isn't "closed" (see Path Properties below), a click into the canvas always creates a new point, connecting it with the last one. "Reverse" will reverse this order and your new point will connect to original start point instead.
    Clean UpMost useful with imported SVGs, this function will remove redundant points.
    Rotate Indicesnot yet implemented.
    + +

    Path Properties

    +

    The Property at the bottom left of the window offers all available settings of the currently selected object. A path only has two: a Name and if it's Closed or not.

    + + +

    +index +Shape

    +

    A shape groups together one or more paths with a style. Practically, it's the object that you'll actually see on the canvas. The grouping is done with the checkboxes in front of the paths and styles: Just select your shape and tick off the desired path(s) and a style.

    +

    A shape defines how a path and style is applied, e.g. if the object is filled or only stroked (which is done by using Transformers on the shape, we'll get to that later). Also, a shape can be moved, rotated or resized without touching the used path. That way, you can re-use a single path and get different, but related, shapes.

    + +i-o-m-shape + +

    When a shape is selected from the list, a rectangle is drawn around it. Depending on where exactly you grab it, the shape is moved, resized or rotated around a point in its center, which itself can be moved. Holding SHIFT will lock direction when moving, limit resizing to 45? angles and restrict the aspect ratio while resizing. The mouse pointer again indicates the current mode:

    + + + + + + + + + + + + + +
    i-o-m- move-shapei-o-m-pointer-resizei-o-m-pointer-rotatei-o-m-pointer-move-rotation
    MoveResizeRotateMove
    rotation point
    + +

    Shapes lie on top of each other, each is on its own layer, if you will. To reorder them you drag&drop their entry to a different position in the list.

    + +

    Shape Menu

    +

    The Shape menu offers the before mentioned possibility to Add Empty, With Path/Style/Path&Style and to Duplicate or Remove a shape. Then, there is:

    + + + +
    Reset TransformationReverts all the move, resize and rotate transformations you have applied to the shape.
    Freeze TransformationWhen you transform a shape, its assigned path(s) stay in their original position. This may be intended; maybe more than one shape is using that path, maybe you intentionally used Options | Snap to Grid to set the points at precise pixel borders.
    +If not, "Freeze Transformation" will apply the current shape transformation to the assigned path(s). A future "Reset Transformation" will then return to this new state.
    + +

    Shape Properties

    +

    Besides a Name, the Property view for a shape has these options:

    + + + + + +
    RoundingUnfinished feature. Once working correctly, it will do a kind of "hinting" for vector paths, rounding their coordinates to the next full pixel, giving it a crisper look.
    Min LODMinimum Level of Detail
    Max LODMaximum Level of Detail
    + +

    Level of Detail (LOD)

    + + + + + + +
    16x1632x3264x64
    i-o-m-lod-icon_16i-o-m-lod-icon_32i-o-m-lod-icon_64
    +

    See how there are no numbers in the 16px version of the BeVexed icon? That's done with the "Level of Detail" setting of their shapes.
    +With the LOD you control the visibility of a shape depending on its size. That way, you can leave away details of an icon that looks good on a bigger icon, but maybe not so much on its smaller version.

    +

    This is how it works: A LOD of 1.0 is defined as a 64px icon size. So, to get the LOD of a particular icon size you simply divide it by 64, e.g. a 16px icon has a LOD of 16/64 = 0,25. A shape won't be visible below its Min LOD and above its Max LOD.

    +

    So, if you set a shape's Min LOD to 0.0 and the Max LOD to 0.5, this means that the shape will only be visible for icon sizes smaller or equal to 32px. If you wanted to exclude the 32px icon size, you'd have to stay below 0.5, say 0.49.

    +

    The LOD is not only for leaving out detailing shapes, you can also use it to e.g. change the stroke width at different sizes, if you feel that's needed. Simply duplicate a shape, make your changes and set both of their LOD settings to show either one or the other. Here lies the only source of potential confusion, when you're unwittingly overlap LODs of shapes, and wonder why at some size both are visible...
    +For example, if Shape 1 were to be shown below 48px and Shape 2 from 48px upward (LOD: 48/64 = 0.75):

    + + + + + + + + +
    OKNot OK!
    Shape 1Min LOD0.00Min LOD0.00
    Max LOD0.74Max LOD0.75
    Shape 2Min LOD0.75Min LOD0.75
    Max LOD4.00Max LOD4.00
    + + +

    +index +Style

    +

    A style can either be a solid color or some type of gradient.
    +Besides the predefined colors under Swatches, you can mix your own by clicking on the current color. Also, note the slider under the color spectrum which sets the alpha-channel (transparency).

    +i-o-m-gradients +

    You quickly create a new style by mixing your color and simply drag&dropping it into the list of styles.

    +

    If you go for a gradient, you set the type (Linear, Radial, Diamond, Cone) and then define the start and end colors. This is done with a drag&drop from a color bucket into the respective color indicator under the gradient.
    +Of course you can move these indicators to change the gradient to your liking. You can also insert more indicators to add more colors by double-clicking into the gradient. Pressing DEL removes the selected indicator.

    +

    You can move, resize and rotate the representing box of a gradient on the canvas until it fits your needs. This works just like with shapes.

    + +

    Style Menu

    +

    The Style menu offers the usual entries to Add, Duplicate or Remove a style and to Reset Transformation.

    + +

    Style Properties

    +

    The Name is the only Property of a style.

    + + +

    +index +Transformer

    +

    A shape can have Transformers which change its appearance. The effects, however, are more subtle than a truck turning into a battle robot...

    + +

    Transformer Add Menu

    + + + + + +
    TransformationOffers the same move/resize/rotate options you have by manipulating a shape with your mouse directly.
    Perspectivenot yet implemented
    ContourAdds an outline to a shape.
    StrokeStrokes the path of a shape instead of filling it with a style.
    + +

    Depending on the kind of Transformer, you'll get a different set of properties.

    + +

    Transformer Properties

    +

    Besides a Name and the actual Width for the transformer, the Property view has these (depending on its type slightly differing) options:

    + + + + + +
    CapsStroke only. Defines the end caps of a line: Butt, Square or Round.
    Detect Orient.Contour only. Makes sure the contour always extends outwards when you have self-intesecting paths.
    JoinsDefines how lines are joint at a point: Miter, Round or Bevel.
    Miter LimitOnly when the above Joins is set to "Miter" this setting influences the looks of the miter joint.
    + + +

    +index +Saving an icon

    +

    There's your usual menu bar at the top, File, Edit, Options. The usage is pretty much self-explaining, so we'll only look at how to save your work.

    +

    File | Save As... will save in a special Icon-O-Matic format that retains additional information like the names of paths, shapes and styles. These will be stripped from the actual icon once you export it to save space. It's a good idea to back-up your work like this, because without named objects everything's named "<path>/<shape>/<style>" which makes specific changes tedious.

    + +

    File | Export As... opens a familiar save panel with a file format dropdown menu at the bottom, offering these choices:

    + + + + + + + + + +
    HVIFHaiku Vector Icon Format
    HVIF RDefSaves as resource used by programmers
    HVIF Source CodeSaves as source code used by programmers
    SVGSaves as SVG
    PNGSaves as a 64px sized PNG
    PNG SetSaves as 16, 32 and 64px sized PNGs
    BEOS:ICON AttributeChoose a file and set its icon attribute directly
    META:ICON AttributeChoose a file and attach the icon as mere meta data
    + + +

    +index +Tips & Tricks

    +

    A few things you should keep in mind when working with Icon-O-Matic and some general tips for its usage:

    +
      +
    • Read the Icon Guidelines to learn about important characteristics of Haiku icons, e.g. perspective, colors and shadows.

    • +
    • You should always try to minimize your use of paths, those are the most expensive, file size wise. Re-use paths wherever possible and work with manipulated shapes and their transformers instead. Smart use of gradients can also save space.

    • +
    • Wherever possible, you should activate Snap-to-Grid from the Options menu when editing paths. Path points that align with the 64x64 pixel grid use less storage space. You'll also get the crispest look if points are set on exact pixel borders. For example, it is important to align the most prominent outlines with the 16x16 grid.

    • +
    • Check the preview to see if your icon still looks good in 16x16. You may want to use the Level Of Detail settings described in the Shapes section.

    • +
    • There's an easy way to produce letters, even if Icon-O-Matic doesn't provide such a tool. Just enter the text in a text editor such as StyledEdit, adjust font type and style, and drag&drop or copy&paste the selected text into Icon-O-Matic. This will create the according paths and shapes.

    • +
    • If you assign more than one path to a shape, their overlapping areas will cancel each other out. When one path is completely inside another, it practically creates a hole in the resulting shape.

    • +
    • You can zoom in and out of the canvas with the mouse wheel. Panning is done either by click&drag with the middle mouse button or with a normal left-click&drag while holding SPACE.

    • +
    + + + + + +
    - + + + + + Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/applications.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/applications.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/applications.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -86,7 +86,7 @@ iconExpander  A tool to unpack common archives. iconIcon-O-Matic  - An app to create Haiku's vector icons. [still missing] + An app to create Haiku's vector icons. iconInstaller  The tool to install Haiku to a partition. [still missing] iconMagnify  Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/deskbar.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/deskbar.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/deskbar.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -37,11 +37,22 @@
    + + + +
    Index
    + The Deskbar Menu
    + The Tray
    + The list of running programs +
    +

    The Deskbar is the little panel that by default is located in the upper right corner of the screen. It's Haiku's version of Windows' taskbar with its Start button. It contains the Deskbar menu from where you can start applications and preferences, a tray with a clock and other tools below that and a list of currently running programs at the bottom.

    positions

    You can move the Deskbar to any corner or as a bar along the upper or lower border of the screen by gripping the knobbly area on the left side of the tray and drag&drop it into the new position. You can also fold it into a more compact layout by drag&dropping the knobbly area onto the Deskbar menu.

    -

    The Deskbar Menu

    +

    +index +The Deskbar Menu

    A menu opens when you click on the Deskbar's top:

    settings.png
      @@ -76,13 +87,17 @@ This part of the panel is just a representation of the folder /boot/home/config/be/. You can just as well link or copy files and folders directly in Tracker to configure your Deskbar.

      Even easier is it to simply drag a file or folder and drop it where you want it into the Deskbar.

      -

      The Tray

      +

      +index +The Tray

      calendar.png

      Among other things, the tray is housing the clock. Left-click it to toggle between date and time. Right-click it to hide/show it or launch the Time preferences to set it.
      Here you can also launch a calendar that also appears, when you hold down the left mouse button on the clock for a little time.

      Any program can install an icon in the tray to provide an interface to the user. The email system, for instance, shows a different symbol when there's unread mail and offers a context menu to e.g. create or check for new mail. ProcessController is another example that uses its icon in the tray to provide information (CPU/memory usage) and to offer a context menu.

      -

      The list of running programs

      +

      +index +The list of running programs

      list-of-apps.png

      You can change to a specific running application by clicking on its entry in the Deskbar and choosing (one of) its windows, from the submenu. By right-clicking you can minimize or close a window or the entire application.

      If you activated Expanders in the Deskbar settings, you can expand/collapse the list of windows directly under an application's entry.

      Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/filetypes.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/filetypes.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/filetypes.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -55,7 +55,7 @@

      The Default Application is the one that's set globally for that filetype. If you don't find the program you want to associate with this file in the drop-down menu, you'll again find the buttons Select... and Same As... which do the similar thing described under "The File Type" above.

      The Icon

      -

      If you're wondering why the icon well on the top right is empty: Icons are normally inherited from the system default for that filetype. You can open the Filetype Add-On of a file that contains an icon and drag&drop it into your file's icon well. Or you double-click the icon well and create or edit your own icon in Icon-O-Matic.

      +

      If you're wondering why the icon well on the top right is empty: Icons are normally inherited from the system default for that filetype. You can open the Filetype Add-On of a file that contains an icon and drag&drop it into your file's icon well. Or you double-click the icon well and create or edit your own icon. For more info on icons and how to create your own, see topic Icon-O-Matic.

      Special settings for applications

      If you invoke the Filetype Add-On on an executable (here: StyledEdit), you'll get a different dialog:

      Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/installation/install-source-linux.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/installation/install-source-linux.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/installation/install-source-linux.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -87,7 +87,7 @@

      Now you could already start to build RAW or VMWare images. Before we come to that, however, let's have a look at the UserBuildConfig that can be used to customize and automate some things.

      -

      In trunk/haiku/build/jam/ there's a UserBuildConfig.ReadMe that explains various options. Don't simply rename it and use it as UserBuildConfig!

      +

      In haiku/trunk/build/jam/ there's a UserBuildConfig.ReadMe that explains various options. Don't simply rename it and use it as UserBuildConfig!

      You start by duplicating the UserBuildConfig.sample and removing the .sample suffix to get your UserBuildConfig. From the .ReadMe you can copy interesting parts into your config and customize them there.

        @@ -112,7 +112,7 @@
        # Add symlink/file (timezone and keymap settings) to the image.
         AddSymlinkToHaikuImage home config settings
         	: /boot/system/etc/timezones/Europe/Paris : timezone ;
        -AddFilesToHaikuImage home config settings : German 
        +AddFilesToHaikuImage home config settings : German 
         	: Key_map ;
      1. The build process can be fine tuned until it fits your needs. You could create your own folder haiku/trunk/user_data/ and put files there that are then copied or unzipped into the image. Zipping is important when dealing with Haiku files and their attributes, because zipping them up will preserve them on non-BFS partitions.
        For example:

        Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-e-mail.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-e-mail.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-e-mail.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -36,6 +36,18 @@
        + + + + +
        Index
        + Creating a new e-mail account
        + Setting up incoming e-mail
        + Setting up outgoing e-mail
        + Setting up e-mail filters
        + Setting up the mail_daemon +
        +

        e-mail-icon_64.pngE-mail

        @@ -46,12 +58,16 @@

        Haiku provides a system that retrieves e-mail regularly via a mail_daemon and saves each mail as a single text file. It parses the mail and fills its attributes with all necessary header information, like from, to, subject and its unread status. Now it can be queried by you or any application. This system also makes switching e-mail clients easy as all the data and your configuration stays the same.
        The configuration is done in the E-Mail preference panel.

        -

        Creating a new e-mail account

        +

        +index +Creating a new e-mail account

        Let's go through the process of setting up an e-mail account.
        You start by clicking the Add button to create a new, unnamed account. Then you declare the Account Type which is either Receive Mail Only, Send Mail Only, or the most usual type, Send and Receive Mail.

        Now you enter an Account Name, your Real Name and the Return Address where replies will be sent to.

        -

        Setting up incoming e-mail

        +

        +index +Setting up incoming e-mail

        Click on Incoming under your account's name to set up how e-mails are received.

        e-mail-in.png

        From the drop-down menu you choose the protocol used by your provider. IMAP and POP3 are supported.

        @@ -62,14 +78,18 @@

        You can change the Location of your inbox (default: /boot/home/mail/in/), which is useful if you'd like to separate the mails from different accounts into their own folders. However, queries let you sort things out just as well.

        Last on this page, you can opt to only Partially download messages that are larger than a certain size. This will only get the header and you can decide if you want to download the rest of the message plus possible attachments after seeing the subject and who sent it. Useful if you have a slow connection.

        -

        Setting up outgoing e-mail

        +

        +index +Setting up outgoing e-mail

        Click on Outgoing under your account's name to set up how e-mails are sent.

        e-mail-out.png

        As with incoming mail, you can also change the Location of your outbox (default: /boot/home/mail/out/).

        Next is the SMTP Server address for outgoing mails. As with the incoming server before, you can use a specific port if needed, e.g. mail.your-provider.org:1200.

        If you need to login, you change the Login Type to ESMTP and enter username and password above. The other type is used for providers that need you to check for mail with POP3 before SMTP for identification.

        -

        Setting up e-mail filters

        +

        +index +Setting up e-mail filters

        If you want to filter your incoming email, you click on E-Mail Filters under your account's name to set up automatic sorting. You can add any number of filters that are applied one after the other. You can rearrange them by drag&dropping them to their new position.
        Besides the R5 Daemon Filter that's used for backward compatibility, there are two other Incoming Mail Filters you can add.

        @@ -119,7 +139,9 @@

        At this moment, there's only one filter that deals with outgoing mail: fortune.
        It will attach a randomly chosen funny or wise "fortune cookie" to the end of every mail before it's sent out. You can do a dry run by issuing the command fortune in a Terminal.

        -

        Setting up the mail_daemon

        +

        +index +Setting up the mail_daemon

        Now that your incoming and outgoing mail servers (and maybe some filters, too), are configured, you have to tell the mail_server that does all the actual mail checking and fetching how to do its job.

        e-mail-settings.png

        Under Mail Checking you configure the interval at which the account's mail server is probed for new mail.
        Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-keymap.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-keymap.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/preferences/prefs-keymap.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -63,11 +63,11 @@

        Advanced keymap manipulation

        There's another method to customize your keymap besides the Keymap preference panel. It involves editing a text file containing loads of hex values, which may appear daunting on first sight, but isn't really that impossible to grasp.

        You can dump the current keymap with a command in Terminal:

        -

        keymap -d > MyKeymap
        +
        keymap -d MyKeymap

        The generated text file can then be opened in a text editor. Make sure to use a fixed font in that editor or you'll never grok that file...
        At the beginning of that file, you'll find a legend of a stylized keyboard with the hex value corresponding to each key. Below that are the actual assignments of every value. You can do all the customizing that's also available from the Keymap preference panel, and then some. If you happen to have some special keys on your keyboard, you may be able to activate them. That is, use them as ordinary keys or like an option or control key. You won't be able to, for example, have your multimedia keys de/increase the volume or start some application. For this you can use e.g. SpicyKeys.

        -

        When you're finished, you'll save the file and have your system use the modified keymap with this command:

        -
        keymap -l < MyKeymap
        +

        When you're finished, you'll save the file and have your system load the modified keymap with this command:

        +
        keymap -l MyKeymap

        This is the dumped file (the rightmost keys of the stylized keyboard are cut-off for a nicer display on this page):

        #!/bin/keymap -l
        
        Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/queries.html
        ===================================================================
        --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/queries.html	2009-07-06 19:50:56 UTC (rev 31429)
        +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/queries.html	2009-07-06 20:27:01 UTC (rev 31430)
        @@ -36,11 +36,25 @@
         
         
        + +
        + + +
        Index
        + The Find window
        + Basic queries - "by Name"
        + Advanced queries - "by Attribute"
        + Even more advanced queries - "by Formula"
        + The result window +
        +

        A query is a file search based on file attributes and can be performed within Tracker or in Terminal. Queries are saved in /boot/home/queries/ and by default last seven days before being purged. Note, that these aren't static result lists of your search, but are the query formulas which trigger a new search whenever you open them.

        -

        The Find window

        +

        +index +The Find window

        You start a query by invoking the Find... menu either from the Deskbar menu or any Tracker window or the Desktop (which is actually a fullscreen Tracker window). The shortcut is ALT F. You're presented with the Find window:

        -basic-query.png +basic-query.png
        1. Select previous or saved queries or save the current query.

        2. Narrow down your search from "All files and folders" to specific file @@ -58,10 +72,14 @@

        3. You can drag&drop the icon to save the query.

        -

        Basic queries - "by Name"

        +

        +index +Basic queries - "by Name"

        If you simply want to find all files on your mounted disks that match a certain pattern, simply leave the search method at "by Name", enter the search term into the text box and press ENTER.

        -

        Advanced queries - "by Attribute"

        +

        +index +Advanced queries - "by Attribute"

        You can create more advanced queries by searching within the attributes of specific file types. For that to work, these attributes have to be indexed.

        query-window.png

        You start by setting the filetype from "All files and folders" to "text | E-mail" and change the search method to "by Attribute".

        @@ -70,7 +88,9 @@ query-window-filled.png

        This is your Find window when you're looking for all emails Clara Botters has sent to you in the last two months that had in the subject "vibraphone" or "skepticality".

        -

        Even more advanced queries - "by Formula"

        +

        +index +Even more advanced queries - "by Formula"

        Typing in a formula query by hand is daunting and really quite unpractical. It still has its uses.

        Take the above query by attribute of Clara's mails concerning vibraphones etc. If you have all the attributes and their search terms set, try switching to "by Formula" mode and be overwhelmed by this one line query string:

        formula-query.png @@ -87,7 +107,9 @@
      2. You can fine tune your query by inserting parenthesis where needed, make parts case-sensitive or negate logical combinations by changing. e.g. "==" to "!=" for a NOT AND. All you need is a basic understanding of regular expressions and maybe some scripting basics.

    -

    The result window

    +

    +index +The result window

    After you start a search, the Find window will be replaced by a result window. Here is an example that queried for "server":

    result-window.png

    Besides the gray background, result windows work exactly like any other Tracker window. Some things are worth noting:

    Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/tracker.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/tracker.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/tracker.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -36,17 +36,34 @@
    + + + + +
    Index
    + Mounting volumes
    + Navigating
    + Appearance
    + Tracker preferences
    + Working with files
    + Transaction status +
    +

    The Tracker is the graphical interface to all your files. It let's you create new files and folders or find, launch or rename as well as copy or delete existing ones.

    Being an application like any other (the Desktop with its icons is really just a fullscreen window in the background), Tracker appears with its windows in the Deskbar and can be quit and restarted. The easiest way to quit and restart a crashed or frozen Tracker (or a wayward Deskbar) is to call the Team Monitor.

    -

    Mounting Volumes

    +

    +index +Mounting Volumes

    In order to access a harddisk, CD, USB stick etc., you first have to mount the volume, that is, let the system know it's there. This is done with a right-click on the Desktop or an already mounted volume (like the boot disk) and choosing the volume from the Mount submenu. You find the same Mount menu in the Deskbar.

    drill-down.png

    There are also Mount Settings so you don't have to mount everything manually after every bootup.
    The above settings will automatically mount any storage device you connect/insert and also mount all disks on bootup that were mounted previously.

    Before you disconnect e.g. a harddrive or USB stick, make sure you have successfully unmounted the volume. This guarantees that all data transfer has finished. Otherwise you may lose data or corrupt the disk!
    -

    Navigating

    +

    +index +Navigating

    By default, when you double-click a folder, Tracker opens a new window while leaving the parent window open. This can quickly lead to an overcrowded desktop.
    You can prevent that by holding down the left WIN key, which automatically closes the parent window.
    This is also true for keyboard navigation. For more on that, see topic Shortcuts and key combinations.

    @@ -68,7 +85,9 @@ window-type-ahead.png

    In the above example, there are many files starting with "Haiku logo", rendering simpler approaches to typing ahead quite useless. In Haiku however, typing "web" jumps right to its first occurence in "Haiku logo - website". The characters you enter appear in the bottom left corner where you normally find the item count of all files in the folder. A second after entering a character, the display jumps back to normal and you're ready for a new type ahead search.

    -

    Appearance

    +

    +index +Appearance

    window-menu.png

    Tracker windows offer three different viewing modes from the Window menu:

      @@ -103,7 +122,9 @@

    This panel, by the way, is also available as Tracker from Deskbar's Preferences.

    -

    Working with files

    +

    +index +Working with files

    When invoked on a selected file, most of the File menu commands are also offered in the context menu by right-clicking that file.

    As usual the commands are pretty clear.

      @@ -132,7 +153,9 @@
    • Add-Ons - offers you every generic Tracker add-on and those that can handle the selected file(s). See topic Tracker Add-ons for more information.

    -

    Transaction status

    +

    +index +Transaction status

    When you copy, move or delete files, Tracker shows its progress with a status window. If you initiate more than one transaction, each job gets its own status display.

    transaction-status.png

    To the right are two buttons to pause or stop a transaction entirely. Sometimes it can be useful to temporarily pause a large transaction. For example, you may need to quickly launch a large application. Copying large amounts of data chokes your harddisk's IO bandwidth and thus delays your workflow.

    Modified: haiku/branches/features/32bit-wchar_t/docs/userguide/en/twitcher.html =================================================================== --- haiku/branches/features/32bit-wchar_t/docs/userguide/en/twitcher.html 2009-07-06 19:50:56 UTC (rev 31429) +++ haiku/branches/features/32bit-wchar_t/docs/userguide/en/twitcher.html 2009-07-06 20:27:01 UTC (rev 31430) @@ -38,8 +38,14 @@

    The Twitcher is a task switcher to jump between running applications and their windows.

    twitcher.png -

    Just tap CTRL TAB quickly to switch between the current and the last application/window. Or press CTRL TAB and hold the CTRL key to go through all running applications by repeatedly hitting TAB or /. If you need to get to a specific window of a program, move to its icon as described and then go through its open windows with the / keys.

    +

    Just tap CTRL TAB to switch between the current and the last application/window. Tapping CTRL TAB very quickly will switch between all applications. Or press and hold CTRL TAB to go through all running applications by repeatedly hitting TAB or /. If you need to get to a specific window of a program, move to its icon as described and then go through its open windows with the / keys.

    It's also possible to invoke the Twitcher with CTRL TAB and then use the mouse to choose the application/window you'll jump to when releasing the CTRL key.

    +

    The Twitcher also offers a few more advanced keyboard shortcuts:

    + + + + +
    ESCAborts the twitching an returns the formerly active window.
    QQuits the selected application.
    HHides all windows the selected application.