From bonefish at mail.berlios.de Wed Oct 1 00:17:23 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 00:17:23 +0200 Subject: [Haiku-commits] r27804 - haiku/trunk/src/bin/debug/profile Message-ID: <200809302217.m8UMHNuw009866@sheep.berlios.de> Author: bonefish Date: 2008-10-01 00:17:22 +0200 (Wed, 01 Oct 2008) New Revision: 27804 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27804&view=rev Added: haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.h Modified: haiku/trunk/src/bin/debug/profile/Jamfile haiku/trunk/src/bin/debug/profile/Options.h haiku/trunk/src/bin/debug/profile/profile.cpp Log: Added option "-v ". The tool will generate output files in valgrind's callgrind format in the given directory. Those can be analyzed with graphical tools like KCachegrind. Recursive functions are probably not handled correctly yet. Added: haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp =================================================================== --- haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp 2008-09-30 21:56:31 UTC (rev 27803) +++ haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp 2008-09-30 22:17:22 UTC (rev 27804) @@ -0,0 +1,277 @@ +/* + * Copyright 2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ + +#include "CallgrindThreadProfileResult.h" + +#include +#include + +#include +#include + +#include "Options.h" + + +// #pragma mark - CallgrindThreadImage + + +CallgrindThreadImage::CallgrindThreadImage(Image* image) + : + ThreadImage(image), + fFunctions(NULL), + fOutputIndex(0) +{ +} + + +CallgrindThreadImage::~CallgrindThreadImage() +{ + int32 symbolCount = fImage->SymbolCount(); + for (int32 i = 0; i < symbolCount; i++) { + while (CallgrindCalledFunction* calledFunction + = fFunctions[i].calledFunctions) { + fFunctions[i].calledFunctions = calledFunction->next; + delete calledFunction; + } + } + + delete[] fFunctions; +} + + +status_t +CallgrindThreadImage::Init() +{ + int32 symbolCount = fImage->SymbolCount(); + fFunctions = new(std::nothrow) CallgrindFunction[symbolCount]; + if (fFunctions == NULL) + return B_NO_MEMORY; + + memset(fFunctions, 0, sizeof(CallgrindFunction) * symbolCount); + + return B_OK; +} + + +void +CallgrindThreadImage::AddSymbolHit(int32 symbolIndex, + CallgrindThreadImage* calledImage, int32 calledSymbol) + +{ + fTotalHits++; + + CallgrindFunction& function = fFunctions[symbolIndex]; + if (calledImage != NULL) { + // check whether the called function is known already + CallgrindCalledFunction* calledFunction = function.calledFunctions; + while (calledFunction != NULL) { + if (calledFunction->image == calledImage + && calledFunction->function == calledSymbol) { + break; + } + calledFunction = calledFunction->next; + } + + // create a new CallgrindCalledFunction object, if not known + if (calledFunction == NULL) { + calledFunction = new(std::nothrow) CallgrindCalledFunction( + calledImage, calledSymbol); + if (calledFunction == NULL) + return; + + calledFunction->next = function.calledFunctions; + function.calledFunctions = calledFunction; + } + + calledFunction->hits++; + } else + function.hits++; +} + + +CallgrindFunction* +CallgrindThreadImage::Functions() const +{ + return fFunctions; +} + + +int32 +CallgrindThreadImage::OutputIndex() const +{ + return fOutputIndex; +} + + +void +CallgrindThreadImage::SetOutputIndex(int32 index) +{ + fOutputIndex = index; +} + + +// #pragma mark - CallgrindThreadProfileResult + + +CallgrindThreadProfileResult::CallgrindThreadProfileResult() + : + fTotalTicks(0), + fUnkownTicks(0), + fDroppedTicks(0), + fNextImageOutputIndex(1), + fNextFunctionOutputIndex(1) +{ +} + + +void +CallgrindThreadProfileResult::AddSamples(addr_t* samples, int32 sampleCount) +{ + int32 unknownSamples = 0; + CallgrindThreadImage* previousImage = NULL; + int32 previousSymbol = -1; + + // TODO: That probably doesn't work with recursive functions. + for (int32 i = 0; i < sampleCount; i++) { + addr_t address = samples[i]; + CallgrindThreadImage* image = FindImage(address); + int32 symbol = -1; + if (image != NULL) { + symbol = image->GetImage()->FindSymbol(address); + if (symbol >= 0) { + image->AddSymbolHit(symbol, previousImage, previousSymbol); + previousImage = image; + previousSymbol = symbol; + } + } else + unknownSamples++; + } + + if (unknownSamples == sampleCount) + fUnkownTicks++; + + fTotalTicks++; +} + + +void +CallgrindThreadProfileResult::AddDroppedTicks(int32 dropped) +{ + fDroppedTicks += dropped; +} + + +void +CallgrindThreadProfileResult::PrintResults() +{ + // create output file + mkdir(gOptions.callgrind_directory, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); + + char fileName[B_PATH_NAME_LENGTH]; + snprintf(fileName, sizeof(fileName), "%s/callgrind.out.%ld", + gOptions.callgrind_directory, fThread->ID()); + + FILE* out = fopen(fileName, "w+"); + if (out == NULL) { + fprintf(stderr, "%s: Failed to open output file \"%s\": %s\n", + kCommandName, fileName, strerror(errno)); + return; + } + + // write the header + fprintf(out, "version: 1\n"); + fprintf(out, "creator: Haiku profile\n"); + fprintf(out, "pid: %ld\n", fThread->ID()); + fprintf(out, "cmd: %s\n", fThread->Name()); + fprintf(out, "part: 1\n\n"); + + fprintf(out, "positions: line\n"); + fprintf(out, "events: Ticks Time\n"); + fprintf(out, "summary: %lld\n", fTotalTicks); + + // get hit images + CallgrindThreadImage* images[fOldImages.Size() + fImages.Size()]; + int32 imageCount = GetHitImages(images); + + for (int32 i = 0; i < imageCount; i++) { + CallgrindThreadImage* image = images[i]; + + CallgrindFunction* functions = image->Functions(); + int32 imageSymbolCount = image->GetImage()->SymbolCount(); + for (int32 k = 0; k < imageSymbolCount; k++) { + CallgrindFunction& function = functions[k]; + if (function.hits == 0 && function.calledFunctions == NULL) + continue; + + fprintf(out, "\n"); + _PrintFunction(out, image, k, false); + fprintf(out, "0 %lld %lld\n", function.hits, + function.hits * fInterval); + + CallgrindCalledFunction* calledFunction = function.calledFunctions; + while (calledFunction != NULL) { + _PrintFunction(out, calledFunction->image, + calledFunction->function, true); + fprintf(out, "calls=%lld 0\n", calledFunction->hits); + fprintf(out, "0 %lld %lld\n", calledFunction->hits, + calledFunction->hits * fInterval); + calledFunction = calledFunction->next; + } + } + } + + // print pseudo-functions for unknown and dropped ticks + if (fUnkownTicks + fDroppedTicks > 0) { + fprintf(out, "\nob=\n"); + + if (fUnkownTicks > 0) { + fprintf(out, "\nfn=unknown\n"); + fprintf(out, "0 %lld\n", fUnkownTicks); + } + + if (fDroppedTicks > 0) { + fprintf(out, "\nfn=dropped\n"); + fprintf(out, "0 %lld\n", fDroppedTicks); + } + } + + fclose(out); +} + + +CallgrindThreadImage* +CallgrindThreadProfileResult::CreateThreadImage(Image* image) +{ + return new(std::nothrow) CallgrindThreadImage(image); +} + + +void +CallgrindThreadProfileResult::_PrintFunction(FILE* out, + CallgrindThreadImage* image, int32 functionIndex, bool called) +{ + if (image->OutputIndex() == 0) { + // need to print the image name + int32 index = fNextImageOutputIndex++; + image->SetOutputIndex(index); + fprintf(out, "%sob=(%ld) %s:%ld\n", called ? "c" : "", index, + image->GetImage()->Info().name, image->ID()); + } else { + // image is already known + // TODO: We may not need to print it at all! + fprintf(out, "%sob=(%ld)\n", called ? "c" : "", image->OutputIndex()); + } + + CallgrindFunction& function = image->Functions()[functionIndex]; + if (function.outputIndex == 0) { + // need to print the function name + function.outputIndex = fNextFunctionOutputIndex++; + fprintf(out, "%sfn=(%ld) %s\n", called ? "c" : "", function.outputIndex, + image->GetImage()->Symbols()[functionIndex]->Name()); + } else { + // function is already known + fprintf(out, "%sfn=(%ld)\n", called ? "c" : "", function.outputIndex); + } +} Added: haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.h =================================================================== --- haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.h 2008-09-30 21:56:31 UTC (rev 27803) +++ haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.h 2008-09-30 22:17:22 UTC (rev 27804) @@ -0,0 +1,89 @@ +/* + * Copyright 2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef CALLGRIND_THREAD_PROFILE_RESULT_H +#define CALLGRIND_THREAD_PROFILE_RESULT_H + +#include + +#include "Thread.h" + + +class CallgrindThreadImage; + + +struct CallgrindCalledFunction { + CallgrindCalledFunction* next; + CallgrindThreadImage* image; + int32 function; + int64 hits; + + CallgrindCalledFunction(CallgrindThreadImage* image, int32 function) + : + next(NULL), + image(image), + function(function), + hits(0) + { + } +}; + + +struct CallgrindFunction { + int64 hits; + CallgrindCalledFunction* calledFunctions; + int32 outputIndex; + // index when generating the output file +}; + + +class CallgrindThreadImage : public ThreadImage, + public DoublyLinkedListLinkImpl { +public: + CallgrindThreadImage(Image* image); + virtual ~CallgrindThreadImage(); + + virtual status_t Init(); + + inline void AddSymbolHit(int32 symbolIndex, + CallgrindThreadImage* calledImage, + int32 calledSymbol); + + inline CallgrindFunction* Functions() const; + + inline int32 OutputIndex() const; + inline void SetOutputIndex(int32 index); + +private: + CallgrindFunction* fFunctions; + int32 fOutputIndex; +}; + + +class CallgrindThreadProfileResult + : public AbstractThreadProfileResult { +public: + CallgrindThreadProfileResult(); + + virtual void AddSamples(addr_t* samples, + int32 sampleCount); + virtual void AddDroppedTicks(int32 dropped); + virtual void PrintResults(); + + virtual CallgrindThreadImage* CreateThreadImage(Image* image); + +private: + void _PrintFunction(FILE* out, + CallgrindThreadImage* image, + int32 functionIndex, bool called); +private: + int64 fTotalTicks; + int64 fUnkownTicks; + int64 fDroppedTicks; + int32 fNextImageOutputIndex; + int32 fNextFunctionOutputIndex; +}; + + +#endif // CALLGRIND_THREAD_PROFILE_RESULT_H Modified: haiku/trunk/src/bin/debug/profile/Jamfile =================================================================== --- haiku/trunk/src/bin/debug/profile/Jamfile 2008-09-30 21:56:31 UTC (rev 27803) +++ haiku/trunk/src/bin/debug/profile/Jamfile 2008-09-30 22:17:22 UTC (rev 27804) @@ -11,6 +11,7 @@ BinCommand profile : BasicThreadProfileResult.cpp + CallgrindThreadProfileResult.cpp Image.cpp Team.cpp Thread.cpp Modified: haiku/trunk/src/bin/debug/profile/Options.h =================================================================== --- haiku/trunk/src/bin/debug/profile/Options.h 2008-09-30 21:56:31 UTC (rev 27803) +++ haiku/trunk/src/bin/debug/profile/Options.h 2008-09-30 22:17:22 UTC (rev 27804) @@ -16,6 +16,7 @@ interval(1000), stack_depth(5), output(NULL), + callgrind_directory(NULL), profile_kernel(true), profile_loading(false), profile_teams(true), @@ -27,6 +28,7 @@ bigtime_t interval; int32 stack_depth; FILE* output; + const char* callgrind_directory; bool profile_kernel; bool profile_loading; bool profile_teams; Modified: haiku/trunk/src/bin/debug/profile/profile.cpp =================================================================== --- haiku/trunk/src/bin/debug/profile/profile.cpp 2008-09-30 21:56:31 UTC (rev 27803) +++ haiku/trunk/src/bin/debug/profile/profile.cpp 2008-09-30 22:17:22 UTC (rev 27804) @@ -24,6 +24,7 @@ #include #include "BasicThreadProfileResult.h" +#include "CallgrindThreadProfileResult.h" #include "debug_utils.h" #include "Image.h" #include "Options.h" @@ -67,6 +68,8 @@ " caller stack per tick. If the topmost address doesn't\n" " hit a known image, the next address will be matched\n" " (and so on).\n" + " -v - Create valgrind/callgrind output. is the\n" + " directory where to put the output files.\n" ; @@ -176,7 +179,9 @@ status_t _CreateThreadProfileResult(Thread* thread) { ThreadProfileResult* profileResult; - if (gOptions.analyze_full_stack) + if (gOptions.callgrind_directory != NULL) + profileResult = new(std::nothrow) CallgrindThreadProfileResult; + else if (gOptions.analyze_full_stack) profileResult = new(std::nothrow) InclusiveThreadProfileResult; else profileResult = new(std::nothrow) ExclusiveThreadProfileResult; @@ -239,7 +244,7 @@ }; opterr = 0; // don't print errors - int c = getopt_long(argc, (char**)argv, "+cCfhi:klo:s:", sLongOptions, + int c = getopt_long(argc, (char**)argv, "+cCfhi:klo:s:v:", sLongOptions, NULL); if (c == -1) break; @@ -273,6 +278,11 @@ case 's': stackDepth = atol(optarg); break; + case 'v': + gOptions.callgrind_directory = optarg; + gOptions.analyze_full_stack = true; + gOptions.stack_depth = 64; + break; default: print_usage_and_exit(true); break; From mmu_man at mail.berlios.de Wed Oct 1 03:18:24 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 03:18:24 +0200 Subject: [Haiku-commits] r27805 - in haiku/trunk/3rdparty/mmu_man/themes: . addons Message-ID: <200810010118.m911ION2022121@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 03:18:23 +0200 (Wed, 01 Oct 2008) New Revision: 27805 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27805&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/TODO.txt haiku/trunk/3rdparty/mmu_man/themes/UITheme.h haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp Log: - re-add todo: descriptions still aren't handled - MSTheme: map windows system sounds - MSTheme: fix UTF-8 issue (BString::RemoveSet() is buggy on BeOS) and NTFS path handling (check several capitalizations). - MSTheme: force Deskbar at the bottom, disable Z-Snake - add fallbacks for window decors to importers and decor addons - add 1.0 sound gain from R5 Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 01:18:23 UTC (rev 27805) @@ -147,6 +147,40 @@ if (sscanf(token.String(), "DECOR:%ld", &value) >= 1) { value = (value < 4) ? value : 0; decor.AddInt32("window:R5:decor", value); + switch (value) { + case R5_DECOR_BEOS: + default: + decor.AddString("window:decor", "R5"); + // fallbacks + decor.AddString("window:decor", "Default"); + decor.AddString("window:decor", "ClassicBe"); + decor.AddString("window:decor", "BeDecorator"); + break; + case R5_DECOR_WIN95: + decor.AddString("window:decor", "Win95"); + // fallbacks + decor.AddString("window:decor", "Win2k"); + decor.AddString("window:decor", "Win"); + decor.AddString("window:decor", "Redmond"); + decor.AddString("window:decor", "Seattle"); + decor.AddString("window:decor", "WinDecorator"); + break; + + case R5_DECOR_AMIGA: + decor.AddString("window:decor", "Amiga"); + // fallbacks + decor.AddString("window:decor", "AmigaOS"); + decor.AddString("window:decor", "AmigaOS4"); + break; + case R5_DECOR_MAC: + decor.AddString("window:decor", "Mac"); + // fallbacks + decor.AddString("window:decor", "MacOS"); + decor.AddString("window:decor", "Baqua"); + decor.AddString("window:decor", "Cupertino"); + decor.AddString("window:decor", "MacDecorator"); + break; + } } } Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 01:18:23 UTC (rev 27805) @@ -40,12 +40,6 @@ #define FENTRY #endif -static const deskbar_location kDeskbarLocationMap[] = { - //2:top 1:topright 5:bottom - B_DESKBAR_LEFT_TOP, B_DESKBAR_RIGHT_TOP, B_DESKBAR_TOP, - B_DESKBAR_LEFT_BOTTOM, B_DESKBAR_RIGHT_BOTTOM, B_DESKBAR_BOTTOM -}; - static struct ui_color_map { const char *wname; const char *name1; @@ -115,6 +109,75 @@ }; +/* +'[' [|.A|.W] ']' +left to map: +AppEvents\\Schemes\\Apps\\.Default\\AppGPFault\\.Current +AppEvents\\Schemes\\Apps\\.Default\\DeviceConnect\\.Current +AppEvents\\Schemes\\Apps\\.Default\\DeviceDisconnect\\.Current +AppEvents\\Schemes\\Apps\\.Default\\DeviceFail\\.Current +AppEvents\\Schemes\\Apps\\.Default\\LowBatteryAlarm\\.Current +AppEvents\\Schemes\\Apps\\.Default\\MenuCommand\\.Current +AppEvents\\Schemes\\Apps\\.Default\\MenuPopup\\.Current +AppEvents\\Schemes\\Apps\\.Default\\PrintComplete\\.Current +AppEvents\\Schemes\\Apps\\.Default\\RingIn\\.Current +AppEvents\\Schemes\\Apps\\.Default\\Ringout\\.Current +AppEvents\\Schemes\\Apps\\.Default\\SystemHand\\.Current +AppEvents\\Schemes\\Apps\\.Default\\SystemQuestion\\.Current +AppEvents\\Schemes\\Apps\\.Default\\SystemStartMenu\\.Current +AppEvents\\Schemes\\Apps\\.Default\\WindowsLogoff\\.Current +AppEvents\\Schemes\\Apps\\.Default\\WindowsLogon\\.Current +AppEvents\\Schemes\\Apps\\Explorer\\EmptyRecycleBin\\.Current +AppEvents\\Schemes\\Apps\\Explorer\\Navigating\\.Current +*/ + +static struct sounds_map { + const char *wname; + const char *name; +} sSoundsMap[] = { + //{ "", "BeShare-DLFinished" }, + //{ "", "BeShare-InactivChat" }, + //{ "", "BeShare-Name Said" }, + //{ "", "BeShare-NoComplete" }, + //{ "", "BeShare-Private Msg" }, + //{ "", "BeShare-PrivateWndw" }, + //{ "", "BeShare-ULFinished" }, + //{ "", "BeShare-ULStarted" }, + //{ "", "BeShare-WatchedUser" }, + { "AppEvents\\Schemes\\Apps\\.Default\\.Default\\.Current", "Beep" }, + //{ "", "Capture" }, + //{ "", "IM Connected" }, + //{ "", "IM Disconnected" }, + //{ "", "IM Message Received" }, + //{ "", "IM Status: Available" }, + //{ "", "IM Status: Away" }, + //{ "", "IM Status: Offline" }, + { "AppEvents\\Schemes\\Apps\\.Default\\SystemExclamation\\.Current", "InfoPopper: Error Message" }, + { "AppEvents\\Schemes\\Apps\\.Default\\SystemAsterisk\\.Current", "InfoPopper: Important Message" }, + { "AppEvents\\Schemes\\Apps\\.Default\\SystemNotification\\.Current", "InfoPopper: Information Message" }, + //{ "", "InfoPopper: Progress Message" }, + //{ "", "Key Down" }, + //{ "", "Key Repeat" }, + //{ "", "Key Up" }, + //{ "", "Mouse Down" }, + //{ "", "Mouse Up" }, + { "AppEvents\\Schemes\\Apps\\.Default\\MailBeep\\.Current", "New E-mail" }, + { "AppEvents\\Schemes\\Apps\\.Default\\SystemStart\\.Current", "Startup" }, + //{ "", "Vision Nick Notification" }, + //{ "AppEvents\\Schemes\\Apps\\.Default\\RestoreDown\\.Current", "Window Activated" }, + // actually *app* close/open... + { "AppEvents\\Schemes\\Apps\\.Default\\Close\\.Current", "Window Close" }, + { "AppEvents\\Schemes\\Apps\\.Default\\Minimize\\.Current", "Window Minimized" }, + { "AppEvents\\Schemes\\Apps\\.Default\\Open\\.Current", "Window Open" }, + // or Activated ? + { "AppEvents\\Schemes\\Apps\\.Default\\RestoreUp\\.Current", "Window Restored" }, + { "AppEvents\\Schemes\\Apps\\.Default\\Maximize\\.Current", "Window Zoomed" }, + //{ "", "Yahoo: Buzz" }, + // non official sounds yet + { "AppEvents\\Schemes\\Apps\\.Default\\SystemExit\\.Current", "Shutdown" }, + { NULL, NULL } +}; + MSThemeImporter::MSThemeImporter() :ThemeImporter("MSTheme") { @@ -231,9 +294,10 @@ content.UnlockBuffer(); if (err < B_OK) return err; + //PRINT(("'%s'\n", content.String())); // strip DOS CR - content.RemoveSet("\r"); - //printf("'%s'\n", content.String()); + // RemoveSet() seems to be buggy on BeOS (strips UTF-8 chars ???) + content.RemoveAll("\r"); // is it really a theme file ? if (content.IFindFirst("[Theme]") < 0) @@ -246,6 +310,7 @@ BMessage deskbar; BMessage ui_settings; BMessage screensaver; + BMessage sounds; BString leaf(path.Leaf()); leaf.RemoveLast(".theme"); @@ -269,7 +334,7 @@ BString line; content.MoveInto(line, 0, content.FindFirst('\n')); content.RemoveFirst("\n"); - //printf(":'%s'\n", line.String()); + //PRINT((":'%s'\n", line.String())); if (line.Length() < 1) continue; if (line[0] == ';') @@ -380,14 +445,64 @@ if (value == "Metallic" && themeWindowDecor == "Redmond") themeWindowDecor = "Seattle"; } + } else if (section.IFindFirst("AppEvents\\Schemes\\Apps") > -1) { + if (key != "DefaultValue") + continue; + // system sound... + for (int i = 0; sSoundsMap[i].wname; i++) { + if (section.IFindFirst(sSoundsMap[i].wname) > -1) { + BString encodedPath; + if (section.IFindFirst(".W]") > -1) { + // Wide Char weirdly encoded path... + // skip for now. + break; + // someone knows this +AOk- stuff ?? + } else { + // ANSI path (.A or none specified) + // but it's been converted to UTF-8 already + // so we just use that one. + encodedPath = value; + } + PRINT(("Sound: '%s' -> '%s' (%s)\n", section.String(), sSoundsMap[i].name, value.String())); + if (encodedPath.Length() == 0) + break; + BPath soundPath; + if (ParseWinPath(rootDir, encodedPath.String(), soundPath) < B_OK) + break; + BMessage sound('SndI'); + sound.AddString("sounds:file", soundPath.Path()); + sound.AddFloat("sounds:volume", 1.0); + if (sounds.ReplaceMessage(sSoundsMap[i].name, &sound) < B_OK) + sounds.AddMessage(sSoundsMap[i].name, &sound); + } + } } else { ;//PRINT(("MSThemeImporter: unknown section '%s', line '%s'\n", section.String(), line.String())); } } + // apply settings now we that have everything + + // force Deskbar at the bottom... it's Windows, right? + // XXX: I couldn't find a reg key for that in any theme, + // but likely there is one. + deskbar_location loc = B_DESKBAR_BOTTOM; + bool expanded = true; + deskbar.AddInt32("db:location", (int32)loc); + deskbar.AddBool("db:expanded", expanded); + + // window decor decor.AddString("window:decor", themeWindowDecor.String()); + // fallbacks + decor.AddString("window:decor", "Win95"); + decor.AddString("window:decor", "Win2k"); + decor.AddString("window:decor", "Win"); + decor.AddString("window:decor", "Redmond"); + decor.AddString("window:decor", "Seattle"); + decor.AddString("window:decor", "WinDecorator"); decor.AddInt32("window:R5:decor", themeWindowDecorR5); + // wallpaper if (themeWallpaperPath.InitCheck() == B_OK) { backgrounds.AddString(B_BACKGROUND_IMAGE, themeWallpaperPath.Path()); backgrounds.AddInt32(B_BACKGROUND_WORKSPACES, 0xffffffff); @@ -408,9 +523,13 @@ } backgrounds.AddInt32(B_BACKGROUND_MODE, wallpaperMode); backgrounds.AddPoint(B_BACKGROUND_ORIGIN, themeWallpaperOrigin); + //XXX: there is a reg key for that, is it used ? //backgrounds.AddBool(B_BACKGROUND_ERASE_TEXT, erasetext); } + // ui settings: disable Z-Snake + ui_settings.AddBool(B_UI_MENU_ZSNAKE, false); + screensaver.AddString("screensaver:modulename", themeScreensaver.String()); global.AddMessage(Z_THEME_INFO_MESSAGE, &info); @@ -419,6 +538,7 @@ global.AddMessage(Z_THEME_DESKBAR_SETTINGS, &deskbar); global.AddMessage(Z_THEME_UI_SETTINGS, &ui_settings); global.AddMessage(Z_THEME_SCREENSAVER_SETTINGS, &screensaver); + global.AddMessage(Z_THEME_SOUNDS_SETTINGS, &sounds); *theme = new BMessage(global); //global.PrintToStream(); @@ -464,12 +584,14 @@ status_t MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BPath &to) { + status_t err; //FENTRY; //return ENOENT; //BDirectory winDir(&rootDir, "WINDOWS"); //BDirectory resourceDir(&winDir, "Resources"); + PRINT(("ParseWinPath(, %s, )\n", from)); BString p(from); - p.ReplaceAll('\\', '/'); + //p.ReplaceAll('\\', '/'); to.SetTo(&rootDir, "."); if (p.IFindFirst("%WinDir%") == 0) { @@ -480,10 +602,58 @@ to.Append("WINDOWS/Resources"); p.IReplaceFirst("%ResourceDir%", ""); } + //TODO: %ThemeDir% //TODO: split and check for correct case - //TODO: %ThemeDir% - to.Append(p.String()); + BDirectory dir; + while (p.Length()) { + BString component; + PRINT(("ParseWinPath: p.L %d p '%s'\n", p.Length(), p.String())); + int32 len = p.FindFirst('\\'); + if (len < 0) + len = p.Length(); + p.MoveInto(component, 0, len); + p.RemoveFirst("\\"); + err = dir.SetTo(to.Path()); + if (err < B_OK) + return err; + PRINT(("ParseWinPath: at '%s'\n", to.Path())); + PRINT(("ParseWinPath: testing '%s'\n", component.String())); + if (dir.Contains(component.String())) { + to.Append(component.String()); + continue; + } + // can't find as is, try various capitalizations + // (caseless fs SUXOR) + component.Capitalize(); + PRINT(("ParseWinPath: testing '%s'\n", component.String())); + if (dir.Contains(component.String())) { + to.Append(component.String()); + continue; + } + component.CapitalizeEachWord(); + PRINT(("ParseWinPath: testing '%s'\n", component.String())); + if (dir.Contains(component.String())) { + to.Append(component.String()); + continue; + } + component.ToLower(); + PRINT(("ParseWinPath: testing '%s'\n", component.String())); + if (dir.Contains(component.String())) { + to.Append(component.String()); + continue; + } + component.ToUpper(); + PRINT(("ParseWinPath: testing '%s'\n", component.String())); + if (dir.Contains(component.String())) { + to.Append(component.String()); + continue; + } + PRINT(("ParseWinPath: failed\n")); + // TODO: loop on GetNextEntry and ICompare ? + return ENOENT; + } + PRINT(("ParseWinPath(, %s, ) -> %s\n", from, to.Path())); return B_OK; } Modified: haiku/trunk/3rdparty/mmu_man/themes/TODO.txt =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/TODO.txt 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/TODO.txt 2008-10-01 01:18:23 UTC (rev 27805) @@ -1,6 +1,7 @@ TODOs for Theme manager: * check R5 build * style cleanup (-> Haiku style) +* enable theme descriptions again (tooltip on listitem ?). * make ParseMessage more robust * forbid quitting while themes are loading! * implement BackupFiles() methods to add required files to a zip. Modified: haiku/trunk/3rdparty/mmu_man/themes/UITheme.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/UITheme.h 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/UITheme.h 2008-10-01 01:18:23 UTC (rev 27805) @@ -55,6 +55,7 @@ /* compatibility stuff ahead */ /* some field names not always defined */ +// ui_colors #ifndef B_BEOS_VERSION_DANO #define B_UI_PANEL_BACKGROUND_COLOR "be:c:PanBg" #define B_UI_PANEL_TEXT_COLOR "be:c:PanTx" @@ -79,6 +80,9 @@ #define B_UI_MENU_SELECTED_BORDER_COLOR "be:c:MenSBr" #define B_UI_SUCCESS_COLOR "be:c:Success" #define B_UI_FAILURE_COLOR "be:c:Failure" +// fonts +// other +#define B_UI_MENU_ZSNAKE "be:MenZSnake" // broadcasted on update #define B_UI_SETTINGS_CHANGED '_UIC' #endif Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 01:18:23 UTC (rev 27805) @@ -23,6 +23,19 @@ #include "ThemesAddon.h" #include "UITheme.h" +// for reference: +// +// available decors in Dano: +// (Default R5) Baqua BlueSteel Graphite Origin OriginSimple +// +// available decors in Zeta: +// (Default R5) Cupertino MenloTab Redmond Smoke ZetaDecor Menlo +// R5 Seattle TV_ ZLight blueBeOS yellowTAB +// +// mine: +// Win2k TextMode TextModeBlue + + #ifdef SINGLE_BINARY #define instantiate_themes_addon instantiate_themes_addon_window_decor #endif @@ -31,6 +44,21 @@ #define A_MSGNAME Z_THEME_WINDOW_DECORATIONS #define A_DESCRIPTION "Window decorations and scrollbars" +#ifdef B_BEOS_VERSION_DANO +status_t set_window_decor_safe(const char *name, BMessage *globals) +{ + // make sure the decor exists (set_window_decor() always returns B_OK) + BPath p("/etc/decors/"); + p.Append(name); + BNode n(p.Path()); + if (n.InitCheck() < B_OK || !n.IsFile()) + return ENOENT; + set_window_decor(name, globals); + return B_OK; +} +#endif + + class DecorThemesAddon : public ThemesAddon { public: DecorThemesAddon(); @@ -95,6 +123,7 @@ BMessage window_decor; BMessage globals; BString decorName; + int32 decorId = R5_DECOR_BEOS; status_t err; if (!(flags & UI_THEME_SETTINGS_SET_ALL) || !(AddonFlags() & Z_THEME_ADDON_DO_SET_ALL)) @@ -105,14 +134,123 @@ return err; #ifdef B_BEOS_VERSION_DANO - if (window_decor.FindString("window:decor", &decorName) == B_OK) - set_window_decor(decorName.String(), + bool decorDone = false; + // try each name until one works + for (int i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) { + err = set_window_decor_safe(decorName.String(), (window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL); + if (err < B_OK) + continue; + decorDone = true; + break; + } + // none match but we did have one, force the default with the globals + if (!decorDone && decorName.Length()) { + decorDone = true; + set_window_decor_safe(decorName.String(), + (window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL); + } + // none... maybe R5 number ? + if (!decorDone && + window_decor.FindInt32("window:R5:decor", &decorId) == B_OK) { + switch (decorId) { + case R5_DECOR_BEOS: + default: + err = set_window_decor_safe("R5", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("BeOS", NULL); + if (err >= B_OK) + break; + set_window_decor("R5", NULL); + break; + case R5_DECOR_WIN95: + err = set_window_decor_safe("Win2k", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("Redmond", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("Seattle", NULL); + if (err >= B_OK) + break; + set_window_decor("R5", NULL); + break; + case R5_DECOR_AMIGA: + err = set_window_decor_safe("Amiga", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("AmigaOS", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("AmigaOS4", NULL); + if (err >= B_OK) + break; + set_window_decor("R5", NULL); + break; + case R5_DECOR_MAC: + err = set_window_decor_safe("Mac", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("MacOS", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("Baqua", NULL); + if (err >= B_OK) + break; + err = set_window_decor_safe("Cupertino", NULL); + if (err >= B_OK) + break; + set_window_decor("R5", NULL); + break; + } + decorDone = true; + } + // it might be intentionally there is none... + //if (!decorDone) + // set_window_decor("Default", NULL); #else + // best effort with what we have extern void __set_window_decor(int32 theme); - int32 decorNr = 0; - if (window_decor.FindInt32("window:R5:decor", &decorNr) == B_OK) - __set_window_decor(decorNr); + if (window_decor.FindInt32("window:R5:decor", &decorId) == B_OK) + __set_window_decor(decorId); + else { + BString name; + for (int i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) { + if (decorName.IFindFirst("R5") > -1 || + decorName.IFindFirst("BeOS") > -1 || + decorName.IFindFirst("Be") > -1 || + decorName.IFindFirst("yellow") > -1 || + decorName.IFindFirst("Menlo") > -1 || + decorName.IFindFirst("Default") > -1 || + decorName.IFindFirst("Origin") > -1) { + __set_window_decor(R5_DECOR_BEOS); + break; + } + if (decorName.IFindFirst("Microsoft") > -1 || + decorName.IFindFirst("2k") > -1 || + decorName.IFindFirst("XP") > -1 || + decorName.IFindFirst("Redmond") > -1 || + decorName.IFindFirst("Seattle") > -1 || + decorName.IFindFirst("Win") > -1) { + __set_window_decor(R5_DECOR_WIN95); + break; + } + if (decorName.IFindFirst("Amiga") > -1 || + decorName.IFindFirst("OS4") > -1) { + __set_window_decor(R5_DECOR_AMIGA); + break; + } + if (decorName.IFindFirst("Mac") > -1 || + decorName.IFindFirst("Apple") > -1 || + decorName.IFindFirst("Aqua") > -1 || + decorName.IFindFirst("Cupertino") > -1 || + decorName.IFindFirst("OSX") > -1) { + __set_window_decor(R5_DECOR_MAC); + break; + } + } + } #endif // XXX: add colors ? la WindowShade ? Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-10-01 01:18:23 UTC (rev 27805) @@ -122,6 +122,8 @@ BMessage window_decor; BMessage globals; BString decorName; + int32 decorId; + bool decorDone = false; status_t err; if (!(flags & UI_THEME_SETTINGS_SET_ALL) || !(AddonFlags() & Z_THEME_ADDON_DO_SET_ALL)) @@ -132,8 +134,33 @@ if (err) return err; - if (window_decor.FindString("window:decor", &decorName) == B_OK) - set_decorator(decorName.String()); + // try each name until one works + for (int i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) { + if (set_decorator(decorName.String()) == B_OK) { + decorDone = true; + break; + } + } + // none... maybe R5 number ? + if (!decorDone && + window_decor.FindInt32("window:R5:decor", &decorId) == B_OK) { + int32 defaultDecor = 0; // XXX ? + switch (decorId) { + case R5_DECOR_BEOS: + default: + set_decorator(defaultDecor); + break; + case R5_DECOR_WIN95: + set_decorator("WinDecorator"); + break; + case R5_DECOR_AMIGA: + set_decorator("AmigaDecorator"); + break; + case R5_DECOR_MAC: + set_decorator("MacDecorator"); + break; + } + } #if 0 #ifdef B_BEOS_VERSION_DANO if (window_decor.FindString("window:decor", &decorName) == B_OK) Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp 2008-09-30 22:17:22 UTC (rev 27804) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp 2008-10-01 01:18:23 UTC (rev 27805) @@ -177,10 +177,11 @@ //printf("\t%s: %s\n", item.String(), path.Path()); if (path.Path()) { msg.AddString("sounds:file", path.Path()); + gain = 1.0; #if defined(__HAIKU__) || defined(B_BEOS_VERSION_DANO) - if (bmfs.GetAudioGainFor(BMediaFiles::B_SOUNDS, item.String(), &gain) >= B_OK) - msg.AddFloat("sounds:volume", gain); + bmfs.GetAudioGainFor(BMediaFiles::B_SOUNDS, item.String(), &gain); #endif + msg.AddFloat("sounds:volume", gain); } sounds.AddMessage(item.String(), &msg); } From mmu_man at mail.berlios.de Wed Oct 1 03:22:51 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 03:22:51 +0200 Subject: [Haiku-commits] r27806 - haiku/trunk/3rdparty/mmu_man/themes Message-ID: <200810010122.m911Mpwn022392@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 03:22:51 +0200 (Wed, 01 Oct 2008) New Revision: 27806 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27806&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp Log: Play safe with BString::LockBuffer... Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 01:18:23 UTC (rev 27805) +++ haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 01:22:51 UTC (rev 27806) @@ -111,7 +111,7 @@ char *buff; buff = str.LockBuffer(1024); memset(buff, 0, 1024); - file.Read(buff, 1024); + file.Read(buff, 1024-1); if (err < B_OK) return err; str.UnlockBuffer(); @@ -125,7 +125,7 @@ str = ""; buff = str.LockBuffer(1024); memset(buff, 0, 1024); - file.Read(buff, 1024); + file.Read(buff, 1024-1); if (err < B_OK) return err; str.UnlockBuffer(); @@ -189,7 +189,7 @@ return B_ERROR; buff = str.LockBuffer(1024); memset(buff, 0, 1024); - file.Read(buff, 1024); + file.Read(buff, 1024-1); if (err < B_OK) return err; str.UnlockBuffer(); From mmu_man at mail.berlios.de Wed Oct 1 05:10:18 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 05:10:18 +0200 Subject: [Haiku-commits] r27807 - in haiku/trunk/3rdparty/mmu_man/themes: . addons Message-ID: <200810010310.m913AIXK003859@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 05:10:18 +0200 (Wed, 01 Oct 2008) New Revision: 27807 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27807&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp Log: - shut up debug output - fix decor fallback for dano Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 01:22:51 UTC (rev 27806) +++ haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 03:10:18 UTC (rev 27807) @@ -608,7 +608,7 @@ BDirectory dir; while (p.Length()) { BString component; - PRINT(("ParseWinPath: p.L %d p '%s'\n", p.Length(), p.String())); + //PRINT(("ParseWinPath: p.L %d p '%s'\n", p.Length(), p.String())); int32 len = p.FindFirst('\\'); if (len < 0) len = p.Length(); @@ -617,8 +617,8 @@ err = dir.SetTo(to.Path()); if (err < B_OK) return err; - PRINT(("ParseWinPath: at '%s'\n", to.Path())); - PRINT(("ParseWinPath: testing '%s'\n", component.String())); + //PRINT(("ParseWinPath: at '%s'\n", to.Path())); + //PRINT(("ParseWinPath: testing '%s'\n", component.String())); if (dir.Contains(component.String())) { to.Append(component.String()); continue; @@ -626,25 +626,25 @@ // can't find as is, try various capitalizations // (caseless fs SUXOR) component.Capitalize(); - PRINT(("ParseWinPath: testing '%s'\n", component.String())); + //PRINT(("ParseWinPath: testing '%s'\n", component.String())); if (dir.Contains(component.String())) { to.Append(component.String()); continue; } component.CapitalizeEachWord(); - PRINT(("ParseWinPath: testing '%s'\n", component.String())); + //PRINT(("ParseWinPath: testing '%s'\n", component.String())); if (dir.Contains(component.String())) { to.Append(component.String()); continue; } component.ToLower(); - PRINT(("ParseWinPath: testing '%s'\n", component.String())); + //PRINT(("ParseWinPath: testing '%s'\n", component.String())); if (dir.Contains(component.String())) { to.Append(component.String()); continue; } component.ToUpper(); - PRINT(("ParseWinPath: testing '%s'\n", component.String())); + //PRINT(("ParseWinPath: testing '%s'\n", component.String())); if (dir.Contains(component.String())) { to.Append(component.String()); continue; Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 01:22:51 UTC (rev 27806) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 03:10:18 UTC (rev 27807) @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -48,11 +49,13 @@ status_t set_window_decor_safe(const char *name, BMessage *globals) { // make sure the decor exists (set_window_decor() always returns B_OK) + //PRINT(("set_window_decor_safe(%s, %p)\n", name, globals)); BPath p("/etc/decors/"); p.Append(name); BNode n(p.Path()); if (n.InitCheck() < B_OK || !n.IsFile()) return ENOENT; + //PRINT(("set_window_decor_safe: found\n")); set_window_decor(name, globals); return B_OK; } @@ -135,8 +138,9 @@ #ifdef B_BEOS_VERSION_DANO bool decorDone = false; + int i; // try each name until one works - for (int i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) { + for (i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) { err = set_window_decor_safe(decorName.String(), (window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL); if (err < B_OK) @@ -145,9 +149,9 @@ break; } // none match but we did have one, force the default with the globals - if (!decorDone && decorName.Length()) { + if (!decorDone && i > 0) { decorDone = true; - set_window_decor_safe(decorName.String(), + set_window_decor("Default", (window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL); } // none... maybe R5 number ? From mmu_man at mail.berlios.de Wed Oct 1 05:37:35 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 05:37:35 +0200 Subject: [Haiku-commits] r27808 - haiku/trunk/3rdparty/mmu_man/themes Message-ID: <200810010337.m913bZHJ009843@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 05:37:33 +0200 (Wed, 01 Oct 2008) New Revision: 27808 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27808&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h Log: Some guidelinization... Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -37,6 +37,10 @@ B_DESKBAR_LEFT_BOTTOM, B_DESKBAR_RIGHT_BOTTOM, B_DESKBAR_BOTTOM }; + +// #pragma mark - + + BeThemeImporter::BeThemeImporter() :ThemeImporter("BeTheme") { @@ -50,25 +54,32 @@ fQuery.SetPredicate(QSTR); } + BeThemeImporter::~BeThemeImporter() { FENTRY; fQuery.Clear(); } -const char *BeThemeImporter::Description() + +const char * +BeThemeImporter::Description() { FENTRY; return "Imports BeTheme themes"; } -status_t BeThemeImporter::FetchThemes() + +status_t +BeThemeImporter::FetchThemes() { FENTRY; return fQuery.Fetch(); } -status_t BeThemeImporter::ImportNextTheme(BMessage **theme) + +status_t +BeThemeImporter::ImportNextTheme(BMessage **theme) { FENTRY; status_t err; @@ -268,7 +279,9 @@ return B_OK; } -status_t BeThemeImporter::EndImports() + +status_t +BeThemeImporter::EndImports() { FENTRY; fQuery.Clear(); Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -178,24 +178,33 @@ { NULL, NULL } }; + +// #pragma mark - + + MSThemeImporter::MSThemeImporter() :ThemeImporter("MSTheme") { FENTRY; } + MSThemeImporter::~MSThemeImporter() { FENTRY; } -const char *MSThemeImporter::Description() + +const char * +MSThemeImporter::Description() { FENTRY; return "Imports MSTheme themes"; } -status_t MSThemeImporter::FetchThemes() + +status_t +MSThemeImporter::FetchThemes() { FENTRY; status_t err = ENOENT; @@ -238,7 +247,9 @@ return err; } -status_t MSThemeImporter::ImportNextTheme(BMessage **theme) + +status_t +MSThemeImporter::ImportNextTheme(BMessage **theme) { FENTRY; status_t err; @@ -545,13 +556,17 @@ return B_OK; } -status_t MSThemeImporter::EndImports() + +status_t +MSThemeImporter::EndImports() { FENTRY; return B_OK; } -bool MSThemeImporter::ScanDirectory(BDirectory &dir, int depth) + +bool +MSThemeImporter::ScanDirectory(BDirectory &dir, int depth) { //FENTRY; BEntry ent; @@ -582,7 +597,9 @@ return found; } -status_t MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BPath &to) + +status_t +MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BPath &to) { status_t err; //FENTRY; Modified: haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -18,7 +18,9 @@ // PRIVATE: in libzeta for now. extern status_t ScaleBitmap(const BBitmap& inBitmap, BBitmap& outBitmap); -status_t MakeScreenshot(BBitmap **here) + +status_t +MakeScreenshot(BBitmap **here) { status_t err; BScreen bs; @@ -73,3 +75,4 @@ return B_OK; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h 2008-10-01 03:37:33 UTC (rev 27808) @@ -5,7 +5,7 @@ #include class TextInputAlert : public BAlert { - public: +public: TextInputAlert(const char *title, const char *text, const char *initial, /* initial input value */ @@ -21,7 +21,7 @@ BTextControl *TextControl() const { return fText; }; - private: +private: BTextControl *fText; }; Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -64,32 +64,44 @@ static char* skThemeURL = "http://www.zeta-os.com/cms/download.php?list.4"; #define HIDESS_OFFSET (Bounds().Width()/2 - 130) -// ------------------------------------------------------------------------------ -filter_result refs_filter(BMessage *message, BHandler **handler, BMessageFilter *filter) + + +// #pragma mark - refs_filter + + +filter_result +refs_filter(BMessage *message, BHandler **handler, BMessageFilter *filter) { (void)handler; (void)filter; switch (message->what) { - case B_REFS_RECEIVED: - message->PrintToStream(); - break; + case B_REFS_RECEIVED: + message->PrintToStream(); + break; } return B_DISPATCH_MESSAGE; } -// ------------------------------------------------------------------------------ + +// #pragma mark - MyInvoker + + class MyInvoker : public BInvoker { - public: - MyInvoker(BMessage* message, const BHandler* handler, const BLooper* looper = NULL); - virtual ~MyInvoker(); - virtual status_t Invoke(BMessage* message = NULL); - void SetOwner(TextInputAlert *alert); - private: - TextInputAlert *fOwner; +public: + MyInvoker(BMessage* message, + const BHandler* handler, + const BLooper* looper = NULL); + virtual ~MyInvoker(); + virtual status_t Invoke(BMessage* message = NULL); + void SetOwner(TextInputAlert *alert); +private: + TextInputAlert* fOwner; }; -MyInvoker::MyInvoker(BMessage* message, const BHandler* handler, const BLooper* looper) +MyInvoker::MyInvoker(BMessage* message, + const BHandler* handler, + const BLooper* looper) : BInvoker(message, handler, looper) { } @@ -120,21 +132,27 @@ } -// ------------------------------------------------------------------------------ +// #pragma mark - + + //extern "C" BView *get_pref_view(const BRect& Bounds) -extern "C" BView *themes_pref(const BRect& Bounds) +extern "C" BView * +themes_pref(const BRect& Bounds) { return new ThemeInterfaceView(Bounds); } -// ------------------------------------------------------------------------------ + +// #pragma mark - ThemeInterfaceView + + ThemeInterfaceView::ThemeInterfaceView(BRect _bounds) - : BView(_bounds, "Themes", B_FOLLOW_ALL_SIDES, B_WILL_DRAW) - , fThemeManager(NULL) - , fScreenshotPaneHidden(false) - , fHasScreenshot(false) - , fPopupInvoker(NULL) - , fBox(NULL) + : BView(_bounds, "Themes", B_FOLLOW_ALL_SIDES, B_WILL_DRAW), + fThemeManager(NULL), + fScreenshotPaneHidden(false), + fHasScreenshot(false), + fPopupInvoker(NULL), + fBox(NULL) { /* BMessageFilter *filt = new BMessageFilter(B_ANY_DELIVERY, B_ANY_SOURCE, refs_filter); @@ -144,14 +162,14 @@ */ } -// ------------------------------------------------------------------------------ + ThemeInterfaceView::~ThemeInterfaceView() { delete fPopupInvoker; delete fThemeManager; } -// ------------------------------------------------------------------------------ + void ThemeInterfaceView::AllAttached() { @@ -280,14 +298,14 @@ PopulateThemeList(); } -// ------------------------------------------------------------------------------ + void ThemeInterfaceView::MessageReceived(BMessage *_msg) { ThemeManager *tman; int32 value; int32 id; -//_msg->PrintToStream(); + switch(_msg->what) { case B_REFS_RECEIVED: @@ -424,14 +442,16 @@ } } -// ------------------------------------------------------------------------------ -ThemeManager* ThemeInterfaceView::GetThemeManager() + +ThemeManager* +ThemeInterfaceView::GetThemeManager() { return fThemeManager; } -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::HideScreenshotPane(bool hide) + +void +ThemeInterfaceView::HideScreenshotPane(bool hide) { BString lbl; if (IsScreenshotPaneHidden() && hide) @@ -462,14 +482,16 @@ } -// ------------------------------------------------------------------------------ -bool ThemeInterfaceView::IsScreenshotPaneHidden() + +bool +ThemeInterfaceView::IsScreenshotPaneHidden() { return fScreenshotPaneHidden; } -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::PopulateThemeList() + +void +ThemeInterfaceView::PopulateThemeList() { int i; BControl *c; @@ -478,20 +500,23 @@ if (c) c->SetEnabled(false); } - thread_id tid = spawn_thread(_ThemeListPopulatorTh, "ThemeListPopulator", B_LOW_PRIORITY, this); + thread_id tid = spawn_thread(_ThemeListPopulatorTh, "ThemeListPopulator", + B_LOW_PRIORITY, this); resume_thread(tid); } -// ------------------------------------------------------------------------------ -int32 ThemeInterfaceView::_ThemeListPopulatorTh(void *arg) + +int32 +ThemeInterfaceView::_ThemeListPopulatorTh(void *arg) { ThemeInterfaceView *_this = (ThemeInterfaceView *)arg; _this->_ThemeListPopulator(); return 0; } -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::_ThemeListPopulator() + +void +ThemeInterfaceView::_ThemeListPopulator() { status_t err; int32 i, count; @@ -548,6 +573,8 @@ LockLooper(); fThemeList->AddItem(ti); UnlockLooper(); + // rest a bit + snooze(1000); } } // enable controls again @@ -561,8 +588,9 @@ UnlockLooper(); } -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::PopulateAddonList() + +void +ThemeInterfaceView::PopulateAddonList() { int32 i, count; ViewItem *vi; @@ -575,8 +603,9 @@ } } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::Revert() + +status_t +ThemeInterfaceView::Revert() { status_t err = B_OK; ThemeManager* tman = GetThemeManager(); @@ -589,8 +618,9 @@ return B_OK; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::ApplyDefaults() + +status_t +ThemeInterfaceView::ApplyDefaults() { status_t err = B_OK; ThemeManager* tman = GetThemeManager(); @@ -601,8 +631,9 @@ return err; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::ApplySelected() + +status_t +ThemeInterfaceView::ApplySelected() { status_t err; ThemeManager* tman = GetThemeManager(); @@ -623,8 +654,9 @@ return err; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::CreateNew(const char *name) + +status_t +ThemeInterfaceView::CreateNew(const char *name) { status_t err; ThemeManager* tman = GetThemeManager(); @@ -649,8 +681,9 @@ return B_OK; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::SaveSelected() + +status_t +ThemeInterfaceView::SaveSelected() { status_t err; ThemeManager* tman = GetThemeManager(); @@ -680,8 +713,9 @@ return err; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::DeleteSelected() + +status_t +ThemeInterfaceView::DeleteSelected() { status_t err; ThemeManager* tman = GetThemeManager(); @@ -710,8 +744,9 @@ return err; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::AddScreenshot() + +status_t +ThemeInterfaceView::AddScreenshot() { status_t err; ThemeManager* tman = GetThemeManager(); @@ -739,8 +774,9 @@ return err; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::ThemeSelected() + +status_t +ThemeInterfaceView::ThemeSelected() { status_t err; ThemeManager* tman = GetThemeManager(); @@ -795,18 +831,21 @@ return err; } -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::SetIsRevertable() + +void +ThemeInterfaceView::SetIsRevertable() { BMessenger msgr(Parent()); msgr.SendMessage(B_PREF_APP_ENABLE_REVERT); } + // PRIVATE: in libzeta for now. extern status_t ScaleBitmap(const BBitmap& inBitmap, BBitmap& outBitmap); -// ------------------------------------------------------------------------------ -void ThemeInterfaceView::SetScreenshot(BBitmap *shot) + +void +ThemeInterfaceView::SetScreenshot(BBitmap *shot) { // no screenshotpanel if(NULL == fScreenshotPane) @@ -837,8 +876,9 @@ delete shot; } -// ------------------------------------------------------------------------------ -status_t ThemeInterfaceView::AError(const char *func, status_t err) + +status_t +ThemeInterfaceView::AError(const char *func, status_t err) { BAlert *alert; BString msg; Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h 2008-10-01 03:37:33 UTC (rev 27808) @@ -20,7 +20,7 @@ class ThemeInterfaceView : public BView { - public: +public: ThemeInterfaceView(BRect _bounds); virtual ~ThemeInterfaceView(); @@ -48,7 +48,7 @@ void SetScreenshot(BBitmap *shot); status_t AError(const char *func, status_t err); - private: +private: static int32 _ThemeListPopulatorTh(void *arg); void _ThemeListPopulator(); Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -3,6 +3,10 @@ #include #include + +// #pragma mark - + + ThemeItem::ThemeItem(int32 id, const char *name, bool ro) : BStringItem(name) { @@ -11,11 +15,14 @@ fRo = ro; } + ThemeItem::~ThemeItem() { } -void ThemeItem::DrawItem(BView *owner, BRect frame, bool complete) + +void +ThemeItem::DrawItem(BView *owner, BRect frame, bool complete) { rgb_color col; if (fCurrent || fRo) @@ -44,27 +51,37 @@ owner->PopState(); } -int32 ThemeItem::ThemeId() + +int32 +ThemeItem::ThemeId() { return fId; } -bool ThemeItem::IsCurrent() + +bool +ThemeItem::IsCurrent() { return fCurrent; } -void ThemeItem::SetCurrent(bool set) + +void +ThemeItem::SetCurrent(bool set) { fCurrent = set; } -bool ThemeItem::IsReadOnly() + +bool +ThemeItem::IsReadOnly() { return fRo; } -void ThemeItem::SetReadOnly(bool set) + +void +ThemeItem::SetReadOnly(bool set) { fRo = set; } Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h 2008-10-01 03:37:33 UTC (rev 27808) @@ -6,7 +6,7 @@ class ThemeItem : public BStringItem { - public: +public: ThemeItem(int32 id, const char *name, bool ro = false); ~ThemeItem(); void DrawItem(BView *owner, BRect frame, bool complete = false); @@ -15,7 +15,7 @@ bool IsReadOnly(); void SetReadOnly(bool set); int32 ThemeId(); - private: +private: int32 fId; bool fRo; bool fCurrent; Modified: haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -16,6 +16,7 @@ char *name; uint32 flags; } font_folder_info; + typedef struct font_file_info { char *name; uint32 flags; @@ -34,7 +35,8 @@ extern status_t _get_nth_font_file_(long, font_file_info **); extern status_t _get_nth_font_folder_(long, font_folder_info **); -status_t find_font_file(entry_ref *to, font_family family, font_style style, float size) +status_t +find_font_file(entry_ref *to, font_family family, font_style style, float size) { #ifdef B_BEOS_VERSION_DANO status_t err = ENOENT; @@ -74,6 +76,7 @@ return ENOENT; } + #define _BORK(_t) \ err = find_directory(_t, &path); \ if (!err && (s = dir->FindFirst(path.Path())) >= 0) { \ @@ -86,7 +89,8 @@ return B_OK; \ } \ -status_t escape_find_directory(BString *dir) +status_t +escape_find_directory(BString *dir) { status_t err; BPath path; @@ -157,6 +161,7 @@ } #undef _BORK + #define _BORK(_t) \ if (tok == #_t) { \ err = find_directory(_t, &path); \ @@ -167,7 +172,8 @@ } \ -status_t unescape_find_directory(BString *dir) +status_t +unescape_find_directory(BString *dir) { status_t err = B_ERROR; int32 s, e; @@ -243,12 +249,13 @@ return B_OK; } - #undef _BORK + // copy a file including its attributes #define BUFF_SZ 1024*1024 -status_t copy_file(entry_ref *ref, const char *to) +status_t +copy_file(entry_ref *ref, const char *to) { char *buff; status_t err = B_OK; @@ -265,7 +272,8 @@ } -int testhook() +int +testhook() { status_t err; BString str("/boot/home/config/fonts/ttfonts/toto.ttf"); @@ -274,7 +282,6 @@ err = unescape_find_directory(&str); printf("error 0x%08lx %s\n", err, str.String()); return 0; - return 1; } status_t Modified: haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp 2008-10-01 03:37:33 UTC (rev 27808) @@ -4,7 +4,9 @@ #include #include -ViewItem::ViewItem(BRect bounds, const char *name, uint32 resizeMask, uint32 flags, uint32 level, bool expanded) + +ViewItem::ViewItem(BRect bounds, const char *name, + uint32 resizeMask, uint32 flags, uint32 level, bool expanded) : BView(bounds, name, resizeMask, flags), BListItem(level, expanded) { fOwner = NULL; @@ -12,13 +14,16 @@ SetHeight(bounds.Height()); } + ViewItem::~ViewItem() { if (fOwner) fOwner->RemoveChild(this); } -void ViewItem::DrawItem(BView *ownerview, BRect frame, bool complete) + +void +ViewItem::DrawItem(BView *ownerview, BRect frame, bool complete) { (void)frame; (void)complete; if (!fOwner) { @@ -40,7 +45,9 @@ //BListItem::DrawItem(ownerview, frame, complete); } -void ViewItem::Update(BView *ownerview, const BFont *font) + +void +ViewItem::Update(BView *ownerview, const BFont *font) { PRINT(("ViewItem::Update()\n")); (void)font; Modified: haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h 2008-10-01 03:10:18 UTC (rev 27807) +++ haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h 2008-10-01 03:37:33 UTC (rev 27808) @@ -7,13 +7,13 @@ class ViewItem : public BView, public BListItem { - public: - ViewItem(BRect bounds, const char *name, uint32 resizeMask, uint32 flags, uint32 level = 0, bool expanded = true); - virtual ~ViewItem(); -virtual void DrawItem(BView *ownerview, BRect frame, bool complete = false); -virtual void Update(BView *ownerview, const BFont *font); - private: - BListView *fOwner; +public: + ViewItem(BRect bounds, const char *name, uint32 resizeMask, uint32 flags, uint32 level = 0, bool expanded = true); + virtual ~ViewItem(); + virtual void DrawItem(BView *ownerview, BRect frame, bool complete = false); + virtual void Update(BView *ownerview, const BFont *font); +private: + BListView* fOwner; }; #endif // _VIEW_ITEM_H_ From mmu_man at mail.berlios.de Wed Oct 1 05:52:09 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 05:52:09 +0200 Subject: [Haiku-commits] r27809 - haiku/trunk/3rdparty/mmu_man/themes Message-ID: <200810010352.m913q9KK013423@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 05:52:08 +0200 (Wed, 01 Oct 2008) New Revision: 27809 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27809&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp Log: More guidelinization... Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp 2008-10-01 03:37:33 UTC (rev 27808) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp 2008-10-01 03:52:08 UTC (rev 27809) @@ -25,6 +25,7 @@ //#define HAVE_PREF_BTN + ThemeAddonItem::ThemeAddonItem(BRect bounds, ThemeInterfaceView *iview, int32 id) : ViewItem(bounds, "addonitem", B_FOLLOW_NONE, B_WILL_DRAW) { @@ -71,6 +72,7 @@ SetFont(&fnt); } + ThemeAddonItem::~ThemeAddonItem() { delete fApplyBox; @@ -80,12 +82,16 @@ #endif } -void ThemeAddonItem::DrawItem(BView *ownerview, BRect frame, bool complete) + +void +ThemeAddonItem::DrawItem(BView *ownerview, BRect frame, bool complete) { ViewItem::DrawItem(ownerview, frame, complete); } -void ThemeAddonItem::AttachedToWindow() + +void +ThemeAddonItem::AttachedToWindow() { AddChild(fApplyBox); fApplyBox->SetTarget(fIView); @@ -98,7 +104,9 @@ RelayoutButtons(); } -void ThemeAddonItem::MessageReceived(BMessage *message) + +void +ThemeAddonItem::MessageReceived(BMessage *message) { switch (message->what) { case B_LANGUAGE_CHANGED: @@ -107,12 +115,16 @@ BView::MessageReceived(message); } -void ThemeAddonItem::Draw(BRect) + +void +ThemeAddonItem::Draw(BRect) { DrawString(fAddonName.String(), BPoint(10, 15/*Bounds().Height()/2*/)); } -void ThemeAddonItem::RelocalizeStrings() + +void +ThemeAddonItem::RelocalizeStrings() { fApplyBox->SetLabel(_T("Apply")); fSaveBox->SetLabel(_T("Save")); @@ -129,7 +141,9 @@ RelayoutButtons(); } -void ThemeAddonItem::RelayoutButtons() + +void +ThemeAddonItem::RelayoutButtons() { fApplyBox->ResizeToPreferred(); fSaveBox->MoveTo(fApplyBox->Frame().right+CTRL_SPACING, fApplyBox->Frame().top); @@ -140,7 +154,10 @@ #endif } -int32 ThemeAddonItem::AddonId() + +int32 +ThemeAddonItem::AddonId() { return fId; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h 2008-10-01 03:37:33 UTC (rev 27808) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h 2008-10-01 03:52:08 UTC (rev 27809) @@ -10,7 +10,7 @@ class ThemeAddonItem : public ViewItem { - public: +public: ThemeAddonItem(BRect bounds, ThemeInterfaceView *iview, int32 id); ~ThemeAddonItem(); void DrawItem(BView *ownerview, BRect frame, bool complete = false); @@ -22,7 +22,7 @@ void RelayoutButtons(); int32 AddonId(); - private: +private: int32 fId; ThemeInterfaceView *fIView; BString fAddonName; Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp 2008-10-01 03:37:33 UTC (rev 27808) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp 2008-10-01 03:52:08 UTC (rev 27809) @@ -30,23 +30,30 @@ fSettings.MakeEmpty(); } + ThemeImporter::~ThemeImporter() { FENTRY; } -const char *ThemeImporter::Name() + +const char * +ThemeImporter::Name() { return fName.String(); } -const char *ThemeImporter::Description() + +const char * +ThemeImporter::Description() { FENTRY; return "No description yet."; } -status_t ThemeImporter::LoadSettings(BMessage &settings) + +status_t +ThemeImporter::LoadSettings(BMessage &settings) { FENTRY; uint32 flags; @@ -56,7 +63,9 @@ return B_OK; } -status_t ThemeImporter::SaveSettings(BMessage &settings) + +status_t +ThemeImporter::SaveSettings(BMessage &settings) { FENTRY; status_t err; @@ -65,29 +74,39 @@ return err; } -void ThemeImporter::SetFlags(uint32 flags) + +void +ThemeImporter::SetFlags(uint32 flags) { fFlags = flags; } -uint32 ThemeImporter::Flags() + +uint32 +ThemeImporter::Flags() { return fFlags; } -status_t ThemeImporter::FetchThemes() + +status_t +ThemeImporter::FetchThemes() { FENTRY; return B_OK; } -status_t ThemeImporter::ImportNextTheme(BMessage **theme) + +status_t +ThemeImporter::ImportNextTheme(BMessage **theme) { FENTRY; return ENOENT; } -status_t ThemeImporter::EndImports() + +status_t +ThemeImporter::EndImports() { FENTRY; return B_OK; Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp 2008-10-01 03:37:33 UTC (rev 27808) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp 2008-10-01 03:52:08 UTC (rev 27809) @@ -43,6 +43,7 @@ #define FENTRY #endif + ThemeManager::ThemeManager() : fAddonCount(0) { @@ -78,6 +79,7 @@ */ } + ThemeManager::~ThemeManager() { FENTRY; @@ -88,7 +90,9 @@ UnloadAddons(); } -status_t ThemeManager::LoadAddons() + +status_t +ThemeManager::LoadAddons() { FENTRY; ThemesAddon *ta; @@ -216,7 +220,9 @@ return B_OK; } -status_t ThemeManager::UnloadAddons() + +status_t +ThemeManager::UnloadAddons() { FENTRY; int32 i; @@ -235,7 +241,9 @@ return B_OK; } -int32 ThemeManager::FindAddon(const char *name) + +int32 +ThemeManager::FindAddon(const char *name) { FENTRY; int32 i; @@ -250,13 +258,17 @@ return -1; } -int32 ThemeManager::CountAddons() + +int32 +ThemeManager::CountAddons() { FENTRY; return fAddonCount; } -ThemesAddon *ThemeManager::AddonAt(int32 addon) + +ThemesAddon * +ThemeManager::AddonAt(int32 addon) { FENTRY; if (addon < 0) @@ -264,7 +276,9 @@ return (ThemesAddon *)fAddonList.ItemAt(addon); } -const char *ThemeManager::AddonName(int32 addon) + +const char * +ThemeManager::AddonName(int32 addon) { FENTRY; if (addon < 0) @@ -272,7 +286,9 @@ return ((ThemesAddon *)fAddonList.ItemAt(addon))->Name(); } -const char *ThemeManager::AddonDescription(int32 addon) + +const char * +ThemeManager::AddonDescription(int32 addon) { FENTRY; if (addon < 0) @@ -280,9 +296,12 @@ return ((ThemesAddon *)fAddonList.ItemAt(addon))->Description(); } + const char *AddonName(int32 addon); -BView *ThemeManager::OptionsView(int32 addon) + +BView * +ThemeManager::OptionsView(int32 addon) { FENTRY; ThemesAddon *ta; @@ -292,7 +311,9 @@ return NULL; } -status_t ThemeManager::RunPreferencesPanel(int32 addon) + +status_t +ThemeManager::RunPreferencesPanel(int32 addon) { FENTRY; ThemesAddon *ta; @@ -302,7 +323,9 @@ return B_OK; } -status_t ThemeManager::LoadSettings() + +status_t +ThemeManager::LoadSettings() { FENTRY; BMessage addonSettings; @@ -341,7 +364,9 @@ return B_OK; } -status_t ThemeManager::SaveSettings() + +status_t +ThemeManager::SaveSettings() { FENTRY; BMessage addonSettings; @@ -375,7 +400,9 @@ return B_OK; } -void ThemeManager::SetAddonFlags(int32 addon, uint32 flags) + +void +ThemeManager::SetAddonFlags(int32 addon, uint32 flags) { FENTRY; ThemesAddon *ta; @@ -384,7 +411,9 @@ ta->SetAddonFlags(flags); } -uint32 ThemeManager::AddonFlags(int32 addon) + +uint32 +ThemeManager::AddonFlags(int32 addon) { FENTRY; ThemesAddon *ta; @@ -394,7 +423,9 @@ return 0L; } -status_t ThemeManager::AddNames(BMessage &names) + +status_t +ThemeManager::AddNames(BMessage &names) { FENTRY; int32 i; @@ -411,14 +442,18 @@ return gerr; } -status_t ThemeManager::GetNames(BMessage &names) + +status_t +ThemeManager::GetNames(BMessage &names) { FENTRY; names = fNames; return B_OK; } -status_t ThemeManager::LoadThemes() + +status_t +ThemeManager::LoadThemes() { FENTRY; int dirwhich; @@ -461,7 +496,9 @@ return B_OK; } -status_t ThemeManager::AddTheme(BMessage *theme) + +status_t +ThemeManager::AddTheme(BMessage *theme) { FENTRY; BString name; @@ -477,7 +514,9 @@ return B_OK; } -status_t ThemeManager::UnloadThemes() + +status_t +ThemeManager::UnloadThemes() { FENTRY; int32 i; @@ -491,14 +530,18 @@ return B_OK; } -int32 ThemeManager::CountThemes() + +int32 +ThemeManager::CountThemes() { FENTRY; return fThemeList.CountItems(); } -BMessage *ThemeManager::ThemeAt(int32 id, bool allowbackup) + +BMessage * +ThemeManager::ThemeAt(int32 id, bool allowbackup) { FENTRY; BMessage *theme; @@ -512,7 +555,9 @@ return theme; } -status_t ThemeManager::SetThemeAt(int32 id, BMessage ©from) + +status_t +ThemeManager::SetThemeAt(int32 id, BMessage ©from) { FENTRY; BMessage *theme; @@ -537,7 +582,9 @@ return B_OK; } -int32 ThemeManager::FindTheme(const char *name) + +int32 +ThemeManager::FindTheme(const char *name) { FENTRY; int32 i; @@ -556,7 +603,9 @@ return -1L; } -status_t ThemeManager::CurrentTheme(BMessage ©to) + +status_t +ThemeManager::CurrentTheme(BMessage ©to) { FENTRY; @@ -578,8 +627,8 @@ } - -status_t ThemeManager::ApplyTheme(int32 id, uint32 flags) +status_t +ThemeManager::ApplyTheme(int32 id, uint32 flags) { FENTRY; int32 i; @@ -605,7 +654,9 @@ return gerr; } -int32 ThemeManager::MakeTheme(uint32 flags) + +int32 +ThemeManager::MakeTheme(uint32 flags) { FENTRY; int32 i, id; @@ -632,7 +683,9 @@ return id; } -status_t ThemeManager::UpdateTheme(int32 id, uint32 flags) + +status_t +ThemeManager::UpdateTheme(int32 id, uint32 flags) { FENTRY; int32 i; @@ -668,7 +721,9 @@ return B_OK;//gerr; } -status_t ThemeManager::DeleteTheme(int32 id) + +status_t +ThemeManager::DeleteTheme(int32 id) { status_t err; BMessage *theme; @@ -715,7 +770,9 @@ return B_OK; } -int32 ThemeManager::SelectedTheme() + +int32 +ThemeManager::SelectedTheme() { BMessage *theme; theme = ThemeAt(fSelectedTheme); @@ -725,7 +782,9 @@ return fSelectedTheme; } -status_t ThemeManager::ApplyDefaultTheme(uint32 flags) + +status_t +ThemeManager::ApplyDefaultTheme(uint32 flags) { FENTRY; int32 i; @@ -748,7 +807,8 @@ } -status_t ThemeManager::BackupCurrent() +status_t +ThemeManager::BackupCurrent() { FENTRY; int32 i; @@ -768,7 +828,9 @@ return gerr; } -status_t ThemeManager::RestoreCurrent() + +status_t +ThemeManager::RestoreCurrent() { FENTRY; int32 i; @@ -790,13 +852,17 @@ return gerr; } -bool ThemeManager::CanRevert() + +bool +ThemeManager::CanRevert() { FENTRY; return !fBackupTheme.IsEmpty(); } -status_t ThemeManager::CompareToCurrent(BMessage &theme) + +status_t +ThemeManager::CompareToCurrent(BMessage &theme) { FENTRY; int32 i; @@ -817,7 +883,8 @@ } -status_t ThemeManager::InstallFiles(BMessage &theme, BDirectory &folder) +status_t +ThemeManager::InstallFiles(BMessage &theme, BDirectory &folder) { FENTRY; int32 i; @@ -836,7 +903,9 @@ return gerr; } -status_t ThemeManager::BackupFiles(BMessage &theme, BDirectory &folder) + +status_t +ThemeManager::BackupFiles(BMessage &theme, BDirectory &folder) { FENTRY; int32 i; @@ -855,7 +924,9 @@ return gerr; } -status_t ThemeManager::SaveTheme(int32 id, bool excl) + +status_t +ThemeManager::SaveTheme(int32 id, bool excl) { FENTRY; status_t err; @@ -910,7 +981,9 @@ return B_OK; } -status_t ThemeManager::PackageTheme(BMessage &theme) + +status_t +ThemeManager::PackageTheme(BMessage &theme) { PRINT(("UNIMPLEMENTED %s()\n", __FUNCTION__)); @@ -918,7 +991,9 @@ return B_OK; } -status_t ThemeManager::LoadTheme(const char *path, BMessage **to) + +status_t +ThemeManager::LoadTheme(const char *path, BMessage **to) { status_t err; BDirectory dir; @@ -959,13 +1034,17 @@ return err; } -int32 ThemeManager::CountThemeImporters() + +int32 +ThemeManager::CountThemeImporters() { FENTRY; return fThemeImporters.CountItems(); } -const char * ThemeManager::ThemeImporterAt(int32 index) + +const char * +ThemeManager::ThemeImporterAt(int32 index) { FENTRY; ThemeImporter *importer; @@ -975,7 +1054,9 @@ return importer->Name(); } -status_t ThemeManager::ImportThemesFor(int32 index, const char *path) + +status_t +ThemeManager::ImportThemesFor(int32 index, const char *path) { FENTRY; status_t err; @@ -1002,7 +1083,9 @@ return B_OK; } -bool ThemeManager::ThemeHasInfoFor(int32 id, BString &module) + +bool +ThemeManager::ThemeHasInfoFor(int32 id, BString &module) { FENTRY; status_t err; @@ -1026,7 +1109,9 @@ return false; } -status_t ThemeManager::ThemeName(int32 id, BString ©to) + +status_t +ThemeManager::ThemeName(int32 id, BString ©to) { FENTRY; status_t err; @@ -1050,7 +1135,9 @@ return B_OK; } -status_t ThemeManager::ThemeLocation(int32 id, BString ©to) + +status_t +ThemeManager::ThemeLocation(int32 id, BString ©to) { FENTRY; status_t err; @@ -1070,7 +1157,9 @@ return B_OK; } -bool ThemeManager::ThemeIsReadOnly(int32 id) + +bool +ThemeManager::ThemeIsReadOnly(int32 id) { FENTRY; status_t err; @@ -1095,7 +1184,9 @@ return false; } -status_t ThemeManager::ThemeDescription(int32 id, BString ©to) + +status_t +ThemeManager::ThemeDescription(int32 id, BString ©to) { FENTRY; status_t err; @@ -1119,7 +1210,9 @@ return B_OK; } -status_t ThemeManager::ThemeKeywords(int32 id, BString ©to) + +status_t +ThemeManager::ThemeKeywords(int32 id, BString ©to) { FENTRY; status_t err; @@ -1143,7 +1236,9 @@ return B_OK; } -status_t ThemeManager::ThemeScreenShot(int32 id, BBitmap **copyto) + +status_t +ThemeManager::ThemeScreenShot(int32 id, BBitmap **copyto) { FENTRY; status_t err; @@ -1184,7 +1279,9 @@ return B_OK; } -status_t ThemeManager::SetThemeHasInfoFor(int32 id, BString module) + +status_t +ThemeManager::SetThemeHasInfoFor(int32 id, BString module) { FENTRY; status_t err; @@ -1209,7 +1306,9 @@ return err; } -status_t ThemeManager::SetThemeName(int32 id, BString name) + +status_t +ThemeManager::SetThemeName(int32 id, BString name) { FENTRY; status_t err; @@ -1236,7 +1335,9 @@ return err; } -status_t ThemeManager::SetThemeDescription(int32 id, BString description) + +status_t +ThemeManager::SetThemeDescription(int32 id, BString description) { FENTRY; status_t err; @@ -1263,7 +1364,9 @@ return err; } -status_t ThemeManager::SetThemeKeywords(int32 id, BString keywords) + +status_t +ThemeManager::SetThemeKeywords(int32 id, BString keywords) { FENTRY; status_t err; @@ -1290,7 +1393,9 @@ return err; } -status_t ThemeManager::SetThemeScreenShot(int32 id, BBitmap *bitmap) + +status_t +ThemeManager::SetThemeScreenShot(int32 id, BBitmap *bitmap) { FENTRY; status_t err; @@ -1347,7 +1452,9 @@ return err; } -status_t ThemeManager::MakeThemeScreenShot(int32 id) + +status_t +ThemeManager::MakeThemeScreenShot(int32 id) { FENTRY; status_t err; @@ -1369,7 +1476,9 @@ return err; } -void ThemeManager::NormalizeThemeFolderName(BString &name) + +void +ThemeManager::NormalizeThemeFolderName(BString &name) { FENTRY; name.RemoveSet("\"\\'/&:*~#|`^"); Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp 2008-10-01 03:37:33 UTC (rev 27808) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) @@ -25,8 +25,11 @@ extern bool CompareMessages(BMessage &a, BMessage &b); +// #pragma mark - + + ThemesAddon::ThemesAddon(const char *name, const char *message_name) - :fImageId(-1), + : fImageId(-1), fName(NULL), fMsgName(NULL), fFlags(0L) @@ -38,6 +41,7 @@ fSettings.MakeEmpty(); } + ThemesAddon::~ThemesAddon() { FENTRY; @@ -45,30 +49,40 @@ free(fName); } -const char *ThemesAddon::Name() + +const char * +ThemesAddon::Name() { return (const char *)fName; } -const char *ThemesAddon::Description() + +const char * +ThemesAddon::Description() { FENTRY; return "No description yet."; } + -BView *ThemesAddon::OptionsView() +BView * +ThemesAddon::OptionsView() { FENTRY; return NULL; } -status_t ThemesAddon::RunPreferencesPanel() + +status_t +ThemesAddon::RunPreferencesPanel() { FENTRY; return B_OK; } -status_t ThemesAddon::LoadSettings(BMessage &settings) + +status_t +ThemesAddon::LoadSettings(BMessage &settings) { FENTRY; uint32 flags; @@ -78,7 +92,9 @@ return B_OK; } -status_t ThemesAddon::SaveSettings(BMessage &settings) + +status_t +ThemesAddon::SaveSettings(BMessage &settings) { FENTRY; status_t err; @@ -87,17 +103,23 @@ return err; } -void ThemesAddon::SetAddonFlags(uint32 flags) + +void +ThemesAddon::SetAddonFlags(uint32 flags) { fFlags = flags; } -uint32 ThemesAddon::AddonFlags() + +uint32 +ThemesAddon::AddonFlags() { return fFlags; } -status_t ThemesAddon::AddNames(BMessage &names) + +status_t +ThemesAddon::AddNames(BMessage &names) { FENTRY; BString str; @@ -109,7 +131,8 @@ } -status_t ThemesAddon::MyMessage(BMessage &theme, BMessage &mine) +status_t +ThemesAddon::MyMessage(BMessage &theme, BMessage &mine) { FENTRY; BMessage msg; @@ -126,7 +149,9 @@ return err; } -status_t ThemesAddon::SetMyMessage(BMessage &theme, BMessage &mine) + +status_t +ThemesAddon::SetMyMessage(BMessage &theme, BMessage &mine) { FENTRY; status_t err; @@ -141,26 +166,34 @@ return err; } -const char *ThemesAddon::MessageName() + +const char * +ThemesAddon::MessageName() { return (const char *)fMsgName; } -status_t ThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +ThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { FENTRY; (void)theme; (void) flags; return B_OK; } -status_t ThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +ThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { FENTRY; (void)theme; (void) flags; return B_OK; } -status_t ThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +ThemesAddon::ApplyDefaultTheme(uint32 flags) { FENTRY; (void) flags; @@ -168,23 +201,28 @@ [... truncated: 70 lines follow ...] From mmu_man at mail.berlios.de Wed Oct 1 06:19:32 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 06:19:32 +0200 Subject: [Haiku-commits] r27810 - haiku/trunk/3rdparty/mmu_man/themes/addons Message-ID: <200810010419.m914JWQu018694@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 06:19:30 +0200 (Wed, 01 Oct 2008) New Revision: 27810 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27810&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp Log: Guidelinizationing again... Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -33,6 +33,7 @@ #define B__DESKTOP_COLOR "be:desktop_color" + class BackgroundThemesAddon : public ThemesAddon { public: BackgroundThemesAddon(); @@ -58,21 +59,27 @@ }; + BackgroundThemesAddon::BackgroundThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + BackgroundThemesAddon::~BackgroundThemesAddon() { } -const char *BackgroundThemesAddon::Description() + +const char * +BackgroundThemesAddon::Description() { return A_DESCRIPTION; } -status_t BackgroundThemesAddon::RunPreferencesPanel() + +status_t +BackgroundThemesAddon::RunPreferencesPanel() { /* if (be_roster->Launch("application/x-vnd.obos-Backgrounds") < B_OK) if (be_roster->Launch("application/x-vnd.Be-Backgrounds") < B_OK) @@ -104,7 +111,9 @@ return err; } -status_t BackgroundThemesAddon::AddNames(BMessage &names) + +status_t +BackgroundThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_BACKGROUND_SETTINGS, "Desktop backgrounds and color; please respect count and ordering of all fields!"); names.AddString(B_BACKGROUND_WORKSPACES, "Workspaces each backdrop apply to"); @@ -116,7 +125,9 @@ return B_OK; } -status_t BackgroundThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +BackgroundThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage backgrounds; status_t err = B_OK; @@ -177,7 +188,9 @@ return err; } -status_t BackgroundThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +BackgroundThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage backgrounds; status_t err = B_OK; @@ -239,7 +252,9 @@ return err; } -status_t BackgroundThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +BackgroundThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage backgrounds; @@ -250,20 +265,26 @@ return ApplyTheme(theme, flags); } -status_t BackgroundThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) + +status_t +BackgroundThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) { (void)theme; (void)folder; return B_OK; } -status_t BackgroundThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) + +status_t +BackgroundThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) { (void)theme; (void)folder; return B_OK; } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new BackgroundThemesAddon; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -32,6 +32,7 @@ #define BEIDE_SETTINGS_NAME "Metrowerks/BeIDE_Prefs" + // __PACKED struct beide_editor_pref { uint32 dummy; /* BIG ENDIAN */ @@ -66,32 +67,42 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + BeIDEThemesAddon::BeIDEThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + BeIDEThemesAddon::~BeIDEThemesAddon() { } -const char *BeIDEThemesAddon::Description() + +const char * +BeIDEThemesAddon::Description() { return A_DESCRIPTION; } -status_t BeIDEThemesAddon::RunPreferencesPanel() + +status_t +BeIDEThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t BeIDEThemesAddon::AddNames(BMessage &names) + +status_t +BeIDEThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_BEIDE_SETTINGS, "BeIDE Settings"); return B_OK; } -status_t BeIDEThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +BeIDEThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -166,13 +177,17 @@ return B_OK; } -status_t BeIDEThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +BeIDEThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t BeIDEThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +BeIDEThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -185,7 +200,9 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new BeIDEThemesAddon; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -45,8 +45,10 @@ #define A_MSGNAME Z_THEME_WINDOW_DECORATIONS #define A_DESCRIPTION "Window decorations and scrollbars" + #ifdef B_BEOS_VERSION_DANO -status_t set_window_decor_safe(const char *name, BMessage *globals) +status_t +set_window_decor_safe(const char *name, BMessage *globals) { // make sure the decor exists (set_window_decor() always returns B_OK) //PRINT(("set_window_decor_safe(%s, %p)\n", name, globals)); @@ -79,21 +81,27 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + DecorThemesAddon::DecorThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DecorThemesAddon::~DecorThemesAddon() { } -const char *DecorThemesAddon::Description() + +const char * +DecorThemesAddon::Description() { return A_DESCRIPTION; } -status_t DecorThemesAddon::RunPreferencesPanel() + +status_t +DecorThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -113,7 +121,9 @@ return err; } -status_t DecorThemesAddon::AddNames(BMessage &names) + +status_t +DecorThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_WINDOW_DECORATIONS, "Window decorations and scrollbars"); names.AddString("window:decor", "Window decor"); @@ -121,7 +131,9 @@ return B_OK; } -status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -261,7 +273,9 @@ return B_OK; } -status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -287,7 +301,9 @@ return err; } -status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DecorThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage window_decor; @@ -298,9 +314,11 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DecorThemesAddon; } + #endif /* B_BEOS_VERSION && !__HAIKU__ */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -28,6 +28,7 @@ #define A_MSGNAME Z_THEME_UI_SETTINGS #define A_DESCRIPTION "System colors, fonts and other goodies" + class UISettingsThemesAddon : public ThemesAddon { public: UISettingsThemesAddon(); @@ -45,21 +46,27 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + UISettingsThemesAddon::UISettingsThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + UISettingsThemesAddon::~UISettingsThemesAddon() { } -const char *UISettingsThemesAddon::Description() + +const char * +UISettingsThemesAddon::Description() { return A_DESCRIPTION; } -status_t UISettingsThemesAddon::RunPreferencesPanel() + +status_t +UISettingsThemesAddon::RunPreferencesPanel() { status_t err = B_OK; entry_ref ref; @@ -90,7 +97,9 @@ return err; } -status_t UISettingsThemesAddon::AddNames(BMessage &names) + +status_t +UISettingsThemesAddon::AddNames(BMessage &names) { BMessage uisettings; BMessage uinames; @@ -113,7 +122,9 @@ return B_OK; } -status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BFont fnt; @@ -153,7 +164,9 @@ return B_OK; } -status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BMessage names; @@ -181,7 +194,9 @@ return err; } -status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -205,9 +220,11 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new UISettingsThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -23,6 +23,7 @@ #define A_MSGNAME Z_THEME_DESKBAR_SETTINGS #define A_DESCRIPTION "Deskbar on-screen position" + class DeskbarThemesAddon : public ThemesAddon { public: DeskbarThemesAddon(); @@ -40,21 +41,27 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + DeskbarThemesAddon::DeskbarThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DeskbarThemesAddon::~DeskbarThemesAddon() { } -const char *DeskbarThemesAddon::Description() + +const char * +DeskbarThemesAddon::Description() { return A_DESCRIPTION; } -status_t DeskbarThemesAddon::RunPreferencesPanel() + +status_t +DeskbarThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -83,7 +90,9 @@ return err; } -status_t DeskbarThemesAddon::AddNames(BMessage &names) + +status_t +DeskbarThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_DESKBAR_SETTINGS, "Deskbar position"); names.AddString("db:location", "Deskbar on-screen position"); @@ -91,7 +100,9 @@ return B_OK; } -status_t DeskbarThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DeskbarThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage deskbar; status_t err; @@ -112,7 +123,9 @@ return db.SetLocation((deskbar_location)loc, expanded); } -status_t DeskbarThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DeskbarThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage deskbar; status_t err; @@ -137,7 +150,9 @@ return err; } -status_t DeskbarThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DeskbarThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage deskbar; @@ -150,7 +165,9 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DeskbarThemesAddon; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -32,6 +32,7 @@ #define EDDIE_SETTINGS_NAME "Eddie/settings" + class EddieThemesAddon : public ThemesAddon { public: EddieThemesAddon(); @@ -49,32 +50,42 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + EddieThemesAddon::EddieThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + EddieThemesAddon::~EddieThemesAddon() { } -const char *EddieThemesAddon::Description() + +const char * +EddieThemesAddon::Description() { return A_DESCRIPTION; } -status_t EddieThemesAddon::RunPreferencesPanel() + +status_t +EddieThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t EddieThemesAddon::AddNames(BMessage &names) + +status_t +EddieThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_EDDIE_SETTINGS, "Eddie Settings"); return B_OK; } -status_t EddieThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +EddieThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -121,13 +132,17 @@ return B_OK; } -status_t EddieThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +EddieThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t EddieThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +EddieThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -142,7 +157,9 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new EddieThemesAddon; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -46,6 +46,7 @@ #define A_MSGNAME Z_THEME_UI_SETTINGS #define A_DESCRIPTION "System colors, fonts and other goodies" + class UISettingsThemesAddon : public ThemesAddon { public: UISettingsThemesAddon(); @@ -63,6 +64,7 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + struct ui_color_map { const char *name; color_which id; @@ -93,23 +95,29 @@ { NULL, (color_which)-1 } }; + UISettingsThemesAddon::UISettingsThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { FENTRY; } + UISettingsThemesAddon::~UISettingsThemesAddon() { FENTRY; } -const char *UISettingsThemesAddon::Description() + +const char * +UISettingsThemesAddon::Description() { return A_DESCRIPTION; } -status_t UISettingsThemesAddon::RunPreferencesPanel() + +status_t +UISettingsThemesAddon::RunPreferencesPanel() { status_t err = B_OK; entry_ref ref; @@ -136,7 +144,9 @@ return err; } -status_t UISettingsThemesAddon::AddNames(BMessage &names) + +status_t +UISettingsThemesAddon::AddNames(BMessage &names) { FENTRY; @@ -177,7 +187,9 @@ return B_OK; } -status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BFont fnt; @@ -264,7 +276,9 @@ return B_OK; } -status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BMessage names; @@ -305,7 +319,9 @@ return err; } -status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -360,9 +376,11 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new UISettingsThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -40,7 +40,9 @@ using namespace BPrivate; -status_t set_decorator(const char *name) + +status_t +set_decorator(const char *name) { BString n; status_t err; @@ -59,10 +61,12 @@ return ENOENT; } + #define A_NAME "Window Decor" #define A_MSGNAME Z_THEME_WINDOW_DECORATIONS #define A_DESCRIPTION "Window decorations and scrollbars" + class DecorThemesAddon : public ThemesAddon { public: DecorThemesAddon(); @@ -80,21 +84,27 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + DecorThemesAddon::DecorThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DecorThemesAddon::~DecorThemesAddon() { } -const char *DecorThemesAddon::Description() + +const char * +DecorThemesAddon::Description() { return A_DESCRIPTION; } -status_t DecorThemesAddon::RunPreferencesPanel() + +status_t +DecorThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -109,7 +119,9 @@ return err; } -status_t DecorThemesAddon::AddNames(BMessage &names) + +status_t +DecorThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_WINDOW_DECORATIONS, "Window decorations and scrollbars"); names.AddString("window:decor", "Window decor"); @@ -117,7 +129,9 @@ return B_OK; } -status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -178,7 +192,9 @@ return B_OK; } -status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -215,7 +231,9 @@ return err; } -status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DecorThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage window_decor; @@ -226,9 +244,11 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DecorThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -32,6 +32,7 @@ #define PE_SETTINGS_NAME "pe/settings" + class PeThemesAddon : public ThemesAddon { public: PeThemesAddon(); @@ -49,32 +50,42 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + PeThemesAddon::PeThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + PeThemesAddon::~PeThemesAddon() { } -const char *PeThemesAddon::Description() + +const char * +PeThemesAddon::Description() { return A_DESCRIPTION; } -status_t PeThemesAddon::RunPreferencesPanel() + +status_t +PeThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t PeThemesAddon::AddNames(BMessage &names) + +status_t +PeThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_PE_SETTINGS, "Pe Settings"); return B_OK; } -status_t PeThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +PeThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -121,13 +132,17 @@ return B_OK; } -status_t PeThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +PeThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t PeThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +PeThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -142,7 +157,9 @@ } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new PeThemesAddon; } + Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp 2008-10-01 03:52:08 UTC (rev 27809) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) @@ -32,6 +32,7 @@ #define MS_NAME "modulesettings_" + class ScreensaverThemesAddon : public ThemesAddon { public: ScreensaverThemesAddon(); @@ -49,21 +50,27 @@ status_t ApplyDefaultTheme(uint32 flags=0L); }; + ScreensaverThemesAddon::ScreensaverThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + ScreensaverThemesAddon::~ScreensaverThemesAddon() { } -const char *ScreensaverThemesAddon::Description() + +const char * +ScreensaverThemesAddon::Description() { return A_DESCRIPTION; } -status_t ScreensaverThemesAddon::RunPreferencesPanel() + +status_t +ScreensaverThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -87,7 +94,9 @@ return err; } -status_t ScreensaverThemesAddon::AddNames(BMessage &names) + +status_t +ScreensaverThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_SCREENSAVER_SETTINGS, "Screensaver settings"); names.AddString(Z_THEME_SS_MODULE, "Screensaver active module"); @@ -95,7 +104,9 @@ return B_OK; } -status_t ScreensaverThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +ScreensaverThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage screensaver; status_t err; @@ -135,7 +146,9 @@ return err; } -status_t ScreensaverThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +ScreensaverThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage screensaver; status_t err; @@ -168,7 +181,9 @@ return err; } -status_t ScreensaverThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t [... truncated: 553 lines follow ...] From mmu_man at mail.berlios.de Wed Oct 1 06:28:49 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 06:28:49 +0200 Subject: [Haiku-commits] r27811 - in haiku/trunk/3rdparty/mmu_man/themes: . addons Message-ID: <200810010428.m914SnoQ019200@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 06:28:35 +0200 (Wed, 01 Oct 2008) New Revision: 27811 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27811&view=rev Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.h haiku/trunk/3rdparty/mmu_man/themes/CompareMessages.cpp haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.cpp haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.h haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.h haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.cpp haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.h haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.cpp haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.h haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.h haiku/trunk/3rdparty/mmu_man/themes/Themes.rdef haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.h haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.cpp haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.h haiku/trunk/3rdparty/mmu_man/themes/UITheme.h haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp haiku/trunk/3rdparty/mmu_man/themes/Utils.h haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp haiku/trunk/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp Log: Add missing copyrights. Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * BeThemeImporter class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/BeThemeImporter.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _BE_THEME_IMPORTER_H #define _BE_THEME_IMPORTER_H /* Modified: haiku/trunk/3rdparty/mmu_man/themes/CompareMessages.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/CompareMessages.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/CompareMessages.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * function to compare 2 BMessages */ #include Modified: haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/DumpMessage.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _DUMP_MESSAGE_H #define _DUMP_MESSAGE_H Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * MSThemeImporter class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/MSThemeImporter.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _MS_THEME_IMPORTER_H #define _MS_THEME_IMPORTER_H /* Modified: haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/MakeScreenshot.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * MakeScreenshot function */ Modified: haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ParseMessage.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _PARSE_MESSAGE_H #define _PARSE_MESSAGE_H Modified: haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2007-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + //HACK :P #define private public #include Modified: haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/TextInputAlert.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2007-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef TEXT_INPUT_ALERT_H #define TEXT_INPUT_ALERT_H Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include "ThemeAddonItem.h" #include "ThemeInterfaceView.h" #include "ThemeManager.h" Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeAddonItem.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _ADDON_ITEM_H_ #define _ADDON_ITEM_H_ Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2007-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * ThemeImporter class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeImporter.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2007-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _THEME_IMPORTER_H #define _THEME_IMPORTER_H /* Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeInterfaceView.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #include namespace Z { Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include "ThemeItem.h" #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeItem.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _THEME_ITEM_H_ #define _THEME_ITEM_H_ Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * ThemeManager class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemeManager.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,11 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _THEMEMANAGER_H_ +#define _THEMEMANAGER_H_ + +/* * ThemeManager class header */ @@ -138,3 +145,5 @@ using namespace Z::ThemeManager; + +#endif // _THEMEMANAGER_H_ Modified: haiku/trunk/3rdparty/mmu_man/themes/Themes.rdef =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/Themes.rdef 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/Themes.rdef 2008-10-01 04:28:35 UTC (rev 27811) @@ -8,7 +8,7 @@ variety = B_APPV_ALPHA, internal = 0, short_info = "Themes", - long_info = "Themes ?2006-2008 Fran?ois Revol." + long_info = "Themes ?2000-2008 Fran?ois Revol." }; resource app_flags B_SINGLE_LAUNCH; Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemesAddon.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _THEMES_ADDON_H #define _THEMES_ADDON_H /* Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ThemesApp.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,10 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _THEMESAPP_H_ +#define _THEMESAPP_H_ + #include class ThemesApp : public BApplication { @@ -9,3 +16,5 @@ private: }; + +#endif // _THEMESAPP_H_ Modified: haiku/trunk/3rdparty/mmu_man/themes/UITheme.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/UITheme.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/UITheme.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _Z_UI_THEME_H #define _Z_UI_THEME_H Modified: haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/Utils.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include "Utils.h" #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/Utils.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/Utils.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/Utils.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _FILE_UTILS_H #define _FILE_UTILS_H Modified: haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ViewItem.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,8 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + #include "ViewItem.h" #include #include Modified: haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/ViewItem.h 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,3 +1,7 @@ +/* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _VIEW_ITEM_H_ #define _VIEW_ITEM_H_ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * backgrounds ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * BeIDE Color ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * window_decor ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * ui_settings ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * deskbar ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/EddieAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * Eddie Color ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * ui_settings ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * window_decor ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/PeAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * Pe Color ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * screensaver ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * SoundPlay Color ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * sounds ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * BeIDE Color ThemesAddon class */ Modified: haiku/trunk/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp 2008-10-01 04:19:30 UTC (rev 27810) +++ haiku/trunk/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp 2008-10-01 04:28:35 UTC (rev 27811) @@ -1,4 +1,9 @@ /* + * Copyright 2000-2008, Fran?ois Revol, . All rights reserved. + * Distributed under the terms of the MIT License. + */ + +/* * WinampSkin ThemesAddon class */ From mmu_man at mail.berlios.de Wed Oct 1 06:52:17 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 06:52:17 +0200 Subject: [Haiku-commits] r27812 - in haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam: . addons addons/quickcam addons/sonix cstransforms sensors Message-ID: <200810010452.m914qHH4009888@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 06:52:09 +0200 (Wed, 01 Oct 2008) New Revision: 27812 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27812&view=rev Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDebug.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/README.txt haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.h haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/cstransforms/Bayer.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hdcs1000.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hv7131e1.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/pb0100.cpp haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/tas5110c1b.cpp Log: Add missing copyrights. Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include #include Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/AddOn.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _VIDEO_ADDON_H #define _VIDEO_ADDON_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamBufferedFilterInterface.h" #include "CamDevice.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferedFilterInterface.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_BUFFERED_FILTER_INTERFACE_H #define _CAM_BUFFERED_FILTER_INTERFACE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + /* * buffer based deframer * buffers all packet until it finds a complete frame. Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamBufferingDeframer.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_BUFFERING_DEFRAMER_H #define _CAM_BUFFERING_DEFRAMER_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamColorSpaceTransform.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamColorSpaceTransform.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_COLOR_SPACE_TRANSFORM_H #define _CAM_COLOR_SPACE_TRANSFORM_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDebug.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDebug.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDebug.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_DEBUG_H #define _CAM_DEBUG_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #define CD_COL "31" #include "CamDeframer.h" #include "CamDevice.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDeframer.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_DEFRAMER_H #define _CAM_DEFRAMER_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamDevice.h" #include "CamSensor.h" #include "CamDeframer.h" @@ -486,7 +491,7 @@ len = fBulkIn->BulkTransfer(fBuffer, fBufferLen); #endif - //PRINT((CH ": got %d bytes" CT, len)); + PRINT((CH ": got %d bytes" CT, len)); #ifdef DEBUG_WRITE_DUMP write(fDumpFD, fBuffer, len); #endif Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamDevice.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_DEVICE_H #define _CAM_DEVICE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamFilterInterface.h" #include "CamDevice.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamFilterInterface.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_FILTER_INTERFACE_H #define _CAM_FILTER_INTERFACE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamRoster.h" #include "AddOn.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamRoster.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_ROSTER_H #define _CAM_ROSTER_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "CamSensor.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamSensor.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_SENSOR_H #define _CAM_SENSOR_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + /* * stream based deframer * has a state machine and handles each packet separately. Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _CAM_STREAMING_DEFRAMER_H #define _CAM_STREAMING_DEFRAMER_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include #include #include Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/Producer.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _VIDEO_PRODUCER_H #define _VIDEO_PRODUCER_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/README.txt =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/README.txt 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/README.txt 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,5 +1,5 @@ USB Webcam driver -(c) 2004-2007 Fran?ois Revol. +(c) 2004-2008 Fran?ois Revol. Parts (c) Be,Inc. (ProducerNode sample code). Current version of my USB Webcam driver. WORK IN PROGRESS! Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "NW80xCamDevice.h" #include "CamDebug.h" #include "CamSensor.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/NW80xCamDevice.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _NW80X_CAM_DEVICE_H #define _NW80X_CAM_DEVICE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "QuickCamDevice.h" #include "CamDebug.h" #include "CamSensor.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _QUICK_CAM_DEVICE_H #define _QUICK_CAM_DEVICE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + #include "SonixCamDevice.h" #include "CamDebug.h" #include "CamSensor.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.h 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.h 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,3 +1,7 @@ +/* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #ifndef _SONIX_CAM_DEVICE_H #define _SONIX_CAM_DEVICE_H Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/cstransforms/Bayer.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/cstransforms/Bayer.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/cstransforms/Bayer.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,4 +1,9 @@ /* + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ + +/* * Bayer to RGB32 colorspace transformation */ Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hdcs1000.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hdcs1000.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hdcs1000.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,5 +1,7 @@ /* -*/ + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #include "CamSensor.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hv7131e1.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hv7131e1.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/hv7131e1.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,5 +1,7 @@ /* -*/ + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #include "CamSensor.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/pb0100.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/pb0100.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/pb0100.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,5 +1,7 @@ /* -*/ + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #include "CamSensor.h" #include "CamDebug.h" Modified: haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/tas5110c1b.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/tas5110c1b.cpp 2008-10-01 04:28:35 UTC (rev 27811) +++ haiku/trunk/src/add-ons/media/media-add-ons/usb_webcam/sensors/tas5110c1b.cpp 2008-10-01 04:52:09 UTC (rev 27812) @@ -1,5 +1,7 @@ /* -*/ + * Copyright 2004-2008, Fran?ois Revol, . + * Distributed under the terms of the MIT License. + */ #include From jackburton at mail.berlios.de Wed Oct 1 10:17:36 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Wed, 1 Oct 2008 10:17:36 +0200 Subject: [Haiku-commits] r27813 - haiku/trunk/src/preferences/virtualmemory Message-ID: <200810010817.m918HaJ0026597@sheep.berlios.de> Author: jackburton Date: 2008-10-01 10:17:34 +0200 (Wed, 01 Oct 2008) New Revision: 27813 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27813&view=rev Modified: haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp Log: fixed gcc4 warnings. BSlider::UpdateText() actually returns a const char *, not a char * Modified: haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp =================================================================== --- haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp 2008-10-01 04:52:09 UTC (rev 27812) +++ haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp 2008-10-01 08:17:34 UTC (rev 27813) @@ -39,7 +39,7 @@ BMessage* message, int32 min, int32 max, uint32 resizingMode); virtual ~SizeSlider(); - virtual char* UpdateText() const; + virtual const char* UpdateText() const; private: mutable BString fText; @@ -91,12 +91,12 @@ } -char * +const char * SizeSlider::UpdateText() const { fText = byte_string(Value() * kMegaByte); - return const_cast(fText.String()); + return fText.String(); } From Info.Be-Hold at inter.nl.net Wed Oct 1 10:34:40 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Wed, 1 Oct 2008 10:34:40 +0200 (CEST) Subject: [Haiku-commits] r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <48E29161.4070200@arcor.de> References: <200809220636.m8M6an0R005065@sheep.berlios.de> <10679479900-BeMail@zon> <3994.212.178.112.94.1222090223.squirrel@webmail.inter.nl.net> <20080922141208.M82@mlotz.ch> <4348.212.178.112.94.1222770159.squirrel@webmail.inter.nl.net> <48E29161.4070200@arcor.de> Message-ID: <1100.212.178.112.94.1222850080.squirrel@webmail.inter.nl.net> Good morning :-) I decided yesterday to now focus on the ata busmanager: which also does not work for me. I am not very interested in fixing these things in svn, but I want to boot haiku: so if I can fix the ide busmanager (or the ata busmanager) in such a way I can work with it, I'll obviously do that on my personal copies. I indeed saw that the ata busmanager doesn't use ints, but still it doesn't work: and in the same spot as the ide busmanager on my system, using a certain 80G HD. (tested 3 HD's with ide: all same problem, but for ata the drives behave differently somehow). Thanks for the pointers, I'll keep on digging.. Rudolf. Op Di, 30 september, 2008 10:51 pm schreef Marcus Overhagen: > Info.Be-Hold at inter.nl.net wrote: > > >> Hi there Michael, >> >> >> Sorry for the late reply.. >> >> >> Anyhow, I'm still searching, and it seems to be an int problem >> indeed. > [...] > > >> Looking at the int service routine, it's apparant that lots of >> 'spurious' ints occur during reading (one async waiting int and one >> spurious int per read sector AFAICT). Reading however works fine: these >> ints seem to be correctly handled. > > The ide bus manager is broken. Please do not try to fix it. > > > Especially the interrupt handling in PIO mode usually does not work > relyable with interrupt sharing, except perhaps for devices in IDE > compatibility mode. > > Did you file a bug report? whats your PCI device configuration? > > > You can try to use the ata instead of the ide bus manager. > > > Although not finished, it won't use interrupts for PIO transfers > and might work better for you. > > DMA transfers and ATAPI is currently not implemented, and > timeouts during device detection are slihgtly stupid/long. > > regards Marcus > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From stippi at mail.berlios.de Wed Oct 1 12:38:26 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 12:38:26 +0200 Subject: [Haiku-commits] r27814 - haiku/trunk/data/artwork/icons Message-ID: <200810011038.m91AcQdn018089@sheep.berlios.de> Author: stippi Date: 2008-10-01 12:38:15 +0200 (Wed, 01 Oct 2008) New Revision: 27814 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27814&view=rev Added: haiku/trunk/data/artwork/icons/App_Automator haiku/trunk/data/artwork/icons/App_CD-Burner haiku/trunk/data/artwork/icons/App_Fortune haiku/trunk/data/artwork/icons/File_Addon haiku/trunk/data/artwork/icons/File_Chart haiku/trunk/data/artwork/icons/File_Spool haiku/trunk/data/artwork/icons/File_Task haiku/trunk/data/artwork/icons/Server_MediaServer haiku/trunk/data/artwork/icons/Server_Registrar Log: zuMi has been at it again and contributed 9 great looking icons! Added: haiku/trunk/data/artwork/icons/App_Automator =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_Automator ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/App_CD-Burner =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_CD-Burner ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/App_Fortune =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_Fortune ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Addon =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Addon ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Chart =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Chart ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Spool =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Spool ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Task =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Task ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/Server_MediaServer =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_MediaServer ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/Server_Registrar =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_Registrar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From revol at free.fr Wed Oct 1 13:31:13 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 01 Oct 2008 13:31:13 +0200 CEST Subject: [Haiku-commits] r27814 - haiku/trunk/data/artwork/icons In-Reply-To: <200810011038.m91AcQdn018089@sheep.berlios.de> Message-ID: <1482561865-BeMail@laptop> Nice... > haiku/trunk/data/artwork/icons/App_Automator Ohhh Bender's cousin! > haiku/trunk/data/artwork/icons/App_Fortune .. oh, took me some time to figure it was a cookie ;) > haiku/trunk/data/artwork/icons/File_Addon Hmm that one looks like a pill on first look, but then it appears as a long light bulb... and some bad minded ppl could take it as something else :D > haiku/trunk/data/artwork/icons/File_Task Now I need an app for that one :) > haiku/trunk/data/artwork/icons/Server_MediaServer Funny :D Fran?ois. From stippi at mail.berlios.de Wed Oct 1 13:29:11 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 13:29:11 +0200 Subject: [Haiku-commits] r27815 - in haiku/trunk: data/artwork/icons src/servers/media Message-ID: <200810011129.m91BTBWP002712@sheep.berlios.de> Author: stippi Date: 2008-10-01 13:29:02 +0200 (Wed, 01 Oct 2008) New Revision: 27815 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27815&view=rev Modified: haiku/trunk/data/artwork/icons/Server_MediaServer haiku/trunk/src/servers/media/media_server.rdef Log: * Tweaked MediaServer icon a bit to improve gradients and make the 16x16 icon a little clearer. * Applied icon to MediaServer rdef. Removed original BeOS icons. Updated copyright years. Modified: haiku/trunk/data/artwork/icons/Server_MediaServer =================================================================== (Binary files differ) Modified: haiku/trunk/src/servers/media/media_server.rdef =================================================================== --- haiku/trunk/src/servers/media/media_server.rdef 2008-10-01 10:38:15 UTC (rev 27814) +++ haiku/trunk/src/servers/media/media_server.rdef 2008-10-01 11:29:02 UTC (rev 27815) @@ -15,59 +15,28 @@ internal = 0, short_info = "media_server", - long_info = "media_server ?2001-2006 Haiku" + long_info = "media_server ?2001-2008 Haiku" }; -resource large_icon array { - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFF" - $"FFFFFFFFFF000000000000000000000000000000FFFF003FD9D9D90000FFFFFF" - $"FFFFFFFF003F3F3F3F3F3F3F3F003F3F3F3F3F3F00003FD9D9D9D9D9D90000FF" - $"FFFFFFFF003FD9D9060506D9D900D9D900D9D9D93F3FAAAAD9D9D9D9D9D98300" - $"FFFFFFFF003FD9041E1E1E050600D900D9D9D9D9D9838383AAAAD9D9D983AA00" - $"FFFFFFFF1100043F3F1E1E1E1E0000D9D9838383833F3FD93F3FAAAA83AAAA00" - $"FFFFFFFFFF110519193F3F1E1E1E0606003F3F3F3FD9D9D9D9D93F3FAAAAAA00" - $"FFFFFFFFFFFF0519D50C193F3F1E1E1E01D9D9D9D9D9D9D9D9D9D9D983AA0111" - $"FFFFFFFFFFFF0519D5600C0A193F3F1601D9D9D9D9D9D93F3FD9D9D9D9AA0017" - $"FFFFFFFFFFFF0519D5606086D515190F030304D9D9D9D93F3FD9D9D9D9830011" - $"FFFFFFFFFFFF0519D5606086D360190F041B1B0403D9D9D9D9D9D9D983AA0111" - $"FFFFFFFFFFFF0519D3868686236019033F3F1B1B1B04D9D9D9D9D983AA001111" - $"FFFFFFFFFFFF0019191D3FD3D36019041A143F3F0F04D9D9D9D983AA001111FF" - $"FFFFFFFFFF001E020219193F3F6019041A040D1A0F04D9D9D983AA001111FFFF" - $"FFFFFFFF003FD983830202191A2019031A0E041A0F03D9D983AA001111FFFFFF" - $"FFFFFF003FD98383001ED90202192A041A1A151A0F04AA83AA001111FFFFFFFF" - $"FFFF003FD98383031ED9D983830205041B1A1A2B0F04AAAA001111FFFFFFFFFF" - $"FF003FD98383003FD9D98383003FD9D903041A1A04AAAA001111FFFFFFFFFFFF" - $"003FD98383003FD9D98383003FD9D98383000404AAAA001111FFFFFFFFFFFFFF" - $"00D98383003FD9D98383003FD9D98383003FD98383001111FFFFFFFFFFFFFFFF" - $"FF0000003FD9D98383003FD9D98383003FD98383001111FFFFFFFFFFFFFFFFFF" - $"FFFF003FD9D98383003FD9D98383003FD98383001111FFFFFFFFFFFFFFFFFFFF" - $"FFFF00D9838306003FD9D98383003FD98383001111FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFF0000001000D9D98383003FD98383001111FFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFF000000003FD98300001111FFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFF000000111111FFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" +resource vector_icon array { + $"6E6369660B05000101000076020006023AC9B53B88C3BF23F83E7A324B0BD547" + $"BD8C00F1C347FFD29A05020006023C2878301736B3DFE53FFFE148FB39C79B72" + $"00FFF0C7FFFFD35B020006023AEF3E36E9EBBA54C63E59094AE57F48CDF30089" + $"6402FFBF8C000101000088020006023A17213AF009BF42543E51B04AF82546F6" + $"0900FF0606FFC605050200060E39800000000000000040000048800042000015" + $"C7BA91159B8E60399B8E603AC7BA915BC7BA915B9B8E607E9B8E607EC7BA91A2" + $"C7BA91A29B8E60C69B8E60C6C7BA91EAC7BA91EB9B8E60020106023400000000" + $"000000003880004AF0004AA00000CCDAE5FF5B6B750201060236D51136440DB4" + $"7FAF351F9C4AD8054A4B8600F8FCFFFF8491990201060239356E37FF7FB5393E" + $"3696514B648A4B0CD200FFDCACFF7848030A0A0B465C505CC7E7C8A359565754" + $"5B4E544B2D4B2D5031503B550A0E3526243024332634264D2A4F2C4C3B533E59" + $"445C524E5236543454310A0A443E243024332634264D2A4F2C4C3B533E59445C" + $"0A04243035265431443E0A06443E445C524E5236543454310607FE1F3D4F3D4B" + $"3D4B3D4A3A463D473745343F39412F3D2E4130422C402B432B422B434708024F" + $"464F4E08024D454F46080253505B5408032635444353370E0A01010010011584" + $"00040A0001011001178400040A020102000A030103000A040104000A07010500" + $"0A0601051001178200040A0001061001178622040A0001071001178622040A08" + $"01061001178222040A0901071001178222040A0001081001178822040A0A0108" + $"1001178422040A050109100117820004" }; -resource mini_icon array { - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFF04FFFFFFFF0000FFFFFF" - $"FFFFFF0001000400000000D9D90000FF" - $"FFFF00041C14048304D9D9AAAAD98300" - $"FFFF003F3F1E1E060483833F3FAAAA00" - $"FFFF001986183F3F17D9D9D9D9D9AA00" - $"FFFF0018ADAC191A0B0504D93FD98301" - $"FFFF0019ACAD231C0A3F1B0505830011" - $"FFFF00001860861C07133F0F050011FF" - $"FF00D983040022C4080A120F0411FFFF" - $"00D98300D98300000B11820F04FFFFFF" - $"008300D98300D90004041105FFFFFFFF" - $"FF00D98300D900D9830000FFFFFFFFFF" - $"FFFF0000000000000011FFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" -}; From bonefish at mail.berlios.de Wed Oct 1 13:56:45 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 13:56:45 +0200 Subject: [Haiku-commits] r27816 - in haiku/trunk: build/config_headers headers/private/kernel src/system/kernel/cache Message-ID: <200810011156.m91BujIU010314@sheep.berlios.de> Author: bonefish Date: 2008-10-01 13:56:44 +0200 (Wed, 01 Oct 2008) New Revision: 27816 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27816&view=rev Added: haiku/trunk/build/config_headers/kernel_debug_config.h Modified: haiku/trunk/headers/private/kernel/debug.h haiku/trunk/src/system/kernel/cache/block_cache.cpp Log: Created a central place for putting kernel debug enabling macros. Currently it only contains KDEBUG and the block cache debugging macros. Added: haiku/trunk/build/config_headers/kernel_debug_config.h =================================================================== --- haiku/trunk/build/config_headers/kernel_debug_config.h 2008-10-01 11:29:02 UTC (rev 27815) +++ haiku/trunk/build/config_headers/kernel_debug_config.h 2008-10-01 11:56:44 UTC (rev 27816) @@ -0,0 +1,22 @@ +#ifndef KERNEL_DEBUG_CONFIG_H +#define KERNEL_DEBUG_CONFIG_H + + +// general kernel debugging + +// Enables kernel ASSERT()s and various checks, locking primitives aren't +// benaphore-style. +#define KDEBUG 1 + + +// block cache + +// Enables debugger commands. +#define DEBUG_BLOCK_CACHE + +// Enables checks that non-dirty blocks really aren't changed. Seriously +// degrades performance when the block cache is used heavily. +#define BLOCK_CACHE_DEBUG_CHANGED + + +#endif // KERNEL_DEBUG_CONFIG_H Modified: haiku/trunk/headers/private/kernel/debug.h =================================================================== --- haiku/trunk/headers/private/kernel/debug.h 2008-10-01 11:29:02 UTC (rev 27815) +++ haiku/trunk/headers/private/kernel/debug.h 2008-10-01 11:56:44 UTC (rev 27816) @@ -8,13 +8,12 @@ #ifndef _KERNEL_DEBUG_H #define _KERNEL_DEBUG_H +#include "kernel_debug_config.h" #include #include -#define KDEBUG 1 - #if DEBUG /* * The kernel debug level. Modified: haiku/trunk/src/system/kernel/cache/block_cache.cpp =================================================================== --- haiku/trunk/src/system/kernel/cache/block_cache.cpp 2008-10-01 11:29:02 UTC (rev 27815) +++ haiku/trunk/src/system/kernel/cache/block_cache.cpp 2008-10-01 11:56:44 UTC (rev 27816) @@ -25,7 +25,9 @@ #include #include +#include "kernel_debug_config.h" + // TODO: this is a naive but growing implementation to test the API: // 1) block reading/writing is not at all optimized for speed, it will // just read and write single blocks. @@ -41,9 +43,6 @@ # define TRACE(x) ; #endif -#define DEBUG_BLOCK_CACHE -#define DEBUG_CHANGED - // This macro is used for fatal situations that are acceptable in a running // system, like out of memory situations - should only panic for debugging. #define FATAL(x) panic x @@ -66,7 +65,7 @@ void *current_data; void *original_data; void *parent_data; -#ifdef DEBUG_CHANGED +#ifdef BLOCK_CACHE_DEBUG_CHANGED void *compare; #endif int32 ref_count; @@ -838,7 +837,7 @@ block->block_number, block->original_data, block->parent_data); } -#ifdef DEBUG_CHANGED +#ifdef BLOCK_CACHE_DEBUG_CHANGED Free(block->compare); #endif @@ -910,7 +909,7 @@ block->parent_data = NULL; block->is_dirty = false; block->unused = false; -#ifdef DEBUG_CHANGED +#ifdef BLOCK_CACHE_DEBUG_CHANGED block->compare = NULL; #endif @@ -1001,7 +1000,7 @@ static void put_cached_block(block_cache *cache, cached_block *block) { -#ifdef DEBUG_CHANGED +#ifdef BLOCK_CACHE_DEBUG_CHANGED if (!block->is_dirty && block->compare != NULL && memcmp(block->current_data, block->compare, cache->block_size)) { dprintf("new block:\n"); @@ -2527,7 +2526,7 @@ if (block == NULL) return NULL; -#ifdef DEBUG_CHANGED +#ifdef BLOCK_CACHE_DEBUG_CHANGED if (block->compare == NULL) block->compare = cache->Allocate(); if (block->compare != NULL) From bonefish at mail.berlios.de Wed Oct 1 13:57:42 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 13:57:42 +0200 Subject: [Haiku-commits] r27817 - haiku/trunk/src/bin/debug/profile Message-ID: <200810011157.m91BvgOC010427@sheep.berlios.de> Author: bonefish Date: 2008-10-01 13:57:42 +0200 (Wed, 01 Oct 2008) New Revision: 27817 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27817&view=rev Modified: haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp Log: Callgrind output: Added the missing time costs in the "summary" line. Also added the missing "totals" line. Modified: haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp =================================================================== --- haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp 2008-10-01 11:56:44 UTC (rev 27816) +++ haiku/trunk/src/bin/debug/profile/CallgrindThreadProfileResult.cpp 2008-10-01 11:57:42 UTC (rev 27817) @@ -189,7 +189,7 @@ fprintf(out, "positions: line\n"); fprintf(out, "events: Ticks Time\n"); - fprintf(out, "summary: %lld\n", fTotalTicks); + fprintf(out, "summary: %lld %lld\n", fTotalTicks, fTotalTicks * fInterval); // get hit images CallgrindThreadImage* images[fOldImages.Size() + fImages.Size()]; @@ -237,6 +237,8 @@ } } + fprintf(out, "\ntotals: %lld %lld\n", fTotalTicks, fTotalTicks * fInterval); + fclose(out); } From mmu_man at mail.berlios.de Wed Oct 1 14:23:28 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 14:23:28 +0200 Subject: [Haiku-commits] r27818 - haiku/trunk/data/artwork/icons Message-ID: <200810011223.m91CNSkW012879@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 14:23:28 +0200 (Wed, 01 Oct 2008) New Revision: 27818 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27818&view=rev Added: haiku/trunk/data/artwork/icons/Misc_Hand Log: Unfinished Hand icon for use on servers maybe... modeled after the bitmap one. Would need some bezier and 3dization, stippi ? Added: haiku/trunk/data/artwork/icons/Misc_Hand =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Misc_Hand ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From revol at free.fr Wed Oct 1 14:29:40 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 01 Oct 2008 14:29:40 +0200 CEST Subject: [Haiku-commits] r27818 - haiku/trunk/data/artwork/icons In-Reply-To: <200810011223.m91CNSkW012879@sheep.berlios.de> Message-ID: <4989679872-BeMail@laptop> > Author: mmu_man > Date: 2008-10-01 14:23:28 +0200 (Wed, 01 Oct 2008) > New Revision: 27818 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27818&view=rev > > Added: > haiku/trunk/data/artwork/icons/Misc_Hand > Log: > Unfinished Hand icon for use on servers maybe... > modeled after the bitmap one. Would need some bezier and 3dization, > stippi ? Reference bitmap: http://revolf.free.fr/beos/hand.png Fran?ois. From stefano.ceccherini at gmail.com Wed Oct 1 14:26:44 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Wed, 1 Oct 2008 14:26:44 +0200 Subject: [Haiku-commits] r27818 - haiku/trunk/data/artwork/icons In-Reply-To: <200810011223.m91CNSkW012879@sheep.berlios.de> References: <200810011223.m91CNSkW012879@sheep.berlios.de> Message-ID: <894b9700810010526y5d975afas33a13f25d4bb2ebb@mail.gmail.com> 2008/10/1 mmu_man at BerliOS : > Author: mmu_man > Date: 2008-10-01 14:23:28 +0200 (Wed, 01 Oct 2008) > New Revision: 27818 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27818&view=rev > > Added: > haiku/trunk/data/artwork/icons/Misc_Hand > Log: > Unfinished Hand icon for use on servers maybe... modeled after the bitmap one. Would need some bezier and 3dization, stippi ? > Anyone up for changing the replicant "handle" ? From jackburton at mail.berlios.de Wed Oct 1 14:33:06 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Wed, 1 Oct 2008 14:33:06 +0200 Subject: [Haiku-commits] r27819 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810011233.m91CX6iL013605@sheep.berlios.de> Author: jackburton Date: 2008-10-01 14:33:04 +0200 (Wed, 01 Oct 2008) New Revision: 27819 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27819&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c Log: Added optional debug code for the acpi busmanager. Removed code for compiling the module on beos/dano/zeta Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c 2008-10-01 12:23:28 UTC (rev 27818) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c 2008-10-01 12:33:04 UTC (rev 27819) @@ -22,7 +22,13 @@ #include "acpixf.h" #include "acpi_priv.h" +//#define TRACE_ACPI_BUS +#ifdef TRACE_ACPI_BUS #define TRACE(x...) dprintf("acpi: " x) +#else +#define TRACE(x...) +#endif + #define ERROR(x...) dprintf("acpi: " x) @@ -40,6 +46,8 @@ ACPI_STATUS status; ACPI_BUFFER buffer; + TRACE("get_device_by_hid_callback %p, %ld, %p\n", object, depth, context); + *_returnValue = NULL; if (counter[0] == counter[1]) { @@ -97,25 +105,7 @@ return ENOSYS; } -#ifndef __HAIKU__ - { - // Once upon a time, there was no module(s) dependency(ies) automatic loading feature. - // Let's do it the old way - status_t status; - status = get_module(B_DPC_MODULE_NAME, (module_info **)&gDPC); - if (status != B_OK) - return status; - - status = get_module(B_PCI_MODULE_NAME, - (module_info **)&gPCIManager); - if (status != B_OK) { - put_module(B_DPC_MODULE_NAME); - return status; - } - } -#endif - if (gDPC->new_dpc_queue(&gDPCHandle, "acpi_task", B_NORMAL_PRIORITY) != B_OK) { ERROR("AcpiInitializeSubsystem failed (new_dpc_queue() failed!)\n"); goto err; @@ -159,10 +149,6 @@ return B_OK; err: -#ifndef __HAIKU__ - put_module(B_DPC_MODULE_NAME); - put_module(B_PCI_MODULE_NAME); -#endif return B_ERROR; } @@ -177,12 +163,6 @@ gDPCHandle = NULL; } -#ifndef __HAIKU__ - // Once upon a time, there was no module(s) dependency(ies) automatic UNloading feature. - // Let's do it the old way - put_module(B_DPC_MODULE_NAME); - put_module(B_PCI_MODULE_NAME); -#endif break; } @@ -248,6 +228,8 @@ ACPI_BUFFER buffer; ACPI_STATUS status; + TRACE("get_next_entry %ld, %s\n", objectType, base); + if (base == NULL || !strcmp(base, "\\")) { parent = ACPI_ROOT_OBJECT; } else { @@ -281,6 +263,7 @@ uint32 counter[2] = {index, 0}; char *buffer = NULL; + TRACE("get_device %s, index %ld\n", hid, index); status = AcpiGetDevices((char*)hid, (void*)&get_device_by_hid_callback, counter, (void**)&buffer); if (status != AE_OK || buffer == NULL) @@ -299,6 +282,7 @@ ACPI_OBJECT info; ACPI_BUFFER infoBuffer; + TRACE("get_device_hid: path %s, hid %s\n", path, hid); if (AcpiGetHandle(NULL, (char*)path, &handle) != AE_OK) return B_ENTRY_NOT_FOUND; @@ -432,6 +416,8 @@ { ACPI_STATUS status; + TRACE("prepare_sleep_state %d, %p, %ld\n", state, wakeFunc, size); + if (state != ACPI_POWER_STATE_OFF) { physical_entry wakeVector; @@ -456,6 +442,8 @@ { ACPI_STATUS status; + TRACE("enter_sleep_state %d\n", state); + status = AcpiEnterSleepState(state); if (status != AE_OK) return B_ERROR; From jackburton at mail.berlios.de Wed Oct 1 14:40:01 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Wed, 1 Oct 2008 14:40:01 +0200 Subject: [Haiku-commits] r27820 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810011240.m91Ce1AC014407@sheep.berlios.de> Author: jackburton Date: 2008-10-01 14:39:59 +0200 (Wed, 01 Oct 2008) New Revision: 27820 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27820&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_device.c Log: sprintf -> snprintf. malloc.h ain't no standard header. Removed non-haiku code Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_device.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_device.c 2008-10-01 12:33:04 UTC (rev 27819) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_device.c 2008-10-01 12:39:59 UTC (rev 27820) @@ -4,9 +4,9 @@ * Distributed under the terms of the MIT License. */ -#include #include #include +#include #include "acpi_priv.h" @@ -30,7 +30,7 @@ acpi_get_object(acpi_device device, const char *path, acpi_object_type **return_value) { char objname[255]; - sprintf(objname, "%s.%s", device->path, path); + snprintf(objname, sizeof(objname), "%s.%s", device->path, path); return get_object(objname, return_value); } @@ -66,14 +66,8 @@ device->type = type; device->node = node; -#ifdef __HAIKU__ snprintf(device->name, sizeof(device->name), "acpi_device %s", path); -#else - strncpy(device->name, "acpi_device ", sizeof(device->name) - 1); - strncat(device->name, path, sizeof(device->name) - 1); - device->name[sizeof(device->name) - 1] = '\0'; -#endif *cookie = device; From mmu_man at mail.berlios.de Wed Oct 1 14:51:09 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 14:51:09 +0200 Subject: [Haiku-commits] r27821 - haiku/trunk/data/artwork/icons Message-ID: <200810011251.m91Cp9VH015972@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 14:51:08 +0200 (Wed, 01 Oct 2008) New Revision: 27821 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27821&view=rev Added: haiku/trunk/data/artwork/icons/Misc_Dragger Log: First try at a dragging hand (for replicant handle maybe ?). Added: haiku/trunk/data/artwork/icons/Misc_Dragger =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Misc_Dragger ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From revol at free.fr Wed Oct 1 14:55:01 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 01 Oct 2008 14:55:01 +0200 CEST Subject: [Haiku-commits] r27818 - haiku/trunk/data/artwork/icons In-Reply-To: <894b9700810010526y5d975afas33a13f25d4bb2ebb@mail.gmail.com> Message-ID: <6510225296-BeMail@laptop> > > Unfinished Hand icon for use on servers maybe... modeled after the > > bitmap one. Would need some bezier and 3dization, stippi ? > > > > Anyone up for changing the replicant "handle" ? Like this ? Added: haiku/trunk/data/artwork/icons/Misc_Dragger From stefano.ceccherini at gmail.com Wed Oct 1 14:52:26 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Wed, 1 Oct 2008 14:52:26 +0200 Subject: [Haiku-commits] r27821 - haiku/trunk/data/artwork/icons In-Reply-To: <200810011251.m91Cp9VH015972@sheep.berlios.de> References: <200810011251.m91Cp9VH015972@sheep.berlios.de> Message-ID: <894b9700810010552y6e60a840lfd4172b739d47758@mail.gmail.com> 2008/10/1 mmu_man at BerliOS : > Author: mmu_man > Date: 2008-10-01 14:51:08 +0200 (Wed, 01 Oct 2008) > New Revision: 27821 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27821&view=rev > > Added: > haiku/trunk/data/artwork/icons/Misc_Dragger > Log: > First try at a dragging hand (for replicant handle maybe ?). > The bitmap for it is hardcoded in the source file src/kits/interface/Dragger.cpp, btw. From stippi at mail.berlios.de Wed Oct 1 16:00:15 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 16:00:15 +0200 Subject: [Haiku-commits] r27822 - haiku/trunk/src/bin Message-ID: <200810011400.m91E0FwM025044@sheep.berlios.de> Author: stippi Date: 2008-10-01 16:00:07 +0200 (Wed, 01 Oct 2008) New Revision: 27822 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27822&view=rev Modified: haiku/trunk/src/bin/open.cpp Log: * MimeType.h is not a BeOS header. * Honor 80 char/line limit. Modified: haiku/trunk/src/bin/open.cpp =================================================================== --- haiku/trunk/src/bin/open.cpp 2008-10-01 12:51:08 UTC (rev 27821) +++ haiku/trunk/src/bin/open.cpp 2008-10-01 14:00:07 UTC (rev 27822) @@ -1,7 +1,7 @@ /* - * Copyright 2003-2007, Axel D?rfler, axeld at pinc-software.de. All rights reserved. + * Copyright 2003-2007, Axel D?rfler, axeld at pinc-software.de. * Copyright 2005-2007, Fran?ois Revol, revol at free.fr. - * Distributed under the terms of the MIT License. + * All rights reserved. Distributed under the terms of the MIT License. */ /*! Launches an application/document from the shell */ @@ -9,7 +9,11 @@ #include #include -#include +#ifdef __HAIKU__ +# include +#else +# include +#endif #include #include @@ -56,8 +60,10 @@ if (strrchr(progName, '/')) progName = strrchr(progName, '/') + 1; - if (argc < 2) - fprintf(stderr,"usage: %s ...\n", progName); + if (argc < 2) { + fprintf(stderr,"usage: %s ...\n", progName); + } while (*++argv) { status_t status = B_OK; @@ -93,7 +99,8 @@ // if not there is likely no supporting app anyway if (BMimeType::IsValid(mimeType.String())) { char *args[2] = { *argv, NULL }; - status = be_roster->Launch(openWith ? openWith : mimeType.String(), 1, args); + status = be_roster->Launch(openWith ? openWith + : mimeType.String(), 1, args); if (status == B_OK) continue; } @@ -130,7 +137,8 @@ status = B_ENTRY_NOT_FOUND; if (status != B_OK && status != B_ALREADY_RUNNING) { - fprintf(stderr, "%s: \"%s\": %s\n", progName, *argv, strerror(status)); + fprintf(stderr, "%s: \"%s\": %s\n", progName, *argv, + strerror(status)); // make sure the shell knows this exitcode = EXIT_FAILURE; } From stippi at mail.berlios.de Wed Oct 1 16:03:33 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 16:03:33 +0200 Subject: [Haiku-commits] r27823 - haiku/trunk/src/bin Message-ID: <200810011403.m91E3XRd025664@sheep.berlios.de> Author: stippi Date: 2008-10-01 16:03:26 +0200 (Wed, 01 Oct 2008) New Revision: 27823 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27823&view=rev Added: haiku/trunk/src/bin/fortune.rdef Modified: haiku/trunk/src/bin/Jamfile Log: Added zuMi's vector icon to fortune command. Not like you would see it easily, but since he made it, fortune will be happier this way and tell more pleasing fortunes. I hope. Modified: haiku/trunk/src/bin/Jamfile =================================================================== --- haiku/trunk/src/bin/Jamfile 2008-10-01 14:00:07 UTC (rev 27822) +++ haiku/trunk/src/bin/Jamfile 2008-10-01 14:03:26 UTC (rev 27823) @@ -10,7 +10,10 @@ ResComp $(haiku-utils_rsrc) : [ FGristFiles haiku-utils.rdef ] ; +AddResources fortune : fortune.rdef ; AddResources hey : hey.rdef ; +AddResources mimeset : mimeset.rdef ; +AddResources urlwrapper : urlwrapper.rdef ; # standard commands that don't need any additional library StdBinCommands @@ -68,9 +71,6 @@ tput.c : libtermcap.a : $(haiku-utils_rsrc) ; -AddResources mimeset : mimeset.rdef ; -AddResources urlwrapper : urlwrapper.rdef ; - # standard commands that need libbe.so StdBinCommands alert.cpp Added: haiku/trunk/src/bin/fortune.rdef =================================================================== --- haiku/trunk/src/bin/fortune.rdef 2008-10-01 14:00:07 UTC (rev 27822) +++ haiku/trunk/src/bin/fortune.rdef 2008-10-01 14:03:26 UTC (rev 27823) @@ -0,0 +1,27 @@ +resource app_signature "application/x-vnd.haiku.fortune"; + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_version { + major = 1, + middle = 0, + minor = 0, + variety = B_APPV_FINAL, + internal = 0, + short_info = "Haiku Fortune", + long_info = "Haiku Fortune ?2002-2008 Haiku, Inc." +}; + +resource vector_icon array { + $"6E63696606040069050002010603BDDB573B282137F4053A6A394A27FA489B9D" + $"00FFF7DCB0F0CE5AFFE0B212020106033C69483CD8293A88B3BA25EC4A3F8D48" + $"944400FFF7DCAEF0CE5AFFE0B21102010602398765352D3F374964BBA6A94B40" + $"D84AF22957B6BCBFA6F3FBFF0200060236CCC93B2FA6BD2C9E38CA1E4BC63A4A" + $"641E00C09605FF876A03070204C6ED5A505A565A5C50CAE55A5C4A524456444E" + $"44C3BD4EC3BF464A5606032B2E462E46364A40483A4000033E443E443848B566" + $"442E482838443238304432000344324432C6E4BB18C6ED5A5E4848563E3E3E4A" + $"3E3E0203414A414A3F463E3E3E423E42404B3E47404B0404BE544A5C4C584A5C" + $"4CCA1D585A5656565454020352585258C7B950C6213A5644C88540C6ED585850" + $"C6ED58080A000200011001178400040A010202031001178400040A020102000A" + $"030103000A0101051001178400040A040105000A010104000A05010600" +}; From ingo_weinhold at gmx.de Wed Oct 1 16:23:06 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 01 Oct 2008 16:23:06 +0200 Subject: [Haiku-commits] r27822 - haiku/trunk/src/bin In-Reply-To: <200810011400.m91E0FwM025044@sheep.berlios.de> References: <200810011400.m91E0FwM025044@sheep.berlios.de> Message-ID: <20081001162306.356.1@knochen-vm.localdomain> On 2008-10-01 at 16:00:15 [+0200], stippi at mail.berlios.de wrote: > Author: stippi > Date: 2008-10-01 16:00:07 +0200 (Wed, 01 Oct 2008) > New Revision: 27822 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27822&view=rev > > Modified: > haiku/trunk/src/bin/open.cpp > Log: > * MimeType.h is not a BeOS header. But is also a Haiku header. CU, Ingo From stippi at mail.berlios.de Wed Oct 1 16:23:26 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 16:23:26 +0200 Subject: [Haiku-commits] r27824 - in haiku/trunk: data/artwork/icons src/servers/registrar Message-ID: <200810011423.m91ENQSf028091@sheep.berlios.de> Author: stippi Date: 2008-10-01 16:23:22 +0200 (Wed, 01 Oct 2008) New Revision: 27824 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27824&view=rev Modified: haiku/trunk/data/artwork/icons/Server_Registrar haiku/trunk/src/servers/registrar/registrar.rdef Log: * Tweaked registrar icon to make 16x16 version slightly clearer. * Added icon to the registrar. * Updated copyright years in version info. Modified: haiku/trunk/data/artwork/icons/Server_Registrar =================================================================== (Binary files differ) Modified: haiku/trunk/src/servers/registrar/registrar.rdef =================================================================== --- haiku/trunk/src/servers/registrar/registrar.rdef 2008-10-01 14:03:26 UTC (rev 27823) +++ haiku/trunk/src/servers/registrar/registrar.rdef 2008-10-01 14:23:22 UTC (rev 27824) @@ -19,9 +19,26 @@ internal = 0, short_info = "registrar", - long_info = "registrar ?2005-2006 Haiku Inc." + long_info = "registrar ?2005-2008 Haiku Inc." }; +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon array { + $"6E6369660704006B0500020006023BB8A43D8642BF898E3DBC1F4BAE5447805C" + $"00E3AD00FFBC8F05020106023D66A73B07B6B9BEF73C1A2B48379549C4DE3D76" + $"9564FF536E4402000602B898C93319083A5C163FF4CC4AB5EA4451BB00B58A00" + $"FF8565030200060236EEF83B80F5BF3E743AB74A4B669742DBD600FFEFC0FFFF" + $"DE7C05FF0D0A044D5B585B59594D530A0626484C5B4E594E32282626270A0426" + $"484C5B4C3426270A0448542A452A2C48370A042C442C2D2A2C2A450A044C5B4E" + $"594E324C340A04282626274C344E320A042A45485448512C4408023133313C08" + $"023534353E08023936394008023D373D4208022E344040090A00010010011584" + $"00040A0101011001178400040A020102000A030103000A040104000A04010500" + $"0A050106000A050107000A06050C0B0A0908100117820004" +}; + +#else + resource large_icon array { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -75,3 +92,5 @@ $"FFFF0000000000000011FFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; + +#endif // HAIKU_TARGET_PLATFORM_HAIKU From bonefish at mail.berlios.de Wed Oct 1 16:26:08 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 16:26:08 +0200 Subject: [Haiku-commits] r27825 - haiku/trunk/build/jam Message-ID: <200810011426.m91EQ86r028313@sheep.berlios.de> Author: bonefish Date: 2008-10-01 16:26:08 +0200 (Wed, 01 Oct 2008) New Revision: 27825 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27825&view=rev Modified: haiku/trunk/build/jam/MainBuildRules Log: * Missing config header directories in the CreateAsmStructOffsetsHeader rule. * Automatic whitespace cleanup. Modified: haiku/trunk/build/jam/MainBuildRules =================================================================== --- haiku/trunk/build/jam/MainBuildRules 2008-10-01 14:23:22 UTC (rev 27824) +++ haiku/trunk/build/jam/MainBuildRules 2008-10-01 14:26:08 UTC (rev 27825) @@ -230,25 +230,26 @@ local includesSeparator ; local localIncludesOption ; local systemIncludesOption ; - + on $(header) { # use on $(1) variable values if ! $(PLATFORM) in $(SUPPORTED_PLATFORMS) { return ; } # headers and defines - headers = $(SEARCH_SOURCE) $(SUBDIRHDRS) $(HDRS) ; + headers = $(HAIKU_CONFIG_HEADERS) $(SEARCH_SOURCE) $(SUBDIRHDRS) + $(HDRS) ; sysHeaders = $(SUBDIRSYSHDRS) $(SYSHDRS) ; defines = $(DEFINES) ; if $(PLATFORM) = host { sysHeaders += $(HOST_HDRS) ; defines += $(HOST_DEFINES) ; - + if $(USES_BE_API) { sysHeaders += $(HOST_BE_API_HEADERS) ; } - + } else { sysHeaders += $(TARGET_HDRS) ; defines += $(TARGET_DEFINES) ; @@ -260,23 +261,23 @@ } else { flags += -O0 ; } - + if $(PLATFORM) = host { # warning flags if $(WARNINGS) != 0 { flags += $(HOST_WARNING_C++FLAGS) ; } - + # debug and other flags flags += $(HOST_C++FLAGS) $(HOST_DEBUG_$(DEBUG)_C++FLAGS) $(SUBDIRC++FLAGS) $(C++FLAGS) ; - + if $(USES_BE_API) { flags += $(HOST_BE_API_C++FLAGS) ; } - + C++ on $(header) = $(HOST_C++) ; - + includesSeparator = $(HOST_INCLUDES_SEPARATOR) ; localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ; systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ; @@ -286,11 +287,11 @@ if $(WARNINGS) != 0 { flags += $(TARGET_WARNING_C++FLAGS) ; } - + # debug and other flags flags += $(TARGET_C++FLAGS) $(TARGET_DEBUG_$(DEBUG)_C++FLAGS) $(SUBDIRC++FLAGS) $(C++FLAGS) ; - + C++ on $(header) = $(TARGET_C++) ; includesSeparator = $(TARGET_INCLUDES_SEPARATOR) ; From mmu_man at mail.berlios.de Wed Oct 1 16:30:18 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 1 Oct 2008 16:30:18 +0200 Subject: [Haiku-commits] r27826 - haiku/trunk/build/jam Message-ID: <200810011430.m91EUIhG028718@sheep.berlios.de> Author: mmu_man Date: 2008-10-01 16:30:18 +0200 (Wed, 01 Oct 2008) New Revision: 27826 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27826&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: NFS addon does build fine here, add to the image. Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-01 14:26:08 UTC (rev 27825) +++ haiku/trunk/build/jam/HaikuImage 2008-10-01 14:30:18 UTC (rev 27826) @@ -140,8 +140,8 @@ BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi config_manager agp_gart usb firewire #acpi ; -BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 $(GPL_ONLY)reiserfs ; -#googlefs nfs $(GPL_ONLY)ntfs ; +BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs $(GPL_ONLY)reiserfs ; +#googlefs $(GPL_ONLY)ntfs ; # modules From bonefish at mail.berlios.de Wed Oct 1 16:33:12 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 16:33:12 +0200 Subject: [Haiku-commits] r27827 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/x86 Message-ID: <200810011433.m91EXCgv029075@sheep.berlios.de> Author: bonefish Date: 2008-10-01 16:33:10 +0200 (Wed, 01 Oct 2008) New Revision: 27827 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27827&view=rev Modified: haiku/trunk/headers/private/kernel/arch/int.h haiku/trunk/headers/private/kernel/arch/x86/arch_int.h haiku/trunk/headers/private/kernel/int.h haiku/trunk/src/system/kernel/arch/x86/arch_int.c haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp haiku/trunk/src/system/kernel/int.c Log: Fully inline {disable,restore}_interrupts() and friends when including . Performance-wise not really significant, but gives nicer profiling results. Modified: haiku/trunk/headers/private/kernel/arch/int.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/int.h 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/headers/private/kernel/arch/int.h 2008-10-01 14:33:10 UTC (rev 27827) @@ -8,7 +8,6 @@ #ifndef KERNEL_ARCH_INT_H #define KERNEL_ARCH_INT_H -#include // config flags for arch_int_configure_io_interrupt() #define B_EDGE_TRIGGERED 1 @@ -38,4 +37,8 @@ } #endif + +#include + + #endif /* KERNEL_ARCH_INT_H */ Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_int.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/x86/arch_int.h 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/headers/private/kernel/arch/x86/arch_int.h 2008-10-01 14:33:10 UTC (rev 27827) @@ -10,4 +10,58 @@ #define NUM_IO_VECTORS (256 - ARCH_INTERRUPT_BASE) +static inline void +arch_int_enable_interrupts_inline(void) +{ + asm volatile("sti"); +} + + +static inline int +arch_int_disable_interrupts_inline(void) +{ + int flags; + + asm volatile("pushfl;\n" + "popl %0;\n" + "cli" : "=g" (flags)); + return flags & 0x200 ? 1 : 0; +} + + +static inline void +arch_int_restore_interrupts_inline(int oldstate) +{ + int flags = oldstate ? 0x200 : 0; + + asm volatile("pushfl;\n" + "popl %1;\n" + "andl $0xfffffdff,%1;\n" + "orl %0,%1;\n" + "pushl %1;\n" + "popfl\n" + : : "r" (flags), "r" (0)); +} + + +static inline bool +arch_int_are_interrupts_enabled_inline(void) +{ + int flags; + + asm volatile("pushfl;\n" + "popl %0;\n" : "=g" (flags)); + return flags & 0x200 ? 1 : 0; +} + + +// map the functions to the inline versions +#define arch_int_enable_interrupts() arch_int_enable_interrupts_inline() +#define arch_int_disable_interrupts() arch_int_disable_interrupts_inline() +#define arch_int_restore_interrupts(status) \ + arch_int_restore_interrupts_inline(status) +#define arch_int_are_interrupts_enabled() \ + arch_int_are_interrupts_enabled_inline() + + #endif /* _KERNEL_ARCH_x86_INT_H */ Modified: haiku/trunk/headers/private/kernel/int.h =================================================================== --- haiku/trunk/headers/private/kernel/int.h 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/headers/private/kernel/int.h 2008-10-01 14:33:10 UTC (rev 27827) @@ -42,4 +42,10 @@ } #endif + +// map those directly to the arch versions, so they can be inlined +#define disable_interrupts() arch_int_disable_interrupts() +#define restore_interrupts(status) arch_int_restore_interrupts(status) + + #endif /* _KERNEL_INT_H */ Modified: haiku/trunk/src/system/kernel/arch/x86/arch_int.c =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_int.c 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/src/system/kernel/arch/x86/arch_int.c 2008-10-01 14:33:10 UTC (rev 27827) @@ -645,48 +645,37 @@ } +#undef arch_int_enable_interrupts +#undef arch_int_disable_interrupts +#undef arch_int_restore_interrupts +#undef arch_int_are_interrupts_enabled + + void arch_int_enable_interrupts(void) { - asm("sti"); + arch_int_enable_interrupts_inline(); } int arch_int_disable_interrupts(void) { - int flags; - - asm("pushfl;\n" - "popl %0;\n" - "cli" : "=g" (flags)); - return flags & 0x200 ? 1 : 0; + return arch_int_disable_interrupts_inline(); } void arch_int_restore_interrupts(int oldstate) { - int flags = oldstate ? 0x200 : 0; - - asm("pushfl;\n" - "popl %1;\n" - "andl $0xfffffdff,%1;\n" - "orl %0,%1;\n" - "pushl %1;\n" - "popfl\n" - : : "r" (flags), "r" (0)); + arch_int_restore_interrupts_inline(oldstate); } bool arch_int_are_interrupts_enabled(void) { - int flags; - - asm("pushfl;\n" - "popl %0;\n" : "=g" (flags)); - return flags & 0x200 ? 1 : 0; + return arch_int_are_interrupts_enabled_inline(); } Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-01 14:33:10 UTC (rev 27827) @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include Modified: haiku/trunk/src/system/kernel/int.c =================================================================== --- haiku/trunk/src/system/kernel/int.c 2008-10-01 14:30:18 UTC (rev 27826) +++ haiku/trunk/src/system/kernel/int.c 2008-10-01 14:33:10 UTC (rev 27827) @@ -248,6 +248,10 @@ // #pragma mark - public API +#undef disable_interrupts +#undef restore_interrupts + + cpu_status disable_interrupts(void) { From axeld at mail.berlios.de Wed Oct 1 18:46:01 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Wed, 1 Oct 2008 18:46:01 +0200 Subject: [Haiku-commits] r27830 - haiku/trunk/src/servers/registrar Message-ID: <200810011646.m91Gk15C025005@sheep.berlios.de> Author: axeld Date: 2008-10-01 18:45:59 +0200 (Wed, 01 Oct 2008) New Revision: 27830 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27830&view=rev Modified: haiku/trunk/src/servers/registrar/ShutdownProcess.cpp Log: * Since the "restart"/"shutdown" alert has the inconvenient consequence that the shutdown process is entered (ie. you cannot start new applications anymore), I changed its window feel to normal to make it possible to let it appear on all workspaces. * We should think about if simply letting it enter that phase later isn't the better solution, though. Opinions welcome. * Automatic whitespace cleanup. Modified: haiku/trunk/src/servers/registrar/ShutdownProcess.cpp =================================================================== --- haiku/trunk/src/servers/registrar/ShutdownProcess.cpp 2008-10-01 16:27:15 UTC (rev 27829) +++ haiku/trunk/src/servers/registrar/ShutdownProcess.cpp 2008-10-01 16:45:59 UTC (rev 27830) @@ -123,7 +123,7 @@ : MessageEvent(0, target, MSG_PHASE_TIMED_OUT) { SetAutoDelete(false); - + fMessage.AddInt32("phase", INVALID_PHASE); fMessage.AddInt32("team", -1); } @@ -540,14 +540,14 @@ stripeRect.right = kStripeWidth; SetHighColor(tint_color(ViewColor(), B_DARKEN_1_TINT)); FillRect(stripeRect); - + if (fAppInfo && fAppInfo->largeIcon) { if (fAppInfo->largeIcon->ColorSpace() == B_RGBA32) { SetDrawingMode(B_OP_ALPHA); SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY); } else SetDrawingMode(B_OP_OVER); - + DrawBitmapAsync(fAppInfo->largeIcon, BPoint(kStripeWidth - kIconSize / 2, kIconVSpacing)); } @@ -944,7 +944,7 @@ } } - // add the applications + // add the applications if (fWindow) { BAutolock _(fWorkerLock); _AddShutdownWindowApps(fUserApps); @@ -1248,10 +1248,8 @@ // that is, if an asynchronous BRoster::Shutdown() was requested, we // notify the caller at this point. bool synchronous; - if (fRequest->FindBool("synchronous", &synchronous) == B_OK - && !synchronous) { + if (fRequest->FindBool("synchronous", &synchronous) == B_OK && !synchronous) _SendReply(B_OK); - } // ask the user to confirm the shutdown, if desired bool askUser; @@ -1264,6 +1262,8 @@ BAlert *alert = new BAlert(title, text, "Cancel", buttonText, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); alert->SetShortcut(0, B_ESCAPE); + alert->SetFeel(B_NORMAL_WINDOW_FEEL); + alert->SetWorkspaces(B_ALL_WORKSPACES); int32 result = alert->Go(); if (result != 1) @@ -1404,7 +1404,7 @@ status_t error = _GetNextEvent(event, team, phase, false); if (error != B_OK) throw_error(error); - + if (event == ABORT_EVENT) { PRINT(("ShutdownProcess::_QuitApps(): shutdown cancelled by " "team %ld (-1 => user)\n", team)); @@ -1412,7 +1412,7 @@ _DisplayAbortingApp(team); throw_error(B_SHUTDOWN_CANCELLED); } - + } while (event != NO_EVENT); } @@ -1556,7 +1556,7 @@ // ignore: it's too late to abort the shutdown } - if (event == TIMEOUT_EVENT) + if (event == TIMEOUT_EVENT) return; } } @@ -1794,7 +1794,7 @@ if (event == TIMEOUT_EVENT) break; - // stop waiting when the user hit the cancel button + // stop waiting when the user hit the cancel button if (event == ABORT_EVENT && phase == ABORTED_PHASE && eventTeam < 0) break; From axeld at mail.berlios.de Wed Oct 1 19:05:27 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Wed, 1 Oct 2008 19:05:27 +0200 Subject: [Haiku-commits] r27831 - haiku/trunk/src/system/kernel/cache Message-ID: <200810011705.m91H5Rsg018417@sheep.berlios.de> Author: axeld Date: 2008-10-01 19:05:26 +0200 (Wed, 01 Oct 2008) New Revision: 27831 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27831&view=rev Modified: haiku/trunk/src/system/kernel/cache/block_cache.cpp Log: * I accidently broke get_next_locked_block_cache() in r27074; it would always ignore every other cache (starting from the first). * The consequence of this was that no blocks were written back automatically for those caches, and their transactions were never idle, causing bug #2781. Modified: haiku/trunk/src/system/kernel/cache/block_cache.cpp =================================================================== --- haiku/trunk/src/system/kernel/cache/block_cache.cpp 2008-10-01 16:45:59 UTC (rev 27830) +++ haiku/trunk/src/system/kernel/cache/block_cache.cpp 2008-10-01 17:05:26 UTC (rev 27831) @@ -1596,18 +1596,11 @@ } else cache = sCaches.Head(); - while (cache != NULL) { - cache = sCaches.GetNext(cache); - if (cache == NULL) - break; - + if (cache != NULL) { mutex_lock(&cache->lock); - break; + sCaches.Insert(sCaches.GetNext(cache), (block_cache *)&sMarkCache); } - if (cache != NULL) - sCaches.Insert(sCaches.GetNext(cache), (block_cache *)&sMarkCache); - return cache; } From stippi at mail.berlios.de Wed Oct 1 18:27:17 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 18:27:17 +0200 Subject: [Haiku-commits] r27829 - haiku/trunk/src/bin Message-ID: <200810011627.m91GRHUu006702@sheep.berlios.de> Author: stippi Date: 2008-10-01 18:27:15 +0200 (Wed, 01 Oct 2008) New Revision: 27829 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27829&view=rev Modified: haiku/trunk/src/bin/open.cpp Log: As pointed out by Ingo, Mime.h is also a Haiku header and includes MimeType.h for convenience. Modified: haiku/trunk/src/bin/open.cpp =================================================================== --- haiku/trunk/src/bin/open.cpp 2008-10-01 16:12:21 UTC (rev 27828) +++ haiku/trunk/src/bin/open.cpp 2008-10-01 16:27:15 UTC (rev 27829) @@ -9,11 +9,7 @@ #include #include -#ifdef __HAIKU__ -# include -#else -# include -#endif +#include #include #include From stippi at mail.berlios.de Wed Oct 1 18:12:24 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 18:12:24 +0200 Subject: [Haiku-commits] r27828 - haiku/trunk/src/kits/interface Message-ID: <200810011612.m91GCOLV004955@sheep.berlios.de> Author: stippi Date: 2008-10-01 18:12:21 +0200 (Wed, 01 Oct 2008) New Revision: 27828 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27828&view=rev Modified: haiku/trunk/src/kits/interface/TextView.cpp Log: * As with other controls, for BeOS compatibly behavior, don't shrink a BTextView via GetPreferredSize() if it is large enough. (Have not confirmed this is necessary... gut feeling.) * Calculate a minimum line height even if the BTextView is empty yet. Modified: haiku/trunk/src/kits/interface/TextView.cpp =================================================================== --- haiku/trunk/src/kits/interface/TextView.cpp 2008-10-01 14:33:10 UTC (rev 27827) +++ haiku/trunk/src/kits/interface/TextView.cpp 2008-10-01 16:12:21 UTC (rev 27828) @@ -2549,11 +2549,23 @@ _ValidateLayoutData(); - if (_width) - *_width = fLayoutData->min.width; + if (_width) { + float width = Bounds().Width(); + if (width < fLayoutData->min.width + || (Flags() & B_SUPPORTS_LAYOUT) != 0) { + width = fLayoutData->min.width; + } + *_width = width; + } - if (_height) - *_height = fLayoutData->min.height; + if (_height) { + float height = Bounds().Height(); + if (height < fLayoutData->min.height + || (Flags() & B_SUPPORTS_LAYOUT) != 0) { + height = fLayoutData->min.height; + } + *_height = height; + } } @@ -2673,6 +2685,19 @@ CALLED(); float lineHeight = ceilf(LineHeight(0)); + if (lineHeight == 0.0) { + // We probably don't have text content yet. Take the initial + // style's font height or fall back to the plain font. + const BFont* font; + fStyles->GetNullStyle(&font, NULL); + if (font == NULL) + font = be_plain_font; + + font_height fontHeight; + font->GetHeight(&fontHeight); + // This is how the height is calculated in _RecalculateLineBreaks(). + lineHeight = ceilf(fontHeight.ascent + fontHeight.descent) + 1; + } TRACE("line height: %.2f\n", lineHeight); // compute our minimal size From Info.Be-Hold at inter.nl.net Wed Oct 1 21:18:32 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Wed, 1 Oct 2008 21:18:32 +0200 (CEST) Subject: [Haiku-commits] r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <20080922141208.M82@mlotz.ch> References: <200809220636.m8M6an0R005065@sheep.berlios.de> <10679479900-BeMail@zon> <3994.212.178.112.94.1222090223.squirrel@webmail.inter.nl.net> <20080922141208.M82@mlotz.ch> Message-ID: <40357.85.223.98.72.1222888712.squirrel@webmail.inter.nl.net> Hi, Maybe a bit off-topic now: I could arrange for a SATA disk and that 'just works'!! wow :-) Just booted (and am typing now from) rev 27770. Sata configured in AHCI mode. At least I now have a way to start fiddling with gfx cards again, if the system remains stable of course :-) I'll search a bit trhough the ata busmanager anyway to see what I can dig up, but after that I desperately need to fix the 7300 support :) Bye! Rudolf. Op Ma, 22 september, 2008 4:21 pm schreef Michael Lotz: > Hi Rudolf > > >> and KB are initied then halts for long periods of time. If I leave the >> system alone for a few hours: desktop appears. Syslog reports lots of >> IDE timeouts. (increasing timeouts does not help, disabling >> SMP doesn't help either). >> >> >> The strange thing is that apparantly the boot volume is found and >> can more or less be booted from in PIO mode after a fallback: but if PIO >> mode is selected in failsafe options, which does now actually work, >> there's no boot volume found! I plan to further research this thing >> because I can't get to actual gfx drv work until that's fixed. > > That sounds a bit like lost interrupts. If you can provide some info on > the interrupt/PCI config this may shed some light on it. You could take a > look at bug #2335 and #2342, as these might exhibit similar issues, though > they are on AMD hardware I guess. > > >> More info: booting from USB works on that particular system. Haiku in >> itself is stable, but writing to USB makes it come into trouble after >> 100Mb or so: so that way I can't develop yet either. >> > > Can you please put some info on that one together and open a bug report? > If > there are USB related problems I'd really like to know about them, because > otherwise I cannot really do anything about it. > > Regards > Michael > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From julun at mail.berlios.de Wed Oct 1 21:19:36 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Wed, 1 Oct 2008 21:19:36 +0200 Subject: [Haiku-commits] r27832 - in haiku/trunk: data/artwork/icons src/apps/screenshot Message-ID: <200810011919.m91JJaxK018824@sheep.berlios.de> Author: julun Date: 2008-10-01 21:19:36 +0200 (Wed, 01 Oct 2008) New Revision: 27832 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27832&view=rev Added: haiku/trunk/data/artwork/icons/Screenshot Modified: haiku/trunk/src/apps/screenshot/Screenshot.rdef Log: * Screenshot app icon, kudos to Humdinger - /me still wonders why we have to use such tiny icons in Deskbar, fuzzy look and for sure not handicapped people friendly, hmmm... Added: haiku/trunk/data/artwork/icons/Screenshot =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Screenshot ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/apps/screenshot/Screenshot.rdef =================================================================== --- haiku/trunk/src/apps/screenshot/Screenshot.rdef 2008-10-01 17:05:26 UTC (rev 27831) +++ haiku/trunk/src/apps/screenshot/Screenshot.rdef 2008-10-01 19:19:36 UTC (rev 27832) @@ -18,19 +18,33 @@ }; resource vector_icon { - $"6E6369660B03010000020016023CC7EE389BC0BA16573E39B04977C842ADC700" - $"FFFFD3020006023C529D3753A2B8966F3D9D084B6044496AAF00474747FFA5A0" - $"A002001602BC4E76BC411B3C90DABCA00D47587D4ABA850090FFD40200160238" - $"313C3B5CF0BFCD963C7AAC4C13943FCAF901ECFFC3054B04017E020006033E2F" - $"99387F17BA42DB3FF5B94A0E32482C90001D1E2C3D454658FF01010102000602" - $"3879063B8224BE2CC83B10DB4A1F6F49B894FF9A9A9A00242222020006033C69" - $"A60000000000003E186148800049800058F3F3F300D4CECEFFD9D9D9038DFF06" - $"0D0A062228224A485E525252302C220A042228483852302C220A044838485E52" - $"5252300A042228224A485E48380A04453A45572446242C0A04B561C15A244624" - $"2CB569B8200A0445544557244626C1590A04453A45542644B569B8200A043826" - $"3D234E28492C080438263D234E284E2E0A03492C4E284E2E0802425843C9830A" - $"06486054606052CA1BC5B95C4D52480C0A06010C000A0001091001178400040A" - $"040108000A05010A000A0001001001178400040A010101000A020102000A0302" - $"0304000A070107000A080105000A090106000A0A010B1815FF0117822004" + $"6E6369660E050102000603399E0F3D9C0ABF82B23B84A84B88504910C900A5B1" + $"FFBCEAF1FFFFB3B8FF020106023E49240000000000003CAAAA4940004A80007C" + $"896EFFFFC0D5FF0401920332669805D803FFCB0005FF020016023CC7ED389BBF" + $"BA16553E39B04A41E44546E300FFFFD3020016023C529D3753A2B8966F3D9D07" + $"4AF244490EAF005EFFC502001602BCDCFABCCC663C90D9BCA00D47B5864B0A2A" + $"0090FFF4020006023CC0000000000000003D000047C00048A0001F010101FFC1" + $"ACAC020106023A26EC38CA29B828213953DA48968D4B2BC600434A68FF0F1238" + $"05FF0F0606AE0BB40BC14A33C5ACB75CC370BDEFC804C13ECA02CA27BF80C117" + $"BB1EC51BBD3EBF06BA053AB8BA0606AE0BB40BC14A33C5ACB75CC370BDEFC804" + $"C13ECA02CA27BF80C117BB1EC51BBD3EBF06BA053AB8BA0605AE02B57D43B9B9" + $"C5EDB7BB49BBB756BD75CB34CA8DC3AE40340605AE02B57D43B9B9C5EDB7BB49" + $"BBB756BD75CB34CA8DC3AE40340A093B5E3D60BFCDCB3B4560C516C7EE604B5B" + $"485D4A44560606AA0B27444054523FC074BC08C072BC07C073BC07BEE7BB113A" + $"3208022E4733420A062C3E2C50485E4E584E44323C0A042C3E48484E44323C0A" + $"044848485E4E584E440A042C3E2C50485E48480A04363E54505E43393A0204C0" + $"80C3B945C4F0BF41C281BC4DC353BD60C254BB39C452BC9BC754BB5DC61DBDDA" + $"C88CC0CEC7BABFBBC8B9C1E2C6BB0204B7E1C43BB8D9C34DB6EAC52BB893C86B" + $"B73BC70BB9EAC9CEBCBFC936BBC7CA26BDB5C848BC0FC507BD66C668BAB7C3A6" + $"0604EE3355BC43C7D1BBDDC837BCA9C76B3851BC83C828BCE9C7C2BC1DC88E17" + $"0A030104000A0001021001178400040A020103000A0001001001178400040A01" + $"0101000A0001051001178200040A040105000A050105023E2E8B000000000000" + $"3E2E8B472E8B48945D0A06010630212001178300040A070106123FFC76B8A84F" + $"38A84F3FFC7642069D437F0F01178200040A07010630282401178200040A0701" + $"06302B2601178200040A070106302E2801178200040A03010B000A0001073028" + $"A92301178400040A0801082028A9230A0901092028A9230A0A010A2028A9230A" + $"070106123CE1EA3F79B7BE878F3DF5DD4ADA30C89CFA01178200040A0B010D12" + $"BEE243BC8C013C90D0BEDCDB4A31144BF5A201178400040A0C010D023F72923D" + $"0B73BD11333F6C1B4A6724C968940A0D010D02B8307E3A7163BA7600B82C644A" + $"AAA84832F80A0D010E023EE2433C8C01BC90D03EDCDB4A6EE0C86667" }; - From marcusoverhagen at arcor.de Wed Oct 1 21:39:02 2008 From: marcusoverhagen at arcor.de (Marcus Overhagen) Date: Wed, 1 Oct 2008 21:39:02 +0200 (CEST) Subject: [Haiku-commits] r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <40357.85.223.98.72.1222888712.squirrel@webmail.inter.nl.net> References: <40357.85.223.98.72.1222888712.squirrel@webmail.inter.nl.net> <200809220636.m8M6an0R005065@sheep.berlios.de> <10679479900-BeMail@zon> <3994.212.178.112.94.1222090223.squirrel@webmail.inter.nl.net> <20080922141208.M82@mlotz.ch> Message-ID: <30195489.1222889942859.JavaMail.ngmail@webmail11.arcor-online.net> Info.Be-Hold at inter.nl.net wrote: > I'll search a bit trhough the ata busmanager anyway to see what I can dig Well, you could just file a new bug report, and attach some logfiles, etc. Work will continue with ata in the future, im just not available during the next few month. regards Marcus Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmf?hrer mit Movie Star Bewertungen von TV Movie. Au?erdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv From stippi at mail.berlios.de Wed Oct 1 23:07:13 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 23:07:13 +0200 Subject: [Haiku-commits] r27833 - haiku/trunk/data/artwork/icons Message-ID: <200810012107.m91L7CA7001056@sheep.berlios.de> Author: stippi Date: 2008-10-01 23:07:08 +0200 (Wed, 01 Oct 2008) New Revision: 27833 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27833&view=rev Modified: haiku/trunk/data/artwork/icons/App_MidiPlayer haiku/trunk/data/artwork/icons/App_Pe Log: Slight tweaks (?) ... been lingering for a while. Modified: haiku/trunk/data/artwork/icons/App_MidiPlayer =================================================================== (Binary files differ) Modified: haiku/trunk/data/artwork/icons/App_Pe =================================================================== (Binary files differ) From stippi at mail.berlios.de Wed Oct 1 23:07:55 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 1 Oct 2008 23:07:55 +0200 Subject: [Haiku-commits] r27834 - haiku/trunk/data/artwork/icons Message-ID: <200810012107.m91L7tMu001151@sheep.berlios.de> Author: stippi Date: 2008-10-01 23:07:52 +0200 (Wed, 01 Oct 2008) New Revision: 27834 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27834&view=rev Added: haiku/trunk/data/artwork/icons/App_Screenshot Removed: haiku/trunk/data/artwork/icons/Screenshot Log: Renamed Screenshot to App_Screenshot. Nice work, btw! Copied: haiku/trunk/data/artwork/icons/App_Screenshot (from rev 27832, haiku/trunk/data/artwork/icons/Screenshot) Deleted: haiku/trunk/data/artwork/icons/Screenshot From bonefish at mail.berlios.de Wed Oct 1 23:58:59 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 1 Oct 2008 23:58:59 +0200 Subject: [Haiku-commits] r27835 - haiku/trunk/src/system/kernel Message-ID: <200810012158.m91Lwx3T008754@sheep.berlios.de> Author: bonefish Date: 2008-10-01 23:58:59 +0200 (Wed, 01 Oct 2008) New Revision: 27835 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27835&view=rev Modified: haiku/trunk/src/system/kernel/team.cpp Log: Print the error code. Supposedly B_NO_MEMORY, but one never knows. Modified: haiku/trunk/src/system/kernel/team.cpp =================================================================== --- haiku/trunk/src/system/kernel/team.cpp 2008-10-01 21:07:52 UTC (rev 27834) +++ haiku/trunk/src/system/kernel/team.cpp 2008-10-01 21:58:59 UTC (rev 27835) @@ -998,7 +998,8 @@ (void **)&t->user_stack_base, B_EXACT_ADDRESS, sizeLeft, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_STACK_AREA, 0); if (t->user_stack_area < 0) { - dprintf("team_create_thread_start: could not create default user stack region\n"); + dprintf("team_create_thread_start: could not create default user stack " + "region: %s\n", strerror(t->user_stack_area)); free_team_arg(teamArgs); return t->user_stack_area; From bonefish at mail.berlios.de Thu Oct 2 00:52:49 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 2 Oct 2008 00:52:49 +0200 Subject: [Haiku-commits] r27836 - haiku/trunk/build/jam Message-ID: <200810012252.m91MqnJC007194@sheep.berlios.de> Author: bonefish Date: 2008-10-02 00:52:48 +0200 (Thu, 02 Oct 2008) New Revision: 27836 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27836&view=rev Modified: haiku/trunk/build/jam/OptionalPackages Log: Changes by Scott McCreary: * Updated CVS optional package to version 1.12.13. * Added Yasm 0.7.1 optional package. Modified: haiku/trunk/build/jam/OptionalPackages =================================================================== --- haiku/trunk/build/jam/OptionalPackages 2008-10-01 21:58:59 UTC (rev 27835) +++ haiku/trunk/build/jam/OptionalPackages 2008-10-01 22:52:48 UTC (rev 27836) @@ -28,6 +28,7 @@ # Vision # VLC # WonderBrush +# Yasm # package dependencies @@ -127,8 +128,8 @@ Echo "No optional package CVS available for gcc4" ; } else { local baseURL = http://haiku-files.org/files/optional-packages ; - InstallOptionalHaikuImagePackage cvs-1.11.21-gcc2-2008-07-23 - : $(baseURL)/cvs-1.11.21-gcc2-2008-07-23.zip + InstallOptionalHaikuImagePackage cvs-1.12.13-gcc2-2008-09-30 + : $(baseURL)/cvs-1.12.13-gcc2-2008-09-30.zip : ; } @@ -429,4 +430,17 @@ } } - +# Yasm +if [ IsOptionalHaikuImagePackageAdded Yasm ] { + if $(TARGET_ARCH) != x86 { + Echo "No optional package Yasm available for $(TARGET_ARCH)" ; + } else if $(HAIKU_GCC_VERSION[1]) >= 4 && $(isHybridBuild) = 0 { + Echo "No optional package Yasm available for gcc4" ; + } else { + local baseURL = http://haiku-files.org/files/optional-packages ; + InstallOptionalHaikuImagePackage yasm-0.7.1-gcc2-2008-10-01 + : $(baseURL)/yasm-0.7.1-gcc2-2008-10-01.zip + : + ; + } +} From bonefish at mail.berlios.de Thu Oct 2 01:56:12 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 2 Oct 2008 01:56:12 +0200 Subject: [Haiku-commits] r27837 - haiku/trunk/build/jam Message-ID: <200810012356.m91NuCEu014408@sheep.berlios.de> Author: bonefish Date: 2008-10-02 01:56:12 +0200 (Thu, 02 Oct 2008) New Revision: 27837 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27837&view=rev Modified: haiku/trunk/build/jam/BuildSetup Log: Enforced 80 column limit. Modified: haiku/trunk/build/jam/BuildSetup =================================================================== --- haiku/trunk/build/jam/BuildSetup 2008-10-01 22:52:48 UTC (rev 27836) +++ haiku/trunk/build/jam/BuildSetup 2008-10-01 23:56:12 UTC (rev 27837) @@ -31,7 +31,8 @@ # boot floppy HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-floppy-container ; -HAIKU_CONTAINER_GRIST on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) = FloppyBootImage ; +HAIKU_CONTAINER_GRIST on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) + = FloppyBootImage ; # HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) = HAIKU_FLOPPY_BOOT_IMAGE_INSTALL_TARGETS ; @@ -116,8 +117,10 @@ EXIT "Run ./configure in the source tree's root directory first!" ; } if ! ( $(timezones) && $(libgccObjects) ) { - ECHO "No `Timezones' or `libgccObjects' found in $(HAIKU_BUILD_OUTPUT_DIR)!" ; - EXIT "Please run ./configure in the source tree's root directory again!" ; + ECHO "No `Timezones' or `libgccObjects' found in" + "$(HAIKU_BUILD_OUTPUT_DIR)!" ; + EXIT "Please run ./configure in the source tree's root directory" + "again!" ; } LOCATE on BuildConfig = $(HAIKU_BUILD_OUTPUT_DIR) ; @@ -279,10 +282,12 @@ } if $(HAIKU_ARCH) = m68k { # We don't need a PIC kernel as it's always at the same place. - # it's actually needed to not use pic, else linking fails due to too large pc refs. + # it's actually needed to not use pic, else linking fails due to too large + # pc refs. HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ; HAIKU_KERNEL_PIC_LINKFLAGS = ; - # we don't want to have to handle emulating missing FPU opcodes for 040 and 060 in the kernel + # we don't want to have to handle emulating missing FPU opcodes for 040 and + # 060 in the kernel HAIKU_KERNEL_CCFLAGS += -m68020-60 ; HAIKU_KERNEL_C++FLAGS += -m68020-60 ; } @@ -298,8 +303,8 @@ } # warning flags -HAIKU_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith -Wcast-align - -Wsign-compare ; +HAIKU_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes + -Wpointer-arith -Wcast-align -Wsign-compare ; HAIKU_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare ; @@ -475,7 +480,8 @@ } if $(HOST_PLATFORM) = cygwin { - HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker --enable-auto-import ; + HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker + --enable-auto-import ; } HOST_CPU ?= $(OSPLAT:L) ; @@ -538,8 +544,8 @@ } # warning flags -HOST_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith -Wcast-align - -Wsign-compare ; +HOST_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith + -Wcast-align -Wsign-compare ; HOST_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare ; @@ -671,10 +677,10 @@ } else { # Otherwise the generic attribute emulation is used, which uses a # directory per file to store its attribute. We need to redefine RM so - # that the attributes are removed as well. We use a wrapper script, which - # invokes a build tool. If the build tool hasn't been built yet, the - # normal "rm" is used and the attributes are leaked (likely there aren't - # any yet). + # that the attributes are removed as well. We use a wrapper script, + # which invokes a build tool. If the build tool hasn't been built yet, + # the normal "rm" is used and the attributes are leaked (likely there + # aren't any yet). RM = $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ";" [ FDirName $(HAIKU_TOP) build scripts rm_attrs ] [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) $(HOST_ARCH) release @@ -972,7 +978,8 @@ documentation ] ; # TODO: Rethink test stuff. -HAIKU_TEST_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tests $(TARGET_PLATFORM) $(HAIKU_ARCH) ] ; +HAIKU_TEST_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tests + $(TARGET_PLATFORM) $(HAIKU_ARCH) ] ; HAIKU_APP_TEST_DIR ?= [ FDirName $(HAIKU_TEST_DIR) apps ] ; HAIKU_APP_TEST_LIB_DIR ?= [ FDirName $(HAIKU_APP_TEST_DIR) lib ] ; HAIKU_TMP_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tmp ] ; From leavengood at gmail.com Thu Oct 2 09:15:08 2008 From: leavengood at gmail.com (Ryan Leavengood) Date: Thu, 2 Oct 2008 03:15:08 -0400 Subject: [Haiku-commits] r27785 - haiku/trunk/src/apps/screenshot In-Reply-To: <48E1542E.60209@gmx.de> References: <200809292205.m8TM5RGl017474@sheep.berlios.de> <48E1542E.60209@gmx.de> Message-ID: On Mon, Sep 29, 2008 at 6:18 PM, julun wrote: > > while this app is basically finished, i wonder how we should invoke > it. My guess/ proposal would be: > > Print Key: Silent mode - fullscreen > Option + Print Key: Silent mode - active window > Shift + Option + Print Key: Save mode - fullscreen I like it. > When i add this to BWindow, should the libbe dependency on libpng and > libz be removed in case we build for Haiku? Does the same count for > the app_server as well? Yes for both. Ryan From axeld at mail.berlios.de Thu Oct 2 10:28:04 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Oct 2008 10:28:04 +0200 Subject: [Haiku-commits] r27838 - haiku/trunk/src/system/kernel/vm Message-ID: <200810020828.m928S4XQ028647@sheep.berlios.de> Author: axeld Date: 2008-10-02 10:28:04 +0200 (Thu, 02 Oct 2008) New Revision: 27838 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27838&view=rev Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h Log: * Fixed the build when ENABLE_SWAP_SUPPORT is not defined. Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2008-10-01 23:56:12 UTC (rev 27837) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2008-10-02 08:28:04 UTC (rev 27838) @@ -1,6 +1,6 @@ /* * Copyright 2008, Ingo Weinhold, ingo_weinhold at gmx.de. - * Copyright 2004-2007, Axel D?rfler, axeld at pinc-software.de. + * Copyright 2004-2008, Axel D?rfler, axeld at pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. @@ -25,7 +25,6 @@ bool swap_free_page_swap_space(vm_page *page); uint32 swap_available_pages(void); uint32 swap_total_swap_pages(void); - void swap_get_info(struct system_memory_info *info); } @@ -74,4 +73,6 @@ #endif // ENABLE_SWAP_SUPPORT +extern "C" void swap_get_info(struct system_memory_info *info); + #endif /* _KERNEL_VM_STORE_ANONYMOUS_H */ From axeld at mail.berlios.de Thu Oct 2 11:16:51 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 2 Oct 2008 11:16:51 +0200 Subject: [Haiku-commits] r27839 - haiku/trunk/src/add-ons/kernel/network/stack Message-ID: <200810020916.m929GpMo000259@sheep.berlios.de> Author: axeld Date: 2008-10-02 11:16:50 +0200 (Thu, 02 Oct 2008) New Revision: 27839 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27839&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/stack/domains.cpp Log: * Fixed possible deadlock when booting over the network. Creating the interface without having the domain locked seems to be safe AFAICT. Modified: haiku/trunk/src/add-ons/kernel/network/stack/domains.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/domains.cpp 2008-10-02 08:28:04 UTC (rev 27838) +++ haiku/trunk/src/add-ons/kernel/network/stack/domains.cpp 2008-10-02 09:16:50 UTC (rev 27839) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2006-2008, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -168,12 +168,22 @@ net_interface_private *interface = NULL; status_t status; - if (find_interface(domain, request.ifr_name) != NULL) - status = B_NAME_IN_USE; - else + if (find_interface(domain, request.ifr_name) == NULL) { + // We must not hold the domain's link when creating the interface: + // this will call get_module() which might want to access a network + // device when booting from network. + locker.Unlock(); status = create_interface(domain, request.ifr_name, baseName, deviceInterface, &interface); + locker.Lock(); + if (find_interface(domain, request.ifr_name) != NULL) { + delete_interface(interface); + status = B_NAME_IN_USE; + } + } else + status = B_NAME_IN_USE; + put_device_interface(deviceInterface); if (status == B_OK) @@ -302,8 +312,8 @@ status_t register_domain(int family, const char *name, - struct net_protocol_module_info *module, - struct net_address_module_info *addressModule, + struct net_protocol_module_info *module, + struct net_address_module_info *addressModule, net_domain **_domain) { TRACE(("register_domain(%d, %s)\n", family, name)); @@ -342,7 +352,7 @@ MutexLocker locker(sDomainLock); list_remove_item(&sDomains, domain); - + net_interface_private *interface = NULL; while (true) { interface = (net_interface_private *)list_remove_head_item(&domain->interfaces); From jackburton at mail.berlios.de Thu Oct 2 11:56:01 2008 From: jackburton at mail.berlios.de (jackburton at BerliOS) Date: Thu, 2 Oct 2008 11:56:01 +0200 Subject: [Haiku-commits] r27840 - in haiku/trunk/src/add-ons/input_server/methods: pen t9 Message-ID: <200810020956.m929u16n003321@sheep.berlios.de> Author: jackburton Date: 2008-10-02 11:56:01 +0200 (Thu, 02 Oct 2008) New Revision: 27840 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27840&view=rev Removed: haiku/trunk/src/add-ons/input_server/methods/pen/_APP_ haiku/trunk/src/add-ons/input_server/methods/t9/_APP_ Log: Removed useless _APP_ links Deleted: haiku/trunk/src/add-ons/input_server/methods/pen/_APP_ Deleted: haiku/trunk/src/add-ons/input_server/methods/t9/_APP_ From bonefish at mail.berlios.de Thu Oct 2 23:22:04 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 2 Oct 2008 23:22:04 +0200 Subject: [Haiku-commits] r27841 - in haiku/trunk/src/system/kernel: . arch/x86 arch/x86/timers device_manager disk_device_manager util Message-ID: <200810022122.m92LM4tA015554@sheep.berlios.de> Author: bonefish Date: 2008-10-02 23:22:03 +0200 (Thu, 02 Oct 2008) New Revision: 27841 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27841&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_int.c haiku/trunk/src/system/kernel/arch/x86/arch_smp.c haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp haiku/trunk/src/system/kernel/arch/x86/timers/apic.h haiku/trunk/src/system/kernel/arch/x86/timers/x86_apic.c haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.c haiku/trunk/src/system/kernel/device_manager/IOScheduler.cpp haiku/trunk/src/system/kernel/device_manager/IOScheduler.h haiku/trunk/src/system/kernel/disk_device_manager/disk_device_manager.cpp haiku/trunk/src/system/kernel/elf.cpp haiku/trunk/src/system/kernel/smp.c haiku/trunk/src/system/kernel/util/RadixBitmap.cpp Log: Fixed various warnings. Modified: haiku/trunk/src/system/kernel/arch/x86/arch_int.c =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_int.c 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/arch_int.c 2008-10-02 21:22:03 UTC (rev 27841) @@ -122,7 +122,7 @@ volatile uint32 io_register_select; uint32 reserved[3]; volatile uint32 io_window_register; -} ioapic _PACKED; +} ioapic; static ioapic *sIOAPIC = NULL; static uint32 sIOAPICMaxRedirectionEntry = 23; Modified: haiku/trunk/src/system/kernel/arch/x86/arch_smp.c =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_smp.c 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/arch_smp.c 2008-10-02 21:22:03 UTC (rev 27841) @@ -26,7 +26,9 @@ #include #include +#include "timers/apic.h" + //#define TRACE_ARCH_SMP #ifdef TRACE_ARCH_SMP # define TRACE(x) dprintf x @@ -76,7 +78,7 @@ config = (apic_read(APIC_LINT0) & 0xffff00ff); config |= APIC_LVT_DM_ExtINT | APIC_LVT_IIPP | APIC_LVT_TM; apic_write(APIC_LINT0, config); - + /* setup LINT1 as NMI */ config = (apic_read(APIC_LINT1) & 0xffff00ff); config |= APIC_LVT_DM_NMI | APIC_LVT_IIPP; Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-02 21:22:03 UTC (rev 27841) @@ -36,7 +36,7 @@ #ifdef TRACE_MTRR_ARCH_VM # define TRACE_MTRR(x...) dprintf(x) #else -# define TRACE_MTRR(x...) +# define TRACE_MTRR(x...) #endif @@ -78,6 +78,7 @@ } +#if 0 /*! Checks if the provided range overlaps an existing mtrr range If it actually extends an existing range, extendedIndex is filled @@ -93,20 +94,21 @@ x86_get_mtrr(index, &b, &l, &t); // check first for write combining extensions - if (base <= b + if (base <= b && (base + length) >= (b + l) && t == IA32_MTR_WRITE_COMBINING) { *extendedIndex = index; return true; } if ((base >= b && base < (b + l)) - || ((base + length) > b + || ((base + length) > b && (base + length) <= (b + l))) return true; } } return false; } +#endif // 0 static uint64 @@ -182,7 +184,7 @@ #endif // length must be a power of 2; just round it up to the next value - length = nearest_power(length); + length = nearest_power(length); if (length + base <= base) { // 4GB overflow @@ -198,7 +200,7 @@ if (index < 0) return B_ERROR; - TRACE_MTRR("allocate MTRR slot %ld, base = %Lx, length = %Lx, type=0x%lx\n", + TRACE_MTRR("allocate MTRR slot %ld, base = %Lx, length = %Lx, type=0x%lx\n", index, base, length, type); sMemoryTypeIDs[index] = id; Modified: haiku/trunk/src/system/kernel/arch/x86/timers/apic.h =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/timers/apic.h 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/timers/apic.h 2008-10-02 21:22:03 UTC (rev 27841) @@ -7,11 +7,6 @@ #include -/* Method Prototypes */ -static int apic_get_prio(void); -static status_t apic_set_hardware_timer(bigtime_t relativeTimeout); -static status_t apic_clear_hardware_timer(void); -static status_t apic_init(struct kernel_args *args); status_t apic_smp_init_timer(struct kernel_args *args, int32 cpu); #endif /* _KERNEL_ARCH_x86_TIMERS_APIC_H */ Modified: haiku/trunk/src/system/kernel/arch/x86/timers/x86_apic.c =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/timers/x86_apic.c 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/timers/x86_apic.c 2008-10-02 21:22:03 UTC (rev 27841) @@ -18,6 +18,13 @@ #include "apic.h" + +/* Method Prototypes */ +static int apic_get_prio(void); +static status_t apic_set_hardware_timer(bigtime_t relativeTimeout); +static status_t apic_clear_hardware_timer(void); +static status_t apic_init(struct kernel_args *args); + static void *sApicPtr = NULL; static uint32 sApicTicsPerSec = 0; Modified: haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.c =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.c 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.c 2008-10-02 21:22:03 UTC (rev 27841) @@ -21,7 +21,6 @@ #define TRACE(x) ; #endif -static uint32 sHPETAddr; static struct hpet_regs *sHPETRegs; struct timer_info gHPETTimer = { Modified: haiku/trunk/src/system/kernel/device_manager/IOScheduler.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/IOScheduler.cpp 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/device_manager/IOScheduler.cpp 2008-10-02 21:22:03 UTC (rev 27841) @@ -30,6 +30,21 @@ #endif +IOCallback::~IOCallback() +{ +} + + +status_t +IOCallback::DoIO(IOOperation* operation) +{ + return B_ERROR; +} + + +// #pragma mark - + + void IORequestOwner::Dump() const { Modified: haiku/trunk/src/system/kernel/device_manager/IOScheduler.h =================================================================== --- haiku/trunk/src/system/kernel/device_manager/IOScheduler.h 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/device_manager/IOScheduler.h 2008-10-02 21:22:03 UTC (rev 27841) @@ -19,7 +19,9 @@ class IOCallback { public: - virtual status_t DoIO(IOOperation* operation); + virtual ~IOCallback(); + + virtual status_t DoIO(IOOperation* operation) = 0; }; typedef status_t (*io_callback)(void* data, io_operation* operation); Modified: haiku/trunk/src/system/kernel/disk_device_manager/disk_device_manager.cpp =================================================================== --- haiku/trunk/src/system/kernel/disk_device_manager/disk_device_manager.cpp 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/disk_device_manager/disk_device_manager.cpp 2008-10-02 21:22:03 UTC (rev 27841) @@ -154,20 +154,6 @@ } -// compare_partition_data_offset -static int -compare_partition_data_offset(const void* _a, const void* _b) -{ - const partition_data* a = *(const partition_data**)_a; - const partition_data* b = *(const partition_data**)_b; - - if (a->offset == b->offset) - return 0; - - return a->offset < b->offset ? -1 : 1; -} - - // create_child_partition partition_data * create_child_partition(partition_id partitionID, int32 index, Modified: haiku/trunk/src/system/kernel/elf.cpp =================================================================== --- haiku/trunk/src/system/kernel/elf.cpp 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/elf.cpp 2008-10-02 21:22:03 UTC (rev 27841) @@ -1018,6 +1018,10 @@ addr_t deltaFound = INT_MAX; bool exactMatch = false; + // to get rid of the erroneous "uninitialized" warnings + symbolFound.st_name = 0; + symbolFound.st_value = 0; + for (uint32 i = 0; i < hashTabSize; i++) { uint32 bucket; if (!_Read(&hashBuckets[i], bucket)) Modified: haiku/trunk/src/system/kernel/smp.c =================================================================== --- haiku/trunk/src/system/kernel/smp.c 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/smp.c 2008-10-02 21:22:03 UTC (rev 27841) @@ -656,7 +656,7 @@ void smp_cpu_rendezvous(volatile uint32 *var, int current_cpu) { - atomic_or(var, 1 << current_cpu); + atomic_or((vint32*)var, 1 << current_cpu); while (*var != ((1 << sNumCPUs) - 1)) PAUSE(); Modified: haiku/trunk/src/system/kernel/util/RadixBitmap.cpp =================================================================== --- haiku/trunk/src/system/kernel/util/RadixBitmap.cpp 2008-10-02 09:56:01 UTC (rev 27840) +++ haiku/trunk/src/system/kernel/util/RadixBitmap.cpp 2008-10-02 21:22:03 UTC (rev 27841) @@ -29,8 +29,8 @@ * BLIST.C - Bitmap allocator/deallocator, using a radix tree with hinting * * This module implements a general bitmap allocator/deallocator. The - * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * allocator eats around 2 bits per 'block'. The module does not + * try to interpret the meaning of a 'block' other then to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -38,9 +38,9 @@ * 32), and one for the meta nodes (typically 16). Both meta and leaf * nodes have a hint field. This field gives us a hint as to the largest * free contiguous range of blocks under the node. It may contain a - * value that is too high, but will never contain a value that is too + * value that is too high, but will never contain a value that is too * low. When the radix tree is searched, allocation failures in subtrees - * update the hint. + * update the hint. * * The radix tree also implements two collapsed states for meta nodes: * the ALL-ALLOCATED state and the ALL-FREE state. If a meta node is @@ -50,33 +50,33 @@ * * The hinting greatly increases code efficiency for allocations while * the general radix structure optimizes both allocations and frees. The - * radix tree should be able to operate well no matter how much + * radix tree should be able to operate well no matter how much * fragmentation there is and no matter how large a bitmap is used. * * Unlike the rlist code, the blist code wires all necessary memory at * creation time. Neither allocations nor frees require interaction with - * the memory subsystem. In contrast, the rlist code may allocate memory + * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The * rlist code uses a little less overall memory then the blist code (but - * due to swap interleaving not all that much less), but the blist code + * due to swap interleaving not all that much less), but the blist code * scales much, much better. * * LAYOUT: The radix tree is layed out recursively using a * linear array. Each meta node is immediately followed (layed out * sequentially in memory) by BLIST_META_RADIX lower level nodes. This * is a recursive structure but one that can be easily scanned through - * a very simple 'skip' calculation. In order to support large radixes, - * portions of the tree may reside outside our memory allocation. We - * handle this with an early-termination optimization (when bighint is - * set to -1) on the scan. The memory allocation is only large enough + * a very simple 'skip' calculation. In order to support large radixes, + * portions of the tree may reside outside our memory allocation. We + * handle this with an early-termination optimization (when bighint is + * set to -1) on the scan. The memory allocation is only large enough * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then - * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too - * large' if you try. This is an area that could use improvement. The - * radix is large enough that this restriction does not effect the swap + * NOTE: the allocator cannot currently allocate more then + * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too + * large' if you try. This is an area that could use improvement. The + * radix is large enough that this restriction does not effect the swap * system, though. Currently only the allocation code is effected by * this algorithmic unfeature. The freeing code can handle arbitrary * ranges. @@ -99,7 +99,7 @@ #include #include -#define TERMINATOR -1 +#define TERMINATOR -1 static uint32 @@ -132,15 +132,15 @@ uint32 i; for (i = 1; i <= skip; i += next_skip) { if (slots >= radix) { - index = i + radix_bitmap_init(node ? &node[i] : NULL, + index = i + radix_bitmap_init(node ? &node[i] : NULL, radix, next_skip - 1, radix); slots -= radix; } else if (slots > 0) { - index = i + radix_bitmap_init(node ? &node[i] : NULL, + index = i + radix_bitmap_init(node ? &node[i] : NULL, radix, next_skip - 1, slots); slots = 0; } else { // add a terminator - if (node) + if (node) node[i].big_hint = TERMINATOR; break; } @@ -172,7 +172,7 @@ bmp->skip = skip; bmp->free_slots = slots; bmp->root_size = 1 + radix_bitmap_init(NULL, radix, skip, slots); - + bmp->root = (radix_node *)malloc(bmp->root_size * sizeof(radix_node)); if (bmp->root == NULL) { free(bmp); @@ -193,10 +193,10 @@ } -static swap_addr_t +static swap_addr_t radix_leaf_alloc(radix_node *leaf, swap_addr_t slotIndex, int32 count) { - if (count <= BITMAP_RADIX) { + if (count <= (int32)BITMAP_RADIX) { bitmap_t bitmap = ~leaf->u.bitmap; uint32 n = BITMAP_RADIX - count; bitmap_t mask = (bitmap_t)-1 >> n; @@ -217,7 +217,7 @@ static swap_addr_t -radix_node_alloc(radix_node *node, swap_addr_t slotIndex, int32 count, +radix_node_alloc(radix_node *node, swap_addr_t slotIndex, int32 count, uint32 radix, uint32 skip) { uint32 next_skip = skip / NODE_RADIX; @@ -229,10 +229,10 @@ if (count <= node[i].big_hint) { swap_addr_t addr = SWAP_SLOT_NONE; - if (next_skip == 1) + if (next_skip == 1) addr = radix_leaf_alloc(&node[i], slotIndex, count); else - addr = radix_node_alloc(&node[i], slotIndex, count, radix, + addr = radix_node_alloc(&node[i], slotIndex, count, radix, next_skip - 1); if (addr != SWAP_SLOT_NONE) { node->u.available -= count; @@ -273,7 +273,7 @@ radix_leaf_dealloc(radix_node *leaf, swap_addr_t slotIndex, uint32 count) { uint32 n = slotIndex & (BITMAP_RADIX - 1); - bitmap_t mask = ((bitmap_t)-1 >> (BITMAP_RADIX - count - n)) + bitmap_t mask = ((bitmap_t)-1 >> (BITMAP_RADIX - count - n)) & ((bitmap_t)-1 << n); leaf->u.bitmap &= ~mask; @@ -281,8 +281,8 @@ } -static void -radix_node_dealloc(radix_node *node, swap_addr_t slotIndex, uint32 count, +static void +radix_node_dealloc(radix_node *node, swap_addr_t slotIndex, uint32 count, uint32 radix, uint32 skip, swap_addr_t index) { node->u.available += count; @@ -301,13 +301,13 @@ if (next_skip == 1) radix_leaf_dealloc(&node[i], slotIndex, v); - else - radix_node_dealloc(&node[i], slotIndex, v, radix, + else + radix_node_dealloc(&node[i], slotIndex, v, radix, next_skip - 1, index); if (node->big_hint < node[i].big_hint) node->big_hint = node[i].big_hint; - + count -= v; slotIndex += v; index += radix; @@ -316,13 +316,13 @@ } -void +void radix_bitmap_dealloc(radix_bitmap *bmp, swap_addr_t slotIndex, uint32 count) { if (bmp->radix == BITMAP_RADIX) radix_leaf_dealloc(bmp->root, slotIndex, count); else - radix_node_dealloc(bmp->root, slotIndex, count, bmp->radix, + radix_node_dealloc(bmp->root, slotIndex, count, bmp->radix, bmp->skip, 0); bmp->free_slots += count; From bonefish at mail.berlios.de Thu Oct 2 23:25:11 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 2 Oct 2008 23:25:11 +0200 Subject: [Haiku-commits] r27842 - haiku/trunk/build/jam Message-ID: <200810022125.m92LPBQX016199@sheep.berlios.de> Author: bonefish Date: 2008-10-02 23:25:10 +0200 (Thu, 02 Oct 2008) New Revision: 27842 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27842&view=rev Modified: haiku/trunk/build/jam/BuildSetup Log: * -Wno-multichar was added multiple times. It's now only in the HAIKU[_KERNEL]_WARNING_CCFLAGS. * Added -Werror for various parts of the source tree for the gcc 2 build. Feel encouraged to add more. Modified: haiku/trunk/build/jam/BuildSetup =================================================================== --- haiku/trunk/build/jam/BuildSetup 2008-10-02 21:22:03 UTC (rev 27841) +++ haiku/trunk/build/jam/BuildSetup 2008-10-02 21:25:10 UTC (rev 27842) @@ -254,12 +254,9 @@ HAIKU_ASFLAGS = ; # C/C++ flags -HAIKU_CCFLAGS += -Wno-multichar ; -HAIKU_C++FLAGS += -Wno-multichar ; - -HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin -Wno-multichar +HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin -DBOCHS_DEBUG_HACK=$(BOCHS_DEBUG_HACK) ; -HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions -Wno-multichar +HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions -DBOCHS_DEBUG_HACK=$(BOCHS_DEBUG_HACK) ; HAIKU_KERNEL_DEFINES += _KERNEL_MODE ; @@ -304,9 +301,10 @@ # warning flags HAIKU_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes - -Wpointer-arith -Wcast-align -Wsign-compare ; + -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar ; HAIKU_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy - -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare ; + -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare + -Wno-multichar ; HAIKU_KERNEL_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wno-multichar ; @@ -1005,3 +1003,40 @@ # also add PLATFORM and SUPPORTED_PLATFORMS PLATFORM SUPPORTED_PLATFORMS ; + + +# enable -Werror for certain parts of the source tree + +if $(HAIKU_GCC_VERSION[1]) = 2 { + rule EnableWerror dirTokens : scope { + AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) : -Werror + : $(scope) ; + AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) : -Werror + : $(scope) ; + } +} else { +# TODO: Enable after updating to a newer gcc 4 version that supports -Wno-error! + # -Wuninitialized gives too many false positives. +# rule EnableWerror dirTokens : scope { +# AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) +# : -Werror -Wno-error=uninitialized : $(scope) ; +# AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) +# : -Werror -Wno-error=uninitialized : $(scope) ; +# } + rule EnableWerror dirTokens : scope { + } +} + +# Work-around for GCC 2 problem -- despite -Wno-multichar it reports +# multichar warnings in headers/private/kernel/debugger_keymaps.h included by +# src/system/kernel/arch/x86/arch_debug_console.c. +if $(HAIKU_GCC_VERSION[1]) = 2 { + local file = arch_debug_console.o ; + CCFLAGS on $(file) = [ on $(file) return $(CCFLAGS) ] ; +} + +EnableWerror src kits app ; +EnableWerror src kits interface ; +EnableWerror src kits storage ; +EnableWerror src kits support ; +EnableWerror src system kernel ; From Info.Be-Hold at inter.nl.net Fri Oct 3 02:01:32 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Fri, 3 Oct 2008 02:01:32 +0200 (CEST) Subject: [Haiku-commits] r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <48E29161.4070200@arcor.de> References: <200809220636.m8M6an0R005065@sheep.berlios.de> <10679479900-BeMail@zon> <3994.212.178.112.94.1222090223.squirrel@webmail.inter.nl.net> <20080922141208.M82@mlotz.ch> <4348.212.178.112.94.1222770159.squirrel@webmail.inter.nl.net> <48E29161.4070200@arcor.de> Message-ID: <3811.85.223.98.72.1222992092.squirrel@webmail.inter.nl.net> Hi there (Marcus, Axel, others?) I can't really sleep this night, and I am wondering about the IDE and ATA busmanager, and my trouble on that new system I have here. First a question born in my ignorance no doubt. But I still need to ask it in order to understand what's going on here in Haiku world concerning IDE/ATA: I wonder (Marcus): Why do you say the IDE busmanager is broken while it seems to me it works OK on so many systems outthere? I mean, Thomas Kurschel wrote it right? While I think the ATA busmanager (in it's current state) gives better logging messages, and is well written I think compared to Thomas his work in the sense that its (much) easier to understand and more logical built; OTOH The IDE busmanager is very consistent in it's behaviour over here even when such an error occurs like I am having over here: The ATA busmanager in it's current state seems (more) harddisk brand/type dependable in the errors I see. Booting stops at different stages depending on the harddisk I connect. ------- Another question, along with something I observe here: On top of that I wrote above I now have to tell you that the ATA busmanager, in the best case, quits at exactly the same spot as the IDE busmanager does: at the moment the first sector is (attempted to be) written to harddisk. I have a feeling, that's getting stronger over time, that neither the IDE nor the ATA busmanager is responsible for my HD writing error. I think that either the generic PCI-IDE driver must be causing this (it's used with both busmanagers right?) or there's a BIOS/hardware feature in existance that's blocking every sector write attempt to the IDE port on my system. Or some other system part that's common to both busmanagers??? Any thoughts anyone? Thanks! Kind regards, Rudolf. Op Di, 30 september, 2008 10:51 pm schreef Marcus Overhagen: > Info.Be-Hold at inter.nl.net wrote: > > >> Hi there Michael, >> >> >> Sorry for the late reply.. >> >> >> Anyhow, I'm still searching, and it seems to be an int problem >> indeed. > [...] > > >> Looking at the int service routine, it's apparant that lots of >> 'spurious' ints occur during reading (one async waiting int and one >> spurious int per read sector AFAICT). Reading however works fine: these >> ints seem to be correctly handled. > > The ide bus manager is broken. Please do not try to fix it. > > > Especially the interrupt handling in PIO mode usually does not work > relyable with interrupt sharing, except perhaps for devices in IDE > compatibility mode. > > Did you file a bug report? whats your PCI device configuration? > > > You can try to use the ata instead of the ide bus manager. > > > Although not finished, it won't use interrupts for PIO transfers > and might work better for you. > > DMA transfers and ATAPI is currently not implemented, and > timeouts during device detection are slihgtly stupid/long. > > regards Marcus > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From jackburton at mail.berlios.de Fri Oct 3 07:57:36 2008 From: jackburton at mail.berlios.de (jackburton at BerliOS) Date: Fri, 3 Oct 2008 07:57:36 +0200 Subject: [Haiku-commits] r27843 - in haiku/trunk/src/add-ons/kernel/drivers/network: . re re/pci Message-ID: <200810030557.m935va7S013808@sheep.berlios.de> Author: jackburton Date: 2008-10-03 07:57:35 +0200 (Fri, 03 Oct 2008) New Revision: 27843 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27843&view=rev Added: haiku/trunk/src/add-ons/kernel/drivers/network/re/ haiku/trunk/src/add-ons/kernel/drivers/network/re/Jamfile haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/ haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/Jamfile haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/glue.c haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_re.c haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_rlreg.h Modified: haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile Log: if_re freebsd driver, adapted for the build by Francesco Piccinini. It supports many Realtek based NIC which our own driver doesn't support (for example the RTL8101E). Thanks! Not added to the image yet, since it causes some problems on my laptop (but could well be caused by the freebsd compat layer, or by the scheduler) Modified: haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile 2008-10-02 21:25:10 UTC (rev 27842) +++ haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile 2008-10-03 05:57:35 UTC (rev 27843) @@ -21,6 +21,7 @@ SubInclude HAIKU_TOP src add-ons kernel drivers network pcnet ; SubInclude HAIKU_TOP src add-ons kernel drivers network syskonnect ; SubInclude HAIKU_TOP src add-ons kernel drivers network attansic_l2 ; +SubInclude HAIKU_TOP src add-ons kernel drivers network re ; SubIncludeGPL HAIKU_TOP src add-ons kernel drivers network bcm440x ; SubIncludeGPL HAIKU_TOP src add-ons kernel drivers network bcm570x ; Added: haiku/trunk/src/add-ons/kernel/drivers/network/re/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/Jamfile 2008-10-02 21:25:10 UTC (rev 27842) +++ haiku/trunk/src/add-ons/kernel/drivers/network/re/Jamfile 2008-10-03 05:57:35 UTC (rev 27843) @@ -0,0 +1,3 @@ +SubDir HAIKU_TOP src add-ons kernel drivers network re ; + +SubInclude HAIKU_TOP src add-ons kernel drivers network re pci ; Added: haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/Jamfile 2008-10-02 21:25:10 UTC (rev 27842) +++ haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/Jamfile 2008-10-03 05:57:35 UTC (rev 27843) @@ -0,0 +1,16 @@ +SubDir HAIKU_TOP src add-ons kernel drivers network re pci ; + +UsePrivateHeaders kernel net ; + +UseHeaders [ FDirName $(SUBDIR) .. ] : true ; +UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ] : true ; +UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel drivers network rtl8139 ] : true ; + +SubDirCcFlags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ] ; + +KernelAddon re : + if_re.c + glue.c + : libfreebsd_network.a rtl8139_mii.a + ; + Added: haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/glue.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/glue.c 2008-10-02 21:25:10 UTC (rev 27842) +++ haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/glue.c 2008-10-03 05:57:35 UTC (rev 27843) @@ -0,0 +1,37 @@ +#include +#include + +HAIKU_FBSD_DRIVER_GLUE(re, re, pci); +HAIKU_FBSD_MII_DRIVER(rlphy); +HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES | FBSD_FAST_TASKQUEUE); + +int +HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev) +{ + struct rl_softc *sc = device_get_softc(dev); + uint16_t status; + + status = CSR_READ_2(sc, RL_ISR); + if (status == 0xffff) + return 0; + if (status != 0 && (status & RL_INTRS) == 0) { + CSR_WRITE_2(sc, RL_ISR, status); + return 0; + } + if ((status & RL_INTRS) == 0) + return 0; + + CSR_WRITE_2(sc, RL_IMR, 0); + return 1; +} + + +void +HAIKU_REENABLE_INTERRUPTS(device_t dev) +{ + struct rl_softc *sc = device_get_softc(dev); + RL_LOCK(sc); + CSR_WRITE_2(sc, RL_IMR, RL_INTRS); + RL_UNLOCK(sc); +} + Added: haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_re.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_re.c 2008-10-02 21:25:10 UTC (rev 27842) +++ haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_re.c 2008-10-03 05:57:35 UTC (rev 27843) @@ -0,0 +1,3149 @@ +/*- + * Copyright (c) 1997, 1998-2003 + * Bill Paul . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bill Paul. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.95.2.36 2008/09/19 03:36:53 yongari Exp $"); + +/* + * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver + * + * Written by Bill Paul + * Senior Networking Software Engineer + * Wind River Systems + */ + +/* + * This driver is designed to support RealTek's next generation of + * 10/100 and 10/100/1000 PCI ethernet controllers. There are currently + * seven devices in this family: the RTL8139C+, the RTL8169, the RTL8169S, + * RTL8110S, the RTL8168, the RTL8111 and the RTL8101E. + * + * The 8139C+ is a 10/100 ethernet chip. It is backwards compatible + * with the older 8139 family, however it also supports a special + * C+ mode of operation that provides several new performance enhancing + * features. These include: + * + * o Descriptor based DMA mechanism. Each descriptor represents + * a single packet fragment. Data buffers may be aligned on + * any byte boundary. + * + * o 64-bit DMA + * + * o TCP/IP checksum offload for both RX and TX + * + * o High and normal priority transmit DMA rings + * + * o VLAN tag insertion and extraction + * + * o TCP large send (segmentation offload) + * + * Like the 8139, the 8139C+ also has a built-in 10/100 PHY. The C+ + * programming API is fairly straightforward. The RX filtering, EEPROM + * access and PHY access is the same as it is on the older 8139 series + * chips. + * + * The 8169 is a 64-bit 10/100/1000 gigabit ethernet MAC. It has almost the + * same programming API and feature set as the 8139C+ with the following + * differences and additions: + * + * o 1000Mbps mode + * + * o Jumbo frames + * + * o GMII and TBI ports/registers for interfacing with copper + * or fiber PHYs + * + * o RX and TX DMA rings can have up to 1024 descriptors + * (the 8139C+ allows a maximum of 64) + * + * o Slight differences in register layout from the 8139C+ + * + * The TX start and timer interrupt registers are at different locations + * on the 8169 than they are on the 8139C+. Also, the status word in the + * RX descriptor has a slightly different bit layout. The 8169 does not + * have a built-in PHY. Most reference boards use a Marvell 88E1000 'Alaska' + * copper gigE PHY. + * + * The 8169S/8110S 10/100/1000 devices have built-in copper gigE PHYs + * (the 'S' stands for 'single-chip'). These devices have the same + * programming API as the older 8169, but also have some vendor-specific + * registers for the on-board PHY. The 8110S is a LAN-on-motherboard + * part designed to be pin-compatible with the RealTek 8100 10/100 chip. + * + * This driver takes advantage of the RX and TX checksum offload and + * VLAN tag insertion/extraction features. It also implements TX + * interrupt moderation using the timer interrupt registers, which + * significantly reduces TX interrupt load. There is also support + * for jumbo frames, however the 8169/8169S/8110S can not transmit + * jumbo frames larger than 7440, so the max MTU possible with this + * driver is 7422 bytes. + */ + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +MODULE_DEPEND(re, pci, 1, 1, 1); +MODULE_DEPEND(re, ether, 1, 1, 1); +MODULE_DEPEND(re, miibus, 1, 1, 1); + +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + +/* Tunables. */ +static int msi_disable = 1; +TUNABLE_INT("hw.re.msi_disable", &msi_disable); + +#define RE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + +/* + * Various supported device vendors/types and their names. + */ +static struct rl_type re_devs[] = { + { DLINK_VENDORID, DLINK_DEVICEID_528T, 0, + "D-Link DGE-528(T) Gigabit Ethernet Adapter" }, + { RT_VENDORID, RT_DEVICEID_8139, 0, + "RealTek 8139C+ 10/100BaseTX" }, + { RT_VENDORID, RT_DEVICEID_8101E, 0, + "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, + { RT_VENDORID, RT_DEVICEID_8168, 0, + "RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe " + "Gigabit Ethernet" }, + { RT_VENDORID, RT_DEVICEID_8169, 0, + "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, + { RT_VENDORID, RT_DEVICEID_8169SC, 0, + "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" }, + { COREGA_VENDORID, COREGA_DEVICEID_CGLAPCIGT, 0, + "Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet" }, + { LINKSYS_VENDORID, LINKSYS_DEVICEID_EG1032, 0, + "Linksys EG1032 (RTL8169S) Gigabit Ethernet" }, + { USR_VENDORID, USR_DEVICEID_997902, 0, + "US Robotics 997902 (RTL8169S) Gigabit Ethernet" } +}; + +static struct rl_hwrev re_hwrevs[] = { + { RL_HWREV_8139, RL_8139, "" }, + { RL_HWREV_8139A, RL_8139, "A" }, + { RL_HWREV_8139AG, RL_8139, "A-G" }, + { RL_HWREV_8139B, RL_8139, "B" }, + { RL_HWREV_8130, RL_8139, "8130" }, + { RL_HWREV_8139C, RL_8139, "C" }, + { RL_HWREV_8139D, RL_8139, "8139D/8100B/8100C" }, + { RL_HWREV_8139CPLUS, RL_8139CPLUS, "C+"}, + { RL_HWREV_8168_SPIN1, RL_8169, "8168"}, + { RL_HWREV_8169, RL_8169, "8169"}, + { RL_HWREV_8169S, RL_8169, "8169S"}, + { RL_HWREV_8110S, RL_8169, "8110S"}, + { RL_HWREV_8169_8110SB, RL_8169, "8169SB"}, + { RL_HWREV_8169_8110SC, RL_8169, "8169SC"}, + { RL_HWREV_8169_8110SBL, RL_8169, "8169SBL"}, + { RL_HWREV_8100, RL_8139, "8100"}, + { RL_HWREV_8101, RL_8139, "8101"}, + { RL_HWREV_8100E, RL_8169, "8100E"}, + { RL_HWREV_8101E, RL_8169, "8101E"}, + { RL_HWREV_8102E, RL_8169, "8102E"}, + { RL_HWREV_8102EL, RL_8169, "8102EL"}, + { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, + { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, + { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, + { RL_HWREV_8168C_SPIN2, RL_8169, "8168C/8111C"}, + { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, + { 0, 0, NULL } +}; + +static int re_probe (device_t); +static int re_attach (device_t); +static int re_detach (device_t); + +static struct mbuf *re_defrag (struct mbuf *, int, int); +static int re_encap (struct rl_softc *, struct mbuf **); + +static void re_dma_map_addr (void *, bus_dma_segment_t *, int, int); +static int re_allocmem (device_t, struct rl_softc *); +static __inline void re_discard_rxbuf + (struct rl_softc *, int); +static int re_newbuf (struct rl_softc *, int); +static int re_rx_list_init (struct rl_softc *); +static int re_tx_list_init (struct rl_softc *); +#ifdef RE_FIXUP_RX +static __inline void re_fixup_rx + (struct mbuf *); +#endif +static int re_rxeof (struct rl_softc *); +static void re_txeof (struct rl_softc *); +#ifdef DEVICE_POLLING +static void re_poll (struct ifnet *, enum poll_cmd, int); +static void re_poll_locked (struct ifnet *, enum poll_cmd, int); +#endif +static int re_intr (void *); +static void re_tick (void *); +static void re_tx_task (void *, int); +static void re_int_task (void *, int); +static void re_start (struct ifnet *); +static int re_ioctl (struct ifnet *, u_long, caddr_t); +static void re_init (void *); +static void re_init_locked (struct rl_softc *); +static void re_stop (struct rl_softc *); +static void re_watchdog (struct rl_softc *); +static int re_suspend (device_t); +static int re_resume (device_t); +static int re_shutdown (device_t); +static int re_ifmedia_upd (struct ifnet *); +static void re_ifmedia_sts (struct ifnet *, struct ifmediareq *); + +static void re_eeprom_putbyte (struct rl_softc *, int); +static void re_eeprom_getword (struct rl_softc *, int, u_int16_t *); +static void re_read_eeprom (struct rl_softc *, caddr_t, int, int); +static int re_gmii_readreg (device_t, int, int); +static int re_gmii_writereg (device_t, int, int, int); + +static int re_miibus_readreg (device_t, int, int); +static int re_miibus_writereg (device_t, int, int, int); +static void re_miibus_statchg (device_t); + +static void re_setmulti (struct rl_softc *); +static void re_reset (struct rl_softc *); +static void re_setwol (struct rl_softc *); +static void re_clrwol (struct rl_softc *); + +#ifdef RE_DIAG +static int re_diag (struct rl_softc *); +#endif + +static device_method_t re_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, re_probe), + DEVMETHOD(device_attach, re_attach), + DEVMETHOD(device_detach, re_detach), + DEVMETHOD(device_suspend, re_suspend), + DEVMETHOD(device_resume, re_resume), + DEVMETHOD(device_shutdown, re_shutdown), + + /* bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, re_miibus_readreg), + DEVMETHOD(miibus_writereg, re_miibus_writereg), + DEVMETHOD(miibus_statchg, re_miibus_statchg), + + { 0, 0 } +}; + +static driver_t re_driver = { + "re", + re_methods, + sizeof(struct rl_softc) +}; + +static devclass_t re_devclass; + +DRIVER_MODULE(re, pci, re_driver, re_devclass, 0, 0); +DRIVER_MODULE(re, cardbus, re_driver, re_devclass, 0, 0); +DRIVER_MODULE(miibus, re, miibus_driver, miibus_devclass, 0, 0); + +#define EE_SET(x) \ + CSR_WRITE_1(sc, RL_EECMD, \ + CSR_READ_1(sc, RL_EECMD) | x) + +#define EE_CLR(x) \ + CSR_WRITE_1(sc, RL_EECMD, \ + CSR_READ_1(sc, RL_EECMD) & ~x) + +/* + * Send a read command and address to the EEPROM, check for ACK. + */ +static void +re_eeprom_putbyte(struct rl_softc *sc, int addr) +{ + int d, i; + + d = addr | (RL_9346_READ << sc->rl_eewidth); + + /* + * Feed in each bit and strobe the clock. + */ + + for (i = 1 << (sc->rl_eewidth + 3); i; i >>= 1) { + if (d & i) { + EE_SET(RL_EE_DATAIN); + } else { + EE_CLR(RL_EE_DATAIN); + } + DELAY(100); + EE_SET(RL_EE_CLK); + DELAY(150); + EE_CLR(RL_EE_CLK); + DELAY(100); + } +} + +/* + * Read a word of data stored in the EEPROM at address 'addr.' + */ +static void +re_eeprom_getword(struct rl_softc *sc, int addr, u_int16_t *dest) +{ + int i; + u_int16_t word = 0; + + /* + * Send address of word we want to read. + */ + re_eeprom_putbyte(sc, addr); + + /* + * Start reading bits from EEPROM. + */ + for (i = 0x8000; i; i >>= 1) { + EE_SET(RL_EE_CLK); + DELAY(100); + if (CSR_READ_1(sc, RL_EECMD) & RL_EE_DATAOUT) + word |= i; + EE_CLR(RL_EE_CLK); + DELAY(100); + } + + *dest = word; +} + +/* + * Read a sequence of words from the EEPROM. + */ +static void +re_read_eeprom(struct rl_softc *sc, caddr_t dest, int off, int cnt) +{ + int i; + u_int16_t word = 0, *ptr; + + CSR_SETBIT_1(sc, RL_EECMD, RL_EEMODE_PROGRAM); + + DELAY(100); + + for (i = 0; i < cnt; i++) { + CSR_SETBIT_1(sc, RL_EECMD, RL_EE_SEL); + re_eeprom_getword(sc, off + i, &word); + CSR_CLRBIT_1(sc, RL_EECMD, RL_EE_SEL); + ptr = (u_int16_t *)(dest + (i * 2)); + *ptr = word; + } + + CSR_CLRBIT_1(sc, RL_EECMD, RL_EEMODE_PROGRAM); +} + +static int +re_gmii_readreg(device_t dev, int phy, int reg) +{ + struct rl_softc *sc; + u_int32_t rval; + int i; + + if (phy != 1) + return (0); + + sc = device_get_softc(dev); + + /* Let the rgephy driver read the GMEDIASTAT register */ + + if (reg == RL_GMEDIASTAT) { + rval = CSR_READ_1(sc, RL_GMEDIASTAT); + return (rval); + } + + CSR_WRITE_4(sc, RL_PHYAR, reg << 16); + DELAY(1000); + + for (i = 0; i < RL_TIMEOUT; i++) { + rval = CSR_READ_4(sc, RL_PHYAR); + if (rval & RL_PHYAR_BUSY) + break; + DELAY(100); + } + + if (i == RL_TIMEOUT) { + device_printf(sc->rl_dev, "PHY read failed\n"); + return (0); + } + + return (rval & RL_PHYAR_PHYDATA); +} + +static int +re_gmii_writereg(device_t dev, int phy, int reg, int data) +{ + struct rl_softc *sc; + u_int32_t rval; + int i; + + sc = device_get_softc(dev); + + CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | + (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); + DELAY(1000); + + for (i = 0; i < RL_TIMEOUT; i++) { + rval = CSR_READ_4(sc, RL_PHYAR); + if (!(rval & RL_PHYAR_BUSY)) + break; + DELAY(100); + } + + if (i == RL_TIMEOUT) { + device_printf(sc->rl_dev, "PHY write failed\n"); + return (0); + } + + return (0); +} + +static int +re_miibus_readreg(device_t dev, int phy, int reg) +{ + struct rl_softc *sc; + u_int16_t rval = 0; + u_int16_t re8139_reg = 0; + + sc = device_get_softc(dev); + + if (sc->rl_type == RL_8169) { + rval = re_gmii_readreg(dev, phy, reg); + return (rval); + } + + /* Pretend the internal PHY is only at address 0 */ + if (phy) { + return (0); + } + switch (reg) { + case MII_BMCR: + re8139_reg = RL_BMCR; + break; + case MII_BMSR: + re8139_reg = RL_BMSR; + break; + case MII_ANAR: + re8139_reg = RL_ANAR; + break; + case MII_ANER: + re8139_reg = RL_ANER; + break; + case MII_ANLPAR: + re8139_reg = RL_LPAR; + break; + case MII_PHYIDR1: + case MII_PHYIDR2: + return (0); + /* + * Allow the rlphy driver to read the media status + * register. If we have a link partner which does not + * support NWAY, this is the register which will tell + * us the results of parallel detection. + */ + case RL_MEDIASTAT: + rval = CSR_READ_1(sc, RL_MEDIASTAT); + return (rval); + default: + device_printf(sc->rl_dev, "bad phy register\n"); + return (0); + } + rval = CSR_READ_2(sc, re8139_reg); + if (sc->rl_type == RL_8139CPLUS && re8139_reg == RL_BMCR) { + /* 8139C+ has different bit layout. */ + rval &= ~(BMCR_LOOP | BMCR_ISO); + } + return (rval); +} + +static int +re_miibus_writereg(device_t dev, int phy, int reg, int data) +{ + struct rl_softc *sc; + u_int16_t re8139_reg = 0; + int rval = 0; + + sc = device_get_softc(dev); + + if (sc->rl_type == RL_8169) { + rval = re_gmii_writereg(dev, phy, reg, data); + return (rval); + } + + /* Pretend the internal PHY is only at address 0 */ + if (phy) + return (0); + + switch (reg) { + case MII_BMCR: + re8139_reg = RL_BMCR; + if (sc->rl_type == RL_8139CPLUS) { + /* 8139C+ has different bit layout. */ + data &= ~(BMCR_LOOP | BMCR_ISO); + } + break; + case MII_BMSR: + re8139_reg = RL_BMSR; + break; + case MII_ANAR: + re8139_reg = RL_ANAR; + break; + case MII_ANER: + re8139_reg = RL_ANER; + break; + case MII_ANLPAR: + re8139_reg = RL_LPAR; + break; + case MII_PHYIDR1: + case MII_PHYIDR2: + return (0); + break; + default: + device_printf(sc->rl_dev, "bad phy register\n"); + return (0); + } + CSR_WRITE_2(sc, re8139_reg, data); + return (0); +} + +static void +re_miibus_statchg(device_t dev) +{ + +} + +/* + * Program the 64-bit multicast hash filter. + */ +static void +re_setmulti(struct rl_softc *sc) +{ + struct ifnet *ifp; + int h = 0; + u_int32_t hashes[2] = { 0, 0 }; + struct ifmultiaddr *ifma; + u_int32_t rxfilt; + int mcnt = 0; + + RL_LOCK_ASSERT(sc); + + ifp = sc->rl_ifp; + + + rxfilt = CSR_READ_4(sc, RL_RXCFG); + rxfilt &= ~(RL_RXCFG_RX_ALLPHYS | RL_RXCFG_RX_MULTI); + if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= RL_RXCFG_RX_ALLPHYS; + /* + * Unlike other hardwares, we have to explicitly set + * RL_RXCFG_RX_MULTI to receive multicast frames in + * promiscuous mode. + */ + rxfilt |= RL_RXCFG_RX_MULTI; + CSR_WRITE_4(sc, RL_RXCFG, rxfilt); + CSR_WRITE_4(sc, RL_MAR0, 0xFFFFFFFF); + CSR_WRITE_4(sc, RL_MAR4, 0xFFFFFFFF); + return; + } + + /* first, zot all the existing hash bits */ + CSR_WRITE_4(sc, RL_MAR0, 0); + CSR_WRITE_4(sc, RL_MAR4, 0); + + /* now program new ones */ + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + h = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; + if (h < 32) + hashes[0] |= (1 << h); + else + hashes[1] |= (1 << (h - 32)); + mcnt++; + } + IF_ADDR_UNLOCK(ifp); + + if (mcnt) + rxfilt |= RL_RXCFG_RX_MULTI; + else + rxfilt &= ~RL_RXCFG_RX_MULTI; + + CSR_WRITE_4(sc, RL_RXCFG, rxfilt); + + /* + * For some unfathomable reason, RealTek decided to reverse + * the order of the multicast hash registers in the PCI Express + * parts. This means we have to write the hash pattern in reverse + * order for those devices. + */ + + if ((sc->rl_flags & RL_FLAG_INVMAR) != 0) { + CSR_WRITE_4(sc, RL_MAR0, bswap32(hashes[1])); + CSR_WRITE_4(sc, RL_MAR4, bswap32(hashes[0])); + } else { + CSR_WRITE_4(sc, RL_MAR0, hashes[0]); + CSR_WRITE_4(sc, RL_MAR4, hashes[1]); + } +} + +static void +re_reset(struct rl_softc *sc) +{ + int i; + + RL_LOCK_ASSERT(sc); + + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_RESET); + + for (i = 0; i < RL_TIMEOUT; i++) { + DELAY(10); + if (!(CSR_READ_1(sc, RL_COMMAND) & RL_CMD_RESET)) + break; + } + if (i == RL_TIMEOUT) + device_printf(sc->rl_dev, "reset never completed!\n"); + + CSR_WRITE_1(sc, 0x82, 1); +} + +#ifdef RE_DIAG + +/* + * The following routine is designed to test for a defect on some + * 32-bit 8169 cards. Some of these NICs have the REQ64# and ACK64# + * lines connected to the bus, however for a 32-bit only card, they + * should be pulled high. The result of this defect is that the + * NIC will not work right if you plug it into a 64-bit slot: DMA + * operations will be done with 64-bit transfers, which will fail + * because the 64-bit data lines aren't connected. + * + * There's no way to work around this (short of talking a soldering + * iron to the board), however we can detect it. The method we use + * here is to put the NIC into digital loopback mode, set the receiver + * to promiscuous mode, and then try to send a frame. We then compare + * the frame data we sent to what was received. If the data matches, + * then the NIC is working correctly, otherwise we know the user has + * a defective NIC which has been mistakenly plugged into a 64-bit PCI + * slot. In the latter case, there's no way the NIC can work correctly, + * so we print out a message on the console and abort the device attach. + */ + +static int +re_diag(struct rl_softc *sc) +{ + struct ifnet *ifp = sc->rl_ifp; + struct mbuf *m0; + struct ether_header *eh; + struct rl_desc *cur_rx; + u_int16_t status; + u_int32_t rxstat; + int total_len, i, error = 0, phyaddr; + u_int8_t dst[] = { 0x00, 'h', 'e', 'l', 'l', 'o' }; + u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' }; + + /* Allocate a single mbuf */ + MGETHDR(m0, M_DONTWAIT, MT_DATA); + if (m0 == NULL) + return (ENOBUFS); + + RL_LOCK(sc); + + /* + * Initialize the NIC in test mode. This sets the chip up + * so that it can send and receive frames, but performs the + * following special functions: + * - Puts receiver in promiscuous mode + * - Enables digital loopback mode + * - Leaves interrupts turned off + */ + + ifp->if_flags |= IFF_PROMISC; + sc->rl_testmode = 1; + re_reset(sc); + re_init_locked(sc); + sc->rl_flags |= RL_FLAG_LINK; + if (sc->rl_type == RL_8169) + phyaddr = 1; + else + phyaddr = 0; + + re_miibus_writereg(sc->rl_dev, phyaddr, MII_BMCR, BMCR_RESET); + for (i = 0; i < RL_TIMEOUT; i++) { + status = re_miibus_readreg(sc->rl_dev, phyaddr, MII_BMCR); + if (!(status & BMCR_RESET)) + break; + } + + re_miibus_writereg(sc->rl_dev, phyaddr, MII_BMCR, BMCR_LOOP); + CSR_WRITE_2(sc, RL_ISR, RL_INTRS); + + DELAY(100000); + + /* Put some data in the mbuf */ + + eh = mtod(m0, struct ether_header *); + bcopy ((char *)&dst, eh->ether_dhost, ETHER_ADDR_LEN); + bcopy ((char *)&src, eh->ether_shost, ETHER_ADDR_LEN); + eh->ether_type = htons(ETHERTYPE_IP); + m0->m_pkthdr.len = m0->m_len = ETHER_MIN_LEN - ETHER_CRC_LEN; + + /* + * Queue the packet, start transmission. + * Note: IF_HANDOFF() ultimately calls re_start() for us. + */ + + CSR_WRITE_2(sc, RL_ISR, 0xFFFF); + RL_UNLOCK(sc); + /* XXX: re_diag must not be called when in ALTQ mode */ + IF_HANDOFF(&ifp->if_snd, m0, ifp); + RL_LOCK(sc); + m0 = NULL; + + /* Wait for it to propagate through the chip */ + + DELAY(100000); + for (i = 0; i < RL_TIMEOUT; i++) { + status = CSR_READ_2(sc, RL_ISR); + CSR_WRITE_2(sc, RL_ISR, status); + if ((status & (RL_ISR_TIMEOUT_EXPIRED|RL_ISR_RX_OK)) == + (RL_ISR_TIMEOUT_EXPIRED|RL_ISR_RX_OK)) + break; + DELAY(10); + } + + if (i == RL_TIMEOUT) { + device_printf(sc->rl_dev, + "diagnostic failed, failed to receive packet in" + " loopback mode\n"); + error = EIO; + goto done; + } + + /* + * The packet should have been dumped into the first + * entry in the RX DMA ring. Grab it from there. + */ + + bus_dmamap_sync(sc->rl_ldata.rl_rx_list_tag, + sc->rl_ldata.rl_rx_list_map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag, + sc->rl_ldata.rl_rx_desc[0].rx_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->rl_ldata.rl_rx_mtag, + sc->rl_ldata.rl_rx_desc[0].rx_dmamap); + + m0 = sc->rl_ldata.rl_rx_desc[0].rx_m; + sc->rl_ldata.rl_rx_desc[0].rx_m = NULL; + eh = mtod(m0, struct ether_header *); + + cur_rx = &sc->rl_ldata.rl_rx_list[0]; + total_len = RL_RXBYTES(cur_rx); + rxstat = le32toh(cur_rx->rl_cmdstat); + + if (total_len != ETHER_MIN_LEN) { + device_printf(sc->rl_dev, + "diagnostic failed, received short packet\n"); + error = EIO; + goto done; + } + + /* Test that the received packet data matches what we sent. */ + + if (bcmp((char *)&eh->ether_dhost, (char *)&dst, ETHER_ADDR_LEN) || + bcmp((char *)&eh->ether_shost, (char *)&src, ETHER_ADDR_LEN) || + ntohs(eh->ether_type) != ETHERTYPE_IP) { + device_printf(sc->rl_dev, "WARNING, DMA FAILURE!\n"); + device_printf(sc->rl_dev, "expected TX data: %6D/%6D/0x%x\n", + dst, ":", src, ":", ETHERTYPE_IP); + device_printf(sc->rl_dev, "received RX data: %6D/%6D/0x%x\n", + eh->ether_dhost, ":", eh->ether_shost, ":", + ntohs(eh->ether_type)); + device_printf(sc->rl_dev, "You may have a defective 32-bit " + "NIC plugged into a 64-bit PCI slot.\n"); + device_printf(sc->rl_dev, "Please re-install the NIC in a " + "32-bit slot for proper operation.\n"); + device_printf(sc->rl_dev, "Read the re(4) man page for more " + "details.\n"); + error = EIO; + } + +done: + /* Turn interface off, release resources */ + + sc->rl_testmode = 0; + sc->rl_flags &= ~RL_FLAG_LINK; + ifp->if_flags &= ~IFF_PROMISC; + re_stop(sc); + if (m0 != NULL) + m_freem(m0); + + RL_UNLOCK(sc); + + return (error); +} + +#endif + +/* + * Probe for a RealTek 8139C+/8169/8110 chip. Check the PCI vendor and device + * IDs against our list and return a device name if we find a match. + */ +static int +re_probe(device_t dev) +{ + struct rl_type *t; + uint16_t devid, vendor; + uint16_t revid, sdevid; + int i; + + vendor = pci_get_vendor(dev); + devid = pci_get_device(dev); + revid = pci_get_revid(dev); + sdevid = pci_get_subdevice(dev); + + if (vendor == LINKSYS_VENDORID && devid == LINKSYS_DEVICEID_EG1032) { + if (sdevid != LINKSYS_SUBDEVICE_EG1032_REV3) { + /* + * Only attach to rev. 3 of the Linksys EG1032 adapter. + * Rev. 2 is supported by sk(4). + */ + return (ENXIO); + } + } + + if (vendor == RT_VENDORID && devid == RT_DEVICEID_8139) { + if (revid != 0x20) { + /* 8139, let rl(4) take care of this device. */ + return (ENXIO); + } + } + + t = re_devs; + for (i = 0; i < sizeof(re_devs) / sizeof(re_devs[0]); i++, t++) { + if (vendor == t->rl_vid && devid == t->rl_did) { + device_set_desc(dev, t->rl_name); + return (BUS_PROBE_DEFAULT); + } + } + + return (ENXIO); +} + +/* + * Map a single buffer address. + */ + +static void +re_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + bus_addr_t *addr; + [... truncated: 3348 lines follow ...] From jackburton at mail.berlios.de Fri Oct 3 08:03:41 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Fri, 3 Oct 2008 08:03:41 +0200 Subject: [Haiku-commits] r27844 - in haiku/trunk: headers/private/interface src/kits/interface Message-ID: <200810030603.m9363fX5014471@sheep.berlios.de> Author: jackburton Date: 2008-10-03 08:03:27 +0200 (Fri, 03 Oct 2008) New Revision: 27844 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27844&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: Menus can be scrolled also using the mouse wheel Modified: haiku/trunk/headers/private/interface/MenuWindow.h =================================================================== --- haiku/trunk/headers/private/interface/MenuWindow.h 2008-10-03 05:57:35 UTC (rev 27843) +++ haiku/trunk/headers/private/interface/MenuWindow.h 2008-10-03 06:03:27 UTC (rev 27844) @@ -34,8 +34,9 @@ void AttachScrollers(); void DetachScrollers(); - bool CheckForScrolling(BPoint cursor); - + bool CheckForScrolling(const BPoint &cursor); + bool TryScrollBy(const float &step); + private: BMenu *fMenu; BMenuFrame *fMenuFrame; @@ -45,7 +46,8 @@ float fValue; float fLimit; - bool _Scroll(BPoint cursor); + bool _Scroll(const BPoint &cursor); + void _ScrollBy(const float &step); }; } // namespace BPrivate Modified: haiku/trunk/src/kits/interface/Menu.cpp =================================================================== --- haiku/trunk/src/kits/interface/Menu.cpp 2008-10-03 05:57:35 UTC (rev 27843) +++ haiku/trunk/src/kits/interface/Menu.cpp 2008-10-03 06:03:27 UTC (rev 27844) @@ -813,7 +813,30 @@ void BMenu::MessageReceived(BMessage *msg) { - BView::MessageReceived(msg); + 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; + + BMenuWindow *window = dynamic_cast(Window()); + if (window == NULL) + return; + + window->TryScrollBy(deltaY); + + break; + } + default: + BView::MessageReceived(msg); + break; + } + + } Modified: haiku/trunk/src/kits/interface/MenuWindow.cpp =================================================================== --- haiku/trunk/src/kits/interface/MenuWindow.cpp 2008-10-03 05:57:35 UTC (rev 27843) +++ haiku/trunk/src/kits/interface/MenuWindow.cpp 2008-10-03 06:03:27 UTC (rev 27844) @@ -336,7 +336,7 @@ bool -BMenuWindow::CheckForScrolling(BPoint cursor) +BMenuWindow::CheckForScrolling(const BPoint &cursor) { if (!fMenuFrame || !fUpperScroller || !fLowerScroller) return false; @@ -346,17 +346,45 @@ bool -BMenuWindow::_Scroll(BPoint cursor) +BMenuWindow::TryScrollBy(const float &step) { + if (!fMenuFrame || !fUpperScroller || !fLowerScroller) + return false; + + _ScrollBy(step); + + return true; +} + + +bool +BMenuWindow::_Scroll(const BPoint &where) +{ ASSERT((fLowerScroller != NULL)); ASSERT((fUpperScroller != NULL)); - ConvertFromScreen(&cursor); + const BPoint cursor = ConvertFromScreen(where); BRect lowerFrame = fLowerScroller->Frame(); BRect upperFrame = fUpperScroller->Frame(); if (fLowerScroller->IsEnabled() && lowerFrame.Contains(cursor)) { + _ScrollBy(1); + } else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor)) { + _ScrollBy(-1); + } else + return false; + + snooze(10000); + + return true; +} + + +void +BMenuWindow::_ScrollBy(const float &step) +{ + if (step > 0) { if (fValue == 0) { fUpperScroller->SetEnabled(true); fUpperScroller->Invalidate(); @@ -374,7 +402,7 @@ fMenu->ScrollBy(0, kScrollStep); fValue += kScrollStep; } - } else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor)) { + } else if (step < 0) { if (fValue == fLimit) { fLowerScroller->SetEnabled(true); fLowerScroller->Invalidate(); @@ -390,11 +418,6 @@ fMenu->ScrollBy(0, -kScrollStep); fValue -= kScrollStep; } - } else - return false; - - snooze(10000); - - return true; + } } From jackburton at mail.berlios.de Fri Oct 3 08:25:29 2008 From: jackburton at mail.berlios.de (jackburton at BerliOS) Date: Fri, 3 Oct 2008 08:25:29 +0200 Subject: [Haiku-commits] r27845 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810030625.m936PTKf015973@sheep.berlios.de> Author: jackburton Date: 2008-10-03 08:25:28 +0200 (Fri, 03 Oct 2008) New Revision: 27845 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27845&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: removed useless sprintf() call, added a TODO Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-03 06:03:27 UTC (rev 27844) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-03 06:25:28 UTC (rev 27845) @@ -20,7 +20,8 @@ static void -dump_acpi_namespace(acpi_ns_device_info *device, char *root, void *buf, size_t* num_bytes, int indenting) { +dump_acpi_namespace(acpi_ns_device_info *device, char *root, void *buf, size_t* num_bytes, int indenting) +{ char result[255]; char output[255]; char tabs[255]; @@ -89,8 +90,9 @@ sprintf(output, "%s BUFFER_FIELD", output); break; } - sprintf(output, "%s\n", output); - + // TODO: This is obviously broken! + // We should respect "*num_bytes", otherwise + // we could have a buffer overflow. See ticket #2786 sprintf((buf + *num_bytes), "%s", output); *num_bytes += strlen(output); From stippi at mail.berlios.de Fri Oct 3 10:03:45 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Fri, 3 Oct 2008 10:03:45 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images Message-ID: <200810030803.m9383jel024689@sheep.berlios.de> Author: stippi Date: 2008-10-03 10:03:14 +0200 (Fri, 03 Oct 2008) New Revision: 27846 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27846&view=rev Added: haiku/trunk/docs/welcome/ haiku/trunk/docs/welcome/attributes-images/ haiku/trunk/docs/welcome/attributes-images/people.png haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/bugreports.html haiku/trunk/docs/welcome/deskbar-images/ haiku/trunk/docs/welcome/deskbar-images/calendar.png haiku/trunk/docs/welcome/deskbar-images/configure.png haiku/trunk/docs/welcome/deskbar-images/list-of-apps.png haiku/trunk/docs/welcome/deskbar-images/positions.png haiku/trunk/docs/welcome/deskbar-images/settings.png haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/filetypes-images/ haiku/trunk/docs/welcome/filetypes-images/filetype-addon-stylededit.png haiku/trunk/docs/welcome/filetypes-images/filetype-addon.png haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/gui-images/ haiku/trunk/docs/welcome/gui-images/gui.png haiku/trunk/docs/welcome/gui.html haiku/trunk/docs/welcome/index.html haiku/trunk/docs/welcome/queries-images/ haiku/trunk/docs/welcome/queries-images/basic-query.png haiku/trunk/docs/welcome/queries-images/formula-query.png haiku/trunk/docs/welcome/queries-images/query-window-filled.png haiku/trunk/docs/welcome/queries-images/query-window.png haiku/trunk/docs/welcome/queries-images/result-window.png haiku/trunk/docs/welcome/queries.html haiku/trunk/docs/welcome/tracker-images/ haiku/trunk/docs/welcome/tracker-images/drill-down.png haiku/trunk/docs/welcome/tracker-images/mount-settings.png haiku/trunk/docs/welcome/tracker-images/new-menu.png haiku/trunk/docs/welcome/tracker-images/open-with.png haiku/trunk/docs/welcome/tracker-images/tracker-preferences-navigator.png haiku/trunk/docs/welcome/tracker-images/window-drill-down.png haiku/trunk/docs/welcome/tracker-images/window-menu.png haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/twitcher-images/ haiku/trunk/docs/welcome/twitcher-images/twitcher.png haiku/trunk/docs/welcome/twitcher.html haiku/trunk/docs/welcome/welcome-images/ haiku/trunk/docs/welcome/welcome-images/dummy.png haiku/trunk/docs/welcome/welcome-images/shijin-logo.png haiku/trunk/docs/welcome/welcome.html haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/ haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/filetype-extra-attribute.png haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/filetypes-dvddb-empty.png haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/filetypes-dvddb.png haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/filetypes-new-file-type.png haiku/trunk/docs/welcome/workshop-filetypes+attributes-images/query-dvddb.png haiku/trunk/docs/welcome/workshop-filetypes+attributes.html haiku/trunk/docs/welcome/workspaces-images/ haiku/trunk/docs/welcome/workspaces-images/workspaces.png haiku/trunk/docs/welcome/workspaces.html Log: Contribution by Humdinger: Firt version of the "Welcome Package" introductory documentation. Added: haiku/trunk/docs/welcome/attributes-images/people.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/attributes-images/people.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,138 @@ + + + + + Attributes + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

Attributes

+

Attributes are data fields that belong to a file but aren't part of that file, e.g. they are not computed into the file size and can be copied or changed without touching the file itself. The system uses these attributes to store e.g. file size, file type or date of the last modification. This is similar to other operating systems and their filesystems. +

What's different is that you can add any kind of attribute to any file and display it or make it editable in a Tracker window. You just have to define the kind of attribute you want to add to a file type (e.g. string, integer or time) and give it a name and description. +

The file itself doesn't even need any contents at all. Take a look at these People files for example: +

+people.png +

As you can see, these are all 0-sized files with attached attributes, the E-mail attribute of "John Nox" being edited right in Tracker. +

If you index these attributes, as People, Email or audio files are by default, they are also searchable with Haiku's fast query system. +

+
+

Attributes in Tracker

+

Attributes are displayed quite similar to a database or spreadsheet. Using Tracker you can choose which attributes to display (columns) and sort file listings (rows) accordingly. +

To do this, open a Tracker window, click on the Attributes menu, and select the attributes you want to display. Alternatively, simply right-click onto a column heading and mark the items in the context menu. You can rearrange the columns by a simple drag&drop of the column heading. Moving a column out of a window, is a fast way to get rid of columns you don't need. +

Double-click on the line between two attributes in the heading to automatically resize a column to its optimal width. +

Click on a column heading to toggle the sorting order from ascending to descending. You can establish a secondary sort order by pressing the SHIFT key while clicking on a column heading. Doing that you can, for example, sort your People files by company and within that order sort by contact name. See the above screenshot as an example. The secondary sort order is marked by a dotted line under the heading. +

Editing these attributes is as simple as renaming a file: Either click on an entry or press ALT+E and move between the attibutes with TAB and SHIFT+TAB. ESC leaves the editing mode without applying the changes. +

+
+

Attributes in Terminal

+

If you prefer to use the commandline or plan to work with many files using scripting, there are several commands for controlling attributes from Terminal: +

+
  • listattr - lists a file's attributes, but doesn't show the contents of the attributes.
    +
    usage: listattr 'filename' ['filename' ...]
    +

    From our screenshot example above: +

    +
    55 ~/people ->listattr Clara\ Botters
    +File: Clara Botters
    +   Type         Size                 Name
    +-----------  ---------  -------------------------------
    +MIME String         21  "BEOS:TYPE"
    +        Text         14  "META:name"
    +        Text          6  "META:nickname"
    +        Text          1  "META:company"
    +
    +        Text         18  "META:address"
    +        Text          8  "META:city"
    +        Text          1  "META:state"
    +        Text          1  "META:zip"
    +        Text          1  "META:country"
    +
    +        Text          1  "META:hphone"
    +        Text         13  "META:wphone"
    +        Text          1  "META:fax"
    +        Text         19  "META:email"
    +        Text          1  "META:url"
    +
    +        Text          5  "META:group"
    +    Raw Data         20  "_trk/pinfo_le"
    + 
    +131 bytes total in attributes.
    +

    Besides all the "META:*" attributes that hold the contact's information, there are two attributes that are managed by the system: +

    +

    • BEOS:TYPE holds the file type as a MIME string, here "application/x-person. It determines the default icon and the application that opens the file when you e.g. double click it.
    • +
    • "_trk/pinfo_le" is kept by Tracker as... I'm not sure, I'm still investigating... :)

    +

    Note the backslash after "Clara". In Terminal you have to "escape" special characters like '"*\$?!. The space between "Clara" and "Botters" is also one of those. Therefore the backslash is really in front of the space character, and not after "Clara".

  • +


    +

    +
  • catattr - displays the contents of a specific attribute of a file. +
    usage: catattr [--raw|-r] attr_name file1 [file2...]
    +

    Again our example: +

    +
    56 ~/people ->catattr META:city Clara\ Botters
    +Clara Botters : string : Whelton
  • + +


    +

    +
  • addattr - adds an attribute to a file and/or fills it with a value. +
    usage: addattr [-t type] attr value file1 [file2...]
    +    or: addattr [-f value-from-file] [-t type] attr file1 [file2...]
    + 
    +         Type is one of:
    +                 string, mime, int, llong, float, double, bool, raw
    +                 or a numeric value (ie. 0x1234, 42, 'ABCD', ...)
    +         The default is "string"
    +

    So, say dear Clara took a job with the multi-national Barkelbaer Inc., you fill +the formerly empty "Company" attribute with that data (which is of type +"string"): +

    +
    addattr -t string META:company Barkelbaer\ Inc. Clara\ Botters
    +
  • +


    +

    +
  • rmattr - completely removes an attribute from a file. + +
    usage: rmattr [-p] attr filename1 [filename2...]
    +         'attr' is the name of an attribute of the file
    +         If '-p' is specified, 'attr' is regarded as a pattern.
    +

    Though in all practicality it would be enough to just not fill the "Fax" +attribute, you can completely remove it from Clara's file by typing: +

    +
    rmattr META:fax Clara\ Botters
  • +


    +

    +
  • copyattr - copies attributes from one or more files to another. By +default, the actual contents of the file is not copied. +
    Usage: copyattr <options> <source> [ ... ] <destination>
    + +

    If you do want to copy the attributes plus the data of the file itself, you can +

    +add the option "-d" or "--data".
  • +
+


+More information on these commands and their options can be found by typing the +command name followed by "-h" or "--help". +

+ +
+ + Added: haiku/trunk/docs/welcome/bugreports.html =================================================================== --- haiku/trunk/docs/welcome/bugreports.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/bugreports.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,47 @@ + + + + + Bugreporting + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

Reporting bugs

+

Since our developers are unable to test every hardware combination, nor every different way of interacting with the operating system, we are relying on you to give us some input on how things work at your end. Since this is a very early product, it is very likely that you will encounter bugs. We thank you for taking the time to report these.

+Please follow these guidelines to create helpful bug reports:

+ +
  1. Before reporting a bug please make sure that it does not yet exist. You can also use the search function for this.

  2. +
  3. After you have established this is a unique bug, make your information as accurate as possible:

    +
      +
    • Include basic information such as how you are testing Haiku (on real hardware, on VMWare, on QEMU, etc.).

    • +
    • Mention which revision from SVN you are running. You can find this information in 'About This System...' from the Deskbar menu.

    • +
    • Describe the problem you are experiencing. Try to be as accurate as you can: describe the actual behavior, and the behavior you expected.

    • +
    • Describe what steps to you need to perform in order to expose the bug. This will help developers reproduce the bug.

    • +
    • Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to make a screen shot (the PRINT key files a PNG into /boot/home/).
      If it is a hardware problem, include a copy of the syslog file (just query for "syslog" to find it).
    • +

  4. +
  5. After the bug has been reported, a developer will look at your bug and try to classify it. Remember, we are all volunteers, and as such, sometimes a bug report might go unanswered for a while. Adding new information when it becomes available usually helps getting a bug picked up quicker, but do not try to 'bump' the bug up by adding non-descriptive comments.

  6. +
  7. Remember, reporting a bug is not something you spend a little time on and then you are done. If you reported a bug, then you are part of the Haiku development process. Developers might come up with questions while they are trying to fix your bug. Please stay around to answer these. Consider your participation 'done' when the bug is marked as 'fixed'. Together we can improve Haiku, bit by bit. +
+
+ + Added: haiku/trunk/docs/welcome/deskbar-images/calendar.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/deskbar-images/calendar.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/deskbar-images/configure.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/deskbar-images/configure.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/deskbar-images/list-of-apps.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/deskbar-images/list-of-apps.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/deskbar-images/positions.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/deskbar-images/positions.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/deskbar-images/settings.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/deskbar-images/settings.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/deskbar.html =================================================================== --- haiku/trunk/docs/welcome/deskbar.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/deskbar.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,88 @@ + + + + + The Deskbar + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

The Deskbar

+

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 has to be in this compacted format when it's put in the lower corners of the screen. +


+

The Deskbar Menu

+

A menu opens when you click on the Deskbar's uppermost part: +
+settings.png +
+

    +
  • About This System... -- Shows some basic information of the system, licenses and the credits of the Haiku project.
  • + +
  • Find... -- Opens the query dialog.
  • +
  • Show Replicants -- Shows/hides the little Replicant widget you use to drag it around, remove or access its context menu.
  • +
  • Deskbar Settings
      +
    • Configure Deskbar Menu... -- Opens a panel to configure the Deskbar menu (see below).
    • +
    • Always on Top -- The Deskbar always stays above all other windows.
    • +
    • Auto Raise -- The Deskbar pops to the front if the mouse pointer touches it.
    • +
    • Sort Running Applications -- Sorts the list of running programs alphabetically.
    • +
    • Tracker always First -- Even if you sort alphabetically, the Tracker entry always stays first in the list.</i>
    • +
    • 24 Hour Clock -- Toggles between 24 and 12 hour clock.
    • +
    • Show Seconds -- Adds the display of seconds to the clock.
    • +
    • European Date -- Shows the date in European format: day-month-year
    • +
    • ---- Full Date ----
    • +
    • Show Application Expander -- Provides a small widget to show/hide all windows of a program directly under its entry in the Deskbar.
    • +
    • Expand New Applications -- Newly launched programs have their windows automatically expanded under their entry in the Deskbar.
    • +
  • +
  • Restart -- Restarts the system.
  • +
  • Shutdown -- Shuts down the system.
  • +
  • Recent Documents, Folders, Applications -- List the last recently opened documents, folders and applications (see Configure Deskbar Menu... below). +
  • Applications, Demos, Deskbar Applets, Preferences -- List of installed applications, demos, applets and preferences (see Configure Deskbar Menu... below).
  • +
+
+

Configure Deskbar Menu...

+

+configure.png +

In this panel you set how many recent documents, folders and applications are shown in the Deskbar, or if you show them at all. +

You also configure folders and their contents, which are by default Applications, Demos, Deskbar Applets, and Preferences. You can add your own entries and edit or remove items. +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. +


+

+

The Tray

+calendar.png +

Among other things, the tray's 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

+list-of-apps.png.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 show/hide the list of windows directly under an application's entry. +

In front of every application's windows is a symbol providing info on its state. A bright symbol means a window is visible, a dark one that it's minimized. Three lines in front of a symbol shows that it's not on the current workspace. +

+
+ + Added: haiku/trunk/docs/welcome/filetypes-images/filetype-addon-stylededit.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/filetypes-images/filetype-addon-stylededit.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/filetypes-images/filetype-addon.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/filetypes-images/filetype-addon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/filetypes.html =================================================================== --- haiku/trunk/docs/welcome/filetypes.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/filetypes.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,70 @@ + + + + + Filetypes + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

Filetypes

+

Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.

+
+

Setting the filetype of a specific file

+

You can change the type of a specific file, its icon and the associated application. Select the file and invoke the Add-Ons | Filetype add-on from the right-click context menu. +

+filetype-addon.png +
+

The File Type

+

This is a JPEG file, it's MIME string image/jpeg. Let's say you definitely know that it's not a JPEG but a GIF. You can change that either by entering the correct MIME string by hand or with one of the two buttons below the textbox: +

  • Select... shows a hierarchical list of filetypes where you navigate to image | GIF Image.
  • +
  • Same as... opens a file dialog where you choose any file that already has the filetype you're looking for.
+

+

The Preferred Application

+

This dropdown menu shows a list of all applications that can handle this particular filetype. From here you can choose which program should open this specific file when it's double-clicked. You could, for example, change a HTML file's preferred application from the browser to a text editor while you're working on it. Every other HTML file still opens in the browser, only this particular one starts in your text editor.

+

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 dropdown 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.

+

+

Global settings with the Filetypes Preferences

+

The Filetypes preferences don't deal with individual files but with global settings of filetypes. You can change default icons and preferred applications or add, remove, or alter attributes of whole filetypes. You can even create your own filetype from scratch.

+

All filetypes and their configurations are stored in /boot/home/config/settings/beos_mime. Before you start experimenting, it may be prudent to make a backup of that folder...

+

To learn more about the Filetypes preferences see the workshop: DVDdb (Filetypes & Attributes).

+
+

Special settings for applications

+

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

+filetype-addon-stylededit.png +
+

On top, you'll see, instead of a standardized MIME string, the unique application signature. With it, the system finds the program wherever it's installed.

+

Below it are several flags, controlling the app's behaviour: +

  • Single Launch - Only one instance of the app can be running per executable file. If you have two copies of that app, however, they can run side by side.
  • +
  • Multiple Launch - Many instances of the app can run simultaneously.
  • +
  • Exclusive Launch - Really only one instance with that app's signature is allowed to run at a time.
  • +
  • Args Only - Indicates the app doesn't respond to messages.
  • +
  • Background App - The app won't appear in Twitcher or the list of running apps of the Deskbar.
  • +
+

Then there's the list of supported filetypes. You can add (and remove) filetypes if you think the application can handle them. As a consequence, the app will appear in the menu for preferred applications or Tracker's Open with... context menu when you right-click on a file of that type.

+

At the bottom are version and copyright information. Like the application signature, they are filled in by the app's author and shouldn't be altered.

+
+ + Added: haiku/trunk/docs/welcome/gui-images/gui.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/gui-images/gui.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/gui.html =================================================================== --- haiku/trunk/docs/welcome/gui.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/gui.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,52 @@ + + + + + Haiku's GUI + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

Haiku's GUI

+

Haiku's graphical user interface is an integral part of the system. Unlike linux-based operating systems, there's no separate windows manager and just booting into a commandline shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary. +

As you probably have experience with other graphical environments, let's skip over the standards like menus, right-click context menus, drag&drop etc. Let's have a look at the few unique aspects of Haiku's GUI instead.

+


+

Before we start with that, there's one more thing you'll probably run into quite quickly: By default, Haiku's option key, to invoke commands from menus for example, is not the usual CTRL key, but ALT instead. This has historical reasons, because the BeOS was inspired somewhat by MacOS. After you get used to it, it actually feels better as e.g. ALT+C and ALT+V is reached more conveniently on the keyboard and these commands seemlessly integrate into the bash shell of the Terminal. +

In any case, you can switch to the maybe more familiar CTRL key in the Menu preferences. +

+
+gui.png


+There are only a few things in Haiku's GUI that aren't obvious and deserve an explanation. +

+[1] The Deskbar is Haiku's "Start" menu and taskbar, if you will. See topic Deskbar.
+[2] The yellow tab offers more than just a program's name or a document's filename:

  • You can move it by holding the SHIFT key while dragging it to another position, enabling you to stack a number of windows and conveniently access them by their named tab.
  • +
  • You minimize a window with a double-click on its tab. A such hidden window can be accessed by its entry in the Deskbar or the Twitcher.
  • +
  • You can send a window to the back with a right-click on its tab (or its border).
+[3] The close button.
+[4] The maximise button.
+[5] The resize button. Dragging anywhere else on a window's border will move the window.
+

That's pretty much all there is to Haiku's GUI widgets in general. You'll find more information in Getting to know the system. +

+
+ + Added: haiku/trunk/docs/welcome/index.html =================================================================== --- haiku/trunk/docs/welcome/index.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/index.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,116 @@ + + + + + The Index + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+
+

The Index

+

+Attributes and Queries are key features of Haiku. While attributes are useful on their own, to display additional information on a file, for a query on them, they need to be indexed. It puts them into a lookup table, which in turn makes queries lightning fast.
+The index is part of the filesystem and is kept for every volume/partition separately. +

+
+

Indexing commands in Terminal

+

There are several commands to manage the index: +

    +
  • lsindex - Displays the indexed attributes on the current volume/partition. +

    These are the attributes that are indexed by default:
    +

    58 ~ ->lsindex 
    +BEOS:APP_SIG 
    +MAIL:account 
    +MAIL:cc 
    +MAIL:chain 
    +MAIL:draft 
    +MAIL:flags 
    +MAIL:from 
    +MAIL:name 
    +MAIL:pending_chain 
    +MAIL:priority 
    +MAIL:reply 
    +MAIL:status 
    +MAIL:subject 
    +MAIL:thread 
    +MAIL:to 
    +MAIL:when 
    +META:address 
    +META:city 
    +META:company 
    +META:country 
    +META:email 
    +META:fax 
    +META:group 
    +META:hphone 
    +META:name 
    +META:nickname 
    +META:state 
    +META:url 
    +META:wphone 
    +META:zip 
    +_signature 
    +_status 
    +_trk/qrylastchange 
    +_trk/recentQuery 
    +be:deskbar_item_status 
    +last_modified 
    +name 
    +size 
    +

  • +
  • mkindex - Adds an attribute to the index of a volume/partition. +
    Usage: mkindex [options] <attribute> 
    +Creates a new index for the specified attribute. 
    + 
    +  -d, --volume=PATH     a path on the volume to which the index will be added, 
    +                        defaults to current volume. 
    +  -t, --type=TYPE       the type of the attribute being indexed.  One of "int", 
    +                        "llong", "string", "float", or "double". 
    +                        Defaults to "string". 
    +      --copy-from       path to volume to copy the indexes from. 
    +  -v, --verbose         print information about the index being created 
    +
    +
    +

    Note: Only new files with that attribute come automatically into the index!
    +Existing files have to be added manually by copying them and deleting the originals after that. Alternatively you can use the tool reindex. +

    +
  • +
  • rmindex - Removes an attribute from the index of a volume/partition. +
    Usage: rmindex [OPTION]... INDEX_NAME 
    + 
    +Removes the index named INDEX_NAME from a disk volume.  Once this has been 
    +done, it will no longer be possible to use the query system to search for 
    +files with the INDEX_NAME attribute. 
    + 
    +  -d, --volume=PATH     a path on the volume from which the index will be 
    +                         removed 
    +  -h, --help            display this help and exit 
    +  -p, --pattern         INDEX_NAME is a pattern 
    +  -v, --verbose         print information about the index being removed 
    + 
    +INDEX_NAME is the name of a file attribute. 
    + 
    +If no volume is specified, the volume of the current directory is assumed.
    +
+
+ + Added: haiku/trunk/docs/welcome/queries-images/basic-query.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/queries-images/basic-query.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/queries-images/formula-query.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/queries-images/formula-query.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/queries-images/query-window-filled.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/queries-images/query-window-filled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/queries-images/query-window.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/queries-images/query-window.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/queries-images/result-window.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/queries-images/result-window.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/queries.html =================================================================== --- haiku/trunk/docs/welcome/queries.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/queries.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,117 @@ + + + + + Queries + + + + + + + + + + + + + + + + +
+

Logo

+
+

dummy

+
+

+

Queries

+

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 list of your search, but are the query formulas which trigger a new search whenever you open them. +

+
+

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 +
+

[1] Select previous or saved queries or save the current query.
+[2] Narrow down your search from "All files and folders" to specific file +types.
+[3] Define the search method:

    +
  • by Name - a basic search by filename
  • +
  • by Attribute - an advanced search, you specify search terms for one or more attributes
  • +
  • by Formula - an even more advanced search, you can fine-tune a complex query term
+[4] Select which drives to search on.
+[5] Enter the search term.
+[6] The expander hides/unhides the additional options.
+[7] Uncheck the Temporary checkbox if you don't want this query self-destruct after 7 days.
+[8] Check if your query is supposed to Include trash.
+[9] Optionally, enter a name for this query if you want to save it.
+[10] You can drag&drop the icon to save the query. +


+

+

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"

+

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 (see Index). +
+
+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. +

This adds a dropdown menu to the left of the textbox and the buttons "Add and Remove under that. From the menu you choose which attribute to query. With "Add and Remove you can query additional attributes or remove them again. These attributes can be logically linked with AND/OR. +

Let's do an email query as an example: +
+
+query-winsow-filled.png +

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


+

+

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 +
+

Once more as text, edited for readability: +

+
(((((MAIL:from=="*[cC][lL][aA][rR][aA] [bB][oO][tT][tT][eE][rR][sS]*")
+       &&(MAIL:when>=%2 months%))
+       &&(MAIL:subject=="*[vV][iI][bB][rR][aA][pP][hH][oO][nN][eE]*"))
+       ||(MAIL:subject=="*[sS][kK][eE][pP][tT][iI][cC][aA][lL][iI][tT][yY]*"))
+       &&(BEOS:TYPE=="text/x-email"))
+ +

What's the use? +

+
    +
  • You could copy and paste the string into an email, forum or IRC for others to use or debug.
  • +
  • You can use this method to construct a query in "Attribute mode and then switch to "Formula mode, to comfortably generate a search string to use for a query in Terminal or a script.
  • +
  • You can fine tune your query by inserting paranthesis 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

+

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 grey backgound, result windows work exactly like any other Tracker window. Some things are worth noting: +

+
    +
  • You can open the folder a file resides in by double clicking on its path attribute.
  • +
  • With File | Edit Query or ALT+G you get back to your Find window to refine your query.
  • +
  • A query is live, i.e. if a file that matches your search criteria appears or disappears from your system, this change is reflected in your resuls in +realtime. +
+

You can assign a sensible attribute layout for query results of a specific filetype. Open the folder containing files of the filetype you'd like to create a template for and arrange the attributes how you'd like to have query results presented. Copy this layout with Attributes | Copy Attributes. +

Open /boot/home/config/settings/Tracker/DefaultQueryTemplates, create a new folder and rename it to group/filetype, replacing slashes with underscores, e.g."audio_x-mp3". +Open the new folder and paste in the layout with Attributes | Paste Attributes. +

+
+ + Added: haiku/trunk/docs/welcome/tracker-images/drill-down.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/drill-down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/mount-settings.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/mount-settings.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/new-menu.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/new-menu.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/open-with.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/open-with.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/tracker-preferences-navigator.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/tracker-preferences-navigator.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/window-drill-down.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/window-drill-down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/window-menu.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/window-menu.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-03 06:25:28 UTC (rev 27845) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-03 08:03:14 UTC (rev 27846) @@ -0,0 +1,118 @@ + + + + + The Tracker + + + + + + + + + + + + + + + + [... truncated: 449 lines follow ...] From michael.w.pfeiffer at gmail.com Fri Oct 3 10:34:36 2008 From: michael.w.pfeiffer at gmail.com (Michael Pfeiffer) Date: Fri, 3 Oct 2008 10:34:36 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <200810030803.m9383jel024689@sheep.berlios.de> References: <200810030803.m9383jel024689@sheep.berlios.de> Message-ID: <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> Am 03.10.2008 um 10:03 schrieb stippi at mail.berlios.de: > First version of the "Welcome Package" introductory documentation. Very nice! Some remarks: 1) Pointers in images should be less dominant; they distract from content; may sufficient to change background color to white? 2) Text should fit to window width not to largest image width. 3) Avoid naming other operating systems (like Linux in regard to window managers; maybe use Unix instead). 4) Maybe limit max image width 1024 pixels to be small display size friendly. 5) Spell check (for example garantee -> guarantee). Regards, Michael From axeld at pinc-software.de Fri Oct 3 10:35:52 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Fri, 03 Oct 2008 10:35:52 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r27841_-_in_haiku/trunk/src/system/kern?= =?utf-8?q?el=3A_=2E_arch/x86_arch/x86/timers_device=5Fmanager_disk=5Fdevi?= =?utf-8?q?ce=5Fmanager_util?= In-Reply-To: <200810022122.m92LM4tA015554@sheep.berlios.de> Message-ID: <2677227077-BeMail@zon> bonefish at BerliOS wrote: > volatile uint32 io_register_select; > uint32 reserved[3]; > volatile uint32 io_window_register; > -} ioapic _PACKED; > +} ioapic; What kind of warning would this cause? Besides, it should stay there to prevent wrong compiler alignment (not that this looks like a problem with the structure, but still). Bye, Axel. From superstippi at gmx.de Fri Oct 3 11:19:16 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Fri, 03 Oct 2008 11:19:16 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> Message-ID: <20081003111916.1806.2@stippis2.1223019067.fake> Michael Pfeiffer wrote: > > Am 03.10.2008 um 10:03 schrieb stippi at mail.berlios.de: > > > First version of the "Welcome Package" introductory documentation. > > Very nice! > > Some remarks: > 1) Pointers in images should be less dominant; they distract from > content; may sufficient to change background color to white? > 2) Text should fit to window width not to largest image width. > 3) Avoid naming other operating systems (like Linux in regard to > window managers; maybe use Unix instead). > 4) Maybe limit max image width 1024 pixels to be small display size > friendly. > 5) Spell check (for example garantee -> guarantee). Thanks for the comments! What browser did you use to view this? I am seeing white background in Firefox and the text wraps to window width. (This is the browser that will display it on Haiku if all goes well.) Best regards, -Stephan From michael.w.pfeiffer at gmail.com Fri Oct 3 12:58:28 2008 From: michael.w.pfeiffer at gmail.com (Michael Pfeiffer) Date: Fri, 3 Oct 2008 12:58:28 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <20081003111916.1806.2@stippis2.1223019067.fake> References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> <20081003111916.1806.2@stippis2.1223019067.fake> Message-ID: Am 03.10.2008 um 11:19 schrieb Stephan Assmus: > > Michael Pfeiffer wrote: >> >> Am 03.10.2008 um 10:03 schrieb stippi at mail.berlios.de: >> >>> First version of the "Welcome Package" introductory documentation. >> >> Very nice! >> >> Some remarks: >> 1) Pointers in images should be less dominant; they distract from >> content; may sufficient to change background color to white? >> 2) Text should fit to window width not to largest image width. >> 3) Avoid naming other operating systems (like Linux in regard to >> window managers; maybe use Unix instead). >> 4) Maybe limit max image width 1024 pixels to be small display size >> friendly. >> 5) Spell check (for example garantee -> guarantee). > > Thanks for the comments! What browser did you use to view this? I am > seeing > white background in Firefox and the text wraps to window width. > (This is > the browser that will display it on Haiku if all goes well.) I used Safari on Mac. See attached screenshot for gui.html. -------------- next part -------------- A non-text attachment was scrubbed... Name: Browser.png Type: image/png Size: 35459 bytes Desc: not available URL: -------------- next part -------------- - Michael From ingo_weinhold at gmx.de Fri Oct 3 13:03:43 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Fri, 03 Oct 2008 13:03:43 +0200 Subject: [Haiku-commits] r27841 - in haiku/trunk/src/system/kernel: . arch/x86 arch/x86/timers device_manager disk_device_manager util In-Reply-To: <2677227077-BeMail@zon> References: <2677227077-BeMail@zon> Message-ID: <20081003130343.432.1@knochen-vm.localdomain> On 2008-10-03 at 10:35:52 [+0200], Axel D?rfler wrote: > bonefish at BerliOS wrote: > > volatile uint32 io_register_select; > > uint32 reserved[3]; > > volatile uint32 io_window_register; > > -} ioapic _PACKED; > > +} ioapic; > > What kind of warning would this cause? Besides, it should stay there to > prevent wrong compiler alignment (not that this looks like a problem > with the structure, but still). The warning is something to the effect "attribute packed ignored" (gcc 4 only). Since all members are uint32 or arrays thereof it is superfluous. CU, Ingo From julun at mail.berlios.de Fri Oct 3 13:08:51 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 13:08:51 +0200 Subject: [Haiku-commits] r27847 - haiku/trunk/src/apps/expander Message-ID: <200810031108.m93B8pDn018306@sheep.berlios.de> Author: julun Date: 2008-10-03 13:08:50 +0200 (Fri, 03 Oct 2008) New Revision: 27847 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27847&view=rev Modified: haiku/trunk/src/apps/expander/ExpanderPreferences.cpp haiku/trunk/src/apps/expander/ExpanderWindow.cpp Log: * fix probable memory leaks Modified: haiku/trunk/src/apps/expander/ExpanderPreferences.cpp =================================================================== --- haiku/trunk/src/apps/expander/ExpanderPreferences.cpp 2008-10-03 08:03:14 UTC (rev 27846) +++ haiku/trunk/src/apps/expander/ExpanderPreferences.cpp 2008-10-03 11:08:50 UTC (rev 27847) @@ -231,6 +231,10 @@ ExpanderPreferences::~ExpanderPreferences() { + if (fUsePanel && fUsePanel->RefFilter()) + delete fUsePanel->RefFilter(); + + delete fUsePanel; } Modified: haiku/trunk/src/apps/expander/ExpanderWindow.cpp =================================================================== --- haiku/trunk/src/apps/expander/ExpanderWindow.cpp 2008-10-03 08:03:14 UTC (rev 27846) +++ haiku/trunk/src/apps/expander/ExpanderWindow.cpp 2008-10-03 11:08:50 UTC (rev 27847) @@ -169,6 +169,14 @@ ExpanderWindow::~ExpanderWindow() { + if (fDestPanel && fDestPanel->RefFilter()) + delete fDestPanel->RefFilter(); + + if (fSourcePanel && fSourcePanel->RefFilter()) + delete fSourcePanel->RefFilter(); + + delete fDestPanel; + delete fSourcePanel; } From jackburton at mail.berlios.de Fri Oct 3 13:12:16 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Fri, 3 Oct 2008 13:12:16 +0200 Subject: [Haiku-commits] r27848 - haiku/trunk/src/apps/aboutsystem Message-ID: <200810031112.m93BCGws022541@sheep.berlios.de> Author: jackburton Date: 2008-10-03 13:12:14 +0200 (Fri, 03 Oct 2008) New Revision: 27848 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27848&view=rev Modified: haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp Log: Added Francesco Piccinno (and not Piccinini as I incorrectly wrote in the if_re driver commit message, sorry!) to the about box. Modified: haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp =================================================================== --- haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp 2008-10-03 11:08:50 UTC (rev 27847) +++ haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp 2008-10-03 11:12:14 UTC (rev 27848) @@ -508,6 +508,7 @@ "Alan Murta\n" "Pahtz\n" "Michael Paine\n" + "Francesco Piccinno\n" "David Powell\n" "Jeremy Rand\n" "Hartmut Reh\n" From stefano.ceccherini at gmail.com Fri Oct 3 13:13:05 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Fri, 3 Oct 2008 13:13:05 +0200 Subject: [Haiku-commits] r27847 - haiku/trunk/src/apps/expander In-Reply-To: <200810031108.m93B8pDn018306@sheep.berlios.de> References: <200810031108.m93B8pDn018306@sheep.berlios.de> Message-ID: <894b9700810030413o5f8421dcx4215af19b0a5453e@mail.gmail.com> 2008/10/3 julun at BerliOS : > Author: julun > Date: 2008-10-03 13:08:50 +0200 (Fri, 03 Oct 2008) > New Revision: 27847 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27847&view=rev > > Modified: > haiku/trunk/src/apps/expander/ExpanderPreferences.cpp > haiku/trunk/src/apps/expander/ExpanderWindow.cpp > Log: > * fix probable memory leaks > > Thanks! I completely forgot to fix these ones after I said I would. Sorry! From julun at mail.berlios.de Fri Oct 3 13:17:24 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 13:17:24 +0200 Subject: [Haiku-commits] r27849 - haiku/trunk/src/preferences/backgrounds Message-ID: <200810031117.m93BHO5d029626@sheep.berlios.de> Author: julun Date: 2008-10-03 13:17:23 +0200 (Fri, 03 Oct 2008) New Revision: 27849 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27849&view=rev Modified: haiku/trunk/src/preferences/backgrounds/ImageFilePanel.cpp haiku/trunk/src/preferences/backgrounds/ImageFilePanel.h Log: * fix probable memory leaks Modified: haiku/trunk/src/preferences/backgrounds/ImageFilePanel.cpp =================================================================== --- haiku/trunk/src/preferences/backgrounds/ImageFilePanel.cpp 2008-10-03 11:12:14 UTC (rev 27848) +++ haiku/trunk/src/preferences/backgrounds/ImageFilePanel.cpp 2008-10-03 11:17:23 UTC (rev 27849) @@ -30,6 +30,13 @@ } +ImageFilePanel::~ImageFilePanel() +{ + if (RefFilter()) + delete RefFilter(); +} + + void ImageFilePanel::Show() { Modified: haiku/trunk/src/preferences/backgrounds/ImageFilePanel.h =================================================================== --- haiku/trunk/src/preferences/backgrounds/ImageFilePanel.h 2008-10-03 11:12:14 UTC (rev 27848) +++ haiku/trunk/src/preferences/backgrounds/ImageFilePanel.h 2008-10-03 11:17:23 UTC (rev 27849) @@ -36,6 +36,7 @@ uint32 nodeFlavors = 0, bool allowMultipleSelection = true, BMessage* message = NULL, BRefFilter* filter = NULL, bool modal = false, bool hideWhenDone = true); + ~ImageFilePanel(); virtual void SelectionChanged(); From axeld at pinc-software.de Fri Oct 3 13:18:17 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Fri, 03 Oct 2008 13:18:17 +0200 CEST Subject: [Haiku-commits] r27841 - in haiku/trunk/src/system/kernel: . arch/x86 arch/x86/timers device_manager disk_device_manager util In-Reply-To: <20081003130343.432.1@knochen-vm.localdomain> Message-ID: <12422814079-BeMail@zon> Ingo Weinhold wrote: > On 2008-10-03 at 10:35:52 [+0200], Axel D?rfler > > wrote: > > What kind of warning would this cause? Besides, it should stay > > there to > > prevent wrong compiler alignment (not that this looks like a > > problem > > with the structure, but still). > The warning is something to the effect "attribute packed ignored" > (gcc 4 > only). Since all members are uint32 or arrays thereof it is > superfluous. So IOW it's a completely useless warning :-) Bye, Axel. From host.haiku at gmx.de Fri Oct 3 13:20:42 2008 From: host.haiku at gmx.de (julun) Date: Fri, 03 Oct 2008 13:20:42 +0200 Subject: [Haiku-commits] r27847 - haiku/trunk/src/apps/expander In-Reply-To: <894b9700810030413o5f8421dcx4215af19b0a5453e@mail.gmail.com> References: <200810031108.m93B8pDn018306@sheep.berlios.de> <894b9700810030413o5f8421dcx4215af19b0a5453e@mail.gmail.com> Message-ID: <48E6000A.4010106@gmx.de> Hi Stefano, Stefano Ceccherini schrieb: > 2008/10/3 julun at BerliOS : >> Author: julun >> Date: 2008-10-03 13:08:50 +0200 (Fri, 03 Oct 2008) >> New Revision: 27847 >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27847&view=rev >> >> Modified: >> haiku/trunk/src/apps/expander/ExpanderPreferences.cpp >> haiku/trunk/src/apps/expander/ExpanderWindow.cpp >> Log: >> * fix probable memory leaks >> >> > Thanks! > I completely forgot to fix these ones after I said I would. Sorry! You're welcome. :) There are still some more, I'm on it. Best regards, Karsten From julun at mail.berlios.de Fri Oct 3 13:35:29 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 13:35:29 +0200 Subject: [Haiku-commits] r27850 - haiku/trunk/src/apps/poorman Message-ID: <200810031135.m93BZTZc001860@sheep.berlios.de> Author: julun Date: 2008-10-03 13:35:28 +0200 (Fri, 03 Oct 2008) New Revision: 27850 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27850&view=rev Modified: haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.cpp haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.h Log: * fix probable memory leaks, not in the image but anyway... Modified: haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.cpp =================================================================== --- haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.cpp 2008-10-03 11:17:23 UTC (rev 27849) +++ haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.cpp 2008-10-03 11:35:28 UTC (rev 27850) @@ -4,7 +4,7 @@ * Started: 4/27/2004 * Version: 0.1 */ - + #include #include #include @@ -17,59 +17,61 @@ PoorManPreferencesWindow::PoorManPreferencesWindow(BRect frame, char * name) - : BWindow(frame, name, B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE) + : BWindow(frame, name, B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE), + webDirFilePanel(NULL), + logFilePanel(NULL) { frame = Bounds(); - + prefView = new PoorManView(frame, STR_WIN_NAME_PREF); //prefView->SetViewColor(216,216,216,255); prefView->SetViewColor(BACKGROUND_COLOR); AddChild(prefView); - - - + + + // Button View BRect buttonRect; buttonRect = Bounds(); buttonRect.top = buttonRect.bottom - 30; - + buttonView = new PoorManView(buttonRect, "Button View"); buttonView->SetViewColor(BACKGROUND_COLOR); prefView->AddChild(buttonView); - - // Buttons - float buttonTop = 0.0f; + + // Buttons + float buttonTop = 0.0f; float buttonWidth = 52.0f; float buttonHeight = 26.0f; float buttonLeft = 265.0f; - + BRect button1; button1 = buttonView->Bounds(); - button1.Set(buttonLeft, buttonTop, buttonLeft + buttonWidth, buttonTop + buttonHeight); - cancelButton = new BButton(button1, "Cancel Button", "Cancel", new BMessage(MSG_PREF_BTN_CANCEL)); - + button1.Set(buttonLeft, buttonTop, buttonLeft + buttonWidth, buttonTop + buttonHeight); + cancelButton = new BButton(button1, "Cancel Button", "Cancel", new BMessage(MSG_PREF_BTN_CANCEL)); + buttonLeft = 325.0f; BRect button2; button2 = buttonView->Bounds(); - button2.Set(buttonLeft, buttonTop, buttonLeft + buttonWidth, buttonTop + buttonHeight); - doneButton = new BButton(button2, "Done Button", "Done", new BMessage(MSG_PREF_BTN_DONE)); + button2.Set(buttonLeft, buttonTop, buttonLeft + buttonWidth, buttonTop + buttonHeight); + doneButton = new BButton(button2, "Done Button", "Done", new BMessage(MSG_PREF_BTN_DONE)); - buttonView->AddChild(cancelButton); - buttonView->AddChild(doneButton); - - - + buttonView->AddChild(cancelButton); + buttonView->AddChild(doneButton); + + + // Create tabs BRect r; r = Bounds(); //r.InsetBy(5, 5); r.top += 8.0; r.bottom -= 38.0; - + prefTabView = new BTabView(r, "Pref Tab View"); - prefTabView->SetViewColor(BACKGROUND_COLOR); - + prefTabView->SetViewColor(BACKGROUND_COLOR); + r = prefTabView->Bounds(); r.InsetBy(5, 5); r.bottom -= prefTabView->TabHeight(); @@ -79,63 +81,61 @@ siteView = new PoorManSiteView(r, "Site View"); prefTabView->AddTab(siteView, siteTab); siteTab->SetLabel(STR_TAB_SITE); - + // Logging Tab loggingTab = new BTab(); loggingView = new PoorManLoggingView(r, "Logging View"); prefTabView->AddTab(loggingView, loggingTab); loggingTab->SetLabel(STR_TAB_LOGGING); - + // Advanced Tab advancedTab = new BTab(); advancedView = new PoorManAdvancedView(r, "Advanced View"); prefTabView->AddTab(advancedView, advancedTab); advancedTab->SetLabel(STR_TAB_ADVANCED); - prefView->AddChild(prefTabView); - + prefView->AddChild(prefTabView); + // FilePanels BWindow * change_title; - - webDirFilePanel = new BFilePanel( - B_OPEN_PANEL, - new BMessenger(this), - NULL, - B_DIRECTORY_NODE, - false, - new BMessage(MSG_FILE_PANEL_SELECT_WEB_DIR) - ); + + BMessenger messenger(this); + BMessage message(MSG_FILE_PANEL_SELECT_WEB_DIR); + webDirFilePanel = new BFilePanel(B_OPEN_PANEL, &messenger, NULL, + B_DIRECTORY_NODE, false, &message); + webDirFilePanel->SetPanelDirectory(new BDirectory("/boot/home/public_html")); webDirFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select"); change_title = webDirFilePanel->Window(); change_title->SetTitle(STR_FILEPANEL_SELECT_WEB_DIR); - - logFilePanel = new BFilePanel( - B_SAVE_PANEL, - new BMessenger(this), - NULL, - B_FILE_NODE, - false, - new BMessage(MSG_FILE_PANEL_CREATE_LOG_FILE) - ); + message.what = MSG_FILE_PANEL_CREATE_LOG_FILE; + logFilePanel = new BFilePanel(B_SAVE_PANEL, &messenger, NULL, + B_FILE_NODE, false, &message); logFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, "Create"); change_title = logFilePanel->Window(); change_title->SetTitle(STR_FILEPANEL_CREATE_LOG_FILE); - - + Show(); } -void + +PoorManPreferencesWindow::~PoorManPreferencesWindow() +{ + delete logFilePanel; + delete webDirFilePanel; +} + + +void PoorManPreferencesWindow::MessageReceived(BMessage* message) { switch (message->what) { case MSG_PREF_BTN_DONE: PoorManWindow * win; win = ((PoorManApplication *)be_app)->GetPoorManWindow(); - + std::cout << "Pref Window: sendDir CheckBox: " << siteView->SendDirValue() << std::endl; win->SetDirListFlag(siteView->SendDirValue()); std::cout << "Pref Window: indexFileName TextControl: " << siteView->IndexFileName() << std::endl; @@ -150,11 +150,11 @@ win->SetLogFileFlag(loggingView->LogFileValue()); std::cout << "Pref Window: logFileName: " << loggingView->LogFileName() << std::endl; win->SetLogPath(loggingView->LogFileName()); - + std::cout << "Pref Window: MaxConnections Slider: " << advancedView->MaxSimultaneousConnections() << std::endl; win->SetMaxConnections(advancedView->MaxSimultaneousConnections()); - + if (Lock()) Quit(); break; @@ -183,7 +183,7 @@ break; case MSG_PREF_ADV_SLD_MAX_CONNECTION: max_connections = advancedView->MaxSimultaneousConnections(); - std::cout << "Max Connections: " << max_connections << std::endl; + std::cout << "Max Connections: " << max_connections << std::endl; break; default: @@ -192,15 +192,15 @@ } } -void +void PoorManPreferencesWindow::SelectWebDir(BMessage * message) { - entry_ref ref; + entry_ref ref; const char * name; BPath path; BEntry entry; status_t err = B_OK; - + err = message->FindRef("refs", &ref) != B_OK; //if (err = message->FindRef("directory", &ref) != B_OK) //return err; @@ -211,20 +211,20 @@ //if (err = entry.SetTo(&ref) != B_OK) // ;//return err; entry.GetPath(&path); - + std::cout << "DIR: " << path.Path() << std::endl; siteView->SetWebDir(path.Path()); } -void +void PoorManPreferencesWindow::CreateLogFile(BMessage * message) { - entry_ref ref; + entry_ref ref; const char * name; BPath path; BEntry entry; status_t err = B_OK; - + err = message->FindRef("directory", &ref) != B_OK; //if (err = message->FindRef("directory", &ref) != B_OK) //return err; @@ -237,12 +237,12 @@ entry.GetPath(&path); path.Append(name); std::cout << "Log File: " << path.Path() << std::endl; - + if (err == B_OK) { loggingView->SetLogFileName(path.Path()); loggingView->SetLogFileValue(true); } - + // mark the checkbox } Modified: haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.h =================================================================== --- haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.h 2008-10-03 11:17:23 UTC (rev 27849) +++ haiku/trunk/src/apps/poorman/PoorManPreferencesWindow.h 2008-10-03 11:35:28 UTC (rev 27850) @@ -4,8 +4,8 @@ * Started: 4/27/2004 * Version: 0.1 */ - + #ifndef POOR_MAN_PREFERENCES_WINDOW_H #define POOR_MAN_PREFERENCES_WINDOW_H @@ -30,7 +30,7 @@ PoorManView * prefView; PoorManView * buttonView; - + // ------------------------------------------------ // Tabs BTabView * prefTabView; @@ -41,20 +41,20 @@ PoorManSiteView * siteView; PoorManLoggingView * loggingView; PoorManAdvancedView * advancedView; - + // ------------------------------------------------ // Buttons BButton * cancelButton; BButton * doneButton; - + // ------------------------------------------------ // FilePanels BFilePanel * webDirFilePanel; BFilePanel * logFilePanel; - - + + // ------------------------------------------------ - // temporary preference variables used to save and + // temporary preference variables used to save and // set the application to // site tab char web_directory[B_FILE_NAME_LENGTH]; @@ -68,8 +68,10 @@ int32 max_connections; public: PoorManPreferencesWindow(BRect frame, char * name); + ~PoorManPreferencesWindow(); + virtual void MessageReceived(BMessage * message); - + void ShowWebDirFilePanel() { if (!webDirFilePanel->IsShowing()) webDirFilePanel->Show(); } void SelectWebDir(BMessage * message); void CreateLogFile(BMessage * message); From julun at mail.berlios.de Fri Oct 3 13:54:06 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 13:54:06 +0200 Subject: [Haiku-commits] r27851 - in haiku/trunk/src: add-ons/screen_savers/slideshowsaver tests/add-ons/kernel/file_systems/beserved/BeManager tests/kits/midi/midi_player_replacement tools/translation/inspector Message-ID: <200810031154.m93Bs6rs004559@sheep.berlios.de> Author: julun Date: 2008-10-03 13:54:05 +0200 (Fri, 03 Oct 2008) New Revision: 27851 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27851&view=rev Modified: haiku/trunk/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.cpp haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.h haiku/trunk/src/tests/kits/midi/midi_player_replacement/MidiPlayerWindow.cpp haiku/trunk/src/tools/translation/inspector/ImageWindow.cpp Log: * fix probable memory leaks, not in the image but anyway... Modified: haiku/trunk/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp =================================================================== --- haiku/trunk/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp 2008-10-03 11:35:28 UTC (rev 27850) +++ haiku/trunk/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp 2008-10-03 11:54:05 UTC (rev 27851) @@ -12,18 +12,18 @@ // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // -// The above copyright notice and this permission notice shall be included +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. /*****************************************************************************/ @@ -59,12 +59,12 @@ : BView(frame, name, resize, flags) { fSettings = settings; - + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - + BMessage *pMsg; int32 val; - + // Show Caption checkbox pMsg = new BMessage(CHANGE_CAPTION); fShowCaption = new BCheckBox(BRect(10, 45, 180, 62), @@ -73,7 +73,7 @@ fShowCaption->SetValue(val); fShowCaption->SetViewColor(ViewColor()); AddChild(fShowCaption); - + // Change Border checkbox pMsg = new BMessage(CHANGE_BORDER); fShowBorder = new BCheckBox(BRect(10, 70, 180, 87), @@ -82,7 +82,7 @@ fShowBorder->SetValue(val); fShowBorder->SetViewColor(ViewColor()); AddChild(fShowBorder); - + // Delay Menu // setup PNG interlace options menu int32 currentDelay = fSettings->SetGetInt32(SAVER_SETTING_DELAY) / 1000; @@ -123,19 +123,20 @@ "Delay Menu Field", "Delay:", fDelayMenu); fDelayMenuField->SetViewColor(ViewColor()); fDelayMenuField->SetDivider(40); - AddChild(fDelayMenuField); + AddChild(fDelayMenuField); // Choose Image Folder button pMsg = new BMessage(CHOOSE_DIRECTORY); fChooseFolder = new BButton(BRect(50, 160, 180, 180), "Choose Folder", "Choose Image Folder" B_UTF8_ELLIPSIS, pMsg); AddChild(fChooseFolder); - + // Setup choose folder file panel pMsg = new BMessage(CHANGE_DIRECTORY); fFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, (const entry_ref *) NULL, B_DIRECTORY_NODE, false, pMsg, NULL, true, true); fFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select"); + delete pMsg; } // --------------------------------------------------------------- @@ -154,7 +155,7 @@ SlideShowConfigView::~SlideShowConfigView() { fSettings->Release(); - + delete fFilePanel; fFilePanel = NULL; } @@ -180,7 +181,7 @@ fShowBorder->SetTarget(msgr); fChooseFolder->SetTarget(msgr); fFilePanel->SetTarget(msgr); - + // Set target for menu items for (int32 i = 0; i < fDelayMenu->CountItems(); i++) { BMenuItem *item = fDelayMenu->ItemAt(i); @@ -215,7 +216,7 @@ fSettings->SetGetBool(SAVER_SETTING_CAPTION, &bNewVal); fSettings->SaveSettings(); break; - + case CHANGE_BORDER: if (fShowBorder->Value()) bNewVal = true; @@ -224,7 +225,7 @@ fSettings->SetGetBool(SAVER_SETTING_BORDER, &bNewVal); fSettings->SaveSettings(); break; - + case CHOOSE_DIRECTORY: { BString strDirectory; @@ -236,11 +237,11 @@ if (entry.GetRef(&ref) != B_OK) return; fFilePanel->SetPanelDirectory(&ref); - + fFilePanel->Show(); break; } - + case CHANGE_DIRECTORY: { entry_ref ref; @@ -253,14 +254,14 @@ if (path.InitCheck() != B_OK) return; BString strDirectory = path.Path(); - + fSettings->SetString(SAVER_SETTING_DIRECTORY, strDirectory); fSettings->SaveSettings(); - + Invalidate(); break; } - + case CHANGE_DELAY: { int32 newVal; @@ -271,7 +272,7 @@ } break; } - + default: BView::MessageReceived(message); break; @@ -300,10 +301,10 @@ float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - + char title[] = "SlideShow Screen Saver"; DrawString(title, BPoint(xbold, ybold)); - + SetFont(be_plain_font); font_height plainh; GetFontHeight(&plainh); @@ -312,7 +313,7 @@ char writtenby[] = "Written by Michael Wilber"; DrawString(writtenby, BPoint(xbold, yplain * 1 + ybold)); - + // Draw current folder BString strFolder; fSettings->GetString(SAVER_SETTING_DIRECTORY, strFolder); Modified: haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.cpp =================================================================== --- haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.cpp 2008-10-03 11:35:28 UTC (rev 27850) +++ haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.cpp 2008-10-03 11:54:05 UTC (rev 27851) @@ -186,8 +186,8 @@ MovePenTo(202, 210); DrawString("days"); - SetDrawingMode(B_OP_ALPHA); - SetHighColor(0, 0, 0, 180); + SetDrawingMode(B_OP_ALPHA); + SetHighColor(0, 0, 0, 180); SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE); DrawBitmap(icon, iconRect); } @@ -246,7 +246,6 @@ infoView = new UserPropertiesView(r, name == NULL ? NULL : user); AddChild(infoView); - myMsgr = new BMessenger(NULL, this, NULL); Show(); } @@ -264,7 +263,9 @@ switch (msg->what) { case MSG_USER_BROWSE: - filePanel = new BFilePanel(B_OPEN_PANEL, myMsgr, &entryRef, B_DIRECTORY_NODE, false); + BMessenger messenger(this); + filePanel = new BFilePanel(B_OPEN_PANEL, &messenger, &entryRef, + B_DIRECTORY_NODE, false); // filePanel->SetTarget(this); filePanel->Show(); filePanel->Window()->SetTitle("User Home"); Modified: haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.h =================================================================== --- haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.h 2008-10-03 11:35:28 UTC (rev 27850) +++ haiku/trunk/src/tests/add-ons/kernel/file_systems/beserved/BeManager/UserProperties.h 2008-10-03 11:54:05 UTC (rev 27851) @@ -58,7 +58,6 @@ bool isCancelled() { return cancelled; } private: - BMessenger *myMsgr; UserPropertiesView *infoView; BWindow *shareWin; char user[33]; Modified: haiku/trunk/src/tests/kits/midi/midi_player_replacement/MidiPlayerWindow.cpp =================================================================== --- haiku/trunk/src/tests/kits/midi/midi_player_replacement/MidiPlayerWindow.cpp 2008-10-03 11:35:28 UTC (rev 27850) +++ haiku/trunk/src/tests/kits/midi/midi_player_replacement/MidiPlayerWindow.cpp 2008-10-03 11:54:05 UTC (rev 27851) @@ -48,7 +48,7 @@ { fWindows->Show(); } - + //-------------- void SetOrigin(BPoint origin) @@ -326,7 +326,9 @@ } else { - fInputFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, msg); + BMessenger messenger(this) + fInputFilePanel = new BFilePanel(B_OPEN_PANEL, &messenger, + NULL, B_FILE_NODE, false, msg); fInputFilePanel->Show(); } break; @@ -375,7 +377,9 @@ } else { - fOutputFilePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, msg); + BMessenger messenger(this) + fOutputFilePanel = new BFilePanel(B_SAVE_PANEL, &messenger, + NULL, B_FILE_NODE, false, msg); fOutputFilePanel->Show(); } break; @@ -437,7 +441,9 @@ } else { - fOutputFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, msg); + BMessenger messenger(this) + fOutputFilePanel = new BFilePanel(B_OPEN_PANEL, &messenger, + NULL, B_FILE_NODE, false, msg); fOutputFilePanel->Show(); } break; @@ -552,7 +558,9 @@ PostMessage(&message); message = BMessage(*msg); message.what = CHANGE_INPUT_FILE; - fInputFilePanel = fInputFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, msg);; + BMessenger messenger(this) + fInputFilePanel = new BFilePanel(B_OPEN_PANEL, &messenger, + NULL, B_FILE_NODE, false, msg);; PostMessage(&message); message = BMessage(OUTPUT_CHANGE_TO_BEOS_SYNTH); PostMessage(&message); Modified: haiku/trunk/src/tools/translation/inspector/ImageWindow.cpp =================================================================== --- haiku/trunk/src/tools/translation/inspector/ImageWindow.cpp 2008-10-03 11:35:28 UTC (rev 27850) +++ haiku/trunk/src/tools/translation/inspector/ImageWindow.cpp 2008-10-03 11:54:05 UTC (rev 27851) @@ -5,7 +5,7 @@ // ImageWindow.cpp // // BWindow class for displaying an image. Uses ImageView class for its -// view. +// view. // // // Copyright (c) 2003 OpenBeOS Project @@ -13,18 +13,18 @@ // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // -// The above copyright notice and this permission notice shall be included +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. /*****************************************************************************/ @@ -44,73 +44,74 @@ // Setup menu bar BRect rctbar(0, 0, 100, 10); BMenuBar *pbar = new BMenuBar(rctbar, "MenuBar"); - + BMenu *pmnufile = new BMenu("File"); BMenuItem *pitmopen = new BMenuItem("Open...", new BMessage(M_OPEN_IMAGE), 'O', 0); - + BMenuItem *pitmsave = new BMenuItem("Save...", new BMessage(M_SAVE_IMAGE), 'S', 0); - + BMenuItem *pitmquit = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q', 0); - + pmnufile->AddItem(pitmopen); pmnufile->AddItem(pitmsave); pmnufile->AddSeparatorItem(); pmnufile->AddItem(pitmquit); pbar->AddItem(pmnufile); - + BMenu *pmnuview = new BMenu("View"); BMenuItem *pitmfirst = new BMenuItem("First Page", new BMessage(M_VIEW_FIRST_PAGE), 'F', 0); - + BMenuItem *pitmlast = new BMenuItem("Last Page", new BMessage(M_VIEW_LAST_PAGE), 'L', 0); - + BMenuItem *pitmnext = new BMenuItem("Next Page", new BMessage(M_VIEW_NEXT_PAGE), 'N', 0); - + BMenuItem *pitmprev = new BMenuItem("Previous Page", new BMessage(M_VIEW_PREV_PAGE), 'P', 0); - + pmnuview->AddItem(pitmfirst); pmnuview->AddItem(pitmlast); pmnuview->AddItem(pitmnext); pmnuview->AddItem(pitmprev); pbar->AddItem(pmnuview); - - + + BMenu *pmnuwindow = new BMenu("Window"); BMenuItem *pitmactives = new BMenuItem("Active Translators", new BMessage(M_ACTIVE_TRANSLATORS_WINDOW), 'T', 0); pitmactives->SetTarget(be_app); - + BMenuItem *pitminfo = new BMenuItem("Info", new BMessage(M_INFO_WINDOW), 'I', 0); pitminfo->SetTarget(be_app); - + pmnuwindow->AddItem(pitmactives); pmnuwindow->AddItem(pitminfo); - pbar->AddItem(pmnuwindow); - + pbar->AddItem(pmnuwindow); + AddChild(pbar); - + // Setup image view BRect rctview = Bounds(); rctview.top = pbar->Frame().bottom + 1; rctview.right -= B_V_SCROLL_BAR_WIDTH; rctview.bottom -= B_H_SCROLL_BAR_HEIGHT; - + fpimageView = new ImageView(rctview, "ImageView"); AddChild(new BScrollView("ImageScroll", fpimageView, B_FOLLOW_ALL_SIDES, 0, true, true)); - + // Setup file open panel - fpopenPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), - (const entry_ref *)NULL, 0L, false, new BMessage(M_OPEN_FILE_PANEL), - NULL, false, true); - + BMessenger messenger(this); + BMessage message(M_OPEN_FILE_PANEL); + fpopenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, NULL, 0L, false, + &message, NULL, false, true); + SetSizeLimits(200, 10000, 150, 10000); } @@ -128,7 +129,7 @@ fpopenPanel->Window()->SetWorkspaces(B_CURRENT_WORKSPACE); fpopenPanel->Show(); break; - + case M_SAVE_IMAGE: if (fpimageView->HasImage()) { BAlert *palert = new BAlert(NULL, @@ -140,12 +141,12 @@ palert->Go(); } break; - + case M_OPEN_FILE_PANEL: case B_SIMPLE_DATA: fpimageView->SetImage(pmsg); break; - + case M_VIEW_FIRST_PAGE: fpimageView->FirstPage(); break; @@ -158,10 +159,10 @@ case M_VIEW_PREV_PAGE: fpimageView->PrevPage(); break; - + case B_CANCEL: break; - + default: BWindow::MessageReceived(pmsg); break; From julun at mail.berlios.de Fri Oct 3 13:56:02 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 13:56:02 +0200 Subject: [Haiku-commits] r27852 - haiku/trunk/src/apps/mediaconverter Message-ID: <200810031156.m93Bu2UX004660@sheep.berlios.de> Author: julun Date: 2008-10-03 13:56:02 +0200 (Fri, 03 Oct 2008) New Revision: 27852 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27852&view=rev Modified: haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp Log: * automatic whitespace cleanup Modified: haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp 2008-10-03 11:54:05 UTC (rev 27851) +++ haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp 2008-10-03 11:56:02 UTC (rev 27852) @@ -35,17 +35,17 @@ // #pragma mark - DirectoryFilter -class DirectoryFilter : public BRefFilter -{ -public: - DirectoryFilter(){}; - virtual bool Filter(const entry_ref *ref, - BNode *node, struct stat *st, const char *filetype) - { - return node->IsDirectory(); +class DirectoryFilter : public BRefFilter +{ +public: + DirectoryFilter(){}; + virtual bool Filter(const entry_ref *ref, + BNode *node, struct stat *st, const char *filetype) + { + return node->IsDirectory(); } -private: -}; +private: +}; // #pragma mark - FileFormatMenuItem @@ -55,7 +55,7 @@ public: FileFormatMenuItem(media_file_format* format); virtual ~FileFormatMenuItem(); - + media_file_format fFileFormat; }; @@ -79,7 +79,7 @@ public: CodecMenuItem(media_codec_info *ci, uint32 msg_type); virtual ~CodecMenuItem(); - + media_codec_info fCodecInfo; }; @@ -128,16 +128,16 @@ BPath path(&mypath); path.GetParent(&path); - path.Append("Language/Dictionaries"); - path.Append("MediaConverter"); - be_locale.LoadLanguageFile(path.Path()); + path.Append("Language/Dictionaries"); + path.Append("MediaConverter"); + be_locale.LoadLanguageFile(path.Path()); #endif - BRect dummyRect(0, 0, 10, 10); - fMenuBar = new BMenuBar(dummyRect, "menubar"); + BRect dummyRect(0, 0, 10, 10); + fMenuBar = new BMenuBar(dummyRect, "menubar"); _CreateMenu(); - AddChild(fMenuBar); + AddChild(fMenuBar); // background BRect r(frame); @@ -173,7 +173,7 @@ r2.right = r.right - 5; r2.bottom = r2.top + 120; fBox2 = new BBox(r2, NULL, B_FOLLOW_RIGHT | B_FOLLOW_TOP); - + r3 = r2; r3.OffsetTo(0, 0); r3.InsetBy(5, 5); @@ -190,14 +190,14 @@ r3.OffsetTo(0, 0); r3.InsetBy(8, 8); r3.top += be_bold_font->Size() - 3; - + BRect r4(r3); r4.bottom = r4.top + 20; BPopUpMenu* popmenu = new BPopUpMenu(""); fFormatMenu = new BMenuField(r4, NULL, FORMAT_LABEL, popmenu, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fBox3->AddChild(fFormatMenu); - + r4.top = r4.bottom + 5; r4.bottom = r4.top + 20; popmenu = new BPopUpMenu(""); @@ -239,14 +239,14 @@ B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fBox3->AddChild(fStartDurationTC); fStartDurationTC->SetText("0"); - + r4.top = r4.bottom + 5; r4.bottom = r4.top + 20; fEndDurationTC = new BTextControl(r4, NULL, "", "0", NULL, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fBox3->AddChild(fEndDurationTC); fEndDurationTC->SetText("0"); - + r4.top = r4.bottom + 5; r4.bottom = r4.top + 50; @@ -256,7 +256,7 @@ B_BLOCK_THUMB, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fVideoQualitySlider->SetValue(fVideoQuality); fVideoQualitySlider->SetEnabled(false); - fBox3->AddChild(fVideoQualitySlider); + fBox3->AddChild(fVideoQualitySlider); r4.top = r4.bottom + 5; r4.bottom = r4.top + 50; @@ -267,7 +267,7 @@ B_BLOCK_THUMB, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fAudioQualitySlider->SetValue(fAudioQuality); fAudioQualitySlider->SetEnabled(false); - fBox3->AddChild(fAudioQualitySlider); + fBox3->AddChild(fAudioQualitySlider); background->AddChild(fBox3); // buttons @@ -317,11 +317,11 @@ /* -void +void MediaConverterWindow::DispatchMessage(BMessage *msg, BHandler *handler) { if (msg->WasDropped() && msg->what == B_SIMPLE_DATA) { - + printf("Dispatch 1\n"); DetachCurrentMessage(); msg->what = B_REFS_RECEIVED; @@ -334,7 +334,7 @@ */ -void +void MediaConverterWindow::MessageReceived(BMessage *msg) { status_t status; @@ -353,7 +353,7 @@ BPath name; BEntry inentry; int32 value; - BRect ButtonRect; + BRect ButtonRect; switch (msg->what) { #if B_BEOS_VERSION <= B_BEOS_VERSION_6 @@ -377,7 +377,7 @@ delete msg; } break; - + case FORMAT_SELECT_MESSAGE: BuildAudioVideoMenus(); break; @@ -385,7 +385,7 @@ break; case VIDEO_CODEC_SELECT_MESSAGE: break; - + case CONVERT_BUTTON_MESSAGE: if (!fConverting) { fConvertButton->SetLabel(CANCEL_LABEL); @@ -396,10 +396,10 @@ } else if (!fCancelling) { fCancelling = true; SetStatusMessage(CANCELLING_LABEL B_UTF8_ELLIPSIS); - BMessenger(be_app).SendMessage(CANCEL_CONVERSION_MESSAGE); + BMessenger(be_app).SendMessage(CANCEL_CONVERSION_MESSAGE); } break; - + case CONVERSION_DONE_MESSAGE: SetStatusMessage(fCancelling ? CONV_CANCEL_LABEL : CONV_COMPLETE_LABEL); fConverting = false; @@ -409,20 +409,20 @@ SetEnabled(enable, enable); } fConvertButton->SetLabel(CONVERT_LABEL); - - + + break; - + case OUTPUT_FOLDER_MESSAGE: // Execute Save Panel if (!fSaveFilePanel) { - BButton *SelectThisDir; - + BButton *SelectThisDir; + fSaveFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, B_DIRECTORY_NODE, true, new BMessage(FOLDER_SELECT_MESSAGE), NULL, false, true); fSaveFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, SELECT_LABEL); fSaveFilePanel->Window()->SetTitle(SAVE_DIR_LABEL); fSaveFilePanel->SetTarget(this); - + fSaveFilePanel->Window()->Lock(); ButtonRect = fSaveFilePanel->Window()->ChildAt(0)->FindView("cancel button")->Frame(); ButtonRect.right = ButtonRect.left - 20; @@ -432,14 +432,14 @@ SelectThisDir->SetTarget(this); fSaveFilePanel->Window()->ChildAt(0)->AddChild(SelectThisDir); fSaveFilePanel->Window()->Unlock(); - + BRefFilter *filter; filter = new DirectoryFilter; fSaveFilePanel->SetRefFilter(filter); } fSaveFilePanel->Show(); break; - + case FOLDER_SELECT_MESSAGE: // "SELECT" Button at Save Panel Pushed fSaveFilePanel->GetNextSelectedRef(&inRef); @@ -447,7 +447,7 @@ _SetOutputFolder(inentry); fOutputDirSpecified = true; break; - + case SELECT_THIS_DIR_MESSAGE: // "THIS DIR" Button at Save Panel Pushed fSaveFilePanel->GetPanelDirectory(&inRef); @@ -456,7 +456,7 @@ _SetOutputFolder(inentry); fOutputDirSpecified = true; break; - + case OPEN_FILE_MESSAGE: // Execute Open Panel if (!fOpenFilePanel) { @@ -465,17 +465,17 @@ } fOpenFilePanel->Show(); break; - + case B_REFS_RECEIVED: // Media Files Seleced by Open Panel DetachCurrentMessage(); msg->what = B_REFS_RECEIVED; BMessenger(be_app).SendMessage(msg); // fall through - + case B_CANCEL: break; - + case DISP_ABOUT_MESSAGE: { (new BAlert(ABOUT_TITLE_LABEL B_UTF8_ELLIPSIS, "MediaConverter\n" @@ -496,7 +496,7 @@ string = ""; string << fStartDurationTC->Text(); string << "000"; - + strcpy(buffer,string.String()); argv[1] = buffer; srcIndex = fListView->CurrentSelection(); @@ -504,15 +504,15 @@ if (status == B_OK) { inentry.SetTo(&inRef); inentry.GetPath(&name); - + strcpy(buffer, string.String()); - + strcpy(buffer2, name.Path()); argv[2]= buffer2; } - + status = be_roster->Launch(&ref, 3, argv); - + if (status != B_OK) { string2 << LAUNCH_ERROR << strerror(status); (new BAlert("", string2.String(), OK_LABEL))->Go(); @@ -520,14 +520,14 @@ break; case VIDEO_QUALITY_CHANGED_MESSAGE: - msg->FindInt32("be:value",&value); + msg->FindInt32("be:value",&value); sprintf(buffer, VIDEO_QUALITY_LABEL, (int8)value); fVideoQualitySlider->SetLabel(buffer); fVideoQuality = value; break; case AUDIO_QUALITY_CHANGED_MESSAGE: - msg->FindInt32("be:value",&value); + msg->FindInt32("be:value",&value); sprintf(buffer, AUDIO_QUALITY_LABEL, (int8)value); fAudioQualitySlider->SetLabel(buffer); fAudioQuality = value; @@ -594,7 +594,7 @@ // add available audio encoders to menu format.type = B_MEDIA_RAW_AUDIO; - format.u.raw_audio = media_raw_audio_format::wildcard; + format.u.raw_audio = media_raw_audio_format::wildcard; while (get_next_encoder(&cookie, mf_format, &format, &outfmt, &codec_info) == B_OK) { if (separator) { menu->AddItem(new BMenuItem("No Audio", @@ -705,7 +705,7 @@ } -void +void MediaConverterWindow::BuildFormatMenu() { BMenu *menu = fFormatMenu->Menu(); @@ -723,7 +723,7 @@ ff_item = new FileFormatMenuItem(&mfi); menu->AddItem(ff_item); } - + // mark first item item = menu->ItemAt(0); if (item != NULL) { @@ -732,13 +732,13 @@ } } -void +void MediaConverterWindow::SetFileMessage(const char *message) { fStatusView->SetStatus(message); } -void +void MediaConverterWindow::SetStatusMessage(const char *message) { fStatusView2->SetStatus(message); @@ -770,7 +770,7 @@ } -int32 +int32 MediaConverterWindow::CountSourceFiles() { return fListView->CountItems(); @@ -793,7 +793,7 @@ } -void +void MediaConverterWindow::SourceFileSelectionChanged() { int32 selected = fListView->CurrentSelection(); @@ -828,7 +828,7 @@ // #pragma mark - -void +void MediaConverterWindow::SetEnabled(bool enabled, bool convertEnabled) { fConvertButton->SetEnabled(convertEnabled); @@ -846,7 +846,7 @@ } -bool +bool MediaConverterWindow::IsEnabled() { return fEnabled; @@ -924,7 +924,7 @@ r.bottom - buttonFrame.Height() - 25); fPreviewButton->MoveTo(buttonFrame.LeftTop()); } - + if (fDestButton != NULL) { fDestButton->SetLabel(OUTPUT_FOLDER_LABEL); fDestButton->ResizeToPreferred(); @@ -940,16 +940,16 @@ sprintf(buffer, VIDEO_QUALITY_LABEL, (int8)fVideoQuality); if (fVideoQualitySlider != NULL) { fVideoQualitySlider->SetLabel(buffer); - fVideoQualitySlider->SetLimitLabels(SLIDER_LOW_LABEL, - SLIDER_HIGH_LABEL); + fVideoQualitySlider->SetLimitLabels(SLIDER_LOW_LABEL, + SLIDER_HIGH_LABEL); } sprintf(buffer, AUDIO_QUALITY_LABEL, (int8)fAudioQuality); - + if (fAudioQualitySlider != NULL) { fAudioQualitySlider->SetLabel(buffer); - fAudioQualitySlider->SetLimitLabels(SLIDER_LOW_LABEL, - SLIDER_HIGH_LABEL); + fAudioQualitySlider->SetLimitLabels(SLIDER_LOW_LABEL, + SLIDER_HIGH_LABEL); } float maxLabelLen = 0; @@ -965,7 +965,7 @@ fStartDurationTC->SetDivider(maxLabelLen + 5); if (fEndDurationTC != NULL) fEndDurationTC->SetDivider(maxLabelLen + 5); - + if (fFormatMenu != NULL) { fFormatMenu->SetLabel(FORMAT_LABEL); maxLabelLen = MAX(maxLabelLen, fFormatMenu->StringWidth( @@ -1013,10 +1013,10 @@ void MediaConverterWindow::_CreateMenu() { - BMenuItem* item; - BMenu* menu; + BMenuItem* item; + BMenu* menu; - menu = new BMenu(FILE_MENU_LABEL); + menu = new BMenu(FILE_MENU_LABEL); item = new BMenuItem(OPEN_MENU_LABEL B_UTF8_ELLIPSIS, new BMessage(OPEN_FILE_MESSAGE)); menu->AddItem(item); @@ -1028,7 +1028,7 @@ item = new BMenuItem(QUIT_MENU_LABEL, new BMessage(QUIT_MESSAGE)); menu->AddItem(item); - fMenuBar->AddItem(menu); + fMenuBar->AddItem(menu); } From ingo_weinhold at gmx.de Fri Oct 3 14:00:59 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Fri, 03 Oct 2008 14:00:59 +0200 Subject: [Haiku-commits] r27841 - in haiku/trunk/src/system/kernel: . arch/x86 arch/x86/timers device_manager disk_device_manager util In-Reply-To: <12422814079-BeMail@zon> References: <12422814079-BeMail@zon> Message-ID: <20081003140059.545.2@knochen-vm.localdomain> On 2008-10-03 at 13:18:17 [+0200], Axel D?rfler wrote: > Ingo Weinhold wrote: > > On 2008-10-03 at 10:35:52 [+0200], Axel D?rfler > > > wrote: > > > What kind of warning would this cause? Besides, it should stay > > > there to > > > prevent wrong compiler alignment (not that this looks like a > > > problem > > > with the structure, but still). > > The warning is something to the effect "attribute packed ignored" > > (gcc 4 > > only). Since all members are uint32 or arrays thereof it is > > superfluous. > > So IOW it's a completely useless warning :-) I guess the reasoning is that one might have expected something else when defining the structure and it might be worth to have another look. CU, Ingo From julun at mail.berlios.de Fri Oct 3 14:01:36 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:01:36 +0200 Subject: [Haiku-commits] r27853 - haiku/trunk/src/apps/mediaconverter Message-ID: <200810031201.m93C1ask005060@sheep.berlios.de> Author: julun Date: 2008-10-03 14:01:35 +0200 (Fri, 03 Oct 2008) New Revision: 27853 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27853&view=rev Modified: haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp Log: * fix probable memory leaks Modified: haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp 2008-10-03 11:56:02 UTC (rev 27852) +++ haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp 2008-10-03 12:01:35 UTC (rev 27853) @@ -310,6 +310,8 @@ MediaConverterWindow::~MediaConverterWindow() { + delete fSaveFilePanel; + delete fOpenFilePanel; } @@ -418,7 +420,9 @@ if (!fSaveFilePanel) { BButton *SelectThisDir; - fSaveFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, B_DIRECTORY_NODE, true, new BMessage(FOLDER_SELECT_MESSAGE), NULL, false, true); + BMessage message(FOLDER_SELECT_MESSAGE); + fSaveFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, + B_DIRECTORY_NODE, true, &message, NULL, false, true); fSaveFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, SELECT_LABEL); fSaveFilePanel->Window()->SetTitle(SAVE_DIR_LABEL); fSaveFilePanel->SetTarget(this); @@ -428,7 +432,7 @@ ButtonRect.right = ButtonRect.left - 20; ButtonRect.left = ButtonRect.right - 130; SelectThisDir = new BButton(ButtonRect, NULL, SELECT_DIR_LABEL, - new BMessage(SELECT_THIS_DIR_MESSAGE), B_FOLLOW_BOTTOM | B_FOLLOW_RIGHT); + new BMessage(SELECT_THIS_DIR_MESSAGE), B_FOLLOW_BOTTOM | B_FOLLOW_RIGHT); SelectThisDir->SetTarget(this); fSaveFilePanel->Window()->ChildAt(0)->AddChild(SelectThisDir); fSaveFilePanel->Window()->Unlock(); @@ -460,7 +464,8 @@ case OPEN_FILE_MESSAGE: // Execute Open Panel if (!fOpenFilePanel) { - fOpenFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, B_FILE_NODE, true, NULL, NULL, false, true); + fOpenFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, + B_FILE_NODE, true, NULL, NULL, false, true); fOpenFilePanel->SetTarget(this); } fOpenFilePanel->Show(); From julun at mail.berlios.de Fri Oct 3 14:07:30 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:07:30 +0200 Subject: [Haiku-commits] r27854 - haiku/trunk/src/apps/icon-o-matic Message-ID: <200810031207.m93C7UPF005658@sheep.berlios.de> Author: julun Date: 2008-10-03 14:07:30 +0200 (Fri, 03 Oct 2008) New Revision: 27854 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27854&view=rev Modified: haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp Log: * fix small mem leak Modified: haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp 2008-10-03 12:01:35 UTC (rev 27853) +++ haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp 2008-10-03 12:07:30 UTC (rev 27854) @@ -218,13 +218,15 @@ { // create file panels BMessenger messenger(this, this); + BMessage message(B_REFS_RECEIVED); fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, NULL, B_FILE_NODE, true, - new BMessage(B_REFS_RECEIVED)); + &message); + message.what = MSG_SAVE_AS; fSavePanel = new SavePanel("save panel", &messenger, NULL, @@ -232,7 +234,7 @@ | B_DIRECTORY_NODE | B_SYMLINK_NODE, false, - new BMessage(MSG_SAVE_AS)); + &message); // create main window BMessage settings('stns'); @@ -515,7 +517,7 @@ // the reason is that the LittleEndianBuffer knows read and write // mode, in this case it is used read-only, and it does not assume // ownership of the buffer - + if (ret < B_OK) { // inform user of failure at this point BString helper("Opening the icon failed!"); @@ -524,7 +526,7 @@ "Bummer", NULL, NULL); // launch alert asynchronously alert->Go(NULL); - + delete icon; return; } @@ -560,7 +562,7 @@ IconEditorApp::_CreateSaver(const entry_ref& ref, uint32 exportMode) { DocumentSaver* saver; - + switch (exportMode) { case EXPORT_MODE_FLAT_ICON: saver = new SimpleFileSaver(new FlatIconExporter(), ref); From julun at mail.berlios.de Fri Oct 3 14:32:00 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:32:00 +0200 Subject: [Haiku-commits] r27855 - haiku/trunk/src/apps/magnify Message-ID: <200810031232.m93CW0bF007484@sheep.berlios.de> Author: julun Date: 2008-10-03 14:31:59 +0200 (Fri, 03 Oct 2008) New Revision: 27855 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27855&view=rev Modified: haiku/trunk/src/apps/magnify/Magnify.cpp Log: * fix mem leak Modified: haiku/trunk/src/apps/magnify/Magnify.cpp =================================================================== --- haiku/trunk/src/apps/magnify/Magnify.cpp 2008-10-03 12:07:30 UTC (rev 27854) +++ haiku/trunk/src/apps/magnify/Magnify.cpp 2008-10-03 12:31:59 UTC (rev 27855) @@ -343,8 +343,10 @@ // freeze the image here, unfreeze after dump or cancel fFatBits->StartSave(); - fSavePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(NULL, this), - 0, 0, false, new BMessage(msg_dump)); + BMessenger messenger(this); + BMessage message(msg_dump); + fSavePanel = new BFilePanel(B_SAVE_PANEL, &messenger, 0, 0, false, + &message); fSavePanel->SetSaveText("Bitmaps.h"); fSavePanel->Show(); break; From julun at mail.berlios.de Fri Oct 3 14:32:52 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:32:52 +0200 Subject: [Haiku-commits] r27856 - haiku/trunk/src/apps/showimage Message-ID: <200810031232.m93CWqiv007595@sheep.berlios.de> Author: julun Date: 2008-10-03 14:32:52 +0200 (Fri, 03 Oct 2008) New Revision: 27856 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27856&view=rev Modified: haiku/trunk/src/apps/showimage/ShowImageWindow.cpp Log: * fix mem leak Modified: haiku/trunk/src/apps/showimage/ShowImageWindow.cpp =================================================================== --- haiku/trunk/src/apps/showimage/ShowImageWindow.cpp 2008-10-03 12:31:59 UTC (rev 27855) +++ haiku/trunk/src/apps/showimage/ShowImageWindow.cpp 2008-10-03 12:32:52 UTC (rev 27856) @@ -898,14 +898,14 @@ // Add the chosen translator and output type to the // message that the save panel will send back - BMessage *panelMsg = new BMessage(MSG_SAVE_PANEL); - panelMsg->AddInt32(kTranslatorField, outTranslator); - panelMsg->AddInt32(kTypeField, outType); + BMessage panelMsg(MSG_SAVE_PANEL); + panelMsg.AddInt32(kTranslatorField, outTranslator); + panelMsg.AddInt32(kTypeField, outType); // Create save panel and show it BMessenger target(this); fSavePanel = new (std::nothrow) BFilePanel(B_SAVE_PANEL, - &target, NULL, 0, false, panelMsg); + &target, NULL, 0, false, &panelMsg); if (!fSavePanel) return; From julun at mail.berlios.de Fri Oct 3 14:35:58 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:35:58 +0200 Subject: [Haiku-commits] r27857 - in haiku/trunk/src: apps/soundrecorder apps/text_search kits/tracker Message-ID: <200810031235.m93CZwVV007736@sheep.berlios.de> Author: julun Date: 2008-10-03 14:35:57 +0200 (Fri, 03 Oct 2008) New Revision: 27857 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27857&view=rev Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp haiku/trunk/src/apps/text_search/GrepWindow.cpp haiku/trunk/src/kits/tracker/InfoWindow.cpp Log: * whitespace cleanup Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp =================================================================== --- haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-03 12:32:52 UTC (rev 27856) +++ haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-03 12:35:57 UTC (rev 27857) @@ -55,7 +55,7 @@ #define CONNECT FPRINTF #define WINDOW FPRINTF -// default window positioning +// default window positioning static const float MIN_WIDTH = 400.0f; static const float MIN_HEIGHT = 336.0f; static const float XPOS = 100.0f; @@ -64,27 +64,27 @@ #define FOURCC(a,b,c,d) ((((uint32)(d)) << 24) | (((uint32)(c)) << 16) | (((uint32)(b)) << 8) | ((uint32)(a))) struct riff_struct -{ +{ uint32 riff_id; // 'RIFF' uint32 len; uint32 wave_id; // 'WAVE' -}; +}; -struct chunk_struct -{ +struct chunk_struct +{ uint32 fourcc; uint32 len; }; -struct format_struct -{ - uint16 format_tag; - uint16 channels; - uint32 samples_per_sec; - uint32 avg_bytes_per_sec; - uint16 block_align; +struct format_struct +{ + uint16 format_tag; + uint16 channels; + uint32 samples_per_sec; + uint32 avg_bytes_per_sec; + uint16 block_align; uint16 bits_per_sample; -}; +}; struct wave_struct @@ -97,7 +97,7 @@ RecorderWindow::RecorderWindow() : - BWindow(BRect(XPOS,YPOS,XPOS+MIN_WIDTH,YPOS+MIN_HEIGHT), "SoundRecorder", B_TITLED_WINDOW, + BWindow(BRect(XPOS,YPOS,XPOS+MIN_WIDTH,YPOS+MIN_HEIGHT), "SoundRecorder", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_V_RESIZABLE), fPlayer(NULL), fSoundList(NULL), @@ -122,7 +122,7 @@ fButtonState = btnPaused; CalcSizes(MIN_WIDTH, MIN_HEIGHT); - + fInitCheck = InitWindow(); if (fInitCheck != B_OK) { ErrorAlert("connect to media server", fInitCheck); @@ -141,14 +141,14 @@ if (fPlayer) { delete fPlayer; } - + if (fPlayTrack && fPlayFile) fPlayFile->ReleaseTrack(fPlayTrack); if (fPlayFile) delete fPlayFile; fPlayTrack = NULL; fPlayFile = NULL; - + // Clean up items in list view. if (fSoundList) { fSoundList->DeselectAll(); @@ -200,7 +200,7 @@ { BPopUpMenu * popup = 0; status_t error; - + try { // Find temp directory for recorded sounds. BPath path; @@ -241,21 +241,21 @@ B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE_JUMP, B_PLAIN_BORDER); AddChild(background); - - + + r = background->Bounds(); r.left = 2; r.right = r.left + 37; r.bottom = r.top + 104; fVUView = new VUView(r, B_FOLLOW_LEFT|B_FOLLOW_TOP); background->AddChild(fVUView); - + r = background->Bounds(); r.left = r.left + 40; r.bottom = r.top + 104; fScopeView = new ScopeView(r, B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP); background->AddChild(fScopeView); - + r = background->Bounds(); r.left = 2; r.right -= 26; @@ -263,89 +263,89 @@ r.bottom = r.top + 30; fTrackSlider = new TrackSlider(r, "trackSlider", new BMessage(POSITION_CHANGED), B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP); background->AddChild(fTrackSlider); - + BRect buttonRect; - + // Button for rewinding buttonRect = BRect(BPoint(0,0), kSkipButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-7, 25)); - fRewindButton = new TransportButton(buttonRect, "Rewind", - kSkipBackBitmapBits, kPressedSkipBackBitmapBits, kDisabledSkipBackBitmapBits, + fRewindButton = new TransportButton(buttonRect, "Rewind", + kSkipBackBitmapBits, kPressedSkipBackBitmapBits, kDisabledSkipBackBitmapBits, new BMessage(REWIND)); background->AddChild(fRewindButton); - + // Button for stopping recording or playback buttonRect = BRect(BPoint(0,0), kStopButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-48, 25)); - fStopButton = new TransportButton(buttonRect, "Stop", - kStopButtonBitmapBits, kPressedStopButtonBitmapBits, kDisabledStopButtonBitmapBits, + fStopButton = new TransportButton(buttonRect, "Stop", + kStopButtonBitmapBits, kPressedStopButtonBitmapBits, kDisabledStopButtonBitmapBits, new BMessage(STOP)); background->AddChild(fStopButton); - + // Button for starting playback of selected sound BRect playRect(BPoint(0,0), kPlayButtonSize); playRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-82, 25)); - fPlayButton = new PlayPauseButton(playRect, "Play", + fPlayButton = new PlayPauseButton(playRect, "Play", new BMessage(PLAY), new BMessage(PLAY_PERIOD), ' ', 0); background->AddChild(fPlayButton); - + // Button for forwarding buttonRect = BRect(BPoint(0,0), kSkipButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-133, 25)); - fForwardButton = new TransportButton(buttonRect, "Forward", - kSkipForwardBitmapBits, kPressedSkipForwardBitmapBits, kDisabledSkipForwardBitmapBits, + fForwardButton = new TransportButton(buttonRect, "Forward", + kSkipForwardBitmapBits, kPressedSkipForwardBitmapBits, kDisabledSkipForwardBitmapBits, new BMessage(FORWARD)); background->AddChild(fForwardButton); - + // Button to start recording (or waiting for sound) buttonRect = BRect(BPoint(0,0), kRecordButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-174, 25)); - fRecordButton = new RecordButton(buttonRect, "Record", + fRecordButton = new RecordButton(buttonRect, "Record", new BMessage(RECORD), new BMessage(RECORD_PERIOD)); background->AddChild(fRecordButton); // Button for saving selected sound buttonRect = BRect(BPoint(0,0), kDiskButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-250, 21)); - fSaveButton = new TransportButton(buttonRect, "Save", + fSaveButton = new TransportButton(buttonRect, "Save", kDiskButtonBitmapsBits, kPressedDiskButtonBitmapsBits, kDisabledDiskButtonBitmapsBits, new BMessage(SAVE)); fSaveButton->SetResizingMode(B_FOLLOW_RIGHT | B_FOLLOW_TOP); background->AddChild(fSaveButton); - + // Button Loop buttonRect = BRect(BPoint(0,0), kArrowSize); buttonRect.OffsetTo(background->Bounds().RightBottom() - BPoint(23, 48)); - fLoopButton = new DrawButton(buttonRect, "Loop", + fLoopButton = new DrawButton(buttonRect, "Loop", kLoopArrowBits, kArrowBits, new BMessage(LOOP)); fLoopButton->SetResizingMode(B_FOLLOW_RIGHT | B_FOLLOW_TOP); fLoopButton->SetTarget(this); background->AddChild(fLoopButton); - + buttonRect = BRect(BPoint(0,0), kSpeakerIconBitmapSize); buttonRect.OffsetTo(background->Bounds().RightBottom() - BPoint(121, 17)); SpeakerView *speakerView = new SpeakerView(buttonRect, B_FOLLOW_LEFT | B_FOLLOW_TOP); speakerView->SetResizingMode(B_FOLLOW_RIGHT | B_FOLLOW_TOP); background->AddChild(speakerView); - + buttonRect = BRect(BPoint(0,0), BPoint(84, 19)); buttonRect.OffsetTo(background->Bounds().RightBottom() - BPoint(107, 20)); fVolumeSlider = new VolumeSlider(buttonRect, "volumeSlider", B_FOLLOW_LEFT | B_FOLLOW_TOP); fVolumeSlider->SetResizingMode(B_FOLLOW_RIGHT | B_FOLLOW_TOP); background->AddChild(fVolumeSlider); - + // Button to mask/see sounds list buttonRect = BRect(BPoint(0,0), kUpDownButtonSize); buttonRect.OffsetTo(background->Bounds().RightBottom() - BPoint(21, 25)); fUpDownButton = new UpDownButton(buttonRect, new BMessage(VIEW_LIST)); fUpDownButton->SetResizingMode(B_FOLLOW_RIGHT | B_FOLLOW_TOP); background->AddChild(fUpDownButton); - + r = Bounds(); r.top = background->Bounds().bottom + 1; fBottomBox = new BBox(r, "bottomBox", B_FOLLOW_ALL); fBottomBox->SetBorder(B_NO_BORDER); AddChild(fBottomBox); - + // The actual list of recorded sounds (initially empty) sits // below the header with the controls. r = fBottomBox->Bounds(); @@ -361,7 +361,7 @@ BScrollView *scroller = new BScrollView("scroller", fSoundList, B_FOLLOW_ALL, 0, false, true, B_FANCY_BORDER); fBottomBox->AddChild(scroller); - + r = fBottomBox->Bounds(); r.right = r.left + 190; r.bottom -= 25; @@ -369,7 +369,7 @@ r.top -= 1; fFileInfoBox = new BBox(r, "fileinfo", B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); fFileInfoBox->SetLabel("File Info"); - + r = fFileInfoBox->Bounds(); r.left = 8; r.top = 13; @@ -401,13 +401,13 @@ r.bottom = r.top + 15; fDuration = new BStringView(r, "duration", "Duration:"); fFileInfoBox->AddChild(fDuration); - + // Input selection lists all available physical inputs that produce // buffers with B_MEDIA_RAW_AUDIO format data. popup = new BPopUpMenu("Input"); int max_input_count = 64; dormant_node_info dni[max_input_count]; - + int32 real_count = max_input_count; media_format output_format; output_format.type = B_MEDIA_RAW_AUDIO; @@ -436,7 +436,7 @@ break; } } - + // Create the actual widget BRect frame(fBottomBox->Bounds()); r = frame; @@ -463,16 +463,16 @@ r.bottom -= 1; BStringView* lenUnits = new BStringView(r, "Seconds", "seconds"); fBottomBox->AddChild(lenUnits); - + fBottomBox->AddChild(fFileInfoBox); - + fBottomBox->Hide(); CalcSizes(Frame().Width(), MIN_HEIGHT-161); ResizeTo(Frame().Width(), MIN_HEIGHT-161); - + popup->Superitem()->SetLabel(selected_name); - + // Make sure the save panel is happy. fSavePanel = new BFilePanel(B_SAVE_PANEL); fSavePanel->SetTarget(this); @@ -491,7 +491,7 @@ if (fRecordNode) { fRecordNode->Release(); } - + delete fPlayer; if (!fInputField) { delete popup; @@ -565,7 +565,7 @@ fBottomBox->Hide(); CalcSizes(Frame().Width(), MIN_HEIGHT-161); ResizeTo(Frame().Width(), MIN_HEIGHT-161); - + } break; case UPDATE_TRACKSLIDER: @@ -613,7 +613,7 @@ void RecorderWindow::Record(BMessage * message) -{ +{ // User pressed Record button fRecording = true; int seconds = atoi(fLengthControl->Text()); @@ -693,29 +693,29 @@ fPlayer->SetHasData(!fPlayer->HasData()); return; } - + SetButtonState(btnPlaying); fPlayButton->SetPlaying(); - + if (!fPlayTrack) { ErrorAlert("get the file to play", B_ERROR); return; } - + fPlayLimit = MIN(fPlayFrames, (off_t)(fTrackSlider->RightTime()*fPlayFormat.u.raw_audio.frame_rate/1000000LL)); fPlayTrack->SeekToTime(fTrackSlider->MainTime()); fPlayFrame = fPlayTrack->CurrentFrame(); - + // Create our internal Node which plays sound, and register it. fPlayer = new BSoundPlayer(fAudioMixerNode, &fPlayFormat.u.raw_audio, "Sound Player"); status_t err = fPlayer->InitCheck(); if (err < B_OK) { return; } - + fVolumeSlider->SetSoundPlayer(fPlayer); fPlayer->SetCallbacks(PlayFile, NotifyPlayFile, this); - + // And get it going... fPlayer->Start(); fPlayer->SetHasData(true); @@ -741,14 +741,14 @@ if ((! pItem) || (pItem->Entry().InitCheck() != B_OK)) { return; } - + // Update the save panel and show it. char filename[B_FILE_NAME_LENGTH]; pItem->Entry().GetName(filename); BMessage saveMsg(B_SAVE_REQUESTED); entry_ref ref; pItem->Entry().GetRef(&ref); - + saveMsg.AddPointer("sound list item", pItem); fSavePanel->SetSaveText(filename); fSavePanel->SetMessage(&saveMsg); @@ -765,7 +765,7 @@ entry_ref old_ref, new_dir_ref; const char* new_name; SoundListItem* pItem; - + if ((message->FindPointer("sound list item", (void**) &pItem) == B_OK) && (message->FindRef("directory", &new_dir_ref) == B_OK) && (message->FindString("name", &new_name) == B_OK)) @@ -778,15 +778,15 @@ BDirectory newDir(&new_dir_ref); if (newDir.InitCheck() != B_OK) return; - - BFile newFile; - newDir.CreateFile(new_name, &newFile); - + + BFile newFile; + newDir.CreateFile(new_name, &newFile); + if (newFile.InitCheck() != B_OK) return; - + status_t err = CopyFile(newFile, oldFile); - + if (err == B_OK) { // clean up the sound list and item if (pItem->IsTemp()) @@ -840,7 +840,7 @@ if (message->FindData("node", B_RAW_TYPE, (const void **)&dni, &size)) { return; // bad input selection message } - + media_node_id node_id; status_t error = fRoster->GetInstancesFor(dni->addon, dni->flavor_id, &node_id); if (error != B_OK) { @@ -862,7 +862,7 @@ RecorderWindow::MakeRecordConnection(const media_node & input) { CONNECT((stderr, "RecorderWindow::MakeRecordConnection()\n")); - + // Find an available output for the given input node. int32 count = 0; status_t err = fRoster->GetFreeOutputsFor(input, &fAudioOutput, 1, &count, B_MEDIA_RAW_AUDIO); @@ -968,7 +968,7 @@ BreakRecordConnection(); fRecordNode->SetHooks(NULL,NULL,NULL); if (fRecSize > 0) { - + wave_struct header; header.riff.riff_id = FOURCC('R','I','F','F'); header.riff.len = fRecSize + 36; @@ -985,7 +985,7 @@ header.data_chunk.len = fRecSize; fRecFile.Seek(0, SEEK_SET); fRecFile.Write(&header, sizeof(header)); - + fRecFile.SetSize(fRecSize + sizeof(header)); // We reserve space; make sure we cut off any excess at the end. AddSoundItem(fRecEntry, true); } @@ -1001,7 +1001,7 @@ fRecSize = 0; SetButtonState(btnPaused); fRecordButton->SetStopped(); - + return B_OK; } @@ -1020,7 +1020,7 @@ fPlayButton->SetStopped(); fTrackSlider->ResetMainTime(); fScopeView->SetMainTime(*fTrackSlider->MainTime()); - return B_OK; + return B_OK; } @@ -1050,7 +1050,7 @@ extern "C" status_t DecodedFormat__11BMediaTrackP12media_format(BMediaTrack *self, media_format *inout_format); #endif -void +void RecorderWindow::UpdatePlayFile() { // Get selection. @@ -1059,7 +1059,7 @@ if (! pItem) { return; } - + if (fPlayTrack && fPlayFile) fPlayFile->ReleaseTrack(fPlayTrack); if (fPlayFile) @@ -1077,12 +1077,12 @@ delete fPlayFile; return; } - + for (int ix=0; ixCountTracks(); ix++) { BMediaTrack * track = fPlayFile->TrackAt(ix); fPlayFormat.type = B_MEDIA_RAW_AUDIO; #ifdef __HAIKU__ - if ((track->DecodedFormat(&fPlayFormat) == B_OK) + if ((track->DecodedFormat(&fPlayFormat) == B_OK) #else if ((DecodedFormat__11BMediaTrackP12media_format(track, &fPlayFormat) == B_OK) #endif @@ -1093,13 +1093,13 @@ if (track) fPlayFile->ReleaseTrack(track); } - + if (!fPlayTrack) { ErrorAlert("get the file to play", err); delete fPlayFile; return; } - + BString filename = "File Name: "; filename << ref.name; fFilename->SetText(filename.String()); @@ -1124,22 +1124,22 @@ samplerate << (int)fPlayFormat.u.raw_audio.frame_rate; BString durationString = "Duration: "; bigtime_t duration = fPlayTrack->Duration(); - durationString << (float)(duration / 1000000.0) << " seconds"; - + durationString << (float)(duration / 1000000.0) << " seconds"; + fFormat->SetText(format.String()); fCompression->SetText(compression.String()); fChannels->SetText(channels.String()); fSampleSize->SetText(samplesize.String()); fSampleRate->SetText(samplerate.String()); fDuration->SetText(durationString.String()); - + fTrackSlider->SetTotalTime(duration, true); fScopeView->SetMainTime(fTrackSlider->LeftTime()); fScopeView->SetTotalTime(duration); fScopeView->SetRightTime(fTrackSlider->RightTime()); fScopeView->SetLeftTime(fTrackSlider->LeftTime()); fScopeView->RenderTrack(fPlayTrack, fPlayFormat); - + fPlayFrames = fPlayTrack->CountFrames(); } @@ -1204,7 +1204,7 @@ // Callback called from the SoundConsumer when receiving buffers. assert((format.format & 0x02) && format.channel_count); RecorderWindow * window = (RecorderWindow *)cookie; - + if (window->fRecording) { // Write the data to file (we don't buffer or guard file access // or anything) @@ -1234,12 +1234,12 @@ void RecorderWindow::PlayFile(void * cookie, void * data, size_t size, const media_raw_audio_format & format) -{ +{ // Callback called from the SoundProducer when producing buffers. RecorderWindow * window = (RecorderWindow *)cookie; int32 frame_size = (window->fPlayFormat.u.raw_audio.format & 0xf) * window->fPlayFormat.u.raw_audio.channel_count; - + if ((window->fPlayFrame < window->fPlayLimit) || window->fLooping) { if (window->fPlayFrame >= window->fPlayLimit) { bigtime_t left = window->fTrackSlider->LeftTime(); @@ -1269,22 +1269,22 @@ } -void +void RecorderWindow::RefsReceived(BMessage *msg) { entry_ref ref; int32 i = 0; - + while (msg->FindRef("refs", i++, &ref) == B_OK) { - + BEntry entry(&ref, true); BPath path(&entry); BNode node(&entry); - + if (node.IsFile()) { AddSoundItem(entry, false); } else if(node.IsDirectory()) { - + } } } Modified: haiku/trunk/src/apps/text_search/GrepWindow.cpp =================================================================== --- haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-03 12:32:52 UTC (rev 27856) +++ haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-03 12:35:57 UTC (rev 27857) @@ -1,22 +1,22 @@ /* * Copyright (c) 1998-2007 Matthijs Hollemans - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in + * + * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #include "GrepWindow.h" @@ -141,7 +141,7 @@ _LoadPrefs(); _TileIfMultipleWindows(); - Show(); + Show(); } @@ -404,7 +404,7 @@ if (!title.Length()) title = APP_NAME; - + SetTitle(title.String()); } @@ -419,34 +419,34 @@ fPreferencesMenu = new BMenu(_T("Preferences")); fHistoryMenu = new BMenu(_T("History")); fEncodingMenu = new BMenu(_T("Encoding")); - + fNew = new BMenuItem( _T("New Window"), new BMessage(MSG_NEW_WINDOW), 'N'); - + fOpen = new BMenuItem( _T("Set Which Files to Search"), new BMessage(MSG_OPEN_PANEL), 'F'); fClose = new BMenuItem( _T("Close"), new BMessage(B_QUIT_REQUESTED), 'W'); - + fAbout = new BMenuItem( _T("About"), new BMessage(B_ABOUT_REQUESTED)); fQuit = new BMenuItem( _T("Quit"), new BMessage(MSG_QUIT_NOW), 'Q'); - + fSearch = new BMenuItem( _T("Search"), new BMessage(MSG_START_CANCEL), 'S'); - + fSelectAll = new BMenuItem( _T("Select All"), new BMessage(MSG_SELECT_ALL), 'A'); - + fTrimSelection = new BMenuItem( _T("Trim to Selection"), new BMessage(MSG_TRIM_SELECTION), 'T'); - + fOpenSelection = new BMenuItem( _T("Open Selection"), new BMessage(MSG_OPEN_SELECTION), 'O'); - + fSelectInTracker = new BMenuItem( _T("Show Files in Tracker"), new BMessage(MSG_SELECT_IN_TRACKER), 'K'); @@ -477,12 +477,12 @@ fShowLinesMenuitem = new BMenuItem( _T("Show Lines"), new BMessage(MSG_MENU_SHOW_LINES), 'L'); fShowLinesMenuitem->SetMarked(true); - + fUTF8 = new BMenuItem("UTF8", new BMessage('utf8')); fShiftJIS = new BMenuItem("ShiftJIS", new BMessage(B_SJIS_CONVERSION)); fEUC = new BMenuItem("EUC", new BMessage(B_EUC_CONVERSION)); fJIS = new BMenuItem("JIS", new BMessage(B_JIS_CONVERSION)); - + fFileMenu->AddItem(fNew); fFileMenu->AddSeparatorItem(); fFileMenu->AddItem(fOpen); @@ -491,7 +491,7 @@ fFileMenu->AddItem(fAbout); fFileMenu->AddSeparatorItem(); fFileMenu->AddItem(fQuit); - + fActionMenu->AddItem(fSearch); fActionMenu->AddSeparatorItem(); fActionMenu->AddItem(fSelectAll); @@ -500,7 +500,7 @@ fActionMenu->AddItem(fOpenSelection); fActionMenu->AddItem(fSelectInTracker); fActionMenu->AddItem(fCopyText); - + fPreferencesMenu->AddItem(fRecurseLinks); fPreferencesMenu->AddItem(fRecurseDirs); fPreferencesMenu->AddItem(fSkipDotDirs); @@ -510,7 +510,7 @@ fPreferencesMenu->AddItem(fInvokePe); fPreferencesMenu->AddSeparatorItem(); fPreferencesMenu->AddItem(fShowLinesMenuitem); - + fEncodingMenu->AddItem(fUTF8); fEncodingMenu->AddItem(fShiftJIS); fEncodingMenu->AddItem(fEUC); @@ -526,10 +526,10 @@ fMenuBar->AddItem(fPreferencesMenu); fMenuBar->AddItem(fHistoryMenu); fMenuBar->AddItem(fEncodingMenu); - + AddChild(fMenuBar); SetKeyMenuBar(fMenuBar); - + fSearch->SetEnabled(false); } @@ -537,16 +537,16 @@ void GrepWindow::_CreateViews() { - // The search pattern entry field does not send a message when - // is pressed, because the "Search/Cancel" button already + // The search pattern entry field does not send a message when + // is pressed, because the "Search/Cancel" button already // does this and we don't want to send the same message twice. fSearchText = new BTextControl( BRect(0, 0, 0, 1), "SearchText", NULL, NULL, NULL, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, - B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE); - - fSearchText->TextView()->SetMaxBytes(1000); + B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE); + + fSearchText->TextView()->SetMaxBytes(1000); fSearchText->ResizeToPreferred(); // because it doesn't have a label @@ -555,23 +555,23 @@ fButton = new BButton( BRect(0, 1, 80, 1), "Button", _T("Search"), new BMessage(MSG_START_CANCEL), B_FOLLOW_RIGHT); - + fButton->MakeDefault(true); fButton->ResizeToPreferred(); fButton->SetEnabled(false); - + fShowLinesCheckbox = new BCheckBox( BRect(0, 0, 1, 1), "ShowLines", _T("Show Lines"), new BMessage(MSG_CHECKBOX_SHOW_LINES), B_FOLLOW_LEFT); - + fShowLinesCheckbox->SetValue(B_CONTROL_ON); fShowLinesCheckbox->ResizeToPreferred(); - - fSearchResults = new GrepListView(); + fSearchResults = new GrepListView(); + fSearchResults->SetInvocationMessage(new BMessage(MSG_INVOKE_ITEM)); fSearchResults->ResizeToPreferred(); -} +} void @@ -581,13 +581,13 @@ fMenuBar->GetPreferredSize(&menubarWidth, &menubarHeight); BBox *background = new BBox( - BRect(0, menubarHeight + 1, 2, menubarHeight + 2), B_EMPTY_STRING, - B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, - B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, - B_PLAIN_BORDER); + BRect(0, menubarHeight + 1, 2, menubarHeight + 2), B_EMPTY_STRING, + B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, + B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, + B_PLAIN_BORDER); BScrollView *scroller = new BScrollView( - "ScrollSearchResults", fSearchResults, B_FOLLOW_ALL_SIDES, + "ScrollSearchResults", fSearchResults, B_FOLLOW_ALL_SIDES, B_FULL_UPDATE_ON_RESIZE, true, true, B_NO_BORDER); scroller->ResizeToPreferred(); @@ -601,7 +601,7 @@ float backgroundHeight = 8 + fSearchText->Frame().Height() + 8 + fButton->Frame().Height() + 8; - ResizeTo(width, height); + ResizeTo(width, height); AddChild(background); background->ResizeTo(width, backgroundHeight); @@ -641,15 +641,15 @@ if (be_app->Lock()) { int32 windowCount = be_app->CountWindows(); be_app->Unlock(); - + if (windowCount > 1) - MoveBy(20,20); + MoveBy(20,20); } - + BScreen screen(this); BRect screenFrame = screen.Frame(); BRect windowFrame = Frame(); - + if (windowFrame.left > screenFrame.right || windowFrame.top > screenFrame.bottom || windowFrame.right < screenFrame.left @@ -788,16 +788,16 @@ fPreferencesMenu->SetEnabled(false); fHistoryMenu->SetEnabled(false); fEncodingMenu->SetEnabled(false); - + fSearchText->SetEnabled(false); fButton->MakeFocus(true); fButton->SetLabel(_T("Cancel")); fSearch->SetEnabled(false); - // We need to remember the search pattern, because during - // the grepping, the text control's text will be replaced - // by the name of the file that's currently being grepped. + // We need to remember the search pattern, because during + // the grepping, the text control's text will be replaced + // by the name of the file that's currently being grepped. // When the grepping finishes, we need to restore the old // search pattern. @@ -1102,7 +1102,7 @@ _ModelChanged(); } - + void GrepWindow::_OnSkipDotDirs() { @@ -1120,7 +1120,7 @@ _ModelChanged(); } - + void GrepWindow::_OnCaseSensitive() { @@ -1154,30 +1154,30 @@ // toggle checkbox and menuitem fModel->fShowContents = !fModel->fShowContents; fShowLinesMenuitem->SetMarked(!fShowLinesMenuitem->IsMarked()); - + // Selection in BOutlineListView in multiple selection mode // gets weird when collapsing. I've tried all sorts of things. // It seems impossible to make it behave just right. - + // Going from collapsed to expande mode, the superitems - // keep their selection, the subitems don't (yet) have + // keep their selection, the subitems don't (yet) have // a selection. This works as expected, AFAIK. - + // Going from expanded to collapsed mode, I would like // for a selected subitem (line) to select its superitem, - // (its file) and the subitem be unselected. - + // (its file) and the subitem be unselected. + // I've successfully tried code patches that apply the // selection pattern that I want, but with weird effects - // on subsequent manual selection. + // on subsequent manual selection. // Lines stay selected while the user tries to select - // some other line. It just gets weird. - - // It's as though listItem->Select() and Deselect() + // some other line. It just gets weird. + + // It's as though listItem->Select() and Deselect() // put the items in some semi-selected state. // Or maybe I've got it all wrong. - - // So, here's the plain basic collapse/expand. + + // So, here's the plain basic collapse/expand. // I think it's the least bad of what's possible on BeOS R5, // but perhaps someone comes along with a patch of magic. @@ -1214,7 +1214,7 @@ GrepWindow::_OnInvokeItem() { for (int32 selectionIndex = 0; ; selectionIndex++) { - int32 itemIndex = fSearchResults->CurrentSelection(selectionIndex); + int32 itemIndex = fSearchResults->CurrentSelection(selectionIndex); BListItem* item = fSearchResults->ItemAt(itemIndex); if (item == NULL) break; @@ -1298,7 +1298,7 @@ fSearchResults->ItemAt(index)); if (item == NULL) break; - + if (!item->IsSelected() || item->OutlineLevel() != 0) continue; @@ -1327,7 +1327,7 @@ GrepWindow::_OnCopyText() { bool onlyCopySelection = true; - + if (fSearchResults->CurrentSelection() < 0) onlyCopySelection = false; @@ -1352,11 +1352,11 @@ if (be_clipboard->Lock()) { be_clipboard->Clear(); - + clip = be_clipboard->Data(); clip->AddData("text/plain", B_MIME_TYPE, buffer.String(), - buffer.Length()); + buffer.Length()); status = be_clipboard->Commit(); @@ -1408,7 +1408,7 @@ continue; message.AddRef("refs", &file_ref); - + // add parent folder to list of folders to open folderPath.SetTo(filePath.String()); if (folderPath.GetParent(&folderPath) == B_OK) { @@ -1434,7 +1434,7 @@ snooze(aShortWhile); _OpenFoldersInTracker(&folderList); } - } + } if (!_AreAllFoldersOpenInTracker(&folderList)) { BAlert* alert = new BAlert(NULL, @@ -1448,7 +1448,7 @@ _SelectFilesInTracker(&folderList, &message); -out: +out: // delete folderList contents int32 folderCount = folderList.CountItems(); [... truncated: 645 lines follow ...] From julun at mail.berlios.de Fri Oct 3 14:36:58 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:36:58 +0200 Subject: [Haiku-commits] r27858 - in haiku/trunk/src: apps/soundrecorder apps/text_search kits/tracker Message-ID: <200810031236.m93CawAt007854@sheep.berlios.de> Author: julun Date: 2008-10-03 14:36:58 +0200 (Fri, 03 Oct 2008) New Revision: 27858 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27858&view=rev Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp haiku/trunk/src/apps/text_search/GrepWindow.cpp haiku/trunk/src/kits/tracker/InfoWindow.cpp Log: * fix some mem leaks Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp =================================================================== --- haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-03 12:35:57 UTC (rev 27857) +++ haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-03 12:36:58 UTC (rev 27858) @@ -167,6 +167,8 @@ // Clean up currently recording file, if any. fRecEntry.Remove(); fRecEntry.Unset(); + + delete fSavePanel; } @@ -266,7 +268,7 @@ BRect buttonRect; - // Button for rewinding + // Button for rewinding buttonRect = BRect(BPoint(0,0), kSkipButtonSize); buttonRect.OffsetTo(background->Bounds().LeftBottom() - BPoint(-7, 25)); fRewindButton = new TransportButton(buttonRect, "Rewind", Modified: haiku/trunk/src/apps/text_search/GrepWindow.cpp =================================================================== --- haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-03 12:35:57 UTC (rev 27857) +++ haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-03 12:36:58 UTC (rev 27858) @@ -511,10 +511,10 @@ fPreferencesMenu->AddSeparatorItem(); fPreferencesMenu->AddItem(fShowLinesMenuitem); - fEncodingMenu->AddItem(fUTF8); - fEncodingMenu->AddItem(fShiftJIS); - fEncodingMenu->AddItem(fEUC); - fEncodingMenu->AddItem(fJIS); + fEncodingMenu->AddItem(fUTF8); + fEncodingMenu->AddItem(fShiftJIS); + fEncodingMenu->AddItem(fEUC); + fEncodingMenu->AddItem(fJIS); // fEncodingMenu->SetLabelFromMarked(true); // Do we really want this ? @@ -1557,9 +1557,11 @@ if (get_ref_for_path(fModel->fFilePanelPath.String(), &path) != B_OK) return; - fFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(NULL, this), - &path, B_FILE_NODE|B_DIRECTORY_NODE|B_SYMLINK_NODE, - true, new BMessage(MSG_REFS_RECEIVED), NULL, true, true); + BMessenger messenger(this); + BMessage message(MSG_REFS_RECEIVED); + fFilePanel = new BFilePanel(B_OPEN_PANEL, &messenger, &path, + B_FILE_NODE | B_DIRECTORY_NODE | B_SYMLINK_NODE, true, + &message, NULL, true, true); fFilePanel->Show(); } Modified: haiku/trunk/src/kits/tracker/InfoWindow.cpp =================================================================== --- haiku/trunk/src/kits/tracker/InfoWindow.cpp 2008-10-03 12:35:57 UTC (rev 27857) +++ haiku/trunk/src/kits/tracker/InfoWindow.cpp 2008-10-03 12:36:58 UTC (rev 27858) @@ -787,10 +787,10 @@ // for the sym link if (fFilePanel == NULL) { BMessenger runner(this); - + BMessage message(kNewTargetSelected); fFilePanel = new BFilePanel(B_OPEN_PANEL, &runner, ref, B_FILE_NODE | B_SYMLINK_NODE | B_DIRECTORY_NODE, - false, new BMessage(kNewTargetSelected)); + false, &message); if (fFilePanel != NULL) { fFilePanel->SetButtonLabel(B_DEFAULT_BUTTON,"Select"); From julun at mail.berlios.de Fri Oct 3 14:44:41 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:44:41 +0200 Subject: [Haiku-commits] r27859 - haiku/trunk/src/apps/magnify Message-ID: <200810031244.m93CieBq008519@sheep.berlios.de> Author: julun Date: 2008-10-03 14:44:40 +0200 (Fri, 03 Oct 2008) New Revision: 27859 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27859&view=rev Modified: haiku/trunk/src/apps/magnify/Magnify.cpp Log: * build fix... Modified: haiku/trunk/src/apps/magnify/Magnify.cpp =================================================================== --- haiku/trunk/src/apps/magnify/Magnify.cpp 2008-10-03 12:36:58 UTC (rev 27858) +++ haiku/trunk/src/apps/magnify/Magnify.cpp 2008-10-03 12:44:40 UTC (rev 27859) @@ -339,7 +339,7 @@ fFatBits->MakeActive(!fFatBits->Active()); break; - case msg_save: + case msg_save: { // freeze the image here, unfreeze after dump or cancel fFatBits->StartSave(); @@ -349,7 +349,7 @@ &message); fSavePanel->SetSaveText("Bitmaps.h"); fSavePanel->Show(); - break; + } break; case msg_dump: { delete fSavePanel; From julun at mail.berlios.de Fri Oct 3 14:48:20 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 3 Oct 2008 14:48:20 +0200 Subject: [Haiku-commits] r27860 - haiku/trunk/src/apps/mediaplayer/playlist Message-ID: <200810031248.m93CmKRt008905@sheep.berlios.de> Author: julun Date: 2008-10-03 14:48:19 +0200 (Fri, 03 Oct 2008) New Revision: 27860 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27860&view=rev Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp Log: * fix probable memory leaks Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-03 12:44:40 UTC (rev 27859) +++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-03 12:48:19 UTC (rev 27860) @@ -6,7 +6,7 @@ * Stephan A?mus * Fredrik Mod?en */ - + #include "PlaylistWindow.h" #include @@ -46,21 +46,22 @@ Controller* controller) : BWindow(frame, "Playlist", B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_ASYNCHRONOUS_CONTROLS) - + , fOpenPanel(NULL) + , fSavePanel(NULL) , fLocker(new RWLocker("command stack lock")) , fCommandStack(new CommandStack(fLocker)) , fCommandStackListener(this) { - frame = Bounds(); - + frame = Bounds(); + _CreateMenu(frame); // will adjust frame to account for menubar - + frame.right -= B_V_SCROLL_BAR_WIDTH; fListView = new PlaylistListView(frame, playlist, controller, fCommandStack); - BScrollView* scrollView = new BScrollView("playlist scrollview", fListView, + BScrollView* scrollView = new BScrollView("playlist scrollview", fListView, B_FOLLOW_ALL_SIDES, 0, false, true, B_NO_BORDER); fTopView = scrollView; @@ -88,6 +89,9 @@ fCommandStack->RemoveListener(&fCommandStackListener); delete fCommandStack; delete fLocker; + + delete fOpenPanel; + delete fSavePanel; } @@ -133,7 +137,7 @@ } break; } - + case M_PLAYLIST_SAVE: if (!fSavePanel) fSavePanel = new BFilePanel(B_SAVE_PANEL); @@ -142,12 +146,12 @@ case B_SAVE_REQUESTED: printf("We are saving\n"); //Use fListView and have a SaveToFile? - break; + break; case M_PLAYLIST_OPEN: if (!fOpenPanel) fOpenPanel = new BFilePanel(B_OPEN_PANEL); fOpenPanel->Show(); - break; + break; case M_PLAYLIST_EMPTY: fListView->RemoveAll(); @@ -176,7 +180,7 @@ // fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS, // new BMessage(M_PLAYLIST_OPEN), 'O')); // fileMenu->AddItem(new BMenuItem("Save"B_UTF8_ELLIPSIS, -// new BMessage(M_PLAYLIST_SAVE), 'S')); +// new BMessage(M_PLAYLIST_SAVE), 'S')); // fileMenu->AddSeparatorItem(); fileMenu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W')); From axeld at mail.berlios.de Fri Oct 3 14:49:00 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Fri, 3 Oct 2008 14:49:00 +0200 Subject: [Haiku-commits] r27861 - haiku/trunk/src/kits/interface Message-ID: <200810031249.m93Cn05Q008971@sheep.berlios.de> Author: axeld Date: 2008-10-03 14:48:59 +0200 (Fri, 03 Oct 2008) New Revision: 27861 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27861&view=rev Modified: haiku/trunk/src/kits/interface/Menu.cpp haiku/trunk/src/kits/interface/MenuBar.cpp Log: * White space cleanup. Modified: haiku/trunk/src/kits/interface/Menu.cpp =================================================================== --- haiku/trunk/src/kits/interface/Menu.cpp 2008-10-03 12:48:19 UTC (rev 27860) +++ haiku/trunk/src/kits/interface/Menu.cpp 2008-10-03 12:48:59 UTC (rev 27861) @@ -822,21 +822,18 @@ msg->FindFloat("be:wheel_delta_y", &deltaY); if (deltaY == 0) return; - + BMenuWindow *window = dynamic_cast(Window()); if (window == NULL) return; - - window->TryScrollBy(deltaY); - + + window->TryScrollBy(deltaY); break; } default: BView::MessageReceived(msg); break; } - - } @@ -2769,4 +2766,4 @@ fMenu->_QuitTracking(thisMenuOnly); } -} ; +} // namespace BPrivate Modified: haiku/trunk/src/kits/interface/MenuBar.cpp =================================================================== --- haiku/trunk/src/kits/interface/MenuBar.cpp 2008-10-03 12:48:19 UTC (rev 27860) +++ haiku/trunk/src/kits/interface/MenuBar.cpp 2008-10-03 12:48:59 UTC (rev 27861) @@ -29,10 +29,10 @@ struct menubar_data { BMenuBar *menuBar; int32 menuIndex; - + bool sticky; bool showMenu; - + bool useRect; BRect rect; }; @@ -78,14 +78,14 @@ fTracking(false) { int32 border; - + if (data->FindInt32("_border", &border) == B_OK) SetBorder((menu_bar_border)border); - + menu_layout layout = B_ITEMS_IN_COLUMN; data->FindInt32("_layout", (int32 *)&layout); - - _InitData(layout); + + _InitData(layout); } @@ -95,7 +95,7 @@ status_t dummy; wait_for_thread(fTrackingPID, &dummy); } - + delete fLastBounds; } @@ -105,7 +105,7 @@ { if (validate_instantiation(data, "BMenuBar")) return new BMenuBar(data); - + return NULL; } @@ -117,7 +117,7 @@ if (err < B_OK) return err; - + if (Border() != B_BORDER_FRAME) err = data->AddInt32("_border", Border()); @@ -125,7 +125,7 @@ } -void +void BMenuBar::SetBorder(menu_bar_border border) { fBorder = border; @@ -149,7 +149,7 @@ // TODO: implement additional border styles rgb_color color = HighColor(); - + BRect bounds(Bounds()); // Restore the background of the previously selected menuitem DrawBackground(bounds & updateRect); @@ -187,21 +187,21 @@ } -void +void BMenuBar::DetachedFromWindow() { BMenu::DetachedFromWindow(); } -void +void BMenuBar::MessageReceived(BMessage *msg) { BMenu::MessageReceived(msg); } -void +void BMenuBar::MouseDown(BPoint where) { if (fTracking) @@ -212,33 +212,33 @@ window->Activate(); window->UpdateIfNeeded(); } - + StartMenuBar(-1, false, false); } -void +void BMenuBar::WindowActivated(bool state) { BView::WindowActivated(state); } -void +void BMenuBar::MouseUp(BPoint where) { BView::MouseUp(where); } -void +void BMenuBar::FrameMoved(BPoint newPosition) -{ +{ BMenu::FrameMoved(newPosition); } -void +void BMenuBar::FrameResized(float newWidth, float newHeight) { // invalidate right border @@ -261,14 +261,14 @@ } -void +void BMenuBar::Show() { BView::Show(); } -void +void BMenuBar::Hide() { BView::Hide(); @@ -282,49 +282,49 @@ } -status_t +status_t BMenuBar::GetSupportedSuites(BMessage *data) { return BMenu::GetSupportedSuites(data); } -void +void BMenuBar::ResizeToPreferred() { BMenu::ResizeToPreferred(); } -void +void BMenuBar::GetPreferredSize(float *width, float *height) { BMenu::GetPreferredSize(width, height); } -void +void BMenuBar::MakeFocus(bool state) { BMenu::MakeFocus(state); } -void +void BMenuBar::AllAttached() { BMenu::AllAttached(); } -void +void BMenuBar::AllDetached() { BMenu::AllDetached(); } -status_t +status_t BMenuBar::Perform(perform_code d, void *arg) { return BMenu::Perform(d, arg); @@ -370,33 +370,33 @@ } -void +void BMenuBar::StartMenuBar(int32 menuIndex, bool sticky, bool showMenu, BRect *specialRect) { if (fTracking) return; BWindow *window = Window(); - if (window == NULL) + if (window == NULL) debugger("MenuBar must be added to a window before it can be used."); - - BAutolock lock(window); + + BAutolock lock(window); if (!lock.IsLocked()) return; - + fPrevFocusToken = -1; fTracking = true; - + // We are called from the window's thread, // so let's call MenusBeginning() directly window->MenusBeginning(); - + fMenuSem = create_sem(0, "window close sem"); _set_menu_sem_(window, fMenuSem); - + fTrackingPID = spawn_thread(_TrackTask, "menu_tracking", B_DISPLAY_PRIORITY, NULL); if (fTrackingPID >= 0) { - menubar_data data; + menubar_data data; data.menuBar = this; data.menuIndex = menuIndex; data.sticky = sticky; @@ -404,10 +404,9 @@ data.useRect = specialRect != NULL; if (data.useRect) data.rect = *specialRect; - - resume_thread(fTrackingPID); + + resume_thread(fTrackingPID); send_data(fTrackingPID, 0, &data, sizeof(data)); - } else { fTracking = false; _set_menu_sem_(window, B_NO_MORE_SEMS); @@ -426,33 +425,33 @@ BMenuBar *menuBar = data.menuBar; if (data.useRect) - menuBar->fExtraRect = &data.rect; + menuBar->fExtraRect = &data.rect; menuBar->_SetStickyMode(data.sticky); - + int32 action; menuBar->_Track(&action, data.menuIndex, data.showMenu); - + menuBar->fTracking = false; menuBar->fExtraRect = NULL; // We aren't the BWindow thread, so don't call MenusEnded() directly BWindow *window = menuBar->Window(); window->PostMessage(_MENUS_DONE_); - + _set_menu_sem_(window, B_BAD_SEM_ID); delete_sem(menuBar->fMenuSem); menuBar->fMenuSem = B_BAD_SEM_ID; - + return 0; } BMenuItem * BMenuBar::_Track(int32 *action, int32 startIndex, bool showMenu) -{ +{ // TODO: Cleanup, merge some "if" blocks if possible fChosenItem = NULL; - + BWindow *window = Window(); fState = MENU_STATE_TRACKING; @@ -460,7 +459,7 @@ uint32 buttons; if (window->Lock()) { if (startIndex != -1) { - be_app->ObscureCursor(); + be_app->ObscureCursor(); _SelectItem(ItemAt(startIndex), true, true); } GetMouse(&where, &buttons); @@ -494,7 +493,7 @@ // us the new position. // TODO: Maybe have a shared struct between all menus // where to store the current mouse position ? - // (Or just use the BView mouse hooks) + // (Or just use the BView mouse hooks) BPoint newWhere; if (window->Lock()) { GetMouse(&newWhere, &buttons); @@ -505,10 +504,10 @@ // that are children of BMenuFields "sticky" (see ticket #953) if (localAction == MENU_STATE_CLOSED) { if (fExtraRect != NULL && fExtraRect->Contains(where) - // 9 = 3 pixels ^ 2 (since point_distance() returns the square of the distance) + // 9 = 3 pixels ^ 2 (since point_distance() returns the square of the distance) && point_distance(newWhere, where) < 9) { _SetStickyMode(true); - fExtraRect = NULL; + fExtraRect = NULL; } else fState = MENU_STATE_CLOSED; } @@ -527,7 +526,7 @@ } } else { // No submenu, just select the item - _SelectItem(menuItem); + _SelectItem(menuItem); } } else if (menuItem == NULL && fSelected != NULL && !_IsStickyMode() && Bounds().Contains(where)) { @@ -536,8 +535,8 @@ } window->Unlock(); - - if (fState != MENU_STATE_CLOSED) { + + if (fState != MENU_STATE_CLOSED) { // if user doesn't move the mouse, loop here, // so we don't interfer with keyboard menu navigation BPoint newLocation; @@ -548,9 +547,9 @@ break; GetMouse(&newLocation, &newButtons, true); UnlockLooper(); - } while (newLocation == where + } while (newLocation == where && newButtons == buttons); - + where = newLocation; buttons = newButtons; @@ -569,13 +568,13 @@ fState = MENU_STATE_CLOSED; } else _SetStickyMode(true); - } + } } } - + if (window->Lock()) { if (fSelected != NULL) - _SelectItem(NULL); + _SelectItem(NULL); if (fChosenItem != NULL) fChosenItem->Invoke(); @@ -614,28 +613,28 @@ } -void +void BMenuBar::_RestoreFocus() { BWindow *window = Window(); if (window != NULL && window->Lock()) { BHandler *handler = NULL; - if (fPrevFocusToken != -1 + if (fPrevFocusToken != -1 && gDefaultTokens.GetToken(fPrevFocusToken, B_HANDLER_TOKEN, (void **)&handler) == B_OK) { BView *view = dynamic_cast(handler); if (view != NULL && view->Window() == window) - view->MakeFocus(); - + view->MakeFocus(); + } else if (IsFocus()) MakeFocus(false); - + fPrevFocusToken = -1; window->Unlock(); } } -void +void BMenuBar::_InitData(menu_layout layout) { fLastBounds = new BRect(Bounds()); From revol at free.fr Fri Oct 3 17:15:12 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Fri, 03 Oct 2008 17:15:12 +0200 CEST Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <20081003111916.1806.2@stippis2.1223019067.fake> Message-ID: <4607361836-BeMail@laptop> > Thanks for the comments! What browser did you use to view this? I am > seeing > white background in Firefox and the text wraps to window width. (This > is > the browser that will display it on Haiku if all goes well.) Works fine here in the latest NetSurf ;) http://revolf.free.fr/beos/netsurf-bone.zip I think he means the blue bg on grabs. Fran?ois. From humdingerb at googlemail.com Fri Oct 3 17:31:21 2008 From: humdingerb at googlemail.com (Humdinger) Date: Fri, 03 Oct 2008 17:31:21 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> Message-ID: <48E63AC9.5090204@googlemail.com> Michael Pfeiffer wrote: > Very nice! > > Some remarks: > 1) Pointers in images should be less dominant; they distract from content; may sufficient to change background color to white? You mean white instead of yellow? Hmmm, I kinda like the yellow-tab-yellow. :) I admit the numbers are a bit big. I'm easily tricked by the high resolution of my notebook. > 2) Text should fit to window width not to largest image width. Yes, I shouldn't have put everything into a table, just the logo area. > 3) Avoid naming other operating systems (like Linux in regard to window managers; maybe use Unix instead). In some cases you have to name them to explain things for users coming from those platforms. You're right that "unix" would be better. But not much. :) > 4) Maybe limit max image width 1024 pixels to be small display size friendly. I think the widest image is around 750 pixels. I agree to make images as small as possible, when showing a couple of attributes in a tracker window that's not always possible. > 5) Spell check (for example garantee -> guarantee). Right. Forgot about that... I'll correct all the above in a few days. Thanks for your input! Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-- Deutsche Haiku News @ http://haiku-gazette.blogspot.com From michael.w.pfeiffer at gmail.com Fri Oct 3 19:28:49 2008 From: michael.w.pfeiffer at gmail.com (Michael Pfeiffer) Date: Fri, 3 Oct 2008 19:28:49 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <48E63AC9.5090204@googlemail.com> References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> <48E63AC9.5090204@googlemail.com> Message-ID: Am 03.10.2008 um 17:31 schrieb Humdinger: > Michael Pfeiffer wrote: >> Very nice! >> >> Some remarks: >> 1) Pointers in images should be less dominant; they distract from >> content; may > sufficient to change background color to white? > > You mean white instead of yellow? Yes. > Hmmm, I kinda like the yellow-tab-yellow. :) I have nothing against that yellow ;) However I think another color should be used in the pointers to visually differentiate what belongs to the pointer and what to the elements of the user interface. I have experimented a little bit with different colors, but have not found a good combination (see screen shots). What I can say is that white background color is not good either. Before: (gui.png) -------------- next part -------------- A non-text attachment was scrubbed... Name: gui.png Type: image/png Size: 9453 bytes Desc: not available URL: -------------- next part -------------- After: (gui2.png; modified to use an indexed color table to ease modifications) -------------- next part -------------- A non-text attachment was scrubbed... Name: gui2.png Type: image/png Size: 8781 bytes Desc: not available URL: -------------- next part -------------- > I admit the numbers are a bit big. I'm easily tricked by the high > resolution of my notebook. That font size would be OK for me, so you can easily spot the numbers. Anyway this is just my opinion and it's up to you to make decisions :) - Michael From humdingerb at googlemail.com Fri Oct 3 20:36:20 2008 From: humdingerb at googlemail.com (Humdinger) Date: Fri, 03 Oct 2008 20:36:20 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> <48E63AC9.5090204@googlemail.com> Message-ID: <48E66624.5070506@googlemail.com> Michael Pfeiffer wrote: > I have experimented a little bit with different colors, but have not > found a good combination (see screen shots). What I can say is that > white background color is not good either. How about inverted, yellow numbers and border and a black background, plus a drop shadow to indicate it's not part of the actual screenshot. See attachment. Regards, Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-- Deutsche Haiku News @ http://haiku-gazette.blogspot.com -------------- next part -------------- A non-text attachment was scrubbed... Name: gui-new.png Type: image/png Size: 36345 bytes Desc: not available URL: From axeld at mail.berlios.de Sat Oct 4 09:45:16 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 4 Oct 2008 09:45:16 +0200 Subject: [Haiku-commits] r27862 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200810040745.m947jGhm004339@sheep.berlios.de> Author: axeld Date: 2008-10-04 09:45:15 +0200 (Sat, 04 Oct 2008) New Revision: 27862 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27862&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/vm86.cpp Log: * Applied a patch by Jan Kl?\195?\182tzke: added a description for buffers passed to the function. Modified: haiku/trunk/src/system/kernel/arch/x86/vm86.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/vm86.cpp 2008-10-03 12:48:59 UTC (rev 27861) +++ haiku/trunk/src/system/kernel/arch/x86/vm86.cpp 2008-10-04 07:45:15 UTC (rev 27862) @@ -612,6 +612,11 @@ The function will return B_OK if the BIOS was called successfully, otherwise an apropriate error code. After the call the registers are copied back to \a state to reflect the status after the BIOS returned. + + Any buffer which is given to the BIOS function may be allocated starting + from address 0x1000 up to the allocated RAM size (see vm86_prepare()). The + area below 0x1000 is not available because it is used for the interrupt + vector table, BIOS data area and as real mode stack. */ extern "C" status_t vm86_do_int(struct vm86_state *state, uint8 vec) From michael.w.pfeiffer at gmail.com Sat Oct 4 09:59:26 2008 From: michael.w.pfeiffer at gmail.com (Michael Pfeiffer) Date: Sat, 4 Oct 2008 09:59:26 +0200 Subject: [Haiku-commits] r27846 - in haiku/trunk/docs: . welcome welcome/attributes-images welcome/deskbar-images welcome/filetypes-images welcome/gui-images welcome/queries-images welcome/tracker-images welcome/twitcher-images welcome/welcome-images welcome/workshop-filetypes+attributes-images welcome/workspaces-images In-Reply-To: <48E66624.5070506@googlemail.com> References: <200810030803.m9383jel024689@sheep.berlios.de> <55A9E550-AD1E-4CD5-B66C-7CACDE79BC8B@gmail.com> <48E63AC9.5090204@googlemail.com> <48E66624.5070506@googlemail.com> Message-ID: <87927527-7CFA-4D04-A622-EB20BC7A31B2@gmail.com> Am 03.10.2008 um 20:36 schrieb Humdinger: > Michael Pfeiffer wrote: > >> I have experimented a little bit with different colors, but have >> not found a good combination (see screen shots). What I can say is >> that white background color is not good either. > > How about inverted, yellow numbers and border and a black > background, plus a drop shadow to indicate it's not part of the > actual screenshot. See attachment. IMO that looks better than the original version. - Michael From axeld at mail.berlios.de Sat Oct 4 10:09:42 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 4 Oct 2008 10:09:42 +0200 Subject: [Haiku-commits] r27863 - in haiku/trunk: headers/private/graphics/s3 src/add-ons/accelerants/s3 src/add-ons/kernel/drivers/graphics/s3 Message-ID: <200810040809.m9489gCp006108@sheep.berlios.de> Author: axeld Date: 2008-10-04 10:09:40 +0200 (Sat, 04 Oct 2008) New Revision: 27863 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27863&view=rev Modified: haiku/trunk/headers/private/graphics/s3/DriverInterface.h haiku/trunk/src/add-ons/accelerants/s3/accel.cpp haiku/trunk/src/add-ons/accelerants/s3/accel.h haiku/trunk/src/add-ons/accelerants/s3/cursor.cpp haiku/trunk/src/add-ons/accelerants/s3/engine.cpp haiku/trunk/src/add-ons/accelerants/s3/hooks.cpp haiku/trunk/src/add-ons/accelerants/s3/mode.cpp haiku/trunk/src/add-ons/accelerants/s3/savage.h haiku/trunk/src/add-ons/accelerants/s3/savage_dpms.cpp haiku/trunk/src/add-ons/accelerants/s3/savage_draw.cpp haiku/trunk/src/add-ons/accelerants/s3/savage_edid.cpp haiku/trunk/src/add-ons/accelerants/s3/savage_init.cpp haiku/trunk/src/add-ons/accelerants/s3/savage_mode.cpp haiku/trunk/src/add-ons/accelerants/s3/trio64_dpms.cpp haiku/trunk/src/add-ons/accelerants/s3/trio64_init.cpp haiku/trunk/src/add-ons/accelerants/s3/trio64_mode.cpp haiku/trunk/src/add-ons/accelerants/s3/virge_dpms.cpp haiku/trunk/src/add-ons/accelerants/s3/virge_edid.cpp haiku/trunk/src/add-ons/accelerants/s3/virge_init.cpp haiku/trunk/src/add-ons/accelerants/s3/virge_mode.cpp haiku/trunk/src/add-ons/kernel/drivers/graphics/s3/driver.cpp Log: Update for the S3 driver by Gerald: * The hardware cursor is now disabled at 640x480 with a Virge VX (before it was just invisible). * EDID info can now be read for all S3 chips. * For the Savage IX, Savage MX, and SuperSavage chips the display is no longer expanded to fill a laptop LCD display when the mode resolution is less than the size of LCD display. * Savage IX, Savage MX, and SuperSavage chips will now display mode 1400x1050 on a 1400x1050 laptop LCD display. Previously the display was blank at that resolution. * Previously about half the Savage chips would not draw properly at 1400x1050. That is, the image was badly skewed and unusable. All of them now draw properly at 1400x1050. * Some code was reorganized to remove unnecessary and redundant code. Modified: haiku/trunk/headers/private/graphics/s3/DriverInterface.h =================================================================== --- haiku/trunk/headers/private/graphics/s3/DriverInterface.h 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/headers/private/graphics/s3/DriverInterface.h 2008-10-04 08:09:40 UTC (rev 27863) @@ -2,7 +2,7 @@ Copyright 2007-2008 Haiku, Inc. All rights reserved. Distributed under the terms of the MIT license. - Other authors: + Authors: Gerald Zajac 2007-2008 */ @@ -16,35 +16,51 @@ #include -// This is the info that needs to be shared between the kernel driver and -// the accelerant for the sample driver. +// This file contains info that is shared between the kernel driver and the +// accelerant, and info that is shared among the source files of the accelerant. -#if defined(__cplusplus) -extern "C" { -#endif #define ENABLE_DEBUG_TRACE // if defined, turns on debug output to syslog #define NUM_ELEMENTS(a) ((int)(sizeof(a) / sizeof(a[0]))) // for computing number of elements in an array -struct benaphore { +struct Benaphore { sem_id sem; - int32 ben; -}; + int32 count; -#define INIT_BEN(x) x.sem = create_sem(0, "S3 "#x" benaphore"); x.ben = 0; -#define AQUIRE_BEN(x) if((atomic_add(&(x.ben), 1)) >= 1) acquire_sem(x.sem); -#define RELEASE_BEN(x) if((atomic_add(&(x.ben), -1)) > 1) release_sem(x.sem); -#define DELETE_BEN(x) delete_sem(x.sem); + status_t Init(const char* name) + { + count = 0; + sem = create_sem(0, name); + return sem < 0 ? sem : B_OK; + } + status_t Acquire() + { + if (atomic_add(&count, 1) > 0) + return acquire_sem(sem); + return B_OK; + } + status_t Release() + { + if (atomic_add(&count, -1) > 1) + return release_sem(sem); + return B_OK; + } + + void Delete() { delete_sem(sem); } +}; + + #define S3_PRIVATE_DATA_MAGIC 0x4521 // a private driver rev, of sorts enum { S3_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1, S3_DEVICE_NAME, + S3_GET_EDID, S3_GET_PIO, S3_SET_PIO, S3_RUN_INTERRUPTS, @@ -54,7 +70,7 @@ // Chip type numbers. These are used to group the chips into related // groups. See table S3_ChipTable in driver.c -enum S3_ChipType { +enum ChipType { S3_TRIO64 = 1, S3_TRIO64_VP, // Trio64V+ has same ID as Trio64 but different revision number S3_TRIO64_UVP, @@ -106,33 +122,10 @@ }; -// Bitmap descriptor structures for BCI (for Savage chips) -struct HIGH { - unsigned short Stride; - unsigned char Bpp; - unsigned char ResBWTile; -}; -struct BMPDESC1 { - unsigned long Offset; - HIGH HighPart; -}; - -struct BMPDESC2 { - unsigned long LoPart; - unsigned long HiPart; -}; - -union BMPDESC { - BMPDESC1 bd1; - BMPDESC2 bd2; -}; - - - struct DisplayModeEx : display_mode { - uint32 bpp; // bits/pixel - uint32 bytesPerRow; // number of bytes in one line/row + uint32 bpp; // bits/pixel + uint32 bytesPerRow; // actual number of bytes in one line/row }; @@ -147,6 +140,9 @@ bool bAccelerantInUse; // true = accelerant has been initialized bool bInterruptAssigned; // card has a useable interrupt assigned to it + bool bDisableHdwCursor; // true = disable hardware cursor & use software cursor + bool bDisableAccelDraw; // true = disable accelerated drawing + sem_id vertBlankSem; // vertical blank semaphore; if < 0, there is no semaphore // Memory mappings. @@ -169,11 +165,8 @@ area_id modeArea; // area containing list of display modes the driver supports uint32 modeCount; // number of display modes in the list - // Cursor info. - struct { - uint16 hot_x; // Cursor hot spot. Top left corner of the cursor - uint16 hot_y; // is 0,0 - } cursor; + uint16 cursorHotX; // Cursor hot spot. Top left corner of the cursor + uint16 cursorHotY; // is 0,0 // Current display mode configuration, and other parameters related to // current display mode. @@ -183,12 +176,7 @@ edid1_info edidInfo; bool bHaveEDID; // true = EDID info from device is in edidInfo - // Acceleration engine. - struct { - uint64 count; // last fifo slot used - uint64 lastIdle; // last fifo slot we *know* the engine was idle after - benaphore lock; // for serializing access to the acceleration engine - } engine; + Benaphore engineLock; // for serializing access to the acceleration engine int mclk; @@ -198,41 +186,39 @@ uint16 panelY; // laptop LCD height // Command Overflow Buffer (COB) parameters for Savage chips. - bool bDisableCOB; // enable/disable COB for Savage 4 & ProSavage - uint32 cobIndex; // size index - uint32 cobSize; // size in bytes + uint32 cobSizeIndex; // size index uint32 cobOffset; // offset in video memory - uint32 bciThresholdLo; // low and high thresholds for - uint32 bciThresholdHi; // shadow status update (32bit words) - BMPDESC GlobalBD; // Bitmap Descriptor for BCI + uint32 globalBitmapDesc; // Global Bitmap Descriptor for BCI }; // Set some boolean condition (like enabling or disabling interrupts) struct S3SetBoolState { - uint32 magic; // magic number to make sure the caller groks us + uint32 magic; // magic number bool bEnable; // state to set }; // Retrieve the area_id of the kernel/accelerant shared info struct S3GetPrivateData { - uint32 magic; // magic number to make sure the caller groks us + uint32 magic; // magic number area_id sharedInfoArea; // ID of area containing shared information }; -struct S3GetSetPIO { - uint32 magic; // magic number to make sure the caller groks us - uint32 offset; // offset of PIO register to read/write - uint32 size; // number of bytes to transfer - uint32 value; // value to write or value that was read +struct S3GetEDID { + uint32 magic; // magic number + edid1_raw rawEdid; // raw EDID info to obtain }; -#if defined(__cplusplus) -} -#endif +struct S3GetSetPIO { + uint32 magic; // magic number + uint32 offset; // offset of PIO register to read/write + uint32 size; // number of bytes to transfer + uint32 value; // value to write or value that was read +}; + #endif // DRIVERINTERFACE_H Modified: haiku/trunk/src/add-ons/accelerants/s3/accel.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/accel.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/accel.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -97,15 +97,15 @@ } else { result = gInfo.ChipInit(); // perform init related to current chip if (result == B_OK) { + result = si.engineLock.Init("ATI engine lock"); + if (result == B_OK) { + if (gInfo.ShowCursor != NULL) + gInfo.ShowCursor(false); - INIT_BEN(si.engine.lock); - si.engine.lastIdle = 0; - si.engine.count = 0; - - gInfo.ShowCursor(false); - - // ensure that this function won't be executed again (copies should be clones) - si.bAccelerantInUse = true; + // ensure that this function won't be executed again + // (copies should be clones) + si.bAccelerantInUse = true; + } } } Modified: haiku/trunk/src/add-ons/accelerants/s3/accel.h =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/accel.h 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/accel.h 2008-10-04 08:09:40 UTC (rev 27863) @@ -13,12 +13,7 @@ #include "register_io.h" -#if defined(__cplusplus) -extern "C" { -#endif - - #undef TRACE #ifdef ENABLE_DEBUG_TRACE @@ -43,7 +38,7 @@ display_mode* modeList; // list of standard display modes area_id modeListArea; // mode list area ID - bool bAccelerantIsClone;// true if this is a cloned accelerant + bool bAccelerantIsClone; // true if this is a cloned accelerant // Pointers to wait handlers. void (*WaitQueue)(uint32); @@ -51,7 +46,7 @@ // Pointers to DPMS functions. uint32 (*DPMSCapabilities)(void); - uint32 (*DPMSMode)(void); + uint32 (*GetDPMSMode)(void); status_t (*SetDPMSMode)(uint32 dpms_flags); // Pointers to cursor functions. @@ -82,6 +77,10 @@ // chips will have no prefix. //================================================================ +#if defined(__cplusplus) +extern "C" { +#endif + // General status_t InitAccelerant(int fd); ssize_t AccelerantCloneInfoSize(void); @@ -109,15 +108,15 @@ // DPMS uint32 Savage_DPMSCapabilities(void); -uint32 Savage_DPMSMode(void); +uint32 Savage_GetDPMSMode(void); status_t Savage_SetDPMSMode(uint32 dpms_flags); uint32 Trio64_DPMSCapabilities(void); -uint32 Trio64_DPMSMode(void); +uint32 Trio64_GetDPMSMode(void); status_t Trio64_SetDPMSMode(uint32 dpms_flags); uint32 Virge_DPMSCapabilities(void); -uint32 Virge_DPMSMode(void); +uint32 Virge_GetDPMSMode(void); status_t Virge_SetDPMSMode(uint32 dpms_flags); // Cursor @@ -152,20 +151,25 @@ void Virge_InvertRectangle(engine_token* et, fill_rect_params* list, uint32 count); void Virge_ScreenToScreenBlit(engine_token* et, blit_params* list, uint32 count); +#if defined(__cplusplus) +} +#endif + // Prototypes for other functions that are called from source files other than // where they are defined. //============================================================================ -status_t CreateModeList(bool (*checkMode)(const display_mode* mode)); +status_t CreateModeList(bool (*checkMode)(const display_mode* mode), + bool (*getEdid)(edid1_info& edidInfo)); void InitCrtcTimingValues(const DisplayModeEx& mode, int horzScaleFactor, uint8 crtc[], uint8& cr3b, uint8& cr3c, uint8& cr5d, uint8& cr5e); bool IsModeUsable(const display_mode* mode); // Savage functions. -bool Savage_GetEdidInfo(void); +bool Savage_GetEdidInfo(edid1_info& edidInfo); bool Savage_LoadCursorImage(int width, int height, uint8* and_mask, uint8* xor_mask); void Savage_SetCursorPosition(int x, int y); @@ -185,7 +189,7 @@ // Virge functions. -bool Virge_GetEdidInfo(void); +bool Virge_GetEdidInfo(edid1_info& edidInfo); bool Virge_LoadCursorImage(int width, int height, uint8* and_mask, uint8* xor_mask); void Virge_SetCursorPosition(int x, int y); @@ -195,8 +199,4 @@ void Virge_SetFunctionPointers(void); -#if defined(__cplusplus) -} -#endif - #endif // _ACCEL_H Modified: haiku/trunk/src/add-ons/accelerants/s3/cursor.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/cursor.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/cursor.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -9,7 +9,7 @@ #include "accel.h" -status_t +status_t SetCursorShape(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y, uint8* andMask, uint8* xorMask) { @@ -23,8 +23,8 @@ // Update cursor variables appropriately. SharedInfo& si = *gInfo.sharedInfo; - si.cursor.hot_x = hot_x; - si.cursor.hot_y = hot_y; + si.cursorHotX = hot_x; + si.cursorHotY = hot_y; if ( ! gInfo.LoadCursorImage(width, height, andMask, xorMask)) return B_ERROR; @@ -34,7 +34,7 @@ } -void +void MoveCursor(uint16 xPos, uint16 yPos) { // Move the cursor to the specified position on the desktop. If we're @@ -72,8 +72,8 @@ MoveDisplay(hds, vds); // Put cursor in correct physical position. - x -= (hds + si.cursor.hot_x); - y -= (vds + si.cursor.hot_y); + x -= (hds + si.cursorHotX); + y -= (vds + si.cursorHotY); // Position the cursor on the display. gInfo.SetCursorPosition(x, y); Modified: haiku/trunk/src/add-ons/accelerants/s3/engine.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/engine.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/engine.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -3,7 +3,7 @@ This file may be used under the terms of the Be Sample Code License. Other authors: - Gerald Zajac 2007 + Gerald Zajac 2007-2008 */ #include "accel.h" @@ -12,22 +12,23 @@ static engine_token engineToken = { 1, B_2D_ACCELERATION, NULL }; -uint32 +uint32 AccelerantEngineCount(void) { return 1; } -status_t +status_t AcquireEngine(uint32 capabilities, uint32 max_wait, sync_token* st, engine_token** et) { (void)capabilities; // avoid compiler warning for unused arg (void)max_wait; // avoid compiler warning for unused arg - // Acquire the shared benaphore. - AQUIRE_BEN(gInfo.sharedInfo->engine.lock) + if (gInfo.sharedInfo->engineLock.Acquire() != B_OK) + return B_ERROR; + // Sync if required. if (st) SyncToToken(st); @@ -38,37 +39,35 @@ } -status_t +status_t ReleaseEngine(engine_token* et, sync_token* st) { // Update the sync token, if any. if (st) GetSyncToken(et, st); - // Release the shared benaphore. - RELEASE_BEN(gInfo.sharedInfo->engine.lock) + gInfo.sharedInfo->engineLock.Release(); return B_OK; } -void +void WaitEngineIdle(void) { gInfo.WaitIdleEmpty(); // wait until engine is completely idle } -status_t +status_t GetSyncToken(engine_token* et, sync_token* st) { - // Engine count will always be zero: we don't support syncing to token (yet). st->engine_id = et->engine_id; - st->counter = gInfo.sharedInfo->engine.count; + st->counter = 0; return B_OK; } -status_t +status_t SyncToToken(sync_token* st) { (void)st; // avoid compiler warning for unused arg Modified: haiku/trunk/src/add-ons/accelerants/s3/hooks.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/hooks.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/hooks.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -14,6 +14,8 @@ { (void)data; // avoid compiler warning for unused arg + SharedInfo& si = *gInfo.sharedInfo; + switch (feature) { // General case B_INIT_ACCELERANT: return (void*)InitAccelerant; @@ -42,13 +44,16 @@ // DPMS case B_DPMS_CAPABILITIES: return (void*)(gInfo.DPMSCapabilities); - case B_DPMS_MODE: return (void*)(gInfo.DPMSMode); + case B_DPMS_MODE: return (void*)(gInfo.GetDPMSMode); case B_SET_DPMS_MODE: return (void*)(gInfo.SetDPMSMode); // Cursor - case B_SET_CURSOR_SHAPE: return (void*)SetCursorShape; - case B_MOVE_CURSOR: return (void*)MoveCursor; - case B_SHOW_CURSOR: return (void*)(gInfo.ShowCursor); + case B_SET_CURSOR_SHAPE: + return (void*)(si.bDisableHdwCursor ? NULL : SetCursorShape); + case B_MOVE_CURSOR: + return (void*)(si.bDisableHdwCursor ? NULL : MoveCursor); + case B_SHOW_CURSOR: + return (void*)(si.bDisableHdwCursor ? NULL : gInfo.ShowCursor); // Engine Management case B_ACCELERANT_ENGINE_COUNT: return (void*)AccelerantEngineCount; @@ -59,10 +64,14 @@ case B_SYNC_TO_TOKEN: return (void*)SyncToToken; // 2D acceleration - case B_SCREEN_TO_SCREEN_BLIT: return (void*)(gInfo.ScreenToScreenBlit); - case B_FILL_RECTANGLE: return (void*)(gInfo.FillRectangle); - case B_INVERT_RECTANGLE: return (void*)(gInfo.InvertRectangle); - case B_FILL_SPAN: return (void*)(gInfo.FillSpan); + case B_SCREEN_TO_SCREEN_BLIT: + return (void*)(si.bDisableAccelDraw ? NULL : gInfo.ScreenToScreenBlit); + case B_FILL_RECTANGLE: + return (void*)(si.bDisableAccelDraw ? NULL : gInfo.FillRectangle); + case B_INVERT_RECTANGLE: + return (void*)(si.bDisableAccelDraw ? NULL : gInfo.InvertRectangle); + case B_FILL_SPAN: + return (void*)(si.bDisableAccelDraw ? NULL : gInfo.FillSpan); } return NULL; // Return null pointer for any feature not handled above Modified: haiku/trunk/src/add-ons/accelerants/s3/mode.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/mode.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/mode.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -8,8 +8,9 @@ #include "accel.h" -#include +#include // common accelerant header file #include +#include void @@ -29,7 +30,7 @@ int hDisp_e = (mode.timing.h_display * horzScaleFactor) / 8 - 1; int hSync_s = (mode.timing.h_sync_start * horzScaleFactor) / 8; int hSync_e = (mode.timing.h_sync_end * horzScaleFactor) / 8; - int hBlank_s = hDisp_e; // start of horizontal blanking + int hBlank_s = hDisp_e + 1; // start of horizontal blanking int hBlank_e = hTotal; // end of horizontal blanking int vTotal = mode.timing.v_total - 2; @@ -39,8 +40,6 @@ int vBlank_s = vDisp_e; // start of vertical blanking int vBlank_e = vTotal; // end of vertical blanking - TRACE("InitCrtcTimingValues()\n"); - // CRTC Controller values crtc[0x00] = hTotal; @@ -146,6 +145,28 @@ } + +static bool +IsThereEnoughFBMemory(const display_mode* mode, uint32 bitsPerPixel) +{ + // Test if there is enough Frame Buffer memory for the mode and color depth + // specified by the caller, and return true if there is sufficient memory. + + uint32 maxWidth = mode->virtual_width; + if (mode->timing.h_display > maxWidth) + maxWidth = mode->timing.h_display; + + uint32 maxHeight = mode->virtual_height; + if (mode->timing.v_display > maxHeight) + maxHeight = mode->timing.v_display; + + uint32 bytesPerPixel = (bitsPerPixel + 7) / 8; + + return (maxWidth * maxHeight * bytesPerPixel < gInfo.sharedInfo->maxFrameBufferSize); +} + + + bool IsModeUsable(const display_mode* mode) { @@ -162,10 +183,9 @@ if ( ! gInfo.GetColorSpaceParams(mode->space, bitsPerPixel, maxPixelClock)) return false; - // Is there enough memory to handle the mode? + // Is there enough frame buffer memory to handle the mode? - if (mode->virtual_width * mode->virtual_height * ((bitsPerPixel + 7) / 8) - > si.maxFrameBufferSize) + if ( ! IsThereEnoughFBMemory(mode, bitsPerPixel)) return false; if (mode->timing.pixel_clock > maxPixelClock) @@ -190,42 +210,65 @@ if (mode->timing.h_display == 640 && mode->timing.v_display < 480) return false; - // In most mode lists, there are three entries for 640 x 480 which have a - // refresh rate of 60 Hz. The one with a pixel clock of 25175 works fine - // with the S3 chips; however, the other two with higher clock rates - // cause the display to be offset down and to the right; thus, reject them. - - if (mode->timing.h_display == 640 && mode->timing.v_display == 480) { - int modeRefreshRate = int(((mode->timing.pixel_clock * 1000.0 / - mode->timing.h_total) / mode->timing.v_total) + 0.5); - if (modeRefreshRate == 60 && mode->timing.pixel_clock > 26000) - return false; - } - - // If the video is connected directly to an LCD display (ie, laptop + // If the video chip is connected directly to an LCD display (ie, laptop // computer), restrict the display mode to resolutions where the width and // height of the mode are less than or equal to the width and height of the - // LCD display. Note that this code is not needed under Haiku since it can - // get the preferred mode which should be the resolution of the LCD display. + // LCD display. -#ifndef __HAIKU__ - - if (si.displayType == MT_LCD && si.panelX > 0 && si.panelY > 0 && - (mode->timing.h_display > si.panelX + if (si.displayType == MT_LCD && si.panelX > 0 && si.panelY > 0 + && (mode->timing.h_display > si.panelX || mode->timing.v_display > si.panelY)) { return false; } -#endif // __HAIKU__ - return true; } status_t -CreateModeList(bool (*checkMode)(const display_mode* mode)) +CreateModeList( bool (*checkMode)(const display_mode* mode), + bool (*getEdid)(edid1_info& edidInfo)) { SharedInfo& si = *gInfo.sharedInfo; + + // Obtain EDID info which is needed for for building the mode list. + // However, if a laptop's LCD display is active, bypass getting the EDID + // info since it is not needed, and if the external display supports only + // resolutions smaller than the size of the laptop LCD display, it would + // unnecessarily restrict size of the resolutions that could be set for + // laptop LCD display. + + si.bHaveEDID = false; + + if (si.displayType != MT_LCD) { + if (getEdid != NULL) + si.bHaveEDID = getEdid(si.edidInfo); + + if ( ! si.bHaveEDID) { + S3GetEDID ged; + ged.magic = S3_PRIVATE_DATA_MAGIC; + + if (ioctl(gInfo.deviceFileDesc, S3_GET_EDID, &ged, sizeof(ged)) == B_OK) { + if (ged.rawEdid.version.version != 1 + || ged.rawEdid.version.revision > 4) { + TRACE("CreateModeList(); EDID version %d.%d out of range\n", + ged.rawEdid.version.version, ged.rawEdid.version.revision); + } else { + edid_decode(&si.edidInfo, &ged.rawEdid); // decode & save EDID info + si.bHaveEDID = true; + } + } + } + + if (si.bHaveEDID) { +#ifdef ENABLE_DEBUG_TRACE + edid_dump(&(si.edidInfo)); +#endif + } else { + TRACE("CreateModeList(); Unable to get EDID info\n"); + } + } + display_mode* list; uint32 count = 0; area_id listArea; @@ -254,9 +297,9 @@ (void)low; // avoid compiler warning for unused arg (void)high; // avoid compiler warning for unused arg - TRACE("ProposeDisplayMode() clock: %d, width: %d, height: %d, space: 0x%X\n", - target->timing.pixel_clock, target->virtual_width, target->virtual_height, - target->space); + TRACE("ProposeDisplayMode() %dx%d, pixel clock: %d kHz, space: 0x%X\n", + target->timing.h_display, target->timing.v_display, + target->timing.pixel_clock, target->space); // Search the mode list for the specified mode. @@ -275,6 +318,7 @@ } + status_t SetDisplayMode(display_mode* pMode) { @@ -290,28 +334,51 @@ if ( ! gInfo.GetColorSpaceParams(mode.space, mode.bpp, maxPixelClock)) return B_ERROR; - mode.bytesPerRow = mode.virtual_width * ((mode.bpp + 7) / 8); // use virtual width - if (ProposeDisplayMode(&mode, pMode, pMode) != B_OK) return B_ERROR; - // Test if there is sufficient memory for this mode. Use the virtual width - // and height for this calculation since one or both might be greater than - // the actual dimensions of the mode. + // Note that for some Savage chips, accelerated drawing is badly messed up + // when the display width is 1400 because 1400 is not evenly divisible by 32. + // For those chips, set the width to 1408 so that accelerated drawing will + // draw properly. - if (mode.bytesPerRow * mode.virtual_height > si.maxFrameBufferSize) + if (mode.timing.h_display == 1400 && (si.chipType == S3_PROSAVAGE + || si.chipType == S3_PROSAVAGE_DDR + || si.chipType == S3_TWISTER + || si.chipType == S3_SUPERSAVAGE + || si.chipType == S3_SAVAGE2000)) { + mode.timing.h_display = 1408; + mode.virtual_width = 1408; + } + + int bytesPerPixel = (mode.bpp + 7) / 8; + mode.bytesPerRow = mode.timing.h_display * bytesPerPixel; + + // Is there enough frame buffer memory for this mode? + + if ( ! IsThereEnoughFBMemory(&mode, mode.bpp)) return B_ERROR; - TRACE("Display Mode: width = %d, height = %d, depth = %d\n", + TRACE("Set display mode: %dx%d virtual size: %dx%d color depth: %d bpp\n", + mode.timing.h_display, mode.timing.v_display, mode.virtual_width, mode.virtual_height, mode.bpp); - TRACE("Mode Timing = { %d %d %d %d %d %d %d %d %d 0x%x }\n", + TRACE(" mode timing: %d %d %d %d %d %d %d %d %d\n", mode.timing.pixel_clock, - mode.timing.h_display, mode.timing.h_sync_start, mode.timing.h_sync_end, + mode.timing.h_display, + mode.timing.h_sync_start, mode.timing.h_sync_end, mode.timing.h_total, - mode.timing.v_display, mode.timing.v_sync_start, mode.timing.v_sync_end, - mode.timing.v_total, mode.timing.flags); + mode.timing.v_display, + mode.timing.v_sync_start, mode.timing.v_sync_end, + mode.timing.v_total); + TRACE(" mode hFreq: %.1f kHz vFreq: %.1f Hz %chSync %cvSync\n", + double(mode.timing.pixel_clock) / mode.timing.h_total, + ((double(mode.timing.pixel_clock) / mode.timing.h_total) * 1000.0) + / mode.timing.v_total, + (mode.timing.flags & B_POSITIVE_HSYNC) ? '+' : '-', + (mode.timing.flags & B_POSITIVE_VSYNC) ? '+' : '-'); + if ( ! gInfo.SetDisplayMode(mode)) return B_ERROR; @@ -379,7 +446,8 @@ pFBC->frame_buffer = (void*)((addr_t)si.videoMemAddr + si.frameBufferOffset); pFBC->frame_buffer_dma = (void*)((addr_t)si.videoMemPCI + si.frameBufferOffset); - pFBC->bytes_per_row = si.displayMode.bytesPerRow; + uint32 bytesPerPixel = (si.displayMode.bpp + 7) / 8; + pFBC->bytes_per_row = si.displayMode.virtual_width * bytesPerPixel; return B_OK; } @@ -418,7 +486,6 @@ { (void)constraints; // avoid compiler warning for unused arg - TRACE("GetTimingConstraints() called\n"); return B_ERROR; } @@ -429,8 +496,6 @@ // If the chip is connected to a laptop LCD panel, find the mode with // matching width and height, 60 Hz refresh rate, and greatest color depth. - TRACE("GetPreferredDisplayMode()\n"); - SharedInfo& si = *gInfo.sharedInfo; if (si.displayType == MT_LCD) { @@ -452,8 +517,6 @@ status_t GetEdidInfo(void* info, size_t size, uint32* _version) { - TRACE("GetEdidInfo()\n"); - SharedInfo& si = *gInfo.sharedInfo; if ( ! si.bHaveEDID) Modified: haiku/trunk/src/add-ons/accelerants/s3/savage.h =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/savage.h 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/savage.h 2008-10-04 08:09:40 UTC (rev 27863) @@ -40,17 +40,9 @@ // Primary Stream 2 Stride. #define PRI_STREAM2_STRIDE 0x81b8 -#define MEMORY_CTRL0_REG 0xCA -#define MEMORY_CONFIG_REG 0x31 +#define S3_GLOBAL_GBD_REG 0x816C // global bitmap descriptor register -// Bitmap descriptor register. -#define S3_GLB_BD_LOW 0x8168 -#define S3_GLB_BD_HIGH 0x816C -#define S3_PRI_BD_LOW 0x8170 -#define S3_PRI_BD_HIGH 0x8174 -#define S3_SEC_BD_LOW 0x8178 -#define S3_SEC_BD_HIGH 0x817c - +#define MEMORY_CTRL0_REG 0xCA #define MEM_PS1 0x10 // CRCA_4 :Primary stream 1 #define MEM_PS2 0x20 // CRCA_5 :Primary stream 2 @@ -73,7 +65,6 @@ #define TILE_FORMAT_LINEAR 0 -// BD - BCI enable. #define BCI_ENABLE 8 // savage4, MX, IX, 3D #define BCI_ENABLE_TWISTER 0 // twister, prosavage, DDR, supersavage, 2000 @@ -81,6 +72,7 @@ #define S3_LITTLE_ENDIAN 0 #define S3_BD64 1 +#define BCI_BD_BW_DISABLE 0x10000000 #define BCI_BUFFER_OFFSET 0x10000 #define BCI_GET_PTR vuint32* bci_ptr = ((uint32*)(gInfo.regs + BCI_BUFFER_OFFSET)) Modified: haiku/trunk/src/add-ons/accelerants/s3/savage_dpms.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/savage_dpms.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/savage_dpms.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -27,7 +27,7 @@ uint32 -Savage_DPMSMode(void) +Savage_GetDPMSMode(void) { // Return the current DPMS mode. @@ -59,7 +59,7 @@ mode = ((ReadSeqReg(0x31) & 0x10) ? B_DPMS_ON : B_DPMS_OFF); } - TRACE("Savage_DPMSMode() mode: %d\n", mode); + TRACE("Savage_GetDPMSMode() mode: %d\n", mode); return mode; } Modified: haiku/trunk/src/add-ons/accelerants/s3/savage_draw.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/savage_draw.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/savage_draw.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -25,7 +25,7 @@ (void)et; // avoid compiler warning for unused arg - BCI_CMD_SET_ROP(cmd, 0xCC); // use GXcopy for rop + BCI_CMD_SET_ROP(cmd, 0xF0); // use GXcopy for rop while (count--) { int x = pList->left; @@ -38,8 +38,8 @@ gInfo.WaitQueue(7); BCI_SEND(cmd); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.LoPart); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.HiPart); + BCI_SEND(gInfo.sharedInfo->frameBufferOffset); + BCI_SEND(gInfo.sharedInfo->globalBitmapDesc); BCI_SEND(color); BCI_SEND(BCI_X_Y(x, y)); @@ -58,7 +58,7 @@ (void)et; // avoid compiler warning for unused arg - BCI_CMD_SET_ROP(cmd, 0xCC); // use GXcopy for rop + BCI_CMD_SET_ROP(cmd, 0xF0); // use GXcopy for rop while (count--) { int y = *pList++; @@ -78,8 +78,8 @@ gInfo.WaitQueue(7); BCI_SEND(cmd); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.LoPart); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.HiPart); + BCI_SEND(gInfo.sharedInfo->frameBufferOffset); + BCI_SEND(gInfo.sharedInfo->globalBitmapDesc); BCI_SEND(color); BCI_SEND(BCI_X_Y(x, y)); @@ -109,8 +109,8 @@ gInfo.WaitQueue(7); BCI_SEND(cmd); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.LoPart); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.HiPart); + BCI_SEND(gInfo.sharedInfo->frameBufferOffset); + BCI_SEND(gInfo.sharedInfo->globalBitmapDesc); BCI_SEND(BCI_X_Y(x, y)); BCI_SEND(BCI_W_H(w, h)); @@ -157,17 +157,17 @@ BCI_SEND(cmd); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.LoPart); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.HiPart); + BCI_SEND(gInfo.sharedInfo->frameBufferOffset); + BCI_SEND(gInfo.sharedInfo->globalBitmapDesc); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.LoPart); - BCI_SEND(gInfo.sharedInfo->GlobalBD.bd2.HiPart); + BCI_SEND(gInfo.sharedInfo->frameBufferOffset); + BCI_SEND(gInfo.sharedInfo->globalBitmapDesc); BCI_SEND(BCI_X_Y(src_x, src_y)); BCI_SEND(BCI_X_Y(dest_x, dest_y)); BCI_SEND(BCI_W_H(width + 1, height + 1)); - pList ++; + pList++; } } Modified: haiku/trunk/src/add-ons/accelerants/s3/savage_edid.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/s3/savage_edid.cpp 2008-10-04 07:45:15 UTC (rev 27862) +++ haiku/trunk/src/add-ons/accelerants/s3/savage_edid.cpp 2008-10-04 08:09:40 UTC (rev 27863) @@ -50,7 +50,7 @@ bool -Savage_GetEdidInfo(void) +Savage_GetEdidInfo(edid1_info& edidInfo) { // Get the EDID info and return true if successful. @@ -83,17 +83,8 @@ uint8 tmp = ReadCrtcReg(DDCPort); WriteCrtcReg(DDCPort, tmp | 0x13); - si.bHaveEDID = (ddc2_read_edid1(&bus, &(si.edidInfo), NULL, NULL) == B_OK); - + bool bResult = (ddc2_read_edid1(&bus, &edidInfo, NULL, NULL) == B_OK); WriteCrtcReg(DDCPort, tmp); - if (si.bHaveEDID) { -#ifdef ENABLE_DEBUG_TRACE - edid_dump(&(si.edidInfo)); -#endif - } else { - TRACE("Savage_GetEdidInfo() failed!\n"); - } - [... truncated: 2346 lines follow ...] From axeld at pinc-software.de Sat Oct 4 10:35:56 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Sat, 04 Oct 2008 10:35:56 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r27846_-_in_haiku/trunk/docs=3A_=2E_wel?= =?utf-8?q?come_welcome/attributes-images_welcome/deskbar-images_welcome/f?= =?utf-8?q?iletypes-images_welcome/gui-images_welcome/queries-images_welco?= =?utf-8?q?me/tracker-images_welcome/twitcher-images_welcome/welcome-image?= =?utf-8?q?s_welcome/workshop-filetypes+attributes-images_welcome/workspac?= =?utf-8?q?es-images?= In-Reply-To: <87927527-7CFA-4D04-A622-EB20BC7A31B2@gmail.com> Message-ID: <4546292780-BeMail@zon> Michael Pfeiffer wrote: > Am 03.10.2008 um 20:36 schrieb Humdinger: > >> I have experimented a little bit with different colors, but have > >> not found a good combination (see screen shots). What I can say is > >> that white background color is not good either. > > How about inverted, yellow numbers and border and a black > > background, plus a drop shadow to indicate it's not part of the > > actual screenshot. See attachment. > IMO that looks better than the original version. What about something a bit more obtrusive? Those are even pretty easy to make with something like WonderBrush. Bye, Axel. -------------- next part -------------- A non-text attachment was scrubbed... Name: gui-alt.jpg Type: image/jpeg Size: 51670 bytes Desc: not available URL: From axeld at pinc-software.de Sat Oct 4 12:36:46 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Sat, 04 Oct 2008 12:36:46 +0200 CEST Subject: [Haiku-commits] r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <3811.85.223.98.72.1222992092.squirrel@webmail.inter.nl.net> Message-ID: <11796497482-BeMail@zon> Info.Be-Hold at inter.nl.net wrote: [...] > I have a feeling, that's getting stronger over time, that neither the > IDE > nor the ATA busmanager is responsible for my HD writing error. I > think > that either the generic PCI-IDE driver must be causing this (it's > used > with both busmanagers right?) > or there's a BIOS/hardware feature in existance that's blocking every > sector write attempt to the IDE port on my system. > Or some other system part that's common to both busmanagers??? I guess Marcus can better comment about ATA vs. IDE. In any case, for PCI, the generic_pci_ide driver is used. However, when you disable DMA, the ide_isa driver might be used instead. You could also try to remove the generic_pci_ide driver to see how the ide_isa driver fares. Also, maybe your chipset isn't 100% compatible and needs its own IDE driver. It's often helpful to look into how Linux or FreeBSD handles things in this regard. Bye, Axel. From korli at mail.berlios.de Sat Oct 4 12:47:35 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sat, 4 Oct 2008 12:47:35 +0200 Subject: [Haiku-commits] r27864 - haiku/trunk/src/add-ons/media/plugins/avcodec/libswscale Message-ID: <200810041047.m94AlZaZ004775@sheep.berlios.de> Author: korli Date: 2008-10-04 12:47:34 +0200 (Sat, 04 Oct 2008) New Revision: 27864 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27864&view=rev Removed: haiku/trunk/src/add-ons/media/plugins/avcodec/libswscale/config.h Log: remove symlink Deleted: haiku/trunk/src/add-ons/media/plugins/avcodec/libswscale/config.h From Info.Be-Hold at inter.nl.net Sat Oct 4 18:10:40 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Sat, 4 Oct 2008 18:10:40 +0200 (CEST) Subject: [Haiku-commits] found it!! r27684 - haiku/trunk/src/add-ons/kernel/bus_managers/ide In-Reply-To: <11796497482-BeMail@zon> References: <3811.85.223.98.72.1222992092.squirrel@webmail.inter.nl.net> <11796497482-BeMail@zon> Message-ID: <40409.85.223.98.72.1223136640.squirrel@webmail.inter.nl.net> Hi there guys!! (axel, marcus) I nailed the bitch :-)))) I just now booted successfully from IDE using the IDE-PCI generic driver and marcus ATA busmanager. My guess is I can do that now too with the IDE driver, though I have to see what DMA does.. The problem is this: Apparantly on my mainboard it's not possible to do 32bit transfers for write actions to the harddisk..... I modified marcus his PIO write calls in the ATA manager for the IDE-PCI driver to use 16 bit instead of 32 bit and now all is dandy! Reading using 32bit access is OK apparantly. I'll restore everything back to normal with just this one change in both ATA and IDE busmanagers to see how they hold (speed, DMA for IDE) and report back later on that. In the meantime I am hoping you guys can come up with the reason for this problem (I'll try to lookup hardware specs here) and a fix for it. Also I suggest adding a fallback mode in the ATA and IDE busmanagers using 16 bit access in case errors occur before panicking and resetting busses and devices. This could be done seperately for read and write access, since apparantly hardware exists that can do 32bit reads, but not 32 bit writes. I'll also test the managers on the seperate IDE controller I have here which I expect to have exactly the same problem: a promise ultra133 tx2 board (didn't boot either!) Wow! this is a good feeling :-) (So, while it looked like I was loosing ints over here, as also suggested by someone, in fact 32bit transfers writing fail, while reading 32bit is ok.) Thanks for looking into this in advance!? Rudolf. Op Za, 4 oktober, 2008 12:36 pm schreef Axel D??rfler: > Info.Be-Hold at inter.nl.net wrote: > [...] > >> I have a feeling, that's getting stronger over time, that neither the >> IDE >> nor the ATA busmanager is responsible for my HD writing error. I think >> that either the generic PCI-IDE driver must be causing this (it's used >> with both busmanagers right?) or there's a BIOS/hardware feature in >> existance that's blocking every sector write attempt to the IDE port on >> my system. Or some other system part that's common to both >> busmanagers??? > > I guess Marcus can better comment about ATA vs. IDE. > In any case, for PCI, the generic_pci_ide driver is used. However, when > you disable DMA, the ide_isa driver might be used instead. You could also > try to remove the generic_pci_ide driver to see how the ide_isa driver > fares. Also, maybe your chipset isn't 100% compatible and needs its own > IDE > driver. It's often helpful to look into how Linux or FreeBSD handles things > in this regard. > > Bye, > Axel. > > > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From axeld at mail.berlios.de Sat Oct 4 18:38:10 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 4 Oct 2008 18:38:10 +0200 Subject: [Haiku-commits] r27865 - haiku/trunk/src/system/kernel/fs Message-ID: <200810041638.m94GcA7L022905@sheep.berlios.de> Author: axeld Date: 2008-10-04 18:38:10 +0200 (Sat, 04 Oct 2008) New Revision: 27865 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27865&view=rev Modified: haiku/trunk/src/system/kernel/fs/socket.cpp Log: * connect() and bind() now make sure that sockaddr::sa_len is set correctly. * Renamed MAX_SOCKET_ADDRESS_LEN to MAX_SOCKET_ADDRESS_LENGTH. * Whitespace cleanup. Modified: haiku/trunk/src/system/kernel/fs/socket.cpp =================================================================== --- haiku/trunk/src/system/kernel/fs/socket.cpp 2008-10-04 10:47:34 UTC (rev 27864) +++ haiku/trunk/src/system/kernel/fs/socket.cpp 2008-10-04 16:38:10 UTC (rev 27865) @@ -23,7 +23,7 @@ #include -#define MAX_SOCKET_ADDRESS_LEN (sizeof(sockaddr_storage)) +#define MAX_SOCKET_ADDRESS_LENGTH (sizeof(sockaddr_storage)) #define MAX_SOCKET_OPTION_LEN 128 #define MAX_ANCILLARY_DATA_LEN 1024 @@ -96,7 +96,7 @@ return B_BAD_ADDRESS; } - // copy the buffer size from userland + // copy the buffer size from userland addressLength = 0; if (userAddress != NULL && user_memcpy(&addressLength, _addressLength, sizeof(socklen_t)) @@ -104,8 +104,8 @@ return B_BAD_ADDRESS; } - if (addressLength > MAX_SOCKET_ADDRESS_LEN) - addressLength = MAX_SOCKET_ADDRESS_LEN; + if (addressLength > MAX_SOCKET_ADDRESS_LENGTH) + addressLength = MAX_SOCKET_ADDRESS_LENGTH; return B_OK; } @@ -177,8 +177,8 @@ if (userAddress != NULL) { if (!IS_USER_ADDRESS(message.msg_name)) return B_BAD_ADDRESS; - if (message.msg_namelen > MAX_SOCKET_ADDRESS_LEN) - message.msg_namelen = MAX_SOCKET_ADDRESS_LEN; + if (message.msg_namelen > MAX_SOCKET_ADDRESS_LENGTH) + message.msg_namelen = MAX_SOCKET_ADDRESS_LENGTH; message.msg_name = address; } @@ -356,7 +356,7 @@ if (fd < 0) free(descriptor); - return fd; + return fd; } @@ -800,17 +800,20 @@ socklen_t addressLength) { // check parameters and copy address from userland - if (userAddress == NULL || addressLength > MAX_SOCKET_ADDRESS_LEN) + if (userAddress == NULL || addressLength > MAX_SOCKET_ADDRESS_LENGTH) return B_BAD_VALUE; - char address[MAX_SOCKET_ADDRESS_LEN]; + sockaddr_storage address; if (!IS_USER_ADDRESS(userAddress) - || user_memcpy(address, userAddress, addressLength) != B_OK) { + || user_memcpy(&address, userAddress, addressLength) != B_OK) { return B_BAD_ADDRESS; } + address.ss_len = addressLength; + // make sure the sa_len field is set correctly + SyscallRestartWrapper error; - return error = common_bind(socket, (sockaddr*)address, addressLength, + return error = common_bind(socket, (sockaddr*)&address, addressLength, false); } @@ -828,18 +831,21 @@ socklen_t addressLength) { // check parameters and copy address from userland - if (userAddress == NULL || addressLength > MAX_SOCKET_ADDRESS_LEN) + if (userAddress == NULL || addressLength > MAX_SOCKET_ADDRESS_LENGTH) return B_BAD_VALUE; - char address[MAX_SOCKET_ADDRESS_LEN]; + sockaddr_storage address; if (!IS_USER_ADDRESS(userAddress) - || user_memcpy(address, userAddress, addressLength) != B_OK) { + || user_memcpy(&address, userAddress, addressLength) != B_OK) { return B_BAD_ADDRESS; } + address.ss_len = addressLength; + // make sure the sa_len field is set correctly + SyscallRestartWrapper error; - return error = common_connect(socket, (sockaddr*)address, addressLength, + return error = common_connect(socket, (sockaddr*)&address, addressLength, false); } @@ -866,7 +872,7 @@ // accept() SyscallRestartWrapper result; - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; socklen_t userAddressBufferSize = addressLength; result = common_accept(socket, userAddress != NULL ? (sockaddr*)address : NULL, &addressLength, false); @@ -900,11 +906,11 @@ _addressLength, addressLength, false); if (error != B_OK) return error; - + // recvfrom() SyscallRestartWrapper result; - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; socklen_t userAddressBufferSize = addressLength; result = common_recvfrom(socket, data, length, flags, userAddress != NULL ? (sockaddr*)address : NULL, &addressLength, false); @@ -929,7 +935,7 @@ iovec* userVecs; MemoryDeleter vecsDeleter; void* userAddress; - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; status_t error = prepare_userland_msghdr(userMessage, message, userVecs, vecsDeleter, userAddress, address); @@ -994,12 +1000,12 @@ // TODO: If this is a connection-mode socket, the address parameter is // supposed to be ignored. if (userAddress == NULL || addressLength <= 0 - || addressLength > MAX_SOCKET_ADDRESS_LEN) { + || addressLength > MAX_SOCKET_ADDRESS_LENGTH) { return B_BAD_VALUE; } // copy address from userland - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; if (!IS_USER_ADDRESS(userAddress) || user_memcpy(address, userAddress, addressLength) != B_OK) { return B_BAD_ADDRESS; @@ -1021,7 +1027,7 @@ iovec* userVecs; MemoryDeleter vecsDeleter; void* userAddress; - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; status_t error = prepare_userland_msghdr(userMessage, message, userVecs, vecsDeleter, userAddress, address); @@ -1130,9 +1136,9 @@ addressLength, true); if (error != B_OK) return error; - + // getpeername() - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; socklen_t userAddressBufferSize = addressLength; error = common_getpeername(socket, (sockaddr*)address, &addressLength, false); @@ -1160,9 +1166,9 @@ addressLength, true); if (error != B_OK) return error; - + // getsockname() - char address[MAX_SOCKET_ADDRESS_LEN]; + char address[MAX_SOCKET_ADDRESS_LENGTH]; socklen_t userAddressBufferSize = addressLength; error = common_getsockname(socket, (sockaddr*)address, &addressLength, false); From stippi at mail.berlios.de Sat Oct 4 19:00:47 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Sat, 4 Oct 2008 19:00:47 +0200 Subject: [Haiku-commits] r27866 - in haiku/trunk: data/artwork/icons src/apps/bsnow Message-ID: <200810041700.m94H0lx2019273@sheep.berlios.de> Author: stippi Date: 2008-10-04 19:00:42 +0200 (Sat, 04 Oct 2008) New Revision: 27866 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27866&view=rev Modified: haiku/trunk/data/artwork/icons/App_BSnow haiku/trunk/src/apps/bsnow/BSnow.rdef Log: New BSnow icon by zuMi. Thanks a lot! :-) Modified: haiku/trunk/data/artwork/icons/App_BSnow =================================================================== (Binary files differ) Modified: haiku/trunk/src/apps/bsnow/BSnow.rdef =================================================================== --- haiku/trunk/src/apps/bsnow/BSnow.rdef 2008-10-04 16:38:10 UTC (rev 27865) +++ haiku/trunk/src/apps/bsnow/BSnow.rdef 2008-10-04 17:00:42 UTC (rev 27866) @@ -18,24 +18,33 @@ #ifdef HAIKU_TARGET_PLATFORM_HAIKU resource vector_icon { - $"6E6369660E0500020006023C43C6B9E5E23A85A83CEE414268F44A445962FFFF" - $"FFFFC1CCFF0200040200ECF5FAFFECF5FA020006023B2B47BB18653D0FA53D22" - $"5148297046CA1920FDFDFDFFC1CCFF020004028FFFFFFFFFC1CCFF020006023C" - $"71E33A0C78BA15E43C7D2149055549455700FFFFFFFFC1CCFF05FF020006023A" - $"1DA6393F04BBB5BC3C6B074AEA3648091102C1CCFCBDFFFFFF03DBE2FD020006" - $"023C0AE63B3927BC611E3D03FF4C25624A1A9600C1CCFFB4FFFFFF03C1CCFA03" - $"C1CCFF02000602BD498B3E1159BF219BBE7D2F4C1B8F4A331349C1CCFFFFFFFF" - $"FF040174100A08325E395E41564E5E555E6052584E3E510A06302C303E40454C" - $"3C4C2A3C250A04302C303E404540320A04302C40324C2A3C250A04403240454C" - $"3C4C2A0A0338423C4D3C440A0622422254325C3E513E402E3A0A042242225432" - $"5C32490A04224232493E402E3A0A043249325C3E513E400A063E423E544E5C5A" - $"505A3F4A390A06C785BF40C354C2764E495A3F4A39C391BD6F0A043E42C354C2" - $"76C785BF40C391BD6F0A054151C08BC8834E5C4E49C35DC27A0A053E423E54C0" - $"8BC8834151C35DC27A0A044E494E5C5A505A3E120A0D0100000A0001061815FF" - $"01178400040A00010618001501178600040A010107000A080109000A0B010520" - $"20210A050108000A00010A1001178400040A02010D000A0A010E000A0902040F" - $"000A06010B000A0C010C000A0001011815FF01178400040A0001011800150117" - $"8600040A030102000A040103000A07010400" + $"6E6369660A010100007503010000020106023D80000000000000003D80004900" + $"004A1000AAFFFFFFFF95BCDD020106023D00000000000000003D000048E00049" + $"2000AAFFFFFFFF95BCDD020106023C40000000000000003C4000492000474000" + $"AAFFFFFFFF95BCDD0387AFD1020106033772203457DEB6B0FC39F52B48F3ED48" + $"7E9B00FFDE069BFFAA00FFF67D06020106043D00000000000000003D000048C0" + $"0048C0005DFF000080C00505AAFF0000FFC00505020116023B00000000000000" + $"003B00004A2000450000005CFF00020106023A40000000000000003A40004480" + $"00448000AAFFFFFFFF95BCDD0C02043E36BA7D36C36A36524A52BF4552C8323E" + $"5EC36A5EBA7D5E2A4A2AC8322ABF4502043E30BB6230C285304E404EBC2E4EC3" + $"513E50C28550BB62502E402EC3512EBC2E02043E26BC4626C1A1264A324AB77E" + $"4ABCD93E3EC1A13EBC463E323232BCD932B77E02033C363C363C3438343A3238" + $"34343A3836383A020244364634423840343E3642320609BABB0349415346524E" + $"5149534856485C4D59495A49C967C2D85D475847594556464B3F4B3F493F060D" + $"F6EFFA023A41423646374436463747374738453A443A443A473B4B3B4B3E4B40" + $"4C404840483C463C423E40483A473D403E3337373C343A393F02024228442840" + $"28482C482E482A06041E3C3E4A3C44405038343C06042E3E50504A4C5054444E" + $"3E3E06042E3E5E5B585162654E524C3E02042822B4D922B786222E282EB4D92E" + $"B786282EB7862EB4D92E222822B78622B4D9160A00010A1001158200040A0101" + $"001001178400040A020100000A01010502BFFFFB30DC88B0DC88BFFFFB4C0172" + $"4B6C250A030109000A010101123FAC9D3D297FBCEE693F67F547B66BC686A701" + $"178400040A030101000A040108000A010104023FD07C3C6897BC68973FD07CC4" + $"8CCB45DE750A010104023FEC8F3B1A4DBB1A4D3FEC8FC5A41F4467140A070106" + $"000A010102123FBBBE3CDF30BC9B533F6386460747C668CA01178400040A0401" + $"02000A05010302C000000000000000004000004B40000000000A060103000A01" + $"0104023FDB50BC1F483C1F483FDB50C52D234631630A010104023C62D23EDA76" + $"BECEB13CF6DB49653CC7C4CB0A010105000A010107301E1E01178C00040A0801" + $"07301E1E01158800040A01010B1001178400040A09010B00" }; #else From stippi at mail.berlios.de Sat Oct 4 19:29:25 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Sat, 4 Oct 2008 19:29:25 +0200 Subject: [Haiku-commits] r27867 - in haiku/trunk: data/artwork/icons src/servers/syslog_daemon Message-ID: <200810041729.m94HTPcI032018@sheep.berlios.de> Author: stippi Date: 2008-10-04 19:29:17 +0200 (Sat, 04 Oct 2008) New Revision: 27867 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27867&view=rev Added: haiku/trunk/data/artwork/icons/Server_Syslog Modified: haiku/trunk/src/servers/syslog_daemon/SyslogDaemon.rdef Log: * Added Syslog daemon icon by zuMi. Slight tweaks by myself. Added: haiku/trunk/data/artwork/icons/Server_Syslog =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_Syslog ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/servers/syslog_daemon/SyslogDaemon.rdef =================================================================== --- haiku/trunk/src/servers/syslog_daemon/SyslogDaemon.rdef 2008-10-04 17:00:42 UTC (rev 27866) +++ haiku/trunk/src/servers/syslog_daemon/SyslogDaemon.rdef 2008-10-04 17:29:17 UTC (rev 27867) @@ -12,9 +12,46 @@ internal = 1, short_info = "syslog_daemon", - long_info = "syslog_daemon ?2003-2006 Haiku Inc." + long_info = "syslog_daemon ?2003-2008 Haiku Inc." }; +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon array { + $"6E6369660B05000200060338F002BB52D13DC5E23B55B647FA87499D54016636" + $"026B7A5631FFBDA0800200060238D3F0BB330F3DC5E23B55B6480448498D7275" + $"6A4217FF997B5B0201060738DFA83659F2B8B1BD3B4AF44B21454AD35700E3C9" + $"A326AE76254CE3C9A378AE7625A9E3C9A3D4AE7625FEE3C9A303462501020116" + $"03BCB8B33BCAFFBA7E34BB93D64A24E1496D8600A67FFFFD9302000602377ED6" + $"B940F93BEBB93A1B224414F9487F5D00C70505FEFF6E6E036E01010200060239" + $"9F4EB4C570B6477CBAFAAC4830DD486C4A00B50404FEE5060604017302010602" + $"3B00000000000000003A000048C0004B300000E3C9A3FFAE76250E0606EB0A5E" + $"58674E585E4E5C4658425C4258425C38504E4D0207C2A4BCD7423ABEF0BB5C34" + $"31343132302E3231302A352643263D2646294A2749294ABEBEC776BAE9C5B638" + $"4F3B41BCB5C253BEA2BE5402054C5A4C5A4E5B573F5940573FC3BEBD48C689BE" + $"66C1E3BC8ABD61C0A0BEA5BE54BBEFC33FBEBEC776BCB3C687C1CBC8DB02054C" + $"5A4C5A4E5B573F5940573FC3BEBD48C689BE66C1E3BC8ABE93C0A0BFA6BE3C3A" + $"49C056C842BE4BC753C363C9A702084C5A4C5A4E5B5258505A56545A455A4B5A" + $"42573F5940573F3431343132302E3231302A352643263D2646294A2749294A02" + $"044A544A4D4A5B52584E5C56545A455A4B5A3F5241563D4E450A04523A362A2E" + $"3A4B490A11C6D8BD5A362A2E3A303B323A323C343B343D363C363E383D383F3A" + $"3E3A403C3F3C414B4806032B39463E373F384B3A46380608BBEE2D222D222B21" + $"2A23223322332135233625372434233624342C242F232D222F230206B84BB5D8" + $"B84BB5D8B9E3B6A4B6B3BC9EB6B3BBD2B6B3BCFCB70CBD49B6DEBD2DB70CBD49" + $"B7BBBDA0B7BBBDA0B78DBD852B392BBD532B372F28332A2F280610AFEF9E992F" + $"282F28332A2B392B372B3B2D3B36293526372735262F232F232D222C24243424" + $"3423362537283627382836332A322F2C2E2B2E2A0606FB0F3A4C3A4C3C524056" + $"405A3E58425C385A3A58365C3056345836543452345238520605FF023A423F38" + $"3A42424C404CC0F84C4744C18EC2A74A404C3F4CBFB94C3D4739110A09010000" + $"0A0001041001178400040A010101000A0001061001178300040A050107000A00" + $"01031001178400040A010102000A040105123F999A0000000000003F7DB343FF" + $"F544B64101178400040A030105000A02010D000A00010B301E1F01178400040A" + $"00010B1001178400040A060109000A07010A000A08010B000A00010C10011784" + $"00040A0A010C00" +}; + +#else + resource large_icon array { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -68,3 +105,6 @@ $"FFFF0000000000000011FFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; + +#endif // HAIKU_TARGET_PLATFORM_HAIKU + From axeld at pinc-software.de Sat Oct 4 19:52:13 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Sat, 04 Oct 2008 19:52:13 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r27777_-_haiku/trunk/src/add-ons/kernel?= =?utf-8?q?/bus=5Fmanagers/acpi?= In-Reply-To: <894b9700809300011y6dd19357le7f16b661f333dc@mail.gmail.com> Message-ID: <37923032677-BeMail@zon> "Stefano Ceccherini" wrote: > > B_ANY_KERNEL_ADDRESS is definitely the one to use, and a protection > > of > > "0" is perfectly fine: this just means B_KERNEL_READ_AREA | > > B_KERNEL_WRITE_AREA (those constants did not exist in BeOS). > > What's the error message? > If I don't check for area < 0, I just get a KDL (attached) on boot. > Otherwise, I don't seem to get anything. Not even the dprintf() I > added get printed. Now that sounds very fishy and worth investigating. Bye, Axel. From stippi at mail.berlios.de Sat Oct 4 20:28:19 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Sat, 4 Oct 2008 20:28:19 +0200 Subject: [Haiku-commits] r27868 - in haiku/trunk: build/jam data/common/boot/post_install Message-ID: <200810041828.m94ISJLt018461@sheep.berlios.de> Author: stippi Date: 2008-10-04 20:28:15 +0200 (Sat, 04 Oct 2008) New Revision: 27868 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27868&view=rev Modified: haiku/trunk/build/jam/OptionalPackages haiku/trunk/data/common/boot/post_install/mime_update.sh Log: Added optional package "Welcome". The welcome package documation is copied to /boot/beos/documetation/welcome and a link to welcome.html is placed on the Desktop. The mime_update.sh script makes sure that the mime type of the html files is set. However, Firefox has a problem when it is launched for the first time via double clicking an HTML file. Apparently, it initializes some settings and relaunches itself, which in turn makes it forget to open the file. A second problem is annoying as well: When launching Firefox to display a local file, it will always open a second window with the default web location. Modified: haiku/trunk/build/jam/OptionalPackages =================================================================== --- haiku/trunk/build/jam/OptionalPackages 2008-10-04 17:29:17 UTC (rev 27867) +++ haiku/trunk/build/jam/OptionalPackages 2008-10-04 18:28:15 UTC (rev 27868) @@ -27,6 +27,7 @@ # Subversion # Vision # VLC +# Welcome # WonderBrush # Yasm @@ -413,6 +414,14 @@ } } +# Welcome +if [ IsOptionalHaikuImagePackageAdded Welcome ] { + CopyDirectoryToHaikuImage beos documentation + : [ FDirName $(HAIKU_TOP) docs welcome ] + : welcome : -x .svn ; + AddSymlinkToHaikuImage home Desktop + : /boot/beos/documentation/welcome/welcome.html : Welcome ; +} # WonderBrush if [ IsOptionalHaikuImagePackageAdded WonderBrush ] { Modified: haiku/trunk/data/common/boot/post_install/mime_update.sh =================================================================== --- haiku/trunk/data/common/boot/post_install/mime_update.sh 2008-10-04 17:29:17 UTC (rev 27867) +++ haiku/trunk/data/common/boot/post_install/mime_update.sh 2008-10-04 18:28:15 UTC (rev 27868) @@ -3,6 +3,7 @@ # Make sure all apps have a MIME DB entry. mimeset -apps -f /boot/beos/apps +mimeset -f /boot/beos/documentation mimeset -apps -f /boot/beos/preferences mimeset -apps -f /boot/beos/system/servers mimeset -apps -f /boot/apps From korli at users.berlios.de Sat Oct 4 21:45:08 2008 From: korli at users.berlios.de (=?ISO-8859-1?Q?J=E9r=F4me_Duval?=) Date: Sat, 4 Oct 2008 21:45:08 +0200 Subject: [Haiku-commits] r27777 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi In-Reply-To: <894b9700809300011y6dd19357le7f16b661f333dc@mail.gmail.com> References: <894b9700809290633j348c4620l30fb59b7f7dbb8a0@mail.gmail.com> <36376445232-BeMail@zon> <894b9700809300011y6dd19357le7f16b661f333dc@mail.gmail.com> Message-ID: 2008/9/30 Stefano Ceccherini > > B_ANY_KERNEL_ADDRESS is definitely the one to use, and a protection of > > "0" is perfectly fine: this just means B_KERNEL_READ_AREA | > > B_KERNEL_WRITE_AREA (those constants did not exist in BeOS). > > What's the error message? > > If I don't check for area < 0, I just get a KDL (attached) on boot. > Otherwise, I don't seem to get anything. Not even the dprintf() I > added get printed. > AFAIK the KDL only happens for me with GCC4. What about you ? Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From axeld at mail.berlios.de Sat Oct 4 22:30:37 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 4 Oct 2008 22:30:37 +0200 Subject: [Haiku-commits] r27869 - haiku/trunk/src/kits/tracker Message-ID: <200810042030.m94KUb9c001331@sheep.berlios.de> Author: axeld Date: 2008-10-04 22:30:29 +0200 (Sat, 04 Oct 2008) New Revision: 27869 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27869&view=rev Modified: haiku/trunk/src/kits/tracker/EntryIterator.cpp haiku/trunk/src/kits/tracker/EntryIterator.h haiku/trunk/src/kits/tracker/OpenWithWindow.cpp haiku/trunk/src/kits/tracker/OpenWithWindow.h Log: * Added "sortInodes" parameter to CachedEntryIteratorList constructor. * Moved static CompareInode() to CachedEntryIterator::_CompareInodes(). * Cleanup. Modified: haiku/trunk/src/kits/tracker/EntryIterator.cpp =================================================================== --- haiku/trunk/src/kits/tracker/EntryIterator.cpp 2008-10-04 18:28:15 UTC (rev 27868) +++ haiku/trunk/src/kits/tracker/EntryIterator.cpp 2008-10-04 20:30:29 UTC (rev 27869) @@ -43,23 +43,28 @@ #include "NodeWalker.h" #include "ObjectList.h" + TWalkerWrapper::TWalkerWrapper(WALKER_NS::TWalker *walker) - : fWalker(walker), - fStatus(B_OK) + : + fWalker(walker), + fStatus(B_OK) { } + TWalkerWrapper::~TWalkerWrapper() { delete fWalker; } + status_t TWalkerWrapper::InitCheck() const { return fStatus; } + status_t TWalkerWrapper::GetNextEntry(BEntry *entry, bool traverse) { @@ -67,6 +72,7 @@ return fStatus; } + status_t TWalkerWrapper::GetNextRef(entry_ref *ref) { @@ -74,55 +80,70 @@ return fStatus; } + int32 -TWalkerWrapper::GetNextDirents(struct dirent *buffer, size_t length, int32 count) +TWalkerWrapper::GetNextDirents(struct dirent *buffer, size_t length, + int32 count) { int32 result = fWalker->GetNextDirents(buffer, length, count); - fStatus = result < 0 ? result : (result ? B_OK : B_ENTRY_NOT_FOUND); + fStatus = result < B_OK ? result : (result ? B_OK : B_ENTRY_NOT_FOUND); return result; } + status_t TWalkerWrapper::Rewind() { return fWalker->Rewind(); } + int32 TWalkerWrapper::CountEntries() { return fWalker->CountEntries(); } + +// #pragma mark - + + EntryListBase::EntryListBase() : fStatus(B_OK) { } -status_t + +status_t EntryListBase::InitCheck() const { return fStatus; } + dirent * EntryListBase::Next(dirent *ent) { return (dirent *)((char *)ent + ent->d_reclen + sizeof(dirent)); } + +// #pragma mark - + + CachedEntryIterator::CachedEntryIterator(BEntryList *iterator, int32 numEntries, - bool sortInodes) - : fIterator(iterator), - fEntryRefBuffer(NULL), - fCacheSize(numEntries), - fNumEntries(0), - fIndex(0), - fDirentBuffer(NULL), - fCurrentDirent(NULL), - fSortInodes(sortInodes), - fSortedList(NULL), - fEntryBuffer(NULL) + bool sortInodes) + : + fIterator(iterator), + fEntryRefBuffer(NULL), + fCacheSize(numEntries), + fNumEntries(0), + fIndex(0), + fDirentBuffer(NULL), + fCurrentDirent(NULL), + fSortInodes(sortInodes), + fSortedList(NULL), + fEntryBuffer(NULL) { } @@ -135,7 +156,8 @@ delete [] fEntryBuffer; } -status_t + +status_t CachedEntryIterator::GetNextEntry(BEntry *result, bool traverse) { ASSERT(!fDirentBuffer); @@ -158,15 +180,17 @@ fIndex = 0; } *result = fEntryBuffer[fIndex++]; - if (fIndex > fNumEntries) + if (fIndex > fNumEntries) { // we are at the end of the cache we loaded up, time to return // an error, if we had one return fStatus; - + } + return B_OK; } -status_t + +status_t CachedEntryIterator::GetNextRef(entry_ref *ref) { ASSERT(!fDirentBuffer); @@ -193,23 +217,24 @@ // we are at the end of the cache we loaded up, time to return // an error, if we had one return fStatus; - + return B_OK; -} +} -static int -CompareInode(const dirent *ent1, const dirent *ent2) +/*static*/ int +CachedEntryIterator::_CompareInodes(const dirent *ent1, const dirent *ent2) { if (ent1->d_ino < ent2->d_ino) return -1; - else if (ent1->d_ino == ent2->d_ino) + if (ent1->d_ino == ent2->d_ino) return 0; - else - return 1; + + return 1; } -int32 + +int32 CachedEntryIterator::GetNextDirents(struct dirent *ent, size_t size, int32 count) { @@ -219,7 +244,7 @@ ASSERT(fIndex == 0 && fNumEntries == 0); ASSERT(size > sizeof(dirent) + B_FILE_NAME_LENGTH); } - + if (!count) return 0; @@ -236,14 +261,17 @@ fNumEntries += count; - int32 currentDirentSize = fCurrentDirent->d_reclen + (ssize_t)sizeof(dirent); + int32 currentDirentSize = fCurrentDirent->d_reclen + + (ssize_t)sizeof(dirent); bufferRemain -= currentDirentSize; - if (bufferRemain < (sizeof(dirent) + B_FILE_NAME_LENGTH)) + if (bufferRemain < (sizeof(dirent) + B_FILE_NAME_LENGTH)) { // cant fit a big entryRef in the buffer, just bail // and start from scratch break; - - fCurrentDirent = (dirent *)((char *)fCurrentDirent + currentDirentSize); + } + + fCurrentDirent + = (dirent *)((char *)fCurrentDirent + currentDirentSize); } fCurrentDirent = fDirentBuffer; if (fSortInodes) { @@ -256,16 +284,17 @@ fSortedList->AddItem(fCurrentDirent, 0); fCurrentDirent = Next(fCurrentDirent); } - fSortedList->SortItems(CompareInode); + fSortedList->SortItems(&_CompareInodes); fCurrentDirent = fDirentBuffer; } fIndex = 0; } - if (fIndex >= fNumEntries) + if (fIndex >= fNumEntries) { // we are done, no more dirents left return 0; + } - if (fSortInodes) + if (fSortInodes) fCurrentDirent = fSortedList->ItemAt(fIndex); fIndex++; @@ -276,13 +305,14 @@ memcpy(ent, fCurrentDirent, currentDirentSize); - if (!fSortInodes) + if (!fSortInodes) fCurrentDirent = (dirent *)((char *)fCurrentDirent + currentDirentSize); - + return 1; } -status_t + +status_t CachedEntryIterator::Rewind() { fIndex = 0; @@ -296,12 +326,14 @@ return fIterator->Rewind(); } -int32 + +int32 CachedEntryIterator::CountEntries() { return fIterator->CountEntries(); } + void CachedEntryIterator::SetTo(BEntryList *iterator) { @@ -311,40 +343,52 @@ fIterator = iterator; } + +// #pragma mark - + + CachedDirectoryEntryList::CachedDirectoryEntryList(const BDirectory &dir) - : CachedEntryIterator(0, 40, true), - fDir(dir) + : CachedEntryIterator(0, 40, true), + fDir(dir) { fStatus = fDir.InitCheck(); SetTo(&fDir); } + CachedDirectoryEntryList::~CachedDirectoryEntryList() { } +// #pragma mark - + + DirectoryEntryList::DirectoryEntryList(const BDirectory &dir) - : fDir(dir) + : + fDir(dir) { fStatus = fDir.InitCheck(); } -status_t + +status_t DirectoryEntryList::GetNextEntry(BEntry *entry, bool traverse) { fStatus = fDir.GetNextEntry(entry, traverse); return fStatus; } -status_t + +status_t DirectoryEntryList::GetNextRef(entry_ref *ref) { fStatus = fDir.GetNextRef(ref); return fStatus; } -int32 + +int32 DirectoryEntryList::GetNextDirents(struct dirent *buffer, size_t length, int32 count) { @@ -352,26 +396,33 @@ return fStatus; } -status_t + +status_t DirectoryEntryList::Rewind() { fStatus = fDir.Rewind(); return fStatus; } -int32 + +int32 DirectoryEntryList::CountEntries() { return fDir.CountEntries(); } +// #pragma mark - + + EntryIteratorList::EntryIteratorList() - : fList(5, true), - fCurrentIndex(0) + : + fList(5, true), + fCurrentIndex(0) { } + EntryIteratorList::~EntryIteratorList() { int32 count = fList.CountItems(); @@ -388,70 +439,76 @@ } -void +void EntryIteratorList::AddItem(BEntryList *walker) { fList.AddItem(walker); } -status_t + +status_t EntryIteratorList::GetNextEntry(BEntry *entry, bool traverse) { - for (;;) { + while (true) { if (fCurrentIndex >= fList.CountItems()) { fStatus = B_ENTRY_NOT_FOUND; break; } - + fStatus = fList.ItemAt(fCurrentIndex)->GetNextEntry(entry, traverse); if (fStatus != B_ENTRY_NOT_FOUND) break; - + fCurrentIndex++; } return fStatus; } -status_t + +status_t EntryIteratorList::GetNextRef(entry_ref *ref) { - for (;;) { + while (true) { if (fCurrentIndex >= fList.CountItems()) { fStatus = B_ENTRY_NOT_FOUND; break; } - + fStatus = fList.ItemAt(fCurrentIndex)->GetNextRef(ref); if (fStatus != B_ENTRY_NOT_FOUND) break; - + fCurrentIndex++; } return fStatus; } -int32 -EntryIteratorList::GetNextDirents(struct dirent *buffer, size_t length, int32 count) + +int32 +EntryIteratorList::GetNextDirents(struct dirent *buffer, size_t length, + int32 count) { int32 result = 0; - for (;;) { + while (true) { if (fCurrentIndex >= fList.CountItems()) { fStatus = B_ENTRY_NOT_FOUND; break; } - - result = fList.ItemAt(fCurrentIndex)->GetNextDirents(buffer, length, count); + + result = fList.ItemAt(fCurrentIndex)->GetNextDirents(buffer, length, + count); if (result > 0) { fStatus = B_OK; break; } - + fCurrentIndex++; } return result; } -status_t + +status_t EntryIteratorList::Rewind() { fCurrentIndex = 0; @@ -462,7 +519,8 @@ return fStatus; } -int32 + +int32 EntryIteratorList::CountEntries() { int32 result = 0; @@ -475,14 +533,18 @@ } -CachedEntryIteratorList::CachedEntryIteratorList() - : CachedEntryIterator(0, 10, true) +// #pragma mark - + + +CachedEntryIteratorList::CachedEntryIteratorList(bool sortInodes) + : CachedEntryIterator(NULL, 10, sortInodes) { fStatus = B_OK; SetTo(&fIteratorList); } -void + +void CachedEntryIteratorList::AddItem(BEntryList *walker) { fIteratorList.AddItem(walker); Modified: haiku/trunk/src/kits/tracker/EntryIterator.h =================================================================== --- haiku/trunk/src/kits/tracker/EntryIterator.h 2008-10-04 18:28:15 UTC (rev 27868) +++ haiku/trunk/src/kits/tracker/EntryIterator.h 2008-10-04 20:30:29 UTC (rev 27869) @@ -99,7 +99,7 @@ // sorted by their i-node number -- this turns out to give quite a bit // better performance over just using the order in which they show up using // the default BEntryList iterator subclass - + CachedEntryIterator(BEntryList *iterator, int32 numEntries, bool sortInodes = false); // CachedEntryIterator does not get to own the @@ -112,22 +112,24 @@ virtual status_t Rewind(); virtual int32 CountEntries(); - + virtual void SetTo(BEntryList *iterator); // CachedEntryIterator does not get to own the - + private: + static int _CompareInodes(const dirent *ent1, const dirent *ent2); + BEntryList *fIterator; entry_ref *fEntryRefBuffer; int32 fCacheSize; int32 fNumEntries; int32 fIndex; - + dirent *fDirentBuffer; dirent *fCurrentDirent; bool fSortInodes; BObjectList *fSortedList; - + BEntry *fEntryBuffer; }; @@ -185,8 +187,8 @@ class CachedEntryIteratorList : public CachedEntryIterator { public: - CachedEntryIteratorList(); - void AddItem(BEntryList *); + CachedEntryIteratorList(bool sortInodes = true); + void AddItem(BEntryList *list); protected: EntryIteratorList fIteratorList; Modified: haiku/trunk/src/kits/tracker/OpenWithWindow.cpp =================================================================== --- haiku/trunk/src/kits/tracker/OpenWithWindow.cpp 2008-10-04 18:28:15 UTC (rev 27868) +++ haiku/trunk/src/kits/tracker/OpenWithWindow.cpp 2008-10-04 20:30:29 UTC (rev 27869) @@ -198,7 +198,7 @@ { if (strcasecmp(element->String(), (const char *)castToString) == 0) return element; - + return 0; } @@ -207,10 +207,10 @@ AddOneUniqueDocumentType(const entry_ref *ref, void *castToList) { BObjectList *list = (BObjectList *)castToList; - + BEntry entry(ref, true); // traverse symlinks - + // get this documents type char type[B_MIME_TYPE_LENGTH]; BFile file(&entry, O_RDONLY); @@ -286,9 +286,9 @@ if (!selectedAppPose) return; - // collect all the types of all the opened documents into a list + // collect all the types of all the opened documents into a list BObjectList openedFileTypes(10, true); - EachEntryRef(EntryList(), AddOneUniqueDocumentType, &openedFileTypes, 100); + EachEntryRef(EntryList(), AddOneUniqueDocumentType, &openedFileTypes, 100); // set the default application to be the selected pose for all the // mime types in the list @@ -445,10 +445,10 @@ if (!node) return; - const char *rectAttributeName = kAttrWindowFrame; + const char *rectAttributeName = kAttrWindowFrame; BRect frame(Frame()); if (node->Read(rectAttributeName, 0, B_RECT_TYPE, sizeof(BRect), &frame) - == sizeof(BRect)) { + == sizeof(BRect)) { MoveTo(frame.LeftTop()); ResizeTo(frame.Width(), frame.Height()); } @@ -566,8 +566,7 @@ static const entry_ref * AddOneRefSignatures(const entry_ref *ref, void *castToIterator) { - // ToDo: - // resolve cases where each entry has a different type and + // TODO: resolve cases where each entry has a different type and // their supporting apps are disjoint sets SearchForSignatureEntryList *queryIterator = @@ -579,7 +578,7 @@ BString mimeType(model.MimeType()); - if (!mimeType.Length() || mimeType.ICompare(B_FILE_MIMETYPE) == 0) + if (!mimeType.Length() || mimeType.ICompare(B_FILE_MIMETYPE) == 0) // if model is of unknown type, try mimeseting it first model.Mimeset(true); @@ -683,8 +682,7 @@ // else - once we have an extensible sniffer, tell users to ask // publishers to fix up sniffers } - - + BMessage message(*window->EntryList()); // make a clone to send message.RemoveName("launchUsingSelector"); @@ -696,7 +694,7 @@ if (fSelectionHandler) fSelectionHandler->PostMessage(&message); - + window->PostMessage(B_QUIT_REQUESTED); } @@ -737,12 +735,12 @@ } ASSERT(fSelectionList->CountItems() == 1); - + // enable the Open and make default if selected application different // from preferred app ref window->SetCanSetAppAsDefault((*fSelectionList->FirstItem()-> TargetModel()->EntryRef()) != fPreferredRef); - + _inherited::Pulse(); } @@ -786,23 +784,26 @@ // overridden to try to select the preferred handling app _inherited::CreatePoses(models, poseInfoArray, count, resultingPoses, insertionSort, lastPoseIndexPtr, boundsPtr, forceDraw); - - if (resultingPoses) - for (int32 index = 0; index < count; index++) + + if (resultingPoses) { + for (int32 index = 0; index < count; index++) { if (resultingPoses[index] && fHaveCommonPreferredApp - && *(models[index]->EntryRef()) == fPreferredRef) + && *(models[index]->EntryRef()) == fPreferredRef) { // this is our preferred app, select it's pose SelectPose(resultingPoses[index], IndexOfPose(resultingPoses[index])); + } + } + } } void OpenWithPoseView::KeyDown(const char *bytes, int32 count) { - if (bytes[0] == B_TAB) + if (bytes[0] == B_TAB) { // just shift the focus, don't tab to the next pose BView::KeyDown(bytes, count); - else + } else _inherited::KeyDown(bytes, count); } @@ -950,7 +951,7 @@ RelationCachingModelProxy::Relation(SearchForSignatureEntryList *iterator, BMessage *entries) const { - if (fRelation == kUnknownRelation) + if (fRelation == kUnknownRelation) fRelation = iterator->Relation(entries, fModel); return fRelation; @@ -1061,7 +1062,7 @@ // Tracker, filter out version that don't list the correct types, // etc. delete model; - } else + } else fSupportingAppList->AddItem(new RelationCachingModelProxy(model)); return true; @@ -1128,7 +1129,7 @@ // divide different relations of opening with a separator int32 relation = modelProxy->Relation(fIterator, &fEntriesToOpen); if (lastRelation != -1 && relation != lastRelation) - AddSeparatorItem(); + AddSeparatorItem(); lastRelation = relation; ModelMenuItem *item = new ModelMenuItem(model, result.String(), message); @@ -1186,7 +1187,7 @@ } -void +void SearchForSignatureEntryList::PushUniqueSignature(const char *str) { // do a unique add @@ -1197,21 +1198,21 @@ } -status_t +status_t SearchForSignatureEntryList::GetNextEntry(BEntry *entry, bool) { return fIteratorList->GetNextEntry(entry); } -status_t +status_t SearchForSignatureEntryList::GetNextRef(entry_ref *ref) { return fIteratorList->GetNextRef(ref); } -int32 +int32 SearchForSignatureEntryList::GetNextDirents(struct dirent *buffer, size_t length, int32 count) { @@ -1238,7 +1239,7 @@ } -status_t +status_t SearchForSignatureEntryList::Rewind() { if (fIteratorList) @@ -1253,7 +1254,7 @@ // build the predicate string by oring queries for the individual // signatures BString predicateString; - + AddOneTermParams params; params.result = &predicateString; params.first = true; @@ -1265,24 +1266,24 @@ fIteratorList->AddItem(new TWalkerWrapper( new WALKER_NS::TQueryWalker(predicateString.String()))); fIteratorList->AddItem(new ConditionalAllAppsIterator(this)); - + return fIteratorList->Rewind(); } -int32 +int32 SearchForSignatureEntryList::CountEntries() { return 0; } -bool +bool SearchForSignatureEntryList::GetPreferredApp(entry_ref *ref) const { if (fPreferredAppCount == 1) *ref = fPreferredRef; - + return fPreferredAppCount == 1; } @@ -1299,7 +1300,7 @@ } -void +void SearchForSignatureEntryList::TrySettingPreferredAppForFile(const entry_ref *ref) { if (!fPreferredAppForFileCount) { @@ -1312,28 +1313,28 @@ } -void +void SearchForSignatureEntryList::NonGenericFileFound() { fGenericFilesOnly = false; } -bool +bool SearchForSignatureEntryList::GenericFilesOnly() const { return fGenericFilesOnly; } -bool +bool SearchForSignatureEntryList::ShowAllApplications() const { return fCanAddAllApps && !fFoundOneNonSuperHandler; } -int32 +int32 SearchForSignatureEntryList::Relation(const Model *nodeModel, const Model *applicationModel) { @@ -1356,7 +1357,7 @@ } -int32 +int32 SearchForSignatureEntryList::Relation(const BMessage *entriesToOpen, const Model *model) const { @@ -1366,7 +1367,7 @@ } -void +void SearchForSignatureEntryList::RelationDescription(const BMessage *entriesToOpen, const Model *model, BString *description) const { @@ -1376,7 +1377,7 @@ } -int32 +int32 SearchForSignatureEntryList::Relation(const BMessage *entriesToOpen, const Model *applicationModel, const entry_ref *preferredApp, const entry_ref *preferredAppForFile) @@ -1392,7 +1393,7 @@ Model model(&ref, true, true); if (model.InitCheck()) continue; - + int32 result = Relation(&model, applicationModel); if (result != kNoRelation) { if (preferredAppForFile @@ -1400,19 +1401,19 @@ return kPreferredForFile; if (result == kSupportsType && preferredApp - && *applicationModel->EntryRef() == *preferredApp) + && *applicationModel->EntryRef() == *preferredApp) // application matches cached preferred app, we are done return kPreferredForType; - + return result; } } - + return kNoRelation; } -void +void SearchForSignatureEntryList::RelationDescription(const BMessage *entriesToOpen, const Model *applicationModel, BString *description, const entry_ref *preferredApp, const entry_ref *preferredAppForFile) @@ -1426,11 +1427,11 @@ *description = "Preferred for file"; return; } - + Model model(&ref, true, true); if (model.InitCheck()) continue; - + BMimeType mimeType; int32 result = Relation(&model, applicationModel); switch (result) { @@ -1442,43 +1443,43 @@ return; case kSupportsSupertype: - { - mimeType.SetTo(model.MimeType()); - // status_t result = mimeType.GetSupertype(&mimeType); - - char *type = (char *)mimeType.Type(); - char *tmp = strchr(type, '/'); - if (tmp) - *tmp = '\0'; - - //PRINT(("getting supertype for %s, result %s, got %s\n", - // model.MimeType(), strerror(result), mimeType.Type())); - *description = "Handles any "; - // *description += mimeType.Type(); - *description += type; - return; - } - + { + mimeType.SetTo(model.MimeType()); + // status_t result = mimeType.GetSupertype(&mimeType); + + char *type = (char *)mimeType.Type(); + char *tmp = strchr(type, '/'); + if (tmp) + *tmp = '\0'; + + //PRINT(("getting supertype for %s, result %s, got %s\n", + // model.MimeType(), strerror(result), mimeType.Type())); + *description = "Handles any "; + // *description += mimeType.Type(); + *description += type; + return; + } + case kSupportsType: - { - mimeType.SetTo(model.MimeType()); - - if (preferredApp && *applicationModel->EntryRef() == *preferredApp) - // application matches cached preferred app, we are done - *description = "Preferred for "; - else - *description = "Handles "; - - char shortDescription[256]; - if (mimeType.GetShortDescription(shortDescription) == B_OK) - *description += shortDescription; - else - *description += mimeType.Type(); - return; - } + { + mimeType.SetTo(model.MimeType()); + + if (preferredApp && *applicationModel->EntryRef() == *preferredApp) + // application matches cached preferred app, we are done + *description = "Preferred for "; + else + *description = "Handles "; + + char shortDescription[256]; + if (mimeType.GetShortDescription(shortDescription) == B_OK) + *description += shortDescription; + else + *description += mimeType.Type(); + return; + } } } - + *description = "Does not handle file"; } @@ -1520,7 +1521,7 @@ BPath path, path2; BEntry entry(appModel->EntryRef()); entry.GetPath(&path); - + [... truncated: 102 lines follow ...] From axeld at mail.berlios.de Sat Oct 4 22:33:20 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 4 Oct 2008 22:33:20 +0200 Subject: [Haiku-commits] r27870 - haiku/trunk/src/kits/tracker Message-ID: <200810042033.m94KXKen001505@sheep.berlios.de> Author: axeld Date: 2008-10-04 22:33:20 +0200 (Sat, 04 Oct 2008) New Revision: 27870 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27870&view=rev Modified: haiku/trunk/src/kits/tracker/OpenWithWindow.cpp Log: * We must not sort the cached inodes, or else we mess up the order for CanOpenWithFilter(). * This fixes bug #2795. Modified: haiku/trunk/src/kits/tracker/OpenWithWindow.cpp =================================================================== --- haiku/trunk/src/kits/tracker/OpenWithWindow.cpp 2008-10-04 20:30:29 UTC (rev 27869) +++ haiku/trunk/src/kits/tracker/OpenWithWindow.cpp 2008-10-04 20:33:20 UTC (rev 27870) @@ -1249,7 +1249,9 @@ return ENOENT; // build up the iterator - fIteratorList = new CachedEntryIteratorList; + fIteratorList = new CachedEntryIteratorList(false); + // We cannot sort the cached inodes, as CanOpenWithFilter() relies + // on the fact that ConditionalAllAppsIterator results come last. // build the predicate string by oring queries for the individual // signatures From julun at mail.berlios.de Sun Oct 5 02:48:55 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 02:48:55 +0200 Subject: [Haiku-commits] r27871 - haiku/trunk/src/kits/app Message-ID: <200810050048.m950mtHp029129@sheep.berlios.de> Author: julun Date: 2008-10-05 02:48:54 +0200 (Sun, 05 Oct 2008) New Revision: 27871 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27871&view=rev Modified: haiku/trunk/src/kits/app/Handler.cpp Log: * cleanup Modified: haiku/trunk/src/kits/app/Handler.cpp =================================================================== --- haiku/trunk/src/kits/app/Handler.cpp 2008-10-04 20:33:20 UTC (rev 27870) +++ haiku/trunk/src/kits/app/Handler.cpp 2008-10-05 00:48:54 UTC (rev 27871) @@ -51,7 +51,7 @@ { "suites", // name B_STRING_TYPE // type - } + } } }, { // ctypes[1] @@ -338,10 +338,10 @@ if (fLooper != NULL) filter->SetLooper(fLooper); - + if (!fFilters) fFilters = new BList; - + fFilters->AddItem(filter); } @@ -479,15 +479,15 @@ PrintToStream() on both data and the contained BPropertyInfo): BMessage: what = (0x0, or 0) - entry suites, type='CSTR', c=1, size=21, data[0]: "suite/vnd.Be-handler" - entry messages, type='SCTD', c=1, size= 0, - property commands types specifiers + entry suites, type='CSTR', c=1, size=21, data[0]: "suite/vnd.Be-handler" + entry messages, type='SCTD', c=1, size= 0, + property commands types specifiers -------------------------------------------------------------------------------- - Suites PGET 1 - (RTSC,suites) - (DTCS,messages) + Suites PGET 1 + (RTSC,suites) + (DTCS,messages) - Messenger PGET GNSM 1 + Messenger PGET GNSM 1 InternalName PGET RTSC 1 With a good deal of trial and error, I determined that the @@ -692,12 +692,12 @@ while (iterator != handlers.end()) { BMessenger target(*iterator); if (!target.IsValid()) { - iterator++; + iterator++; continue; } Add(target, what); - iterator = handlers.erase(iterator); + iterator = handlers.erase(iterator); } } From julun at mail.berlios.de Sun Oct 5 03:26:09 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 03:26:09 +0200 Subject: [Haiku-commits] r27872 - haiku/trunk/src/kits/app Message-ID: <200810050126.m951Q9vX002632@sheep.berlios.de> Author: julun Date: 2008-10-05 03:26:06 +0200 (Sun, 05 Oct 2008) New Revision: 27872 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27872&view=rev Modified: haiku/trunk/src/kits/app/Handler.cpp Log: * fix a nasty bug i introduced with 26383, leaving the looper locked * grab the fLooper pointer in some more functions, just to play save * remove wrong comment in UnlockLooper, since it's obviously possible to change fLooper In case we remove the handler from the loopers handler list, we need to grab the looper pointer first, since calling RemoveHandler(...) will call BHandler::SetLooper(...) thus setting fLooper to NULL and calling UnlockLooper did nothing, leaving the looper locked. Thanks Maurice for pointing out that 26383 broke Cortex, the wires where not draw and the app was locked somehow. Modified: haiku/trunk/src/kits/app/Handler.cpp =================================================================== --- haiku/trunk/src/kits/app/Handler.cpp 2008-10-05 00:48:54 UTC (rev 27871) +++ haiku/trunk/src/kits/app/Handler.cpp 2008-10-05 01:26:06 UTC (rev 27872) @@ -132,8 +132,9 @@ BHandler::~BHandler() { if (LockLooper()) { - Looper()->RemoveHandler(this); - UnlockLooper(); + BLooper* looper = Looper(); + looper->RemoveHandler(this); + looper->Unlock(); } // remove all filters @@ -331,13 +332,14 @@ void BHandler::AddFilter(BMessageFilter *filter) { - if (fLooper && !fLooper->IsLocked()) { + BLooper* looper = fLooper; + if (looper && !looper->IsLocked()) { debugger("Owning Looper must be locked before calling SetFilterList"); return; } - if (fLooper != NULL) - filter->SetLooper(fLooper); + if (looper != NULL) + filter->SetLooper(looper); if (!fFilters) fFilters = new BList; @@ -349,7 +351,8 @@ bool BHandler::RemoveFilter(BMessageFilter *filter) { - if (fLooper && !fLooper->IsLocked()) { + BLooper* looper = fLooper; + if (looper && !looper->IsLocked()) { debugger("Owning Looper must be locked before calling SetFilterList"); return false; } @@ -366,7 +369,8 @@ void BHandler::SetFilterList(BList* filters) { - if (fLooper && !fLooper->IsLocked()) { + BLooper* looper = fLooper; + if (looper && !looper->IsLocked()) { debugger("Owning Looper must be locked before calling SetFilterList"); return; } @@ -391,7 +395,7 @@ BMessageFilter *filter = static_cast(fFilters->ItemAt(i)); if (filter != NULL) - filter->SetLooper(fLooper); + filter->SetLooper(looper); } } } @@ -447,9 +451,7 @@ void BHandler::UnlockLooper() { - // The looper is locked at this point, and cannot change - if (fLooper != NULL) - fLooper->Unlock(); + fLooper->Unlock(); } From stefano.ceccherini at gmail.com Sun Oct 5 10:44:15 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Sun, 5 Oct 2008 10:44:15 +0200 Subject: [Haiku-commits] r27777 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi In-Reply-To: References: <894b9700809290633j348c4620l30fb59b7f7dbb8a0@mail.gmail.com> <36376445232-BeMail@zon> <894b9700809300011y6dd19357le7f16b661f333dc@mail.gmail.com> Message-ID: <894b9700810050144p40d88024p34cbf74e6583ff6@mail.gmail.com> 2008/10/4 J?r?me Duval : > 2008/9/30 Stefano Ceccherini >> >> > B_ANY_KERNEL_ADDRESS is definitely the one to use, and a protection of >> > "0" is perfectly fine: this just means B_KERNEL_READ_AREA | >> > B_KERNEL_WRITE_AREA (those constants did not exist in BeOS). >> > What's the error message? >> >> If I don't check for area < 0, I just get a KDL (attached) on boot. >> Otherwise, I don't seem to get anything. Not even the dprintf() I >> added get printed. > > AFAIK the KDL only happens for me with GCC4. What about you ? > Ah, yes, could be. On that machine I can only compile with cygwin and gcc4, so I didn't think about this. From stefano.ceccherini at gmail.com Sun Oct 5 11:07:14 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Sun, 5 Oct 2008 11:07:14 +0200 Subject: [Haiku-commits] r27872 - haiku/trunk/src/kits/app In-Reply-To: <200810050126.m951Q9vX002632@sheep.berlios.de> References: <200810050126.m951Q9vX002632@sheep.berlios.de> Message-ID: <894b9700810050207i14ba7508y8ad6f4caf182738b@mail.gmail.com> 2008/10/5 julun at BerliOS : > Author: julun > Date: 2008-10-05 03:26:06 +0200 (Sun, 05 Oct 2008) > New Revision: 27872 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27872&view=rev > > Modified: > haiku/trunk/src/kits/app/Handler.cpp > Log: > * fix a nasty bug i introduced with 26383, leaving the looper locked > * grab the fLooper pointer in some more functions, just to play save > * remove wrong comment in UnlockLooper, since it's obviously possible to change fLooper > > In case we remove the handler from the loopers handler list, we need to grab the looper > pointer first, since calling RemoveHandler(...) will call BHandler::SetLooper(...) thus > setting fLooper to NULL and calling UnlockLooper did nothing, leaving the looper locked. > > Thanks Maurice for pointing out that 26383 broke Cortex, the wires where not draw and the > app was locked somehow. > > > > Modified: haiku/trunk/src/kits/app/Handler.cpp > =================================================================== > --- haiku/trunk/src/kits/app/Handler.cpp 2008-10-05 00:48:54 UTC (rev 27871) > +++ haiku/trunk/src/kits/app/Handler.cpp 2008-10-05 01:26:06 UTC (rev 27872) > @@ -132,8 +132,9 @@ > BHandler::~BHandler() > { > if (LockLooper()) { > - Looper()->RemoveHandler(this); > - UnlockLooper(); > + BLooper* looper = Looper(); > + looper->RemoveHandler(this); > + looper->Unlock(); > } > > // remove all filters > @@ -331,13 +332,14 @@ > void > BHandler::AddFilter(BMessageFilter *filter) > { > - if (fLooper && !fLooper->IsLocked()) { > + BLooper* looper = fLooper; > + if (looper && !looper->IsLocked()) { You can use LockLooper() instead of doing these checks, which does exactly that. Nice catch, btw. From julun at mail.berlios.de Sun Oct 5 13:53:29 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 13:53:29 +0200 Subject: [Haiku-commits] r27873 - haiku/trunk/src/add-ons/media/media-add-ons/videowindow Message-ID: <200810051153.m95BrTOx011100@sheep.berlios.de> Author: julun Date: 2008-10-05 13:53:29 +0200 (Sun, 05 Oct 2008) New Revision: 27873 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27873&view=rev Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp Log: * cleanup, no functional change Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 01:26:06 UTC (rev 27872) +++ haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 11:53:29 UTC (rev 27873) @@ -58,6 +58,7 @@ _InitDisplay(); } + VideoNode::~VideoNode() { Quit(); @@ -103,9 +104,8 @@ HandleBuffer(buffer); } else { media_timed_event event(buffer->Header()->start_time, - BTimedEventQueue::B_HANDLE_BUFFER, - buffer, - BTimedEventQueue::B_RECYCLE_BUFFER); + BTimedEventQueue::B_HANDLE_BUFFER, buffer, + BTimedEventQueue::B_RECYCLE_BUFFER); EventQueue()->AddEvent(event); } } @@ -131,24 +131,23 @@ status_t -VideoNode:: HandleMessage(int32 message, - const void *data, - size_t size) +VideoNode:: HandleMessage(int32 message, const void *data, size_t size) { return B_ERROR; } void -VideoNode::HandleEvent(const media_timed_event *event, - bigtime_t lateness, - bool realTimeEvent) +VideoNode::HandleEvent(const media_timed_event *event, bigtime_t lateness, + bool realTimeEvent) { switch (event->type) { case BTimedEventQueue::B_START: break; case BTimedEventQueue::B_STOP: - EventQueue()->FlushEvents(event->event_time, BTimedEventQueue::B_ALWAYS, true, BTimedEventQueue::B_HANDLE_BUFFER); + EventQueue()->FlushEvents(event->event_time, + BTimedEventQueue::B_ALWAYS, true, + BTimedEventQueue::B_HANDLE_BUFFER); break; case BTimedEventQueue::B_HANDLE_BUFFER: HandleBuffer((BBuffer *)event->pointer); @@ -156,23 +155,21 @@ default: fprintf(stderr, "VideoNode::HandleEvent unknown event"); break; - } + } } void -VideoNode::ProducerDataStatus(const media_destination &dst, - int32 status, - bigtime_t at_media_time) +VideoNode::ProducerDataStatus(const media_destination &dst, int32 status, + bigtime_t at_media_time) { // do nothing } status_t -VideoNode::GetLatencyFor(const media_destination &dst, - bigtime_t *out_latency, - media_node_id *out_id) +VideoNode::GetLatencyFor(const media_destination &dst, bigtime_t *out_latency, + media_node_id *out_id) { if (dst != fInput.destination) return B_MEDIA_BAD_DESTINATION; @@ -184,8 +181,7 @@ status_t -VideoNode::AcceptFormat(const media_destination &dst, - media_format *format) +VideoNode::AcceptFormat(const media_destination &dst, media_format *format) { /* The connection process: * BBufferProducer::FormatProposal @@ -195,7 +191,7 @@ * BBufferProducer::Connect */ if (dst != fInput.destination) - return B_MEDIA_BAD_DESTINATION; + return B_MEDIA_BAD_DESTINATION; if (format->type == B_MEDIA_NO_TYPE) format->type = B_MEDIA_RAW_VIDEO; @@ -203,15 +199,13 @@ if (format->type != B_MEDIA_RAW_VIDEO) return B_MEDIA_BAD_FORMAT; - return B_OK; + return B_OK; } status_t -VideoNode::Connected(const media_source &src, - const media_destination &dst, - const media_format &format, - media_input *out_input) +VideoNode::Connected(const media_source &src, const media_destination &dst, + const media_format &format, media_input *out_input) { /* The connection process: * BBufferProducer::FormatProposal @@ -231,20 +225,21 @@ fInput.format.u.raw_video.field_rate = 25.0; color_space colorspace = format.u.raw_video.display.format; - BRect frame(0, 0, format.u.raw_video.display.line_width - 1, format.u.raw_video.display.line_count - 1); - status_t err; + BRect frame(0, 0, format.u.raw_video.display.line_width - 1, + format.u.raw_video.display.line_count - 1); DeleteBuffers(); - err = CreateBuffers(frame, colorspace, fOverlayEnabled); + status_t err = CreateBuffers(frame, colorspace, fOverlayEnabled); if (err && fOverlayEnabled) { SetOverlayEnabled(false); err = CreateBuffers(frame, colorspace, fOverlayEnabled); } if (err) { - fprintf(stderr, "VideoNode::Connected failed, fOverlayEnabled = %d\n", fOverlayEnabled); + fprintf(stderr, "VideoNode::Connected failed, fOverlayEnabled = %d\n", + fOverlayEnabled); return err; - } + } *out_input = fInput; @@ -253,8 +248,7 @@ void -VideoNode::Disconnected(const media_source &src, - const media_destination &dst) +VideoNode::Disconnected(const media_source &src, const media_destination &dst) { if (src != fInput.source) return; @@ -269,10 +263,8 @@ status_t -VideoNode::FormatChanged(const media_source &src, - const media_destination &dst, - int32 from_change_count, - const media_format &format) +VideoNode::FormatChanged(const media_source &src, const media_destination &dst, + int32 from_change_count, const media_format &format) { if (src != fInput.source) return B_MEDIA_BAD_SOURCE; @@ -280,9 +272,11 @@ return B_MEDIA_BAD_DESTINATION; color_space colorspace = format.u.raw_video.display.format; - BRect frame(0, 0, format.u.raw_video.display.line_width - 1, format.u.raw_video.display.line_count - 1); - status_t err; + BRect frame(0, 0, format.u.raw_video.display.line_width - 1, + format.u.raw_video.display.line_count - 1); + status_t err; + DeleteBuffers(); if (fOverlayEnabled) { fVideoView->RemoveOverlay(); @@ -298,11 +292,11 @@ if (err) { fprintf(stderr, "VideoNode::FormatChanged failed (lost buffer group!)\n"); return B_MEDIA_BAD_FORMAT; - } + } fInput.format = format; - return B_OK; + return B_OK; } @@ -368,12 +362,17 @@ status_t VideoNode::CreateBuffers(BRect frame, color_space cspace, bool overlay) { - //printf("VideoNode::CreateBuffers: frame %d,%d,%d,%d colorspace 0x%08x, overlay %d\n", - // int(frame.left), int(frame.top), int(frame.right), int(frame.bottom), int(cspace), overlay); + printf("VideoNode::CreateBuffers: frame %d,%d,%d,%d colorspace 0x%08x, " + "overlay %d\n", int(frame.left), int(frame.top), int(frame.right), + int(frame.bottom), int(cspace), overlay); LockBitmap(); ASSERT(fBitmap == 0); - uint32 flags = overlay ? (B_BITMAP_WILL_OVERLAY | B_BITMAP_RESERVE_OVERLAY_CHANNEL) : 0; + + uint32 flags = 0; + if (overlay) + flags = B_BITMAP_WILL_OVERLAY | B_BITMAP_RESERVE_OVERLAY_CHANNEL; + fBitmap = new BBitmap(frame, flags, cspace); if (!(fBitmap && fBitmap->InitCheck() == B_OK && fBitmap->IsValid())) { delete fBitmap; @@ -405,7 +404,8 @@ { // TODO: Get rid of hardcoded values BRect size(0,0,320,240); - fVideoView = new VideoView(size, "Video View", B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE, this); + fVideoView = new VideoView(size, "Video View", B_FOLLOW_ALL_SIDES, + B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE, this); size.OffsetBy(40.f, 40.f); fWindow = new VideoWindow(size, fVideoView); From julun at mail.berlios.de Sun Oct 5 13:56:08 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 13:56:08 +0200 Subject: [Haiku-commits] r27874 - haiku/trunk/src/add-ons/media/media-add-ons/videowindow Message-ID: <200810051156.m95Bu8JB011306@sheep.berlios.de> Author: julun Date: 2008-10-05 13:56:08 +0200 (Sun, 05 Oct 2008) New Revision: 27874 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27874&view=rev Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp Log: * lock the window before calling Quit() Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 11:53:29 UTC (rev 27873) +++ haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 11:56:08 UTC (rev 27874) @@ -64,7 +64,7 @@ Quit(); DeleteBuffers(); delete fBitmapLocker; - if (fWindow) + if (fWindow /*&& fWindow->Lock()*/) fWindow->Quit(); } From julun at mail.berlios.de Sun Oct 5 13:58:59 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 13:58:59 +0200 Subject: [Haiku-commits] r27875 - haiku/trunk/src/add-ons/media/media-add-ons/videowindow Message-ID: <200810051158.m95BwxXi011619@sheep.berlios.de> Author: julun Date: 2008-10-05 13:58:59 +0200 (Sun, 05 Oct 2008) New Revision: 27875 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27875&view=rev Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp Log: * argh, shouldn't have been commented out Modified: haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 11:56:08 UTC (rev 27874) +++ haiku/trunk/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp 2008-10-05 11:58:59 UTC (rev 27875) @@ -64,7 +64,7 @@ Quit(); DeleteBuffers(); delete fBitmapLocker; - if (fWindow /*&& fWindow->Lock()*/) + if (fWindow && fWindow->Lock()) fWindow->Quit(); } From bonefish at mail.berlios.de Sun Oct 5 15:15:05 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sun, 5 Oct 2008 15:15:05 +0200 Subject: [Haiku-commits] r27876 - in haiku/trunk: build/config_headers headers/private/kernel src/system/kernel/vm Message-ID: <200810051315.m95DF5Rj020576@sheep.berlios.de> Author: bonefish Date: 2008-10-05 15:15:04 +0200 (Sun, 05 Oct 2008) New Revision: 27876 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27876&view=rev Modified: haiku/trunk/build/config_headers/kernel_debug_config.h haiku/trunk/headers/private/kernel/vm_types.h haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: Moved several VM related debug settings to kernel_debug_config.h. Modified: haiku/trunk/build/config_headers/kernel_debug_config.h =================================================================== --- haiku/trunk/build/config_headers/kernel_debug_config.h 2008-10-05 11:58:59 UTC (rev 27875) +++ haiku/trunk/build/config_headers/kernel_debug_config.h 2008-10-05 13:15:04 UTC (rev 27876) @@ -19,4 +19,24 @@ #define BLOCK_CACHE_DEBUG_CHANGED +// VM + +// Enables the vm_page::queue, i.e. it is tracked which queue the page should +// be in. +//#define DEBUG_PAGE_QUEUE 1 + +// Enables extra debug fields in the vm_page used to track page transitions +// between caches. +//#define DEBUG_PAGE_CACHE_TRANSITIONS 1 + +// Enables a global list of all vm_cache structures. +//#define DEBUG_CACHE_LIST 1 + +// Enables swap support. +#define ENABLE_SWAP_SUPPORT 1 + +// When set limits the amount of available RAM (in MB). +//#define LIMIT_AVAILABLE_MEMORY 256 + + #endif // KERNEL_DEBUG_CONFIG_H Modified: haiku/trunk/headers/private/kernel/vm_types.h =================================================================== --- haiku/trunk/headers/private/kernel/vm_types.h 2008-10-05 11:58:59 UTC (rev 27875) +++ haiku/trunk/headers/private/kernel/vm_types.h 2008-10-05 13:15:04 UTC (rev 27876) @@ -18,21 +18,9 @@ #include +#include "kernel_debug_config.h" -// Enables the vm_page::queue, i.e. it is tracked which queue the page should -// be in. -//#define DEBUG_PAGE_QUEUE 1 -// Enables extra debug fields in the vm_page used to track page transitions -// between caches. -//#define DEBUG_PAGE_CACHE_TRANSITIONS 1 - -// Enables a global list of all vm_cache structures. -//#define DEBUG_CACHE_LIST 1 - -// uncomment to build in swap support -#define ENABLE_SWAP_SUPPORT 1 - #ifdef __cplusplus #include Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-05 11:58:59 UTC (rev 27875) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-05 13:15:04 UTC (rev 27876) @@ -46,10 +46,7 @@ #define SCRUB_SIZE 16 // this many pages will be cleared at once in the page scrubber thread -// for debugging: limit the amount of available RAM (in MB) -//#define LIMIT_AVAILABLE_MEMORY 256 - typedef struct page_queue { vm_page *head; vm_page *tail; From bonefish at mail.berlios.de Sun Oct 5 16:37:50 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sun, 5 Oct 2008 16:37:50 +0200 Subject: [Haiku-commits] r27877 - haiku/trunk/src/system/kernel/vm Message-ID: <200810051437.m95EboJP010319@sheep.berlios.de> Author: bonefish Date: 2008-10-05 16:37:50 +0200 (Sun, 05 Oct 2008) New Revision: 27877 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27877&view=rev Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp Log: * Fixed several instances of conversions from page to byte counts. We need to cast explicitly before the multiplication/shift, since the former is 32 bit and the latter 64 bit. The worst instance was in swap_file_add(), where the page count was int32, so that swap file sizes between 2 and 4 GB resulted in a negative available swap space size. Fixes bug #2721. * Fixed and added optional debug output. Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-05 13:15:04 UTC (rev 27876) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-05 14:37:50 UTC (rev 27877) @@ -43,11 +43,11 @@ #if ENABLE_SWAP_SUPPORT -//#define TRACE_STORE -#ifdef TRACE_STORE -# define TRACE(x) dprintf x +//#define TRACE_VM_ANONYMOUS_CACHE +#ifdef TRACE_VM_ANONYMOUS_CACHE +# define TRACE(x...) dprintf(x) #else -# define TRACE(x) ; +# define TRACE(x...) do { } while (true) #endif @@ -444,8 +444,9 @@ VMAnonymousCache::Init(bool canOvercommit, int32 numPrecommittedPages, int32 numGuardPages) { - TRACE(("VMAnonymousCache::Init(canOvercommit = %s, numGuardPages = %ld) " - "at %p\n", canOvercommit ? "yes" : "no", numGuardPages, store)); + TRACE("%p->VMAnonymousCache::Init(canOvercommit = %s, " + "numPrecommittedPages = %ld, numGuardPages = %ld)\n", this, + canOvercommit ? "yes" : "no", numPrecommittedPages, numGuardPages); status_t error = VMCache::Init(CACHE_TYPE_RAM); if (error != B_OK) @@ -465,6 +466,8 @@ status_t VMAnonymousCache::Commit(off_t size) { + TRACE("%p->VMAnonymousCache::Commit(%lld)\n", this, size); + // if we can overcommit, we don't commit here, but in anonymous_fault() if (fCanOvercommit) { if (fHasPrecommitted) @@ -510,7 +513,8 @@ swap_file *swapFile = find_swap_file(startSlotIndex); - off_t pos = (startSlotIndex - swapFile->first_slot) * B_PAGE_SIZE; + off_t pos = (off_t)(startSlotIndex - swapFile->first_slot) + * B_PAGE_SIZE; status_t status = vfs_read_pages(swapFile->vnode, swapFile->cookie, pos, vecs + i, j - i, 0, _numBytes); @@ -539,10 +543,10 @@ } } - if (fAllocatedSwapSize + count * B_PAGE_SIZE > fCommittedSwapSize) + if (fAllocatedSwapSize + (off_t)count * B_PAGE_SIZE > fCommittedSwapSize) return B_ERROR; - fAllocatedSwapSize += count * B_PAGE_SIZE; + fAllocatedSwapSize += (off_t)count * B_PAGE_SIZE; locker.Unlock(); uint32 n = count; @@ -559,13 +563,13 @@ swap_file *swapFile = find_swap_file(slotIndex); - off_t pos = (slotIndex - swapFile->first_slot) * B_PAGE_SIZE; + off_t pos = (off_t)(slotIndex - swapFile->first_slot) * B_PAGE_SIZE; status_t status = vfs_write_pages(swapFile->vnode, swapFile->cookie, pos, vecs + i, n, flags, _numBytes); if (status != B_OK) { locker.Lock(); - fAllocatedSwapSize -= n * B_PAGE_SIZE; + fAllocatedSwapSize -= (off_t)n * B_PAGE_SIZE; locker.Unlock(); swap_slot_dealloc(slotIndex, n); @@ -630,7 +634,7 @@ // write the page asynchrounously swap_file* swapFile = find_swap_file(slotIndex); - off_t pos = (slotIndex - swapFile->first_slot) * B_PAGE_SIZE; + off_t pos = (off_t)(slotIndex - swapFile->first_slot) * B_PAGE_SIZE; return vfs_asynchronous_write_pages(swapFile->vnode, swapFile->cookie, pos, vecs, 1, numBytes, flags, callback); @@ -777,7 +781,7 @@ // this page is not swapped out continue; - vm_page* page = LookupPage(pageIndex << PAGE_SHIFT); + vm_page* page = LookupPage((off_t)pageIndex << PAGE_SHIFT); bool keepSwapPage = true; if (page != NULL && !page->merge_swap) { @@ -812,7 +816,7 @@ // All source swap pages that have not been freed yet are taken over by // by the consumer. - fAllocatedSwapSize += B_PAGE_SIZE * sourceSwapBlock->used; + fAllocatedSwapSize += B_PAGE_SIZE * (off_t)sourceSwapBlock->used; if (sourceSwapBlock->used == 0) { // All swap pages have been freed -- we can discard the source swap @@ -942,6 +946,9 @@ status_t VMAnonymousCache::_Commit(off_t size) { + TRACE("%p->VMAnonymousCache::_Commit(%lld), already committed: %lld " + "(%lld swap)\n", this, size, committed_size, fCommittedSwapSize); + // Basic strategy: reserve swap space first, only when running out of swap // space, reserve real memory. @@ -953,6 +960,10 @@ if (size > fCommittedSwapSize) { fCommittedSwapSize += swap_space_reserve(size - fCommittedSwapSize); committed_size = fCommittedSwapSize + committedMemory; + if (size > fCommittedSwapSize) { + TRACE("%p->VMAnonymousCache::_Commit(%lld), reserved only %lld " + "swap\n", this, size, fCommittedSwapSize); + } } if (committed_size == size) @@ -983,8 +994,11 @@ // the start of the method, so we try to reserve real memory, now. off_t toReserve = size - committed_size; - if (vm_try_reserve_memory(toReserve, 1000000) != B_OK) + if (vm_try_reserve_memory(toReserve, 1000000) != B_OK) { + dprintf("%p->VMAnonymousCache::_Commit(%lld): Failed to reserve %lld " + "bytes of RAM\n", this, size, toReserve); return B_NO_MEMORY; + } committed_size = size; return B_OK; @@ -1040,7 +1054,7 @@ swap->vnode = node; swap->cookie = descriptor->cookie; - int32 pageCount = st.st_size >> PAGE_SHIFT; + uint32 pageCount = st.st_size >> PAGE_SHIFT; swap->bmp = radix_bitmap_create(pageCount); if (swap->bmp == NULL) { free(swap); @@ -1064,7 +1078,7 @@ mutex_unlock(&sSwapFileListLock); mutex_lock(&sAvailSwapSpaceLock); - sAvailSwapSpace += pageCount * B_PAGE_SIZE; + sAvailSwapSpace += (off_t)pageCount * B_PAGE_SIZE; mutex_unlock(&sAvailSwapSpaceLock); return B_OK; @@ -1104,7 +1118,8 @@ locker.Unlock(); mutex_lock(&sAvailSwapSpaceLock); - sAvailSwapSpace -= (swapFile->last_slot - swapFile->first_slot) * PAGE_SIZE; + sAvailSwapSpace -= (off_t)(swapFile->last_slot - swapFile->first_slot) + * PAGE_SIZE; mutex_unlock(&sAvailSwapSpaceLock); close(swapFile->fd); @@ -1174,7 +1189,7 @@ unload_driver_settings(settings); } else - size = vm_page_num_pages() * B_PAGE_SIZE * 2; + size = (off_t)vm_page_num_pages() * B_PAGE_SIZE * 2; if (size < B_PAGE_SIZE) return; @@ -1254,8 +1269,8 @@ swap_get_info(struct system_memory_info *info) { #if ENABLE_SWAP_SUPPORT - info->max_swap_space = swap_total_swap_pages() * B_PAGE_SIZE; - info->free_swap_space = swap_available_pages() * B_PAGE_SIZE; + info->max_swap_space = (uint64)swap_total_swap_pages() * B_PAGE_SIZE; + info->free_swap_space = (uint64)swap_available_pages() * B_PAGE_SIZE; #else info->max_swap_space = 0; info->free_swap_space = 0; From anevilyak at gmail.com Sun Oct 5 16:55:49 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Sun, 5 Oct 2008 09:55:49 -0500 Subject: [Haiku-commits] r27874 - haiku/trunk/src/add-ons/media/media-add-ons/videowindow In-Reply-To: <200810051156.m95Bu8JB011306@sheep.berlios.de> References: <200810051156.m95Bu8JB011306@sheep.berlios.de> Message-ID: On Sun, Oct 5, 2008 at 6:56 AM, julun at BerliOS wrote: > Log: > * lock the window before calling Quit() > + if (fWindow /*&& fWindow->Lock()*/) Is it deliberate that the actual locking part is commented out? Regards, Rene From anevilyak at gmail.com Sun Oct 5 16:56:21 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Sun, 5 Oct 2008 09:56:21 -0500 Subject: [Haiku-commits] r27874 - haiku/trunk/src/add-ons/media/media-add-ons/videowindow In-Reply-To: References: <200810051156.m95Bu8JB011306@sheep.berlios.de> Message-ID: On Sun, Oct 5, 2008 at 9:55 AM, Rene Gollent wrote: > Is it deliberate that the actual locking part is commented out? > Never mind, just saw the next commit fixing that. Regards, Rene From bonefish at mail.berlios.de Sun Oct 5 17:17:37 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sun, 5 Oct 2008 17:17:37 +0200 Subject: [Haiku-commits] r27878 - haiku/trunk/src/system/kernel/vm Message-ID: <200810051517.m95FHbKc015614@sheep.berlios.de> Author: bonefish Date: 2008-10-05 17:17:31 +0200 (Sun, 05 Oct 2008) New Revision: 27878 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27878&view=rev Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp Log: Yay, infinite loop when debug output is disabled. Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-05 14:37:50 UTC (rev 27877) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-05 15:17:31 UTC (rev 27878) @@ -47,7 +47,7 @@ #ifdef TRACE_VM_ANONYMOUS_CACHE # define TRACE(x...) dprintf(x) #else -# define TRACE(x...) do { } while (true) +# define TRACE(x...) do { } while (false) #endif From anevilyak at gmail.com Sun Oct 5 18:06:38 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Sun, 5 Oct 2008 11:06:38 -0500 Subject: [Haiku-commits] r27878 - haiku/trunk/src/system/kernel/vm In-Reply-To: <200810051517.m95FHbKc015614@sheep.berlios.de> References: <200810051517.m95FHbKc015614@sheep.berlios.de> Message-ID: On Sun, Oct 5, 2008 at 10:17 AM, bonefish at BerliOS wrote: > #else > -# define TRACE(x...) do { } while (true) > +# define TRACE(x...) do { } while (false) > #endif Just curiosity, why is it defined this way anyhow, instead of just: #else #define TRACE(x...) #endif Regards, Rene From haiku at kaldience.com Sun Oct 5 19:16:39 2008 From: haiku at kaldience.com (Maurice Kalinowski) Date: Sun, 05 Oct 2008 19:16:39 +0200 Subject: [Haiku-commits] r27777 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi In-Reply-To: <894b9700810050144p40d88024p34cbf74e6583ff6@mail.gmail.com> References: <894b9700809290633j348c4620l30fb59b7f7dbb8a0@mail.gmail.com> <36376445232-BeMail@zon> <894b9700809300011y6dd19357le7f16b661f333dc@mail.gmail.com> <894b9700810050144p40d88024p34cbf74e6583ff6@mail.gmail.com> Message-ID: <48E8F677.6020306@kaldience.com> Stefano Ceccherini wrote: > > Ah, yes, could be. On that machine I can only compile with cygwin and > gcc4, so I didn't think about this. > Oh wow, somebody is using that. And I was just about to remove my cygwin installation here. Seems like I should investigate on the remaining issues then :) Maurice From ingo_weinhold at gmx.de Sun Oct 5 19:18:56 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Sun, 05 Oct 2008 19:18:56 +0200 Subject: [Haiku-commits] r27878 - haiku/trunk/src/system/kernel/vm In-Reply-To: References: <200810051517.m95FHbKc015614@sheep.berlios.de> Message-ID: <20081005191856.337.1@knochen-vm.localdomain> On 2008-10-05 at 18:06:38 [+0200], Rene Gollent wrote: > On Sun, Oct 5, 2008 at 10:17 AM, bonefish at BerliOS > wrote: > > #else > > -# define TRACE(x...) do { } while (true) > > +# define TRACE(x...) do { } while (false) > > #endif > > Just curiosity, why is it defined this way anyhow, instead of just: > > #else > #define TRACE(x...) > #endif When defining it empty, one risks getting undesired semantics without noticing it when forgetting the ";" after a TRACE() instance in a single-line "if" or "else". Defining it to ";" prevents that. I faintly recall that I ran into a problem (warning?) with that once (though I fail to come up with an example ATM), so I switched to the "do { } while (false)" alternative. CU, Ingo From julun at mail.berlios.de Sun Oct 5 22:55:26 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 22:55:26 +0200 Subject: [Haiku-commits] r27879 - in haiku/trunk/src/apps/cortex: DiagramView MediaRoutingView Message-ID: <200810052055.m95KtQmE010312@sheep.berlios.de> Author: julun Date: 2008-10-05 22:55:25 +0200 (Sun, 05 Oct 2008) New Revision: 27879 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27879&view=rev Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp Log: * cleanup Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp =================================================================== --- haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 15:17:31 UTC (rev 27878) +++ haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 20:55:25 UTC (rev 27879) @@ -5,7 +5,7 @@ Objects of this class can manage one or more of the DiagramItem type M_BOX, M_WIRE and M_ENDPOINT. Many methods let you specify - which type of item you want to deal with. + which type of item you want to deal with. */ #include "DiagramItemGroup.h" @@ -317,7 +317,7 @@ if (whichType & DiagramItem::M_BOX) { for (int32 i = CountItems(DiagramItem::M_BOX) - 1; i >= 0; i--) { DiagramItem *item = ItemAt(i, DiagramItem::M_BOX); - if (item && item->Frame().Intersects(updateRect)) { + if (item && item->Frame().Intersects(updateRect)) { item->Draw(updateRect); if (updateRegion) updateRegion->Exclude(item->Frame()); Modified: haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp =================================================================== --- haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp 2008-10-05 15:17:31 UTC (rev 27878) +++ haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp 2008-10-05 20:55:25 UTC (rev 27879) @@ -136,7 +136,7 @@ void MediaJack::detachedFromDiagram() { D_METHOD(("MediaJack::detachedFromDiagram()\n")); - + // make sure we're no longer displaying a tooltip TipManager *tips = TipManager::Instance(); tips->hideTip(view()->ConvertToScreen(Frame())); @@ -241,7 +241,7 @@ TipManager *tips = TipManager::Instance(); BString tipText = m_label.String(); tipText << " (" << MediaString::getStringFor(m_format.type) << ")"; - tips->showTip(tipText.String(),view()->ConvertToScreen(Frame()), + tips->showTip(tipText.String(),view()->ConvertToScreen(Frame()), TipManager::LEFT_OFFSET_FROM_POINTER, BPoint(12.0, 8.0)); break; } @@ -364,7 +364,7 @@ void MediaJack::_updateBitmap() { D_METHOD(("MediaJack::_updateBitmap()\n")); - + if (m_bitmap) { delete m_bitmap; @@ -404,7 +404,7 @@ { BRect r; BPoint p; - + // fill rect r = targetRect; target->SetLowColor(M_GRAY_COLOR); @@ -684,7 +684,7 @@ D_METHOD(("MediaJack::_updateAbbreviation()\n")); int32 offset; - m_abbreviation = ""; + m_abbreviation = ""; m_abbreviation += m_label[0]; offset = m_label.FindFirst(" ") + 1; if ((offset > 1) && (offset < m_label.CountChars() - 1)) @@ -714,7 +714,7 @@ media_input input; getInput(&input); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); - message->AddData("input", B_RAW_TYPE, + message->AddData("input", B_RAW_TYPE, reinterpret_cast(&input), sizeof(input)); menu->AddItem(item = new BMenuItem("Get Info", message)); } @@ -723,7 +723,7 @@ media_output output; getOutput(&output); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); - message->AddData("output", B_RAW_TYPE, + message->AddData("output", B_RAW_TYPE, reinterpret_cast(&output), sizeof(output)); menu->AddItem(item = new BMenuItem("Get Info", message)); } From julun at mail.berlios.de Sun Oct 5 23:11:21 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 23:11:21 +0200 Subject: [Haiku-commits] r27880 - in haiku/trunk/src/apps/cortex: DiagramView MediaRoutingView Message-ID: <200810052111.m95LBLIP013637@sheep.berlios.de> Author: julun Date: 2008-10-05 23:11:20 +0200 (Sun, 05 Oct 2008) New Revision: 27880 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27880&view=rev Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp Log: * fix a crash when closing Cortex with some connected nodes This should have crashed on R5 too, what happend is that deleting a 'Box' will cause a release of it's EndPoints, thus leaving some dangling EndPoint pointers in the Wires, which they access to call disconnect. So deletion order is important here, delete Wires first. Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp =================================================================== --- haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 20:55:25 UTC (rev 27879) +++ haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 21:11:20 UTC (rev 27880) @@ -37,37 +37,40 @@ DiagramItemGroup::~DiagramItemGroup() { D_METHOD(("DiagramItemGroup::~DiagramItemGroup()\n")); - if (fSelection) { - fSelection->MakeEmpty(); - delete fSelection; - } - if (fBoxes && (fTypes & DiagramItem::M_BOX)) { - while (CountItems(DiagramItem::M_BOX) > 0) { - DiagramItem *item = ItemAt(0, DiagramItem::M_BOX); + int32 count = 0; + if (fWires && (fTypes & DiagramItem::M_WIRE)) { + count = fWires->CountItems(); + for (int32 i = 0; i < count; ++i) { + DiagramItem* item = static_cast(fWires->ItemAtFast(i)); if (RemoveItem(item)) delete item; } - delete fBoxes; + delete fWires; } - if (fWires && (fTypes & DiagramItem::M_WIRE)) { - while (CountItems(DiagramItem::M_WIRE) > 0) { - DiagramItem *item = ItemAt(0, DiagramItem::M_WIRE); + if (fBoxes && (fTypes & DiagramItem::M_BOX)) { + count = fBoxes->CountItems(); + for (int32 i = 0; i < count; ++i) { + DiagramItem* item = static_cast(fBoxes->ItemAtFast(i)); if (RemoveItem(item)) delete item; } - delete fWires; + delete fBoxes; } if (fEndPoints && (fTypes & DiagramItem::M_ENDPOINT)) { - while (CountItems(DiagramItem::M_ENDPOINT) > 0) { - DiagramItem *item = ItemAt(0, DiagramItem::M_ENDPOINT); + count = fEndPoints->CountItems(); + for (int32 i = 0; i < count; ++i) { + DiagramItem* item = static_cast(fEndPoints->ItemAtFast(i)); if (RemoveItem(item)) delete item; } delete fEndPoints; } + + if (fSelection) + delete fSelection; } @@ -86,7 +89,6 @@ if (whichType & DiagramItem::M_BOX) { if (fBoxes) count += fBoxes->CountItems(); - } if (whichType & DiagramItem::M_WIRE) { @@ -198,6 +200,9 @@ { D_METHOD(("DiagramItemGroup::AddItem()\n")); if (item && (fTypes & item->type())) { + if (item->m_group) + item->m_group->RemoveItem(item); + switch (item->type()) { case DiagramItem::M_BOX: if (!fBoxes) Modified: haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp =================================================================== --- haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp 2008-10-05 20:55:25 UTC (rev 27879) +++ haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp 2008-10-05 21:11:20 UTC (rev 27880) @@ -376,7 +376,9 @@ tempBitmap->AddChild(tempView); tempView->SetOrigin(0.0, 0.0); - int32 layout = dynamic_cast(view())->getLayout(); + MediaRoutingView* mediaView = dynamic_cast(view()); + int32 layout = mediaView ? mediaView->getLayout() : MediaRoutingView::M_ICON_VIEW; + _drawInto(tempView, tempView->Bounds(), layout); tempView->Sync(); From julun at mail.berlios.de Sun Oct 5 23:52:40 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Sun, 5 Oct 2008 23:52:40 +0200 Subject: [Haiku-commits] r27881 - haiku/trunk/src/apps/cortex/DiagramView Message-ID: <200810052152.m95LqeJe018014@sheep.berlios.de> Author: julun Date: 2008-10-05 23:52:40 +0200 (Sun, 05 Oct 2008) New Revision: 27881 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27881&view=rev Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp Log: * the way it was now, not all items would have been deleted Modified: haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp =================================================================== --- haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 21:11:20 UTC (rev 27880) +++ haiku/trunk/src/apps/cortex/DiagramView/DiagramItemGroup.cpp 2008-10-05 21:52:40 UTC (rev 27881) @@ -41,31 +41,22 @@ int32 count = 0; if (fWires && (fTypes & DiagramItem::M_WIRE)) { count = fWires->CountItems(); - for (int32 i = 0; i < count; ++i) { - DiagramItem* item = static_cast(fWires->ItemAtFast(i)); - if (RemoveItem(item)) - delete item; - } + for (int32 i = 0; i < count; ++i) + delete static_cast(fWires->ItemAt(i)); delete fWires; } if (fBoxes && (fTypes & DiagramItem::M_BOX)) { count = fBoxes->CountItems(); - for (int32 i = 0; i < count; ++i) { - DiagramItem* item = static_cast(fBoxes->ItemAtFast(i)); - if (RemoveItem(item)) - delete item; - } + for (int32 i = 0; i < count; ++i) + delete static_cast(fBoxes->ItemAt(i)); delete fBoxes; } if (fEndPoints && (fTypes & DiagramItem::M_ENDPOINT)) { count = fEndPoints->CountItems(); - for (int32 i = 0; i < count; ++i) { - DiagramItem* item = static_cast(fEndPoints->ItemAtFast(i)); - if (RemoveItem(item)) - delete item; - } + for (int32 i = 0; i < count; ++i) + delete static_cast(fEndPoints->ItemAt(i)); delete fEndPoints; } From julun at mail.berlios.de Mon Oct 6 00:41:37 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Mon, 6 Oct 2008 00:41:37 +0200 Subject: [Haiku-commits] r27882 - haiku/trunk/src/kits/support Message-ID: <200810052241.m95MfbEJ003157@sheep.berlios.de> Author: julun Date: 2008-10-06 00:41:36 +0200 (Mon, 06 Oct 2008) New Revision: 27882 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27882&view=rev Modified: haiku/trunk/src/kits/support/List.cpp Log: * cleanup Modified: haiku/trunk/src/kits/support/List.cpp =================================================================== --- haiku/trunk/src/kits/support/List.cpp 2008-10-05 21:52:40 UTC (rev 27881) +++ haiku/trunk/src/kits/support/List.cpp 2008-10-05 22:41:36 UTC (rev 27882) @@ -224,7 +224,7 @@ BList::ReplaceItem(int32 index, void *newItem) { bool result = false; - + if (index >= 0 && index < fItemCount) { fObjectList[index] = newItem; result = true; @@ -257,44 +257,44 @@ BList::SwapItems(int32 indexA, int32 indexB) { bool result = false; - + if (indexA >= 0 && indexA < fItemCount && indexB >= 0 && indexB < fItemCount) { - + void *tmpItem = fObjectList[indexA]; fObjectList[indexA] = fObjectList[indexB]; fObjectList[indexB] = tmpItem; - + result = true; - } - + } + return result; } -//MoveItem - //This moves a list item from posititon a to position b, moving the appropriate block of - // list elements to make up for the move. For example, in the array: - // A B C D E F G H I J - // Moveing 1(B)->6(G) would result in this: - // A C D E F G B H I J +// MoveItem +// This moves a list item from posititon a to position b, moving the appropriate +// block of list elements to make up for the move. For example, in the array: +// A B C D E F G H I J +// Moveing 1(B)->6(G) would result in this: +// A C D E F G B H I J bool BList::MoveItem(int32 fromIndex, int32 toIndex) { - if ((fromIndex >= fItemCount) || (toIndex >= fItemCount) || (fromIndex < 0) || (toIndex < 0)) + if ((fromIndex >= fItemCount) || (toIndex >= fItemCount) || (fromIndex < 0) + || (toIndex < 0)) return false; - - if (fromIndex < toIndex) - { - void * tmp_mover = fObjectList[fromIndex]; - memmove(fObjectList + fromIndex + 1, fObjectList + fromIndex, (toIndex - fromIndex) * sizeof(void *)); - fObjectList[toIndex] = tmp_mover; - } - else if (fromIndex > toIndex) - { - void * tmp_mover = fObjectList[fromIndex]; - memmove(fObjectList + toIndex + 1, fObjectList + toIndex, (fromIndex - toIndex) * sizeof(void *)); - fObjectList[toIndex] = tmp_mover; + + if (fromIndex < toIndex) { + void * tmpMover = fObjectList[fromIndex]; + memmove(fObjectList + fromIndex + 1, fObjectList + fromIndex, + (toIndex - fromIndex) * sizeof(void *)); + fObjectList[toIndex] = tmpMover; + } else if (fromIndex > toIndex) { + void * tmpMover = fObjectList[fromIndex]; + memmove(fObjectList + toIndex + 1, fObjectList + toIndex, + (fromIndex - toIndex) * sizeof(void *)); + fObjectList[toIndex] = tmpMover; }; return true; } @@ -390,7 +390,7 @@ /* Iterating over the list. */ //iterate a function over the whole list. If the function outputs a true //value, then the process is terminated. - + void BList::DoForEach(bool (*func)(void *)) { @@ -415,7 +415,7 @@ if (func != NULL) { while ((!terminate) && (index < fItemCount)) - { + { terminate = func(fObjectList[index], arg); index++; }; @@ -478,9 +478,9 @@ if (newObjectList) { fObjectList = newObjectList; fPhysicalSize = newSize; - // set our lower bound to either 1/4 + // set our lower bound to either 1/4 //of the current physical size, or 0 - fResizeThreshold = fPhysicalSize >> 2 >= fBlockSize + fResizeThreshold = fPhysicalSize >> 2 >= fBlockSize ? fPhysicalSize >> 2 : 0; } else result = false; From julun at mail.berlios.de Mon Oct 6 00:44:35 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Mon, 6 Oct 2008 00:44:35 +0200 Subject: [Haiku-commits] r27883 - haiku/trunk/src/kits/support Message-ID: <200810052244.m95MiZg2005947@sheep.berlios.de> Author: julun Date: 2008-10-06 00:44:33 +0200 (Mon, 06 Oct 2008) New Revision: 27883 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27883&view=rev Modified: haiku/trunk/src/kits/support/List.cpp Log: * fix of by one bug while moving from front to back Modified: haiku/trunk/src/kits/support/List.cpp =================================================================== --- haiku/trunk/src/kits/support/List.cpp 2008-10-05 22:41:36 UTC (rev 27882) +++ haiku/trunk/src/kits/support/List.cpp 2008-10-05 22:44:33 UTC (rev 27883) @@ -285,17 +285,17 @@ || (toIndex < 0)) return false; + void * tmpMover = fObjectList[fromIndex]; if (fromIndex < toIndex) { - void * tmpMover = fObjectList[fromIndex]; - memmove(fObjectList + fromIndex + 1, fObjectList + fromIndex, + memmove(fObjectList + fromIndex, fObjectList + fromIndex + 1, (toIndex - fromIndex) * sizeof(void *)); fObjectList[toIndex] = tmpMover; } else if (fromIndex > toIndex) { - void * tmpMover = fObjectList[fromIndex]; memmove(fObjectList + toIndex + 1, fObjectList + toIndex, (fromIndex - toIndex) * sizeof(void *)); - fObjectList[toIndex] = tmpMover; }; + fObjectList[toIndex] = tmpMover; + return true; } From rudolfc at mail.berlios.de Mon Oct 6 08:51:23 2008 From: rudolfc at mail.berlios.de (rudolfc at mail.berlios.de) Date: Mon, 6 Oct 2008 08:51:23 +0200 Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter Message-ID: <200810060651.m966pNE0003336@sheep.berlios.de> Author: rudolfc Date: 2008-10-06 08:51:21 +0200 (Mon, 06 Oct 2008) New Revision: 27884 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27884&view=rev Modified: haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c Log: forcing 16bit pio writes, disabling 32bit pio writes. This was already the case for read pio ever since this driver got imported. This fixes booting from IDE drives in PIO mode with both the IDE and ATA busmanagers, at least on my ASUS P5E3 mainboard. If I am stepping out of bounds here please correct and let me know.. Modified: haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c =================================================================== --- haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c 2008-10-05 22:44:33 UTC (rev 27883) +++ haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c 2008-10-06 06:51:21 UTC (rev 27884) @@ -140,6 +140,8 @@ if (channel->lost) return B_ERROR; + force_16bit = true; + if ((count & 1) != 0 || force_16bit) { for (; count > 0; --count) pci->write_io_16(device, ioaddr, *(data++)); From axeld at pinc-software.de Mon Oct 6 09:26:43 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Mon, 06 Oct 2008 09:26:43 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r27884_-_haiku/trunk/src/add-ons/kernel?= =?utf-8?q?/generic/ide=5Fadapter?= In-Reply-To: <200810060651.m966pNE0003336@sheep.berlios.de> Message-ID: <1447511985-BeMail@zon> rudolfc at mail.berlios.de wrote: > Log: > forcing 16bit pio writes, disabling 32bit pio writes. This was > already the case for read > pio ever since this driver got imported. This fixes booting from IDE > drives in PIO mode > with both the IDE and ATA busmanagers, at least on my ASUS P5E3 > mainboard. > If I am stepping out of bounds here please correct and let me know.. As a temporary fix, this is definitely okay (a comment would have been nice, too, also in the read case). But it should actually be handled differently; the controller should decide whether or not to force 16 bit. I guess that's just one more thing to change in the ATA bus manager. Judging from the FreeBSD sources, is it possible that you have either a Marvell, Netcell, or Promise IDE controller on your board? Bye, Axel. From marcusoverhagen at arcor.de Mon Oct 6 10:20:08 2008 From: marcusoverhagen at arcor.de (Marcus Overhagen) Date: Mon, 6 Oct 2008 10:20:08 +0200 (CEST) Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter In-Reply-To: <1447511985-BeMail@zon> References: <1447511985-BeMail@zon> Message-ID: <19322719.1223281208645.JavaMail.ngmail@webmail10.arcor-online.net> Axel D?rfler wrote: > rudolfc at mail.berlios.de wrote: [...] > nice, too, also in the read case). But it should actually be handled > differently; the controller should decide whether or not to force 16 Yes, we should have a flag, either to use 32 bit or force 16 bit. > Judging from the FreeBSD sources, is it possible that you have either a > Marvell, Netcell, or Promise IDE controller on your board? Rudolf, *PLEASE* open a bug report ticket and attach a syslog file! regards Marcus Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmf?hrer mit Movie Star Bewertungen von TV Movie. Au?erdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv From axeld at mail.berlios.de Mon Oct 6 11:42:00 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 6 Oct 2008 11:42:00 +0200 Subject: [Haiku-commits] r27885 - haiku/trunk/src/add-ons/input_server/filters/screensaver Message-ID: <200810060942.m969g0ea024525@sheep.berlios.de> Author: axeld Date: 2008-10-06 11:41:59 +0200 (Mon, 06 Oct 2008) New Revision: 27885 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27885&view=rev Modified: haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.cpp haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.h Log: * The ScreenSaverFilter now uses locking in all public functions to ensure it works well with its controlling looper. This fixes #2638. * Header cleanup. Modified: haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.cpp =================================================================== --- haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.cpp 2008-10-06 06:51:21 UTC (rev 27884) +++ haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.cpp 2008-10-06 09:41:59 UTC (rev 27885) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku. + * Copyright 2003-2008, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -12,6 +12,7 @@ #include "ScreenSaverFilter.h" #include +#include #include #include #include @@ -101,23 +102,25 @@ ScreenSaverFilter::ScreenSaverFilter() - : + : BLocker("screen saver filter"), fLastEventTime(0), fBlankTime(0), fSnoozeTime(0), fCurrentCorner(NO_CORNER), - fEnabled(false), fFrameNum(0), fRunner(NULL), fCornerRunner(NULL), fWatchingDirectory(false), - fWatchingFile(false) + fWatchingFile(false), + fEnabled(false) { CALLED(); fController = new (std::nothrow) ScreenSaverController(this); if (fController == NULL) return; + BAutolock _(this); + fController->Run(); ReloadSettings(); @@ -127,21 +130,23 @@ ScreenSaverFilter::~ScreenSaverFilter() { + be_roster->StopWatching(fController); + + // We must quit our controller without being locked, or else we might + // deadlock; when the controller is gone, there is no reason to lock + // anymore, anyway. + if (fController->Lock()) + fController->Quit(); + delete fCornerRunner; delete fRunner; if (fWatchingFile || fWatchingDirectory) watch_node(&fNodeRef, B_STOP_WATCHING, fController); - - be_roster->StopWatching(fController); - - if (fController->Lock()) - fController->Quit(); } -/*! - Starts watching the settings file, or if that doesn't exist, the directory +/*! Starts watching the settings file, or if that doesn't exist, the directory the settings file will be placed into. */ void @@ -176,6 +181,7 @@ } +/*! Starts the screen saver if allowed */ void ScreenSaverFilter::_Invoke() { @@ -192,10 +198,28 @@ } +/*! Stops the running screen saver, if any */ void +ScreenSaverFilter::_Banish() +{ + CALLED(); + if (!fEnabled) + return; + + SERIAL_PRINT(("we quit screenblanker\n")); + + // Don't care if it fails + BMessenger blankerMessenger(SCREEN_BLANKER_SIG, -1, NULL); + blankerMessenger.SendMessage(B_QUIT_REQUESTED); + fEnabled = false; +} + + +void ScreenSaverFilter::ReloadSettings() { CALLED(); + BAutolock _(this); bool isFirst = !fWatchingDirectory && !fWatchingFile; _WatchSettings(); @@ -224,26 +248,19 @@ } BMessage check(kMsgCheckTime); - fRunner = new (std::nothrow) BMessageRunner(fController, &check, fSnoozeTime); - if (fRunner->InitCheck() != B_OK) { - SERIAL_PRINT(("fRunner init failed\n")); + fRunner = new (std::nothrow) BMessageRunner(fController, &check, + fSnoozeTime); + if (fRunner == NULL || fRunner->InitCheck() != B_OK) { + SERIAL_PRINT(("screen saver filter runner init failed\n")); } } void -ScreenSaverFilter::_Banish() +ScreenSaverFilter::SetEnabled(bool enabled) { - CALLED(); - if (!fEnabled) - return; - - SERIAL_PRINT(("we quit screenblanker\n")); - - // Don't care if it fails - BMessenger blankerMessenger(SCREEN_BLANKER_SIG, -1, NULL); - blankerMessenger.SendMessage(B_QUIT_REQUESTED); - fEnabled = false; + BAutolock _(this); + fEnabled = enabled; } @@ -251,6 +268,8 @@ ScreenSaverFilter::CheckTime() { CALLED(); + BAutolock _(this); + bigtime_t now = system_time(); if (now >= fLastEventTime + fBlankTime) _Invoke(); @@ -267,7 +286,7 @@ else fSnoozeTime = fLastEventTime + fBlankTime - now; - if (fRunner) + if (fRunner != NULL) fRunner->SetInterval(fSnoozeTime); } @@ -275,6 +294,8 @@ void ScreenSaverFilter::CheckCornerInvoke() { + BAutolock _(this); + bigtime_t inactivity = system_time() - fLastEventTime; if (fCurrentCorner == fBlankCorner && fBlankCorner != NO_CORNER @@ -326,6 +347,8 @@ filter_result ScreenSaverFilter::Filter(BMessage *message, BList *outList) { + BAutolock _(this); + fLastEventTime = system_time(); switch (message->what) { @@ -366,7 +389,8 @@ // we ignore the Print-Screen key to make screen shots of // screen savers possible int32 key; - if (fEnabled && message->FindInt32("key", &key) == B_OK && key == 0xe) + if (fEnabled && message->FindInt32("key", &key) == B_OK + && key == 0xe) return B_DISPATCH_MESSAGE; } } Modified: haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.h =================================================================== --- haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.h 2008-10-06 06:51:21 UTC (rev 27884) +++ haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.h 2008-10-06 09:41:59 UTC (rev 27885) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006, Haiku. + * Copyright 2003-2008, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -14,6 +14,7 @@ #include "ScreenSaverSettings.h" #include +#include #include #include @@ -23,51 +24,62 @@ class BMessageRunner; class ScreenSaverFilter; + class ScreenSaverController : public BLooper { - public: - ScreenSaverController(ScreenSaverFilter *filter); - void MessageReceived(BMessage *msg); +public: + ScreenSaverController( + ScreenSaverFilter* filter); + virtual void MessageReceived(BMessage* msg); - private: - ScreenSaverFilter* fFilter; +private: + ScreenSaverFilter* fFilter; }; -class ScreenSaverFilter : public BInputServerFilter { - public: - ScreenSaverFilter(); - virtual ~ScreenSaverFilter(); - virtual filter_result Filter(BMessage *message, BList *outList); +class ScreenSaverFilter : public BInputServerFilter, BLocker { +public: + ScreenSaverFilter(); + virtual ~ScreenSaverFilter(); - void Suspend(BMessage *message); + virtual filter_result Filter(BMessage* message, BList* outList); - void CheckTime(); - void CheckCornerInvoke(); + void Suspend(BMessage* message); - uint32 SnoozeTime() {return fSnoozeTime;} - void ReloadSettings(); - void SetEnabled(bool enabled) { fEnabled = enabled; } + void CheckTime(); + void CheckCornerInvoke(); - private: - void _WatchSettings(); - void _UpdateRectangles(); - BRect _ScreenCorner(screen_corner pos, uint32 cornerSize); + void ReloadSettings(); + void SetEnabled(bool enabled); - void _Invoke(); - void _Banish(); +private: + uint32 _SnoozeTime() {return fSnoozeTime;} + void _WatchSettings(); + void _UpdateRectangles(); + BRect _ScreenCorner(screen_corner pos, + uint32 cornerSize); - ScreenSaverSettings fSettings; - bigtime_t fLastEventTime, fBlankTime, fSnoozeTime; - screen_corner fBlankCorner, fNeverBlankCorner, fCurrentCorner; - BRect fBlankRect, fNeverBlankRect; - bool fEnabled; - uint32 fFrameNum; + void _Invoke(); + void _Banish(); - ScreenSaverController* fController; - node_ref fNodeRef; - BMessageRunner* fRunner; - BMessageRunner* fCornerRunner; - bool fWatchingDirectory, fWatchingFile; + ScreenSaverSettings fSettings; + bigtime_t fLastEventTime; + bigtime_t fBlankTime; + bigtime_t fSnoozeTime; + screen_corner fBlankCorner; + screen_corner fNeverBlankCorner; + screen_corner fCurrentCorner; + BRect fBlankRect; + BRect fNeverBlankRect; + uint32 fFrameNum; + + ScreenSaverController* fController; + node_ref fNodeRef; + BMessageRunner* fRunner; + BMessageRunner* fCornerRunner; + bool fWatchingDirectory; + bool fWatchingFile; + + bool fEnabled; }; #endif /* SCREEN_SAVER_FILTER_H */ From axeld at mail.berlios.de Mon Oct 6 11:46:07 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 6 Oct 2008 11:46:07 +0200 Subject: [Haiku-commits] r27886 - in haiku/trunk/src/add-ons/input_server/filters: . screen_saver Message-ID: <200810060946.m969k7EG025092@sheep.berlios.de> Author: axeld Date: 2008-10-06 11:46:06 +0200 (Mon, 06 Oct 2008) New Revision: 27886 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27886&view=rev Added: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.cpp haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.h Removed: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.cpp haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.h haiku/trunk/src/add-ons/input_server/filters/screensaver/ Modified: haiku/trunk/src/add-ons/input_server/filters/Jamfile haiku/trunk/src/add-ons/input_server/filters/screen_saver/Jamfile Log: * Renamed the "screensaver" directory to match the name of the filter, ie. "screen_saver". Modified: haiku/trunk/src/add-ons/input_server/filters/Jamfile =================================================================== --- haiku/trunk/src/add-ons/input_server/filters/Jamfile 2008-10-06 09:41:59 UTC (rev 27885) +++ haiku/trunk/src/add-ons/input_server/filters/Jamfile 2008-10-06 09:46:06 UTC (rev 27886) @@ -1,3 +1,3 @@ SubDir HAIKU_TOP src add-ons input_server filters ; -SubInclude HAIKU_TOP src add-ons input_server filters screensaver ; \ No newline at end of file +SubInclude HAIKU_TOP src add-ons input_server filters screen_saver ; Copied: haiku/trunk/src/add-ons/input_server/filters/screen_saver (from rev 27884, haiku/trunk/src/add-ons/input_server/filters/screensaver) Modified: haiku/trunk/src/add-ons/input_server/filters/screen_saver/Jamfile =================================================================== --- haiku/trunk/src/add-ons/input_server/filters/screensaver/Jamfile 2008-10-06 06:51:21 UTC (rev 27884) +++ haiku/trunk/src/add-ons/input_server/filters/screen_saver/Jamfile 2008-10-06 09:46:06 UTC (rev 27886) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons input_server filters screensaver ; +SubDir HAIKU_TOP src add-ons input_server filters screen_saver ; SetSubDirSupportedPlatformsBeOSCompatible ; Deleted: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.cpp Copied: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.cpp (from rev 27885, haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.cpp) Deleted: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.h Copied: haiku/trunk/src/add-ons/input_server/filters/screen_saver/ScreenSaverFilter.h (from rev 27885, haiku/trunk/src/add-ons/input_server/filters/screensaver/ScreenSaverFilter.h) From jackburton at mail.berlios.de Mon Oct 6 14:05:17 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 6 Oct 2008 14:05:17 +0200 Subject: [Haiku-commits] r27887 - in haiku/trunk/src/add-ons/kernel/drivers/network: . rtl81xx rtl81xx/pci Message-ID: <200810061205.m96C5HWe031612@sheep.berlios.de> Author: jackburton Date: 2008-10-06 14:05:14 +0200 (Mon, 06 Oct 2008) New Revision: 27887 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27887&view=rev Added: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/ Removed: haiku/trunk/src/add-ons/kernel/drivers/network/re/ Modified: haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/Jamfile haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/Jamfile haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/if_re.c Log: renamed 're' driver to rtl81xx. I hope it's clear enough. If not, just shout. Also disabled the ids for cards already supported by the native rtl8169 driver Modified: haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile 2008-10-06 09:46:06 UTC (rev 27886) +++ haiku/trunk/src/add-ons/kernel/drivers/network/Jamfile 2008-10-06 12:05:14 UTC (rev 27887) @@ -21,7 +21,7 @@ SubInclude HAIKU_TOP src add-ons kernel drivers network pcnet ; SubInclude HAIKU_TOP src add-ons kernel drivers network syskonnect ; SubInclude HAIKU_TOP src add-ons kernel drivers network attansic_l2 ; -SubInclude HAIKU_TOP src add-ons kernel drivers network re ; +SubInclude HAIKU_TOP src add-ons kernel drivers network rtl81xx ; SubIncludeGPL HAIKU_TOP src add-ons kernel drivers network bcm440x ; SubIncludeGPL HAIKU_TOP src add-ons kernel drivers network bcm570x ; Copied: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx (from rev 27883, haiku/trunk/src/add-ons/kernel/drivers/network/re) Property changes on: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx ___________________________________________________________________ Name: svn:mergeinfo + Modified: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/Jamfile 2008-10-05 22:44:33 UTC (rev 27883) +++ haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/Jamfile 2008-10-06 12:05:14 UTC (rev 27887) @@ -1,3 +1,3 @@ -SubDir HAIKU_TOP src add-ons kernel drivers network re ; +SubDir HAIKU_TOP src add-ons kernel drivers network rtl81xx ; -SubInclude HAIKU_TOP src add-ons kernel drivers network re pci ; +SubInclude HAIKU_TOP src add-ons kernel drivers network rtl81xx pci ; Modified: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/Jamfile 2008-10-05 22:44:33 UTC (rev 27883) +++ haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/Jamfile 2008-10-06 12:05:14 UTC (rev 27887) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons kernel drivers network re pci ; +SubDir HAIKU_TOP src add-ons kernel drivers network rtl81xx pci ; UsePrivateHeaders kernel net ; @@ -8,7 +8,7 @@ SubDirCcFlags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ] ; -KernelAddon re : +KernelAddon rtl81xx : if_re.c glue.c : libfreebsd_network.a rtl8139_mii.a Modified: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/if_re.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/network/re/pci/if_re.c 2008-10-05 22:44:33 UTC (rev 27883) +++ haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/if_re.c 2008-10-06 12:05:14 UTC (rev 27887) @@ -167,17 +167,17 @@ static struct rl_type re_devs[] = { { DLINK_VENDORID, DLINK_DEVICEID_528T, 0, "D-Link DGE-528(T) Gigabit Ethernet Adapter" }, - { RT_VENDORID, RT_DEVICEID_8139, 0, - "RealTek 8139C+ 10/100BaseTX" }, + /*{ RT_VENDORID, RT_DEVICEID_8139, 0, + "RealTek 8139C+ 10/100BaseTX" },*/ { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, - { RT_VENDORID, RT_DEVICEID_8168, 0, + /*{ RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe " "Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, - "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" }, + "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" },*/ { COREGA_VENDORID, COREGA_DEVICEID_CGLAPCIGT, 0, "Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet" }, { LINKSYS_VENDORID, LINKSYS_DEVICEID_EG1032, 0, From jackburton at mail.berlios.de Mon Oct 6 14:07:13 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 6 Oct 2008 14:07:13 +0200 Subject: [Haiku-commits] r27888 - haiku/trunk/build/jam Message-ID: <200810061207.m96C7DNp031706@sheep.berlios.de> Author: jackburton Date: 2008-10-06 14:07:11 +0200 (Mon, 06 Oct 2008) New Revision: 27888 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27888&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: Added the rtl81xx driver to the image, at least for now. The problems I'm having seems not to be reproducible on other systems. Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-06 12:05:14 UTC (rev 27887) +++ haiku/trunk/build/jam/HaikuImage 2008-10-06 12:07:11 UTC (rev 27888) @@ -131,9 +131,9 @@ ; BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ; BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com etherpci $(X86_ONLY)ipro1000 - $(X86_ONLY)rtl8139 rtl8169 sis900 $(X86_ONLY)via_rhine wb840 - $(X86_ONLY)ipro100 $(X86_ONLY)nforce #vlance - $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm + $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 + $(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce + #vlance $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm $(GPL_ONLY)bcm440x $(GPL_ONLY)bcm570x ; #BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; From jackburton at mail.berlios.de Mon Oct 6 14:09:11 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 6 Oct 2008 14:09:11 +0200 Subject: [Haiku-commits] r27889 - haiku/trunk/build/jam Message-ID: <200810061209.m96C9BFE031945@sheep.berlios.de> Author: jackburton Date: 2008-10-06 14:09:09 +0200 (Mon, 06 Oct 2008) New Revision: 27889 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27889&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: With last commit, I accidentally removed a couple of network drivers from inclusion in the image. Sorry Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-06 12:07:11 UTC (rev 27888) +++ haiku/trunk/build/jam/HaikuImage 2008-10-06 12:09:09 UTC (rev 27889) @@ -133,7 +133,8 @@ BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com etherpci $(X86_ONLY)ipro1000 $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 $(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce - #vlance $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm + #vlance + $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm $(GPL_ONLY)bcm440x $(GPL_ONLY)bcm570x ; #BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; From revol at free.fr Mon Oct 6 15:19:22 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 15:19:22 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27866_-_in_haiku/trunk=3A_data/?= =?windows-1252?q?artwork/icons_src/apps/bsnow?= In-Reply-To: <200810041700.m94H0lx2019273@sheep.berlios.de> Message-ID: <2309157416-BeMail@laptop> > Author: stippi > Date: 2008-10-04 19:00:42 +0200 (Sat, 04 Oct 2008) > New Revision: 27866 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27866&view=rev > > Modified: > haiku/trunk/data/artwork/icons/App_BSnow > haiku/trunk/src/apps/bsnow/BSnow.rdef > Log: > New BSnow icon by zuMi. Thanks a lot! :-) Wow, very nice one! Now I need to fix the app ;) Fran?ois. From revol at free.fr Mon Oct 6 15:26:47 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 15:26:47 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27868_-_in_haiku/trunk=3A_build?= =?windows-1252?q?/jam_data/common/boot/post=5Finstall?= In-Reply-To: <200810041828.m94ISJLt018461@sheep.berlios.de> Message-ID: <2754910662-BeMail@laptop> > Author: stippi > Date: 2008-10-04 20:28:15 +0200 (Sat, 04 Oct 2008) > New Revision: 27868 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27868&view=rev > > Modified: > haiku/trunk/build/jam/OptionalPackages > haiku/trunk/data/common/boot/post_install/mime_update.sh > Log: > Added optional package "Welcome". The welcome package documation is > copied to /boot/beos/documetation/welcome and a link to welcome.html > is placed on the Desktop. The mime_update.sh script makes sure that > the mime type of the html files is set. However, Firefox has a > problem > when it is launched for the first time via double clicking an HTML NetSurf shouldn't have this problem ;) I fixed some bugs and it's getting usable now, at least to browse docs... Some comments though: - missing tracker-images/open-with-preferred.png - in the blue header with logo:

->

(removes the padding that makes it look too thick in NetSurf) - use lowercase for html! - missing "" around tag args (width=), not strictly needed but it's saner - workshop page: text doesn't wrap due to missing
in tables. > Modified: haiku/trunk/build/jam/OptionalPackages I should add NetSurf as optional package I suppose... And maybe remove links? Fran?ois. From mmu_man at mail.berlios.de Mon Oct 6 15:24:41 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 6 Oct 2008 15:24:41 +0200 Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam Message-ID: <200810061324.m96DOfcJ007374@sheep.berlios.de> Author: mmu_man Date: 2008-10-06 15:24:40 +0200 (Mon, 06 Oct 2008) New Revision: 27890 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27890&view=rev Modified: haiku/trunk/build/jam/OptionalPackages Log: Add NetSurf as optional package. Modified: haiku/trunk/build/jam/OptionalPackages =================================================================== --- haiku/trunk/build/jam/OptionalPackages 2008-10-06 12:09:09 UTC (rev 27889) +++ haiku/trunk/build/jam/OptionalPackages 2008-10-06 13:24:40 UTC (rev 27890) @@ -20,6 +20,7 @@ # Development # Firefox # Links +# NetSurf # OpenSound # OpenSSL # Pe @@ -35,6 +36,7 @@ # package dependencies OptionalPackageDependencies APR-util : APR ; OptionalPackageDependencies Development : Perl ; +OptionalPackageDependencies NetSurf : OpenSSL ; OptionalPackageDependencies OpenSSH : OpenSSL ; OptionalPackageDependencies Subversion : OpenSSL ; @@ -273,6 +275,23 @@ } +# NetSurf web browser +if [ IsOptionalHaikuImagePackageAdded NetSurf ] { + if $(TARGET_ARCH) != x86 { + Echo "No optional package NetSurf available for $(TARGET_ARCH)" ; + } else if $(HAIKU_GCC_VERSION[1]) >= 4 && $(isHybridBuild) = 0 { + Echo "No optional package NetSurf available for gcc4" ; + } else { + InstallOptionalHaikuImagePackage NetSurf + : http://revolf.free.fr/beos/netsurf-bone.zip + : + ; + AddSymlinkToHaikuImage home config be Applications + : /boot/apps/netsurf/NetSurf ; + } +} + + # OpenSound drivers if [ IsOptionalHaikuImagePackageAdded OpenSound ] { if $(TARGET_ARCH) != x86 { From stefano.ceccherini at gmail.com Mon Oct 6 15:38:56 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Mon, 6 Oct 2008 15:38:56 +0200 Subject: [Haiku-commits] r27866 - in haiku/trunk: data/artwork/icons src/apps/bsnow In-Reply-To: <2309157416-BeMail@laptop> References: <200810041700.m94H0lx2019273@sheep.berlios.de> <2309157416-BeMail@laptop> Message-ID: <894b9700810060638h4fc9e902j4feadf37af37ab35@mail.gmail.com> 2008/10/6 Fran?ois Revol : > Wow, very nice one! > Now I need to fix the app ;) You could start from ticket #1897 :) From stefano.ceccherini at gmail.com Mon Oct 6 15:40:36 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Mon, 6 Oct 2008 15:40:36 +0200 Subject: [Haiku-commits] r27868 - in haiku/trunk: build/jam data/common/boot/post_install In-Reply-To: <2754910662-BeMail@laptop> References: <200810041828.m94ISJLt018461@sheep.berlios.de> <2754910662-BeMail@laptop> Message-ID: <894b9700810060640u4c4c86bfjf4f155dcc3a8adc@mail.gmail.com> 2008/10/6 Fran?ois Revol : > I should add NetSurf as optional package I suppose... > And maybe remove links? +1 At least for html help/welcome package I'd prefer something small and fast. Firefox takes too much time to start. From revol at free.fr Mon Oct 6 15:50:42 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 15:50:42 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27866_-_in_haiku/trunk=3A_data/?= =?windows-1252?q?artwork/icons_src/apps/bsnow?= In-Reply-To: <894b9700810060638h4fc9e902j4feadf37af37ab35@mail.gmail.com> Message-ID: <4189513806-BeMail@laptop> > 2008/10/6 Fran?ois Revol : > > > Wow, very nice one! > > Now I need to fix the app ;) > > You could start from ticket #1897 :) It might actually be fixed now, didn't check, but I recall seeing someone fixing BShelf stuff. Fran?ois. From stefano.ceccherini at gmail.com Mon Oct 6 15:59:53 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Mon, 6 Oct 2008 15:59:53 +0200 Subject: [Haiku-commits] r27866 - in haiku/trunk: data/artwork/icons src/apps/bsnow In-Reply-To: <4189513806-BeMail@laptop> References: <894b9700810060638h4fc9e902j4feadf37af37ab35@mail.gmail.com> <4189513806-BeMail@laptop> Message-ID: <894b9700810060659i929acb8l15090113dab1517d@mail.gmail.com> 2008/10/6 Fran?ois Revol : >> 2008/10/6 Fran?ois Revol : >> >> > Wow, very nice one! >> > Now I need to fix the app ;) >> >> You could start from ticket #1897 :) > > It might actually be fixed now, didn't check, but I recall seeing > someone fixing BShelf stuff. > Still with us. From jackburton at mail.berlios.de Mon Oct 6 16:12:27 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 6 Oct 2008 16:12:27 +0200 Subject: [Haiku-commits] r27891 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810061412.m96ECRIZ012536@sheep.berlios.de> Author: jackburton Date: 2008-10-06 16:12:26 +0200 (Mon, 06 Oct 2008) New Revision: 27891 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27891&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: added some debug output Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-06 13:24:40 UTC (rev 27890) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-06 14:12:26 UTC (rev 27891) @@ -32,14 +32,13 @@ hid[8] = '\0'; tabs[0] = '\0'; - for (i = 0; i < indenting; i++) { sprintf(tabs, "%s| ", tabs); } sprintf(tabs, "%s|--- ", tabs); depth = sizeof(char) * 5 * indenting + sizeof(char); // index into result where the device name will be. - dprintf("acpi_ns_dump: recursing from %s\n", root); + dprintf("acpi_ns_dump: recursing from %s, depth %d\n", root, depth); while (device->acpi->get_next_entry(ACPI_TYPE_ANY, root, result, 255, &counter) == B_OK) { type = device->acpi->get_object_type(result); sprintf(output, "%s%s", tabs, result + depth); @@ -124,7 +123,8 @@ { acpi_ns_device_info *device = (acpi_ns_device_info *)_cookie; size_t bytes = 0; - + dprintf("acpi_namespace_read(cookie: %p, position: %ld, buffer: %p, size: %ld)\n", + _cookie, position, buf, *num_bytes); if (position == 0) { // First read dump_acpi_namespace(device, "\\", buf, &bytes, 0); if (bytes <= *num_bytes) { From superstippi at gmx.de Mon Oct 6 19:16:56 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Mon, 06 Oct 2008 19:16:56 +0200 Subject: [Haiku-commits] r27868 - in haiku/trunk: build/jam data/common/boot/post_install In-Reply-To: <894b9700810060640u4c4c86bfjf4f155dcc3a8adc@mail.gmail.com> References: <200810041828.m94ISJLt018461@sheep.berlios.de> <2754910662-BeMail@laptop> <894b9700810060640u4c4c86bfjf4f155dcc3a8adc@mail.gmail.com> Message-ID: <20081006191656.10054.1@stippis2.1223282767.fake> Stefano Ceccherini wrote: > 2008/10/6 Fran?ois Revol : > > > I should add NetSurf as optional package I suppose... And maybe remove > > links? > > +1 > At least for html help/welcome package I'd prefer something small and > fast. Firefox takes too much time to start. +1. Please do so. Best regards, -Stephan From Info.Be-Hold at inter.nl.net Mon Oct 6 19:27:09 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Mon, 6 Oct 2008 19:27:09 +0200 (CEST) Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter In-Reply-To: <1447511985-BeMail@zon> References: <200810060651.m966pNE0003336@sheep.berlios.de> <1447511985-BeMail@zon> Message-ID: <40629.85.223.98.72.1223314029.squirrel@webmail.inter.nl.net> Hi again, I'll add a comment in the sourcecode on these places then. I.ve got a Marvell 88SE6111 PATA/SATA controller with one ultra DMA 100/133 connector, and one external SATA3.0 Gb/s port (sata on the go) (at least the manual says so. I'll doublecheck the mainboard to see if I can locate it) How so??? And: I can imagine the non-functioning DMA has the same source of trouble since I get a buffer underrun (buffer filled at half speed since every 32bit transfer only delivers 16bit of data??, seeing this is the case with the PIO trouble over here...) ??? BTW The seperate Promise Ultra133tx2 board still doesn't boot, but its another error as even with the fix it says it can't find a bootvolume (it seems it doesn't detect the drive at all from the syslog) Controller: PDC20269, V2.20.0.15 firmware onboard: a standard PCI device with two PATA ports. BTW I wholeheartedly agree that the busmanagers should automatically fallback to 16 bit PIO mode if 32bit mode fails. I guess one could even try with and without int handling (though that's perfectly OK here after all as we know now.) thanks for the comments! Rudolf. Op Ma, 6 oktober, 2008 9:26 am schreef Axel D??rfler: > rudolfc at mail.berlios.de wrote: >> Log: >> forcing 16bit pio writes, disabling 32bit pio writes. This was already >> the case for read pio ever since this driver got imported. This fixes >> booting from IDE drives in PIO mode with both the IDE and ATA >> busmanagers, at least on my ASUS P5E3 mainboard. If I am stepping out of >> bounds here please correct and let me know.. > > As a temporary fix, this is definitely okay (a comment would have been > nice, too, also in the read case). But it should actually be handled > differently; the controller should decide whether or not to force 16 bit. > I guess that's just one more thing to change in the ATA bus > manager. > > Judging from the FreeBSD sources, is it possible that you have either a > Marvell, Netcell, or Promise IDE controller on your board? > > > Bye, > Axel. > > > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From Info.Be-Hold at inter.nl.net Mon Oct 6 19:30:35 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Mon, 6 Oct 2008 19:30:35 +0200 (CEST) Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter In-Reply-To: <19322719.1223281208645.JavaMail.ngmail@webmail10.arcor-online.net> References: <1447511985-BeMail@zon> <19322719.1223281208645.JavaMail.ngmail@webmail10.arcor-online.net> Message-ID: <40688.85.223.98.72.1223314235.squirrel@webmail.inter.nl.net> Hi here Marcus, OK, I'll open a ticket soon. But how should it be called? I mean, where lies the fault? we have non-completed busmagers in the sense of the 32-to-16-flagged fallback; but also an error in the PCI busmanager or driver? Or ATA adapter after all? Thanks for responding guys! Rudolf. Op Ma, 6 oktober, 2008 10:20 am schreef Marcus Overhagen: > Axel D?rfler wrote: > > >> rudolfc at mail.berlios.de wrote: > [...] > > >> nice, too, also in the read case). But it should actually be handled >> differently; the controller should decide whether or not to force 16 > Yes, we should have a flag, either to use 32 bit or force 16 bit. > > > >> Judging from the FreeBSD sources, is it possible that you have either a >> Marvell, Netcell, or Promise IDE controller on your board? >> > > Rudolf, *PLEASE* open a bug report ticket and attach a syslog file! > > > regards Marcus > > > Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr > Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und > optional 60 Pay TV Sender, einen elektronischen Programmf?hrer mit Movie > Star Bewertungen von TV Movie. Au?erdem, aktuelle Filmhits und spannende > Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From superstippi at gmx.de Mon Oct 6 19:37:08 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Mon, 06 Oct 2008 19:37:08 +0200 Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam In-Reply-To: <200810061324.m96DOfcJ007374@sheep.berlios.de> References: <200810061324.m96DOfcJ007374@sheep.berlios.de> Message-ID: <20081006193708.10299.2@stippis2.1223282767.fake> Hi, > +# NetSurf web browser > +if [ IsOptionalHaikuImagePackageAdded NetSurf ] { > + if $(TARGET_ARCH) != x86 { > + Echo "No optional package NetSurf available for $(TARGET_ARCH)" ; > + } else if $(HAIKU_GCC_VERSION[1]) >= 4 && $(isHybridBuild) = 0 { > + Echo "No optional package NetSurf available for gcc4" ; > + } else { > + InstallOptionalHaikuImagePackage NetSurf > + : http://revolf.free.fr/beos/netsurf-bone.zip > + : > + ; > + AddSymlinkToHaikuImage home config be Applications > + : /boot/apps/netsurf/NetSurf ; > + } > +} Very nice, but we should put this on haiku-files.org. Seems like your server cannot handle the load. Best regards, -Stephan From Info.Be-Hold at inter.nl.net Mon Oct 6 20:38:37 2008 From: Info.Be-Hold at inter.nl.net (Info.Be-Hold at inter.nl.net) Date: Mon, 6 Oct 2008 20:38:37 +0200 (CEST) Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter In-Reply-To: <19322719.1223281208645.JavaMail.ngmail@webmail10.arcor-online.net> References: <1447511985-BeMail@zon> <19322719.1223281208645.JavaMail.ngmail@webmail10.arcor-online.net> Message-ID: <43194.85.223.98.72.1223318317.squirrel@webmail.inter.nl.net> Marcus, I created a ticket: http://dev.haiku-os.org/ticket/2804 Hope this is Ok. Bye! Rudolf. Op Ma, 6 oktober, 2008 10:20 am schreef Marcus Overhagen: > Axel D?rfler wrote: > > >> rudolfc at mail.berlios.de wrote: > [...] > > >> nice, too, also in the read case). But it should actually be handled >> differently; the controller should decide whether or not to force 16 > Yes, we should have a flag, either to use 32 bit or force 16 bit. > > > >> Judging from the FreeBSD sources, is it possible that you have either a >> Marvell, Netcell, or Promise IDE controller on your board? >> > > Rudolf, *PLEASE* open a bug report ticket and attach a syslog file! > > > regards Marcus > > > Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr > Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und > optional 60 Pay TV Sender, einen elektronischen Programmf?hrer mit Movie > Star Bewertungen von TV Movie. Au?erdem, aktuelle Filmhits und spannende > Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits > > From superstippi at gmx.de Mon Oct 6 20:39:49 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Mon, 06 Oct 2008 20:39:49 +0200 Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam In-Reply-To: <200810061324.m96DOfcJ007374@sheep.berlios.de> References: <200810061324.m96DOfcJ007374@sheep.berlios.de> Message-ID: <20081006203949.11898.3@stippis2.1223282767.fake> mmu_man at mail.berlios.de wrote: > Author: mmu_man > Date: 2008-10-06 15:24:40 +0200 (Mon, 06 Oct 2008) New Revision: 27890 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27890&view=rev > > Modified: > haiku/trunk/build/jam/OptionalPackages > Log: > Add NetSurf as optional package. Seems like NetSurf is currently not following the link on the Desktop correctly ("Welcome"). It doesn't detect HTML content and displays the page source. If the "welcome.html" is opened directly, then it renders fine. The page source has heavy display problems, while the HTML rendering seems to work ok. Best regards, -Stephan From julun at mail.berlios.de Mon Oct 6 21:51:17 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Mon, 6 Oct 2008 21:51:17 +0200 Subject: [Haiku-commits] r27892 - haiku/trunk/src/kits/support Message-ID: <200810061951.m96JpHO6015930@sheep.berlios.de> Author: julun Date: 2008-10-06 21:51:17 +0200 (Mon, 06 Oct 2008) New Revision: 27892 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27892&view=rev Modified: haiku/trunk/src/kits/support/List.cpp Log: * should have been part of r27883 Modified: haiku/trunk/src/kits/support/List.cpp =================================================================== --- haiku/trunk/src/kits/support/List.cpp 2008-10-06 14:12:26 UTC (rev 27891) +++ haiku/trunk/src/kits/support/List.cpp 2008-10-06 19:51:17 UTC (rev 27892) @@ -289,7 +289,6 @@ if (fromIndex < toIndex) { memmove(fObjectList + fromIndex, fObjectList + fromIndex + 1, (toIndex - fromIndex) * sizeof(void *)); - fObjectList[toIndex] = tmpMover; } else if (fromIndex > toIndex) { memmove(fObjectList + toIndex + 1, fObjectList + toIndex, (fromIndex - toIndex) * sizeof(void *)); From julun at mail.berlios.de Mon Oct 6 22:20:10 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Mon, 6 Oct 2008 22:20:10 +0200 Subject: [Haiku-commits] r27893 - haiku/trunk/src/apps/mediaplayer Message-ID: <200810062020.m96KKAlc020308@sheep.berlios.de> Author: julun Date: 2008-10-06 22:20:09 +0200 (Mon, 06 Oct 2008) New Revision: 27893 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27893&view=rev Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp Log: * cleanup Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 19:51:17 UTC (rev 27892) +++ haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 20:20:09 UTC (rev 27893) @@ -53,7 +53,7 @@ { // XXX: HACK HACK HACK // this works around a locking issue where gMainApp isn't set yet, - // while NewWindow() calls Show() which in the window thread calls + // while NewWindow() calls Show() which in the window thread calls // Controller::PlayerActivated() which calls gMainApp->PlayerCount() gMainApp = this; fFirstWindow = NewWindow(); @@ -102,7 +102,7 @@ void MainApp::ReadyToRun() { - // setup the settings window now, we need to have it + // setup the settings window now, we need to have it fSettingsWindow = new SettingsWindow(BRect(150, 150, 450, 520)); fSettingsWindow->Hide(); fSettingsWindow->Show(); @@ -122,7 +122,7 @@ void MainApp::RefsReceived(BMessage *msg) { - // The user dropped a file (or files) on this app's icon, + // The user dropped a file (or files) on this app's icon, // or double clicked a file that's handled by this app. // Command line arguments are also redirected to here by // ArgvReceived() but without MIME type check. @@ -131,7 +131,7 @@ // If IsLaunching() is true, we use fFirstWindow as first // window. printf("MainApp::RefsReceived\n"); - + entry_ref ref; for (int i = 0; B_OK == msg->FindRef("refs", i, &ref); i++) { BWindow *win; @@ -143,7 +143,7 @@ } -void +void MainApp::ArgvReceived(int32 argc, char **argv) { char cwd[B_PATH_NAME_LENGTH]; @@ -161,7 +161,7 @@ BEntry entry(path.Path(), true); if (!entry.Exists() || !entry.IsFile()) continue; - + entry_ref ref; if (B_OK == entry.GetRef(&ref)) m.AddRef("refs", &ref); @@ -174,7 +174,7 @@ } -void +void MainApp::MessageReceived(BMessage* message) { switch (message->what) { @@ -195,7 +195,7 @@ bool isAddonServer = strcmp(mimeSig, kMediaServerAddOnSig) == 0; if (!isMediaServer && !isAddonServer) break; - + bool running = (message->what == B_SOME_APP_LAUNCHED); if (isMediaServer) fMediaServerRunning = running; @@ -275,7 +275,7 @@ // #pragma mark - -int +int main() { EventQueue::CreateDefault(); From julun at mail.berlios.de Mon Oct 6 22:21:04 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Mon, 6 Oct 2008 22:21:04 +0200 Subject: [Haiku-commits] r27894 - haiku/trunk/src/apps/mediaplayer Message-ID: <200810062021.m96KL4lo020502@sheep.berlios.de> Author: julun Date: 2008-10-06 22:21:03 +0200 (Mon, 06 Oct 2008) New Revision: 27894 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27894&view=rev Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp Log: * correct comment, i've written a small test app and it works the same way on R5 Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 20:20:09 UTC (rev 27893) +++ haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 20:21:03 UTC (rev 27894) @@ -68,9 +68,8 @@ bool MainApp::QuitRequested() { - // TODO: When doing this in the destructor, the MainApp does not - // quit properly. Is this a Haiku bug? (SettingsWindow::QuitRequested() - // returns "false" always.) + // Note: This needs to be done here, SettingsWindow::QuitRequested() + // returns "false" always. if (fSettingsWindow && fSettingsWindow->Lock()) fSettingsWindow->Quit(); fSettingsWindow = NULL; From revol at free.fr Mon Oct 6 22:26:59 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:26:59 +0200 CEST Subject: [Haiku-commits] r27868 - in haiku/trunk: build/jam data/common/boot/post_install In-Reply-To: <20081006191656.10054.1@stippis2.1223282767.fake> Message-ID: <385046970-BeMail@laptop> > > > I should add NetSurf as optional package I suppose... And maybe > > > remove > > > links? > > > > +1 > > At least for html help/welcome package I'd prefer something small > > and > > fast. Firefox takes too much time to start. > > +1. Please do so. Done, but it seems there is still this annoying select() bug that makes it busy loop... It seems to be passing an invalid timeout maybe. Oddly it works fine in Zeta. Will investigate. When that's fixed it should be usable enough for that purpose. Fran?ois. From revol at free.fr Mon Oct 6 22:28:28 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:28:28 +0200 CEST Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam In-Reply-To: <20081006193708.10299.2@stippis2.1223282767.fake> Message-ID: <474358171-BeMail@laptop> > Very nice, but we should put this on haiku-files.org. Seems like your > server cannot handle the load. I've had reports from ppl outside france who got horrible speed, that's weird as it's a quite big ISP here... feel free to make a copy. Fran?ois. From revol at free.fr Mon Oct 6 22:32:05 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:32:05 +0200 CEST Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam In-Reply-To: <20081006203949.11898.3@stippis2.1223282767.fake> Message-ID: <691202274-BeMail@laptop> > > mmu_man at mail.berlios.de wrote: > > Author: mmu_man > > Date: 2008-10-06 15:24:40 +0200 (Mon, 06 Oct 2008) New Revision: > > 27890 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27890&view=rev > > > > Modified: > > haiku/trunk/build/jam/OptionalPackages > > Log: > > Add NetSurf as optional package. > > Seems like NetSurf is currently not following the link on the Desktop > correctly ("Welcome"). It doesn't detect HTML content and displays > the page > source. If the "welcome.html" is opened directly, then it renders > fine. The > page source has heavy display problems, while the HTML rendering > seems to > work ok. Hmm it probably relies on the extention somewhere... will check that. Fran?ois. From revol at free.fr Mon Oct 6 22:33:52 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:33:52 +0200 CEST Subject: [Haiku-commits] r27893 - haiku/trunk/src/apps/mediaplayer In-Reply-To: <200810062020.m96KKAlc020308@sheep.berlios.de> Message-ID: <798286698-BeMail@laptop> > @@ -53,7 +53,7 @@ > { > // XXX: HACK HACK HACK > // this works around a locking issue where gMainApp isn't set yet, > - // while NewWindow() calls Show() which in the window thread calls > + // while NewWindow() calls Show() which in the window thread calls > // Controller::PlayerActivated() which calls gMainApp-> > PlayerCount() > gMainApp = this; Reminds me I have a better fix pending... Fran?ois From revol at free.fr Mon Oct 6 22:39:16 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:39:16 +0200 CEST Subject: [Haiku-commits] r27893 - haiku/trunk/src/apps/mediaplayer In-Reply-To: <798286698-BeMail@laptop> Message-ID: <1122947307-BeMail@laptop> > > @@ -53,7 +53,7 @@ > > { > > // XXX: HACK HACK HACK > > // this works around a locking issue where gMainApp isn't set > > yet, > > - // while NewWindow() calls Show() which in the window thread > > calls > > + // while NewWindow() calls Show() which in the window thread > > calls > > // Controller::PlayerActivated() which calls gMainApp-> > > PlayerCount() > > gMainApp = this; > > Reminds me I have a better fix pending... And of course now I must fix the conflicts :D I should really need to get MC97 support in OSS to be able to commit from dialup :D Fran?ois. From host.haiku at gmx.de Mon Oct 6 22:46:22 2008 From: host.haiku at gmx.de (julun) Date: Mon, 06 Oct 2008 22:46:22 +0200 Subject: [Haiku-commits] r27893 - haiku/trunk/src/apps/mediaplayer In-Reply-To: <1122947307-BeMail@laptop> References: <1122947307-BeMail@laptop> Message-ID: <48EA791E.1020606@gmx.de> Fran?ois Revol schrieb: >>> @@ -53,7 +53,7 @@ >>> { >>> // XXX: HACK HACK HACK >>> // this works around a locking issue where gMainApp isn't set >>> yet, >>> - // while NewWindow() calls Show() which in the window thread >>> calls >>> + // while NewWindow() calls Show() which in the window thread >>> calls >>> // Controller::PlayerActivated() which calls gMainApp-> >>> PlayerCount() >>> gMainApp = this; >> Reminds me I have a better fix pending... > > And of course now I must fix the conflicts :D maybe you should push earlier? :) Karsten From revol at free.fr Mon Oct 6 22:51:20 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 22:51:20 +0200 CEST Subject: [Haiku-commits] r27893 - haiku/trunk/src/apps/mediaplayer In-Reply-To: <48EA791E.1020606@gmx.de> Message-ID: <1846452558-BeMail@laptop> > Fran?ois Revol schrieb: > >>> @@ -53,7 +53,7 @@ > >>> { > >>> // XXX: HACK HACK HACK > >>> // this works around a locking issue where gMainApp isn't set > >>> yet, > >>> - // while NewWindow() calls Show() which in the window thread > >>> calls > >>> + // while NewWindow() calls Show() which in the window thread > >>> calls > >>> // Controller::PlayerActivated() which calls gMainApp-> > >>> PlayerCount() > >>> gMainApp = this; > >> Reminds me I have a better fix pending... > > > > And of course now I must fix the conflicts :D > > maybe you should push earlier? :) I did that this week end at my parent's home, without DSL... Fran?ois. From mmu_man at mail.berlios.de Mon Oct 6 22:52:20 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Mon, 6 Oct 2008 22:52:20 +0200 Subject: [Haiku-commits] r27895 - haiku/trunk/src/apps/mediaplayer Message-ID: <200810062052.m96KqKYo024544@sheep.berlios.de> Author: mmu_man Date: 2008-10-06 22:52:19 +0200 (Mon, 06 Oct 2008) New Revision: 27895 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27895&view=rev Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp haiku/trunk/src/apps/mediaplayer/MainApp.h Log: Fix the gMainApp race on launch in a cleaner way. Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 20:21:03 UTC (rev 27894) +++ haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-06 20:52:19 UTC (rev 27895) @@ -51,12 +51,6 @@ fMediaServerRunning(false), fMediaAddOnServerRunning(false) { - // XXX: HACK HACK HACK - // this works around a locking issue where gMainApp isn't set yet, - // while NewWindow() calls Show() which in the window thread calls - // Controller::PlayerActivated() which calls gMainApp->PlayerCount() - gMainApp = this; - fFirstWindow = NewWindow(); } @@ -79,11 +73,25 @@ BWindow* +MainApp::FirstWindow() +{ + BAutolock _(this); + if (fFirstWindow) + return fFirstWindow; + return NewWindow(); +} + + +BWindow* MainApp::NewWindow() { + BWindow* win; BAutolock _(this); fPlayerCount++; - return new MainWin(); + win = new MainWin(); + if (!fFirstWindow) + fFirstWindow = win; + return win; } @@ -101,6 +109,9 @@ void MainApp::ReadyToRun() { + // make sure we have at least one window open + FirstWindow(); + // setup the settings window now, we need to have it fSettingsWindow = new SettingsWindow(BRect(150, 150, 450, 520)); fSettingsWindow->Hide(); @@ -134,7 +145,7 @@ entry_ref ref; for (int i = 0; B_OK == msg->FindRef("refs", i, &ref); i++) { BWindow *win; - win = (i == 0 && IsLaunching()) ? fFirstWindow : NewWindow(); + win = NewWindow(); BMessage m(B_REFS_RECEIVED); m.AddRef("refs", &ref); win->PostMessage(&m); @@ -244,7 +255,7 @@ void MainApp::AboutRequested() { - fFirstWindow->PostMessage(B_ABOUT_REQUESTED); + FirstWindow()->PostMessage(B_ABOUT_REQUESTED); } Modified: haiku/trunk/src/apps/mediaplayer/MainApp.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.h 2008-10-06 20:21:03 UTC (rev 27894) +++ haiku/trunk/src/apps/mediaplayer/MainApp.h 2008-10-06 20:52:19 UTC (rev 27895) @@ -39,6 +39,7 @@ MainApp(); virtual ~MainApp(); + BWindow* FirstWindow(); BWindow* NewWindow(); int32 PlayerCount() const; From axeld at pinc-software.de Mon Oct 6 22:54:51 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Mon, 06 Oct 2008 22:54:51 +0200 CEST Subject: [Haiku-commits] r27884 - haiku/trunk/src/add-ons/kernel/generic/ide_adapter In-Reply-To: <43194.85.223.98.72.1223318317.squirrel@webmail.inter.nl.net> Message-ID: <49935686334-BeMail@zon> Info.Be-Hold at inter.nl.net wrote: > I created a ticket: > http://dev.haiku-os.org/ticket/2804 > Hope this is Ok. Sure, it's just there so that we don't forget in our advanced age... :- ) Bye, Axel. From revol at free.fr Mon Oct 6 23:02:00 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Mon, 06 Oct 2008 23:02:00 +0200 CEST Subject: [Haiku-commits] r27890 - haiku/trunk/build/jam In-Reply-To: <20081006203949.11898.3@stippis2.1223282767.fake> Message-ID: <2486910577-BeMail@laptop> > > mmu_man at mail.berlios.de wrote: > > Author: mmu_man > > Date: 2008-10-06 15:24:40 +0200 (Mon, 06 Oct 2008) New Revision: > > 27890 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27890&view=rev > > > > Modified: > > haiku/trunk/build/jam/OptionalPackages > > Log: > > Add NetSurf as optional package. > > Seems like NetSurf is currently not following the link on the Desktop > correctly ("Welcome"). It doesn't detect HTML content and displays > the page > source. If the "welcome.html" is opened directly, then it renders > fine. The > page source has heavy display problems, while the HTML rendering > seems to > work ok. Ah, I found why. Easy fixed by checking the mime attribute from fetch_filetype() in http://source.netsurf-browser.org/trunk/netsurf/beos/beos_filetype.cpp?view=markup Fran?ois. From axeld at mail.berlios.de Mon Oct 6 23:03:59 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 6 Oct 2008 23:03:59 +0200 Subject: [Haiku-commits] r27896 - haiku/trunk/src/system/runtime_loader Message-ID: <200810062103.m96L3xga025778@sheep.berlios.de> Author: axeld Date: 2008-10-06 23:03:58 +0200 (Mon, 06 Oct 2008) New Revision: 27896 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27896&view=rev Modified: haiku/trunk/src/system/runtime_loader/elf.cpp Log: Applied patch by Romain, thanks!: * get_nth_symbol() did not correctly iterate over the symbol hash, causing it to return the same symbols more than once, and omit others. Modified: haiku/trunk/src/system/runtime_loader/elf.cpp =================================================================== --- haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-06 20:52:19 UTC (rev 27895) +++ haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-06 21:03:58 UTC (rev 27896) @@ -1835,7 +1835,7 @@ // iterate through all the hash buckets until we've found the one for (i = 0; i < HASHTABSIZE(image); i++) { for (j = HASHBUCKETS(image)[i]; j != STN_UNDEF; j = HASHCHAINS(image)[j]) { - struct Elf32_Sym *symbol = &image->syms[i]; + struct Elf32_Sym *symbol = &image->syms[j]; if (count == num) { strlcpy(nameBuffer, SYMNAME(image, symbol), *_nameLength); From ingo_weinhold at gmx.de Tue Oct 7 00:23:17 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Tue, 07 Oct 2008 00:23:17 +0200 Subject: [Haiku-commits] r27896 - haiku/trunk/src/system/runtime_loader In-Reply-To: <200810062103.m96L3xga025778@sheep.berlios.de> References: <200810062103.m96L3xga025778@sheep.berlios.de> Message-ID: <20081007002317.466.2@knochen-vm.localdomain> On 2008-10-06 at 23:03:59 [+0200], axeld at BerliOS wrote: > Author: axeld > Date: 2008-10-06 23:03:58 +0200 (Mon, 06 Oct 2008) > New Revision: 27896 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27896&view=rev > > Modified: > haiku/trunk/src/system/runtime_loader/elf.cpp > Log: > Applied patch by Romain, thanks!: > * get_nth_symbol() did not correctly iterate over the symbol hash, causing > it > to return the same symbols more than once, and omit others. BTW, there's no reason to iterate through the hash table in the first place. One can directly iterate through the symbol table (cf. src/kits/debug/SymbolLookup.cpp: SymbolLookup::NextSymbol()). Performance-wise the get_nth_image_symbol() API sucks in either case. We should probably introduce a get_next_image_symbol() that can be implemented efficiently. CU, Ingo From bonefish at mail.berlios.de Tue Oct 7 01:00:23 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Tue, 7 Oct 2008 01:00:23 +0200 Subject: [Haiku-commits] r27897 - haiku/trunk/src/system/kernel Message-ID: <200810062300.m96N0NYX000219@sheep.berlios.de> Author: bonefish Date: 2008-10-07 01:00:17 +0200 (Tue, 07 Oct 2008) New Revision: 27897 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27897&view=rev Modified: haiku/trunk/src/system/kernel/thread.cpp Log: When a thread times out on a locking primitive, reschedule only, if the timed out thread has a higher priority than the currently running one. Maybe we should even restrict this behavior to realtime threads. Modified: haiku/trunk/src/system/kernel/thread.cpp =================================================================== --- haiku/trunk/src/system/kernel/thread.cpp 2008-10-06 21:03:58 UTC (rev 27896) +++ haiku/trunk/src/system/kernel/thread.cpp 2008-10-06 23:00:17 UTC (rev 27897) @@ -2186,8 +2186,14 @@ // easy. struct thread* thread = (struct thread*)timer->user_data; - if (thread_unblock_locked(thread, B_TIMED_OUT)) - return B_INVOKE_SCHEDULER; + if (thread_unblock_locked(thread, B_TIMED_OUT)) { + // We actually woke up the thread. If it has a higher priority than the + // currently running thread, we invoke the scheduler. + // TODO: Is this really such a good idea or should we do that only when + // the woken up thread has realtime priority? + if (thread->priority > thread_get_current_thread()->priority) + return B_INVOKE_SCHEDULER; + } return B_HANDLED_INTERRUPT; } From jackburton at mail.berlios.de Tue Oct 7 07:48:00 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Tue, 7 Oct 2008 07:48:00 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app Message-ID: <200810070548.m975m020032745@sheep.berlios.de> Author: jackburton Date: 2008-10-07 07:47:57 +0200 (Tue, 07 Oct 2008) New Revision: 27898 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27898&view=rev Modified: haiku/trunk/src/servers/app/Screen.cpp Log: Screen was assuming setting a 800x600 mode would work anyway, but currently the Intel driver only supports the 'native' mode for laptop panels. Added a 'strict' parameter to SetBestMode which, if true, fails if it doesn't find any mode with the passed width. If false, and can't find any good mode, just uses the first mode in the list (could be improved). This fixes bug #2350 Modified: haiku/trunk/src/servers/app/Screen.cpp =================================================================== --- haiku/trunk/src/servers/app/Screen.cpp 2008-10-06 23:00:17 UTC (rev 27897) +++ haiku/trunk/src/servers/app/Screen.cpp 2008-10-07 05:47:57 UTC (rev 27898) @@ -124,7 +124,7 @@ status_t Screen::SetBestMode(uint16 width, uint16 height, uint32 colorSpace, - float frequency) + float frequency, bool strict) { // search for a matching mode display_mode* modes = NULL; @@ -138,9 +138,14 @@ int32 index = _FindBestMode(modes, count, width, height, colorSpace, frequency); if (index < 0) { - debug_printf("Finding best mode failed"); - delete[] modes; - return B_ERROR; + if (strict) { + debug_printf("Finding best mode failed"); + delete[] modes; + return B_ERROR; + } else { + index = 0; + // Just use the first mode in the list + } } display_mode mode = modes[index]; From jackburton at mail.berlios.de Tue Oct 7 07:51:11 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Tue, 7 Oct 2008 07:51:11 +0200 Subject: [Haiku-commits] r27899 - haiku/trunk/src/servers/app Message-ID: <200810070551.m975pBoH006823@sheep.berlios.de> Author: jackburton Date: 2008-10-07 07:51:09 +0200 (Tue, 07 Oct 2008) New Revision: 27899 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27899&view=rev Modified: haiku/trunk/src/servers/app/Screen.h Log: should've been part of r27898 Modified: haiku/trunk/src/servers/app/Screen.h =================================================================== --- haiku/trunk/src/servers/app/Screen.h 2008-10-07 05:47:57 UTC (rev 27898) +++ haiku/trunk/src/servers/app/Screen.h 2008-10-07 05:51:09 UTC (rev 27899) @@ -39,7 +39,8 @@ bool makeDefault); status_t SetPreferredMode(); status_t SetBestMode(uint16 width, uint16 height, - uint32 colorspace, float frequency); + uint32 colorspace, float frequency, + bool strict = true); void GetMode(display_mode* mode) const; void GetMode(uint16 &width, uint16 &height, From jackburton at mail.berlios.de Tue Oct 7 09:49:38 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Tue, 7 Oct 2008 09:49:38 +0200 Subject: [Haiku-commits] r27900 - haiku/trunk/src/kits/opengl/glut Message-ID: <200810070749.m977ncEB023145@sheep.berlios.de> Author: jackburton Date: 2008-10-07 09:49:36 +0200 (Tue, 07 Oct 2008) New Revision: 27900 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27900&view=rev Modified: haiku/trunk/src/kits/opengl/glut/glutWindow.cpp Log: check for NULL in advance (CID 1056) Modified: haiku/trunk/src/kits/opengl/glut/glutWindow.cpp =================================================================== --- haiku/trunk/src/kits/opengl/glut/glutWindow.cpp 2008-10-07 05:51:09 UTC (rev 27899) +++ haiku/trunk/src/kits/opengl/glut/glutWindow.cpp 2008-10-07 07:49:36 UTC (rev 27900) @@ -580,8 +580,11 @@ } void GlutBWindow::DirectConnected( direct_buffer_info *info ) { + if (!bgl) + return; + bgl->DirectConnected(info); - if(bgl && !fConnectionDisabled) { + if(!fConnectionDisabled) { bgl->EnableDirectMode(true); } int newVisState; From axeld at pinc-software.de Tue Oct 7 09:51:45 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Tue, 07 Oct 2008 09:51:45 +0200 CEST Subject: [Haiku-commits] r27896 - haiku/trunk/src/system/runtime_loader In-Reply-To: <20081007002317.466.2@knochen-vm.localdomain> Message-ID: <4749116560-BeMail@zon> Ingo Weinhold wrote: > BTW, there's no reason to iterate through the hash table in the first > place. > One can directly iterate through the symbol table (cf. > src/kits/debug/SymbolLookup.cpp: SymbolLookup::NextSymbol()). Well, it shouldn't hurt much, either :-) > Performance-wise the get_nth_image_symbol() API sucks in either case. > We > should probably introduce a get_next_image_symbol() that can be > implemented > efficiently. Definitely, but that's probably something we should do with R2. Bye, Axel. From korli at users.berlios.de Tue Oct 7 10:47:18 2008 From: korli at users.berlios.de (=?ISO-8859-1?Q?J=E9r=F4me_Duval?=) Date: Tue, 7 Oct 2008 10:47:18 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app In-Reply-To: <200810070548.m975m020032745@sheep.berlios.de> References: <200810070548.m975m020032745@sheep.berlios.de> Message-ID: Hi Stefano, 2008/10/7 > Screen was assuming setting a 800x600 mode would work anyway, but currently > the Intel driver only supports the 'native' mode for laptop panels. Added a > 'strict' parameter to SetBestMode which, if true, fails if it doesn't find > any mode with the passed width. If false, and can't find any good mode, just > uses the first mode in the list (could be improved). This fixes bug #2350 It defaults to true at the moment, right ? Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefano.ceccherini at gmail.com Tue Oct 7 10:52:51 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Tue, 7 Oct 2008 10:52:51 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app In-Reply-To: References: <200810070548.m975m020032745@sheep.berlios.de> Message-ID: <894b9700810070152u25c0d370u3a6ce283c8047f68@mail.gmail.com> 2008/10/7 J?r?me Duval : > > It defaults to true at the moment, right ? > > Bye, > J?r?me Exactly. I should have been mentioned that in the commit log. Sorry. From korli at users.berlios.de Tue Oct 7 10:56:10 2008 From: korli at users.berlios.de (=?ISO-8859-1?Q?J=E9r=F4me_Duval?=) Date: Tue, 7 Oct 2008 10:56:10 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app In-Reply-To: <894b9700810070152u25c0d370u3a6ce283c8047f68@mail.gmail.com> References: <200810070548.m975m020032745@sheep.berlios.de> <894b9700810070152u25c0d370u3a6ce283c8047f68@mail.gmail.com> Message-ID: 2008/10/7 Stefano Ceccherini > 2008/10/7 J?r?me Duval : > > > > It defaults to true at the moment, right ? > > > > Bye, > > J?r?me > > Exactly. I should have been mentioned that in the commit log. Sorry. No problem. I'll check if this fixes the problem I have. Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From axeld at mail.berlios.de Tue Oct 7 13:43:16 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Tue, 7 Oct 2008 13:43:16 +0200 Subject: [Haiku-commits] r27901 - haiku/trunk/src/kits/opengl/glut Message-ID: <200810071143.m97BhG97025364@sheep.berlios.de> Author: axeld Date: 2008-10-07 13:43:15 +0200 (Tue, 07 Oct 2008) New Revision: 27901 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27901&view=rev Modified: haiku/trunk/src/kits/opengl/glut/glutWindow.cpp haiku/trunk/src/kits/opengl/glut/glutWindow.h Log: * Minor cleanup - this stuff really has "reimplement me" written all over it... Modified: haiku/trunk/src/kits/opengl/glut/glutWindow.cpp =================================================================== --- haiku/trunk/src/kits/opengl/glut/glutWindow.cpp 2008-10-07 07:49:36 UTC (rev 27900) +++ haiku/trunk/src/kits/opengl/glut/glutWindow.cpp 2008-10-07 11:43:15 UTC (rev 27901) @@ -5,88 +5,76 @@ * and is provided without guarantee or warrantee expressed or * implied. This program is -not- in the public domain. * - * - * FILE: glutWindow.cpp - * * DESCRIPTION: all the routines for dealing with GlutWindows ***********************************************************/ -/*********************************************************** - * Headers - ***********************************************************/ +#include + #include -#include + #include "glutint.h" #include "glutState.h" #include "glutBlocker.h" -/*********************************************************** - * FUNCTION: getUnusedWindowSlot - * - * DESCRIPTION: helper function to get a new window slot - ***********************************************************/ + +/*! Helper function to get a new window slot */ static int getUnusedWindowSlot() { - int i; + int i; - /* Look for allocated, unused slot. */ - for (i = 0; i < gState.windowListSize; i++) { - if (!gState.windowList[i]) { - return i; - } - } - /* Allocate a new slot. */ - gState.windowListSize++; - gState.windowList = (GlutWindow **) - realloc(gState.windowList, - gState.windowListSize * sizeof(GlutWindow *)); + /* Look for allocated, unused slot. */ + for (i = 0; i < gState.windowListSize; i++) { + if (!gState.windowList[i]) + return i; + } - if (!gState.windowList) - __glutFatalError("out of memory."); - gState.windowList[gState.windowListSize - 1] = NULL; - return gState.windowListSize - 1; + /* Allocate a new slot. */ + gState.windowListSize++; + gState.windowList = (GlutWindow **)realloc(gState.windowList, + gState.windowListSize * sizeof(GlutWindow *)); + if (gState.windowList == NULL) + __glutFatalError("out of memory."); + + gState.windowList[gState.windowListSize - 1] = NULL; + return gState.windowListSize - 1; } -/*********************************************************** - * FUNCTION: __glutDefaultDisplay - * __glutDefaultReshape - * - * DESCRIPTION: default display and reshape functions - ***********************************************************/ + +/*! Default display function */ static void __glutDefaultDisplay(void) { - /* XXX Remove the warning after GLUT 3.0. */ - __glutWarning("The following is a new check for GLUT 3.0; update your code."); - __glutFatalError( - "redisplay needed for window %d, but no display callback.", - gState.currentWindow->num + 1); + /* XXX Remove the warning after GLUT 3.0. */ + __glutWarning("The following is a new check for GLUT 3.0; update your " + "code."); + __glutFatalError("redisplay needed for window %d, but no display callback.", + gState.currentWindow->num + 1); } + +/*! Default reshape function */ void __glutDefaultReshape(int width, int height) { - /* Adjust the viewport of the window */ - glViewport(0, 0, (GLsizei) width, (GLsizei) height); + /* Adjust the viewport of the window */ + glViewport(0, 0, (GLsizei) width, (GLsizei) height); } -/*********************************************************** - * CLASS: GlutWindow - * - * FUNCTION: (constructor) - * - * DESCRIPTION: creates a new GLUT window - * note: subwindows don't resize, but top-level windows - * follow all sides - ***********************************************************/ -GlutWindow::GlutWindow(GlutWindow *nparent, char *name, - int x, int y, int width, int height, ulong options) : - BGLView( - (nparent ? BRect(x,y,x+width-1,y+height-1) : - BRect(0,0,width-1,height-1)), name, - (nparent ? B_FOLLOW_NONE : B_FOLLOW_ALL_SIDES), - B_WILL_DRAW|B_FRAME_EVENTS|B_FULL_UPDATE_ON_RESIZE|B_PULSE_NEEDED, + +// #pragma mark - + + +/*! Creates a new GLUT window + Note: subwindows don't resize, but top-level windows + follow all sides. +*/ +GlutWindow::GlutWindow(GlutWindow *nparent, const char *name, + int x, int y, int width, int height, ulong options) + : BGLView(nparent != NULL ? BRect(x, y, x + width - 1, y + height - 1) + : BRect(0, 0, width - 1, height - 1), const_cast(name), + nparent != NULL ? B_FOLLOW_NONE : B_FOLLOW_ALL_SIDES, + B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE | B_PULSE_NEEDED, options) { // add myself to window list @@ -102,7 +90,7 @@ siblings = 0; } children = 0; - + // initialize variables cursor = GLUT_CURSOR_INHERIT; // default cursor for (int i = 0; i < GLUT_MAX_MENUS; i++) { @@ -111,7 +99,7 @@ m_width = width; m_height = height; m_buttons = 0; - + // clear callbacks display = __glutDefaultDisplay; reshape = __glutDefaultReshape; @@ -125,7 +113,7 @@ special = 0; specialUp = 0; windowStatus = 0; - + // clear event counters anyevents = 1; displayEvent = 1; // get a reshape and a display event right away @@ -144,7 +132,7 @@ menuEvent = 0; visible = true; gBlock.QuickNewEvent(); - + // if i'm a subwindow, add me to my parent view if (parent) { parent->Window()->Lock(); @@ -153,28 +141,27 @@ } else { // if I'm a top-level window, create my BWindow GlutBWindow *mybwindow = new GlutBWindow( - BRect(x,y,x+width-1,y+height-1), name); + BRect(x, y, x + width - 1, y + height - 1), name); mybwindow->AddChild(this); mybwindow->bgl = this; mybwindow->Show(); } - + // give me the keyboard focus (focus follows mouse, X style, as // implemented in GlutWindow::MouseMoved()) Window()->Lock(); MakeFocus(); Window()->Unlock(); - + // make myself the default window __glutSetWindow(this); } -/*********************************************************** - * FUNCTION: glutCreateWindow (4.1) - * - * DESCRIPTION: creates a new GLUT window - ***********************************************************/ -int glutCreateWindow(const char *name) { + +/*! Creates a new GLUT window */ +int +glutCreateWindow(const char *name) +{ if (!be_app) __glutInit(); @@ -182,86 +169,82 @@ if (!__glutConvertDisplayMode(&options)) { __glutWarning("visual with necessary capabilities not found."); } - + // if X or Y is negative, then start at a reasonable position - bool defaultxy = (gState.initX < 0) || (gState.initY < 0); - - GlutWindow *window = new GlutWindow(0, const_cast(name), - (defaultxy ? 50 : gState.initX), (defaultxy ? 50 : gState.initY), + bool defaultxy = gState.initX < 0 || gState.initY < 0; + + GlutWindow *window = new GlutWindow(0, name, + defaultxy ? 50 : gState.initX, defaultxy ? 50 : gState.initY, gState.initWidth, gState.initHeight, options); - + return window->num + 1; } -/*********************************************************** - * FUNCTION: glutCreateSubWindow (4.2) - * - * DESCRIPTION: creates a new GLUT subwindow - * Note: a subwindow is a GlutWindow (which is actually - * a BGLView) without its own BWindow - ***********************************************************/ -int glutCreateSubWindow(int win, int x, int y, int width, int height) { + +/*! Creates a new GLUT subwindow + Note: a subwindow is a GlutWindow (which is actually + a BGLView) without its own BWindow +*/ +int +glutCreateSubWindow(int win, int x, int y, int width, int height) +{ ulong options; if (!__glutConvertDisplayMode(&options)) { __glutFatalError("visual with necessary capabilities not found."); } - + GlutWindow *window = new GlutWindow(gState.windowList[win-1], "child", x, y, width, height, options); - + return window->num + 1; } -/*********************************************************** - * FUNCTION: __glutSetWindow - * - * DESCRIPTION: set the current window (utility function) - ***********************************************************/ + +/*! Set the current window (utility function) */ void -__glutSetWindow(GlutWindow * window) +__glutSetWindow(GlutWindow *window) { - if (gState.currentWindow) - gState.currentWindow->UnlockGL(); - gState.currentWindow = window; - gState.currentWindow->LockGL(); + if (gState.currentWindow) + gState.currentWindow->UnlockGL(); + gState.currentWindow = window; + gState.currentWindow->LockGL(); } -/*********************************************************** - * FUNCTION: glutSetWindow (4.3) - * glutGetWindow - * - * DESCRIPTION: set and get the current window - ***********************************************************/ -void glutSetWindow(int win) { - GlutWindow *window; - if (win < 1 || win > gState.windowListSize) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - window = gState.windowList[win - 1]; - if (!window) { - __glutWarning("glutSetWindow attempted on bogus window."); - return; - } - __glutSetWindow(window); +/*! Set and get the current window */ +void +glutSetWindow(int win) +{ + GlutWindow *window; + + if (win < 1 || win > gState.windowListSize) { + __glutWarning("glutSetWindow attempted on bogus window."); + return; + } + + window = gState.windowList[win - 1]; + if (!window) { + __glutWarning("glutSetWindow attempted on bogus window."); + return; + } + __glutSetWindow(window); } -int glutGetWindow() { - if (gState.currentWindow) { - return gState.currentWindow->num + 1; - } else { - return 0; - } + +int +glutGetWindow() +{ + if (gState.currentWindow) + return gState.currentWindow->num + 1; + + return 0; } -/*********************************************************** - * FUNCTION: __glutDestroyWindow - * - * DESCRIPTION: recursively set entries to 0 - ***********************************************************/ + +/*! Recursively set entries to 0. */ static void -__glutDestroyWindow(GlutWindow *window, GlutWindow *initialWindow) { +__glutDestroyWindow(GlutWindow *window, GlutWindow *initialWindow) +{ // first, find all children recursively and set their entries to 0 GlutWindow *cur = window->children; while (cur) { @@ -269,49 +252,47 @@ __glutDestroyWindow(cur, initialWindow); cur = siblings; } + + /* Remove from parent's children list (only necessary for + non-initial windows and subwindows!). */ + GlutWindow *parent = window->parent; + if (parent && parent == initialWindow->parent) { + GlutWindow **prev = &parent->children; + cur = parent->children; + while (cur) { + if (cur == window) { + *prev = cur->siblings; + break; + } + prev = &(cur->siblings); + cur = cur->siblings; + } + } - /* Remove from parent's children list (only necessary for - non-initial windows and subwindows!). */ - GlutWindow *parent = window->parent; - if (parent && parent == initialWindow->parent) { - GlutWindow **prev = &parent->children; - cur = parent->children; - while (cur) { - if (cur == window) { - *prev = cur->siblings; - break; - } - prev = &(cur->siblings); - cur = cur->siblings; - } - } - - // finally, check if we are the current window, and set to 0 - if (gState.currentWindow == window) { - gState.currentWindow = 0; - } - gState.windowList[window->num] = 0; + // finally, check if we are the current window, and set to 0 + if (gState.currentWindow == window) + gState.currentWindow = 0; + + gState.windowList[window->num] = 0; } -/*********************************************************** - * FUNCTION: glutDestroyWindow (4.4) - * - * DESCRIPTION: destroy window and all its children - ***********************************************************/ -void glutDestroyWindow(int win) { + +/*! Destroy window and all its children. */ +void +glutDestroyWindow(int win) +{ // can't destroy a window if another window has the GL context if (gState.currentWindow) gState.currentWindow->UnlockGL(); // lock the window - GlutWindow *window = gState.windowList[win-1]; + GlutWindow *window = gState.windowList[win - 1]; BWindow *bwindow = window->Window(); bwindow->Lock(); // if win is the current window, set current window to 0 - if (gState.currentWindow == window) { + if (gState.currentWindow == window) gState.currentWindow = 0; - } // recursively set child entries to 0 __glutDestroyWindow(window, window); @@ -322,7 +303,7 @@ window->UnlockGL(); // now, if the window was top-level, delete its BWindow - if(!window->parent) { + if (!window->parent) { bwindow->Quit(); } else { // else, detach it from the BWindow and delete it @@ -330,36 +311,35 @@ delete window; bwindow->Unlock(); } + // relock GL if the current window is still valid - if(gState.currentWindow) + if (gState.currentWindow) gState.currentWindow->LockGL(); } -/*********************************************************** - * FUNCTION: __glutDestroyAllWindows - * - * DESCRIPTION: destroy all windows when exit() is called - * this seems to be necessary to avoid delays - * and crashes when using BDirectWindow - ***********************************************************/ -void __glutDestroyAllWindows() { - for(int i=0; iLock(); gState.display->Quit(); + status_t ignored; wait_for_thread(gState.appthread, &ignored); } -/*********************************************************** - * FUNCTION: glutPostRedisplay (4.5) - * - * DESCRIPTION: mark window as needing redisplay - ***********************************************************/ -void glutPostRedisplay() { + +/*! Mark window as needing redisplay */ +void +glutPostRedisplay() +{ gState.currentWindow->Window()->Lock(); gState.currentWindow->anyevents = true; gState.currentWindow->displayEvent = true; @@ -367,12 +347,11 @@ gBlock.QuickNewEvent(); } -/*********************************************************** - * FUNCTION: glutPostWindowRedisplay - * - * DESCRIPTION: mark window as needing redisplay - ***********************************************************/ -void glutPostWindowRedisplay(int win) { + +/*! Mark window as needing redisplay */ +void +glutPostWindowRedisplay(int win) +{ GlutWindow *gwin = gState.windowList[win - 1]; gwin->Window()->Lock(); gwin->anyevents = true; @@ -381,86 +360,95 @@ gBlock.QuickNewEvent(); } -/*********************************************************** - * FUNCTION: glutSwapBuffers (4.6) - * - * DESCRIPTION: swap buffers - ***********************************************************/ -void glutSwapBuffers() { + +void +glutSwapBuffers() +{ gState.currentWindow->SwapBuffers(); } -/*********************************************************** - * FUNCTION: glutPositionWindow (4.7) - * - * DESCRIPTION: move window - ***********************************************************/ -void glutPositionWindow(int x, int y) { + +/*! Move window */ +void +glutPositionWindow(int x, int y) +{ BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); + if (win == NULL) + return; + win->Lock(); if (gState.currentWindow->parent) gState.currentWindow->MoveTo(x, y); // move the child view else { - if(win->IsFullScreen()) { + if (win->IsFullScreen()) win->SetFullScreen(false); - } + win->MoveTo(x, y); // move the window } win->Unlock(); } -/*********************************************************** - * FUNCTION: glutReshapeWindow (4.8) - * - * DESCRIPTION: reshape window (we'll catch the callback - * when the view gets a Draw() message - ***********************************************************/ -void glutReshapeWindow(int width, int height) { + +/*! Reshape window (we'll catch the callback when the view gets + a Draw() message). +*/ +void +glutReshapeWindow(int width, int height) +{ BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); + if (win == NULL) + return; + win->Lock(); - if (gState.currentWindow->parent) - gState.currentWindow->ResizeTo(width-1, height-1); // resize the child - else { - if(win->IsFullScreen()) { + if (gState.currentWindow->parent) { + // resize the child + gState.currentWindow->ResizeTo(width - 1, height - 1); + } else { + if (win->IsFullScreen()) win->SetFullScreen(false); - } - win->ResizeTo(width-1, height-1); // resize the parent + + // resize the parent + win->ResizeTo(width - 1, height - 1); } win->Unlock(); } -/*********************************************************** - * FUNCTION: glutFullScreen (4.9) - * - * DESCRIPTION: makes the window full screen - ***********************************************************/ -void glutFullScreen() { + +/*! Makes the window full screen */ +void +glutFullScreen() +{ BDirectWindow *win = dynamic_cast(gState.currentWindow->Window()); + if (win == NULL) + return; + win->Lock(); win->SetFullScreen(true); win->Unlock(); } -/*********************************************************** - * FUNCTION: glutPopWindow (4.10) - * glutPushWindow - * - * DESCRIPTION: change the stacking order of the current window - * NOTE: I can't figure out how to do this for windows, - * and there is no concept of "stacking order" for - * subwindows, so these are currently no-ops. - ***********************************************************/ -void glutPopWindow() { } -void glutPushWindow() { } -/*********************************************************** - * FUNCTION: glutShowWindow (4.11) - * glutHideWindow - * glutIconifyWindow - * - * DESCRIPTION: change display status of current window - ***********************************************************/ -void glutShowWindow() { +/*! Supposed to change the stacking order of the current window + NOTE: I can't figure out how to do this for windows, + and there is no concept of "stacking order" for + subwindows, so these are currently no-ops. +*/ +void +glutPopWindow() +{ +} + + +/*! Same problem as glutPopWindow() */ +void +glutPushWindow() +{ +} + + +void +glutShowWindow() +{ gState.currentWindow->Window()->Lock(); if (gState.currentWindow->parent) // subwindow gState.currentWindow->Show(); @@ -472,17 +460,26 @@ gState.currentWindow->Window()->Unlock(); } -void glutHideWindow() { + +void +glutHideWindow() +{ gState.currentWindow->Window()->Lock(); + if (gState.currentWindow->parent) // subwindow gState.currentWindow->Hide(); else gState.currentWindow->Window()->Hide(); // show the actual BWindow + gState.currentWindow->Window()->Unlock(); } -void glutIconifyWindow() { - if(gState.currentWindow->parent) + +/*! Minimizes window */ +void +glutIconifyWindow() +{ + if (gState.currentWindow->parent) __glutFatalError("can't iconify a subwindow"); gState.currentWindow->Window()->Lock(); @@ -490,37 +487,38 @@ gState.currentWindow->Window()->Unlock(); } -/*********************************************************** - * FUNCTION: glutSetWindowTitle (4.12) - * glutSetIconTitle - * - * DESCRIPTION: set the window title (icon title is same) - ***********************************************************/ -void glutSetWindowTitle(const char *name) { + +/*! Sets the window title */ +void +glutSetWindowTitle(const char *name) +{ if (gState.currentWindow->parent) __glutFatalError("glutSetWindowTitle: isn't a top-level window"); - + gState.currentWindow->Window()->Lock(); gState.currentWindow->Window()->SetTitle(name); gState.currentWindow->Window()->Unlock(); } -void glutSetIconTitle(const char *name) { + +/*! Same as glutSetWindowTitle() */ +void +glutSetIconTitle(const char *name) +{ glutSetWindowTitle(name); } -/*********************************************************** - * FUNCTION: __glutConvertDisplayMode - * - * DESCRIPTION: converts the current display mode into a BGLView - * display mode, printing warnings as appropriate. - * - * PARAMETERS: if options is non-NULL, the current display mode is - * returned in it. - * - * RETURNS: 1 if the current display mode is possible, else 0 - ***********************************************************/ -int __glutConvertDisplayMode(unsigned long *options) { + +/*! Converts the current display mode into a BGLView + display mode, printing warnings as appropriate. + + \param options if non-NULL, the current display mode is + returned in it. + \return 1 if the current display mode is possible, else 0 +*/ +int +__glutConvertDisplayMode(unsigned long *options) +{ if (gState.displayString) { /* __glutDisplayString should be NULL except if glutInitDisplayString has been called to register a @@ -530,68 +528,72 @@ return __glutConvertDisplayModeFromString(options); } - if(options) { + if (options) { ulong newoptions = 0; - if(gState.displayMode & GLUT_ACCUM) + if (gState.displayMode & GLUT_ACCUM) newoptions |= BGL_ACCUM; - if(gState.displayMode & GLUT_ALPHA) + if (gState.displayMode & GLUT_ALPHA) newoptions |= BGL_ALPHA; - if(gState.displayMode & GLUT_DEPTH) + if (gState.displayMode & GLUT_DEPTH) newoptions |= BGL_DEPTH; - if(gState.displayMode & GLUT_DOUBLE) + if (gState.displayMode & GLUT_DOUBLE) newoptions |= BGL_DOUBLE; - if(gState.displayMode & GLUT_STENCIL) + if (gState.displayMode & GLUT_STENCIL) newoptions |= BGL_STENCIL; *options = newoptions; } - if(gState.displayMode & GLUT_INDEX) { + if (gState.displayMode & GLUT_INDEX) { __glutWarning("BeOS doesn't support indexed color"); return 0; } - if(gState.displayMode & GLUT_MULTISAMPLE) { + if (gState.displayMode & GLUT_MULTISAMPLE) { return 1; // try to go without multisampling } - if(gState.displayMode & GLUT_STEREO) { + if (gState.displayMode & GLUT_STEREO) { __glutWarning("BeOS doesn't support stereo windows"); return 0; } - if(gState.displayMode & GLUT_LUMINANCE) { + if (gState.displayMode & GLUT_LUMINANCE) { __glutWarning("BeOS doesn't support luminance color model"); return 0; } return 1; // visual supported } -/*********************************************************** - * CLASS: GlutBWindow - * - * DESCRIPTION: very thin wrapper around BWindow - ***********************************************************/ -GlutBWindow::GlutBWindow(BRect frame, char *name) : - BDirectWindow(frame, name, B_TITLED_WINDOW, 0) { + +// #pragma mark - + + +/*! Very thin wrapper around BWindow */ +GlutBWindow::GlutBWindow(BRect frame, const char *name) + : BDirectWindow(frame, name, B_TITLED_WINDOW, 0) +{ fConnectionDisabled = false; bgl = 0; SetPulseRate(100000); - + if (!SupportsWindowMode()) { __glutFatalError("video card doesn't support windowed operation"); } } -void GlutBWindow::DirectConnected( direct_buffer_info *info ) { + +void +GlutBWindow::DirectConnected(direct_buffer_info *info) +{ if (!bgl) return; bgl->DirectConnected(info); - if(!fConnectionDisabled) { + if (!fConnectionDisabled) bgl->EnableDirectMode(true); - } + int newVisState; - if((info->buffer_state & B_DIRECT_MODE_MASK) == B_DIRECT_START) { + if ((info->buffer_state & B_DIRECT_MODE_MASK) == B_DIRECT_START) bgl->visible = true; - } - if(!bgl->visible || info->buffer_state == B_DIRECT_STOP) + + if (!bgl->visible || info->buffer_state == B_DIRECT_STOP) newVisState = GLUT_HIDDEN; else { if (info->clip_list_count == 0) @@ -601,40 +603,57 @@ else newVisState = GLUT_PARTIALLY_RETAINED; } - if(newVisState != bgl->visState) { + + if (newVisState != bgl->visState) { bgl->visState = newVisState; bgl->anyevents = bgl->windowStatusEvent = true; gBlock.NewEvent(); } } -GlutBWindow::~GlutBWindow() { + +GlutBWindow::~GlutBWindow() +{ fConnectionDisabled = true; - if(bgl) { + if (bgl) bgl->EnableDirectMode(false); - } - if(!IsHidden()) + + if (!IsHidden()) Hide(); + Sync(); } -bool GlutBWindow::QuitRequested() { + +bool +GlutBWindow::QuitRequested() +{ gState.quitAll = true; gBlock.NewEvent(); - return false; // don't quit now, wait for main thread to do it + return false; + // don't quit now, wait for main thread to do it } -void GlutBWindow::Minimize(bool minimize) { + +void +GlutBWindow::Minimize(bool minimize) +{ bgl->visible = !minimize; BWindow::Minimize(minimize); } -void GlutBWindow::Hide() { + +void +GlutBWindow::Hide() +{ BWindow::Hide(); bgl->visible = false; } -void GlutBWindow::Show() { + +void +GlutBWindow::Show() +{ BWindow::Show(); bgl->visible = true; } Modified: haiku/trunk/src/kits/opengl/glut/glutWindow.h =================================================================== --- haiku/trunk/src/kits/opengl/glut/glutWindow.h 2008-10-07 07:49:36 UTC (rev 27900) +++ haiku/trunk/src/kits/opengl/glut/glutWindow.h 2008-10-07 11:43:15 UTC (rev 27901) @@ -5,33 +5,23 @@ * and is provided without guarantee or warrantee expressed or * implied. This program is -not- in the public domain. * - * - * FILE: glutWindow.h - * * DESCRIPTION: the GlutWindow class saves all events for * handling by main thread ***********************************************************/ -/*********************************************************** - * Headers - ***********************************************************/ #include #include #include -/*********************************************************** - * CLASS: GlutWindow - * - * INHERITS FROM: BGLView (NOT BWindow!) - * - * DESCRIPTION: all information needed for windows and - * subwindows (handled as similarly as possible) - ***********************************************************/ + +/*! All information needed for windows and + subwindows (handled as similarly as possible). +*/ class GlutWindow : public BGLView { public: - GlutWindow(GlutWindow *nparent, char *name, int x, int y, int width, - int height, ulong options); - + GlutWindow(GlutWindow *nparent, const char *name, int x, int y, int width, + int height, ulong options); + virtual void MessageReceived(BMessage *message); void KeyDown(const char *bytes, int32 numBytes); void KeyUp(const char *bytes, int32 numBytes); @@ -44,7 +34,7 @@ void ErrorCallback(GLenum errorCode); static long MenuThread(void *menu); - + int num; // window number returned to user int cursor; // my cursor #define GLUT_MAX_MENUS 3 @@ -53,23 +43,23 @@ uint32 m_buttons; // the last mouse button state /* Window relationship state. */ - GlutWindow *parent; /* parent window */ - GlutWindow *children; /* first child window */ - GlutWindow *siblings; /* next sibling */ + GlutWindow *parent; /* parent window */ + GlutWindow *children; /* first child window */ + GlutWindow *siblings; /* next sibling */ // leave out buttons and dials callbacks that we don't support - GLUTdisplayCB display; /* redraw */ - GLUTreshapeCB reshape; /* resize (width,height) */ - GLUTmouseCB mouse; /* mouse (button,state,x,y) */ - GLUTmotionCB motion; /* motion (x,y) */ - GLUTpassiveCB passive; /* passive motion (x,y) */ - GLUTentryCB entry; /* window entry/exit (state) */ - GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ - GLUTkeyboardCB keyboardUp; /* keyboard up (ASCII,x,y) */ - GLUTvisibilityCB visibility; /* visibility */ - GLUTspecialCB special; /* special key */ - GLUTspecialCB specialUp; /* special key up */ - GLUTwindowStatusCB windowStatus; /* window status */ + GLUTdisplayCB display; /* redraw */ + GLUTreshapeCB reshape; /* resize (width,height) */ + GLUTmouseCB mouse; /* mouse (button,state,x,y) */ + GLUTmotionCB motion; /* motion (x,y) */ + GLUTpassiveCB passive; /* passive motion (x,y) */ + GLUTentryCB entry; /* window entry/exit (state) */ + GLUTkeyboardCB keyboard; /* keyboard (ASCII,x,y) */ + GLUTkeyboardCB keyboardUp; /* keyboard up (ASCII,x,y) */ + GLUTvisibilityCB visibility; /* visibility */ [... truncated: 27 lines follow ...] From bonefish at mail.berlios.de Tue Oct 7 13:49:14 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Tue, 7 Oct 2008 13:49:14 +0200 Subject: [Haiku-commits] r27902 - in haiku/trunk: headers/private/kernel/arch/x86 src/system/kernel/arch/x86 Message-ID: <200810071149.m97BnE4L026257@sheep.berlios.de> Author: bonefish Date: 2008-10-07 13:49:13 +0200 (Tue, 07 Oct 2008) New Revision: 27902 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27902&view=rev Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp Log: Moved vm_translation_map_arch_info definition to the header. Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h 2008-10-07 11:43:15 UTC (rev 27901) +++ haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h 2008-10-07 11:49:13 UTC (rev 27902) @@ -9,6 +9,19 @@ #include +#define PAGE_INVALIDATE_CACHE_SIZE 64 + +struct page_directory_entry; + + +typedef struct vm_translation_map_arch_info { + struct page_directory_entry *pgdir_virt; + struct page_directory_entry *pgdir_phys; + int num_invalidate_pages; + addr_t pages_to_invalidate[PAGE_INVALIDATE_CACHE_SIZE]; +} vm_translation_map_arch_info; + + // quick function to return the physical pgdir of a mapping, needed for a context switch #ifdef __cplusplus extern "C" Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-07 11:43:15 UTC (rev 27901) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-07 11:49:13 UTC (rev 27902) @@ -63,18 +63,6 @@ } page_directory_entry; static page_table_entry *iospace_pgtables = NULL; - -#define PAGE_INVALIDATE_CACHE_SIZE 64 - -// vm_translation object stuff -typedef struct vm_translation_map_arch_info { - page_directory_entry *pgdir_virt; - page_directory_entry *pgdir_phys; - int num_invalidate_pages; - addr_t pages_to_invalidate[PAGE_INVALIDATE_CACHE_SIZE]; -} vm_translation_map_arch_info; - - static page_table_entry *page_hole = NULL; static page_directory_entry *page_hole_pgdir = NULL; static page_directory_entry *sKernelPhysicalPageDirectory = NULL; From jackburton at mail.berlios.de Tue Oct 7 15:06:19 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Tue, 7 Oct 2008 15:06:19 +0200 Subject: [Haiku-commits] r27903 - haiku/trunk/src/servers/app Message-ID: <200810071306.m97D6JNL003433@sheep.berlios.de> Author: jackburton Date: 2008-10-07 15:06:16 +0200 (Tue, 07 Oct 2008) New Revision: 27903 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27903&view=rev Modified: haiku/trunk/src/servers/app/VirtualScreen.cpp Log: I'm getting old. Without this change, bug #2350 was still with us. Sorry for forgetting to commit this Modified: haiku/trunk/src/servers/app/VirtualScreen.cpp =================================================================== --- haiku/trunk/src/servers/app/VirtualScreen.cpp 2008-10-07 11:49:13 UTC (rev 27902) +++ haiku/trunk/src/servers/app/VirtualScreen.cpp 2008-10-07 13:06:16 UTC (rev 27903) @@ -160,7 +160,7 @@ if (status != B_OK) status = screen->SetBestMode(1024, 768, B_RGB32, 60.f); if (status != B_OK) - screen->SetBestMode(800, 600, B_RGB32, 60.f); + screen->SetBestMode(800, 600, B_RGB32, 60.f, false); } // TODO: this works only for single screen configurations From bonefish at mail.berlios.de Tue Oct 7 15:08:45 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Tue, 7 Oct 2008 15:08:45 +0200 Subject: [Haiku-commits] r27904 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200810071308.m97D8jmc003739@sheep.berlios.de> Author: bonefish Date: 2008-10-07 15:08:44 +0200 (Tue, 07 Oct 2008) New Revision: 27904 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27904&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp Log: Simplified x86_next_page_directory(). Modified: haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp 2008-10-07 13:06:16 UTC (rev 27903) +++ haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp 2008-10-07 13:08:44 UTC (rev 27904) @@ -161,23 +161,16 @@ void * x86_next_page_directory(struct thread *from, struct thread *to) { - if (from->team->address_space != NULL && to->team->address_space != NULL) { - // they are both user space threads - if (from->team == to->team) { - // dont change the pgdir, same address space - return NULL; - } - // switching to a new address space - return i386_translation_map_get_pgdir(&to->team->address_space->translation_map); - } else if (from->team->address_space == NULL && to->team->address_space == NULL) { - // they must both be kernel space threads + vm_address_space* toAddressSpace = to->team->address_space; + if (from->team->address_space == toAddressSpace) { + // don't change the pgdir, same address space return NULL; - } else if (to->team->address_space == NULL) { - // the one we're switching to is kernel space - return i386_translation_map_get_pgdir(&vm_kernel_address_space()->translation_map); } - return i386_translation_map_get_pgdir(&to->team->address_space->translation_map); + if (toAddressSpace == NULL) + toAddressSpace = vm_kernel_address_space(); + + return i386_translation_map_get_pgdir(&toAddressSpace->translation_map); } From mmu_man at mail.berlios.de Tue Oct 7 20:03:10 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Tue, 7 Oct 2008 20:03:10 +0200 Subject: [Haiku-commits] r27905 - in haiku/trunk/3rdparty/mmu_man/themes: . doc doc/images Message-ID: <200810071803.m97I3AFc016665@sheep.berlios.de> Author: mmu_man Date: 2008-10-07 20:03:09 +0200 (Tue, 07 Oct 2008) New Revision: 27905 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27905&view=rev Added: haiku/trunk/3rdparty/mmu_man/themes/doc/ haiku/trunk/3rdparty/mmu_man/themes/doc/README.html haiku/trunk/3rdparty/mmu_man/themes/doc/images/ haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_001.png haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_002.png Log: Add some documentation for Themes. Added: haiku/trunk/3rdparty/mmu_man/themes/doc/README.html =================================================================== --- haiku/trunk/3rdparty/mmu_man/themes/doc/README.html 2008-10-07 13:08:44 UTC (rev 27904) +++ haiku/trunk/3rdparty/mmu_man/themes/doc/README.html 2008-10-07 18:03:09 UTC (rev 27905) @@ -0,0 +1,104 @@ + + + +Theme Manager for BeOS and Haiku + + + +

Theme Manager for BeOS and Haiku

+© 2000-2008, François Revol. + +

About

+

+Theme Manager allows you to change the appearance of BeOS (R5, Dano0 and Zeta) and Haiku. +It packages various interface settings in a single file and allows applying them on the fly. +

+ +

Licence

+

+Theme Manager is distributed under the MIT licence.
+Sources are available in the Haiku subversion repository, and documented here and there. +

+

Features

+

There are a many settings that are saved and restored by Theme Manager, depending on the platform. For example BeOS R5 doesn't support changing system colors. Each feature can be selectively disabled for applying and saving. +

+
+
Backgrounds
+
Wallpapers and background color
+
BeIDE Colors
+
Applies the system document colors to BeIDE.
+
Deskbar
+
Saves and restores Deskbar location.
+
Eddie Colors
+
Applies the system document colors to the Eddie editor.
+
Pe Colors
+
Applies the system document colors to the Pe editor.
+
Screensaver
+
Saves and restores the screensaver and its settings.
+
SoundPlay Color
+
Applies the system colors to running instances of SoundPlay by simulating a color drop on the window.
+
Sounds
+
Saves and restores system sounds.
+
Terminal
+
Saves and restores the Terminal fonts, colors and size.
+
System Colors and Fonts
+
Saves and restores system colors and fonts.
+
Winamp Skin
+
Saves and restores the selected Winamp skin of both CL-Amp and SoundPlay.
+
Window Decor
+
Saves and restores the window decor.
+
+

Changing icons isn't yet supported.

+

BeTheme Import

+BeTheme themes are searched for on BFS partitions and imported. Icons aren't supported yet, but backgrounds, deskbar position and window decor are supported. +

MSTheme Import

+MS .theme files are searched for on NTFS partitions and imported. Icons aren't supported yet, but colors and sounds are applied, window decor and deskbar position are forced to mimic Windows. +

Feature Grid

+
+

Logo

+
+

dummy

+
+

+

The Tracker

+

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 e.g. crashed or frozen Tracker is to call the TeamManager with CTRL+ALT+DEL to kill Tracker and then click the Restart Desktop... button. The same brings back a wayward Deskbar. +

+
+

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. +

+drill-down.png +
+

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

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


+

Navigating

+

Moving through your folders is one of Trackers main purposes, just like the file managers on other platforms. Haiku's Tracker has some unique features that will help you doing that efficiently. +

Instead of double-clicking your way down folder after folder, there's a better way to drill down: +

+drill-down.png +
+

Right-click onto a folder, and at the top of the usual context menu you'll find a submenu of the current folder that let's you navigate down a level. Just move down the hierarchy until you find the file or folder you're looking for and click on it to open it. The above shows the contents of the folder /boot/beos/system/. +

+

A similar method can be used from any Tracker window:

+

+window-drill-down.png +
+

Click on the area in the lower left, where the number of items are listed, and you'll get submenus for every level above you current folder. From there you can drill down through the folders as usual. +

Note, that the Desktop is always the topmost level as that is where Tracker shows mounted volumes. So, if you want to go to another disk, you first have to navigate to the top (Desktop) and cross over to your other disk from there. +


+

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

+

A few shortcuts are essential for keyboard navigation: +

  • ALT+CURSOR-UP - Open parent folder.
  • +
  • ALT+CURSOR-DOWN or RETURN - Open selected folder.
  • +
  • ALT+W - Close window.
  • +
  • ALT+ESC - Enter menu bar (leave with ESC).
  • +
  • right MENU-KEY - Open Deskbar menu (leave with ESC).
+

+
+

Appearance

+window-menu.png +
+

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

  • Icon View (ALT+1) - Big icons, you can change the size from the submenu.
  • +
  • Mini Icon View (ALT+2) - Small icons.
  • +
  • List View (ALT+3) - A detailed list of your files enabling you to show/hide available attributes.
+

The Window menu offers a number of other functions: +

  • Resize Window (ALT+Y) - Resizes the window to its ideal size
  • +
  • Clean Up (ALT+K) - Aligns all icons to an invisible grid. Hold down SHIFT and the menu becomes Clean Up All which additionally sorts all icons alphabetically.
  • +
  • Select... (SHIFT+ALT+A) - Select files according to a regular expression.
  • +
+

The rest of the functions are pretty self-explanatory, leaving the... +

+
+

Tracker preferences

+

Window | Preferences... opens a panel that offers a number of setting that, where not obvious, should become clear once tried out. Since all settings a re applied live, you'll immediately see the changes. +
So, in short, the not so obvious settings: +

  • Desktop - Decide if all mounted disks appear directly on the Desktop or in a window after clicking a single Disk icon sitting on the Desktop.
  • +
  • Windows - You can set Single Window Navigation, i.e. a double-clicked folder doesn't open in its own window, but inside its parent instead. This is not the same as clicking while holding the WIN key, as described above, because you'll lose the per window saved position and size. +
    +tracker-preferences-navigator.png +

    +On the other hand, single window browsing offers a Navigator where you can enter or copy&paste a path name and use back, forward and up buttons.

  • +
  • Date and Time - Set date and time formats.
  • +
  • Trash - Set the behaviour when deleting a file.
  • +
  • Volume Icons - Set the colour of an optional indicator of free space that's shown besides a disk's icon.
  • +
+

+
+

Working with files

+

When invoked on a selected file, the File menu offers about the same options as when you open a context menu by right-clicking the file. Exceptions are commands that don't specifically target a selected file, like Find.. or New.... +

As usual the usage of the commands is pretty clear, so we'll concentrate on the niftier parts.

+
  • Find... - Find a file or folder. See topic Query for more info.
  • +
  • New... - Create a new folder or any other file after a template. +

    +new-menu.png +

    Choosing Edit Templates... opens the folder /boot/home/config/settings/Tracker/Tracker New Templates. Creating a file in that folder will offer its filetype with the file's name and other attributes as template in the New... menu. Here, there's a file "Text" with the filetype text/plain. See topic Filetypes for more info.

  • +
  • Open With... - A submenu offers all applications that can handle this filetype. +

    +open-with.png +

    The preferred application that would open the file when double-clicked, is checkmarked. In this submenu are only those applications listed that deal with the exact filetype, in this case it's a text file, the type text/plain. If you don't click on an app in the submenu, but on Open With... a panel opens: +

    +open-with-preferred +

    +

+ + + + + + + + + + + + + + +
FeatureR5Dano/ZetaHaikuBeTheme (import)MSTheme (import)
BackgroundsXXXXX
BeIDE ColorsXXX
DeskbarXXXX(forced)
Eddie ColorsXXX
Pe ColorsXXX
ScreensaverXXXX
SoundPlay ColorXXX
SoundsXXXX
TerminalXXX
System ColorsXXX
System FontsXXX
Winamp SkinXXX
Window DecorXXXXX
+ +

Installation

+

Application

+Just unzip the version of the Themes binary you need. +

Themes

+Themes are stored in folders containing a plain text "Theme" descriptor file, optionally a screenshot file for the preview, and eventually other files (bitmaps, sounds...). +Themes folders go to ~/config/settings/UIThemes/. + +

Usage

+The interface should be self-describing. +
+On the left themes are listed, native first, then imported ones. Read-only theme items (from /etc/UIThemes and imported) have a different item background color. +
+The "New" button creates a new empty theme. +
+The "Save" button saves the current settings to the selected theme. +
+The "Delete" button moves the selected theme (its folder and files) to the Trash, from where it can eventually be recovered. +
+The "Add Screenshot" hides Themes window, takes a screenshot and attaches it to the selected theme. +
+The "Apply" button changes settings to match the selected theme. +
+ +
+The "Show Options" button brings a list of checkboxes to enable or disable selectively each feature on theme change. Click "Show Preview" to go back to the preview display. +
+ +
+ + + Added: haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_001.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_001.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_002.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/3rdparty/mmu_man/themes/doc/images/shot_themes_002.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From mmu_man at mail.berlios.de Tue Oct 7 20:36:28 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Tue, 7 Oct 2008 20:36:28 +0200 Subject: [Haiku-commits] r27906 - haiku/trunk/src/add-ons/media/plugins/au_reader Message-ID: <200810071836.m97IaSIK025480@sheep.berlios.de> Author: mmu_man Date: 2008-10-07 20:36:28 +0200 (Tue, 07 Oct 2008) New Revision: 27906 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27906&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/au_reader/au_reader.cpp Log: - some cleanup - fixed dbg output - a priori .au can contain raw audio... Modified: haiku/trunk/src/add-ons/media/plugins/au_reader/au_reader.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/au_reader/au_reader.cpp 2008-10-07 18:03:09 UTC (rev 27905) +++ haiku/trunk/src/add-ons/media/plugins/au_reader/au_reader.cpp 2008-10-07 18:36:28 UTC (rev 27906) @@ -75,12 +75,12 @@ } int64 filesize = Source()->Seek(0, SEEK_END); - if (filesize < 28) { + if (filesize < sizeof(struct snd_header)) { TRACE("auReader::Sniff: File too small\n"); return B_ERROR; } - snd_header header; + struct snd_header header; if (sizeof(header) != Source()->ReadAt(0, &header, sizeof(header))) { TRACE("auReader::Sniff: header reading failed\n"); @@ -241,7 +241,7 @@ fFormat.u.raw_audio.format = B_AUDIO_FORMAT_FLOAT64; break; default: - TRACE("WavReader::Sniff: unhandled raw format\n"); + TRACE("auReader::Sniff: unhandled raw format\n"); return B_ERROR; } fFormat.u.raw_audio.byte_order = B_MEDIA_BIG_ENDIAN; @@ -266,6 +266,7 @@ auReader::GetFileFormatInfo(media_file_format *mff) { mff->capabilities = media_file_format::B_READABLE + | media_file_format::B_KNOWS_RAW_AUDIO | media_file_format::B_KNOWS_ENCODED_AUDIO | media_file_format::B_IMPERFECTLY_SEEKABLE; mff->family = B_MISC_FORMAT_FAMILY; From korli at users.berlios.de Tue Oct 7 20:39:08 2008 From: korli at users.berlios.de (=?ISO-8859-1?Q?J=E9r=F4me_Duval?=) Date: Tue, 7 Oct 2008 20:39:08 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app In-Reply-To: References: <200810070548.m975m020032745@sheep.berlios.de> <894b9700810070152u25c0d370u3a6ce283c8047f68@mail.gmail.com> Message-ID: 2008/10/7 J?r?me Duval > 2008/10/7 Stefano Ceccherini > >> 2008/10/7 J?r?me Duval : >> > >> > It defaults to true at the moment, right ? >> > >> > Bye, >> > J?r?me >> >> Exactly. I should have been mentioned that in the commit log. Sorry. > > > No problem. I'll check if this fixes the problem I have. > > It doesn't. Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From stippi at mail.berlios.de Tue Oct 7 23:04:35 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Tue, 7 Oct 2008 23:04:35 +0200 Subject: [Haiku-commits] r27907 - in haiku/trunk/docs/welcome: . welcome-images Message-ID: <200810072104.m97L4Zbh008383@sheep.berlios.de> Author: stippi Date: 2008-10-07 23:04:11 +0200 (Tue, 07 Oct 2008) New Revision: 27907 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27907&view=rev Added: haiku/trunk/docs/welcome/welcome-images/logo_lb.png haiku/trunk/docs/welcome/welcome-images/logo_lt.png haiku/trunk/docs/welcome/welcome-images/logo_rb.png haiku/trunk/docs/welcome/welcome-images/logo_rt.png Removed: haiku/trunk/docs/welcome/welcome-images/dummy.png haiku/trunk/docs/welcome/welcome-images/shijin-logo.png Modified: haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/gui.html haiku/trunk/docs/welcome/index.html haiku/trunk/docs/welcome/queries.html haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/twitcher.html haiku/trunk/docs/welcome/welcome.html haiku/trunk/docs/welcome/workshop-filetypes+attributes.html haiku/trunk/docs/welcome/workspaces.html Log: Worked over the design and some of the text of the "Welcome" documentation. * Changed the design of the logo area and worked on the document margins and overall layout. * Added a navigation infrastructure. * Worked on the text on the Welcome page - Added an actual welcome paragraph and unified the bug sections. Slightly changed the paragraph ordering. * Fixed some typos, added small bits of text to the Tracker topic. Modified: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,31 +1,59 @@ - - - - Attributes - - - - - - - - - - - - - - - - + + + + + + + + + +
-

Logo

-
-

dummy

-
-

-

Attributes

+ + + + File Attributes + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ logo + + logo + + File Attributes +
+ logo + + logo +
  + Welcome +     + Previous: Filetypes +     + Next: Index +  
  + +
+

File Attributes

Attributes are data fields that belong to a file but aren't part of that file, e.g. they are not computed into the file size and can be copied or changed without touching the file itself. The system uses these attributes to store e.g. file size, file type or date of the last modification. This is similar to other operating systems and their filesystems.

What's different is that you can add any kind of attribute to any file and display it or make it editable in a Tracker window. You just have to define the kind of attribute you want to add to a file type (e.g. string, integer or time) and give it a name and description.

The file itself doesn't even need any contents at all. Take a look at these People files for example: @@ -132,7 +160,24 @@ command name followed by "-h" or "--help".

-
- - +
+ +
 
  + Welcome +     + Previous: Filetypes +     + Next: Index +  
+ + Modified: haiku/trunk/docs/welcome/deskbar.html =================================================================== --- haiku/trunk/docs/welcome/deskbar.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/deskbar.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,30 +1,58 @@ - - - - The Deskbar - - - - - - - - - - - - - - - - + + + + + + + + + +
-

Logo

-
-

dummy

-
-

+ + + + The Deskbar + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ logo + + logo + + The Deskbar +
+ logo + + logo +
  + Welcome +     + Previous: The Tracker +     + Next: Filetypes +  
  + +

The Deskbar

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.

@@ -82,7 +110,25 @@

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

In front of every application's windows is a symbol providing info on its state. A bright symbol means a window is visible, a dark one that it's minimized. Three lines in front of a symbol shows that it's not on the current workspace.

-
- - + +
+ +
 
  + Welcome +     + Previous: The Tracker +     + Next: Filetypes +  
+ + Modified: haiku/trunk/docs/welcome/filetypes.html =================================================================== --- haiku/trunk/docs/welcome/filetypes.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/filetypes.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,30 +1,58 @@ - - - - Filetypes - - - - - - - - - - - - - - - - + + + + + + + + + +
-

Logo

-
-

dummy

-
-

+ + + + Filetypes + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ logo + + logo + + Filetypes +
+ logo + + logo +
  + Welcome +     + Previous: The Deskbar +     + Next: File Attributes +  
  + +

Filetypes

Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.


@@ -64,7 +92,24 @@

Then there's the list of supported filetypes. You can add (and remove) filetypes if you think the application can handle them. As a consequence, the app will appear in the menu for preferred applications or Tracker's Open with... context menu when you right-click on a file of that type.

At the bottom are version and copyright information. Like the application signature, they are filled in by the app's author and shouldn't be altered.

-
- - +
+ +
 
  + Welcome +     + Previous: The Deskbar +     + Next: File Attributes +  
+ + Modified: haiku/trunk/docs/welcome/gui.html =================================================================== --- haiku/trunk/docs/welcome/gui.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/gui.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,32 +1,58 @@ - - - - Haiku's GUI - - - - - - - - - - - - - - - - + + + + + + + + + +
-

Logo

-
-

dummy

-
-

+ + + + Haiku's GUI + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ logo + + logo + + Haiku's GUI +
+ logo + + logo +
  + Welcome +     + Next: Workspaces +  
  + +

Haiku's GUI

-

Haiku's graphical user interface is an integral part of the system. Unlike linux-based operating systems, there's no separate windows manager and just booting into a commandline shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary. +

Haiku's graphical user interface is an integral part of the system. Unlike unix-based operating systems, there's no separate window manager and booting just into a command line shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary.

As you probably have experience with other graphical environments, let's skip over the standards like menus, right-click context menus, drag&drop etc. Let's have a look at the few unique aspects of Haiku's GUI instead.


Before we start with that, there's one more thing you'll probably run into quite quickly: By default, Haiku's option key, to invoke commands from menus for example, is not the usual CTRL key, but ALT instead. This has historical reasons, because the BeOS was inspired somewhat by MacOS. After you get used to it, it actually feels better as e.g. ALT+C and ALT+V is reached more conveniently on the keyboard and these commands seemlessly integrate into the bash shell of the Terminal. @@ -42,11 +68,27 @@

  • You minimize a window with a double-click on its tab. A such hidden window can be accessed by its entry in the Deskbar or the Twitcher.
  • You can send a window to the back with a right-click on its tab (or its border).
  • [3] The close button.
    -[4] The maximise button.
    +[4] The "alternative size" button (expands window to full screen in most applications).
    [5] The resize button. Dragging anywhere else on a window's border will move the window.

    That's pretty much all there is to Haiku's GUI widgets in general. You'll find more information in Getting to know the system.

    -
    - - + +
    + +
     
      + Welcome +     + Next: Workspaces +
    + + Modified: haiku/trunk/docs/welcome/index.html =================================================================== --- haiku/trunk/docs/welcome/index.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/index.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,29 +1,57 @@ - - - - The Index - - - - - - - - - - - - - - - - + + + + + + + + + +
    -

    Logo

    -
    -

    dummy

    -
    + + + + The Index + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + The Index +
    + logo + + logo +
      + Welcome +     + Previous: File Attributes +     + Next: Queries +  
      +

    The Index

    @@ -110,7 +138,23 @@ If no volume is specified, the volume of the current directory is assumed. -

    - - + +
     
      + Welcome +     + Previous: File Attributes +     + Next: Queries +  
    + + Modified: haiku/trunk/docs/welcome/queries.html =================================================================== --- haiku/trunk/docs/welcome/queries.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/queries.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,32 +1,58 @@ - - - - Queries - - - - - - - - - - - - - - - - + + + + + + + + + +
    -

    Logo

    -
    -

    dummy

    -
    -

    + + + + Queries + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + Queries +
    + logo + + logo +
      + Welcome +     + Previous: The Index +  
      + +

    Queries

    -

    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 list of your search, but are the query formulas which trigger a new search whenever you open them. +

    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

    @@ -111,7 +137,23 @@

    Open /boot/home/config/settings/Tracker/DefaultQueryTemplates, create a new folder and rename it to group/filetype, replacing slashes with underscores, e.g."audio_x-mp3". Open the new folder and paste in the layout with Attributes | Paste Attributes.

    -
    - - + +
    + +
     
      + Welcome +     + Previous: The Index +  
    + + Modified: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,30 +1,58 @@ - - - - The Tracker - - - - - - - - - - - - - - - - + + + + + + + + + +
    -

    Logo

    -
    -

    dummy

    -
    -

    + + + + The Tracker + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + The Tracker +
    + logo + + logo +
      + Welcome +     + Previous: The Twitcher +     + Next: The Deskbar +  
      + +

    The Tracker

    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 e.g. crashed or frozen Tracker is to call the TeamManager with CTRL+ALT+DEL to kill Tracker and then click the Restart Desktop... button. The same brings back a wayward Deskbar. @@ -73,9 +101,9 @@

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

    • Icon View (ALT+1) - Big icons, you can change the size from the submenu.
    • Mini Icon View (ALT+2) - Small icons.
    • -
    • List View (ALT+3) - A detailed list of your files enabling you to show/hide available attributes.
    +
  • List View (ALT+3) - A detailed list of your files enabling you to show/hide available attributes. (See topic File Attributes.)
  • The Window menu offers a number of other functions: -

    • Resize Window (ALT+Y) - Resizes the window to its ideal size
    • +
      • Resize Window (ALT+Y) - Resizes the window to its ideal size.
      • Clean Up (ALT+K) - Aligns all icons to an invisible grid. Hold down SHIFT and the menu becomes Clean Up All which additionally sorts all icons alphabetically.
      • Select... (SHIFT+ALT+A) - Select files according to a regular expression.
      @@ -83,14 +111,14 @@


      Tracker preferences

      -

      Window | Preferences... opens a panel that offers a number of setting that, where not obvious, should become clear once tried out. Since all settings a re applied live, you'll immediately see the changes. +

      Window | Preferences... opens a panel that offers a number of setting that, where not obvious, should become clear once tried out. Since all settings are applied live, you'll immediately see the changes.
      So, in short, the not so obvious settings:

      • Desktop - Decide if all mounted disks appear directly on the Desktop or in a window after clicking a single Disk icon sitting on the Desktop.
      • -
      • Windows - You can set Single Window Navigation, i.e. a double-clicked folder doesn't open in its own window, but inside its parent instead. This is not the same as clicking while holding the WIN key, as described above, because you'll lose the per window saved position and size. -
        +
      • Windows - You can set Single Window Navigation, i.e. a double-clicked folder doesn't open in its own window, but inside the already open window instead, replacing the view of it's parent folder. This is not the same as clicking while holding the WIN key, as described above, because you'll lose the per window saved position and size. +

        tracker-preferences-navigator.png

        -On the other hand, single window browsing offers a Navigator where you can enter or copy&paste a path name and use back, forward and up buttons.

      • +Before you switch Tracker to Single Window Navigation mode, because that may feel more familiar to you, we recommend giving the menu based browsing a try first, as that may actually work much faster for you after getting used to. On the other hand, single window browsing offers a Navigator where you can enter or copy&paste a path name and use back, forward and up buttons.

      • Date and Time - Set date and time formats.
      • Trash - Set the behaviour when deleting a file.
      • Volume Icons - Set the colour of an optional indicator of free space that's shown besides a disk's icon.
      • @@ -101,7 +129,7 @@

        When invoked on a selected file, the File menu offers about the same options as when you open a context menu by right-clicking the file. Exceptions are commands that don't specifically target a selected file, like Find.. or New....

        As usual the usage of the commands is pretty clear, so we'll concentrate on the niftier parts.

        • Find... - Find a file or folder. See topic Query for more info.
        • -
        • New... - Create a new folder or any other file after a template. +
        • New... - Create a new folder or any other file based on a template.

          new-menu.png

          Choosing Edit Templates... opens the folder /boot/home/config/settings/Tracker/Tracker New Templates. Creating a file in that folder will offer its filetype with the file's name and other attributes as template in the New... menu. Here, there's a file "Text" with the filetype text/plain. See topic Filetypes for more info.

        • @@ -111,8 +139,24 @@

          The preferred application that would open the file when double-clicked, is checkmarked. In this submenu are only those applications listed that deal with the exact filetype, in this case it's a text file, the type text/plain. If you don't click on an app in the submenu, but on Open With... a panel opens:

          open-with-preferred -

          -

    - - +

    + +
     
      + Welcome +     + Previous: The Twitcher +     + Next: The Deskbar +  
    + + Modified: haiku/trunk/docs/welcome/twitcher.html =================================================================== --- haiku/trunk/docs/welcome/twitcher.html 2008-10-07 18:36:28 UTC (rev 27906) +++ haiku/trunk/docs/welcome/twitcher.html 2008-10-07 21:04:11 UTC (rev 27907) @@ -1,29 +1,57 @@ - - - - The Twitcher - - - - - - - - - - - - - - - - + + + +
    -

    Logo

    -
    -

    dummy

    -
    + + + + The Twitcher + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + The Twitcher +
    + logo + + logo +
      + Welcome +     + Previous: Workspaces +     + Next: The Tracker +  
      +

    The Twitcher

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

    @@ -33,7 +61,13 @@

    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 CURSOR LEFT/RIGHT. 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 CURSOR UP/DOWN 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.

    -
    - - + +
    + +
     
    + + Deleted: haiku/trunk/docs/welcome/welcome-images/dummy.png Added: haiku/trunk/docs/welcome/welcome-images/logo_lb.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/welcome-images/logo_lb.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/welcome-images/logo_lt.png =================================================================== (Binary files differ) [... truncated: 408 lines follow ...] From stippi at mail.berlios.de Tue Oct 7 23:30:39 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Tue, 7 Oct 2008 23:30:39 +0200 Subject: [Haiku-commits] r27911 - haiku/trunk/data/artwork Message-ID: <200810072130.m97LUd1N010985@sheep.berlios.de> Author: stippi Date: 2008-10-07 23:30:25 +0200 (Tue, 07 Oct 2008) New Revision: 27911 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27911&view=rev Added: haiku/trunk/data/artwork/HAIKU logo - black on white - normal haiku/trunk/data/artwork/HAIKU logo - black on white - normal.png haiku/trunk/data/artwork/HAIKU logo - website - everything haiku/trunk/data/artwork/HAIKU logo - website - logo haiku/trunk/data/artwork/HAIKU logo - website - navigaion haiku/trunk/data/artwork/HAIKU logo - welcome haiku/trunk/data/artwork/HAIKU logo - white on blue - medium haiku/trunk/data/artwork/HAIKU logo - white on blue - medium.png haiku/trunk/data/artwork/HAIKU logo - white on blue - normal haiku/trunk/data/artwork/HAIKU logo - white on blue - normal.png Removed: haiku/trunk/data/artwork/HAIKU logo - white on blue - small haiku/trunk/data/artwork/HAIKU logo - white on blue - small.png Log: * Renamed "white on blue - small" to "normal". * Added "black on white - normal" size. * Added the website logo area designs. * Added the variation of the website logo that I did for the welcome introduction. Added: haiku/trunk/data/artwork/HAIKU logo - black on white - normal =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - black on white - normal ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - black on white - normal.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - black on white - normal.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - website - everything =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - website - everything ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - website - logo =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - website - logo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - website - navigaion =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - website - navigaion ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - welcome =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - welcome ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - white on blue - medium =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - white on blue - medium ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/HAIKU logo - white on blue - medium.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/HAIKU logo - white on blue - medium.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Copied: haiku/trunk/data/artwork/HAIKU logo - white on blue - normal (from rev 27508, haiku/trunk/data/artwork/HAIKU logo - white on blue - small) Copied: haiku/trunk/data/artwork/HAIKU logo - white on blue - normal.png (from rev 27508, haiku/trunk/data/artwork/HAIKU logo - white on blue - small.png) Deleted: haiku/trunk/data/artwork/HAIKU logo - white on blue - small Deleted: haiku/trunk/data/artwork/HAIKU logo - white on blue - small.png From bonefish at mail.berlios.de Tue Oct 7 23:39:22 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Tue, 7 Oct 2008 23:39:22 +0200 Subject: [Haiku-commits] r27912 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 Message-ID: <200810072139.m97LdMVP012027@sheep.berlios.de> Author: bonefish Date: 2008-10-07 23:39:19 +0200 (Tue, 07 Oct 2008) New Revision: 27912 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27912&view=rev Modified: haiku/trunk/headers/private/kernel/arch/vm.h haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h haiku/trunk/headers/private/kernel/vm_address_space.h haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp haiku/trunk/src/system/kernel/thread.cpp Log: * Added "from" address space parameter to vm_swap_address_space()/ arch_vm_aspace_swap(). * The x86 implementation does now maintain a bit mask per vm_translation_map_arch_info indicating on which CPUs the address space is active. This allows flush_tmap() to avoid ICI for user address spaces when the team isn't currently running on any other CPU. In this context ICI is relatively expensive, particularly since we map most pages via vm_map_page() and therefore invoke flush_tmap() pretty much for every single page. This optimization speeds up a "hello world" compilation about 20% on my machine (KDEBUG turned off, freshly booted), but interestingly it has virtually no effect on the "-j2" haiku build time. Modified: haiku/trunk/headers/private/kernel/arch/vm.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/vm.h 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/headers/private/kernel/arch/vm.h 2008-10-07 21:39:19 UTC (rev 27912) @@ -27,7 +27,8 @@ status_t arch_vm_init_post_area(struct kernel_args *args); status_t arch_vm_init_end(struct kernel_args *args); status_t arch_vm_init_post_modules(struct kernel_args *args); -void arch_vm_aspace_swap(struct vm_address_space *aspace); +void arch_vm_aspace_swap(struct vm_address_space *from, + struct vm_address_space *to); bool arch_vm_supports_protection(uint32 protection); status_t arch_vm_set_memory_type(struct vm_area *area, addr_t physicalBase, Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/headers/private/kernel/arch/x86/arch_vm_translation_map.h 2008-10-07 21:39:19 UTC (rev 27912) @@ -13,10 +13,11 @@ struct page_directory_entry; - typedef struct vm_translation_map_arch_info { struct page_directory_entry *pgdir_virt; struct page_directory_entry *pgdir_phys; + vint32 active_on_cpus; + // mask indicating on which CPUs the map is currently used int num_invalidate_pages; addr_t pages_to_invalidate[PAGE_INVALIDATE_CACHE_SIZE]; } vm_translation_map_arch_info; Modified: haiku/trunk/headers/private/kernel/vm_address_space.h =================================================================== --- haiku/trunk/headers/private/kernel/vm_address_space.h 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/headers/private/kernel/vm_address_space.h 2008-10-07 21:39:19 UTC (rev 27912) @@ -34,7 +34,7 @@ team_id vm_current_user_address_space_id(void); struct vm_address_space *vm_get_address_space(team_id team); void vm_put_address_space(struct vm_address_space *aspace); -#define vm_swap_address_space(aspace) arch_vm_aspace_swap(aspace) +#define vm_swap_address_space(from, to) arch_vm_aspace_swap(from, to) #ifdef __cplusplus } Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -29,7 +29,7 @@ #warning M68K: WRITEME -status_t +status_t arch_vm_init(kernel_args *args) { return B_OK; @@ -62,7 +62,7 @@ #if 0 TRACE(("arch_vm_init_end(): %lu virtual ranges to keep:\n", args->arch_args.num_virtual_ranges_to_keep)); - + for (int i = 0; i < (int)args->arch_args.num_virtual_ranges_to_keep; i++) { addr_range &range = args->arch_args.virtual_ranges_to_keep[i]; @@ -102,11 +102,10 @@ } -void -arch_vm_aspace_swap(vm_address_space *aspace) +void +arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to) { - m68k_set_pgdir(m68k_translation_map_get_pgdir( - &aspace->translation_map)); + m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->translation_map)); } Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -24,7 +24,7 @@ #endif -status_t +status_t arch_vm_init(kernel_args *args) { return B_OK; @@ -105,7 +105,7 @@ { TRACE(("arch_vm_init_end(): %lu virtual ranges to keep:\n", args->arch_args.num_virtual_ranges_to_keep)); - + for (int i = 0; i < (int)args->arch_args.num_virtual_ranges_to_keep; i++) { addr_range &range = args->arch_args.virtual_ranges_to_keep[i]; @@ -143,8 +143,8 @@ } -void -arch_vm_aspace_swap(vm_address_space *aspace) +void +arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to) { } Modified: haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -358,9 +358,22 @@ newPageDirectory = (addr_t)x86_next_page_directory(from, to); - if ((newPageDirectory % B_PAGE_SIZE) != 0) - panic("arch_thread_context_switch: bad pgdir 0x%lx\n", newPageDirectory); + ASSERT((newPageDirectory % B_PAGE_SIZE) == 0); + if (newPageDirectory != 0) { + // update on which CPUs the address space is used + int cpu = smp_get_current_cpu(); + if (vm_address_space* addressSpace = from->team->address_space) { + atomic_and(&addressSpace->translation_map.arch_data->active_on_cpus, + ~((uint32)1 << cpu)); + } + + if (vm_address_space* addressSpace = to->team->address_space) { + atomic_or(&addressSpace->translation_map.arch_data->active_on_cpus, + (uint32)1 << cpu); + } + } + gX86SwapFPUFunc(from->arch_info.fpu_state, to->arch_info.fpu_state); i386_context_switch(&from->arch_info, &to->arch_info, newPageDirectory); } Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -8,10 +8,15 @@ */ +#include +#include + #include + #include #include #include +#include #include #include @@ -21,10 +26,7 @@ #include -#include -#include - //#define TRACE_ARCH_VM #ifdef TRACE_ARCH_VM # define TRACE(x) dprintf x @@ -382,10 +384,21 @@ void -arch_vm_aspace_swap(vm_address_space *aspace) +arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to) { + int cpu = smp_get_current_cpu(); + if (from != NULL) { + atomic_and(&from->translation_map.arch_data->active_on_cpus, + ~((uint32)1 << cpu)); + } + + if (to != NULL && to != vm_kernel_address_space()) { + atomic_or(&to->translation_map.arch_data->active_on_cpus, + (uint32)1 << cpu); + } + i386_swap_pgdir((addr_t)i386_translation_map_get_pgdir( - &aspace->translation_map)); + &to->translation_map)); } Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -662,12 +662,18 @@ if (IS_KERNEL_MAP(map)) { arch_cpu_global_TLB_invalidate(); - smp_send_broadcast_ici(SMP_MSG_GLOBAL_INVALIDATE_PAGES, 0, 0, 0, NULL, - SMP_MSG_FLAG_SYNC); + smp_send_broadcast_ici(SMP_MSG_GLOBAL_INVALIDATE_PAGES, 0, 0, 0, + NULL, SMP_MSG_FLAG_SYNC); } else { arch_cpu_user_TLB_invalidate(); - smp_send_broadcast_ici(SMP_MSG_USER_INVALIDATE_PAGES, 0, 0, 0, NULL, - SMP_MSG_FLAG_SYNC); + + int cpu = smp_get_current_cpu(); + uint32 cpuMask = map->arch_data->active_on_cpus + & ~((uint32)1 << cpu); + if (cpuMask != 0) { + smp_send_multicast_ici(cpuMask, SMP_MSG_USER_INVALIDATE_PAGES, + 0, 0, 0, NULL, SMP_MSG_FLAG_SYNC); + } } } else { TRACE(("flush_tmap: %d pages to invalidate, invalidate list\n", @@ -675,10 +681,23 @@ arch_cpu_invalidate_TLB_list(map->arch_data->pages_to_invalidate, map->arch_data->num_invalidate_pages); - smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST, - (uint32)map->arch_data->pages_to_invalidate, - map->arch_data->num_invalidate_pages, 0, NULL, - SMP_MSG_FLAG_SYNC); + + if (IS_KERNEL_MAP(map)) { + smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST, + (uint32)map->arch_data->pages_to_invalidate, + map->arch_data->num_invalidate_pages, 0, NULL, + SMP_MSG_FLAG_SYNC); + } else { + int cpu = smp_get_current_cpu(); + uint32 cpuMask = map->arch_data->active_on_cpus + & ~((uint32)1 << cpu); + if (cpuMask != 0) { + smp_send_multicast_ici(cpuMask, SMP_MSG_INVALIDATE_PAGE_LIST, + (uint32)map->arch_data->pages_to_invalidate, + map->arch_data->num_invalidate_pages, 0, NULL, + SMP_MSG_FLAG_SYNC); + } + } } map->arch_data->num_invalidate_pages = 0; @@ -777,6 +796,7 @@ return B_NO_MEMORY; } + map->arch_data->active_on_cpus = 0; map->arch_data->num_invalidate_pages = 0; if (!kernel) { Modified: haiku/trunk/src/system/kernel/thread.cpp =================================================================== --- haiku/trunk/src/system/kernel/thread.cpp 2008-10-07 21:30:25 UTC (rev 27911) +++ haiku/trunk/src/system/kernel/thread.cpp 2008-10-07 21:39:19 UTC (rev 27912) @@ -1441,7 +1441,7 @@ RELEASE_TEAM_LOCK(); // swap address spaces, to make sure we're running on the kernel's pgdir - vm_swap_address_space(vm_kernel_address_space()); + vm_swap_address_space(team->address_space, vm_kernel_address_space()); restore_interrupts(state); TRACE(("thread_exit: thread %ld now a kernel thread!\n", thread->id)); From julun at mail.berlios.de Tue Oct 7 23:40:42 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Tue, 7 Oct 2008 23:40:42 +0200 Subject: [Haiku-commits] r27913 - haiku/trunk/src/bin Message-ID: <200810072140.m97Legpc012259@sheep.berlios.de> Author: julun Date: 2008-10-07 23:40:39 +0200 (Tue, 07 Oct 2008) New Revision: 27913 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27913&view=rev Modified: haiku/trunk/src/bin/hey.cpp Log: * whitespace cleanup Modified: haiku/trunk/src/bin/hey.cpp =================================================================== --- haiku/trunk/src/bin/hey.cpp 2008-10-07 21:39:19 UTC (rev 27912) +++ haiku/trunk/src/bin/hey.cpp 2008-10-07 21:40:39 UTC (rev 27913) @@ -10,7 +10,7 @@ // "hey Becasso get AspectRatio of Canvas 0" // outputs // Reply BMessage(B_REPLY): -// "result" (B_DOUBLE_TYPE) : 0.600 +// "result" (B_DOUBLE_TYPE) : 0.600 // but "hey -o Becasso get AspectRatio of Canvas 0" // outputs 0.600000 directly. // @@ -43,7 +43,7 @@ // Suites B_GET_PROPERTY DIRECT // Messenger B_GET_PROPERTY DIRECT // InternalName B_GET_PROPERTY DIRECT -// +// // name value kind // -------------------------------------------------------------------------------- // Backup 0x6261636B ('back') COMMAND @@ -52,7 +52,7 @@ // Usage: Stops the current operation... // Type Code 0x74797065 ('type') TYPE CODE // Usage: Type code info... -// +// // You can also use the application defined commands (as the verb) with hey: // hey MyBackupApp Backup "Maui" // @@ -62,7 +62,7 @@ // more like english, bare reverse-index-specifiers are now handled, and // named specifiers can contain only digits by quoting it (but make sure the // shell passed the quotes through). -// +// // Hey(target,const char*,reply) was previously limited to 100 tokens. It // now uses a vector<> so it's only limited by available memory. // @@ -90,15 +90,15 @@ // // The range specifier sent to the target was 1 greater than it should've been. Fixed. // -// 'hey' made the assumption that the first thread in a team will be the -// application thread (and therefore have the application's name). +// 'hey' made the assumption that the first thread in a team will be the +// application thread (and therefore have the application's name). // This was not always the case. Fix from Scott Lindsey . // -//v1.1.0: Flattened BPropertyInfo is printed if found in the reply of B_GET_SUPPORTED_SUITES -// 1,2,3 and 4 character message constant is supported (e.g. '1', '12', '123', '1234') -// Alpha is sent with rgb_color +//v1.1.0: Flattened BPropertyInfo is printed if found in the reply of B_GET_SUPPORTED_SUITES +// 1,2,3 and 4 character message constant is supported (e.g. '1', '12', '123', '1234') +// Alpha is sent with rgb_color // -//v1.0.0 First public release +//v1.0.0 First public release #include @@ -141,33 +141,33 @@ parse(BMessenger& the_application, int argc, char *argv[], int32 argapp) { if (!the_application.IsValid()) { - if (!silent) + if (!silent) fprintf(stderr, "Cannot find the application (%s)\n", argv[argapp]); return B_ERROR; } if (argc < 3) { - if (!silent) + if (!silent) fprintf(stderr, "Cannot find the verb!\n"); return B_ERROR; } - + BMessage the_reply; int32 argx = argapp+1; status_t err = Hey(&the_application, argv, &argx, argc, &the_reply); if (err != B_OK) { - if (!silent) + if (!silent) fprintf(stderr, "Error when sending message to %s!\n", argv[argapp]); return B_ERROR; } else { if (the_reply.what == (uint32)B_MESSAGE_NOT_UNDERSTOOD || the_reply.what==(uint32)B_ERROR){ // I do it myself if (the_reply.HasString("message")){ - if (!silent) + if (!silent) printf("%s (error 0x%8lX)\n", the_reply.FindString("message"), the_reply.FindInt32("error")); } else { - if (!silent) + if (!silent) printf("error 0x%8lX\n", the_reply.FindInt32("error")); } return 1; @@ -231,7 +231,7 @@ return B_OK; } -int +int main(int argc, char *argv[]) { BApplication app("application/x-amezei-hey"); @@ -250,14 +250,14 @@ " -o: output result to stdout for easy parsing\n\n", VERSION); // Updated Usage string to reflect "do", "the", bare -index, and '"name"' changes below // -- pfolk at uni.uiuc.edu 1999-11-03 - + return 1; } - + int32 argapp = 1; silent = false; output = false; - + // Updated option mechanism --SS for (int i = 0; i < argc; i++) { if (strcmp(argv[i], "-s")==0 || strcmp(argv[i], "-S")==0){ @@ -303,25 +303,25 @@ } } } - + return 1; } -int32 +int32 HeyInterpreterThreadHook(void* arg) { if (!arg) return 1; - + BMessage environment(*(BMessage*) arg); char* prompt = "Hey"; - if (environment.HasString("prompt")) + if (environment.HasString("prompt")) environment.FindString("prompt", (const char **)&prompt); printf("%s> ", prompt); - + BMessenger target; - if (environment.HasMessenger("Target")) + if (environment.HasMessenger("Target")) environment.FindMessenger("Target", &target); char command[1024]; @@ -337,11 +337,11 @@ } printf("%s> ", prompt); } - + return 0; } -status_t +status_t Hey(BMessenger* target, const char* arg, BMessage* reply) { BList argv; // number of tokens is now limited only by memory -- pfolk at uni.uiuc.edu 1999-11-03 @@ -350,19 +350,19 @@ int32 tokenNdex = 0; int32 argNdex = 0; bool inquotes = false; - + while (arg[argNdex] != 0) { // for each character in arg - if (arg[argNdex] == '\"') + if (arg[argNdex] == '\"') inquotes = !inquotes; if (!inquotes && isSpace(arg[argNdex])) { // if the character is white space if (tokenNdex!=0) { // close off currentToken token - currentToken[tokenNdex] = 0; + currentToken[tokenNdex] = 0; argv.AddItem(currentToken); currentToken += tokenNdex+1; tokenNdex=0; argNdex++; } else { // just skip the whitespace - argNdex++; + argNdex++; } } else { // copy char into current token currentToken[tokenNdex] = arg[argNdex]; @@ -370,13 +370,13 @@ argNdex++; } } - + if (tokenNdex!=0) { // close off currentToken token - currentToken[tokenNdex] = 0; + currentToken[tokenNdex] = 0; argv.AddItem(currentToken); } argv.AddItem(NULL); - + int32 argx = 0; status_t ret = Hey(target, (char **)argv.Items(), &argx, argv.CountItems()-1, reply); // This used to be "return Hey(...);"---so tokens wasn't delete'd. -- pfolk at uni.uiuc.edu 1999-11-03 @@ -385,7 +385,7 @@ } -bool +bool isSpace(char c) { switch (c) { @@ -399,7 +399,7 @@ } -status_t +status_t Hey(BMessenger* target, char* argv[], int32* argx, int32 argc, BMessage* reply) { bool direct_what = false; @@ -412,26 +412,26 @@ status_t result=B_OK; while ((result = add_specifier(&get_target, argv, argx, argc))==B_OK) ; - + if (result!=B_ERROR){ // bad syntax - if (!silent) + if (!silent) fprintf(stderr, "Bad specifier syntax!\n"); return result; } BMessage msgr; if (target && target->IsValid()) { result = target->SendMessage(&get_target, &msgr); - if (result!=B_OK) + if (result!=B_OK) return result; result = msgr.FindMessenger ("result", target); if (result!=B_OK) { - if (!silent) + if (!silent) fprintf(stderr, "Couldn't retrieve the BMessenger!\n"); return result; } } if (!argv[*argx]) { - if (!silent) + if (!silent) fprintf(stderr, "Syntax error - forgot \"do\"?\n"); return B_ERROR; } @@ -467,7 +467,7 @@ case 3: the_message.what=(((int32)argv[*argx][0])<<16)|(((int32)argv[*argx][1])<<8)|(((int32)argv[*argx][2])); break; - case 4: + case 4: the_message.what=(((int32)argv[*argx][0])<<24)|(((int32)argv[*argx][1])<<16)|(((int32)argv[*argx][2])<<8)|(((int32)argv[*argx][3])); break; default: @@ -483,11 +483,11 @@ BPropertyInfo propinfo; const value_info *vinfo; int32 vinfo_index, vinfo_count; - + // const char *str; // while (rply.FindString("suites", j++, &str) == B_OK) // printf ("Suite %ld: %s\n", j, str); -// +// // j = 0; while(rply.FindData("messages", B_PROPERTY_INFO_TYPE, j++, (const void **)&voidptr, &sizefound)==B_OK && !found){ if(propinfo.Unflatten(B_PROPERTY_INFO_TYPE, (const void *)voidptr, sizefound)==B_OK){ @@ -497,11 +497,11 @@ #if TEST_VALUEINFO>0 value_info vinfo[10]={ {"Backup", 'back', B_COMMAND_KIND, "This command backs up your hard drive."}, {"Abort", 'abor', B_COMMAND_KIND, "Stops the current operation..."}, - {"Type Code", 'type', B_TYPE_CODE_KIND, "Type code info..."} + {"Type Code", 'type', B_TYPE_CODE_KIND, "Type code info..."} }; vinfo_count=3; #endif - + while(vinfo_index if ((the_message.what==B_SET_PROPERTY || the_message.what==B_REFS_RECEIVED) && argv[*argx]!=NULL){ if (strcasecmp(argv[*argx], "to")==0) { @@ -557,10 +557,10 @@ result = add_data(&the_message, argv, argx); if (result!=B_OK) { if (result==B_FILE_NOT_FOUND){ - if (!silent) + if (!silent) fprintf(stderr, "File not found!\n"); } else { - if (!silent) + if (!silent) fprintf(stderr, "Invalid 'to...' value format!\n"); } return result; @@ -568,7 +568,7 @@ } add_with(&the_message, argv, argx, argc); - + #if DEBUG_HEY>0 fprintf(stderr, "Send "); print_message(&the_message); @@ -587,7 +587,7 @@ // There can be a with =() [and = ...] // I treat "and" just the same as "with", it's just to make the script syntax more English-like. -status_t +status_t add_with(BMessage *to_message, char *argv[], int32 *argx, int32 argc) { status_t result = B_OK; @@ -601,10 +601,10 @@ result=add_data(to_message, argv, argx); if (result!=B_OK){ if (result==B_FILE_NOT_FOUND){ - if (!silent) + if (!silent) fprintf(stderr, "File not found!\n"); } else { - if (!silent) + if (!silent) fprintf(stderr, "Invalid 'with...' value format!\n"); } return result; @@ -613,7 +613,7 @@ // printf ("argc = %d, argv[%d] = %s\n", argc, *argx, argv[*argx]); if (*argx < argc - 1 && strcasecmp(argv[*argx], "and")==0) { (*argx)++; - } else + } else done = true; } while (!done); } @@ -621,47 +621,47 @@ return result; } -// returns B_OK if successful +// returns B_OK if successful // B_ERROR if no more specifiers // B_BAD_SCRIPT_SYNTAX if syntax error -status_t +status_t add_specifier(BMessage *to_message, char *argv[], int32 *argx, int32 argc) { char *property=argv[*argx]; - + if (property==NULL) return B_ERROR; // no more specifiers - + (*argx)++; - + if (strcasecmp(property, "do")==0){ // Part of the "hey App let Specifier do Verb". return B_ERROR; // no more specifiers } - + if (strcasecmp(property, "to")==0){ // it is the 'to' string!!! return B_ERROR; // no more specifiers } - + if (strcasecmp(property, "with")==0){ // it is the 'with' string!!! *argx -= 2; add_with (to_message, argv, argx, argc); return B_ERROR; // no more specifiers } - + if (strcasecmp(property, "of")==0){ // skip "of", read real property property = argv[*argx]; - if (property==NULL) + if (property==NULL) return B_BAD_SCRIPT_SYNTAX; // bad syntax (*argx)++; } - + if (strcasecmp(property, "the")==0){ // skip "the", read real property -- pfolk at uni.uiuc.edu 1999-11-03 property = argv[*argx]; - if (property==NULL) + if (property==NULL) return B_BAD_SCRIPT_SYNTAX; // bad syntax (*argx)++; } - + // decide the specifier char *specifier = NULL; @@ -678,12 +678,12 @@ if (strcasecmp(specifier, "of")==0){ // direct specifier to_message->AddSpecifier(property); - return B_OK; + return B_OK; } if (strcasecmp(specifier, "to")==0){ // direct specifier to_message->AddSpecifier(property); - return B_ERROR; // no more specifiers + return B_ERROR; // no more specifiers } @@ -700,14 +700,14 @@ ix1 = strtoul(specifier+1, &end, 10); if (end[0]==']'){ // it was an index to_message->AddSpecifier(property, ix1); - return B_OK; + return B_OK; } else { specifier=argv[*argx]; if (specifier==NULL){ // I was wrong, it was just an index to_message->AddSpecifier(property, ix1); - return B_OK; - } + return B_OK; + } (*argx)++; if (strcasecmp(specifier, "to")==0){ specifier = argv[*argx]; @@ -717,7 +717,7 @@ (*argx)++; ix2 = strtoul(specifier, &end, 10); to_message->AddSpecifier(property, ix1, ix2-ix1>0 ? ix2-ix1 : 1); - return B_OK; + return B_OK; } else { return B_BAD_SCRIPT_SYNTAX; // wrong syntax } @@ -735,7 +735,7 @@ break; } } - + if (index_spec){ if (reverse) { // Copied from above -- pfolk at uni.uiuc.edu 1999-11-03 @@ -744,7 +744,7 @@ revspec.AddInt32("index", atol(specifier+1)); to_message->AddSpecifier(&revspec); } - else + else to_message->AddSpecifier(property, atol(specifier)); } else { // Allow any name by counting an initial " as a literal-string indicator @@ -758,19 +758,19 @@ to_message->AddSpecifier(property, specifier); } } - + return B_OK; } -status_t +status_t add_data(BMessage *to_message, char *argv[], int32 *argx) { char *valuestring=argv[*argx]; - - if (valuestring==NULL) + + if (valuestring==NULL) return B_ERROR; - + // try to interpret it as an integer or float bool contains_only_digits = true; bool is_floating_point = false; @@ -796,7 +796,7 @@ return B_OK; } } - + // if true or false, it is bool if (strcasecmp(valuestring, "true")==0){ to_message->AddBool("data", true); @@ -812,12 +812,12 @@ #define MAX_NAME_LENGTH 128 char curname[MAX_NAME_LENGTH]; strcpy (curname, "data"); // This is the default. - + char *s = valuestring; while (*++s && *s != '=') // Look for a '=' character... ; - if (*s == '=') { // We found a = + if (*s == '=') { // We found a = *s = 0; strcpy (curname, valuestring); // Use the new valuestring = s + 1; // Reposition the valuestring ptr. @@ -879,7 +879,7 @@ } } } - + to_message->AddRect(curname, BRect(l,t,r,b)); return B_OK; } else if (strncasecmp(valuestring, "rgb_color", strlen("rgb_color"))==0){ @@ -898,26 +898,26 @@ } } } - + to_message->AddData(curname, B_RGB_COLOR_TYPE, &clr, sizeof(rgb_color)); return B_OK; } else if (strncasecmp(valuestring, "file", strlen("file"))==0){ entry_ref file_ref; - + // remove the last ] or ) if (valuestring[strlen(valuestring)-1]==')' || valuestring[strlen(valuestring)-1]==']'){ valuestring[strlen(valuestring)-1] = 0; } - + if (get_ref_for_path(valuestring+5, &file_ref)!=B_OK){ return B_FILE_NOT_FOUND; } - + // check if the ref is valid BEntry entry; if (entry.SetTo(&file_ref)!=B_OK) return B_FILE_NOT_FOUND; //if(!entry.Exists()) return B_FILE_NOT_FOUND; - + // add both ways, refsreceived needs it as "refs" while scripting needs "data" to_message->AddRef("refs", &file_ref); to_message->AddRef(curname, &file_ref); @@ -937,12 +937,12 @@ } -void +void print_message(BMessage *message) { BList textlist; add_message_contents(&textlist, message, 0); - + char *whatString = get_datatype_string(message->what); printf("BMessage(%s):\n", whatString); free(whatString); @@ -954,7 +954,7 @@ } -void +void add_message_contents(BList *textlist, BMessage *msg, int32 level) { int32 count; @@ -968,13 +968,13 @@ void *voidptr; BMessage a_message; char *textline, *datatype, *content; - + // go though all message data count = msg->CountNames(B_ANY_TYPE); for (i=0; iGetInfo(B_ANY_TYPE, i, &namefound, &typefound); j = 0; - + while (msg->FindData(namefound, typefound, j++, (const void **)&voidptr, &sizefound)==B_OK){ datatype = get_datatype_string(typefound); content = format_data(typefound, (char*)voidptr, sizefound); @@ -984,7 +984,7 @@ textlist->AddItem(textline); delete [] datatype; delete [] content; - + if (typefound==B_MESSAGE_TYPE){ msg->FindMessage(namefound, j-1, &a_message); add_message_contents(textlist, &a_message, level+1); @@ -1002,7 +1002,7 @@ get_datatype_string(int32 type) { char *str = new char[128]; - + switch (type){ case B_ANY_TYPE: strcpy(str, "B_ANY_TYPE"); break; case B_ASCII_TYPE: strcpy(str, "B_ASCII_TYPE"); break; @@ -1107,12 +1107,12 @@ case B_NAME_SPECIFIER : strcpy(str, "B_NAME_SPECIFIER"); break; case B_ERROR : strcpy(str, "B_ERROR"); break; - + default: // unknown id_to_string(type, str); break; } - + return str; } @@ -1139,7 +1139,7 @@ uint8 ui8; BMessage anothermsg; char *tempstr; - + if (size<=0L){ str = new char; *str = 0; @@ -1150,7 +1150,7 @@ case B_MIME_TYPE: case B_ASCII_TYPE: case B_STRING_TYPE: - if (size>512) + if (size>512) size=512; str = new char[size+4]; *str='\"'; @@ -1173,58 +1173,58 @@ strcpy(str, "invalid entry_ref"); } break; - + case B_SSIZE_T_TYPE: case B_INT64_TYPE: str = new char[64]; i64 = *(int64*)ptr; sprintf(str, "%Ld (0x%LX)", i64, i64); break; - + case B_SIZE_T_TYPE: case B_INT32_TYPE: str = new char[64]; i32 = *(int32*)ptr; sprintf(str, "%ld (0x%08lX)", i32, i32); break; - + case B_INT16_TYPE: str = new char[64]; i16 = *(int16*)ptr; sprintf(str, "%d (0x%04X)", i16, i16); break; - + case B_CHAR_TYPE: case B_INT8_TYPE: str = new char[64]; i8 = *(int8*)ptr; sprintf(str, "%d (0x%02X)", i8, i8); break; - + case B_UINT64_TYPE: str = new char[64]; ui64 = *(uint64*)ptr; sprintf(str, "%Lu (0x%LX)", ui64, ui64); break; - + case B_UINT32_TYPE: str = new char[64]; ui32 = *(uint32*)ptr; sprintf(str, "%lu (0x%08lX)", ui32, ui32); break; - + case B_UINT16_TYPE: str = new char[64]; ui16 = *(uint16*)ptr; sprintf(str, "%u (0x%04X)", ui16, ui16); break; - + case B_UINT8_TYPE: str = new char[64]; ui8 = *(uint8*)ptr; sprintf(str, "%u (0x%02X)", ui8, ui8); break; - + case B_BOOL_TYPE: str = new char[10]; if (*ptr){ @@ -1233,36 +1233,36 @@ strcpy(str, "FALSE"); } break; - + case B_FLOAT_TYPE: str = new char[40]; fptr = (float*)ptr; sprintf(str, "%.3f", *fptr); break; - + case B_DOUBLE_TYPE: str = new char[40]; dptr = (double*)ptr; sprintf(str, "%.3f", *dptr); break; - + case B_RECT_TYPE: str = new char[200]; fptr = (float*)ptr; sprintf(str, "BRect(%.1f, %.1f, %.1f, %.1f)", fptr[0], fptr[1], fptr[2], fptr[3]); break; - + case B_POINT_TYPE: str = new char[200]; fptr = (float*)ptr; sprintf(str, "BPoint(%.1f, %.1f)", fptr[0], fptr[1]); break; - case B_RGB_COLOR_TYPE: + case B_RGB_COLOR_TYPE: str = new char[64]; sprintf(str, "Red=%u Green=%u Blue=%u Alpha=%u", ((uint8*)ptr)[0], ((uint8*)ptr)[1], ((uint8*)ptr)[2], ((uint8*)ptr)[3] ); break; - + case B_COLOR_8_BIT_TYPE: str = new char[size*6+4]; *str = 0; @@ -1283,7 +1283,7 @@ strcpy(str, "error when unflattening"); } break; - + case B_PROPERTY_INFO_TYPE: { BPropertyInfo propinfo; if (propinfo.Unflatten(B_PROPERTY_INFO_TYPE, (const void *)ptr, size)==B_OK){ @@ -1308,7 +1308,7 @@ strcat(str, " "); delete [] tempstr; } - + // pad the rest with spaces if (strlen(start)<36){ strcat(str, " "+strlen(start) ); @@ -1329,7 +1329,7 @@ default: strcat(str, " "); break; } } - + // pad the rest with spaces if (strlen(start)<60){ strcat(str, " "+strlen(start) ); @@ -1348,15 +1348,15 @@ for (int32 j = 0; j < 5 && pinfo[pinfo_index].ctypes[i].pairs[j].type != 0; j++) { uint32 type = pinfo[pinfo_index].ctypes[i].pairs[j].type; char str2[4]; - sprintf(str2, "(%s %c%c%c%c)", pinfo[pinfo_index].ctypes[i].pairs[j].name, + sprintf(str2, "(%s %c%c%c%c)", pinfo[pinfo_index].ctypes[i].pairs[j].name, int(type & 0xFF000000) >> 24, - int(type & 0xFF0000) >> 16, + int(type & 0xFF0000) >> 16, int(type & 0xFF00) >> 8, (int)type & 0xFF); strcat(str, str2); } } strcat(str, "\n"); - + // is there usage info? if (pinfo[pinfo_index].usage){ strcat(str, " Usage: "); @@ -1365,29 +1365,29 @@ } } - - + + // handle value infos.... const value_info *vinfo = propinfo.Values(); int32 vinfo_count = propinfo.CountValues(); #if TEST_VALUEINFO>0 value_info vinfo[10] = { {"Backup", 'back', B_COMMAND_KIND, "This command backs up your hard drive."}, {"Abort", 'abor', B_COMMAND_KIND, "Stops the current operation..."}, - {"Type Code", 'type', B_TYPE_CODE_KIND, "Type code info..."} + {"Type Code", 'type', B_TYPE_CODE_KIND, "Type code info..."} }; vinfo_count = 3; #endif if (vinfo && vinfo_count>0){ sprintf(str+strlen(str), "\n name value kind\n--------------------------------------------------------------------------------\n"); - + for (int32 vinfo_index = 0; vinfo_index>8) & 255; uint8 digit3 = (ID) & 255; bool itsvalid = false; - + if (digit0==0){ if (digit1==0){ if (digit2==0) { // 1 digits - if (is_valid_char(digit3) ) + if (is_valid_char(digit3) ) itsvalid=TRUE; sprintf(here, "'%c'", digit3); } else { // 2 digits - if (is_valid_char(digit2) && is_valid_char(digit3) ) + if (is_valid_char(digit2) && is_valid_char(digit3) ) itsvalid=TRUE; sprintf(here, "'%c%c'", digit2, digit3); } } else { // 3 digits - if (is_valid_char(digit1) && is_valid_char(digit2) && is_valid_char(digit3) ) + if (is_valid_char(digit1) && is_valid_char(digit2) && is_valid_char(digit3) ) itsvalid=TRUE; sprintf(here, "'%c%c%c'", digit1, digit2, digit3); } } else { // 4 digits - if (is_valid_char(digit0) && is_valid_char(digit1) && is_valid_char(digit2) && is_valid_char(digit3) ) + if (is_valid_char(digit0) && is_valid_char(digit1) && is_valid_char(digit2) && is_valid_char(digit3) ) itsvalid=TRUE; sprintf(here, "'%c%c%c%c'", digit0, digit1, digit2, digit3); } - + if (!itsvalid){ sprintf(here, "%ldL", ID); } @@ -1483,7 +1483,7 @@ } -bool +bool is_valid_char(uint8 c) { return (c>=32 && c<128); From stippi at mail.berlios.de Tue Oct 7 23:13:36 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Tue, 7 Oct 2008 23:13:36 +0200 Subject: [Haiku-commits] r27909 - haiku/trunk/src/add-ons/tracker/zipomatic Message-ID: <200810072113.m97LDafq009138@sheep.berlios.de> Author: stippi Date: 2008-10-07 23:13:04 +0200 (Tue, 07 Oct 2008) New Revision: 27909 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27909&view=rev Modified: haiku/trunk/src/add-ons/tracker/zipomatic/ZipOMatic.rdef Log: Switched to new Zip-O-Matic icon. Modified: haiku/trunk/src/add-ons/tracker/zipomatic/ZipOMatic.rdef =================================================================== --- haiku/trunk/src/add-ons/tracker/zipomatic/ZipOMatic.rdef 2008-10-07 21:11:06 UTC (rev 27908) +++ haiku/trunk/src/add-ons/tracker/zipomatic/ZipOMatic.rdef 2008-10-07 21:13:04 UTC (rev 27909) @@ -24,24 +24,41 @@ #ifdef HAIKU_TARGET_PLATFORM_HAIKU resource vector_icon { - $"6E6369660E0500040065035D2B0C0385501C0200060238B0AD39B313BC39613B" - $"3C1049FADA48DA6900663200FF834F1C02000602BAC477B68B1E383D42BC6FBF" - $"4A77B34B835900A3784BFF76401C020006023A5A93364779BA1E153E2FD44ABA" - $"0945BA0400E5B07BFFFFCE9E03945F2C02000602B9A55E3826F4BA0888BB71D4" - $"49A1AB4BD47500BE8852FFDCA977020006023A32CCB3AE813614FC3C7C854AB1" - $"F4444C1900FCCC9DFFEEB78103FFDCBA020006023CBAB636B0FDB853093E5B6E" - $"484D0548998100FFE3C7FFF3B476020006023A6157385DA4B8EDF53AF2894AF1" - $"C14968F500FFD5ACFFB0784202000602B56B53389A1FBC6007B91EFD4A160A4B" - $"0820007C4E28FFA175450F0A07405E485E4C605D4BC93CC3195C46544508052A" - $"472A51405C524A52440A0C384E22432A3B223B382E3E2E4526562C52375E3A4C" - $"4C40460A043E2E423E524552360A053E2E423E5245C3ACC2453E410A052A3B3E" - $"2E3E41BC85C2182ABF590A043E41BC85C2184046C162C13E0A0440465234524A" - $"405C0A0340464A4640500A06B7BDC1592E4E4057405C2A512AC1570A04404640" - $"572E4EB7BDC1590A044526562C52373E2E0A042243384E40462A3B0A04223B38" - $"2E3E2E2A3B0A04404652375E3A4C4C0F0A010100000A0001011001178402040A" - $"050107000A020108000A080109000A0D010A000A0001021001178402040A0401" - $"05000A060103000A070104000A030106000A09010B000A0B010C000A0A010D00" - $"0A0C010E00" + $"6E6369660E03010000020006023CC7EE389BC0BA16573E39B04977C84556E300" + $"FFF8EAFFF5DEAC020006023C96323A4D3FBAFC013D5A974B57A54A022600983F" + $"04FFE6C276020006023A492400000000000040000047000044000000FFEFCEFF" + $"FFD16E02000602BB8A46BA62453C0CE4BD0B7C487ECB4BD08500EEBF5AFFFFEB" + $"C0020006023A75293B1661BC4A333BA5424832E349A3B900696363FFFFDCDC03" + $"A7FF0003FF00000401880500020006023A4B0D3BC340BCC6743B61F84AB5F445" + $"A5E200F37676FFE54747020006023C20000000000000003DA00049C000400000" + $"00FFD3D3FFFFACAC03F08888020006023A98DA3A0C94BB067A3BD5924AD38B46" + $"89A100A3043CFFFF90AF130608B2AB445F49C62DC959C521CAC2C755C7C9C7C0" + $"C625CAECC2F2C9BCC48CCC1CC1595F405B3E5943060AEEEA0E234022C1D822C0" + $"BC22C348B40BC4C7B647C63EB4FBC58EB7DDC715B99EC79CB99FC217BEC1BCDC" + $"BBA1BB96BD24BC34BA49BB0AB905BAECB623BD02B766BBBFB4CABE5B0606BA0B" + $"3EBC76C283B89ABF85B784C0FAB80BBE35B70A392ABB83B808BC45B746BA98B8" + $"F3B992B9F9060AEAEE0EBF8DBD1CC6133FC618C550C8A9C274C7A7C3C7C96EC1" + $"7059C0655ABD825ABEEF5ABC61C969BB91C5DCB9D2C7CDBA87C472B94EC33AB9" + $"10C181BA7DC269B9A3C064BB8A060CEEEEEEC59341C221BE88C3E6BF4B42BDDA" + $"BF27BD75BCE0BF91BDFFBE5ABB9DC0EFBA6BC263BA45C4E2BA45C392BA45C684" + $"BA85C84EBD7ACA0EBBD3C92EBF59CB0B44CB67C3C8C8E2C297CA75C4E2C76FC5" + $"A3C5FFC5CEC314C5D2C490C5CAC1970606BA0B444EBA6BC263BA45C4E2BA45C3" + $"92BA45C684BA85C84EBD7ACA0EBBD3C92EBF59CB0B44CB6706076E3BC59341C3" + $"DFC2B9C4ECC16EC2CFC405444ECB67C3C8C8E2C297CA75C4E2C76FC5A3C5FFC5" + $"CEC314C5D2C490C5CAC1970607EE3AC59341C221BE88C3E6BF4B42BDDABF27BD" + $"75BCE0BF91BDFFBE5ABB9DC0EFBA6BC263444EC3DFC2B9C2CFC405C4ECC16E06" + $"06EE0A234022C1D822C0BC22C348B40BC4C7B647C63EB4FBC58EB7DDC715B99E" + $"C79CB99FC2170606EA0E2340B99FC217BEC1BCDCBBA1BB96BD24BC34BA49BB0A" + $"B905BAECB623BD02B766BBBFB4CABE5B0607BA3BBF8DBD1CC6133FC85BBD37C7" + $"75BE3CC91DBC5BC969BB91C5DCB9D2C7CDBA87C472B94EC33AB910C181BA7DC2" + $"69B9A3C064BB8A0607BA3BC6133FC618C550C8A9C274C7A7C3C7C96EC17059C0" + $"655ABD825ABEEF5ABC61C969BB91C85BBD37C91DBC5BC775BE3C0A0A362D322C" + $"2E2E3D3E4A384E34463246253A2236240A074A383D3E2E2EBBC8B9B836244228" + $"C090BB6E0A04322C2E2EBBC8B9B836B8470A0449354E34C213BA0AC090BB6E0A" + $"044A384E344935C090BB6E0A043624422846253A220A0442284236463246250D" + $"0A080100000A0004010203041001178400040A01040709020A000A0202060B00" + $"0A040105000A030108000A09010C1001178400040A0A010D000A0D0112000A0B" + $"0111000A0B010E000A0C010F000A0B011000" }; #else // HAIKU_TARGET_PLATFORM_HAIKU From bonefish at mail.berlios.de Tue Oct 7 23:14:54 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Tue, 7 Oct 2008 23:14:54 +0200 Subject: [Haiku-commits] r27910 - in haiku/trunk: headers/private/kernel src/system/kernel Message-ID: <200810072114.m97LEsiI009261@sheep.berlios.de> Author: bonefish Date: 2008-10-07 23:14:24 +0200 (Tue, 07 Oct 2008) New Revision: 27910 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27910&view=rev Added: haiku/trunk/src/system/kernel/smp.cpp Removed: haiku/trunk/src/system/kernel/smp.c Modified: haiku/trunk/headers/private/kernel/smp.h haiku/trunk/src/system/kernel/Jamfile Log: * smp.c -> smp.cpp * Added smp_send_multicast_ici(), which sends the message to all CPUs specified via a mask. Modified: haiku/trunk/headers/private/kernel/smp.h =================================================================== --- haiku/trunk/headers/private/kernel/smp.h 2008-10-07 21:13:04 UTC (rev 27909) +++ haiku/trunk/headers/private/kernel/smp.h 2008-10-07 21:14:24 UTC (rev 27910) @@ -31,6 +31,8 @@ SMP_MSG_FLAG_FREE_ARG = 0x2, }; +typedef uint32 cpu_mask_t; + typedef void (*smp_call_func)(uint32 data1, int32 currentCPU, uint32 data2, uint32 data3); @@ -46,6 +48,8 @@ void smp_cpu_rendezvous(volatile uint32 *var, int current_cpu); void smp_send_ici(int32 targetCPU, int32 message, uint32 data, uint32 data2, uint32 data3, void *data_ptr, uint32 flags); +void smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, uint32 data, + uint32 data2, uint32 data3, void *data_ptr, uint32 flags); void smp_send_broadcast_ici(int32 message, uint32 data, uint32 data2, uint32 data3, void *data_ptr, uint32 flags); Modified: haiku/trunk/src/system/kernel/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/Jamfile 2008-10-07 21:13:04 UTC (rev 27909) +++ haiku/trunk/src/system/kernel/Jamfile 2008-10-07 21:14:24 UTC (rev 27910) @@ -40,7 +40,7 @@ shutdown.c signal.cpp system_info.cpp - smp.c + smp.cpp syscalls.cpp team.cpp thread.cpp Deleted: haiku/trunk/src/system/kernel/smp.c Copied: haiku/trunk/src/system/kernel/smp.cpp (from rev 27878, haiku/trunk/src/system/kernel/smp.c) =================================================================== --- haiku/trunk/src/system/kernel/smp.c 2008-10-05 15:17:31 UTC (rev 27878) +++ haiku/trunk/src/system/kernel/smp.cpp 2008-10-07 21:14:24 UTC (rev 27910) @@ -0,0 +1,844 @@ +/* + * Copyright 2002-2008, Axel D?rfler, axeld at pinc-software.de. + * Distributed under the terms of the MIT License. + * + * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. + */ + +/* Functionality for symetrical multi-processors */ + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define DEBUG_SPINLOCKS 1 +//#define TRACE_SMP + +#ifdef TRACE_SMP +# define TRACE(x) dprintf x +#else +# define TRACE(x) ; +#endif + +#if __INTEL__ +# define PAUSE() asm volatile ("pause;") +#else +# define PAUSE() +#endif + +#define MSG_POOL_SIZE (SMP_MAX_CPUS * 4) + +struct smp_msg { + struct smp_msg *next; + int32 message; + uint32 data; + uint32 data2; + uint32 data3; + void *data_ptr; + uint32 flags; + int32 ref_count; + volatile bool done; + uint32 proc_bitmap; +}; + +#define MAILBOX_LOCAL 1 +#define MAILBOX_BCAST 2 + +static spinlock boot_cpu_spin[SMP_MAX_CPUS] = { }; + +static struct smp_msg *sFreeMessages = NULL; +static volatile int sFreeMessageCount = 0; +static spinlock sFreeMessageSpinlock = B_SPINLOCK_INITIALIZER; + +static struct smp_msg *sCPUMessages[SMP_MAX_CPUS] = { NULL, }; +static spinlock sCPUMessageSpinlock[SMP_MAX_CPUS]; + +static struct smp_msg *sBroadcastMessages = NULL; +static spinlock sBroadcastMessageSpinlock = B_SPINLOCK_INITIALIZER; + +static bool sICIEnabled = false; +static int32 sNumCPUs = 1; + +static int32 process_pending_ici(int32 currentCPU); + + +#if DEBUG_SPINLOCKS +#define NUM_LAST_CALLERS 32 + +static struct { + void *caller; + spinlock *lock; +} sLastCaller[NUM_LAST_CALLERS]; +static int32 sLastIndex = 0; + + +static void +push_lock_caller(void *caller, spinlock *lock) +{ + sLastCaller[sLastIndex].caller = caller; + sLastCaller[sLastIndex].lock = lock; + + if (++sLastIndex >= NUM_LAST_CALLERS) + sLastIndex = 0; +} + + +static void * +find_lock_caller(spinlock *lock) +{ + int32 i; + + for (i = 0; i < NUM_LAST_CALLERS; i++) { + int32 index = (NUM_LAST_CALLERS + sLastIndex - 1 - i) % NUM_LAST_CALLERS; + if (sLastCaller[index].lock == lock) + return sLastCaller[index].caller; + } + + return NULL; +} +#endif // DEBUG_SPINLOCKS + + +void +acquire_spinlock(spinlock *lock) +{ + if (sNumCPUs > 1) { + int currentCPU = smp_get_current_cpu(); + if (are_interrupts_enabled()) + panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock); +#if B_DEBUG_SPINLOCK_CONTENTION + while (atomic_add(&lock->lock, 1) != 0) + process_pending_ici(currentCPU); +#else + while (1) { + while (*lock != 0) { + process_pending_ici(currentCPU); + PAUSE(); + } + if (atomic_set((int32 *)lock, 1) == 0) + break; + } +#endif + } else { +#if DEBUG_SPINLOCKS + int32 oldValue; + if (are_interrupts_enabled()) + panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock); + oldValue = atomic_set((int32 *)lock, 1); + if (oldValue != 0) { + panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p, value %ld)\n", + lock, find_lock_caller(lock), oldValue); + } + + push_lock_caller(arch_debug_get_caller(), lock); +#endif + } +} + + +static void +acquire_spinlock_nocheck(spinlock *lock) +{ + if (sNumCPUs > 1) { +#if DEBUG_SPINLOCKS + if (are_interrupts_enabled()) + panic("acquire_spinlock_nocheck: attempt to acquire lock %p with interrupts enabled\n", lock); +#endif +#if B_DEBUG_SPINLOCK_CONTENTION + while (atomic_add(&lock->lock, 1) != 0) { + } +#else + while (1) { + while(*lock != 0) + PAUSE(); + if (atomic_set((int32 *)lock, 1) == 0) + break; + } +#endif + } else { +#if DEBUG_SPINLOCKS + if (are_interrupts_enabled()) + panic("acquire_spinlock_nocheck: attempt to acquire lock %p with interrupts enabled\n", lock); + if (atomic_set((int32 *)lock, 1) != 0) + panic("acquire_spinlock_nocheck: attempt to acquire lock %p twice on non-SMP system\n", lock); +#endif + } +} + + +void +release_spinlock(spinlock *lock) +{ + if (sNumCPUs > 1) { + if (are_interrupts_enabled()) + panic("release_spinlock: attempt to release lock %p with interrupts enabled\n", lock); +#if B_DEBUG_SPINLOCK_CONTENTION + { + int32 count = atomic_set(&lock->lock, 0) - 1; + if (count < 0) { + panic("release_spinlock: lock %p was already released\n", lock); + } else { + // add to the total count -- deal with carry manually + if ((uint32)atomic_add(&lock->count_low, count) + count + < (uint32)count) { + atomic_add(&lock->count_high, 1); + } + } + } +#else + if (atomic_set((int32 *)lock, 0) != 1) + panic("release_spinlock: lock %p was already released\n", lock); +#endif + } else { + #if DEBUG_SPINLOCKS + if (are_interrupts_enabled()) + panic("release_spinlock: attempt to release lock %p with interrupts enabled\n", lock); + if (atomic_set((int32 *)lock, 0) != 1) + panic("release_spinlock: lock %p was already released\n", lock); + #endif + } +} + + +/** Finds a free message and gets it. + * NOTE: has side effect of disabling interrupts + * return value is the former interrupt state + */ + +static cpu_status +find_free_message(struct smp_msg **msg) +{ + cpu_status state; + + TRACE(("find_free_message: entry\n")); + +retry: + while (sFreeMessageCount <= 0) + PAUSE(); + state = disable_interrupts(); + acquire_spinlock(&sFreeMessageSpinlock); + + if (sFreeMessageCount <= 0) { + // someone grabbed one while we were getting the lock, + // go back to waiting for it + release_spinlock(&sFreeMessageSpinlock); + restore_interrupts(state); + goto retry; + } + + *msg = sFreeMessages; + sFreeMessages = (*msg)->next; + sFreeMessageCount--; + + release_spinlock(&sFreeMessageSpinlock); + + TRACE(("find_free_message: returning msg %p\n", *msg)); + + return state; +} + + +static void +return_free_message(struct smp_msg *msg) +{ + TRACE(("return_free_message: returning msg %p\n", msg)); + + acquire_spinlock_nocheck(&sFreeMessageSpinlock); + msg->next = sFreeMessages; + sFreeMessages = msg; + sFreeMessageCount++; + release_spinlock(&sFreeMessageSpinlock); +} + + +static struct smp_msg * +check_for_message(int currentCPU, int *source_mailbox) +{ + struct smp_msg *msg; + + if (!sICIEnabled) + return NULL; + + acquire_spinlock_nocheck(&sCPUMessageSpinlock[currentCPU]); + msg = sCPUMessages[currentCPU]; + if (msg != NULL) { + sCPUMessages[currentCPU] = msg->next; + release_spinlock(&sCPUMessageSpinlock[currentCPU]); + TRACE((" cpu %d: found msg %p in cpu mailbox\n", currentCPU, msg)); + *source_mailbox = MAILBOX_LOCAL; + } else { + // try getting one from the broadcast mailbox + + release_spinlock(&sCPUMessageSpinlock[currentCPU]); + acquire_spinlock_nocheck(&sBroadcastMessageSpinlock); + + msg = sBroadcastMessages; + while (msg != NULL) { + if (CHECK_BIT(msg->proc_bitmap, currentCPU) != 0) { + // we have handled this one already + msg = msg->next; + continue; + } + + // mark it so we wont try to process this one again + msg->proc_bitmap = SET_BIT(msg->proc_bitmap, currentCPU); + *source_mailbox = MAILBOX_BCAST; + break; + } + release_spinlock(&sBroadcastMessageSpinlock); + TRACE((" cpu %d: found msg %p in broadcast mailbox\n", currentCPU, msg)); + } + return msg; +} + + +static void +finish_message_processing(int currentCPU, struct smp_msg *msg, int source_mailbox) +{ + int old_refcount; + + old_refcount = atomic_add(&msg->ref_count, -1); + if (old_refcount == 1) { + // we were the last one to decrement the ref_count + // it's our job to remove it from the list & possibly clean it up + struct smp_msg **mbox = NULL; + spinlock *spinlock = NULL; + + // clean up the message from one of the mailboxes + switch (source_mailbox) { + case MAILBOX_BCAST: + mbox = &sBroadcastMessages; + spinlock = &sBroadcastMessageSpinlock; + break; + case MAILBOX_LOCAL: + mbox = &sCPUMessages[currentCPU]; + spinlock = &sCPUMessageSpinlock[currentCPU]; + break; + } + + acquire_spinlock_nocheck(spinlock); + + TRACE(("cleaning up message %p\n", msg)); + + if (msg == *mbox) { + (*mbox) = msg->next; + } else { + // we need to walk to find the message in the list. + // we can't use any data found when previously walking through + // the list, since the list may have changed. But, we are guaranteed + // to at least have msg in it. + struct smp_msg *last = NULL; + struct smp_msg *msg1; + + msg1 = *mbox; + while (msg1 != NULL && msg1 != msg) { + last = msg1; + msg1 = msg1->next; + } + + // by definition, last must be something + if (msg1 == msg && last != NULL) + last->next = msg->next; + else + dprintf("last == NULL or msg != msg1!!!\n"); + } + + release_spinlock(spinlock); + + if ((msg->flags & SMP_MSG_FLAG_FREE_ARG) != 0 && msg->data_ptr != NULL) + free(msg->data_ptr); + + if (msg->flags & SMP_MSG_FLAG_SYNC) { + msg->done = true; + // the caller cpu should now free the message + } else { + // in the !SYNC case, we get to free the message + return_free_message(msg); + } + } +} + + +static int32 +process_pending_ici(int32 currentCPU) +{ + struct smp_msg *msg; + vint32 *haltValue = NULL; + int sourceMailbox = 0; + int retval = B_HANDLED_INTERRUPT; + + msg = check_for_message(currentCPU, &sourceMailbox); + if (msg == NULL) + return retval; + + TRACE((" cpu %ld message = %ld\n", currentCPU, msg->message)); + + switch (msg->message) { + case SMP_MSG_INVALIDATE_PAGE_RANGE: + arch_cpu_invalidate_TLB_range((addr_t)msg->data, (addr_t)msg->data2); + break; + case SMP_MSG_INVALIDATE_PAGE_LIST: + arch_cpu_invalidate_TLB_list((addr_t *)msg->data, (int)msg->data2); + break; + case SMP_MSG_USER_INVALIDATE_PAGES: + arch_cpu_user_TLB_invalidate(); + break; + case SMP_MSG_GLOBAL_INVALIDATE_PAGES: + arch_cpu_global_TLB_invalidate(); + break; + case SMP_MSG_RESCHEDULE: + retval = B_INVOKE_SCHEDULER; + break; + case SMP_MSG_CPU_HALT: + haltValue = (vint32 *)msg->data_ptr; + dprintf("CPU %ld halted!\n", currentCPU); + break; + case SMP_MSG_CALL_FUNCTION: + { + smp_call_func func = (smp_call_func)msg->data_ptr; + func(msg->data, currentCPU, msg->data2, msg->data3); + break; + } + + default: + dprintf("smp_intercpu_int_handler: got unknown message %ld\n", msg->message); + } + + // finish dealing with this message, possibly removing it from the list + finish_message_processing(currentCPU, msg, sourceMailbox); + + // special case for the halt message + if (haltValue) { + cpu_status state = disable_interrupts(); + + while (*haltValue != 0) + PAUSE(); + + restore_interrupts(state); + } + + return retval; +} + + +#if B_DEBUG_SPINLOCK_CONTENTION + +static uint64 +get_spinlock_counter(spinlock* lock) +{ + uint32 high; + uint32 low; + do { + high = (uint32)atomic_get(&lock->count_high); + low = (uint32)atomic_get(&lock->count_low); + } while (high != atomic_get(&lock->count_high)); + + return ((uint64)high << 32) | low; +} + + +static status_t +spinlock_contention_syscall(const char* subsystem, uint32 function, + void* buffer, size_t bufferSize) +{ + spinlock_contention_info info; + + if (function != GET_SPINLOCK_CONTENTION_INFO) + return B_BAD_VALUE; + + if (bufferSize < sizeof(spinlock_contention_info)) + return B_BAD_VALUE; + + info.thread_spinlock_counter = get_spinlock_counter(&gThreadSpinlock); + info.team_spinlock_counter = get_spinlock_counter(&gTeamSpinlock); + + if (!IS_USER_ADDRESS(buffer) + || user_memcpy(buffer, &info, sizeof(info)) != B_OK) { + return B_BAD_ADDRESS; + } + + return B_OK; +} + +#endif // B_DEBUG_SPINLOCK_CONTENTION + + +// #pragma mark - + + +int +smp_intercpu_int_handler(void) +{ + int retval; + int currentCPU = smp_get_current_cpu(); + + TRACE(("smp_intercpu_int_handler: entry on cpu %d\n", currentCPU)); + + retval = process_pending_ici(currentCPU); + + TRACE(("smp_intercpu_int_handler: done\n")); + + return retval; +} + + +void +smp_send_ici(int32 targetCPU, int32 message, uint32 data, uint32 data2, uint32 data3, + void *data_ptr, uint32 flags) +{ + struct smp_msg *msg; + + TRACE(("smp_send_ici: target 0x%lx, mess 0x%lx, data 0x%lx, data2 0x%lx, data3 0x%lx, ptr %p, flags 0x%lx\n", + targetCPU, message, data, data2, data3, data_ptr, flags)); + + if (sICIEnabled) { + int state; + int currentCPU; + + // find_free_message leaves interrupts disabled + state = find_free_message(&msg); + + currentCPU = smp_get_current_cpu(); + if (targetCPU == currentCPU) { + return_free_message(msg); + restore_interrupts(state); + return; // nope, cant do that + } + + // set up the message + msg->message = message; + msg->data = data; + msg->data2 = data2; + msg->data3 = data3; + msg->data_ptr = data_ptr; + msg->ref_count = 1; + msg->flags = flags; + msg->done = false; + + // stick it in the appropriate cpu's mailbox + acquire_spinlock_nocheck(&sCPUMessageSpinlock[targetCPU]); + msg->next = sCPUMessages[targetCPU]; + sCPUMessages[targetCPU] = msg; + release_spinlock(&sCPUMessageSpinlock[targetCPU]); + + arch_smp_send_ici(targetCPU); + + if (flags & SMP_MSG_FLAG_SYNC) { + // wait for the other cpu to finish processing it + // the interrupt handler will ref count it to <0 + // if the message is sync after it has removed it from the mailbox + while (msg->done == false) { + process_pending_ici(currentCPU); + PAUSE(); + } + // for SYNC messages, it's our responsibility to put it + // back into the free list + return_free_message(msg); + } + + restore_interrupts(state); + } +} + + +void +smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, uint32 data, + uint32 data2, uint32 data3, void *data_ptr, uint32 flags) +{ + if (!sICIEnabled) + return; + + int currentCPU = smp_get_current_cpu(); + cpuMask &= ~((cpu_mask_t)1 << currentCPU); + if (cpuMask == 0) + return; + + // count target CPUs + int32 targetCPUs = 0; + for (int32 i = 0; i < sNumCPUs; i++) { + if ((cpuMask & (cpu_mask_t)1 << i) != 0) + targetCPUs++; + } + + // find_free_message leaves interrupts disabled + struct smp_msg *msg; + int state = find_free_message(&msg); + + msg->message = message; + msg->data = data; + msg->data2 = data2; + msg->data3 = data3; + msg->data_ptr = data_ptr; + msg->ref_count = targetCPUs; + msg->flags = flags; + msg->proc_bitmap = ~cpuMask; + msg->done = false; + + // stick it in the broadcast mailbox + acquire_spinlock_nocheck(&sBroadcastMessageSpinlock); + msg->next = sBroadcastMessages; + sBroadcastMessages = msg; + release_spinlock(&sBroadcastMessageSpinlock); + + arch_smp_send_broadcast_ici(); + // TODO: Introduce a call that only bothers the target CPUs! + + if (flags & SMP_MSG_FLAG_SYNC) { + // wait for the other cpus to finish processing it + // the interrupt handler will ref count it to <0 + // if the message is sync after it has removed it from the mailbox + while (msg->done == false) { + process_pending_ici(currentCPU); + PAUSE(); + } + + // for SYNC messages, it's our responsibility to put it + // back into the free list + return_free_message(msg); + } + + restore_interrupts(state); +} + + +void +smp_send_broadcast_ici(int32 message, uint32 data, uint32 data2, uint32 data3, + void *data_ptr, uint32 flags) +{ + struct smp_msg *msg; + + TRACE(("smp_send_broadcast_ici: cpu %ld mess 0x%lx, data 0x%lx, data2 0x%lx, data3 0x%lx, ptr %p, flags 0x%lx\n", + smp_get_current_cpu(), message, data, data2, data3, data_ptr, flags)); + + if (sICIEnabled) { + int state; + int currentCPU; + + // find_free_message leaves interrupts disabled + state = find_free_message(&msg); + + currentCPU = smp_get_current_cpu(); + + msg->message = message; + msg->data = data; + msg->data2 = data2; + msg->data3 = data3; + msg->data_ptr = data_ptr; + msg->ref_count = sNumCPUs - 1; + msg->flags = flags; + msg->proc_bitmap = SET_BIT(0, currentCPU); + msg->done = false; + + TRACE(("smp_send_broadcast_ici%d: inserting msg %p into broadcast mbox\n", + currentCPU, msg)); + + // stick it in the appropriate cpu's mailbox + acquire_spinlock_nocheck(&sBroadcastMessageSpinlock); + msg->next = sBroadcastMessages; + sBroadcastMessages = msg; + release_spinlock(&sBroadcastMessageSpinlock); + + arch_smp_send_broadcast_ici(); + + TRACE(("smp_send_broadcast_ici: sent interrupt\n")); + + if (flags & SMP_MSG_FLAG_SYNC) { + // wait for the other cpus to finish processing it + // the interrupt handler will ref count it to <0 + // if the message is sync after it has removed it from the mailbox + TRACE(("smp_send_broadcast_ici: waiting for ack\n")); + + while (msg->done == false) { + process_pending_ici(currentCPU); + PAUSE(); + } + + TRACE(("smp_send_broadcast_ici: returning message to free list\n")); + + // for SYNC messages, it's our responsibility to put it + // back into the free list + return_free_message(msg); + } + + restore_interrupts(state); + } + + TRACE(("smp_send_broadcast_ici: done\n")); +} + + +bool +smp_trap_non_boot_cpus(int32 cpu) +{ + if (cpu > 0) { +#if B_DEBUG_SPINLOCK_CONTENTION + boot_cpu_spin[cpu].lock = 1; +#else + boot_cpu_spin[cpu] = 1; +#endif + acquire_spinlock_nocheck(&boot_cpu_spin[cpu]); + return false; + } + + return true; +} + + +void +smp_wake_up_non_boot_cpus() +{ + int i; + + // ICIs were previously being ignored + if (sNumCPUs > 1) + sICIEnabled = true; + + // resume non boot CPUs + for (i = 1; i < sNumCPUs; i++) { + release_spinlock(&boot_cpu_spin[i]); + } +} + +/* have all cpus spin until all have run */ +void +smp_cpu_rendezvous(volatile uint32 *var, int current_cpu) +{ + atomic_or((vint32*)var, 1 << current_cpu); + + while (*var != (((uint32)1 << sNumCPUs) - 1)) + PAUSE(); +} + +status_t +smp_init(kernel_args *args) +{ + struct smp_msg *msg; + int i; + + TRACE(("smp_init: entry\n")); + + if (args->num_cpus > 1) { + sFreeMessages = NULL; + sFreeMessageCount = 0; + for (i = 0; i < MSG_POOL_SIZE; i++) { + msg = (struct smp_msg *)malloc(sizeof(struct smp_msg)); + if (msg == NULL) { + panic("error creating smp mailboxes\n"); + return B_ERROR; + } + memset(msg, 0, sizeof(struct smp_msg)); + msg->next = sFreeMessages; + sFreeMessages = msg; + sFreeMessageCount++; + } + sNumCPUs = args->num_cpus; + } + TRACE(("smp_init: calling arch_smp_init\n")); + + return arch_smp_init(args); +} + + +status_t +smp_per_cpu_init(kernel_args *args, int32 cpu) +{ + return arch_smp_per_cpu_init(args, cpu); +} + + +status_t +smp_init_post_generic_syscalls(void) +{ +#if B_DEBUG_SPINLOCK_CONTENTION + return register_generic_syscall(SPINLOCK_CONTENTION, + &spinlock_contention_syscall, 0, 0); +#else + return B_OK; +#endif +} + + +void +smp_set_num_cpus(int32 numCPUs) +{ + sNumCPUs = numCPUs; +} + + +int32 +smp_get_num_cpus() +{ + return sNumCPUs; +} + + +int32 +smp_get_current_cpu(void) +{ + return thread_get_current_thread()->cpu->cpu_num; +} + + +// #pragma mark - +// public exported functions + + +void +call_all_cpus(void (*func)(void *, int), void *cookie) +{ + cpu_status state = disable_interrupts(); + + if (smp_get_num_cpus() > 1) { + smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie, + 0, 0, (void *)func, SMP_MSG_FLAG_ASYNC); + } + + // we need to call this function ourselves as well + func(cookie, smp_get_current_cpu()); + + restore_interrupts(state); +} + +void +call_all_cpus_sync(void (*func)(void *, int), void *cookie) +{ + cpu_status state = disable_interrupts(); + + if (smp_get_num_cpus() > 1) { + smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie, + 0, 0, (void *)func, SMP_MSG_FLAG_SYNC); + } + + // we need to call this function ourselves as well + func(cookie, smp_get_current_cpu()); + + restore_interrupts(state); +} + + +void +memory_read_barrier(void) +{ + arch_cpu_memory_read_barrier(); +} + + +void +memory_write_barrier(void) +{ + arch_cpu_memory_write_barrier(); +} + From superstippi at gmx.de Tue Oct 7 23:44:55 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Tue, 07 Oct 2008 23:44:55 +0200 Subject: [Haiku-commits] r27912 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 In-Reply-To: <200810072139.m97LdMVP012027@sheep.berlios.de> References: <200810072139.m97LdMVP012027@sheep.berlios.de> Message-ID: <20081007234455.3702.3@stippis2.1223390741.fake> bonefish at BerliOS wrote: > This optimization speeds up a "hello world" compilation about 20% on my > machine (KDEBUG turned off, freshly booted), but interestingly it has > virtually no effect on the "-j2" haiku build time. Pretty cool! Maybe the haiku build time is primarily influenced by the I/O? In another words, the implementation of pre-caching could be most helpful? I thought this would be so much easier to add with the new I/O-scheduler? Obviously, please ignore my ignorance if I am much off track here. :-) Best regards, -Stephan From julun at mail.berlios.de Tue Oct 7 23:47:47 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Tue, 7 Oct 2008 23:47:47 +0200 Subject: [Haiku-commits] r27914 - haiku/trunk/src/bin Message-ID: <200810072147.m97Lll93012880@sheep.berlios.de> Author: julun Date: 2008-10-07 23:47:46 +0200 (Tue, 07 Oct 2008) New Revision: 27914 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27914&view=rev Modified: haiku/trunk/src/bin/hey.cpp Log: * The size of the array passed should was not enough to hold the entire formatted string. This fixes ticket #2802. (Not sure why it only happend on gcc4) Modified: haiku/trunk/src/bin/hey.cpp =================================================================== --- haiku/trunk/src/bin/hey.cpp 2008-10-07 21:40:39 UTC (rev 27913) +++ haiku/trunk/src/bin/hey.cpp 2008-10-07 21:47:46 UTC (rev 27914) @@ -1338,7 +1338,7 @@ } for (int32 i = 0; i < 10 && pinfo[pinfo_index].types[i] != 0; i++) { uint32 type = pinfo[pinfo_index].types[i]; - char str2[4]; + char str2[6]; sprintf(str2, "%c%c%c%c ", int(type & 0xFF000000) >> 24, int(type & 0xFF0000) >> 16, int(type & 0xFF00) >> 8, (int)type & 0xFF); strcat(str, str2); @@ -1347,7 +1347,7 @@ for (int32 i = 0; i < 3; i++) { for (int32 j = 0; j < 5 && pinfo[pinfo_index].ctypes[i].pairs[j].type != 0; j++) { uint32 type = pinfo[pinfo_index].ctypes[i].pairs[j].type; - char str2[4]; + char str2[strlen(pinfo[pinfo_index].ctypes[i].pairs[j].name) + 8]; sprintf(str2, "(%s %c%c%c%c)", pinfo[pinfo_index].ctypes[i].pairs[j].name, int(type & 0xFF000000) >> 24, int(type & 0xFF0000) >> 16, From stippi at mail.berlios.de Tue Oct 7 23:48:41 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Tue, 7 Oct 2008 23:48:41 +0200 Subject: [Haiku-commits] r27915 - in haiku/trunk: data/artwork/icons src/servers/debug Message-ID: <200810072148.m97LmfYj012944@sheep.berlios.de> Author: stippi Date: 2008-10-07 23:48:37 +0200 (Tue, 07 Oct 2008) New Revision: 27915 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27915&view=rev Added: haiku/trunk/data/artwork/icons/Server_Debug Modified: haiku/trunk/src/servers/debug/debug_server.rdef Log: zuMi created a pretty awesome icon for the debug server. It could be improved (for better silhouettes), but I think it's pretty cool as is! Thanks a lot! Added: haiku/trunk/data/artwork/icons/Server_Debug =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_Debug ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/servers/debug/debug_server.rdef =================================================================== --- haiku/trunk/src/servers/debug/debug_server.rdef 2008-10-07 21:47:46 UTC (rev 27914) +++ haiku/trunk/src/servers/debug/debug_server.rdef 2008-10-07 21:48:37 UTC (rev 27915) @@ -15,9 +15,45 @@ internal = 0, short_info = "debug_server", - long_info = "debug_server ?2005-2006 Haiku" + long_info = "debug_server ?2005-2008 Haiku" }; +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon array { + $"6E636966080401690501020106023D01D9B77467381D063DADE44676E44A002A" + $"73F8E4C9FFB88F59020106022D7A45BA2EA23CB7EA302A87478DE44A570C60FF" + $"FFFFFF844C03020106022FEB9DB885733AD047322FFB4744734A2CCC00FF8989" + $"FFB004040201060239EEFCB586F6375FE73BC36E46CFE14AF56FACF8E4C900B8" + $"8F5902010602AD80F03A97EE3ADDB12DDF2F486AE14A4EA452F8E4C9FFC09A67" + $"05FF090208283A2A38283C2842284028462450244C2458305C2C5C345C3E583A" + $"5C4254424A424E42463E3C40403C3834343834303402092C3C2D3C2B3C2A3F29" + $"3E2B402C402C3F2C412C442B432D453144304532433241314233403540344136" + $"3F323C343C303C2F3D303D2E3D0204313EB9FE3EB98D3E303F30BF2130BF9231" + $"40B98D40B9FE40323F32BF9232BF210608BFF8324E2E50305030582E5430582F" + $"592F59325A325C2C2A5AB82CCA1E2D5BB82CCA1E2E582E582C540605FF022842" + $"28422644224A224422502E522C522E522C4A2C4C2C4A284800052842284228C1" + $"6D244A2446244DB705C5E2284EB705C5E22B4E2A4E2B4D2C4A2B4B2E480604BF" + $"3A443A4430442C502C4A30503A4E384E3A4E384A02053A443A4433462F4C3148" + $"304C314E314D334D3A4E364C3A4E3C483C4C3C440606FE02305C425C425C445C" + $"4C584A58C5A8584A514E52C230C623404C30170A000108301E2201158400040A" + $"000108302E1201158400040A010100302E1201178400040A020100202E120A03" + $"0101123FDFA53BFD72BBFD723FDFA548D1DFC7F5D801178300040A040101023F" + $"DFA53BFD72BBFD723FDFA548D9DAC819E90A070102023F44B43B5DD8BB5DD83F" + $"44B4487867C730390A070102023FDFA53BFD72BBFD723FDFA548D9DAC819E90A" + $"01010602BD8FCB3F94EA3F94EA3D8FCBC668D2C707600A06010702BD8FCB3F94" + $"EA3F94EA3D8FCBC668D2C707600A010100301E2201178400040A020100201E22" + $"0A030101123FCAA3BC8C7C3C8C7C3FCAA3C6E0184667D101178300040A040101" + $"023FCAA3BC8C7C3C8C7C3FCAA3C6F47C462B270A070102023F32FABC26893C26" + $"893F32FAC70A71476F070A070102023FCAA3BC8C7C3C8C7C3FCAA3C6F47C462B" + $"270A010103201E220A010104201E220A050105201E220A010106023FFD20B865" + $"263865263FFD20C47B21436D340A060107023FFD20B865263865263FFD20C47B" + $"21436D340A010106023FB83F3CF122BCF1223FB83F49E07DC855060A06010702" + $"3FB83F3CF122BCF1223FB83F49E07DC85506" +}; + +#else + resource large_icon array { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -72,3 +108,4 @@ $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; +#endif // HAIKU_TARGET_PLATFORM_HAIKU From geist at foobox.com Tue Oct 7 23:50:50 2008 From: geist at foobox.com (Travis Geiselbrecht) Date: Tue, 7 Oct 2008 14:50:50 -0700 Subject: [Haiku-commits] r27912 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 In-Reply-To: <200810072139.m97LdMVP012027@sheep.berlios.de> References: <200810072139.m97LdMVP012027@sheep.berlios.de> Message-ID: Cool! Didn't figure it would make that much of a difference, but I guess as you say the batching of flushes isn't working so well so it ends up ICIing a lot more than it probably should. Having the vm do a better job of batching flushes would probably give it a good win as well. BeOS was terrible at this, which is why a lot of times turning off other cpus would speed things up a lot. IIRC it would flush every since page, one at a time, on all cpus, synchronously whenever you unmapped them so tearing down an address space was incredibly expensive on SMP machines. I guess it completely outweighs the relatively slow updating of that bitmask, which is gonna cause some cache thrashing. On Oct 7, 2008, at 2:39 PM, bonefish at BerliOS wrote: > Author: bonefish > Date: 2008-10-07 23:39:19 +0200 (Tue, 07 Oct 2008) > New Revision: 27912 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27912&view=rev > > Modified: > haiku/trunk/headers/private/kernel/arch/vm.h > haiku/trunk/headers/private/kernel/arch/x86/ > arch_vm_translation_map.h > haiku/trunk/headers/private/kernel/vm_address_space.h > haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp > haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp > haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp > haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp > haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp > haiku/trunk/src/system/kernel/thread.cpp > Log: > * Added "from" address space parameter to vm_swap_address_space()/ > arch_vm_aspace_swap(). > * The x86 implementation does now maintain a bit mask per > vm_translation_map_arch_info indicating on which CPUs the address > space is active. This allows flush_tmap() to avoid ICI for user > address spaces when the team isn't currently running on any other > CPU. > In this context ICI is relatively expensive, particularly since we > map > most pages via vm_map_page() and therefore invoke flush_tmap() pretty > much for every single page. > This optimization speeds up a "hello world" compilation about 20% on > my machine (KDEBUG turned off, freshly booted), but interestingly it > has virtually no effect on the "-j2" haiku build time. > > > Modified: haiku/trunk/headers/private/kernel/arch/vm.h > =================================================================== > --- haiku/trunk/headers/private/kernel/arch/vm.h 2008-10-07 21:30:25 > UTC (rev 27911) > +++ haiku/trunk/headers/private/kernel/arch/vm.h 2008-10-07 21:39:19 > UTC (rev 27912) > @@ -27,7 +27,8 @@ > status_t arch_vm_init_post_area(struct kernel_args *args); > status_t arch_vm_init_end(struct kernel_args *args); > status_t arch_vm_init_post_modules(struct kernel_args *args); > -void arch_vm_aspace_swap(struct vm_address_space *aspace); > +void arch_vm_aspace_swap(struct vm_address_space *from, > + struct vm_address_space *to); > bool arch_vm_supports_protection(uint32 protection); > > status_t arch_vm_set_memory_type(struct vm_area *area, addr_t > physicalBase, > > Modified: haiku/trunk/headers/private/kernel/arch/x86/ > arch_vm_translation_map.h > =================================================================== > --- haiku/trunk/headers/private/kernel/arch/x86/ > arch_vm_translation_map.h 2008-10-07 21:30:25 UTC (rev 27911) > +++ haiku/trunk/headers/private/kernel/arch/x86/ > arch_vm_translation_map.h 2008-10-07 21:39:19 UTC (rev 27912) > @@ -13,10 +13,11 @@ > > struct page_directory_entry; > > - > typedef struct vm_translation_map_arch_info { > struct page_directory_entry *pgdir_virt; > struct page_directory_entry *pgdir_phys; > + vint32 active_on_cpus; > + // mask indicating on which CPUs the map is currently used > int num_invalidate_pages; > addr_t pages_to_invalidate[PAGE_INVALIDATE_CACHE_SIZE]; > } vm_translation_map_arch_info; > > Modified: haiku/trunk/headers/private/kernel/vm_address_space.h > =================================================================== > --- haiku/trunk/headers/private/kernel/vm_address_space.h 2008-10-07 > 21:30:25 UTC (rev 27911) > +++ haiku/trunk/headers/private/kernel/vm_address_space.h 2008-10-07 > 21:39:19 UTC (rev 27912) > @@ -34,7 +34,7 @@ > team_id vm_current_user_address_space_id(void); > struct vm_address_space *vm_get_address_space(team_id team); > void vm_put_address_space(struct vm_address_space *aspace); > -#define vm_swap_address_space(aspace) arch_vm_aspace_swap(aspace) > +#define vm_swap_address_space(from, to) arch_vm_aspace_swap(from, to) > > #ifdef __cplusplus > } > > Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2008-10-07 > 21:30:25 UTC (rev 27911) > +++ haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2008-10-07 > 21:39:19 UTC (rev 27912) > @@ -29,7 +29,7 @@ > > #warning M68K: WRITEME > > -status_t > +status_t > arch_vm_init(kernel_args *args) > { > return B_OK; > @@ -62,7 +62,7 @@ > #if 0 > TRACE(("arch_vm_init_end(): %lu virtual ranges to keep:\n", > args->arch_args.num_virtual_ranges_to_keep)); > - > + > for (int i = 0; i < (int)args- > >arch_args.num_virtual_ranges_to_keep; i++) { > addr_range &range = args->arch_args.virtual_ranges_to_keep[i]; > > @@ -102,11 +102,10 @@ > } > > > -void > -arch_vm_aspace_swap(vm_address_space *aspace) > +void > +arch_vm_aspace_swap(struct vm_address_space *from, struct > vm_address_space *to) > { > - m68k_set_pgdir(m68k_translation_map_get_pgdir( > - &aspace->translation_map)); > + m68k_set_pgdir(m68k_translation_map_get_pgdir(&to- > >translation_map)); > } > > > > Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp 2008-10-07 > 21:30:25 UTC (rev 27911) > +++ haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp 2008-10-07 > 21:39:19 UTC (rev 27912) > @@ -24,7 +24,7 @@ > #endif > > > -status_t > +status_t > arch_vm_init(kernel_args *args) > { > return B_OK; > @@ -105,7 +105,7 @@ > { > TRACE(("arch_vm_init_end(): %lu virtual ranges to keep:\n", > args->arch_args.num_virtual_ranges_to_keep)); > - > + > for (int i = 0; i < (int)args- > >arch_args.num_virtual_ranges_to_keep; i++) { > addr_range &range = args->arch_args.virtual_ranges_to_keep[i]; > > @@ -143,8 +143,8 @@ > } > > > -void > -arch_vm_aspace_swap(vm_address_space *aspace) > +void > +arch_vm_aspace_swap(struct vm_address_space *from, struct > vm_address_space *to) > { > } > > > Modified: haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp > 2008-10-07 21:30:25 UTC (rev 27911) > +++ haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp > 2008-10-07 21:39:19 UTC (rev 27912) > @@ -358,9 +358,22 @@ > > newPageDirectory = (addr_t)x86_next_page_directory(from, to); > > - if ((newPageDirectory % B_PAGE_SIZE) != 0) > - panic("arch_thread_context_switch: bad pgdir 0x%lx\n", > newPageDirectory); > + ASSERT((newPageDirectory % B_PAGE_SIZE) == 0); > > + if (newPageDirectory != 0) { > + // update on which CPUs the address space is used > + int cpu = smp_get_current_cpu(); > + if (vm_address_space* addressSpace = from->team->address_space) { > + atomic_and(&addressSpace->translation_map.arch_data- > >active_on_cpus, > + ~((uint32)1 << cpu)); > + } > + > + if (vm_address_space* addressSpace = to->team->address_space) { > + atomic_or(&addressSpace->translation_map.arch_data- > >active_on_cpus, > + (uint32)1 << cpu); > + } > + } > + > gX86SwapFPUFunc(from->arch_info.fpu_state, to->arch_info.fpu_state); > i386_context_switch(&from->arch_info, &to->arch_info, > newPageDirectory); > } > > Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-07 > 21:30:25 UTC (rev 27911) > +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp 2008-10-07 > 21:39:19 UTC (rev 27912) > @@ -8,10 +8,15 @@ > */ > > > +#include > +#include > + > #include > + > #include > #include > #include > +#include > #include > #include > > @@ -21,10 +26,7 @@ > > #include > > -#include > -#include > > - > //#define TRACE_ARCH_VM > #ifdef TRACE_ARCH_VM > # define TRACE(x) dprintf x > @@ -382,10 +384,21 @@ > > > void > -arch_vm_aspace_swap(vm_address_space *aspace) > +arch_vm_aspace_swap(struct vm_address_space *from, struct > vm_address_space *to) > { > + int cpu = smp_get_current_cpu(); > + if (from != NULL) { > + atomic_and(&from->translation_map.arch_data->active_on_cpus, > + ~((uint32)1 << cpu)); > + } > + > + if (to != NULL && to != vm_kernel_address_space()) { > + atomic_or(&to->translation_map.arch_data->active_on_cpus, > + (uint32)1 << cpu); > + } > + > i386_swap_pgdir((addr_t)i386_translation_map_get_pgdir( > - &aspace->translation_map)); > + &to->translation_map)); > } > > > > Modified: haiku/trunk/src/system/kernel/arch/x86/ > arch_vm_translation_map.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/arch/x86/ > arch_vm_translation_map.cpp 2008-10-07 21:30:25 UTC (rev 27911) > +++ haiku/trunk/src/system/kernel/arch/x86/ > arch_vm_translation_map.cpp 2008-10-07 21:39:19 UTC (rev 27912) > @@ -662,12 +662,18 @@ > > if (IS_KERNEL_MAP(map)) { > arch_cpu_global_TLB_invalidate(); > - smp_send_broadcast_ici(SMP_MSG_GLOBAL_INVALIDATE_PAGES, 0, 0, 0, > NULL, > - SMP_MSG_FLAG_SYNC); > + smp_send_broadcast_ici(SMP_MSG_GLOBAL_INVALIDATE_PAGES, 0, 0, 0, > + NULL, SMP_MSG_FLAG_SYNC); > } else { > arch_cpu_user_TLB_invalidate(); > - smp_send_broadcast_ici(SMP_MSG_USER_INVALIDATE_PAGES, 0, 0, 0, > NULL, > - SMP_MSG_FLAG_SYNC); > + > + int cpu = smp_get_current_cpu(); > + uint32 cpuMask = map->arch_data->active_on_cpus > + & ~((uint32)1 << cpu); > + if (cpuMask != 0) { > + smp_send_multicast_ici(cpuMask, SMP_MSG_USER_INVALIDATE_PAGES, > + 0, 0, 0, NULL, SMP_MSG_FLAG_SYNC); > + } > } > } else { > TRACE(("flush_tmap: %d pages to invalidate, invalidate list\n", > @@ -675,10 +681,23 @@ > > arch_cpu_invalidate_TLB_list(map->arch_data->pages_to_invalidate, > map->arch_data->num_invalidate_pages); > - smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST, > - (uint32)map->arch_data->pages_to_invalidate, > - map->arch_data->num_invalidate_pages, 0, NULL, > - SMP_MSG_FLAG_SYNC); > + > + if (IS_KERNEL_MAP(map)) { > + smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST, > + (uint32)map->arch_data->pages_to_invalidate, > + map->arch_data->num_invalidate_pages, 0, NULL, > + SMP_MSG_FLAG_SYNC); > + } else { > + int cpu = smp_get_current_cpu(); > + uint32 cpuMask = map->arch_data->active_on_cpus > + & ~((uint32)1 << cpu); > + if (cpuMask != 0) { > + smp_send_multicast_ici(cpuMask, SMP_MSG_INVALIDATE_PAGE_LIST, > + (uint32)map->arch_data->pages_to_invalidate, > + map->arch_data->num_invalidate_pages, 0, NULL, > + SMP_MSG_FLAG_SYNC); > + } > + } > } > map->arch_data->num_invalidate_pages = 0; > > @@ -777,6 +796,7 @@ > return B_NO_MEMORY; > } > > + map->arch_data->active_on_cpus = 0; > map->arch_data->num_invalidate_pages = 0; > > if (!kernel) { > > Modified: haiku/trunk/src/system/kernel/thread.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/thread.cpp 2008-10-07 21:30:25 UTC > (rev 27911) > +++ haiku/trunk/src/system/kernel/thread.cpp 2008-10-07 21:39:19 UTC > (rev 27912) > @@ -1441,7 +1441,7 @@ > RELEASE_TEAM_LOCK(); > > // swap address spaces, to make sure we're running on the kernel's > pgdir > - vm_swap_address_space(vm_kernel_address_space()); > + vm_swap_address_space(team->address_space, > vm_kernel_address_space()); > restore_interrupts(state); > > TRACE(("thread_exit: thread %ld now a kernel thread!\n", thread- > >id)); > > _______________________________________________ > Haiku-commits mailing list > Haiku-commits at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/haiku-commits From julun at mail.berlios.de Wed Oct 8 00:07:20 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Wed, 8 Oct 2008 00:07:20 +0200 Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam Message-ID: <200810072207.m97M7KCr014725@sheep.berlios.de> Author: julun Date: 2008-10-08 00:07:19 +0200 (Wed, 08 Oct 2008) New Revision: 27916 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27916&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: * fix build Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-07 21:48:37 UTC (rev 27915) +++ haiku/trunk/build/jam/HaikuImage 2008-10-07 22:07:19 UTC (rev 27916) @@ -282,7 +282,7 @@ AddFilesToHaikuImage beos system boot : $(bootScripts) ; local logoArtwork = "HAIKU logo - white on blue - big.png" - "HAIKU logo - white on blue - small.png" ; + "HAIKU logo - white on blue - normal.png" ; SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ; AddFilesToHaikuImage beos etc artwork : $(logoArtwork) ; From superstippi at gmx.de Wed Oct 8 00:08:41 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 00:08:41 +0200 Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: <200810072207.m97M7KCr014725@sheep.berlios.de> References: <200810072207.m97M7KCr014725@sheep.berlios.de> Message-ID: <20081008000841.4897.4@stippis2.1223390741.fake> julun at BerliOS wrote: > Author: julun > Date: 2008-10-08 00:07:19 +0200 (Wed, 08 Oct 2008) New Revision: 27916 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27916&view=rev > > Modified: > haiku/trunk/build/jam/HaikuImage > Log: > * fix build > > > > Modified: haiku/trunk/build/jam/HaikuImage > =================================================================== > --- haiku/trunk/build/jam/HaikuImage 2008-10-07 21:48:37 UTC (rev > 27915) > +++ haiku/trunk/build/jam/HaikuImage 2008-10-07 22:07:19 UTC (rev > 27916) > @@ -282,7 +282,7 @@ > AddFilesToHaikuImage beos system boot : $(bootScripts) ; > > local logoArtwork = "HAIKU logo - white on blue - big.png" > - "HAIKU logo - white on blue - small.png" ; > + "HAIKU logo - white on blue - normal.png" ; > SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ; > AddFilesToHaikuImage beos etc artwork : $(logoArtwork) ; Just realized and tried to commit the fix, but you were faster! Thanks! Best regards, -Stephan From stippi at mail.berlios.de Tue Oct 7 23:11:30 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Tue, 7 Oct 2008 23:11:30 +0200 Subject: [Haiku-commits] r27908 - haiku/trunk/data/artwork/icons Message-ID: <200810072111.m97LBU2M008940@sheep.berlios.de> Author: stippi Date: 2008-10-07 23:11:06 +0200 (Tue, 07 Oct 2008) New Revision: 27908 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27908&view=rev Added: haiku/trunk/data/artwork/icons/File_Jamfile haiku/trunk/data/artwork/icons/File_Pe_Group haiku/trunk/data/artwork/icons/File_Pe_Project haiku/trunk/data/artwork/icons/Misc_Box haiku/trunk/data/artwork/icons/Misc_Box_Small Modified: haiku/trunk/data/artwork/icons/App_Zip-O-Matic Log: * Finished Zip-O-Matic icon. * Added Jamfile icon and two icons I will use in Pe. (I keep them here, since for now, this is the one place with all HVIF icons.) * Added helper icons for one of the boxes from the generic app icon, may be useful for integrating in other icons. Modified: haiku/trunk/data/artwork/icons/App_Zip-O-Matic =================================================================== (Binary files differ) Added: haiku/trunk/data/artwork/icons/File_Jamfile =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Jamfile ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Pe_Group =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Pe_Group ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/File_Pe_Project =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Pe_Project ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/Misc_Box =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Misc_Box ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/Misc_Box_Small =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Misc_Box_Small ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From host.haiku at gmx.de Wed Oct 8 00:18:42 2008 From: host.haiku at gmx.de (julun) Date: Wed, 08 Oct 2008 00:18:42 +0200 Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: <20081008000841.4897.4@stippis2.1223390741.fake> References: <200810072207.m97M7KCr014725@sheep.berlios.de> <20081008000841.4897.4@stippis2.1223390741.fake> Message-ID: <48EBE042.7020702@gmx.de> Hi, Stephan Assmus schrieb: > julun at BerliOS wrote: >> Author: julun >> Date: 2008-10-08 00:07:19 +0200 (Wed, 08 Oct 2008) New Revision: 27916 >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27916&view=rev >> >> Modified: >> haiku/trunk/build/jam/HaikuImage >> Log: >> * fix build >> >> > > Just realized and tried to commit the fix, but you were faster! Thanks! > > Best regards, > -Stephan I was just eager to see the icons :) Now i wonder if it is intentional that Zip-O-Matic and PackageInstaller use the same icons, same for DiskUsage and DriveSetup? I know we lack some icons, just curious. Best regard, Karsten From mmu_man at mail.berlios.de Wed Oct 8 00:22:19 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 00:22:19 +0200 Subject: [Haiku-commits] r27917 - haiku/trunk/docs/welcome Message-ID: <200810072222.m97MMJP7016220@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 00:22:19 +0200 (Wed, 08 Oct 2008) New Revision: 27917 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27917&view=rev Modified: haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/gui.html haiku/trunk/docs/welcome/index.html haiku/trunk/docs/welcome/queries.html haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/twitcher.html haiku/trunk/docs/welcome/welcome.html haiku/trunk/docs/welcome/workspaces.html Log: Fix display in NetSurf which doesn't notice the parameters. visited link color isn't handled yet though. Fixed a typo. Modified: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-07 22:07:19 UTC (rev 27916) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-07 22:22:19 UTC (rev 27917) @@ -4,6 +4,9 @@ File Attributes The Deskbar Filetypes Haiku's GUI Workspaces - +   Modified: haiku/trunk/docs/welcome/index.html =================================================================== --- haiku/trunk/docs/welcome/index.html 2008-10-07 22:07:19 UTC (rev 27916) +++ haiku/trunk/docs/welcome/index.html 2008-10-07 22:22:19 UTC (rev 27917) @@ -4,6 +4,9 @@ The Index Queries The Tracker The Twitcher Welcome to Haiku! Workspaces References: <200810072139.m97LdMVP012027@sheep.berlios.de> <20081007234455.3702.3@stippis2.1223390741.fake> Message-ID: <20081008003201.445.2@knochen-vm.localdomain> On 2008-10-07 at 23:44:55 [+0200], Stephan Assmus wrote: > > bonefish at BerliOS wrote: > > This optimization speeds up a "hello world" compilation about 20% on my > > machine (KDEBUG turned off, freshly booted), but interestingly it has > > virtually no effect on the "-j2" haiku build time. > > Pretty cool! Maybe the haiku build time is primarily influenced by the I/O? > In another words, the implementation of pre-caching could be most helpful? At least in Haiku building Haiku doesn't seem to be I/O bound -- the HD light is far from flashing permanently. In Linux and FreeBSD it's significantly more (maybe 50% of the time), but they also build about 5 times faster than Haiku. So as I see it ATM Haiku's main performance problems likely aren't I/O related. > I thought this would be so much easier to add with the new I/O-scheduler? The I/O scheduler makes asynchronous I/O possible, which allows to do some stuff that couldn't be done before, but aside from that it doesn't really simplify anything. CU, Ingo From mmu_man at mail.berlios.de Wed Oct 8 00:33:12 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 00:33:12 +0200 Subject: [Haiku-commits] r27918 - haiku/trunk/docs/welcome Message-ID: <200810072233.m97MXC65020139@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 00:33:12 +0200 (Wed, 08 Oct 2008) New Revision: 27918 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27918&view=rev Modified: haiku/trunk/docs/welcome/workshop-filetypes+attributes.html Log: Make the workshop page look the same as others. Modified: haiku/trunk/docs/welcome/workshop-filetypes+attributes.html =================================================================== --- haiku/trunk/docs/welcome/workshop-filetypes+attributes.html 2008-10-07 22:22:19 UTC (rev 27917) +++ haiku/trunk/docs/welcome/workshop-filetypes+attributes.html 2008-10-07 22:33:12 UTC (rev 27918) @@ -1,29 +1,59 @@ - - - - Workshop: Filetypes & Attributes - - - - - - - - - - - - - - - - + + + + + + + + + +
    -

    Logo

    -
    -

    dummy

    -
    + + + + Workshop: Filetypes & Attributes + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + Welcome to Haiku! +
    + logo + + logo +
      + Welcome +     + Previous: Filetypes +     + Next: File Attributes +  
     

    This is a workshop to show the use of Attributes, Queries, the Index and custom Filetypes. As an example, we build a database to keep track of our DVD library.

    @@ -116,11 +146,10 @@

    - - - - - + + + +
    Internal NameAttribute type
    DVDdb:title text
    DVDdb:genre text
    DVDdb:cast text
    DVDdb:rating int-32
    DVDdb:title text
    DVDdb:genre text
    DVDdb:cast text
    DVDdb:rating int-32

    To index them, we open a Terminal and simply add one attribute after the other:

    mkindex -t string DVDdb:title
    @@ -150,7 +179,23 @@
     

    query-dvddb.png

    -
    - - + +
     
      + Welcome +     + Previous: Filetypes +     + Next: File Attributes +  
    + + From mmu_man at mail.berlios.de Wed Oct 8 00:41:26 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 00:41:26 +0200 Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome Message-ID: <200810072241.m97MfQHr031083@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 00:41:25 +0200 (Wed, 08 Oct 2008) New Revision: 27919 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27919&view=rev Modified: haiku/trunk/docs/welcome/bugreports.html Log: Make bugreport page look like others. Modified: haiku/trunk/docs/welcome/bugreports.html =================================================================== --- haiku/trunk/docs/welcome/bugreports.html 2008-10-07 22:33:12 UTC (rev 27918) +++ haiku/trunk/docs/welcome/bugreports.html 2008-10-07 22:41:25 UTC (rev 27919) @@ -1,29 +1,57 @@ - - - - Bugreporting - - - - - - - - - - - - - - - - + + + + + +
    -

    Logo

    -
    -

    dummy

    -
    + + + + Bugreporting + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + logo + + logo + + Welcome to Haiku! +
    + logo + + logo +
      + Welcome +     + +  
     

    Reporting bugs

    Since our developers are unable to test every hardware combination, nor every different way of interacting with the operating system, we are relying on you to give us some input on how things work at your end. Since this is a very early product, it is very likely that you will encounter bugs. We thank you for taking the time to report these.

    @@ -41,7 +69,22 @@

  • After the bug has been reported, a developer will look at your bug and try to classify it. Remember, we are all volunteers, and as such, sometimes a bug report might go unanswered for a while. Adding new information when it becomes available usually helps getting a bug picked up quicker, but do not try to 'bump' the bug up by adding non-descriptive comments.

  • Remember, reporting a bug is not something you spend a little time on and then you are done. If you reported a bug, then you are part of the Haiku development process. Developers might come up with questions while they are trying to fix your bug. Please stay around to answer these. Consider your participation 'done' when the bug is marked as 'fixed'. Together we can improve Haiku, bit by bit.
  • -
    - - +
    +
     
    + + From ingo_weinhold at gmx.de Wed Oct 8 01:10:11 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Wed, 08 Oct 2008 01:10:11 +0200 Subject: [Haiku-commits] r27912 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 In-Reply-To: References: <200810072139.m97LdMVP012027@sheep.berlios.de> Message-ID: <20081008011011.503.3@knochen-vm.localdomain> On 2008-10-07 at 23:50:50 [+0200], Travis Geiselbrecht wrote: > Cool! Didn't figure it would make that much of a difference, but I > guess as you say the batching of flushes isn't working so well so it > ends up ICIing a lot more than it probably should. Having the vm do a > better job of batching flushes would probably give it a good win as > well. BeOS was terrible at this, which is why a lot of times turning > off other cpus would speed things up a lot. IIRC it would flush every > since page, one at a time, on all cpus, synchronously whenever you > unmapped them so tearing down an address space was incredibly > expensive on SMP machines. > > I guess it completely outweighs the relatively slow updating of that > bitmask, which is gonna cause some cache thrashing. The ICIing in flush_tmap() is very expensive. I measured 3000 - 12000 cycles on my Core 2 Duo. Now that you mention it, I guess it wouldn't even be necessary to use atomic_*() operations. arch_thread_context_switch() is invoked with the threads spinlock held and the vm_swap_address_space() invocation in thread_exit() could be protected by it as well. BTW, I spotted the optimization in the FreeBSD sources. They don't even disable interrupts while invalidating TLB pages, but just pin the thread to the current CPU for the time. Given how expensive synchronous ICIing is, this seems to be a pretty reasonable approach. CU, Ingo From stefano.ceccherini at gmail.com Wed Oct 8 08:41:58 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Wed, 8 Oct 2008 08:41:58 +0200 Subject: [Haiku-commits] r27907 - in haiku/trunk/docs/welcome: . welcome-images In-Reply-To: <200810072104.m97L4Zbh008383@sheep.berlios.de> References: <200810072104.m97L4Zbh008383@sheep.berlios.de> Message-ID: <894b9700810072341v3aa3e16fuf4e879b44d5b6791@mail.gmail.com> 2008/10/7 : > Author: stippi > Date: 2008-10-07 23:04:11 +0200 (Tue, 07 Oct 2008) > New Revision: 27907 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27907&view=rev > Log: > Worked over the design and some of the text of the "Welcome" documentation. > * Changed the design of the logo area and worked on the document margins > and overall layout. > * Added a navigation infrastructure. > * Worked on the text on the Welcome page - Added an actual welcome paragraph > and unified the bug sections. Slightly changed the paragraph ordering. > * Fixed some typos, added small bits of text to the Tracker topic. > Shouldn't we also add OsDrawer in the 3rd party software download location section ? From stefano.ceccherini at gmail.com Wed Oct 8 08:43:28 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Wed, 8 Oct 2008 08:43:28 +0200 Subject: [Haiku-commits] r27914 - haiku/trunk/src/bin In-Reply-To: <200810072147.m97Lll93012880@sheep.berlios.de> References: <200810072147.m97Lll93012880@sheep.berlios.de> Message-ID: <894b9700810072343lf58ba5l5826646212f47634@mail.gmail.com> 2008/10/7 julun at BerliOS : > Author: julun > Date: 2008-10-07 23:47:46 +0200 (Tue, 07 Oct 2008) > New Revision: 27914 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27914&view=rev > > Modified: > haiku/trunk/src/bin/hey.cpp > Log: > * The size of the array passed should was not enough to hold the entire formatted string. > This fixes ticket #2802. (Not sure why it only happend on gcc4) > Nice catch! And I had started thinking it was a compiler bug :) From stefano.ceccherini at gmail.com Wed Oct 8 09:07:21 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Wed, 8 Oct 2008 09:07:21 +0200 Subject: [Haiku-commits] r27898 - haiku/trunk/src/servers/app In-Reply-To: References: <200810070548.m975m020032745@sheep.berlios.de> <894b9700810070152u25c0d370u3a6ce283c8047f68@mail.gmail.com> Message-ID: <894b9700810080007o3fd78562hf72da347dcbc7bbc@mail.gmail.com> 2008/10/7 J?r?me Duval : > 2008/10/7 J?r?me Duval >> >> 2008/10/7 Stefano Ceccherini >>> >>> 2008/10/7 J?r?me Duval : >>> > >>> > It defaults to true at the moment, right ? >>> > >>> > Bye, >>> > J?r?me >>> >>> Exactly. I should have been mentioned that in the commit log. Sorry. >> >> No problem. I'll check if this fixes the problem I have. >> > It doesn't. Is it similar to the problem described in the ticket ? From axeld at pinc-software.de Wed Oct 8 09:15:35 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 09:15:35 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <200810072241.m97MfQHr031083@sheep.berlios.de> Message-ID: <643779625-BeMail@zon> mmu_man at BerliOS wrote: > + Bugreporting > + > + > + + vlink="#892601" marginwidth="0" marginheight="0"> > + > + > + > + > + Since we only have CSS capable browsers, we should definitely remove most of this from the file, and have CSS care about the looks. This will make later changes and refinements much easier to do. Bye, Axel. From axeld at pinc-software.de Wed Oct 8 09:17:48 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 09:17:48 +0200 CEST Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: <48EBE042.7020702@gmx.de> Message-ID: <776105638-BeMail@zon> julun wrote: > I was just eager to see the icons :) Now i wonder if it is > intentional > that Zip-O-Matic and PackageInstaller use the same icons, same for > DiskUsage and DriveSetup? I know we lack some icons, just curious. They should keep the same icon as long as Pairs has bug #2694, though : -) Bye, Axel. From axeld at pinc-software.de Wed Oct 8 09:18:50 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 09:18:50 +0200 CEST Subject: [Haiku-commits] r27914 - haiku/trunk/src/bin In-Reply-To: <200810072147.m97Lll93012880@sheep.berlios.de> Message-ID: <838391068-BeMail@zon> julun at BerliOS wrote: > - char str2[4]; > + char str2[6]; > sprintf(str2, "%c%c%c%c ", int(type & > 0xFF000000) >> 24, > int(type & 0xFF0000) >> 16, > int(type & 0xFF00) >> 8, (int)type > & 0xFF); > strcat(str, str2); > @@ -1347,7 +1347,7 @@ > for (int32 i = 0; i < 3; i++) { > for (int32 j = 0; j < 5 && > pinfo[pinfo_index].ctypes[i].pairs[j].type != > 0; j++) { > uint32 type = > pinfo[pinfo_index].ctypes[i].pairs[j].type; > - char str2[4]; > + char > str2[strlen(pinfo[pinfo_index].ctypes[i].pairs[j].name) + 8]; > sprintf(str2, "(%s %c%c%c%c)", You could just be a bit more generous, and also use snprintf() :-) Bye, Axel. From teammaui at web.de Wed Oct 8 09:20:40 2008 From: teammaui at web.de (=?utf-8?Q?Ralf_Sch=C3=BClke?=) Date: Wed, 08 Oct 2008 09:20:40 +0200 Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: <776105638-BeMail@zon> References: <776105638-BeMail@zon> Message-ID: On Wed, 08 Oct 2008 09:17:48 +0200, Axel D?rfler wrote: > They should keep the same icon as long as Pairs has bug #2694, though Pairs have not this bug, the icons in haiku are double. -- Ralf Sch?lke aka stargater From axeld at mail.berlios.de Wed Oct 8 09:46:29 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Wed, 8 Oct 2008 09:46:29 +0200 Subject: [Haiku-commits] r27920 - haiku/trunk/src/servers/app Message-ID: <200810080746.m987kTrK010164@sheep.berlios.de> Author: axeld Date: 2008-10-08 09:46:27 +0200 (Wed, 08 Oct 2008) New Revision: 27920 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27920&view=rev Modified: haiku/trunk/src/servers/app/ServerWindow.cpp haiku/trunk/src/servers/app/ServerWindow.h haiku/trunk/src/servers/app/Window.cpp Log: * The ServerWindow now memorizes the original BDirectWindow feel when switching to full screen. Since BDirectWindows can have any feel, this does now correctly restore it instead of always reverting to B_NORMAL_WINDOW_FEEL. * This fixes part of bug #2808. * Minor cleanup. Modified: haiku/trunk/src/servers/app/ServerWindow.cpp =================================================================== --- haiku/trunk/src/servers/app/ServerWindow.cpp 2008-10-07 22:41:25 UTC (rev 27919) +++ haiku/trunk/src/servers/app/ServerWindow.cpp 2008-10-08 07:46:27 UTC (rev 27920) @@ -167,7 +167,8 @@ fCurrentDrawingRegion(), fCurrentDrawingRegionValid(false), - fDirectWindowData(NULL) + fDirectWindowData(NULL), + fDirectWindowFeel(B_NORMAL_WINDOW_FEEL) { STRACE(("ServerWindow(%s)::ServerWindow()\n", title)); @@ -184,6 +185,7 @@ fDeathSemaphore = create_sem(0, "window death"); } + #ifdef PROFILE_MESSAGE_LOOP static int compare_message_profiles(const void* _a, const void* _b) @@ -1087,14 +1089,18 @@ case AS_DIRECT_WINDOW_SET_FULLSCREEN: { // TODO: maybe there is more to do than this? + // (like resizing it to screen size?) bool enable; link.Read(&enable); status_t status = B_OK; if (!fWindow->IsOffscreenWindow()) { //fDesktop->UnlockSingleWindow(); + if (enable) + fDirectWindowFeel = fWindow->Feel(); + fDesktop->SetWindowFeel(fWindow, - enable ? kWindowScreenFeel : B_NORMAL_WINDOW_FEEL); + enable ? kWindowScreenFeel : fDirectWindowFeel); //fDesktop->LockSingleWindow(); } else status = B_BAD_TYPE; Modified: haiku/trunk/src/servers/app/ServerWindow.h =================================================================== --- haiku/trunk/src/servers/app/ServerWindow.h 2008-10-07 22:41:25 UTC (rev 27919) +++ haiku/trunk/src/servers/app/ServerWindow.h 2008-10-08 07:46:27 UTC (rev 27920) @@ -50,7 +50,7 @@ class ServerWindow : public MessageLooper { public: ServerWindow(const char *title, ServerApp *app, - port_id clientPort, port_id looperPort, + port_id clientPort, port_id looperPort, int32 clientToken); virtual ~ServerWindow(); @@ -91,7 +91,7 @@ // related thread/team_id(s). inline team_id ClientTeam() const { return fClientTeam; } - + void HandleDirectConnection(int32 bufferState = -1, int32 driverState = -1); @@ -163,6 +163,7 @@ bool fCurrentDrawingRegionValid; direct_window_data* fDirectWindowData; + window_feel fDirectWindowFeel; }; #endif // SERVER_WINDOW_H Modified: haiku/trunk/src/servers/app/Window.cpp =================================================================== --- haiku/trunk/src/servers/app/Window.cpp 2008-10-07 22:41:25 UTC (rev 27919) +++ haiku/trunk/src/servers/app/Window.cpp 2008-10-08 07:46:27 UTC (rev 27920) @@ -151,7 +151,7 @@ // _ResizeBy() will adapt the frame for validity before resizing if (feel == kDesktopWindowFeel) { // the desktop window spans over the whole screen - // ToDo: this functionality should be moved somewhere else + // TODO: this functionality should be moved somewhere else // (so that it is always used when the workspace is changed) uint16 width, height; uint32 colorSpace; @@ -1435,7 +1435,7 @@ /*! \brief Returns the windows that's in behind of the backmost position this window can get. - Returns NULL is this window can be the backmost window. + Returns NULL is this window can be the backmost window. */ Window* Window::Backmost(Window* window, int32 workspace) @@ -1464,7 +1464,7 @@ /*! \brief Returns the windows that's in front of the frontmost position this window can get. - Returns NULL if this window can be the frontmost window. + Returns NULL if this window can be the frontmost window. */ Window* Window::Frontmost(Window* first, int32 workspace) @@ -1505,6 +1505,10 @@ } +/*! Returns whether or not a window is in the subset of this window. + If a window is in the subset of this window, it means it should always + appear behind this window. +*/ bool Window::HasInSubset(const Window* window) const { @@ -1516,7 +1520,7 @@ // of their application if (fFeel == kMenuWindowFeel) return window->ServerWindow()->App() == ServerWindow()->App(); - else if (window->Feel() == kMenuWindowFeel) + if (window->Feel() == kMenuWindowFeel) return false; // we have a few special feels that have a fixed order From superstippi at gmx.de Wed Oct 8 09:52:56 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 09:52:56 +0200 Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <643779625-BeMail@zon> References: <643779625-BeMail@zon> Message-ID: <20081008095256.778.1@stippis2.1223452165.fake> Axel D?rfler wrote: > mmu_man at BerliOS wrote: > > + Bugreporting > > + > > + > > + > + vlink="#892601" marginwidth="0" marginheight="0"> > > + > > +
    > + logo + border="0"> > + > + logo + border="0"> > +
    > > + > > + > > + > > Since we only have CSS capable browsers, we should definitely remove most > of this from the file, and have CSS care about the looks. This will make > later changes and refinements much easier to do. If someone shows me how to do it for one file, I will do it for the others. Best regards, -Stephan From superstippi at gmx.de Wed Oct 8 09:55:25 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 09:55:25 +0200 Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: References: <776105638-BeMail@zon> Message-ID: <20081008095525.821.2@stippis2.1223452165.fake> Ralf Sch?lke wrote: > On Wed, 08 Oct 2008 09:17:48 +0200, Axel D?rfler > wrote: > > > They should keep the same icon as long as Pairs has bug #2694, though > > Pairs have not this bug, the icons in haiku are double. Yes, but as witnessed, the situation can happen and therefor Pairs could be anticipating and check the bitmaps for equal contents (memcmp()). Best regards, -Stephan From axeld at mail.berlios.de Wed Oct 8 09:58:42 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Wed, 8 Oct 2008 09:58:42 +0200 Subject: [Haiku-commits] r27921 - haiku/trunk/src/bin/screen_blanker Message-ID: <200810080758.m987wgNA011200@sheep.berlios.de> Author: axeld Date: 2008-10-08 09:58:41 +0200 (Wed, 08 Oct 2008) New Revision: 27921 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27921&view=rev Modified: haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp haiku/trunk/src/bin/screen_blanker/ScreenSaverWindow.cpp Log: * Made the screen saver window as well as the password window kWindowScreenFeel. * This makes them highest in the window order, so that floating all windows like the Deskbar cannot compromise the password protection anymore. This fixes #2808. * Note, the password window should also block uses of Alt-Tab, even though this is usually harmless (as only other windows with kWindowScreenFeel can be promoted to the front). * Also note, the password window should actually be an app modal window that appears in front of the screen saver window. However, the app_server currently doesn't allow anything but menus on top of a kWindowScreenFeel window. * Removed changing full screen setting of the ScreenSaver window, as this shouldn't matter. * Minor cleanup. Modified: haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp =================================================================== --- haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp 2008-10-08 07:46:27 UTC (rev 27920) +++ haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp 2008-10-08 07:58:41 UTC (rev 27921) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2003-2008, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -11,30 +11,31 @@ #include "PasswordWindow.h" - #include #include #include #include +#include + PasswordWindow::PasswordWindow() - : BWindow(BRect(100, 100, 400, 230), "Enter Password", B_NO_BORDER_WINDOW_LOOK, - B_FLOATING_ALL_WINDOW_FEEL, + : BWindow(BRect(100, 100, 400, 230), "Enter Password", + B_NO_BORDER_WINDOW_LOOK, kWindowScreenFeel /* TODO: should be B_MODAL_APP_WINDOW_FEEL*/, B_NOT_MOVABLE | B_NOT_CLOSABLE |B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE - | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS , B_ALL_WORKSPACES) + | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES) { BView* topView = new BView(Bounds(), "topView", B_FOLLOW_ALL, B_WILL_DRAW); topView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); AddChild(topView); - BRect bounds(Bounds()); + BRect bounds(Bounds()); bounds.InsetBy(10.0, 10.0); BBox *customBox = new BBox(bounds, "customBox", B_FOLLOW_NONE); topView->AddChild(customBox); customBox->SetLabel("Unlock screen saver"); - + bounds.top += 10.0; fPassword = new BTextControl(bounds, "password", "Enter password:", "VeryLongPasswordPossible", B_FOLLOW_NONE); @@ -44,7 +45,7 @@ fPassword->TextView()->HideTyping(true); fPassword->SetDivider(be_plain_font->StringWidth("Enter password:") + 5.0); - BButton* button = new BButton(BRect(), "unlock", "Unlock", + BButton* button = new BButton(BRect(), "unlock", "Unlock", new BMessage(kMsgUnlock), B_FOLLOW_NONE); customBox->AddChild(button); button->MakeDefault(true); Modified: haiku/trunk/src/bin/screen_blanker/ScreenSaverWindow.cpp =================================================================== --- haiku/trunk/src/bin/screen_blanker/ScreenSaverWindow.cpp 2008-10-08 07:46:27 UTC (rev 27920) +++ haiku/trunk/src/bin/screen_blanker/ScreenSaverWindow.cpp 2008-10-08 07:58:41 UTC (rev 27921) @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006, Haiku. + * Copyright 2003-2008, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -10,19 +10,20 @@ #include "ScreenSaverWindow.h" -#include - #include #include +#include + /*! This is the BDirectWindow subclass that rendering occurs in. A view is added to it so that BView based screensavers will work. */ ScreenSaverWindow::ScreenSaverWindow(BRect frame) : BDirectWindow(frame, "ScreenSaver Window", - B_NO_BORDER_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_ZOOMABLE), + B_NO_BORDER_WINDOW_LOOK, kWindowScreenFeel, + B_NOT_RESIZABLE | B_NOT_ZOOMABLE), fSaver(NULL) { frame.OffsetTo(0, 0); From superstippi at gmx.de Wed Oct 8 10:03:42 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 10:03:42 +0200 Subject: [Haiku-commits] r27912 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch headers/private/kernel/arch/x86 src/system/kernel src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 In-Reply-To: <200810072139.m97LdMVP012027@sheep.berlios.de> References: <200810072139.m97LdMVP012027@sheep.berlios.de> Message-ID: <20081008100342.962.3@stippis2.1223452165.fake> bonefish at BerliOS wrote: > Author: bonefish > Date: 2008-10-07 23:39:19 +0200 (Tue, 07 Oct 2008) New Revision: 27912 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27912&view=rev [...] > This optimization speeds up a "hello world" compilation about 20% on my > machine (KDEBUG turned off, freshly booted), but interestingly it has > virtually no effect on the "-j2" haiku build time. Actually, my build time has decreased by 11% (r27900 vs. r27916, real hardware, dual core, 2GB RAM). But I have not taken several measurements. Best regards, -Stephan From axeld at pinc-software.de Wed Oct 8 10:37:55 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 10:37:55 +0200 CEST Subject: [Haiku-commits] r27916 - haiku/trunk/build/jam In-Reply-To: Message-ID: <5583257267-BeMail@zon> Ralf Sch?lke wrote: > On Wed, 08 Oct 2008 09:17:48 +0200, Axel D?rfler > > > wrote: > > They should keep the same icon as long as Pairs has bug #2694, > > though > Pairs have not this bug, the icons in haiku are double. Sorry, but this *is* a bug in Pairs, no matter if icons are doubled in Haiku. Icons can always be reused for several apps, and since Pairs relies on it being different, it must make sure so itself. Bye, Axel. From axeld at pinc-software.de Wed Oct 8 11:13:42 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 11:13:42 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <20081008095256.778.1@stippis2.1223452165.fake> Message-ID: <7730477977-BeMail@zon> Stephan Assmus wrote: > > Since we only have CSS capable browsers, we should definitely > > remove most > > of this from the file, and have CSS care about the looks. This will > > make > > later changes and refinements much easier to do. > If someone shows me how to do it for one file, I will do it for the > others. I can have a look at it. Also, any opinions about the gui.png I posed on this list? I don't like the current markers in the pictures a lot, even though only the one on the Deskbar page looks really bad to me (the one with the zoomed Deskbar and the drop shadow). The open-with-preferred image is still missing on the Tracker page. The "Welcome" on the desktop could be a script instead of a link; Firefox starts okay with only the documentation when doing it this way, even on the first run (you just have to provide it with a full path). I would actually prefer to have only Firefox on the image; while NetSurf starts a lot faster, it also doesn't feel complete, and actually feels slower when it comes to render the pages. Bye, Axel. From axeld at pinc-software.de Wed Oct 8 11:38:35 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 11:38:35 +0200 CEST Subject: [Haiku-commits] =?utf-8?q?r27907_-_in_haiku/trunk/docs/welcome=3A?= =?utf-8?q?_=2E_welcome-images?= In-Reply-To: <894b9700810072341v3aa3e16fuf4e879b44d5b6791@mail.gmail.com> Message-ID: <9223384023-BeMail@zon> "Stefano Ceccherini" wrote: > Shouldn't we also add OsDrawer in the 3rd party software download > location section ? As long as it mentions what kind of site this is, I'm all for it. Bye, Axel. From superstippi at gmx.de Wed Oct 8 13:07:51 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 13:07:51 +0200 Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <7730477977-BeMail@zon> References: <7730477977-BeMail@zon> Message-ID: <20081008130751.37475.6@stippis2.1223452165.fake> Axel D?rfler wrote: > Stephan Assmus wrote: > > > Since we only have CSS capable browsers, we should definitely remove > > > most > > > of this from the file, and have CSS care about the looks. This will > > > make > > > later changes and refinements much easier to do. > > If someone shows me how to do it for one file, I will do it for the > > others. > > I can have a look at it. Never mind, I am teaching myself some new skills. :-) > Also, any opinions about the gui.png I posed on this list? I don't like > the current markers in the pictures a lot, even though only the one on > the Deskbar page looks really bad to me (the one with the zoomed Deskbar > and the drop shadow). Ok, I want to worry about the images last though. > The open-with-preferred image is still missing on the Tracker page. The whole Tracker page is work in progress, there are even several paragraphs that end in "..." and need to be finished. > The "Welcome" on the desktop could be a script instead of a link; Firefox > starts okay with only the documentation when doing it this way, even on > the first run (you just have to provide it with a full path). I would > actually prefer to have only Firefox on the image; while NetSurf starts a > lot faster, it also doesn't feel complete, and actually feels slower when > it comes to render the pages. Thanks for that information! I was already half-way through setting up a Firefox cross-compilation environment... I guess I will finish that anyways when I have some time. Best regards, -Stephan From axeld at pinc-software.de Wed Oct 8 13:45:15 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 13:45:15 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <20081008130751.37475.6@stippis2.1223452165.fake> Message-ID: <16823104366-BeMail@zon> Stephan Assmus wrote: > > I can have a look at it. > Never mind, I am teaching myself some new skills. :-) One page I can recommend you is http://www.csszengarden.com/ (to see what is possible) and http://www.w3.org/Style/CSS/learning (to get an idea on how to do it) - but maybe you already found those. The "learning" page even defines different layouts you can switch to using the "View/Page Style" menu in Firefox. > > Also, any opinions about the gui.png I posed on this list? I don't > > like > > the current markers in the pictures a lot, even though only the one > > on > > the Deskbar page looks really bad to me (the one with the zoomed > > Deskbar > > and the drop shadow). > Ok, I want to worry about the images last though. Sure. > > The open-with-preferred image is still missing on the Tracker page. > The whole Tracker page is work in progress, there are even several > paragraphs that end in "..." and need to be finished. Yeah, it's just one thing that is very visible :-) > > The "Welcome" on the desktop could be a script instead of a link; > > Firefox > > starts okay with only the documentation when doing it this way, > > even on > > the first run (you just have to provide it with a full path). I > > would > > actually prefer to have only Firefox on the image; while NetSurf > > starts a > > lot faster, it also doesn't feel complete, and actually feels > > slower when > > it comes to render the pages. > Thanks for that information! I was already half-way through setting > up a > Firefox cross-compilation environment... I guess I will finish that > anyways > when I have some time. That wouldn't hurt, at least; Firefox could need some more love :-) Bye, Axel. From mmu_man at mail.berlios.de Wed Oct 8 15:05:00 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 15:05:00 +0200 Subject: [Haiku-commits] r27922 - haiku/trunk/docs/welcome Message-ID: <200810081305.m98D50Aq007302@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 15:05:00 +0200 (Wed, 08 Oct 2008) New Revision: 27922 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27922&view=rev Modified: haiku/trunk/docs/welcome/welcome.html Log: Add OsDrawer to the list of 3rd party sites. Modified: haiku/trunk/docs/welcome/welcome.html =================================================================== --- haiku/trunk/docs/welcome/welcome.html 2008-10-08 07:58:41 UTC (rev 27921) +++ haiku/trunk/docs/welcome/welcome.html 2008-10-08 13:05:00 UTC (rev 27922) @@ -94,6 +94,7 @@
  • Haikuware
  • BeBits
  • HaikuPorts
  • +
  • OsDrawer


  • From revol at free.fr Wed Oct 8 15:08:29 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 15:08:29 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27907_-_in_haiku/trunk/docs/wel?= =?windows-1252?q?come=3A_=2E_welcome-images?= In-Reply-To: <894b9700810072341v3aa3e16fuf4e879b44d5b6791@mail.gmail.com> Message-ID: <1186727406-BeMail@laptop> > > Shouldn't we also add OsDrawer in the 3rd party software download > location section ? Done. Fran?ois. From revol at free.fr Wed Oct 8 15:11:16 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 15:11:16 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <643779625-BeMail@zon> Message-ID: <1353989868-BeMail@laptop> > mmu_man at BerliOS wrote: > > + Bugreporting > > + > > + > > + > + vlink="#892601" marginwidth="0" marginheight="0"> > > + > > +
    > > + logo > + border="0"> > > + > > + logo > + border="0"> > > +
    > > + > > + > > + > > Since we only have CSS capable browsers, we should definitely remove > most of this from the file, and have CSS care about the looks. This > will make later changes and refinements much easier to do. Hmm except links ;) Fran?ois. From mmu_man at mail.berlios.de Wed Oct 8 15:39:24 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 15:39:24 +0200 Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome Message-ID: <200810081339.m98DdOMZ011155@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 15:39:23 +0200 (Wed, 08 Oct 2008) New Revision: 27923 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27923&view=rev Added: haiku/trunk/docs/welcome/welcome.css Modified: haiku/trunk/docs/welcome/welcome.html Log: Add a CSS and use it from the first page. Added: haiku/trunk/docs/welcome/welcome.css =================================================================== --- haiku/trunk/docs/welcome/welcome.css 2008-10-08 13:05:00 UTC (rev 27922) +++ haiku/trunk/docs/welcome/welcome.css 2008-10-08 13:39:23 UTC (rev 27923) @@ -0,0 +1,42 @@ +/* + * Copyright 2008, Haiku. + * Distributed under the terms of the MIT License. + * + * Authors: + * Fran?ois Revol + */ + +body { + /* remove default borders around content */ + margin: 0em; + /* for NetSurf */ + padding: 0px; + + /* body colors */ + background-color: white; + color: black; +} + +/* link colors */ +a:link { color: #dc3c01; } +/*a:active { color: #dc3c01; }*/ +a:visited { color: #892601; } + +/* top banner elements (with the logo): td in a tr of class top-banner */ +tr.top-banner td { + background: #efefef; +} + +/* nav banner elements: td in a tr of class nav-banner */ +tr.nav-banner td { + background: #e0e0e0; +} + +/* same for bottom nav banner */ +tr.bnav-banner td { + background: #e0e0e0; +} + +/* the tr containing the content text */ +/* tr.content { } */ + Modified: haiku/trunk/docs/welcome/welcome.html =================================================================== --- haiku/trunk/docs/welcome/welcome.html 2008-10-08 13:05:00 UTC (rev 27922) +++ haiku/trunk/docs/welcome/welcome.html 2008-10-08 13:39:23 UTC (rev 27923) @@ -2,52 +2,47 @@ + Welcome to Haiku! - - +
    > > + logo > + border="0"> > > + > > + logo > + border="0"> > > +
    - - + - - - - - - + + + - - + - - - + + - + - + - - - + + - +
    +
    logo + logo + Welcome to Haiku!
    +
    logo + logo
      +
     
    @@ -123,17 +118,18 @@
  • Development mailing list
  • Overview of more specific mailing lists
  • +
     
      +
      Next: Haiku's GUI   
    From revol at free.fr Wed Oct 8 15:43:14 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 15:43:14 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <20081008095256.778.1@stippis2.1223452165.fake> Message-ID: <3271649368-BeMail@laptop> > > Since we only have CSS capable browsers, we should definitely > > remove most > > of this from the file, and have CSS care about the looks. This will > > make > > later changes and refinements much easier to do. > > If someone shows me how to do it for one file, I will do it for the > others. Done on welcome.html in r27923. Some more can be put in the CSS but it's a start. References: http://www.w3schools.com/css/ http://htmlhelp.com/reference/css/ all properties: http://www.w3.org/TR/CSS2/propidx.html Fran?ois. From revol at free.fr Wed Oct 8 15:47:58 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 15:47:58 +0200 CEST Subject: [Haiku-commits] r27919 - haiku/trunk/docs/welcome In-Reply-To: <7730477977-BeMail@zon> Message-ID: <3555907173-BeMail@laptop> > Stephan Assmus wrote: > > > Since we only have CSS capable browsers, we should definitely > > > remove most > > > of this from the file, and have CSS care about the looks. This > > > will > > > make > > > later changes and refinements much easier to do. > > If someone shows me how to do it for one file, I will do it for the > > others. > > I can have a look at it. I've done the minimal part of it. > The "Welcome" on the desktop could be a script instead of a link; Another option is to use a bookmark with META:url However trying this on the image had Tracker overwrite the mime type with that of the generic file always on launch!? > Firefox starts okay with only the documentation when doing it this > way, > even on the first run (you just have to provide it with a full path). > I > would actually prefer to have only Firefox on the image; while > NetSurf > starts a lot faster, it also doesn't feel complete, and actually > feels > slower when it comes to render the pages. > I've fixed NetSurf to follow symlinks on B_REFS_RECEIVED, works fine now. It's also a little faster now. Fran?ois. From mmu_man at mail.berlios.de Wed Oct 8 15:49:53 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Wed, 8 Oct 2008 15:49:53 +0200 Subject: [Haiku-commits] r27924 - haiku/trunk/docs/welcome Message-ID: <200810081349.m98Dnrp3012282@sheep.berlios.de> Author: mmu_man Date: 2008-10-08 15:49:52 +0200 (Wed, 08 Oct 2008) New Revision: 27924 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27924&view=rev Modified: haiku/trunk/docs/welcome/welcome.html Log: Add comment on haikuports and osdrawer Modified: haiku/trunk/docs/welcome/welcome.html =================================================================== --- haiku/trunk/docs/welcome/welcome.html 2008-10-08 13:39:23 UTC (rev 27923) +++ haiku/trunk/docs/welcome/welcome.html 2008-10-08 13:49:52 UTC (rev 27924) @@ -88,8 +88,8 @@

    From bonefish at mail.berlios.de Wed Oct 8 16:05:47 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 8 Oct 2008 16:05:47 +0200 Subject: [Haiku-commits] r27925 - haiku/trunk/src/system/libroot/posix/malloc Message-ID: <200810081405.m98E5lh7014386@sheep.berlios.de> Author: bonefish Date: 2008-10-08 16:05:47 +0200 (Wed, 08 Oct 2008) New Revision: 27925 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27925&view=rev Modified: haiku/trunk/src/system/libroot/posix/malloc/arch-specific.cpp Log: Increase the heap size in 64 KB steps. Was 4 KB before, which was a bit slow for short-running, heap-intensive programs. Modified: haiku/trunk/src/system/libroot/posix/malloc/arch-specific.cpp =================================================================== --- haiku/trunk/src/system/libroot/posix/malloc/arch-specific.cpp 2008-10-08 13:49:52 UTC (rev 27924) +++ haiku/trunk/src/system/libroot/posix/malloc/arch-specific.cpp 2008-10-08 14:05:47 UTC (rev 27925) @@ -54,6 +54,9 @@ static const size_t kInitialHeapSize = 50 * B_PAGE_SIZE; // that's about what hoard allocates anyway +static const size_t kHeapIncrement = 16 * B_PAGE_SIZE; + // the steps in which to increase the heap size + static area_id sHeapArea; static hoardLockType sHeapLock; static void *sHeapBase; @@ -88,7 +91,7 @@ status_t status = _kern_reserve_heap_address_range((addr_t *)&sHeapBase, B_EXACT_ADDRESS, 0x48000000); - sHeapArea = create_area("heap", (void **)&sHeapBase, + sHeapArea = create_area("heap", (void **)&sHeapBase, status == B_OK ? B_EXACT_ADDRESS : B_BASE_ADDRESS, kInitialHeapSize, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); if (sHeapArea < B_OK) @@ -194,7 +197,8 @@ sFreeHeapSize += size; // round to next page size - size_t pageSize = (sFreeHeapSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1); + size_t pageSize = (sFreeHeapSize + kHeapIncrement - 1) + & ~(kHeapIncrement - 1); if (pageSize < sHeapAreaSize) { SERIAL_PRINT(("HEAP-%ld: heap area large enough for %ld\n", find_thread(NULL), size)); From bonefish at mail.berlios.de Wed Oct 8 16:07:21 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Wed, 8 Oct 2008 16:07:21 +0200 Subject: [Haiku-commits] r27926 - haiku/trunk/src/bin/debug/profile Message-ID: <200810081407.m98E7LKh014538@sheep.berlios.de> Author: bonefish Date: 2008-10-08 16:07:21 +0200 (Wed, 08 Oct 2008) New Revision: 27926 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27926&view=rev Modified: haiku/trunk/src/bin/debug/profile/profile.cpp Log: Right check, wrong place. The "-C" option (don't profile child teams) was broken. Modified: haiku/trunk/src/bin/debug/profile/profile.cpp =================================================================== --- haiku/trunk/src/bin/debug/profile/profile.cpp 2008-10-08 14:05:47 UTC (rev 27925) +++ haiku/trunk/src/bin/debug/profile/profile.cpp 2008-10-08 14:07:21 UTC (rev 27926) @@ -389,6 +389,9 @@ } case B_DEBUGGER_MESSAGE_TEAM_CREATED: + if (!gOptions.profile_teams) + break; + if (threadManager.AddTeam(message.team_created.new_team) == B_OK) { threadManager.AddThread(message.team_created.new_team); @@ -414,9 +417,6 @@ break; case B_DEBUGGER_MESSAGE_IMAGE_CREATED: - if (!gOptions.profile_teams) - break; - if (Team* team = threadManager.FindTeam(message.origin.team)) { team->AddImage(message.image_created.info, message.image_created.image_event); From superstippi at gmx.de Wed Oct 8 16:55:28 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 16:55:28 +0200 Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <200810081339.m98DdOMZ011155@sheep.berlios.de> References: <200810081339.m98DdOMZ011155@sheep.berlios.de> Message-ID: <20081008165528.44533.10@stippis2.1223452165.fake> mmu_man at BerliOS wrote: > Author: mmu_man > Date: 2008-10-08 15:39:23 +0200 (Wed, 08 Oct 2008) New Revision: 27923 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27923&view=rev > > Added: > haiku/trunk/docs/welcome/welcome.css > Modified: > haiku/trunk/docs/welcome/welcome.html > Log: > Add a CSS and use it from the first page. I thought I made it clear in a subsequent mail that I would be working on it, and I have. I will try to merge both of our changes, but let's try to split this better. At least please announce that you will be working on something if it concerns something that is being worked on by multiple people concurrently. Best regards, -Stephan From revol at free.fr Wed Oct 8 17:15:27 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 17:15:27 +0200 CEST Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <20081008165528.44533.10@stippis2.1223452165.fake> Message-ID: <8804268599-BeMail@laptop> > > mmu_man at BerliOS wrote: > > Author: mmu_man > > Date: 2008-10-08 15:39:23 +0200 (Wed, 08 Oct 2008) New Revision: > > 27923 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27923&view=rev > > > > Added: > > haiku/trunk/docs/welcome/welcome.css > > Modified: > > haiku/trunk/docs/welcome/welcome.html > > Log: > > Add a CSS and use it from the first page. > > I thought I made it clear in a subsequent mail that I would be > working on > it, and I have. I will try to merge both of our changes, but let's > try to > split this better. At least please announce that you will be working > on > something if it concerns something that is being worked on by > multiple > people concurrently. I just did it before reading the next mails, so I didn't notice. Happy svn resolving :p Fran?ois. From axeld at pinc-software.de Wed Oct 8 17:14:01 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 17:14:01 +0200 CEST Subject: [Haiku-commits] r27924 - haiku/trunk/docs/welcome In-Reply-To: <200810081349.m98Dnrp3012282@sheep.berlios.de> Message-ID: <29349157525-BeMail@zon> mmu_man at BerliOS wrote: > Log: > Add comment on haikuports and osdrawer [...] > +
  • OsDrawer hosts > development tools for native software
  • This doesn't really sound right. Rather, it's supposed to provide everything needed to host open source projects with a focus on BeOS, and Haiku software. Bye, Axel. From superstippi at gmx.de Wed Oct 8 17:20:10 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 17:20:10 +0200 Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <8804268599-BeMail@laptop> References: <8804268599-BeMail@laptop> Message-ID: <20081008172010.46178.12@stippis2.1223452165.fake> Fran?ois Revol wrote: > > > > mmu_man at BerliOS wrote: > > > Author: mmu_man > > > Date: 2008-10-08 15:39:23 +0200 (Wed, 08 Oct 2008) New Revision: > > > 27923 > > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27923&view=rev > > > > > > Added: > > > haiku/trunk/docs/welcome/welcome.css > > > Modified: > > > haiku/trunk/docs/welcome/welcome.html > > > Log: > > > Add a CSS and use it from the first page. > > > > I thought I made it clear in a subsequent mail that I would be working > > on > > it, and I have. I will try to merge both of our changes, but let's try > > to > > split this better. At least please announce that you will be working on > > something if it concerns something that is being worked on by multiple > > people concurrently. > > I just did it before reading the next mails, so I didn't notice. Happy > svn resolving :p Wasn't so bad. It turned out you worked mostly on the table, which I had not started doing. :-) I was thinking though to replace the whole table with some tricks. But I am learning yet... Best regards, -Stephan From axeld at mail.berlios.de Wed Oct 8 17:22:08 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Wed, 8 Oct 2008 17:22:08 +0200 Subject: [Haiku-commits] r27927 - in haiku/trunk: build/jam data/artwork/icons src/add-ons/tracker src/add-ons/tracker/opentargetfolder Message-ID: <200810081522.m98FM8nT024931@sheep.berlios.de> Author: axeld Date: 2008-10-08 17:22:07 +0200 (Wed, 08 Oct 2008) New Revision: 27927 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27927&view=rev Added: haiku/trunk/data/artwork/icons/App_OpenTargetFolder haiku/trunk/src/add-ons/tracker/opentargetfolder/ haiku/trunk/src/add-ons/tracker/opentargetfolder/Jamfile haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.rdef Modified: haiku/trunk/build/jam/HaikuImage haiku/trunk/src/add-ons/tracker/Jamfile Log: * Added the "Open Target Folder" Tracker add-on as published on BeBits to the repository and image. Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-08 14:07:21 UTC (rev 27926) +++ haiku/trunk/build/jam/HaikuImage 2008-10-08 15:22:07 UTC (rev 27927) @@ -394,7 +394,8 @@ AddFilesToHaikuImage beos system add-ons media : $(BEOS_ADD_ONS_MEDIA) ; AddFilesToHaikuImage beos system add-ons media plugins : $(BEOS_ADD_ONS_MEDIA_PLUGINS) ; -AddFilesToHaikuImage beos system add-ons Tracker : FileType-F ZipOMatic-Z ; +AddFilesToHaikuImage beos system add-ons Tracker + : FileType-F ZipOMatic-Z Open\ Target\ Folder-T ; AddSymlinkToHaikuImage beos system add-ons Tracker : /boot/beos/preferences/Backgrounds : Background-B ; AddSymlinkToHaikuImage beos system add-ons Tracker Added: haiku/trunk/data/artwork/icons/App_OpenTargetFolder =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_OpenTargetFolder ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/add-ons/tracker/Jamfile =================================================================== --- haiku/trunk/src/add-ons/tracker/Jamfile 2008-10-08 14:07:21 UTC (rev 27926) +++ haiku/trunk/src/add-ons/tracker/Jamfile 2008-10-08 15:22:07 UTC (rev 27927) @@ -1,6 +1,7 @@ SubDir HAIKU_TOP src add-ons tracker ; -SubInclude HAIKU_TOP src add-ons tracker zipomatic ; SubInclude HAIKU_TOP src add-ons tracker filetype ; +SubInclude HAIKU_TOP src add-ons tracker opentargetfolder ; SubInclude HAIKU_TOP src add-ons tracker mark_as ; +SubInclude HAIKU_TOP src add-ons tracker zipomatic ; Added: haiku/trunk/src/add-ons/tracker/opentargetfolder/Jamfile =================================================================== --- haiku/trunk/src/add-ons/tracker/opentargetfolder/Jamfile 2008-10-08 14:07:21 UTC (rev 27926) +++ haiku/trunk/src/add-ons/tracker/opentargetfolder/Jamfile 2008-10-08 15:22:07 UTC (rev 27927) @@ -0,0 +1,8 @@ +SubDir HAIKU_TOP src add-ons tracker opentargetfolder ; + +Application Open\ Target\ Folder-T : + opentargetfolder.cpp + + : be tracker + : opentargetfolder.rdef +; Added: haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp =================================================================== --- haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp 2008-10-08 14:07:21 UTC (rev 27926) +++ haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp 2008-10-08 15:22:07 UTC (rev 27927) @@ -0,0 +1,75 @@ +/* + * Copyright 2003-2008, Axel D?rfler, axeld at pinc-software.de. + * Distributed under the terms of the MIT License. + */ + +//! Open Target Folder - opens the folder of the link target in Tracker + +#include +#include + +#include +#include +#include +#include +#include +#include + + +extern "C" void +process_refs(entry_ref directoryRef, BMessage *msg, void *) +{ + BDirectory directory(&directoryRef); + if (directory.InitCheck() != B_OK) + return; + + int32 errors = 0; + entry_ref ref; + int32 index; + for (index = 0; msg->FindRef("refs", index, &ref) == B_OK; index ++) { + BSymLink link(&ref); + if (link.InitCheck() != B_OK || !link.IsSymLink()) { + errors++; + continue; + } + + BEntry targetEntry; + BPath path; + if (link.MakeLinkedPath(&directory, &path) < B_OK + || targetEntry.SetTo(path.Path()) != B_OK + || targetEntry.GetParent(&targetEntry) != B_OK) { + (new BAlert("Open Target Folder", + "Cannot open target folder. Maybe this link is broken?", + "Ok", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); + continue; + } + + // create Tracker message... + entry_ref target; + targetEntry.GetRef(&target); + + BMessage message(B_REFS_RECEIVED); + message.AddRef("refs", &target); + + // ...and send it + BMessenger messenger("application/x-vnd.Be-TRAK"); + messenger.SendMessage(&message); + + // TODO: select entry via scripting? + } + + if (errors) { + (new BAlert("Open Target Folder", + "This add-on can only be used on symbolic links.\n" + "It opens the folder of the link target in Tracker.", + "Ok"))->Go(NULL); + } +} + + +int +main(int /*argc*/, char **/*argv*/) +{ + fprintf(stderr, "This can only be used as a Tracker add-on.\n"); + return -1; +} Added: haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.rdef =================================================================== --- haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.rdef 2008-10-08 14:07:21 UTC (rev 27926) +++ haiku/trunk/src/add-ons/tracker/opentargetfolder/opentargetfolder.rdef 2008-10-08 15:22:07 UTC (rev 27927) @@ -0,0 +1,94 @@ +resource app_signature "application/x-vnd.haiku.opentargetfolder"; + +resource app_flags B_SINGLE_LAUNCH; + +resource app_version { + major = 1, + middle = 0, + minor = 0, + + variety = B_APPV_FINAL, + internal = 1, + + short_info = "Opens the Link Target's Folder", + long_info = "Open Target Folder, Copyright 2008 Haiku Inc." +}; + +resource file_types message { + "types" = "application/x-vnd.Be-symlink" +}; + +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon { + $"6E636966080500020006023841813C9B3BBEAB393A4F584B254D4A7AEB00FFE2" + $"ACFFF49806020016022C60673CAAABBEBB082E6EFB4BBA064A22B000FFFF8E02" + $"0006022C25F43C6917BEBB082E6EFB4BAFBF497E0B00FACE79FFBC410503A03D" + $"03020016023AE3B43C79DCBE5BC53CC0974B42AC47CA41009AFF5004016503FF" + $"8A00080A064A5D505D545958595E53504F0A04232F2D494A5B463E0A04232F46" + $"3E4A5BC3233C0A063A282E494A5A5C2C502A4C2C0A04302B30494A5951360A04" + $"302B51364A5954BB1E0A0A232F2D494A5B5C2C502A4C2C3A28382D302BB957BA" + $"A70607FA2F5C483C5344484448BE4EC20A3A30AEC4C0983A303E323E3228404A" + $"3F423D4A3F50360B0A060100000A0001061815FF01178400040A000106180015" + $"01178600040A030103000A020104000A050105000A010101000A040102000A07" + $"010720B240B2B30A00010738B280B28015FF01178310040A00010738B280B280" + $"00150117851004" +}; + +#else // HAIKU_TARGET_PLATFORM_HAIKU + +resource large_icon array { + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFF00D80000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFF0000FFFF0084D8D80000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFF003F000000848484D8D80000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFF003F3F3F0000ABA48484D8D80000FFFFFF000000FFFFFFFFFFFFFF" + $"FFFFFFFFFF003F3F3F3F3F0000ABA48484D8D8000000D8D8D80000FFFFFFFFFF" + $"FFFFFFFFFF003F3F3F3F3F3F3F0000ABA48484D8D8D8848484D8D80000FFFFFF" + $"FFFFFFFFFF003F3F3F3F3F3F3F3F3F0000ABA48484848484848484D8D800FFFF" + $"FF000000FF003F3F3F3F3F3F3F3F3F3F3F0000ABA4848484848484848400FFFF" + $"FF003F3F00003F3F3F3F3F3F3F3F3F3F3F3F3F0000ABA484848484848400FFFF" + $"FF00D8D83F3F00003F3F3F3F3F3F3F3F3F3F3F3F3F0000ABA48484848400FFFF" + $"FF00D8D8D8D83F3F00003F3F3F3F3F3F3F3F3F3F3F3F3F0000AB84848400FFFF" + $"FFFF00D8D8D8D8D83F3F0000003F3F3F3F003F3F3F3F3F3F00ABAB848400FFFF" + $"FFFF00D8D8D8D8D8D8D83F00F9003F3F3F00003F3F3F3F3F00ABAB8400FFFFFF" + $"FFFF00D8D8D8D8D8D8D800F95D5D00003F00F9003F3F3F3F00ABAB8400FFFFFF" + $"FFFFFF00D8D8D8D8D800F95D5DF9003F0000F9F9003F3F3F00ABAB8400FFFFFF" + $"FFFFFF00D8D8D8D800F95D5DF900D8D83F005DF9F9003F3F00ABAB8400FFFFFF" + $"FFFFFF00D8D8D800F95D5DF90000000000005D5DF9F9003F00ABAB8400FFFFFF" + $"FFFFFFFF00D800F95D5D5DF9F9F9F9F9F9F95D5D5DF9F90000ABA400FFFFFFFF" + $"FFFFFFFF0000F95D5D5D5D5D5D5D5D5D5D5D5D5D5D5DF9F900ABA400FFFFFFFF" + $"FFFFFFFF00A5A5A5A5A5A5A5A5A5A5A5A5A5A55D5D5DA50000ABA400FFFFFFFF" + $"FFFFFFFFFF00000000000000000000000000A55D5DA5003F00ABA400FFFFFFFF" + $"FFFFFFFFFFFFFF00008484D8D8D8D8D8D800A55DA500003F00ABA400FFFFFFFF" + $"FFFFFFFFFFFFFFFFFF00008484D8D8D8D800A5A500D8003F00AB00FFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFF00008484D8D800A500D8D8003F00AB00FFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF000084840000D8D8D8D80000AB00FFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000084D8D8D8D80000AB00FFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00008484D8D80000AB000D0DFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00008484840000000D0D0D0DFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00008400000D0D0D0D0DFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000D0D0DFFFFFFFF" +}; + +resource mini_icon array { + $"FFFFFFFFFF0000FFFFFFFFFFFFFFFFFF" + $"FFFFFFFF0084840000FFFF0000FFFFFF" + $"FFFFFF000000AA84840000D8D80000FF" + $"FFFFFF003F3F0000AA84848484D8D800" + $"0000FF003F3F001F0000AA8484848400" + $"003F00003F00F9003F000000AA848400" + $"00D83F3F00F95DA50000F90000AA8400" + $"FF00D800F95DA5000000F9F900AA8400" + $"FF0000F95D5DA5F9F9F95DF9F9008400" + $"FF00F95D5D5D5D5D5D5D5D5DF9F900FF" + $"FF00A5A5A5A5A5A5A5A5A55DA50000FF" + $"FFFF0000000000000000A5A500AA00FF" + $"FFFFFFFFFF0000848400A50000AA00FF" + $"FFFFFFFFFFFFFF000000008400AA0010" + $"FFFFFFFFFFFFFFFFFF00008400000010" + $"FFFFFFFFFFFFFFFFFFFFFF00000010FF" +}; + +#endif // HAIKU_TARGET_PLATFORM_HAIKU From axeld at pinc-software.de Wed Oct 8 17:50:43 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 17:50:43 +0200 CEST Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <20081008172010.46178.12@stippis2.1223452165.fake> Message-ID: <31551154552-BeMail@zon> Stephan Assmus wrote: > I was thinking though to replace the whole table with some tricks. > But I am > learning yet... At least that's the basic idea behind using CSS for layout :-) Bye, Axel. From humdingerb at googlemail.com Wed Oct 8 18:22:42 2008 From: humdingerb at googlemail.com (Humdinger) Date: Wed, 08 Oct 2008 18:22:42 +0200 Subject: [Haiku-commits] haiku/trunk/docs/welcome In-Reply-To: <16823104366-BeMail@zon> References: <16823104366-BeMail@zon> Message-ID: <48ECDE52.7060602@googlemail.com> Hi there! Sorry for the delay. I had the splendid idea to repartition my harddisk in order to install Haiku natively in hopes to somehow get it running at BeGeistert. Uh, uh... For some reason that took around 65(!) hours and kept me offline... I worked on some of all your suggestions, but the welcome package looks like a hip-hopping target at the moment. :) I appreciate your efforts to fix my HTML bumbling and improving the pages. Until it all calms down a bit (and you 1st rate coders get off this bikeshed... j/k), I'll work on some tracker.html contents. Regards, Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-- Deutsche Haiku News @ http://haiku-gazette.blogspot.com From revol at free.fr Wed Oct 8 18:33:02 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Wed, 08 Oct 2008 18:33:02 +0200 CEST Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <20081008172010.46178.12@stippis2.1223452165.fake> Message-ID: <259117608-BeMail@laptop> > > I just did it before reading the next mails, so I didn't notice. > > Happy > > svn resolving :p > > Wasn't so bad. It turned out you worked mostly on the table, which I > had > not started doing. :-) > > I was thinking though to replace the whole table with some tricks. > But I am > learning yet... Yes usually it's done with one or two
    and property changes. But it's not too bad for now. Fran?ois. From axeld at pinc-software.de Wed Oct 8 18:57:11 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Wed, 08 Oct 2008 18:57:11 +0200 CEST Subject: [Haiku-commits] haiku/trunk/docs/welcome In-Reply-To: <48ECDE52.7060602@googlemail.com> Message-ID: <35539265792-BeMail@zon> Humdinger wrote: > Sorry for the delay. I had the splendid idea to repartition my > harddisk in order to > install Haiku natively in hopes to somehow get it running at > BeGeistert. Uh, uh... > For some reason that took around 65(!) hours and kept me offline... That's so long one could think you installed Windows in the process to reformat the drive :-) Huh? > I worked on some of all your suggestions, but the welcome package > looks like a hip-hopping > target at the moment. :) > I appreciate your efforts to fix my HTML bumbling and improving the > pages. Until it all > calms down a bit (and you 1st rate coders get off this bikeshed... j/ > k), I'll work on some > tracker.html contents. The contents itself haven't really changed a lot. Do you still need your SVN introduction, or are you already more familiar with it? Have you already a copy of the SVN repository around, or would you check it out to work on the documentation alone? Bye, Axel. From humdingerb at googlemail.com Wed Oct 8 20:00:33 2008 From: humdingerb at googlemail.com (Humdinger) Date: Wed, 08 Oct 2008 20:00:33 +0200 Subject: [Haiku-commits] haiku/trunk/docs/welcome In-Reply-To: <35539265792-BeMail@zon> References: <35539265792-BeMail@zon> Message-ID: <48ECF541.6040904@googlemail.com> Axel D?rfler wrote: > Humdinger wrote: >> For some reason that took around 65(!) hours and kept me offline... > That's so long one could think you installed Windows in the process to > reformat the drive :-) > Huh? Insane! Imagine my face when that thing announced 5 hours till completion and I come back 5 hours later and it says "4 hours to completion"! Gahh. And when it's finally there, some 20+ hours later, it said "nananana... that was only a read-only test! Now it takes 9 hours for the real thing." Which translated to about 40 hours. Double-Gahh! > The contents itself haven't really changed a lot. I know. Just the surroundings. I just had a look and it's really beautiful! It's positively delightful to watch a thing blossom when everyone contributes, adds and improves things. Spiffing! > Do you still need your SVN introduction, or are you already more > familiar with it? Stephan was so kind to give me a run down of things. I haven't yet tried to make a diff. Hopefully I have some time tomorrow to work on it. > Have you already a copy of the SVN repository around, or would you > check it out to work on the documentation alone? I checked out the whole source and also build and installed it on my laboriously attained partition. Doesn't quite boot yet. Maybe I can get some hints this BeGeistert. Whoo, excited! :) Regards, Humdinger -- --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-- Deutsche Haiku News @ http://haiku-gazette.blogspot.com From superstippi at gmx.de Wed Oct 8 20:04:17 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Wed, 08 Oct 2008 20:04:17 +0200 Subject: [Haiku-commits] r27923 - haiku/trunk/docs/welcome In-Reply-To: <259117608-BeMail@laptop> References: <259117608-BeMail@laptop> Message-ID: <20081008200417.48109.16@stippis2.1223452165.fake> Fran?ois Revol wrote: > > > I just did it before reading the next mails, so I didn't notice. > > > Happy > > > svn resolving :p > > > > Wasn't so bad. It turned out you worked mostly on the table, which I > > had > > not started doing. :-) > > > > I was thinking though to replace the whole table with some tricks. But > > I am > > learning yet... > > Yes usually it's done with one or two
    and property changes. But > it's not too bad for now. Yes, I am thinking the whole layout-necessary table stuff can be removed by specifying margins and such. I was wondering if there was a way to have the whole thing external, without using frames... but if it can be reduced to a few generic lines, that should work as well. Still on it... (I wanted to learn this anyways.) Best regards, -Stephan From julun at mail.berlios.de Wed Oct 8 21:39:52 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Wed, 8 Oct 2008 21:39:52 +0200 Subject: [Haiku-commits] r27928 - haiku/trunk/src/bin Message-ID: <200810081939.m98JdqIK023094@sheep.berlios.de> Author: julun Date: 2008-10-08 21:39:51 +0200 (Wed, 08 Oct 2008) New Revision: 27928 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27928&view=rev Modified: haiku/trunk/src/bin/hey.cpp Log: * use snprintf Modified: haiku/trunk/src/bin/hey.cpp =================================================================== --- haiku/trunk/src/bin/hey.cpp 2008-10-08 15:22:07 UTC (rev 27927) +++ haiku/trunk/src/bin/hey.cpp 2008-10-08 19:39:51 UTC (rev 27928) @@ -1339,8 +1339,11 @@ for (int32 i = 0; i < 10 && pinfo[pinfo_index].types[i] != 0; i++) { uint32 type = pinfo[pinfo_index].types[i]; char str2[6]; - sprintf(str2, "%c%c%c%c ", int(type & 0xFF000000) >> 24, - int(type & 0xFF0000) >> 16, int(type & 0xFF00) >> 8, (int)type & 0xFF); + snprintf(str2, sizeof(str2), "%c%c%c%c ", + int(type & 0xFF000000) >> 24, + int(type & 0xFF0000) >> 16, + int(type & 0xFF00) >> 8, + (int)type & 0xFF); strcat(str, str2); } @@ -1348,10 +1351,13 @@ for (int32 j = 0; j < 5 && pinfo[pinfo_index].ctypes[i].pairs[j].type != 0; j++) { uint32 type = pinfo[pinfo_index].ctypes[i].pairs[j].type; char str2[strlen(pinfo[pinfo_index].ctypes[i].pairs[j].name) + 8]; - sprintf(str2, "(%s %c%c%c%c)", pinfo[pinfo_index].ctypes[i].pairs[j].name, + snprintf(str2, sizeof(str2), + "(%s %c%c%c%c)", + pinfo[pinfo_index].ctypes[i].pairs[j].name, int(type & 0xFF000000) >> 24, int(type & 0xFF0000) >> 16, - int(type & 0xFF00) >> 8, (int)type & 0xFF); + int(type & 0xFF00) >> 8, + (int)type & 0xFF); strcat(str, str2); } } From stippi at mail.berlios.de Wed Oct 8 22:52:01 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Wed, 8 Oct 2008 22:52:01 +0200 Subject: [Haiku-commits] r27929 - in haiku/trunk/docs/welcome: . tracker-images welcome-images Message-ID: <200810082052.m98Kq119002060@sheep.berlios.de> Author: stippi Date: 2008-10-08 22:51:49 +0200 (Wed, 08 Oct 2008) New Revision: 27929 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27929&view=rev Added: haiku/trunk/docs/welcome/tracker-images/open-with-preferred.png haiku/trunk/docs/welcome/welcome-images/logo.png Removed: haiku/trunk/docs/welcome/welcome-images/logo_lb.png haiku/trunk/docs/welcome/welcome-images/logo_lt.png haiku/trunk/docs/welcome/welcome-images/logo_rb.png haiku/trunk/docs/welcome/welcome-images/logo_rt.png Modified: haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/bugreports.html haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/gui.html haiku/trunk/docs/welcome/index.html haiku/trunk/docs/welcome/queries.html haiku/trunk/docs/welcome/tracker-images/open-with.png haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/twitcher.html haiku/trunk/docs/welcome/welcome.css haiku/trunk/docs/welcome/welcome.html haiku/trunk/docs/welcome/workshop-filetypes+attributes.html haiku/trunk/docs/welcome/workspaces.html Log: * More conversion to using CSS. The complicated table for layouting is gone, the logo area is very simple now, as well as the navigation area. Tweaked the looks to remind a little of the Haiku website look. * Incorporated patch by Humdinger (better "Open With..." menu screen shot, added "Open With Preferred" screen shot and text.) * Some minor fixes here and there. Modified: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,59 +3,26 @@ File Attributes - + - + - - - - - - - - - - - - - - - - - - + Next: Index +

    + - - - - - - - - - - - +

    + -
    - logo - - logo - - File Attributes -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: Filetypes     - Next: Index -

     
      +
    -

    File Attributes

    Attributes are data fields that belong to a file but aren't part of that file, e.g. they are not computed into the file size and can be copied or changed without touching the file itself. The system uses these attributes to store e.g. file size, file type or date of the last modification. This is similar to other operating systems and their filesystems.

    What's different is that you can add any kind of attribute to any file and display it or make it editable in a Tracker window. You just have to define the kind of attribute you want to add to a file type (e.g. string, integer or time) and give it a name and description. @@ -163,24 +130,18 @@ command name followed by "-h" or "--help".

    -
    +
    -
     
      +
    +

    Welcome     Previous: Filetypes     Next: Index -

     
    + Modified: haiku/trunk/docs/welcome/bugreports.html =================================================================== --- haiku/trunk/docs/welcome/bugreports.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/bugreports.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -2,57 +2,23 @@ - Bugreporting - + Reporting bugs + - + - - - - - - - - - - - - + +
    +

    + Welcome +

    +
    - - - - - +
    -
    - - - - + + - +

    + -
    - logo - - logo - - Welcome to Haiku! -
    - logo - - logo -
      - Welcome -     - -  
      -

    Reporting bugs

    Since our developers are unable to test every hardware combination, nor every different way of interacting with the operating system, we are relying on you to give us some input on how things work at your end. Since this is a very early product, it is very likely that you will encounter bugs. We thank you for taking the time to report these.

    Please follow these guidelines to create helpful bug reports:

    @@ -63,28 +29,21 @@
  • Include basic information such as how you are testing Haiku (on real hardware, on VMWare, on QEMU, etc.).

  • Mention which revision from SVN you are running. You can find this information in 'About This System...' from the Deskbar menu.

  • Describe the problem you are experiencing. Try to be as accurate as you can: describe the actual behavior, and the behavior you expected.

  • -
  • Describe what steps to you need to perform in order to expose the bug. This will help developers reproduce the bug.

  • +
  • Describe what steps you need to perform in order to expose the bug. This will help developers reproduce the bug.

  • Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to make a screen shot (the PRINT key files a PNG into /boot/home/).
    If it is a hardware problem, include a copy of the syslog file (just query for "syslog" to find it).

  • After the bug has been reported, a developer will look at your bug and try to classify it. Remember, we are all volunteers, and as such, sometimes a bug report might go unanswered for a while. Adding new information when it becomes available usually helps getting a bug picked up quicker, but do not try to 'bump' the bug up by adding non-descriptive comments.

  • Remember, reporting a bug is not something you spend a little time on and then you are done. If you reported a bug, then you are part of the Haiku development process. Developers might come up with questions while they are trying to fix your bug. Please stay around to answer these. Consider your participation 'done' when the bug is marked as 'fixed'. Together we can improve Haiku, bit by bit. -
  • -
    -
     
    Modified: haiku/trunk/docs/welcome/deskbar.html =================================================================== --- haiku/trunk/docs/welcome/deskbar.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/deskbar.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,59 +3,26 @@ The Deskbar - + - + - - - - - - - - - - - - - - - - - - + Next: Filetypes +

    + - - - - - - - - - - - +

    + -
    - logo - - logo - - The Deskbar -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: The Tracker     - Next: Filetypes -

     
      +
    -

    The Deskbar

    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.

    @@ -78,7 +45,7 @@
  • Always on Top -- The Deskbar always stays above all other windows.
  • Auto Raise -- The Deskbar pops to the front if the mouse pointer touches it.
  • Sort Running Applications -- Sorts the list of running programs alphabetically.
  • -
  • Tracker always First -- Even if you sort alphabetically, the Tracker entry always stays first in the list.</i>
  • +
  • Tracker always First -- Even if you sort alphabetically, the Tracker entry always stays first in the list.
  • 24 Hour Clock -- Toggles between 24 and 12 hour clock.
  • Show Seconds -- Adds the display of seconds to the clock.
  • European Date -- Shows the date in European format: day-month-year
  • @@ -114,24 +81,17 @@

    In front of every application's windows is a symbol providing info on its state. A bright symbol means a window is visible, a dark one that it's minimized. Three lines in front of a symbol shows that it's not on the current workspace.

    -
    +
    -
     
      +
    +

    Welcome     Previous: The Tracker     Next: Filetypes -

     
    Modified: haiku/trunk/docs/welcome/filetypes.html =================================================================== --- haiku/trunk/docs/welcome/filetypes.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/filetypes.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,59 +3,26 @@ Filetypes - + - + - - - - - - - - - - - - - - - - - - + Next: File Attributes +

    + - - - - - + - - - - - +

    + -
    - logo - - logo - - Filetypes -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: The Deskbar     - Next: File Attributes -

     
      +
    -

    Filetypes

    Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.


    @@ -97,22 +64,17 @@

    At the bottom are version and copyright information. Like the application signature, they are filled in by the app's author and shouldn't be altered.


    -
     
      +
    +

    Welcome     Previous: The Deskbar     Next: File Attributes -

     
    Modified: haiku/trunk/docs/welcome/gui.html =================================================================== --- haiku/trunk/docs/welcome/gui.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/gui.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,57 +3,24 @@ Haiku's GUI - + - + - - - - - - - - - - - - - - - - - - + Next: Workspaces +

    + - - - - - - - - - - - +

    + -
    - logo - - logo - - Haiku's GUI -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     - Next: Workspaces -

     
      +
    -

    Haiku's GUI

    Haiku's graphical user interface is an integral part of the system. Unlike unix-based operating systems, there's no separate window manager and booting just into a command line shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary.

    As you probably have experience with other graphical environments, let's skip over the standards like menus, right-click context menus, drag&drop etc. Let's have a look at the few unique aspects of Haiku's GUI instead.

    @@ -76,22 +43,15 @@

    That's pretty much all there is to Haiku's GUI widgets in general. You'll find more information in Getting to know the system.

    -
    +
    -
     
      +
    +

    Welcome     Next: Workspaces -

     
    Modified: haiku/trunk/docs/welcome/index.html =================================================================== --- haiku/trunk/docs/welcome/index.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/index.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,59 +3,26 @@ The Index - + - + - - - - - - - - - - - - - - - - - - + Next: Queries +

    + - - - - - + - - - - - +

    + -
    - logo - - logo - - The Index -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: File Attributes     - Next: Queries -

     
      +
    -

    The Index

    Attributes and Queries are key features of Haiku. While attributes are useful on their own, to display additional information on a file, for a query on them, they need to be indexed. It puts them into a lookup table, which in turn makes queries lightning fast.
    @@ -142,22 +109,17 @@ If no volume is specified, the volume of the current directory is assumed. -

     
      +
    +

    Welcome     Previous: File Attributes     Next: Queries -

     
    Modified: haiku/trunk/docs/welcome/queries.html =================================================================== --- haiku/trunk/docs/welcome/queries.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/queries.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,57 +3,24 @@ Queries - + - + - - - - - - - - - - - - - - - - - - + Previous: The Index +

    + - - - - - - - - - - - +

    + -
    - logo - - logo - - Queries -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     - Previous: The Index -

     
      +
    -

    Queries

    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.

    @@ -141,22 +108,15 @@ Open the new folder and paste in the layout with Attributes | Paste Attributes.

    -
    +
    -
     
      +
    +

    Welcome     Previous: The Index -

     
    Added: haiku/trunk/docs/welcome/tracker-images/open-with-preferred.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/open-with-preferred.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/docs/welcome/tracker-images/open-with.png =================================================================== (Binary files differ) Modified: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,59 +3,26 @@ The Tracker - + - + - - - - - - - - - - - - - - - - - - + Next: The Deskbar +

    + - - - - - + - - - - - +

    + -
    - logo - - logo - - The Tracker -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: The Twitcher     - Next: The Deskbar -

     
      +
    -

    The Tracker

    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 e.g. crashed or frozen Tracker is to call the TeamManager with CTRL+ALT+DEL to kill Tracker and then click the Restart Desktop... button. The same brings back a wayward Deskbar. @@ -138,28 +105,24 @@

    Choosing Edit Templates... opens the folder /boot/home/config/settings/Tracker/Tracker New Templates. Creating a file in that folder will offer its filetype with the file's name and other attributes as template in the New... menu. Here, there's a file "Text" with the filetype text/plain. See topic Filetypes for more info.

  • Open With... - A submenu offers all applications that can handle this filetype.

    -open-with.png -

    The preferred application that would open the file when double-clicked, is checkmarked. In this submenu are only those applications listed that deal with the exact filetype, in this case it's a text file, the type text/plain. If you don't click on an app in the submenu, but on Open With... a panel opens: +open-with.png +

    The preferred application that would open the file when double-clicked, is checkmarked. This submenu list first those applications that can handle the exact filetype, in this case it's a text file, the type text/plain. Next come all applications that can handle that supertype in general, here text/*. Last in the list are those that can deal with any file. If you don't click on an app in the submenu, but on the Open With... entry instead, a panel opens:

    -open-with-preferred +open-with-preferred +

    Here you'll again find the programs that were listed in the submenu. By selecting one and clicking the Open and Make Preferred button, you changed the preferred application for every file of that filetype, here text/plain.

    -
  •  
      +
    +

    Welcome     Previous: The Twitcher     Next: The Deskbar -

     
    Modified: haiku/trunk/docs/welcome/twitcher.html =================================================================== --- haiku/trunk/docs/welcome/twitcher.html 2008-10-08 19:39:51 UTC (rev 27928) +++ haiku/trunk/docs/welcome/twitcher.html 2008-10-08 20:51:49 UTC (rev 27929) @@ -3,74 +3,37 @@ The Twitcher - + - + - - - - - - - - - - - - - - - - - - + Next: The Tracker +

    + - - - - - - -
    - logo - - logo - - The Twitcher -
    - logo - - logo -
      - Welcome + +
    +

    + Welcome     Previous: Workspaces     - Next: The Tracker -

     
      +
    -

    The Twitcher

    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 CURSOR LEFT/RIGHT. 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 CURSOR UP/DOWN 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.

    +

    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. +

    -
    +
    -
     
    Added: haiku/trunk/docs/welcome/welcome-images/logo.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/welcome-images/logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: haiku/trunk/docs/welcome/welcome-images/logo_lb.png Deleted: haiku/trunk/docs/welcome/welcome-images/logo_lt.png [... truncated: 574 lines follow ...] From mmu_man at mail.berlios.de Thu Oct 9 00:04:01 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Thu, 9 Oct 2008 00:04:01 +0200 Subject: [Haiku-commits] r27930 - haiku/trunk/docs/welcome Message-ID: <200810082204.m98M41ZZ011504@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 00:04:01 +0200 (Thu, 09 Oct 2008) New Revision: 27930 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27930&view=rev Modified: haiku/trunk/docs/welcome/welcome.html Log: Better definition for OsDrawer Modified: haiku/trunk/docs/welcome/welcome.html =================================================================== --- haiku/trunk/docs/welcome/welcome.html 2008-10-08 20:51:49 UTC (rev 27929) +++ haiku/trunk/docs/welcome/welcome.html 2008-10-08 22:04:01 UTC (rev 27930) @@ -65,7 +65,7 @@
  • Haikuware
  • BeBits
  • HaikuPorts maintains patches for ported software
  • -
  • OsDrawer hosts development tools for native software
  • +
  • OsDrawer hosts native BeOS and Haiku open source software projects
  • From mmu_man at mail.berlios.de Thu Oct 9 01:00:07 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Thu, 9 Oct 2008 01:00:07 +0200 Subject: [Haiku-commits] r27931 - haiku/trunk/docs/welcome Message-ID: <200810082300.m98N07N9014371@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 00:59:59 +0200 (Thu, 09 Oct 2008) New Revision: 27931 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27931&view=rev Modified: haiku/trunk/docs/welcome/bugreports.html haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/gui.html Log: Some acronyms. Modified: haiku/trunk/docs/welcome/bugreports.html =================================================================== --- haiku/trunk/docs/welcome/bugreports.html 2008-10-08 22:04:01 UTC (rev 27930) +++ haiku/trunk/docs/welcome/bugreports.html 2008-10-08 22:59:59 UTC (rev 27931) @@ -27,10 +27,10 @@
  • After you have established this is a unique bug, make your information as accurate as possible:

    • Include basic information such as how you are testing Haiku (on real hardware, on VMWare, on QEMU, etc.).

    • -
    • Mention which revision from SVN you are running. You can find this information in 'About This System...' from the Deskbar menu.

    • +
    • Mention which revision from SVN you are running. You can find this information in 'About This System...' from the Deskbar menu.

    • Describe the problem you are experiencing. Try to be as accurate as you can: describe the actual behavior, and the behavior you expected.

    • Describe what steps you need to perform in order to expose the bug. This will help developers reproduce the bug.

    • -
    • Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to make a screen shot (the PRINT key files a PNG into /boot/home/).
      If it is a hardware problem, include a copy of the syslog file (just query for "syslog" to find it).
    • +
    • Attach as much information as you have. If it is a GUI bug, or a bug in one of the applications, try to make a screen shot (the PRINT key files a PNG into /boot/home/).
      If it is a hardware problem, include a copy of the syslog file (just query for "syslog" to find it).

  • After the bug has been reported, a developer will look at your bug and try to classify it. Remember, we are all volunteers, and as such, sometimes a bug report might go unanswered for a while. Adding new information when it becomes available usually helps getting a bug picked up quicker, but do not try to 'bump' the bug up by adding non-descriptive comments.

  • Remember, reporting a bug is not something you spend a little time on and then you are done. If you reported a bug, then you are part of the Haiku development process. Developers might come up with questions while they are trying to fix your bug. Please stay around to answer these. Consider your participation 'done' when the bug is marked as 'fixed'. Together we can improve Haiku, bit by bit. Modified: haiku/trunk/docs/welcome/filetypes.html =================================================================== --- haiku/trunk/docs/welcome/filetypes.html 2008-10-08 22:04:01 UTC (rev 27930) +++ haiku/trunk/docs/welcome/filetypes.html 2008-10-08 22:59:59 UTC (rev 27931) @@ -24,7 +24,7 @@

    Filetypes

    -

    Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.

    +

    Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.


    Setting the filetype of a specific file

    You can change the type of a specific file, its icon and the associated application. Select the file and invoke the Add-Ons | Filetype add-on from the right-click context menu. Modified: haiku/trunk/docs/welcome/gui.html =================================================================== --- haiku/trunk/docs/welcome/gui.html 2008-10-08 22:04:01 UTC (rev 27930) +++ haiku/trunk/docs/welcome/gui.html 2008-10-08 22:59:59 UTC (rev 27931) @@ -25,7 +25,7 @@

    Haiku's graphical user interface is an integral part of the system. Unlike unix-based operating systems, there's no separate window manager and booting just into a command line shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary.

    As you probably have experience with other graphical environments, let's skip over the standards like menus, right-click context menus, drag&drop etc. Let's have a look at the few unique aspects of Haiku's GUI instead.


    -

    Before we start with that, there's one more thing you'll probably run into quite quickly: By default, Haiku's option key, to invoke commands from menus for example, is not the usual CTRL key, but ALT instead. This has historical reasons, because the BeOS was inspired somewhat by MacOS. After you get used to it, it actually feels better as e.g. ALT+C and ALT+V is reached more conveniently on the keyboard and these commands seemlessly integrate into the bash shell of the Terminal. +

    Before we start with that, there's one more thing you'll probably run into quite quickly: By default, Haiku's option key, to invoke commands from menus for example, is not the usual CTRL key, but ALT instead. This has historical reasons, because the BeOS was inspired somewhat by MacOS. After you get used to it, it actually feels better as e.g. ALT+C and ALT+V is reached more conveniently on the keyboard and these commands seemlessly integrate into the bash shell of the Terminal.

    In any case, you can switch to the maybe more familiar CTRL key in the Menu preferences.


    From stippi at mail.berlios.de Thu Oct 9 01:25:41 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Thu, 9 Oct 2008 01:25:41 +0200 Subject: [Haiku-commits] r27932 - haiku/trunk/docs/welcome Message-ID: <200810082325.m98NPfUa025155@sheep.berlios.de> Author: stippi Date: 2008-10-09 01:25:32 +0200 (Thu, 09 Oct 2008) New Revision: 27932 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27932&view=rev Modified: haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/filetypes.html haiku/trunk/docs/welcome/index.html haiku/trunk/docs/welcome/queries.html haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/welcome.css Log: * Fixed some layout issues here and there. * Fixed wrong link to filetypes workshop. Modified: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -33,7 +33,7 @@

    As you can see, these are all 0-sized files with attached attributes, the E-mail attribute of "John Nox" being edited right in Tracker.

    If you index these attributes, as People, Email or audio files are by default, they are also searchable with Haiku's fast query system.

    -
    +

    Attributes in Tracker

    Attributes are displayed quite similar to a database or spreadsheet. Using Tracker you can choose which attributes to display (columns) and sort file listings (rows) accordingly.

    To do this, open a Tracker window, click on the Attributes menu, and select the attributes you want to display. Alternatively, simply right-click onto a column heading and mark the items in the context menu. You can rearrange the columns by a simple drag&drop of the column heading. Moving a column out of a window, is a fast way to get rid of columns you don't need. @@ -41,7 +41,7 @@

    Click on a column heading to toggle the sorting order from ascending to descending. You can establish a secondary sort order by pressing the SHIFT key while clicking on a column heading. Doing that you can, for example, sort your People files by company and within that order sort by contact name. See the above screenshot as an example. The secondary sort order is marked by a dotted line under the heading.

    Editing these attributes is as simple as renaming a file: Either click on an entry or press ALT+E and move between the attibutes with TAB and SHIFT+TAB. ESC leaves the editing mode without applying the changes.

    -
    +

    Attributes in Terminal

    If you prefer to use the commandline or plan to work with many files using scripting, there are several commands for controlling attributes from Terminal:

    Modified: haiku/trunk/docs/welcome/deskbar.html =================================================================== --- haiku/trunk/docs/welcome/deskbar.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/deskbar.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -29,7 +29,8 @@ 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 has to be in this compacted format when it's put in the lower corners of the screen. -


    +

    +

    The Deskbar Menu

    A menu opens when you click on the Deskbar's uppermost part:
    @@ -58,22 +59,22 @@

  • Recent Documents, Folders, Applications -- List the last recently opened documents, folders and applications (see Configure Deskbar Menu... below).
  • Applications, Demos, Deskbar Applets, Preferences -- List of installed applications, demos, applets and preferences (see Configure Deskbar Menu... below).
  • -
    +

    Configure Deskbar Menu...

    configure.png

    In this panel you set how many recent documents, folders and applications are shown in the Deskbar, or if you show them at all.

    You also configure folders and their contents, which are by default Applications, Demos, Deskbar Applets, and Preferences. You can add your own entries and edit or remove items. 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. -


    +

    The Tray

    calendar.png

    Among other things, the tray's 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

    list-of-apps.png.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. Modified: haiku/trunk/docs/welcome/filetypes.html =================================================================== --- haiku/trunk/docs/welcome/filetypes.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/filetypes.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -25,29 +25,29 @@

    Filetypes

    Other than Windows, Haiku doesn't rely on the 3-letter file extension for a file type (e.g. .txt, .jpg, .mp3). This method is only a last resort fallback. Haiku uses MIME types just like it's custom on the internet.

    -

    Setting the filetype of a specific file

    You can change the type of a specific file, its icon and the associated application. Select the file and invoke the Add-Ons | Filetype add-on from the right-click context menu.

    filetype-addon.png -
    +

    The File Type

    This is a JPEG file, it's MIME string image/jpeg. Let's say you definitely know that it's not a JPEG but a GIF. You can change that either by entering the correct MIME string by hand or with one of the two buttons below the textbox:

    • Select... shows a hierarchical list of filetypes where you navigate to image | GIF Image.
    • Same as... opens a file dialog where you choose any file that already has the filetype you're looking for.

    +

    The Preferred Application

    This dropdown menu shows a list of all applications that can handle this particular filetype. From here you can choose which program should open this specific file when it's double-clicked. You could, for example, change a HTML file's preferred application from the browser to a text editor while you're working on it. Every other HTML file still opens in the browser, only this particular one starts in your text editor.

    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 dropdown 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.

    -

    +

    Global settings with the Filetypes Preferences

    The Filetypes preferences don't deal with individual files but with global settings of filetypes. You can change default icons and preferred applications or add, remove, or alter attributes of whole filetypes. You can even create your own filetype from scratch.

    All filetypes and their configurations are stored in /boot/home/config/settings/beos_mime. Before you start experimenting, it may be prudent to make a backup of that folder...

    -

    To learn more about the Filetypes preferences see the workshop: DVDdb (Filetypes & Attributes).

    -
    +

    To learn more about the Filetypes preferences see the workshop: DVDdb (Filetypes & Attributes).

    +

    Special settings for applications

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

    filetype-addon-stylededit.png @@ -61,9 +61,9 @@
  • Background App - The app won't appear in Twitcher or the list of running apps of the Deskbar.
  • Then there's the list of supported filetypes. You can add (and remove) filetypes if you think the application can handle them. As a consequence, the app will appear in the menu for preferred applications or Tracker's Open with... context menu when you right-click on a file of that type.

    -

    At the bottom are version and copyright information. Like the application signature, they are filled in by the app's author and shouldn't be altered.

    -
    +

    At the bottom are version and copyright information. Like the application signature, they are filled in by the app's author and shouldn't be altered.

    +
    Modified: haiku/trunk/docs/welcome/index.html =================================================================== --- haiku/trunk/docs/welcome/index.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/index.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -28,7 +28,7 @@ Attributes and Queries are key features of Haiku. While attributes are useful on their own, to display additional information on a file, for a query on them, they need to be indexed. It puts them into a lookup table, which in turn makes queries lightning fast.
    The index is part of the filesystem and is kept for every volume/partition separately.

    -
    +

    Indexing commands in Terminal

    There are several commands to manage the index:

      Modified: haiku/trunk/docs/welcome/queries.html =================================================================== --- haiku/trunk/docs/welcome/queries.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/queries.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -24,7 +24,7 @@

      Queries

      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

      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:
      @@ -45,13 +45,12 @@ [8] Check if your query is supposed to Include trash.
      [9] Optionally, enter a name for this query if you want to save it.
      [10] You can drag&drop the icon to save the query. -


      -

      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. -


      +

      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"

      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 (see Index).
      @@ -65,8 +64,8 @@
      query-winsow-filled.png

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


      +

      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 @@ -82,16 +81,13 @@ ||(MAIL:subject=="*[sS][kK][eE][pP][tT][iI][cC][aA][lL][iI][tT][yY]*")) &&(BEOS:TYPE=="text/x-email")) -

      What's the use? -

      +

      What's the use?

      • You could copy and paste the string into an email, forum or IRC for others to use or debug.
      • You can use this method to construct a query in "Attribute mode and then switch to "Formula mode, to comfortably generate a search string to use for a query in Terminal or a script.
      • You can fine tune your query by inserting paranthesis 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

      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 Modified: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-08 23:25:32 UTC (rev 27932) @@ -27,17 +27,18 @@

      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 e.g. crashed or frozen Tracker is to call the TeamManager with CTRL+ALT+DEL to kill Tracker and then click the Restart Desktop... button. The same brings back a wayward Deskbar.

      -
      +

      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.

      drill-down.png
      -

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

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

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


      +

      +

      Navigating

      Moving through your folders is one of Trackers main purposes, just like the file managers on other platforms. Haiku's Tracker has some unique features that will help you doing that efficiently.

      Instead of double-clicking your way down folder after folder, there's a better way to drill down: @@ -64,7 +65,7 @@

    • ALT+ESC - Enter menu bar (leave with ESC).
    • right MENU-KEY - Open Deskbar menu (leave with ESC).

    -
    +

    Appearance

    window-menu.png
    @@ -79,7 +80,7 @@

    The rest of the functions are pretty self-explanatory, leaving the...

    -
    +

    Tracker preferences

    Window | Preferences... opens a panel that offers a number of setting that, where not obvious, should become clear once tried out. Since all settings are applied live, you'll immediately see the changes.
    So, in short, the not so obvious settings: @@ -94,7 +95,7 @@

  • Volume Icons - Set the colour of an optional indicator of free space that's shown besides a disk's icon.
  • -
    +

    Working with files

    When invoked on a selected file, the File menu offers about the same options as when you open a context menu by right-clicking the file. Exceptions are commands that don't specifically target a selected file, like Find.. or New....

    As usual the usage of the commands is pretty clear, so we'll concentrate on the niftier parts.

    Modified: haiku/trunk/docs/welcome/welcome.css =================================================================== --- haiku/trunk/docs/welcome/welcome.css 2008-10-08 22:59:59 UTC (rev 27931) +++ haiku/trunk/docs/welcome/welcome.css 2008-10-08 23:25:32 UTC (rev 27932) @@ -39,6 +39,14 @@ text-decoration: none; color: #0c3762; } +h3 a:hover, a:active { + text-decoration: none; + color: #222; +} +h4 a:hover, a:active { + text-decoration: none; + color: #000; +} /* basic text elements */ From mmu_man at mail.berlios.de Thu Oct 9 01:30:53 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Thu, 9 Oct 2008 01:30:53 +0200 Subject: [Haiku-commits] r27933 - haiku/trunk/docs/welcome Message-ID: <200810082330.m98NUr8o010281@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 01:30:53 +0200 (Thu, 09 Oct 2008) New Revision: 27933 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27933&view=rev Modified: haiku/trunk/docs/welcome/gui.html Log: Unix is a name, should be capitalized. (it's actually a trademark too) Modified: haiku/trunk/docs/welcome/gui.html =================================================================== --- haiku/trunk/docs/welcome/gui.html 2008-10-08 23:25:32 UTC (rev 27932) +++ haiku/trunk/docs/welcome/gui.html 2008-10-08 23:30:53 UTC (rev 27933) @@ -22,7 +22,7 @@

    Haiku's GUI

    -

    Haiku's graphical user interface is an integral part of the system. Unlike unix-based operating systems, there's no separate window manager and booting just into a command line shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary. +

    Haiku's graphical user interface is an integral part of the system. Unlike Unix-based operating systems, there's no separate window manager and booting just into a command line shell is not possible. Haiku's focus being on the desktop user, this is just not considered necessary.

    As you probably have experience with other graphical environments, let's skip over the standards like menus, right-click context menus, drag&drop etc. Let's have a look at the few unique aspects of Haiku's GUI instead.


    Before we start with that, there's one more thing you'll probably run into quite quickly: By default, Haiku's option key, to invoke commands from menus for example, is not the usual CTRL key, but ALT instead. This has historical reasons, because the BeOS was inspired somewhat by MacOS. After you get used to it, it actually feels better as e.g. ALT+C and ALT+V is reached more conveniently on the keyboard and these commands seemlessly integrate into the bash shell of the Terminal. From revol at free.fr Thu Oct 9 01:52:21 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Thu, 09 Oct 2008 01:52:21 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27929_-_in_haiku/trunk/docs/wel?= =?windows-1252?q?come=3A_=2E_tracker-images_welcome-images?= In-Reply-To: <200810082052.m98Kq119002060@sheep.berlios.de> Message-ID: <1817011937-BeMail@laptop> > Log: > * More conversion to using CSS. The complicated table for layouting > is gone, > the logo area is very simple now, as well as the navigation area. > Tweaked > the looks to remind a little of the Haiku website look. I was afraid it got screwed up as it didn't work in NetSurf, but it actually works just fine, it was just discarding the .css as not being text/css but text/x-source-code as sniffed by Zeta... I made it so NS overrides the mime for known extensions and now it works. Fran?ois. From bonefish at mail.berlios.de Thu Oct 9 02:47:44 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Thu, 9 Oct 2008 02:47:44 +0200 Subject: [Haiku-commits] r27934 - haiku/trunk/src/tests/servers/debug Message-ID: <200810090047.m990li0P020311@sheep.berlios.de> Author: bonefish Date: 2008-10-09 02:47:36 +0200 (Thu, 09 Oct 2008) New Revision: 27934 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27934&view=rev Modified: haiku/trunk/src/tests/servers/debug/crashing_app.cpp Log: Added "--signal" option that performs the crash in a signal handler. Modified: haiku/trunk/src/tests/servers/debug/crashing_app.cpp =================================================================== --- haiku/trunk/src/tests/servers/debug/crashing_app.cpp 2008-10-08 23:30:53 UTC (rev 27933) +++ haiku/trunk/src/tests/servers/debug/crashing_app.cpp 2008-10-09 00:47:36 UTC (rev 27934) @@ -1,3 +1,7 @@ +/* + * Copyright 2005-2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ #undef NDEBUG @@ -2,2 +6,3 @@ #include +#include #include @@ -18,6 +23,7 @@ "Options:\n" " -d - call disable_debugger() first\n" " -h, --help - print this info text\n" + " --signal - crash in a signal handler\n" " --thread - crash in a separate thread\n" "\n" "Modes:\n" @@ -26,7 +32,7 @@ " segv2 - strcmp() using a 0x1 pointer\n" " div - executes a division by zero\n" " debugger - invokes debugger()\n" - " assert - failed assert(), which should invoke the " + " assert - failed assert(), which should invoke the\n" " debugger\n" "\n" "[x86 specific]\n" @@ -113,6 +119,24 @@ typedef int crash_function_t(); +struct Options { + Options() + : + inThread(false), + inSignalHandler(false), + disableDebugger(false) + { + } + + crash_function_t* function; + bool inThread; + bool inSignalHandler; + bool disableDebugger; +}; + +static Options sOptions; + + static crash_function_t* get_crash_function(const char* mode) { @@ -138,12 +162,29 @@ } +static void +signal_handler(int signal) +{ + sOptions.function(); +} + + +static void +do_crash() +{ + if (sOptions.inSignalHandler) { + signal(SIGUSR1, &signal_handler); + send_signal(find_thread(NULL), SIGUSR1); + } else + sOptions.function(); +} + + static status_t crashing_thread(void* data) { - crash_function_t* doCrash = (crash_function_t*)data; snooze(100000); - doCrash(); + do_crash(); return 0; } @@ -151,8 +192,6 @@ int main(int argc, const char* const* argv) { - bool inThread = false; - bool disableDebugger = false; const char* mode = "segv"; // parse args @@ -164,9 +203,11 @@ if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) { print_usage_and_exit(false); } else if (strcmp(arg, "-d") == 0) { - disableDebugger = true; + sOptions.disableDebugger = true; + } else if (strcmp(arg, "--signal") == 0) { + sOptions.inSignalHandler = true; } else if (strcmp(arg, "--thread") == 0) { - inThread = true; + sOptions.inThread = true; } else { fprintf(stderr, "Invalid option \"%s\"\n", arg); print_usage_and_exit(true); @@ -176,18 +217,18 @@ } } - crash_function_t* doCrash = get_crash_function(mode); - if (doCrash == NULL) { + sOptions.function = get_crash_function(mode); + if (sOptions.function == NULL) { fprintf(stderr, "Invalid mode \"%s\"\n", mode); print_usage_and_exit(true); } - if (disableDebugger) + if (sOptions.disableDebugger) disable_debugger(true); - if (inThread) { + if (sOptions.inThread) { thread_id thread = spawn_thread(crashing_thread, "crashing thread", - B_NORMAL_PRIORITY, (void*)doCrash); + B_NORMAL_PRIORITY, NULL); if (thread < 0) { fprintf(stderr, "Error: Failed to spawn thread: %s\n", strerror(thread)); @@ -199,7 +240,7 @@ while (wait_for_thread(thread, &result) == B_INTERRUPTED) { } } else { - doCrash(); + do_crash(); } return 0; From anevilyak at mail.berlios.de Thu Oct 9 05:53:01 2008 From: anevilyak at mail.berlios.de (anevilyak at BerliOS) Date: Thu, 9 Oct 2008 05:53:01 +0200 Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm Message-ID: <200810090353.m993r1H6016683@sheep.berlios.de> Author: anevilyak Date: 2008-10-09 05:53:00 +0200 (Thu, 09 Oct 2008) New Revision: 27935 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27935&view=rev Modified: haiku/trunk/src/system/kernel/vm/vm_daemons.cpp haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: Fixed warnings with tracing enabled and made some very noisy dprintfs trace-only as they were flooding the syslog. Modified: haiku/trunk/src/system/kernel/vm/vm_daemons.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-09 00:47:36 UTC (rev 27934) +++ haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-09 03:53:00 UTC (rev 27935) @@ -292,8 +292,9 @@ - (kMaxScanPagesCount - kMinScanPagesCount) * pagesLeft / sLowPagesCount; uint32 leftToFree = sLowPagesCount - pagesLeft; -dprintf("wait interval %Ld, scan pages %lu, free %lu, target %lu\n", - scanWaitInterval, scanPagesCount, pagesLeft, leftToFree); + /*dprintf("wait interval %Ld, scan pages %lu, free %lu, " + "target %lu\n", scanWaitInterval, scanPagesCount, + pagesLeft, leftToFree);*/ for (uint32 i = 0; i < scanPagesCount && leftToFree > 0; i++) { if (clearPage == 0) Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-09 00:47:36 UTC (rev 27934) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-09 03:53:00 UTC (rev 27935) @@ -1241,10 +1241,10 @@ writtenPages += numPages; if (writtenPages >= 1024) { bigtime_t now = system_time(); - dprintf("page writer: wrote 1024 pages (total: %llu ms, " + TRACE(("page writer: wrote 1024 pages (total: %llu ms, " "collect: %llu ms, write: %llu ms)\n", (now - lastWrittenTime) / 1000, - pageCollectionTime / 1000, pageWritingTime / 1000); + pageCollectionTime / 1000, pageWritingTime / 1000)); writtenPages -= 1024; lastWrittenTime = now; pageCollectionTime = 0; @@ -1588,7 +1588,7 @@ + args->physical_memory_range[i].size) / B_PAGE_SIZE; } - TRACE(("first phys page = 0x%lx, end 0x%x\n", sPhysicalPageOffset, + TRACE(("first phys page = 0x%lx, end 0x%lx\n", sPhysicalPageOffset, physicalPagesEnd)); sNumPages = physicalPagesEnd - sPhysicalPageOffset; @@ -1609,7 +1609,7 @@ sPages = (vm_page *)vm_allocate_early(args, sNumPages * sizeof(vm_page), ~0L, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); - TRACE(("vm_init: putting free_page_table @ %p, # ents %d (size 0x%x)\n", + TRACE(("vm_init: putting free_page_table @ %p, # ents %ld (size 0x%x)\n", sPages, sNumPages, (unsigned int)(sNumPages * sizeof(vm_page)))); // initialize the free page table From axeld at pinc-software.de Thu Oct 9 10:04:16 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Thu, 09 Oct 2008 10:04:16 +0200 CEST Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: <200810090353.m993r1H6016683@sheep.berlios.de> Message-ID: <1430669283-BeMail@zon> anevilyak at BerliOS wrote: > Log: > Fixed warnings with tracing enabled and made some very noisy dprintfs > trace-only > as they were flooding the syslog. [...] > -dprintf("wait interval %Ld, scan pages %lu, free %lu, target %lu\n", > - scanWaitInterval, scanPagesCount, pagesLeft, leftToFree); > + /*dprintf("wait interval %Ld, scan pages %lu, free %lu, " > + "target %lu\n", scanWaitInterval, scanPagesCount, > + pagesLeft, leftToFree);*/ That doesn't really use TRACE, though, and it's useful information when you work on the VM :-) Bye, Axel. From superstippi at gmx.de Thu Oct 9 11:19:19 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Thu, 09 Oct 2008 11:19:19 +0200 Subject: [Haiku-commits] r27929 - in haiku/trunk/docs/welcome: . tracker-images welcome-images In-Reply-To: <1817011937-BeMail@laptop> References: <1817011937-BeMail@laptop> Message-ID: <20081009091919.153820@gmx.net> -------- Original-Nachricht -------- > Datum: Thu, 09 Oct 2008 01:52:21 +0200 CEST > Von: "Fran?ois Revol" > An: "SVN commits to the Haiku sourcerepository=?windows-1252?q?" > Betreff: Re: [Haiku-commits] r27929 - in haiku/trunk/docs/welcome: . tracker-images welcome-images > > Log: > > * More conversion to using CSS. The complicated table for layouting > > is gone, > > the logo area is very simple now, as well as the navigation area. > > Tweaked > > the looks to remind a little of the Haiku website look. > > I was afraid it got screwed up as it didn't work in NetSurf, but it > actually works just fine, it was just discarding the .css as not being > text/css but text/x-source-code as sniffed by Zeta... I made it so NS > overrides the mime for known extensions and now it works. Hehe! Although I don't feel NetSurf is ready yet to replace Firefox, I did actually test my changes in NetSurf. :-) I was happy to see it works well. I think the only thing that doesn't work are the mouse over underlines and color changes for links. Best regards, -Stephan From teammaui at web.de Thu Oct 9 11:31:04 2008 From: teammaui at web.de (=?utf-8?Q?Ralf_Sch=C3=BClke?=) Date: Thu, 09 Oct 2008 11:31:04 +0200 Subject: [Haiku-commits] r27929 - in haiku/trunk/docs/welcome: . tracker-images welcome-images In-Reply-To: <20081009091919.153820@gmx.net> References: <1817011937-BeMail@laptop> <20081009091919.153820@gmx.net> Message-ID: On Thu, 09 Oct 2008 11:19:19 +0200, Stephan Assmus wrote: > Hehe! Although I don't feel NetSurf is ready yet to replace Firefox, I > did actually test my changes in NetSurf. I was happy to see it works > well. I think the only thing that > doesn't work are the mouse over underlines and color changes for links. > Best regards, > -Stephan Nice to listen, but where is a screenshot? :-) -- Ralf Sch?lke aka stargater From mmu_man at mail.berlios.de Thu Oct 9 11:48:09 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Thu, 9 Oct 2008 11:48:09 +0200 Subject: [Haiku-commits] r27936 - haiku/trunk/headers/private/system/arch/m68k Message-ID: <200810090948.m999m991012224@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 11:48:08 +0200 (Thu, 09 Oct 2008) New Revision: 27936 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27936&view=rev Modified: haiku/trunk/headers/private/system/arch/m68k/arch_commpage_defs.h Log: The last 16MB (physical) on Atari is used for IO, and we currently map it through transparent translation register. Move commpage out of the way. Modified: haiku/trunk/headers/private/system/arch/m68k/arch_commpage_defs.h =================================================================== --- haiku/trunk/headers/private/system/arch/m68k/arch_commpage_defs.h 2008-10-09 03:53:00 UTC (rev 27935) +++ haiku/trunk/headers/private/system/arch/m68k/arch_commpage_defs.h 2008-10-09 09:48:08 UTC (rev 27936) @@ -12,7 +12,7 @@ #define COMMPAGE_ENTRY_M68K_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0) #define COMMPAGE_ENTRY_M68K_MEMCPY (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1) -#warning M68K: FIXME: colides with IO space mapped with TT1! -#define ARCH_USER_COMMPAGE_ADDR (0xffff0000) +/* 0xffff0000 colides with IO space mapped with TT1 on Atari */ +#define ARCH_USER_COMMPAGE_ADDR (0xfeff0000) #endif /* _SYSTEM_ARCH_M68K_COMMPAGE_DEFS_H */ From mmu_man at mail.berlios.de Thu Oct 9 11:50:01 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Thu, 9 Oct 2008 11:50:01 +0200 Subject: [Haiku-commits] r27937 - haiku/trunk/src/system/boot/platform/atari_m68k Message-ID: <200810090950.m999o1xu012591@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 11:50:00 +0200 (Thu, 09 Oct 2008) New Revision: 27937 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27937&view=rev Modified: haiku/trunk/src/system/boot/platform/atari_m68k/shell.S Log: Better floppy media descriptor for the fake FAT. Modified: haiku/trunk/src/system/boot/platform/atari_m68k/shell.S =================================================================== --- haiku/trunk/src/system/boot/platform/atari_m68k/shell.S 2008-10-09 09:48:08 UTC (rev 27936) +++ haiku/trunk/src/system/boot/platform/atari_m68k/shell.S 2008-10-09 09:50:00 UTC (rev 27937) @@ -58,7 +58,7 @@ .byte 0x00//0x02 //NFATS .byte 0x00/*70*/, 0x00 //NDIRS .byte 0xa0, 0x05 //NSECTS - .byte 0xf8 //MEDIA + .byte 0xf9 //MEDIA .byte 0x05, 0x00 //SPF .byte 0x09, 0x00 //SPT .byte 0x02, 0x00 //NSIDES From axeld at mail.berlios.de Thu Oct 9 11:50:59 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 9 Oct 2008 11:50:59 +0200 Subject: [Haiku-commits] r27938 - haiku/trunk/src/apps/workspaces Message-ID: <200810090950.m999oxtg012849@sheep.berlios.de> Author: axeld Date: 2008-10-09 11:50:58 +0200 (Thu, 09 Oct 2008) New Revision: 27938 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27938&view=rev Modified: haiku/trunk/src/apps/workspaces/Workspaces.cpp Log: * WorkspacesView::MouseDown() now only reacts on mouse buttons within the view even if the auto raise feature is activated. This fixes bug #2173. Modified: haiku/trunk/src/apps/workspaces/Workspaces.cpp =================================================================== --- haiku/trunk/src/apps/workspaces/Workspaces.cpp 2008-10-09 09:50:00 UTC (rev 27937) +++ haiku/trunk/src/apps/workspaces/Workspaces.cpp 2008-10-09 09:50:58 UTC (rev 27938) @@ -379,7 +379,7 @@ WorkspacesView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) { - if (Window() == NULL || EventMask() == 0) + if (dynamic_cast(Window()) == NULL || EventMask() == 0) return; // Auto-Raise @@ -399,6 +399,11 @@ void WorkspacesView::MouseDown(BPoint where) { + // With enabled auto-raise feature, we'll get mouse messages we don't + // want to handle here. + if (!Bounds().Contains(where)) + return; + int32 buttons = 0; if (Window() != NULL && Window()->CurrentMessage() != NULL) Window()->CurrentMessage()->FindInt32("buttons", &buttons); From mmu_man at mail.berlios.de Thu Oct 9 11:51:51 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Thu, 9 Oct 2008 11:51:51 +0200 Subject: [Haiku-commits] r27939 - haiku/trunk/src/apps/bsnow Message-ID: <200810090951.m999ppno012914@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 11:51:49 +0200 (Thu, 09 Oct 2008) New Revision: 27939 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27939&view=rev Modified: haiku/trunk/src/apps/bsnow/SnowView.cpp Log: Some debug code. Modified: haiku/trunk/src/apps/bsnow/SnowView.cpp =================================================================== --- haiku/trunk/src/apps/bsnow/SnowView.cpp 2008-10-09 09:50:58 UTC (rev 27938) +++ haiku/trunk/src/apps/bsnow/SnowView.cpp 2008-10-09 09:51:49 UTC (rev 27939) @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,8 @@ AddChild(fDragger); SetHighColor(255,255,255); } -/* + +#ifdef DEBUG filter_result msgfilter(BMessage *message, BHandler **target, BMessageFilter *filter) { switch (message->what) { @@ -56,14 +58,16 @@ } return B_DISPATCH_MESSAGE; } -*/ +#endif SnowView::SnowView(BMessage *archive) : BView(archive) { system_info si; - //printf("SnowView()\n"); - //archive->PrintToStream(); + PRINT(("SnowView()\n")); +#ifdef DEBUG + archive->PrintToStream(); +#endif fDragger = NULL; fAttached = false; fMsgRunner = NULL; @@ -157,7 +161,9 @@ fInvalidator = spawn_thread(SnowMakerThread, INVALIDATOR_THREAD_NAME, B_LOW_PRIORITY, (void *)this); resume_thread(fInvalidator); printf("BSnow: OK: ws = %ld x %ld\n", fCachedWsWidth, fCachedWsHeight); - //Window()->AddCommonFilter(new BMessageFilter(B_ANY_DELIVERY, B_ANY_SOURCE, msgfilter)); +#ifdef DEBUG + Window()->AddCommonFilter(new BMessageFilter(B_ANY_DELIVERY, B_ANY_SOURCE, msgfilter)); +#endif } } From axeld at mail.berlios.de Thu Oct 9 12:03:44 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Thu, 9 Oct 2008 12:03:44 +0200 Subject: [Haiku-commits] r27940 - haiku/trunk/src/apps/workspaces Message-ID: <200810091003.m99A3hPU014285@sheep.berlios.de> Author: axeld Date: 2008-10-09 12:03:43 +0200 (Thu, 09 Oct 2008) New Revision: 27940 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27940&view=rev Modified: haiku/trunk/src/apps/workspaces/Workspaces.cpp Log: * The BView archived the view's event mask - if the auto-raise feature was enabled when the view got archived, the replicant inherited the event mask of the view. We now make sure the event mask is always set to 0. * This fixes bug #2566. * Minor cleanup. Modified: haiku/trunk/src/apps/workspaces/Workspaces.cpp =================================================================== --- haiku/trunk/src/apps/workspaces/Workspaces.cpp 2008-10-09 09:51:49 UTC (rev 27939) +++ haiku/trunk/src/apps/workspaces/Workspaces.cpp 2008-10-09 10:03:43 UTC (rev 27940) @@ -303,6 +303,10 @@ WorkspacesView::WorkspacesView(BMessage* archive) : BView(archive) { + // Make sure the auto-raise feature didn't leave any artifacts - this is + // not a good idea to keep enabled for a replicant. + if (EventMask() != 0) + SetEventMask(0); } @@ -379,19 +383,20 @@ WorkspacesView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) { - if (dynamic_cast(Window()) == NULL || EventMask() == 0) + WorkspacesWindow* window = dynamic_cast(Window()); + if (window == NULL || !window->IsAutoRaising()) return; // Auto-Raise where = ConvertToScreen(where); - BScreen screen(Window()); + BScreen screen(window); BRect frame = screen.Frame(); if (where.x == frame.left || where.x == frame.right || where.y == frame.top || where.y == frame.bottom) { // cursor is on screen edge - if (Window()->Frame().Contains(where)) - Window()->Activate(); + if (window->Frame().Contains(where)) + window->Activate(); } } From stippi at mail.berlios.de Thu Oct 9 14:05:11 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Thu, 9 Oct 2008 14:05:11 +0200 Subject: [Haiku-commits] r27941 - haiku/trunk/docs/welcome Message-ID: <200810091205.m99C5BF1017821@sheep.berlios.de> Author: stippi Date: 2008-10-09 14:05:08 +0200 (Thu, 09 Oct 2008) New Revision: 27941 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27941&view=rev Modified: haiku/trunk/docs/welcome/workspaces.html Log: Removed wrong additional line breaks for spacing. Modified: haiku/trunk/docs/welcome/workspaces.html =================================================================== --- haiku/trunk/docs/welcome/workspaces.html 2008-10-09 10:03:43 UTC (rev 27940) +++ haiku/trunk/docs/welcome/workspaces.html 2008-10-09 12:05:08 UTC (rev 27941) @@ -26,15 +26,15 @@

    Workspaces

    Workspaces are virtual desktops, complete with their own resolution, colour depth and background. Up to 32 of these workspaces can be set from the Screen preferences.

    -
    +

    The Workspaces Applet

    workspaces.png

    The Workspaces applet shows a miniature version of all workspaces. There are several options available from the context menu of the applet's window, which are all pretty self-explaining. Since the applet is a Replicant, you can resize the window as desired and then drag&drop it by its handle onto the desktop (make sure "Show Replicants" is activated in the Deskbar menu).

    -
    +

    Switching workspaces

    You can switch between workspaces by either clicking into the Workspaces applet or by using the keyboard shortcut ALT+Fx, where "x" is the workspace number. Also, clicking on an application or one of its windows in the Deskbar will send you to the workspace it resides in.

    -
    +

    Moving windows between workspaces

    To move a window, you grab it in the Workspaces applet and simply drag it to another workspace. This has the advantage, that you can move it without leaving your current desktop. Of course, that only works well when there aren't too many windows on a workspace and your target isn't obscured by other windows. Another possibility is to grab a window by its tab and just holding on to it while switching workspaces with ALT+Fx.

    From dlmcpaul at mail.berlios.de Thu Oct 9 14:11:43 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Thu, 9 Oct 2008 14:11:43 +0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader Message-ID: <200810091211.m99CBh8U018557@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) New Revision: 27942 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp Log: improve detection of quicktime and MPEG4 files Modified: haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp 2008-10-09 12:05:08 UTC (rev 27941) +++ haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp 2008-10-09 12:11:43 UTC (rev 27942) @@ -861,9 +861,12 @@ // Real Media if (buf[0] == '.' && buf[1] == 'R' && buf[2] == 'M' && buf[3] == 'F') return false; - // Quicktime + // Quicktime or MPEG4 (Not really a good way, moov could be anywhere) if (buf[4] == 'm' && buf[5] == 'o' && buf[6] == 'o' && buf[7] == 'v') return false; + // On newer quicktime and on MPEG4 files ftyp is likely to be first + if (buf[4] == 'f' && buf[5] == 't' && buf[6] == 'y' && buf[7] == 'p') + return false; // ASF 1 (first few bytes of GUID) if (buf[0] == 0x30 && buf[1] == 0x26 && buf[2] == 0xb2 && buf[3] == 0x75 && buf[4] == 0x8e && buf[5] == 0x66 && buf[6] == 0xcf && buf[7] == 0x11) From mmu_man at mail.berlios.de Thu Oct 9 14:11:50 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Thu, 9 Oct 2008 14:11:50 +0200 Subject: [Haiku-commits] r27943 - haiku/trunk/src/system/kernel/vm Message-ID: <200810091211.m99CBo7E018579@sheep.berlios.de> Author: mmu_man Date: 2008-10-09 14:11:49 +0200 (Thu, 09 Oct 2008) New Revision: 27943 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27943&view=rev Modified: haiku/trunk/src/system/kernel/vm/vm.cpp Log: - add team id on a TRACE() - try to accomodate for low ram systems by making the first kernel heap allocation smaller Modified: haiku/trunk/src/system/kernel/vm/vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-09 12:11:43 UTC (rev 27942) +++ haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-09 12:11:49 UTC (rev 27943) @@ -1642,7 +1642,7 @@ bool canOvercommit = false; addr_t physicalBase = 0; - TRACE(("create_anonymous_area %s: size 0x%lx\n", name, size)); + TRACE(("create_anonymous_area [%d] %s: size 0x%lx\n", team, name, size)); size = PAGE_ALIGN(size); @@ -4004,8 +4004,14 @@ vm_page_init_num_pages(args); sAvailableMemory = vm_page_num_pages() * B_PAGE_SIZE; + size_t heapSize = INITIAL_HEAP_SIZE; + // try to accomodate low memory systems + while (heapSize > sAvailableMemory / 8) + heapSize /= 2; + if (heapSize < 1024 * 1024) + panic("vm_init: go buy some RAM please."); + // map in the new heap and initialize it - size_t heapSize = INITIAL_HEAP_SIZE; addr_t heapBase = vm_allocate_early(args, heapSize, heapSize, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); TRACE(("heap at 0x%lx\n", heapBase)); From jackburton at mail.berlios.de Thu Oct 9 14:35:07 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Thu, 9 Oct 2008 14:35:07 +0200 Subject: [Haiku-commits] r27944 - haiku/trunk/src/apps/deskbar Message-ID: <200810091235.m99CZ7IH021533@sheep.berlios.de> Author: jackburton Date: 2008-10-09 14:35:06 +0200 (Thu, 09 Oct 2008) New Revision: 27944 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27944&view=rev Modified: haiku/trunk/src/apps/deskbar/BarView.cpp Log: don't use the minimum window width, but the real window width. Just in case one day the deskbar was a bit wider Modified: haiku/trunk/src/apps/deskbar/BarView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarView.cpp 2008-10-09 12:11:49 UTC (rev 27943) +++ haiku/trunk/src/apps/deskbar/BarView.cpp 2008-10-09 12:35:06 UTC (rev 27944) @@ -380,7 +380,7 @@ if (fState == kFullState) moveLoc.x = screenFrame.right - fBarMenuBar->Frame().Width(); else - moveLoc.x = screenFrame.right - kMinimumWindowWidth; + moveLoc.x = screenFrame.right - windowWidth; } // bottom, full or corners From anevilyak at gmail.com Thu Oct 9 14:43:41 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Thu, 9 Oct 2008 07:43:41 -0500 Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: <1430669283-BeMail@zon> References: <200810090353.m993r1H6016683@sheep.berlios.de> <1430669283-BeMail@zon> Message-ID: On Thu, Oct 9, 2008 at 3:04 AM, Axel D?rfler wrote: > That doesn't really use TRACE, though, and it's useful information when > you work on the VM :-) > That file didn't have a TRACE macro defined already though, I can fix that later if you want :) I was getting that message so often in syslog that I was losing other things I needed trying to track down another bug though. Regards, Rene From bga at bug-br.org.br Thu Oct 9 14:46:42 2008 From: bga at bug-br.org.br (Bruno Albuquerque) Date: Thu, 09 Oct 2008 09:46:42 -0300 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <200810091211.m99CBh8U018557@sheep.berlios.de> References: <200810091211.m99CBh8U018557@sheep.berlios.de> Message-ID: <48EDFD32.5030307@bug-br.org.br> dlmcpaul at BerliOS wrote: > Author: dlmcpaul > Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) > New Revision: 27942 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev > > Modified: > haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp > Log: > improve detection of quicktime and MPEG4 files While you are at it, do you have any idea why the duration information for this file is not correctly calculated? http://www.bug-br.org.br/virtual-void.mp3 What happens is that the actual music finishes and the position slider is still at around 1/4 of its total length. Then the music starts again and the slider continues moving. One thing that I do know is that this specific MP3 file seems to be corrupted in some way. But even with this corruption, there is no problem in vlc/Windows Media Player/Quicktime concerning the duration calculation (i.e. All those programs show the correct position in their respective position indicators). -Bruno From revol at free.fr Thu Oct 9 14:59:00 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Thu, 09 Oct 2008 14:59:00 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27942_-_haiku/trunk/src/add-ons?= =?windows-1252?q?/media/plugins/mp3=5Freader?= In-Reply-To: <48EDFD32.5030307@bug-br.org.br> Message-ID: <1486112797-BeMail@laptop> > dlmcpaul at BerliOS wrote: > > Author: dlmcpaul > > Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) > > New Revision: 27942 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev > > > > Modified: > > haiku/trunk/src/add-ons/media/plugins/mp3_reader/ > > MP3ReaderPlugin.cpp > > Log: > > improve detection of quicktime and MPEG4 files > > While you are at it, do you have any idea why the duration > information > for this file is not correctly calculated? > > http://www.bug-br.org.br/virtual-void.mp3 > > What happens is that the actual music finishes and the position > slider > is still at around 1/4 of its total length. Then the music starts > again > and the slider continues moving. As for me MediaPlayer is totally buggy anyway currently... I tried to debug it but didn't get far. After some time it plays garbage audio, and seeking doesn't work at all. I wouldn't trust it to check length info then :p Fran?ois. From dlmcpaul at gmail.com Thu Oct 9 15:11:47 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Fri, 10 Oct 2008 00:11:47 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <48EDFD32.5030307@bug-br.org.br> References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> Message-ID: 2008/10/9 Bruno Albuquerque : > dlmcpaul at BerliOS wrote: >> Author: dlmcpaul >> Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) >> New Revision: 27942 >> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev >> >> Modified: >> haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp >> Log: >> improve detection of quicktime and MPEG4 files > > While you are at it, do you have any idea why the duration information > for this file is not correctly calculated? > > http://www.bug-br.org.br/virtual-void.mp3 > > What happens is that the actual music finishes and the position slider > is still at around 1/4 of its total length. Then the music starts again > and the slider continues moving. > > One thing that I do know is that this specific MP3 file seems to be > corrupted in some way. But even with this corruption, there is no > problem in vlc/Windows Media Player/Quicktime concerning the duration > calculation (i.e. All those programs show the correct position in their > respective position indicators). I will try and have a look. -- Cheers David From dlmcpaul at gmail.com Thu Oct 9 15:14:21 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Fri, 10 Oct 2008 00:14:21 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <1486112797-BeMail@laptop> References: <48EDFD32.5030307@bug-br.org.br> <1486112797-BeMail@laptop> Message-ID: 2008/10/9 Fran?ois Revol : >> dlmcpaul at BerliOS wrote: >> > Author: dlmcpaul >> > Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) >> > New Revision: 27942 >> > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev >> > >> > Modified: >> > haiku/trunk/src/add-ons/media/plugins/mp3_reader/ >> > MP3ReaderPlugin.cpp >> > Log: >> > improve detection of quicktime and MPEG4 files >> >> While you are at it, do you have any idea why the duration >> information >> for this file is not correctly calculated? >> >> http://www.bug-br.org.br/virtual-void.mp3 >> >> What happens is that the actual music finishes and the position >> slider >> is still at around 1/4 of its total length. Then the music starts >> again >> and the slider continues moving. > > As for me MediaPlayer is totally buggy anyway currently... > I tried to debug it but didn't get far. > After some time it plays garbage audio, and seeking doesn't work at > all. > I wouldn't trust it to check length info then :p There are 2 bugs I have with MediaPlayer. It sometimes locks up on exit and audio/video does not sync. I am working on the second. I had a go at the second but my kernel debugging is not much good. -- Cheers David From anevilyak at mail.berlios.de Thu Oct 9 15:41:15 2008 From: anevilyak at mail.berlios.de (anevilyak at BerliOS) Date: Thu, 9 Oct 2008 15:41:15 +0200 Subject: [Haiku-commits] r27945 - haiku/trunk/src/system/kernel/vm Message-ID: <200810091341.m99DfFCm028332@sheep.berlios.de> Author: anevilyak Date: 2008-10-09 15:41:15 +0200 (Thu, 09 Oct 2008) New Revision: 27945 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27945&view=rev Modified: haiku/trunk/src/system/kernel/vm/vm_daemons.cpp Log: Added TRACE macros to this file and redid its dprintfs to use that instead. Modified: haiku/trunk/src/system/kernel/vm/vm_daemons.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-09 12:35:06 UTC (rev 27944) +++ haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-09 13:41:15 UTC (rev 27945) @@ -21,6 +21,12 @@ //#define TRACK_PAGE_USAGE_STATS 1 +//#define TRACE_VM_DAEMONS +#ifdef TRACE_VM_DAEMONS +#define TRACE(x) dprintf x +#else +#define TRACE(x) ; +#endif const static uint32 kMinScanPagesCount = 512; const static uint32 kMaxScanPagesCount = 8192; @@ -130,8 +136,8 @@ for (int32 i = 0; i < 256; i++) sum += (int64)sPageUsage[i] * (i - 128); - dprintf("average page usage: %f (%lu pages)\n", - (float)sum / sPageUsagePageCount, sPageUsagePageCount); + TRACE(("average page usage: %f (%lu pages)\n", + (float)sum / sPageUsagePageCount, sPageUsagePageCount)); } } @@ -188,8 +194,8 @@ bool modified; int32 activation = vm_test_map_activation(page, &modified); if (modified && page->state != PAGE_STATE_MODIFIED) { - //dprintf("page %p -> move to modified\n", page); - vm_page_set_state(page, PAGE_STATE_MODIFIED); + TRACE(("page %p -> move to modified\n", page); + vm_page_set_state(page, PAGE_STATE_MODIFIED)); } if (activation > 0) { @@ -198,7 +204,7 @@ if (page->state != PAGE_STATE_MODIFIED) vm_page_set_state(page, PAGE_STATE_ACTIVE); page->usage_count = 1; - //dprintf("page %p -> move to active\n", page); + TRACE(("page %p -> move to active\n", page)); } else if (page->usage_count < 127) page->usage_count++; @@ -230,7 +236,7 @@ vm_page_schedule_write_page(page); else vm_page_set_state(page, PAGE_STATE_INACTIVE); - //dprintf("page %p -> move to inactive\n", page); + TRACE(("page %p -> move to inactive\n", page)); } return true; @@ -292,15 +298,15 @@ - (kMaxScanPagesCount - kMinScanPagesCount) * pagesLeft / sLowPagesCount; uint32 leftToFree = sLowPagesCount - pagesLeft; - /*dprintf("wait interval %Ld, scan pages %lu, free %lu, " + TRACE(("wait interval %Ld, scan pages %lu, free %lu, " "target %lu\n", scanWaitInterval, scanPagesCount, - pagesLeft, leftToFree);*/ + pagesLeft, leftToFree)); for (uint32 i = 0; i < scanPagesCount && leftToFree > 0; i++) { if (clearPage == 0) - dprintf("clear through\n"); + TRACE(("clear through\n")); if (checkPage == 0) { - dprintf("check through\n"); + TRACE(("check through\n")); #ifdef TRACK_PAGE_USAGE_STATS update_page_usage_stats(); #endif From anevilyak at gmail.com Thu Oct 9 15:42:49 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Thu, 9 Oct 2008 08:42:49 -0500 Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: <1430669283-BeMail@zon> References: <200810090353.m993r1H6016683@sheep.berlios.de> <1430669283-BeMail@zon> Message-ID: On Thu, Oct 9, 2008 at 3:04 AM, Axel D?rfler wrote: > That doesn't really use TRACE, though, and it's useful information when > you work on the VM :-) Is r27945 better? :) Regards, Rene From axeld at pinc-software.de Thu Oct 9 16:08:11 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Thu, 09 Oct 2008 16:08:11 +0200 CEST Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: Message-ID: <23261077306-BeMail@zon> "Rene Gollent" wrote: > On Thu, Oct 9, 2008 at 3:04 AM, Axel D?rfler > wrote: > > That doesn't really use TRACE, though, and it's useful information > > when > > you work on the VM :-) > Is r27945 better? :) Sure, even though it's probably too much information now ;-)) Bye, Axel. From anevilyak at gmail.com Thu Oct 9 16:11:16 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Thu, 9 Oct 2008 09:11:16 -0500 Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: <23261077306-BeMail@zon> References: <23261077306-BeMail@zon> Message-ID: On Thu, Oct 9, 2008 at 9:08 AM, Axel D?rfler wrote: > Sure, even though it's probably too much information now ;-)) Well, I assumed they were just commented out rather than removed entirely for a reason :) Should that file perhaps have multiple trace levels, just in case you need some of the more extreme details? Regards, Rene From axeld at pinc-software.de Thu Oct 9 16:49:48 2008 From: axeld at pinc-software.de (Axel =?utf-8?q?D=C3=B6rfler?=) Date: Thu, 09 Oct 2008 16:49:48 +0200 CEST Subject: [Haiku-commits] r27935 - haiku/trunk/src/system/kernel/vm In-Reply-To: Message-ID: <25758638215-BeMail@zon> "Rene Gollent" wrote: > On Thu, Oct 9, 2008 at 9:08 AM, Axel D?rfler > wrote: > > Sure, even though it's probably too much information now ;-)) > Well, I assumed they were just commented out rather than removed > entirely for a reason :) Should that file perhaps have multiple trace > levels, just in case you need some of the more extreme details? I didn't remove them because they may come in handy when searching for a specific thing. But it doesn't matter much, I guess :-) Bye, Axel. From jackburton at mail.berlios.de Thu Oct 9 16:58:47 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Thu, 9 Oct 2008 16:58:47 +0200 Subject: [Haiku-commits] r27946 - haiku/trunk/src/system/libroot/posix/glibc/ctype Message-ID: <200810091458.m99EwluN008501@sheep.berlios.de> Author: jackburton Date: 2008-10-09 16:58:45 +0200 (Thu, 09 Oct 2008) New Revision: 27946 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27946&view=rev Modified: haiku/trunk/src/system/libroot/posix/glibc/ctype/Jamfile haiku/trunk/src/system/libroot/posix/glibc/ctype/ctype-extn.c Log: add ctype-extn.c to the build. It contains the function versions of the is*** defines. Without this, bash 3 refuses to compile on haiku Modified: haiku/trunk/src/system/libroot/posix/glibc/ctype/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/glibc/ctype/Jamfile 2008-10-09 13:41:15 UTC (rev 27945) +++ haiku/trunk/src/system/libroot/posix/glibc/ctype/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) @@ -10,5 +10,6 @@ MergeObject posix_gnu_ctype.o : ctype.c + ctype-extn.c ctype-info.c ; Modified: haiku/trunk/src/system/libroot/posix/glibc/ctype/ctype-extn.c =================================================================== --- haiku/trunk/src/system/libroot/posix/glibc/ctype/ctype-extn.c 2008-10-09 13:41:15 UTC (rev 27945) +++ haiku/trunk/src/system/libroot/posix/glibc/ctype/ctype-extn.c 2008-10-09 14:58:45 UTC (rev 27946) @@ -18,12 +18,12 @@ #define __NO_CTYPE #include - +/* #define __ctype_tolower \ ((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128) #define __ctype_toupper \ ((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128) - +*/ /* Real function versions of the non-ANSI ctype functions. isblank is now in ISO C99 but we leave it here. */ @@ -58,10 +58,11 @@ } weak_alias (isascii, __isascii_l) - +/* int __isblank_l (int c, __locale_t l) { return __isctype_l (c, _ISblank, l); } weak_alias (__isblank_l, isblank_l) +*/ From superstippi at gmx.de Thu Oct 9 17:37:54 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Thu, 09 Oct 2008 17:37:54 +0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <1486112797-BeMail@laptop> References: <1486112797-BeMail@laptop> Message-ID: <20081009173754.680.1@stippis2.1223566143.fake> Fran?ois Revol wrote: > > dlmcpaul at BerliOS wrote: > > > Author: dlmcpaul > > > Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) New Revision: 27942 > > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev > > > > > > Modified: > > > haiku/trunk/src/add-ons/media/plugins/mp3_reader/ > > > MP3ReaderPlugin.cpp > > > Log: > > > improve detection of quicktime and MPEG4 files > > > > While you are at it, do you have any idea why the duration information > > for this file is not correctly calculated? > > > > http://www.bug-br.org.br/virtual-void.mp3 > > > > What happens is that the actual music finishes and the position slider > > is still at around 1/4 of its total length. Then the music starts again > > and the slider continues moving. > > As for me MediaPlayer is totally buggy anyway currently... I tried to > debug it but didn't get far. > After some time it plays garbage audio, and seeking doesn't work at all. > I wouldn't trust it to check length info then :p Pretty much every morning and various times during the day, I use Haiku and MediaPlayer to listen to music, mp3s from various encoders. I have not had any problems with it. The only problems I run into regularily is that there is no sound with OSS for a couple seconds after booting, and when the system has been running for several hours, there is no sound anymore either, even after restarting the Media Server. That being said, I don't seek so much, but I do skip to different songs and drop different albums onto the player without restarting it for the whole session. If you have a file with a problem, maybe you can post it somewhere? Or are these random problems with all sorts of files? Best regards, -Stephan From bga at bug-br.org.br Thu Oct 9 17:51:51 2008 From: bga at bug-br.org.br (Bruno Albuquerque) Date: Thu, 09 Oct 2008 12:51:51 -0300 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <20081009173754.680.1@stippis2.1223566143.fake> References: <1486112797-BeMail@laptop> <20081009173754.680.1@stippis2.1223566143.fake> Message-ID: <48EE2897.9060703@bug-br.org.br> Stephan Assmus wrote: > Pretty much every morning and various times during the day, I use Haiku and > MediaPlayer to listen to music, mp3s from various encoders. I have not had > any problems with it. The only problems I run into regularily is that there > is no sound with OSS for a couple seconds after booting, and when the > system has been running for several hours, there is no sound anymore > either, even after restarting the Media Server. That being said, I don't > seek so much, but I do skip to different songs and drop different albums > onto the player without restarting it for the whole session. If you have a > file with a problem, maybe you can post it somewhere? Or are these random > problems with all sorts of files? I have exactly the same problem with OSS and trying to debug it is a nightmare because restarting the media_server usually makes the audio stop completely so I can not even try to figure out if something specific happens that triggers audio suddenly start working some seconds after booting. Did you manage to notice anything related to this? In other words, did you try debugging this at all? If so, any success? -Bruno From revol at free.fr Thu Oct 9 17:57:24 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Thu, 09 Oct 2008 17:57:24 +0200 CEST Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <20081009173754.680.1@stippis2.1223566143.fake> Message-ID: <1950485433-BeMail@laptop> > > As for me MediaPlayer is totally buggy anyway currently... I tried > > to > > debug it but didn't get far. > > After some time it plays garbage audio, and seeking doesn't work at > > all. > > I wouldn't trust it to check length info then :p > > Pretty much every morning and various times during the day, I use > Haiku and > MediaPlayer to listen to music, mp3s from various encoders. I have > not had > any problems with it. The only problems I run into regularily is that > there > is no sound with OSS for a couple seconds after booting, and when the > system has been running for several hours, there is no sound anymore > either, even after restarting the Media Server. That being said, I > don't > seek so much, but I do skip to different songs and drop different > albums > onto the player without restarting it for the whole session. If you > have a > file with a problem, maybe you can post it somewhere? Or are these > random > problems with all sorts of files? It actually happens with all files on Zeta, and just doesn't seem to play anything at all in Haiku. But we'll be able to look into it at BG. Fran?ois. From revol at free.fr Thu Oct 9 18:14:50 2008 From: revol at free.fr (=?windows-1252?q?Fran=E7ois?= Revol) Date: Thu, 09 Oct 2008 18:14:50 +0200 CEST Subject: [Haiku-commits] =?windows-1252?q?r27942_-_haiku/trunk/src/add-ons?= =?windows-1252?q?/media/plugins/mp3=5Freader?= In-Reply-To: <48EE2897.9060703@bug-br.org.br> Message-ID: <2996173050-BeMail@laptop> > Stephan Assmus wrote: > > > Pretty much every morning and various times during the day, I use > > Haiku and > > MediaPlayer to listen to music, mp3s from various encoders. I have > > not had > > any problems with it. The only problems I run into regularily is > > that there > > is no sound with OSS for a couple seconds after booting, and when > > the > > system has been running for several hours, there is no sound > > anymore > > either, even after restarting the Media Server. That being said, I > > don't > > seek so much, but I do skip to different songs and drop different > > albums > > onto the player without restarting it for the whole session. If you > > have a > > file with a problem, maybe you can post it somewhere? Or are these > > random > > problems with all sorts of files? > > I have exactly the same problem with OSS and trying to debug it is a > nightmare because restarting the media_server usually makes the audio > stop completely so I can not even try to figure out if something > specific happens that triggers audio suddenly start working some > seconds > after booting. Did you manage to notice anything related to this? In > other words, did you try debugging this at all? If so, any success? Tried building the opensound addon with DEBUG and redirected Bootscript output ? exec > /dev/dprintf 2>&1 should do the trick Fran?ois. From marcusoverhagen at arcor.de Thu Oct 9 23:38:05 2008 From: marcusoverhagen at arcor.de (Marcus Overhagen) Date: Thu, 09 Oct 2008 23:38:05 +0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <1950485433-BeMail@laptop> References: <1950485433-BeMail@laptop> Message-ID: <48EE79BD.3010604@arcor.de> Fran?ois Revol schrieb: >>> As for me MediaPlayer is totally buggy anyway currently... I tried > It actually happens with all files on Zeta, and just doesn't seem to I'm not surprised at all that Haiku MediaPlayer doesn't work well on Zeta. Zeta has strange timing related bugs, that Yellowtab refused to fix. > play anything at all in Haiku. Thats even more strange. > But we'll be able to look into it at BG. Hopefully. Marcus From dlmcpaul at gmail.com Fri Oct 10 00:39:56 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Fri, 10 Oct 2008 09:39:56 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <20081009173754.680.1@stippis2.1223566143.fake> References: <1486112797-BeMail@laptop> <20081009173754.680.1@stippis2.1223566143.fake> Message-ID: On 2008-10-10, Stephan Assmus wrote: > > Fran?ois Revol wrote: > > As for me MediaPlayer is totally buggy anyway currently... I tried to > > debug it but didn't get far. > > After some time it plays garbage audio, and seeking doesn't work at all. > > I wouldn't trust it to check length info then :p > > Pretty much every morning and various times during the day, I use Haiku and > MediaPlayer to listen to music, mp3s from various encoders. I have not had > any problems with it. The only problems I run into regularily is that there > is no sound with OSS for a couple seconds after booting, and when the > system has been running for several hours, there is no sound anymore > either, even after restarting the Media Server. That being said, I don't > seek so much, but I do skip to different songs and drop different albums > onto the player without restarting it for the whole session. If you have a > file with a problem, maybe you can post it somewhere? Or are these random > problems with all sorts of files? Most of my problems are Audio/Visual Sync errors. Straight audio plays fine. The problem with the file mentioned is that it is not a plain mp3 file (it is a WAV format file with a mp3 track). I have a probable fix for it but it needs more testing. The one that annoys me is the lockup on exit. MediaPlayer does not go away and I cannot kill it. I think it deadlocks with the GUI in some way because I cannot open processcontroller anymore. -- Cheers David From dlmcpaul at gmail.com Fri Oct 10 00:42:16 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Fri, 10 Oct 2008 09:42:16 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <48EDFD32.5030307@bug-br.org.br> References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> Message-ID: On 2008-10-09, Bruno Albuquerque wrote: > dlmcpaul at BerliOS wrote: > > Author: dlmcpaul > > Date: 2008-10-09 14:11:43 +0200 (Thu, 09 Oct 2008) > > New Revision: 27942 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27942&view=rev > > > > Modified: > > haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp > > Log: > > improve detection of quicktime and MPEG4 files > > While you are at it, do you have any idea why the duration information > for this file is not correctly calculated? > > http://www.bug-br.org.br/virtual-void.mp3 > > What happens is that the actual music finishes and the position slider > is still at around 1/4 of its total length. Then the music starts again > and the slider continues moving. > > One thing that I do know is that this specific MP3 file seems to be > corrupted in some way. But even with this corruption, there is no > problem in vlc/Windows Media Player/Quicktime concerning the duration > calculation (i.e. All those programs show the correct position in their > respective position indicators). I don't think the file is corrupt (well maybe it is) but the issue as I see it is that it is actually a wav file (I just LOVE extentions on files). Inside this wav file is a mp3 track. The wav reader needs to calculate duration differently for mp3. -- Cheers David From bonefish at mail.berlios.de Fri Oct 10 01:47:02 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 10 Oct 2008 01:47:02 +0200 Subject: [Haiku-commits] r27947 - in haiku/trunk/src/system: boot boot/arch/m68k boot/arch/ppc boot/arch/x86 kernel/arch/x86 kernel/lib kernel/lib/arch kernel/lib/arch/generic kernel/lib/arch/m68k kernel/lib/arch/ppc kernel/lib/arch/x86 libroot/posix/string libroot/posix/string/arch libroot/posix/string/arch/generic libroot/posix/string/arch/m68k libroot/posix/string/arch/ppc libroot/posix/string/arch/x86 runtime_loader runtime_loader/arch/m68k runtime_loader/arch/ppc runtime_loader/arch/x86 Message-ID: <200810092347.m99Nl2Lb017594@sheep.berlios.de> Author: bonefish Date: 2008-10-10 01:47:01 +0200 (Fri, 10 Oct 2008) New Revision: 27947 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27947&view=rev Added: haiku/trunk/src/system/kernel/lib/arch/ haiku/trunk/src/system/kernel/lib/arch/generic/ haiku/trunk/src/system/kernel/lib/arch/generic/kernel_longjmp_return.c haiku/trunk/src/system/kernel/lib/arch/generic/kernel_setjmp_save_sigs.c haiku/trunk/src/system/kernel/lib/arch/m68k/ haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile haiku/trunk/src/system/kernel/lib/arch/ppc/ haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile haiku/trunk/src/system/kernel/lib/arch/x86/ haiku/trunk/src/system/kernel/lib/arch/x86/Jamfile haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S haiku/trunk/src/system/libroot/posix/string/arch/generic/ haiku/trunk/src/system/libroot/posix/string/arch/generic/memcpy.c haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile haiku/trunk/src/system/libroot/posix/string/arch/x86/Jamfile haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile haiku/trunk/src/system/runtime_loader/arch/x86/Jamfile Removed: haiku/trunk/src/system/kernel/arch/x86/arch_string.S haiku/trunk/src/system/kernel/lib/kernel_longjmp_return.c haiku/trunk/src/system/kernel/lib/kernel_setjmp_save_sigs.c haiku/trunk/src/system/libroot/posix/string/arch/ppc/arch_string.S haiku/trunk/src/system/libroot/posix/string/memcpy.c Modified: haiku/trunk/src/system/boot/Jamfile haiku/trunk/src/system/boot/arch/m68k/Jamfile haiku/trunk/src/system/boot/arch/ppc/Jamfile haiku/trunk/src/system/boot/arch/x86/Jamfile haiku/trunk/src/system/kernel/arch/x86/Jamfile haiku/trunk/src/system/kernel/lib/Jamfile haiku/trunk/src/system/libroot/posix/string/Jamfile haiku/trunk/src/system/runtime_loader/Jamfile Log: * Moved the arch specific stuff in src/system/kernel/lib into arch/... subdirectories. Also moved the x86 kernel arch_string.S there. * Moved memcpy.c from src/system/libroot/posix/string into the arch/generic subdirectory. * Dealt with the consequences of moving things around. Affected are also the boot loader and runtime loader builds. Adjust the m68k and ppc parts, too, but only the x86 build is tested. Modified: haiku/trunk/src/system/boot/Jamfile =================================================================== --- haiku/trunk/src/system/boot/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/boot/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -2,13 +2,11 @@ local librootFunctions = abs.o - byteorder.o ctype.o qsort.o kernel_vsprintf.o memset.o memcmp.o - memcpy.o memmove.o strdup.o strlen.o Modified: haiku/trunk/src/system/boot/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/boot/arch/m68k/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/boot/arch/m68k/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -2,15 +2,22 @@ DEFINES += _BOOT_MODE ; +# TODO: Is there any reason to recompile arch_string.S here? local librootArchObjects = # arch_string.o arch_string.S ; -KernelMergeObject boot_arch_m68k.o : +local kernelLibArchObjects = + byteorder.o +; + +KernelMergeObject boot_arch_$(TARGET_ARCH).o : arch_elf.cpp $(librootArchObjects) : -fno-pic + : + $(kernelLibArchObjects) ; SEARCH on [ FGristFiles arch_elf.cpp ] Modified: haiku/trunk/src/system/boot/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/boot/arch/ppc/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/boot/arch/ppc/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -2,13 +2,17 @@ DEFINES += _BOOT_MODE ; -#local librootArchObjects = -# arch_string.o -#; +local kernelLibArchObjects = + byteorder.o + memcpy.o +; -KernelMergeObject boot_arch_ppc.o : +KernelMergeObject boot_arch_$(TARGET_ARCH).o : arch_elf.cpp -# $(librootArchObjects) + : # additional flags + : + $(kernelArchObjects) + $(kernelLibArchObjects) ; SEARCH on [ FGristFiles arch_elf.cpp ] Modified: haiku/trunk/src/system/boot/arch/x86/Jamfile =================================================================== --- haiku/trunk/src/system/boot/arch/x86/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/boot/arch/x86/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -4,19 +4,30 @@ local kernelArchSources = arch_elf.c - arch_string.S ; local kernelArchObjects = cpuid.o ; -KernelMergeObject boot_arch_x86.o : +local kernelLibArchSources = + arch_string.S +; + +local kernelLibArchObjects = + byteorder.o +; + +KernelMergeObject boot_arch_$(TARGET_ARCH).o : $(kernelArchSources) + $(kernelLibArchSources) : # additional flags : $(kernelArchObjects) + $(kernelLibArchObjects) ; SEARCH on [ FGristFiles $(kernelArchSources) ] = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_ARCH) ] ; +SEARCH on [ FGristFiles $(kernelLibArchSources) ] + = [ FDirName $(HAIKU_TOP) src system kernel lib arch $(TARGET_ARCH) ] ; Modified: haiku/trunk/src/system/kernel/arch/x86/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/kernel/arch/x86/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -23,7 +23,6 @@ # arch_selector.c arch_real_time_clock.c arch_smp.c - arch_string.S arch_thread.cpp arch_timer.c arch_vm.cpp @@ -37,7 +36,7 @@ cpuid.S syscall.S vm86.cpp - + x86_pit.c x86_apic.c x86_hpet.c Deleted: haiku/trunk/src/system/kernel/arch/x86/arch_string.S Modified: haiku/trunk/src/system/kernel/lib/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/kernel/lib/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -13,7 +13,7 @@ SEARCH on [ FGristFiles driver_settings.c find_directory.c - fs_info.c + fs_info.c wait_for_objects.cpp ] = [ FDirName $(HAIKU_TOP) src system libroot os ] ; @@ -85,7 +85,6 @@ # string memchr.c memcmp.c - memcpy.c memmove.c memset.c strcasecmp.c @@ -114,32 +113,8 @@ : $(TARGET_KERNEL_PIC_CCFLAGS) ; -# TODO: Move the following arch specific part into arch/$(TARGET_ARCH) subdirs! +# misc -SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ; - -KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o : - atomic.S - byteorder.S - system_time_asm.S - system_time.c - - : $(TARGET_KERNEL_PIC_CCFLAGS) -; - -SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ; -SEARCH_SOURCE += [ FDirName $(posixSources) string arch $(TARGET_ARCH) ] ; - -KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o : - siglongjmp.S - sigsetjmp.S - kernel_longjmp_return.c - kernel_setjmp_save_sigs.c - arch_string.S # TODO: Not needed for X86! - - : $(TARGET_KERNEL_PIC_CCFLAGS) -; - UsePrivateHeaders shared ; SEARCH_SOURCE = [ FDirName $(HAIKU_TOP) src kits support ] ; @@ -149,3 +124,5 @@ : $(TARGET_KERNEL_PIC_CCFLAGS) ; + +HaikuSubInclude arch $(TARGET_ARCH) ; Copied: haiku/trunk/src/system/kernel/lib/arch/generic/kernel_longjmp_return.c (from rev 27946, haiku/trunk/src/system/kernel/lib/kernel_longjmp_return.c) Copied: haiku/trunk/src/system/kernel/lib/arch/generic/kernel_setjmp_save_sigs.c (from rev 27946, haiku/trunk/src/system/kernel/lib/kernel_setjmp_save_sigs.c) Added: haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,32 @@ +SubDir HAIKU_TOP src system kernel lib arch m86k ; + +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + +local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ; +local posixSources = [ FDirName $(librootSources) posix ] ; + +SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ; + +KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o : + atomic.S + byteorder.S + system_time_asm.S + system_time.c + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; + +SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ; +SEARCH_SOURCE += [ FDirName $(posixSources) string arch generic ] ; +SEARCH_SOURCE += [ FDirName $(posixSources) string arch $(TARGET_ARCH) ] ; + +KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o : + siglongjmp.S + sigsetjmp.S + kernel_longjmp_return.c + kernel_setjmp_save_sigs.c + + arch_string.S + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; Added: haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,31 @@ +SubDir HAIKU_TOP src system kernel lib arch ppc ; + +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + +local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ; +local posixSources = [ FDirName $(librootSources) posix ] ; + +SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ; + +KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o : + atomic.S + byteorder.S + system_time_asm.S + system_time.c + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; + +SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ; +SEARCH_SOURCE += [ FDirName $(posixSources) string arch generic ] ; + +KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o : + siglongjmp.S + sigsetjmp.S + kernel_longjmp_return.c + kernel_setjmp_save_sigs.c + + memcpy.c + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; Added: haiku/trunk/src/system/kernel/lib/arch/x86/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/x86/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/kernel/lib/arch/x86/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,35 @@ +SubDir HAIKU_TOP src system kernel lib arch x86 ; + +# find the generated asm_offsets.h +SubDirHdrs [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR) system kernel arch + $(TARGET_ARCH) ] ; + +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + +local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ; +local posixSources = [ FDirName $(librootSources) posix ] ; + +SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ; + +KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o : + atomic.S + byteorder.S + system_time_asm.S + system_time.c + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; + +SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ; +SEARCH_SOURCE += [ FDirName $(posixSources) string arch generic ] ; + +KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o : + siglongjmp.S + sigsetjmp.S + kernel_longjmp_return.c + kernel_setjmp_save_sigs.c + + arch_string.S + + : $(TARGET_KERNEL_PIC_CCFLAGS) +; Copied: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S (from rev 27946, haiku/trunk/src/system/kernel/arch/x86/arch_string.S) Deleted: haiku/trunk/src/system/kernel/lib/kernel_longjmp_return.c Deleted: haiku/trunk/src/system/kernel/lib/kernel_setjmp_save_sigs.c Modified: haiku/trunk/src/system/libroot/posix/string/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/libroot/posix/string/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -8,7 +8,6 @@ memccpy.c memchr.c memcmp.c - memcpy.c memmove.c memset.c stpcpy.c @@ -39,11 +38,4 @@ strxfrm.c ; -SubDir HAIKU_TOP src system libroot posix string arch $(TARGET_ARCH) ; - -UsePrivateSystemHeaders ; - -MergeObject posix_string_arch_$(TARGET_ARCH).o : - arch_string.S -; - +HaikuSubInclude arch $(TARGET_ARCH) ; Copied: haiku/trunk/src/system/libroot/posix/string/arch/generic/memcpy.c (from rev 27946, haiku/trunk/src/system/libroot/posix/string/memcpy.c) Added: haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,7 @@ +SubDir HAIKU_TOP src system libroot posix string arch m68k ; + +UsePrivateSystemHeaders ; + +MergeObject posix_string_arch_$(TARGET_ARCH).o : + arch_string.S +; Added: haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,9 @@ +SubDir HAIKU_TOP src system libroot posix string arch ppc ; + +UsePrivateSystemHeaders ; + +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + +MergeObject posix_string_arch_$(TARGET_ARCH).o : + memcpy.c +; Deleted: haiku/trunk/src/system/libroot/posix/string/arch/ppc/arch_string.S Added: haiku/trunk/src/system/libroot/posix/string/arch/x86/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/x86/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/libroot/posix/string/arch/x86/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,8 @@ +SubDir HAIKU_TOP src system libroot posix string arch x86 ; + +UsePrivateSystemHeaders ; + +MergeObject posix_string_arch_$(TARGET_ARCH).o : + arch_string.S +; + Deleted: haiku/trunk/src/system/libroot/posix/string/memcpy.c Modified: haiku/trunk/src/system/runtime_loader/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/runtime_loader/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -25,8 +25,6 @@ : syscalls.o sem.o - atomic.o - thread.o errno.o @@ -37,7 +35,6 @@ memchr.o memcmp.o - memcpy.o memmove.o memset.o strcasecmp.o @@ -57,7 +54,6 @@ strrchr.o strspn.o strstr.o - arch_string.o [ FGristFiles kernel_vsprintf.o ] ; @@ -69,20 +65,20 @@ SEARCH on [ FGristFiles KMessage.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; -SEARCH_SOURCE += [ FDirName $(SUBDIR) arch $(TARGET_ARCH) ] ; - Objects runtime_loader.c elf.cpp export.c heap.cpp utility.cpp - arch_relocate.c ; Ld runtime_loader : - [ FGristFiles runtime_loader.o elf.o export.o heap.o utility.o arch_relocate.o ] + [ FGristFiles runtime_loader.o elf.o export.o heap.o utility.o ] libruntime_loader.a + libruntime_loader_$(TARGET_ARCH).a $(TARGET_GCC_LIBGCC) : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld ; + +HaikuSubInclude arch $(TARGET_ARCH) ; Added: haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,15 @@ +SubDir HAIKU_TOP src system runtime_loader arch m68k ; + +UsePrivateHeaders runtime_loader ; +UsePrivateSystemHeaders ; + +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ; + +StaticLibrary libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.c + : + atomic.o + thread.o + + arch_string.o +; Added: haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,15 @@ +SubDir HAIKU_TOP src system runtime_loader arch ppc ; + +UsePrivateHeaders runtime_loader ; +UsePrivateSystemHeaders ; + +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ; + +StaticLibrary libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.c + : + atomic.o + thread.o + + memcpy.o +; Added: haiku/trunk/src/system/runtime_loader/arch/x86/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/arch/x86/Jamfile 2008-10-09 14:58:45 UTC (rev 27946) +++ haiku/trunk/src/system/runtime_loader/arch/x86/Jamfile 2008-10-09 23:47:01 UTC (rev 27947) @@ -0,0 +1,16 @@ +SubDir HAIKU_TOP src system runtime_loader arch x86 ; + +UsePrivateHeaders runtime_loader ; +UsePrivateSystemHeaders ; + +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ; + +StaticLibrary libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.c + : + atomic.o + thread.o + +# memcpy.o + arch_string.o +; From dlmcpaul at mail.berlios.de Fri Oct 10 10:33:59 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Fri, 10 Oct 2008 10:33:59 +0200 Subject: [Haiku-commits] r27948 - haiku/trunk/src/add-ons/media/plugins/wav_reader Message-ID: <200810100833.m9A8Xxcd005855@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-10 10:33:57 +0200 (Fri, 10 Oct 2008) New Revision: 27948 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27948&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h Log: Handle duration for mp3 in wav container better, add FindKeyFrame function Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp 2008-10-09 23:47:01 UTC (rev 27947) +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp 2008-10-10 08:33:57 UTC (rev 27948) @@ -207,9 +207,10 @@ fFrameRate = UINT32(format.samples_per_sec); fBitsPerSample = UINT16(format.bits_per_sample); if (fBitsPerSample == 0) { - printf("WavReader::Sniff: Error, bits_per_sample = 0\n"); + printf("WavReader::Sniff: Error, bits_per_sample = 0 assuming 8\n"); fBitsPerSample = 8; } + fAvgBytesPerSec = format.avg_bytes_per_sec; fFrameCount = foundFact ? UINT32(fact.sample_length) : 0; fFormatCode = UINT16(format.format_tag); if (fFormatCode == 0xfffe && foundFmtExt) @@ -266,7 +267,16 @@ data->buffersize = (BUFFER_SIZE / fBlockAlign) * fBlockAlign; data->buffer = malloc(data->buffersize); data->framecount = fFrameCount ? fFrameCount : (8 * fDataSize) / data->bitsperframe; - data->duration = (data->framecount * 1000000LL) / data->fps; + if (fFormatCode == 0x0055) { + // mp3 in wav file + if (fAvgBytesPerSec) { + data->duration = (data->datasize * 1000000LL) / fAvgBytesPerSec; + } else { + data->duration = (data->framecount * 1000000LL) / data->fps / fBitsPerSample * fChannelCount; + } + } else { + data->duration = (data->framecount * 1000000LL) / data->fps; + } data->raw = fFormatCode == 0x0001; TRACE(" bitsperframe %ld\n", data->bitsperframe); @@ -351,20 +361,21 @@ status_t WavReader::Seek(void *cookie, - uint32 seekTo, + uint32 flags, int64 *frame, bigtime_t *time) { + // Seek to the given position wavdata *data = reinterpret_cast(cookie); uint64 pos; - if (seekTo & B_MEDIA_SEEK_TO_FRAME) { + if (flags & B_MEDIA_SEEK_TO_FRAME) { if (data->raw) pos = (*frame * data->bitsperframe) / 8; else pos = (*frame * fDataSize) / data->framecount; pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start TRACE("WavReader::Seek to frame %Ld, pos %Ld\n", *frame, pos); - } else if (seekTo & B_MEDIA_SEEK_TO_TIME) { + } else if (flags & B_MEDIA_SEEK_TO_TIME) { if (data->raw) pos = (*time * data->fps * data->bitsperframe) / (1000000LL * 8); else @@ -393,7 +404,49 @@ return B_OK; } +status_t +WavReader::FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time) +{ + // Find a seek position without actually seeking + wavdata *data = reinterpret_cast(cookie); + uint64 pos; + if (flags & B_MEDIA_SEEK_TO_FRAME) { + if (data->raw) + pos = (*frame * data->bitsperframe) / 8; + else + pos = (*frame * fDataSize) / data->framecount; + pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start + TRACE("WavReader::Seek to frame %Ld, pos %Ld\n", *frame, pos); + } else if (flags & B_MEDIA_SEEK_TO_TIME) { + if (data->raw) + pos = (*time * data->fps * data->bitsperframe) / (1000000LL * 8); + else + pos = (*time * fDataSize) / data->duration; + pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start + TRACE("WavReader::Seek to time %Ld, pos %Ld\n", *time, pos); + } else { + return B_ERROR; + } + + if (data->raw) + *frame = (8 * pos) / data->bitsperframe; + else + *frame = (pos * data->framecount) / fDataSize; + *time = (*frame * 1000000LL) / data->fps; + + TRACE("WavReader::Seek newtime %Ld\n", *time); + TRACE("WavReader::Seek newframe %Ld\n", *frame); + + if (pos < 0 || pos > data->datasize) { + TRACE("WavReader::Seek invalid position %Ld\n", pos); + return B_ERROR; + } + + return B_OK; +} + status_t WavReader::GetNextChunk(void *cookie, const void **chunkBuffer, size_t *chunkSize, Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h 2008-10-09 23:47:01 UTC (rev 27947) +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h 2008-10-10 08:33:57 UTC (rev 27948) @@ -44,15 +44,17 @@ status_t FreeCookie(void *cookie); status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, - media_format *format, const void **infoBuffer, size_t *infoSize); + media_format *format, const void **infoBuffer, size_t *infoSize); - status_t Seek(void *cookie, - uint32 seekTo, - int64 *frame, bigtime_t *time); + status_t Seek(void *cookie, uint32 flags, + int64 *frame, bigtime_t *time); + status_t FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time); + status_t GetNextChunk(void *cookie, - const void **chunkBuffer, size_t *chunkSize, - media_header *mediaHeader); + const void **chunkBuffer, size_t *chunkSize, + media_header *mediaHeader); BPositionIO *Source() { return fSource; } @@ -68,6 +70,7 @@ int fBitsPerSample; uint16 fFormatCode; uint16 fBlockAlign; + uint16 fAvgBytesPerSec; }; From dlmcpaul at mail.berlios.de Fri Oct 10 10:34:35 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Fri, 10 Oct 2008 10:34:35 +0200 Subject: [Haiku-commits] r27949 - haiku/trunk/src/add-ons/media/plugins/mp3_reader Message-ID: <200810100834.m9A8YZdh005924@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-10 10:34:34 +0200 (Fri, 10 Oct 2008) New Revision: 27949 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27949&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.h Log: Add FindKeyFrame function Modified: haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp 2008-10-10 08:33:57 UTC (rev 27948) +++ haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.cpp 2008-10-10 08:34:34 UTC (rev 27949) @@ -106,7 +106,7 @@ // frame_sample_count_table[layer_index] static const int frame_sample_count_table[4] = { 0, 1152, 1152, 384 }; -static const int MAX_CHUNK_SIZE = 5200; +static const size_t MAX_CHUNK_SIZE = 5200; struct mp3data { @@ -317,9 +317,10 @@ status_t mp3Reader::Seek(void *cookie, - uint32 seekTo, + uint32 flags, int64 *frame, bigtime_t *time) { + // Find a seek position and seek to it if (!fSeekableSource) return B_ERROR; @@ -328,14 +329,14 @@ // this isn't very accurate - if (seekTo & B_MEDIA_SEEK_TO_FRAME) { + if (flags & B_MEDIA_SEEK_TO_FRAME) { pos = fXingVbrInfo ? XingSeekPoint(100.0 * *frame / (float)data->frameCount) : -1; if (pos < 0) pos = (*frame * fDataSize) / data->frameCount; TRACE("mp3Reader::Seek to frame %Ld, pos %Ld\n", *frame, pos); *time = (*frame * data->duration) / data->frameCount; TRACE("mp3Reader::Seek newtime %Ld\n", *time); - } else if (seekTo & B_MEDIA_SEEK_TO_TIME) { + } else if (flags & B_MEDIA_SEEK_TO_TIME) { pos = fXingVbrInfo ? XingSeekPoint(100.0 * *time / (float)data->duration) : -1; if (pos < 0) pos = (*time * fDataSize) / data->duration; @@ -380,7 +381,67 @@ return B_OK; } +status_t +mp3Reader::FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time) +{ + // Find a seek position without actually seeking + if (!fSeekableSource) + return B_ERROR; + mp3data *data = reinterpret_cast(cookie); + int64 pos; + + // this isn't very accurate + + if (flags & B_MEDIA_SEEK_TO_FRAME) { + pos = fXingVbrInfo ? XingSeekPoint(100.0 * *frame / (float)data->frameCount) : -1; + if (pos < 0) + pos = (*frame * fDataSize) / data->frameCount; + TRACE("mp3Reader::FindKeyFrame to frame %Ld, pos %Ld\n", *frame, pos); + *time = (*frame * data->duration) / data->frameCount; + TRACE("mp3Reader::FindKeyFrame newtime %Ld\n", *time); + } else if (flags & B_MEDIA_SEEK_TO_TIME) { + pos = fXingVbrInfo ? XingSeekPoint(100.0 * *time / (float)data->duration) : -1; + if (pos < 0) + pos = (*time * fDataSize) / data->duration; + TRACE("mp3Reader::FindKeyFrame to time %Ld, pos %Ld\n", *time, pos); + *frame = (*time * data->frameCount) / data->duration; + TRACE("mp3Reader::FindKeyFrame newframe %Ld\n", *frame); + } else { + return B_ERROR; + } + + // We ignore B_MEDIA_SEEK_CLOSEST_FORWARD, B_MEDIA_SEEK_CLOSEST_BACKWARD + + uint8 buffer[16000]; + if (pos > fDataSize - 16000) + pos = fDataSize - 16000; + if (pos < 0) + pos = 0; + int64 size = fDataSize - pos; + if (size > 16000) + size = 16000; + if (size != Source()->ReadAt(fDataStart + pos, buffer, size)) { + TRACE("mp3Reader::FindKeyFrame: unexpected read error\n"); + return B_ERROR; + } + int32 end = size - 4; + int32 ofs; + for (ofs = 0; ofs < end; ofs++) { + if (buffer[ofs] != 0xff) // quick check + continue; + if (IsValidStream(&buffer[ofs], size - ofs)) + break; + } + if (ofs == end) { + TRACE("mp3Reader::FindKeyFrame: couldn't synchronize\n"); + return B_ERROR; + } + + return B_OK; +} + status_t mp3Reader::GetNextChunk(void *cookie, const void **chunkBuffer, size_t *chunkSize, @@ -397,7 +458,7 @@ #if 0 // XXXX TEST - int size = min_c(MAX_CHUNK_SIZE - 16, maxbytes); + size_t size = min_c(MAX_CHUNK_SIZE - 16, maxbytes); if (size != Source()->ReadAt(fDataStart + data->position, data->chunkBuffer,size)) { TRACE("mp3Reader::GetNextChunk: unexpected read error\n"); return B_ERROR; @@ -460,7 +521,7 @@ *chunkSize = size + 4; if (*chunkSize > MAX_CHUNK_SIZE) { - printf("mp3Reader: chunk buffer overrun, read %ld bytes into %d bytes buffer\n", *chunkSize, MAX_CHUNK_SIZE); + printf("mp3Reader: chunk buffer overrun, read %ld bytes into %ld bytes buffer\n", *chunkSize, MAX_CHUNK_SIZE); exit(1); } Modified: haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.h 2008-10-10 08:33:57 UTC (rev 27948) +++ haiku/trunk/src/add-ons/media/plugins/mp3_reader/MP3ReaderPlugin.h 2008-10-10 08:34:34 UTC (rev 27949) @@ -47,15 +47,17 @@ status_t FreeCookie(void *cookie); status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, - media_format *format, const void **infoBuffer, size_t *infoSize); + media_format *format, const void **infoBuffer, size_t *infoSize); - status_t Seek(void *cookie, - uint32 seekTo, - int64 *frame, bigtime_t *time); + status_t Seek(void *cookie, uint32 flags, + int64 *frame, bigtime_t *time); + status_t FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time); + status_t GetNextChunk(void *cookie, - const void **chunkBuffer, size_t *chunkSize, - media_header *mediaHeader); + const void **chunkBuffer, size_t *chunkSize, + media_header *mediaHeader); BPositionIO *Source() { return fSeekableSource; } From axeld at mail.berlios.de Fri Oct 10 20:38:12 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Fri, 10 Oct 2008 20:38:12 +0200 Subject: [Haiku-commits] r27950 - haiku/trunk/src/add-ons/kernel/network/stack Message-ID: <200810101838.m9AIcCrS019551@sheep.berlios.de> Author: axeld Date: 2008-10-10 20:38:12 +0200 (Fri, 10 Oct 2008) New Revision: 27950 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27950&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp Log: * put_device_interface() accessed "device" which was already freed to get the module name, possibly causing a crash when you delete an interface. Modified: haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp 2008-10-10 08:34:34 UTC (rev 27949) +++ haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp 2008-10-10 18:38:12 UTC (rev 27950) @@ -442,8 +442,9 @@ wait_for_thread(interface->consumer_thread, &status); net_device *device = interface->device; + const char* moduleName = device->module->info.name; device->module->uninit_device(device); - put_module(device->module->info.name); + put_module(moduleName); recursive_lock_destroy(&interface->rx_lock); delete interface; From stippi at mail.berlios.de Fri Oct 10 20:41:58 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Fri, 10 Oct 2008 20:41:58 +0200 Subject: [Haiku-commits] r27951 - in haiku/trunk/src/apps/icon-o-matic: . document import_export/message Message-ID: <200810101841.m9AIfwhs019809@sheep.berlios.de> Author: stippi Date: 2008-10-10 20:41:57 +0200 (Fri, 10 Oct 2008) New Revision: 27951 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27951&view=rev Modified: haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp haiku/trunk/src/apps/icon-o-matic/document/Defines.cpp haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageExporter.cpp haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageImporter.cpp Log: Fix a confusion with the big-endian versus little endian saving of the magic four bytes to recognize native (BMessage-based) icons. The file recognition rule didn't work in the end. Modified: haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp 2008-10-10 18:38:12 UTC (rev 27950) +++ haiku/trunk/src/apps/icon-o-matic/IconEditorApp.cpp 2008-10-10 18:41:57 UTC (rev 27951) @@ -740,7 +740,7 @@ strerror(ret)); // set sniffer rule - const char* snifferRule = "0.9 ('GSMI')"; + const char* snifferRule = "0.9 ('IMSG')"; ret = mime.SetSnifferRule(snifferRule); if (ret < B_OK) { BString parseError; Modified: haiku/trunk/src/apps/icon-o-matic/document/Defines.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/document/Defines.cpp 2008-10-10 18:38:12 UTC (rev 27950) +++ haiku/trunk/src/apps/icon-o-matic/document/Defines.cpp 2008-10-10 18:41:57 UTC (rev 27951) @@ -7,7 +7,7 @@ */ #include "Defines.h" -const uint32 kNativeIconMagicNumber = 'GSMI'; +const uint32 kNativeIconMagicNumber = 'IMSG'; const char* kNativeIconMimeType = "application/x-vnd.Haiku-icon"; Modified: haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageExporter.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageExporter.cpp 2008-10-10 18:38:12 UTC (rev 27950) +++ haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageExporter.cpp 2008-10-10 18:41:57 UTC (rev 27951) @@ -104,7 +104,7 @@ // later tells us that this file is one of us if (ret == B_OK) { ssize_t size = sizeof(uint32); - uint32 magic = B_HOST_TO_LENDIAN_INT32(kNativeIconMagicNumber); + uint32 magic = B_HOST_TO_BENDIAN_INT32(kNativeIconMagicNumber); ssize_t written = stream->Write(&magic, size); if (written != size) { if (written < 0) Modified: haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageImporter.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageImporter.cpp 2008-10-10 18:38:12 UTC (rev 27950) +++ haiku/trunk/src/apps/icon-o-matic/import_export/message/MessageImporter.cpp 2008-10-10 18:41:57 UTC (rev 27951) @@ -59,7 +59,7 @@ return ret; } - if (B_LENDIAN_TO_HOST_INT32(magic) != kNativeIconMagicNumber) { + if (B_BENDIAN_TO_HOST_INT32(magic) != kNativeIconMagicNumber) { // this might be an old native icon file, where // we didn't prepend the magic number yet, seek back if (stream->Seek(position, SEEK_SET) != position) { From bonefish at mail.berlios.de Fri Oct 10 20:43:48 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 10 Oct 2008 20:43:48 +0200 Subject: [Haiku-commits] r27952 - in haiku/trunk: headers/private/kernel/arch/x86 src/system/boot src/system/boot/arch/m68k src/system/boot/arch/ppc src/system/kernel/arch/x86 src/system/kernel/lib src/system/kernel/lib/arch/m68k src/system/kernel/lib/arch/ppc src/system/kernel/lib/arch/x86 src/system/libroot/posix/string src/system/libroot/posix/string/arch/generic src/system/libroot/posix/string/arch/m68k src/system/libroot/posix/string/arch/ppc src/system/libroot/posix/string/arch/x86 src/system/runtime_loader src/system/runtime_loader/arch/m68k src/system/runtime_loader/arch/ppc Message-ID: <200810101843.m9AIhmhB020020@sheep.berlios.de> Author: bonefish Date: 2008-10-10 20:43:46 +0200 (Fri, 10 Oct 2008) New Revision: 27952 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27952&view=rev Added: haiku/trunk/src/system/libroot/posix/string/arch/generic/memset.c Removed: haiku/trunk/src/system/libroot/posix/string/memset.c Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_cpu.h haiku/trunk/src/system/boot/Jamfile haiku/trunk/src/system/boot/arch/m68k/Jamfile haiku/trunk/src/system/boot/arch/ppc/Jamfile haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp haiku/trunk/src/system/kernel/arch/x86/asm_offsets.cpp haiku/trunk/src/system/kernel/lib/Jamfile haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S haiku/trunk/src/system/libroot/posix/string/Jamfile haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile haiku/trunk/src/system/libroot/posix/string/arch/x86/arch_string.S haiku/trunk/src/system/runtime_loader/Jamfile haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile Log: * Implemented x86 assembly version of memset(). * memset() is now available through the commpage. * CPU modules can provide a model-optimized memset(). Modified: haiku/trunk/headers/private/kernel/arch/x86/arch_cpu.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/x86/arch_cpu.h 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/headers/private/kernel/arch/x86/arch_cpu.h 2008-10-10 18:43:46 UTC (rev 27952) @@ -100,6 +100,8 @@ typedef struct x86_optimized_functions { void (*memcpy)(void* dest, const void* source, size_t count); void* memcpy_end; + void (*memset)(void* dest, int value, size_t count); + void* memset_end; } x86_optimized_functions; typedef struct x86_cpu_module_info { Modified: haiku/trunk/src/system/boot/Jamfile =================================================================== --- haiku/trunk/src/system/boot/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/boot/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -5,7 +5,6 @@ ctype.o qsort.o kernel_vsprintf.o - memset.o memcmp.o memmove.o strdup.o Modified: haiku/trunk/src/system/boot/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/boot/arch/m68k/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/boot/arch/m68k/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -10,6 +10,7 @@ local kernelLibArchObjects = byteorder.o + memset.o ; KernelMergeObject boot_arch_$(TARGET_ARCH).o : Modified: haiku/trunk/src/system/boot/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/boot/arch/ppc/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/boot/arch/ppc/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -5,6 +5,7 @@ local kernelLibArchObjects = byteorder.o memcpy.o + memset.o ; KernelMergeObject boot_arch_$(TARGET_ARCH).o : Modified: haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp 2008-10-10 18:43:46 UTC (rev 27952) @@ -87,10 +87,14 @@ extern "C" void memcpy_generic(void* dest, const void* source, size_t count); extern int memcpy_generic_end; +extern "C" void memset_generic(void* dest, int value, size_t count); +extern int memset_generic_end; x86_optimized_functions gOptimizedFunctions = { memcpy_generic, - &memcpy_generic_end + &memcpy_generic_end, + memset_generic, + &memset_generic_end }; @@ -605,6 +609,11 @@ gOptimizedFunctions.memcpy = functions.memcpy; gOptimizedFunctions.memcpy_end = functions.memcpy_end; } + + if (functions.memset != NULL) { + gOptimizedFunctions.memset = functions.memset; + gOptimizedFunctions.memset_end = functions.memset_end; + } } // put the optimized functions into the commpage @@ -612,12 +621,19 @@ - (addr_t)gOptimizedFunctions.memcpy; fill_commpage_entry(COMMPAGE_ENTRY_X86_MEMCPY, (const void*)gOptimizedFunctions.memcpy, memcpyLen); + size_t memsetLen = (addr_t)gOptimizedFunctions.memset_end + - (addr_t)gOptimizedFunctions.memset; + fill_commpage_entry(COMMPAGE_ENTRY_X86_MEMSET, + (const void*)gOptimizedFunctions.memset, memsetLen); // add the functions to the commpage image image_id image = get_commpage_image(); elf_add_memory_image_symbol(image, "commpage_memcpy", ((addr_t*)USER_COMMPAGE_ADDR)[COMMPAGE_ENTRY_X86_MEMCPY], memcpyLen, B_SYMBOL_TYPE_TEXT); + elf_add_memory_image_symbol(image, "commpage_memset", + ((addr_t*)USER_COMMPAGE_ADDR)[COMMPAGE_ENTRY_X86_MEMSET], memsetLen, + B_SYMBOL_TYPE_TEXT); return B_OK; } Modified: haiku/trunk/src/system/kernel/arch/x86/asm_offsets.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/asm_offsets.cpp 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/arch/x86/asm_offsets.cpp 2008-10-10 18:43:46 UTC (rev 27952) @@ -57,4 +57,6 @@ // struct x86_optimized_functions DEFINE_OFFSET_MACRO(X86_OPTIMIZED_FUNCTIONS, x86_optimized_functions, memcpy); + DEFINE_OFFSET_MACRO(X86_OPTIMIZED_FUNCTIONS, x86_optimized_functions, + memset); } Modified: haiku/trunk/src/system/kernel/lib/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/lib/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -86,7 +86,6 @@ memchr.c memcmp.c memmove.c - memset.c strcasecmp.c strcasestr.c strcat.c Modified: haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -27,6 +27,7 @@ kernel_setjmp_save_sigs.c arch_string.S + memset.c : $(TARGET_KERNEL_PIC_CCFLAGS) ; Modified: haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -26,6 +26,7 @@ kernel_setjmp_save_sigs.c memcpy.c + memset.c : $(TARGET_KERNEL_PIC_CCFLAGS) ; Modified: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 18:43:46 UTC (rev 27952) @@ -1,6 +1,9 @@ /* -** Copyright 2001, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. + * Copyright 2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + * + * Copyright 2001, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. */ #if !_BOOT_MODE @@ -13,6 +16,7 @@ // We don't need the indirection in the boot loader. #if _BOOT_MODE # define memcpy_generic memcpy +# define memset_generic memset #endif @@ -26,6 +30,7 @@ movl 20(%esp),%ecx /* count */ /* move by words */ + // TODO: The addresses might not be aligned! cld shrl $2,%ecx rep @@ -40,13 +45,85 @@ popl %edi popl %esi ret +FUNCTION_END(memcpy_generic) SYMBOL(memcpy_generic_end): +/* void *memset(void *dest, int value, size_t length); */ +.align 4 +FUNCTION(memset_generic): + push %ebp + mov %esp, %ebp + + // %eax, %ecx, and %edx are scratch registers -- we only have to save %edi + push %edi + + // get the parameters + mov 16(%ebp), %ecx + mov 12(%ebp), %eax + mov 8(%ebp), %edi + + // When touching less than 12 bytes, we just do it bytewise. We might be + // able to process one or two lwords lwordwise, but the additional overhead + // isn't worth it. + cmp $12, %ecx + jl 2f + + // buffer address lword-aligned? + mov %edi, %edx + and $0x3, %edx + jz 1f + + // the buffer is unaligned -- copy the first bytes bytewise + mov $4, %ecx + sub %edx, %ecx + rep stosb + + mov 16(%ebp), %ecx + sub $4, %ecx + add %edx, %ecx + +1: // lwordwise + // prepare %eax -- the low byte must be copied to the other bytes + mov %al, %ah + mov %ax, %dx + shl $16, %eax + mov %dx, %ax + + // get the unaligned remainder into %edx + mov %ecx, %edx + and $0x3, %edx + + // write words + shr $2, %ecx + rep stosl + + mov %edx, %ecx + +2: // bytewise (remaining bytes) + rep stosb + + pop %edi + + // return value is the value passed in + mov 12(%ebp), %eax + + mov %ebp, %esp + pop %ebp + ret +FUNCTION_END(memset_generic) +SYMBOL(memset_generic_end): + + #if !_BOOT_MODE .align 4 FUNCTION(memcpy): jmp *(gOptimizedFunctions + X86_OPTIMIZED_FUNCTIONS_memcpy) +FUNCTION_END(memcpy) +FUNCTION(memset): + jmp *(gOptimizedFunctions + X86_OPTIMIZED_FUNCTIONS_memset) +FUNCTION_END(memset) + #endif // !_BOOT_MODE Modified: haiku/trunk/src/system/libroot/posix/string/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/libroot/posix/string/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -9,7 +9,6 @@ memchr.c memcmp.c memmove.c - memset.c stpcpy.c strcasecmp.c strcasestr.c Copied: haiku/trunk/src/system/libroot/posix/string/arch/generic/memset.c (from rev 27946, haiku/trunk/src/system/libroot/posix/string/memset.c) Modified: haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -2,6 +2,9 @@ UsePrivateSystemHeaders ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + MergeObject posix_string_arch_$(TARGET_ARCH).o : arch_string.S + memset.c ; Modified: haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -6,4 +6,5 @@ MergeObject posix_string_arch_$(TARGET_ARCH).o : memcpy.c + memset.c ; Modified: haiku/trunk/src/system/libroot/posix/string/arch/x86/arch_string.S =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/x86/arch_string.S 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/libroot/posix/string/arch/x86/arch_string.S 2008-10-10 18:43:46 UTC (rev 27952) @@ -1,18 +1,18 @@ /* -** Copyright 2001, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ + * Copyright 2008, Ingo Weinhold, ingo_weinhold at gmx.de. + * Distributed under the terms of the MIT License. + */ -#if !_KERNEL_MODE - // TODO: This should not even be compiled for the kernel. Fix the TODO in - // src/system/kernel/lib/Jamfile! - +#include #include -#define FUNCTION(x) .global x; .type x, at function; x .align 4 + FUNCTION(memcpy): jmp *(USER_COMMPAGE_ADDR + COMMPAGE_ENTRY_X86_MEMCPY * 4) +FUNCTION_END(memcpy) -#endif // !_KERNEL_MODE +FUNCTION(memset): + jmp *(USER_COMMPAGE_ADDR + COMMPAGE_ENTRY_X86_MEMSET * 4) +FUNCTION_END(memset) Deleted: haiku/trunk/src/system/libroot/posix/string/memset.c Modified: haiku/trunk/src/system/runtime_loader/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/runtime_loader/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -36,7 +36,6 @@ memchr.o memcmp.o memmove.o - memset.o strcasecmp.o strcat.o strchr.o Modified: haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -12,4 +12,5 @@ thread.o arch_string.o + memset.o ; Modified: haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile =================================================================== --- haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile 2008-10-10 18:41:57 UTC (rev 27951) +++ haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile 2008-10-10 18:43:46 UTC (rev 27952) @@ -12,4 +12,5 @@ thread.o memcpy.o + memset.o ; From bonefish at mail.berlios.de Fri Oct 10 20:44:44 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 10 Oct 2008 20:44:44 +0200 Subject: [Haiku-commits] r27953 - haiku/trunk/headers/private/system/arch/x86 Message-ID: <200810101844.m9AIiigR020199@sheep.berlios.de> Author: bonefish Date: 2008-10-10 20:44:44 +0200 (Fri, 10 Oct 2008) New Revision: 27953 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27953&view=rev Modified: haiku/trunk/headers/private/system/arch/x86/arch_commpage_defs.h Log: Should have been part of the previous commit. x86 commpage definition for memset(). Modified: haiku/trunk/headers/private/system/arch/x86/arch_commpage_defs.h =================================================================== --- haiku/trunk/headers/private/system/arch/x86/arch_commpage_defs.h 2008-10-10 18:43:46 UTC (rev 27952) +++ haiku/trunk/headers/private/system/arch/x86/arch_commpage_defs.h 2008-10-10 18:44:44 UTC (rev 27953) @@ -11,6 +11,7 @@ #define COMMPAGE_ENTRY_X86_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0) #define COMMPAGE_ENTRY_X86_MEMCPY (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1) +#define COMMPAGE_ENTRY_X86_MEMSET (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 2) #define ARCH_USER_COMMPAGE_ADDR (0xffff0000) From julun at mail.berlios.de Fri Oct 10 20:51:16 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 10 Oct 2008 20:51:16 +0200 Subject: [Haiku-commits] r27954 - in haiku/trunk: headers/private/shared src/kits/shared Message-ID: <200810101851.m9AIpGUb020904@sheep.berlios.de> Author: julun Date: 2008-10-10 20:51:15 +0200 (Fri, 10 Oct 2008) New Revision: 27954 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27954&view=rev Modified: haiku/trunk/headers/private/shared/DateTime.h haiku/trunk/src/kits/shared/DateTime.cpp Log: * rewrote BTime to operate entirely on microseconds * added some convenient functions, operator etc... * reused parts of the patch by Stephen Deken, thanks Modified: haiku/trunk/headers/private/shared/DateTime.h =================================================================== --- haiku/trunk/headers/private/shared/DateTime.h 2008-10-10 18:44:44 UTC (rev 27953) +++ haiku/trunk/headers/private/shared/DateTime.h 2008-10-10 18:51:15 UTC (rev 27954) @@ -18,25 +18,64 @@ }; +enum diff_type { + B_HOURS_DIFF, + B_MINUTES_DIFF, + B_SECONDS_DIFF, + B_MILLISECONDS_DIFF, + B_MICROSECONDS_DIFF +}; + + class BTime { public: BTime(); - BTime(int32 hour, int32 minute, int32 second); + BTime(int32 hour, int32 minute, int32 second, + int32 microsecond = 0); ~BTime(); bool IsValid() const; + bool IsValid(const BTime& time) const; + bool IsValid(int32 hour, int32 minute, int32 second, + int32 microsecond = 0) const; static BTime CurrentTime(time_type type); - bool SetTime(int32 hour, int32 minute, int32 second); + BTime Time() const; + bool SetTime(const BTime& time); + bool SetTime(int32 hour, int32 minute, int32 second, + int32 microsecond = 0); + + void AddHours(int32 hours); + void AddMinutes(int32 minutes); + void AddSeconds(int32 seconds); + void AddMilliseconds(int32 milliseconds); + void AddMicroseconds(int32 microseconds); + int32 Hour() const; int32 Minute() const; int32 Second() const; + int32 Millisecond() const; + int32 Microsecond() const; + bigtime_t Difference(const BTime& time, diff_type type) const; + bool operator!=(const BTime& time) const; + bool operator==(const BTime& time) const; + + bool operator<(const BTime& time) const; + bool operator<=(const BTime& time) const; + + bool operator>(const BTime& time) const; + bool operator>=(const BTime& time) const; + private: - int32 fHour; - int32 fMinute; - int32 fSecond; + bigtime_t _Microseconds() const; + void _AddMicroseconds(bigtime_t microseconds); + bool _SetTime(int32 hour, int32 minute, int32 second, + int32 microsecond); + + private: + bigtime_t fMicroseconds; }; Modified: haiku/trunk/src/kits/shared/DateTime.cpp =================================================================== --- haiku/trunk/src/kits/shared/DateTime.cpp 2008-10-10 18:44:44 UTC (rev 27953) +++ haiku/trunk/src/kits/shared/DateTime.cpp 2008-10-10 18:51:15 UTC (rev 27954) @@ -11,24 +11,35 @@ #include +#include namespace BPrivate { +const int32 kSecondsPerMinute = 60; + +const int32 kHoursPerDay = 24; +const int32 kMinutesPerDay = 1440; +const int32 kSecondsPerDay = 86400; +const int32 kMillisecondsPerDay = 86400000; + +const int32 kMicrosecondsPerSecond = 1000000; +const int32 kMicrosecondsPerMinute = 60000000; +const bigtime_t kMicrosecondsPerHour = 3600000000LL; +const bigtime_t kMicrosecondsPerDay = 86400000000LL; + + BTime::BTime() - : fHour(-1), - fMinute(-1), - fSecond(-1) + : fMicroseconds(-1) { } -BTime::BTime(int32 hour, int32 minute, int32 second) - : fHour(hour), - fMinute(minute), - fSecond(second) +BTime::BTime(int32 hour, int32 minute, int32 second, int32 microsecond) + : fMicroseconds(-1) { + _SetTime(hour, minute, second, microsecond); } @@ -40,70 +51,244 @@ bool BTime::IsValid() const { - if (fHour < 0 || fHour >= 24) - return false; + return fMicroseconds > -1 && fMicroseconds < kMicrosecondsPerDay; +} - if (fMinute < 0 || fMinute >= 60) - return false; - if (fSecond < 0 || fSecond >= 60) - return false; +bool +BTime::IsValid(const BTime& time) const +{ + return time.fMicroseconds > -1 && time.fMicroseconds < kMicrosecondsPerDay; +} - return true; + +bool +BTime::IsValid(int32 hour, int32 minute, int32 second, int32 microsecond) const +{ + return BTime(hour, minute, second, microsecond).IsValid(); } BTime -BTime::CurrentTime(time_type type) + BTime::CurrentTime(time_type type) { - time_t timer; + struct timeval tv; + if (gettimeofday(&tv, NULL) != 0) { + // gettimeofday failed? + time(&tv.tv_sec); + } + struct tm result; struct tm* timeinfo; - - time(&timer); - if (type == B_GMT_TIME) - timeinfo = gmtime_r(&timer, &result); + timeinfo = gmtime_r(&tv.tv_sec, &result); else - timeinfo = localtime_r(&timer, &result); + timeinfo = localtime_r(&tv.tv_sec, &result); int32 sec = timeinfo->tm_sec; - return BTime(timeinfo->tm_hour, timeinfo->tm_min, (sec > 59) ? 59 : sec); + return BTime(timeinfo->tm_hour, timeinfo->tm_min, (sec > 59) ? 59 : sec, + tv.tv_usec); } +BTime +BTime::Time() const +{ + BTime time; + time.fMicroseconds = fMicroseconds; + return time; +} + + bool -BTime::SetTime(int32 hour, int32 minute, int32 second) +BTime::SetTime(const BTime& time) { - fHour = hour; - fMinute = minute; - fSecond = second; - + fMicroseconds = time.fMicroseconds; return IsValid(); } +bool +BTime::SetTime(int32 hour, int32 minute, int32 second, int32 microsecond) +{ + return _SetTime(hour, minute, second, microsecond); +} + + +void +BTime::AddHours(int32 hours) +{ + _AddMicroseconds(bigtime_t(hours % kHoursPerDay) * kMicrosecondsPerHour); +} + + +void +BTime::AddMinutes(int32 minutes) +{ + _AddMicroseconds(bigtime_t(minutes % kMinutesPerDay) * + kMicrosecondsPerMinute); +} + + +void +BTime::AddSeconds(int32 seconds) +{ + _AddMicroseconds(bigtime_t(seconds % kSecondsPerDay) * + kMicrosecondsPerSecond); +} + + +void +BTime::AddMilliseconds(int32 milliseconds) +{ + _AddMicroseconds(bigtime_t(milliseconds % kMillisecondsPerDay) * 1000); +} + + +void +BTime::AddMicroseconds(int32 microseconds) +{ + _AddMicroseconds(microseconds); +} + + int32 BTime::Hour() const { - return fHour; + return int32(_Microseconds() / kMicrosecondsPerHour); } int32 BTime::Minute() const { - return fMinute; + return int32((_Microseconds() % kMicrosecondsPerHour)) / kMicrosecondsPerMinute; } int32 BTime::Second() const { - return fSecond; + return int32(_Microseconds() / kMicrosecondsPerSecond) % kSecondsPerMinute; } +int32 +BTime::Millisecond() const +{ + + return Microsecond() / 1000; +} + + +int32 +BTime::Microsecond() const +{ + return int32(_Microseconds() % 1000000); +} + + +bigtime_t +BTime::_Microseconds() const +{ + return fMicroseconds == -1 ? 0 : fMicroseconds; +} + + +bigtime_t +BTime::Difference(const BTime& time, diff_type type) const +{ + bigtime_t diff = time._Microseconds() - _Microseconds(); + switch (type) { + case B_HOURS_DIFF: { + diff /= kMicrosecondsPerHour; + } break; + case B_MINUTES_DIFF: { + diff /= kMicrosecondsPerMinute; + } break; + case B_SECONDS_DIFF: { + diff /= kMicrosecondsPerSecond; + } break; + case B_MILLISECONDS_DIFF: { + diff /= 1000; + } break; + case B_MICROSECONDS_DIFF: + default: break; + } + return diff; +} + + +bool +BTime::operator!=(const BTime& time) const +{ + return fMicroseconds != time.fMicroseconds; +} + + +bool +BTime::operator==(const BTime& time) const +{ + return fMicroseconds == time.fMicroseconds; +} + + +bool +BTime::operator<(const BTime& time) const +{ + return fMicroseconds < time.fMicroseconds; +} + + +bool +BTime::operator<=(const BTime& time) const +{ + return fMicroseconds <= time.fMicroseconds; +} + + +bool +BTime::operator>(const BTime& time) const +{ + return fMicroseconds > time.fMicroseconds; +} + + +bool +BTime::operator>=(const BTime& time) const +{ + return fMicroseconds >= time.fMicroseconds; +} + + +void +BTime::_AddMicroseconds(bigtime_t microseconds) +{ + bigtime_t count = 0; + if (microseconds < 0) { + count = ((kMicrosecondsPerDay - microseconds) / kMicrosecondsPerDay) * + kMicrosecondsPerDay; + } + fMicroseconds = (_Microseconds() + microseconds + count) % kMicrosecondsPerDay; +} + + +bool +BTime::_SetTime(int32 hour, int32 minute, int32 second, int32 microsecond) +{ + fMicroseconds = hour * kMicrosecondsPerHour + + minute * kMicrosecondsPerMinute + + second * kMicrosecondsPerSecond + + microsecond; + + bool isValid = IsValid(); + if (!isValid) + fMicroseconds = -1; + + return isValid; +} + + // #pragma mark - BDate From stippi at mail.berlios.de Fri Oct 10 20:55:07 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Fri, 10 Oct 2008 20:55:07 +0200 Subject: [Haiku-commits] r27955 - in haiku/trunk/src/apps/mediaplayer: . playlist settings Message-ID: <200810101855.m9AIt61O022088@sheep.berlios.de> Author: stippi Date: 2008-10-10 20:55:06 +0200 (Fri, 10 Oct 2008) New Revision: 27955 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27955&view=rev Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp haiku/trunk/src/apps/mediaplayer/MainApp.h haiku/trunk/src/apps/mediaplayer/MainWin.cpp haiku/trunk/src/apps/mediaplayer/MainWin.h haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp Log: * Cleanup with regards to file panel usage. There are two global file panels now maintained by the application. (So that the last used folder is more consistently remembered.) * Added a message protocol for using the file panels from other loopers. * Implemented playlist saving and loading for the binary (BMessage-based) format. There were some beginnings for supporting a m3u-like text-based format as well. Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -2,7 +2,7 @@ * MainApp.cpp - Media Player for the Haiku Operating System * * Copyright (C) 2006 Marcus Overhagen - * Copyright (C) 2008 Stephan A?mus + * Copyright (C) 2008 Stephan A?mus (MIT Ok) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,7 @@ #include "SettingsWindow.h" -MainApp *gMainApp; +MainApp* gMainApp; const char* kAppSig = "application/x-vnd.Haiku-MediaPlayer"; static const char* kMediaServerSig = "application/x-vnd.Be.media-server"; @@ -45,9 +46,13 @@ MainApp::MainApp() : BApplication(kAppSig), fPlayerCount(0), - //fFirstWindow(NewWindow()), + fFirstWindow(NULL), fSettingsWindow(NULL), + fOpenFilePanel(NULL), + fSaveFilePanel(NULL), + fLastFilePanelFolder(), + fMediaServerRunning(false), fMediaAddOnServerRunning(false) { @@ -56,6 +61,8 @@ MainApp::~MainApp() { + delete fOpenFilePanel; + delete fSaveFilePanel; } @@ -63,7 +70,8 @@ MainApp::QuitRequested() { // Note: This needs to be done here, SettingsWindow::QuitRequested() - // returns "false" always. + // returns "false" always. (Standard BApplication quit procedure will + // hang otherwise.) if (fSettingsWindow && fSettingsWindow->Lock()) fSettingsWindow->Quit(); fSettingsWindow = NULL; @@ -76,7 +84,7 @@ MainApp::FirstWindow() { BAutolock _(this); - if (fFirstWindow) + if (fFirstWindow != NULL) return fFirstWindow; return NewWindow(); } @@ -85,13 +93,12 @@ BWindow* MainApp::NewWindow() { - BWindow* win; BAutolock _(this); fPlayerCount++; - win = new MainWin(); - if (!fFirstWindow) - fFirstWindow = win; - return win; + BWindow* window = new MainWin(); + if (fFirstWindow == NULL) + fFirstWindow = window; + return window; } @@ -130,7 +137,7 @@ void -MainApp::RefsReceived(BMessage *msg) +MainApp::RefsReceived(BMessage* message) { // The user dropped a file (or files) on this app's icon, // or double clicked a file that's handled by this app. @@ -142,14 +149,9 @@ // window. printf("MainApp::RefsReceived\n"); - entry_ref ref; - for (int i = 0; B_OK == msg->FindRef("refs", i, &ref); i++) { - BWindow *win; - win = NewWindow(); - BMessage m(B_REFS_RECEIVED); - m.AddRef("refs", &ref); - win->PostMessage(&m); - } + BWindow* window = NewWindow(); + if (window) + window->PostMessage(message); } @@ -245,6 +247,20 @@ _ShowSettingsWindow(); break; + case M_SHOW_OPEN_PANEL: + _ShowOpenFilePanel(message); + break; + case M_SHOW_SAVE_PANEL: + _ShowSaveFilePanel(message); + break; + + case M_OPEN_PANEL_RESULT: + _HandleOpenPanelResult(message); + break; + case M_SAVE_PANEL_RESULT: + _HandleSavePanelResult(message); + break; + default: BApplication::MessageReceived(message); break; @@ -259,6 +275,9 @@ } +// #pragma mark - + + void MainApp::_BroadcastMessage(const BMessage& _message) { @@ -272,19 +291,157 @@ void MainApp::_ShowSettingsWindow() { - if (fSettingsWindow->Lock()) { - if (fSettingsWindow->IsHidden()) - fSettingsWindow->Show(); - else - fSettingsWindow->Activate(); - fSettingsWindow->Unlock(); + BAutolock lock(fSettingsWindow); + if (!lock.IsLocked()) + return; + + // If the window is already showing, don't jerk the workspaces around, + // just pull it to the current one. + uint32 workspace = 1UL << (uint32)current_workspace(); + uint32 windowWorkspaces = fSettingsWindow->Workspaces(); + if ((windowWorkspaces & workspace) == 0) { + // window in a different workspace, reopen in current + fSettingsWindow->SetWorkspaces(workspace); } + + if (fSettingsWindow->IsHidden()) + fSettingsWindow->Show(); + else + fSettingsWindow->Activate(); } -// #pragma mark - +// #pragma mark - file panels +void +MainApp::_ShowOpenFilePanel(const BMessage* message) +{ + if (fOpenFilePanel == NULL) { + BMessenger target(this); + fOpenFilePanel = new BFilePanel(B_OPEN_PANEL, &target); + } + + _ShowFilePanel(fOpenFilePanel, M_OPEN_PANEL_RESULT, message, + "Open", "Open"); +} + + +void +MainApp::_ShowSaveFilePanel(const BMessage* message) +{ + if (fSaveFilePanel == NULL) { + BMessenger target(this); + fSaveFilePanel = new BFilePanel(B_SAVE_PANEL, &target); + } + + _ShowFilePanel(fSaveFilePanel, M_SAVE_PANEL_RESULT, message, + "Save", "Save"); +} + + +void +MainApp::_ShowFilePanel(BFilePanel* panel, uint32 command, + const BMessage* message, const char* defaultTitle, + const char* defaultLabel) +{ +// printf("_ShowFilePanel()\n"); +// message->PrintToStream(); + + BMessage panelMessage(command); + + if (message != NULL) { + BMessage targetMessage; + if (message->FindMessage("message", &targetMessage) == B_OK) + panelMessage.AddMessage("message", &targetMessage); + + BMessenger target; + if (message->FindMessenger("target", &target) == B_OK) + panelMessage.AddMessenger("target", target); + + const char* panelTitle; + if (message->FindString("title", &panelTitle) != B_OK) + panelTitle = defaultTitle; + { + BString finalPanelTitle = "MediaPlayer: "; + finalPanelTitle << panelTitle; + BAutolock lock(panel->Window()); + panel->Window()->SetTitle(finalPanelTitle.String()); + } + const char* buttonLabel; + if (message->FindString("label", &buttonLabel) != B_OK) + buttonLabel = defaultLabel; + panel->SetButtonLabel(B_DEFAULT_BUTTON, buttonLabel); + } + +// panelMessage.PrintToStream(); + panel->SetMessage(&panelMessage); + + if (fLastFilePanelFolder != entry_ref()) { + panel->SetPanelDirectory(&fLastFilePanelFolder); + } + + panel->Show(); +} + + +void +MainApp::_HandleOpenPanelResult(const BMessage* message) +{ + _HandleFilePanelResult(fOpenFilePanel, message); +} + + +void +MainApp::_HandleSavePanelResult(const BMessage* message) +{ + _HandleFilePanelResult(fSaveFilePanel, message); +} + + +void +MainApp::_HandleFilePanelResult(BFilePanel* panel, const BMessage* message) +{ +// printf("_HandleFilePanelResult()\n"); +// message->PrintToStream(); + + panel->GetPanelDirectory(&fLastFilePanelFolder); + + BMessage targetMessage; + if (message->FindMessage("message", &targetMessage) != B_OK) + targetMessage.what = message->what; + + BMessenger target; + if (message->FindMessenger("target", &target) != B_OK) { + if (targetMessage.what == M_OPEN_PANEL_RESULT + || targetMessage.what == M_SAVE_PANEL_RESULT) { + // prevent endless message cycle + return; + } + // send result message to ourselves + target = BMessenger(this); + } + + // copy the important contents of the message + // save panel + entry_ref directory; + if (message->FindRef("directory", &directory) == B_OK) + targetMessage.AddRef("directory", &directory); + const char* name; + if (message->FindString("name", &name) == B_OK) + targetMessage.AddString("name", name); + // open panel + entry_ref ref; + for (int32 i = 0; message->FindRef("refs", i, &ref) == B_OK; i++) + targetMessage.AddRef("refs", &ref); + + target.SendMessage(&targetMessage); +} + + +// #pragma mark - main + + int main() { Modified: haiku/trunk/src/apps/mediaplayer/MainApp.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.h 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/MainApp.h 2008-10-10 18:55:06 UTC (rev 27955) @@ -22,18 +22,36 @@ #define __MAIN_APP_H #include +#include + #include "MainWin.h" + enum { M_PLAYER_QUIT = 'plqt', M_SETTINGS = 'stng', + M_SHOW_OPEN_PANEL = 'swop', + M_SHOW_SAVE_PANEL = 'swsp', + // "target" - This BMessenger will be sent the result message. + // "message" - This message will be sent back to the target, with + // the additional fields that a BFilePanel provides. + // If no result message is specified, the constants below + // will be used. + // "title" - String that will be used to name the panel window. + // "label" - String that will be used to name the Default button. + + M_OPEN_PANEL_RESULT = 'oprs', + M_SAVE_PANEL_RESULT = 'sprs', + M_MEDIA_SERVER_STARTED = 'msst', M_MEDIA_SERVER_QUIT = 'msqt' }; +class BFilePanel; class SettingsWindow; + class MainApp : public BApplication { public: MainApp(); @@ -55,10 +73,26 @@ void _ShowSettingsWindow(); void _BroadcastMessage(const BMessage& message); + void _ShowOpenFilePanel(const BMessage* message); + void _ShowSaveFilePanel(const BMessage* message); + void _ShowFilePanel(BFilePanel* panel, + uint32 command, const BMessage* message, + const char* defaultTitle, + const char* defaultLabel); + + void _HandleOpenPanelResult(const BMessage* message); + void _HandleSavePanelResult(const BMessage* message); + void _HandleFilePanelResult(BFilePanel* panel, + const BMessage* message); + int32 fPlayerCount; BWindow* fFirstWindow; SettingsWindow* fSettingsWindow; + BFilePanel* fOpenFilePanel; + BFilePanel* fSaveFilePanel; + entry_ref fLastFilePanelFolder; + bool fMediaServerRunning; bool fMediaAddOnServerRunning; }; Modified: haiku/trunk/src/apps/mediaplayer/MainWin.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainWin.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/MainWin.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -101,7 +101,6 @@ MainWin::MainWin() : BWindow(BRect(100,100,400,300), NAME, B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS /* | B_WILL_ACCEPT_FIRST_CLICK */), - fFilePanel(NULL), fInfoWin(NULL), fPlaylistWindow(NULL), fHasFile(false), @@ -218,7 +217,6 @@ fPlaylistWindow->Quit(); delete fPlaylist; - delete fFilePanel; // quit the Controller looper thread thread_id controllerThread = fController->Thread(); @@ -469,14 +467,17 @@ case M_FILE_NEWPLAYER: gMainApp->NewWindow(); break; - case M_FILE_OPEN: - if (!fFilePanel) { - fFilePanel = new BFilePanel(); - fFilePanel->SetTarget(BMessenger(0, this)); - fFilePanel->SetPanelDirectory("/boot/home/"); - } - fFilePanel->Show(); + case M_FILE_OPEN: { + BMessenger target(this); + BMessage result(B_REFS_RECEIVED); + BMessage appMessage(M_SHOW_OPEN_PANEL); + appMessage.AddMessenger("target", target); + appMessage.AddMessage("message", &result); + appMessage.AddString("title", "Open Clips"); + appMessage.AddString("label", "Open"); + be_app->PostMessage(&appMessage); break; + } case M_FILE_INFO: ShowFileInfo(); break; Modified: haiku/trunk/src/apps/mediaplayer/MainWin.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainWin.h 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/MainWin.h 2008-10-10 18:55:06 UTC (rev 27955) @@ -25,7 +25,6 @@ #include #include #include -#include #include "Controller.h" #include "ControllerView.h" @@ -101,7 +100,6 @@ BMenuBar* fMenuBar; BView* fBackground; VideoView* fVideoView; - BFilePanel* fFilePanel; ControllerView* fControls; InfoWin* fInfoWin; PlaylistWindow* fPlaylistWindow; Modified: haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -11,6 +11,7 @@ #include #include +#include #include #include "Playlist.h" @@ -39,8 +40,12 @@ temp.AppendRefs(refsMessage); fNewCount = temp.CountItems(); - if (fNewCount <= 0) + if (fNewCount <= 0) { + BAlert* alert = new BAlert("Nothing to Play", "None of the files " + "you wanted to play appear to be media files.", "Ok"); + alert->Go(NULL); return; + } fNewRefs = new (nothrow) entry_ref[fNewCount]; if (!fNewRefs) Modified: haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -75,7 +75,7 @@ status_t -Playlist::UnArchive(const BMessage* archive) +Playlist::Unarchive(const BMessage* archive) { if (archive == NULL) return B_BAD_VALUE; @@ -118,6 +118,61 @@ } +static const uint32 kPlaylistMagicBytes = 'MPPL'; +static const char* kTextPlaylistMimeString = "text/x-playlist"; +static const char* kBinaryPlaylistMimeString + = "application/x-vnd.haiku-playlist"; + +status_t +Playlist::Unflatten(BDataIO* stream) +{ + if (stream == NULL) + return B_BAD_VALUE; + + uint32 magicBytes; + ssize_t read = stream->Read(&magicBytes, 4); + if (read != 4) { + if (read < 0) + return (status_t)read; + return B_IO_ERROR; + } + + if (B_LENDIAN_TO_HOST_INT32(magicBytes) != kPlaylistMagicBytes) + return B_BAD_VALUE; + + BMessage archive; + status_t ret = archive.Unflatten(stream); + if (ret != B_OK) + return ret; + + + return Unarchive(&archive); +} + + +status_t +Playlist::Flatten(BDataIO* stream) const +{ + if (stream == NULL) + return B_BAD_VALUE; + + BMessage archive; + status_t ret = Archive(&archive); + if (ret != B_OK) + return ret; + + uint32 magicBytes = B_HOST_TO_LENDIAN_INT32(kPlaylistMagicBytes); + ssize_t written = stream->Write(&magicBytes, 4); + if (written != 4) { + if (written < 0) + return (status_t)written; + return B_IO_ERROR; + } + + return archive.Flatten(stream); +} + + // #pragma mark - list access @@ -386,7 +441,7 @@ if (_IsMediaFile(mimeString)) { //printf("Adding\n"); playlist->AddRef(ref); - } else if (_IsPlaylist(mimeString)) { + } else if (_IsTextPlaylist(mimeString)) { //printf("RunPlaylist thing\n"); BFile file(&ref, B_READ_ONLY); FileReadWrite lineReader(&file); @@ -408,6 +463,11 @@ } else printf("Error - No File Found in playlist\n"); } + } else if (_IsBinaryPlaylist(mimeString)) { + BFile file(&ref, B_READ_ONLY); + Playlist temp; + if (temp.Unflatten(&file) == B_OK) + playlist->AdoptPlaylist(temp, playlist->CountItems()); } else printf("MIME Type = %s\n", mimeString.String()); } @@ -431,30 +491,6 @@ } -/*static*/ void -Playlist::_AddPlayListFileToPlayList(const entry_ref& ref, Playlist* playlist) -{ - - BFile file(&ref, B_READ_ONLY); - FileReadWrite lineReader(&file); - - BString str; - while (lineReader.Next(str)) { - BPath path = BPath(str.String()); - entry_ref refPath; - status_t err; - if ((err = get_ref_for_path(path.Path(), &refPath)) == B_OK) { - AppendToPlaylistRecursive(refPath, playlist); - } else - printf("Error - %s: [%lx]\n", strerror(err), (int32) err); - } - /* - Read line for x to the end of file (while?) - make a enty_ref and call AppendToPlaylistRecursive(with new entry, playlist) - */ -} - - /*static*/ bool Playlist::_IsMediaFile(const BString& mimeString) { @@ -472,12 +508,19 @@ /*static*/ bool -Playlist::_IsPlaylist(const BString& mimeString) +Playlist::_IsTextPlaylist(const BString& mimeString) { - return mimeString.Compare("text/x-playlist") == 0; + return mimeString.Compare(kTextPlaylistMimeString) == 0; } +/*static*/ bool +Playlist::_IsBinaryPlaylist(const BString& mimeString) +{ + return mimeString.Compare(kBinaryPlaylistMimeString) == 0; +} + + /*static*/ BString Playlist::_MIMEString(const entry_ref* ref) { Modified: haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h 2008-10-10 18:55:06 UTC (rev 27955) @@ -26,6 +26,7 @@ #include #include +class BDataIO; class BMessage; class BString; @@ -49,10 +50,13 @@ Playlist(); ~Playlist(); // archiving - status_t UnArchive(const BMessage* archive); + status_t Unarchive(const BMessage* archive); status_t Archive(BMessage* into) const; + status_t Unflatten(BDataIO* stream); + status_t Flatten(BDataIO* stream) const; + // list functionality void MakeEmpty(); int32 CountItems() const; @@ -91,10 +95,9 @@ private: static int playlist_cmp(const void* p1, const void* p2); static bool _IsMediaFile(const BString& mimeString); - static bool _IsPlaylist(const BString& mimeString); + static bool _IsTextPlaylist(const BString& mimeString); + static bool _IsBinaryPlaylist(const BString& mimeString); static BString _MIMEString(const entry_ref* entry); - static void _AddPlayListFileToPlayList(const entry_ref& ref, - Playlist* playlist); void _NotifyRefAdded(const entry_ref& ref, int32 index) const; void _NotifyRefRemoved(int32 index) const; Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -1,5 +1,5 @@ /* - * Copyright 2007, Haiku. All rights reserved. + * Copyright 2007-2008, Haiku. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -11,12 +11,17 @@ #include +#include #include +#include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -25,6 +30,7 @@ #include #include "CommandStack.h" +#include "MainApp.h" #include "PlaylistListView.h" #include "RWLocker.h" @@ -34,6 +40,7 @@ // file M_PLAYLIST_OPEN = 'open', M_PLAYLIST_SAVE = 'save', + M_PLAYLIST_SAVE_RESULT = 'psrs', // edit M_PLAYLIST_EMPTY = 'emty', @@ -45,12 +52,11 @@ PlaylistWindow::PlaylistWindow(BRect frame, Playlist* playlist, Controller* controller) : BWindow(frame, "Playlist", B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, - B_ASYNCHRONOUS_CONTROLS) - , fOpenPanel(NULL) - , fSavePanel(NULL) - , fLocker(new RWLocker("command stack lock")) - , fCommandStack(new CommandStack(fLocker)) - , fCommandStackListener(this) + B_ASYNCHRONOUS_CONTROLS), + fPlaylist(playlist), + fLocker(new RWLocker("command stack lock")), + fCommandStack(new CommandStack(fLocker)), + fCommandStackListener(this) { frame = Bounds(); @@ -89,9 +95,6 @@ fCommandStack->RemoveListener(&fCommandStackListener); delete fCommandStack; delete fLocker; - - delete fOpenPanel; - delete fSavePanel; } @@ -138,20 +141,32 @@ break; } - case M_PLAYLIST_SAVE: - if (!fSavePanel) - fSavePanel = new BFilePanel(B_SAVE_PANEL); - fSavePanel->Show(); + case M_PLAYLIST_OPEN: { + BMessenger target(this); + BMessage result(B_REFS_RECEIVED); + BMessage appMessage(M_SHOW_OPEN_PANEL); + appMessage.AddMessenger("target", target); + appMessage.AddMessage("message", &result); + appMessage.AddString("title", "Open Playlist"); + appMessage.AddString("label", "Open"); + be_app->PostMessage(&appMessage); break; - case B_SAVE_REQUESTED: - printf("We are saving\n"); - //Use fListView and have a SaveToFile? + } + case M_PLAYLIST_SAVE: { + BMessenger target(this); + BMessage result(M_PLAYLIST_SAVE_RESULT); + BMessage appMessage(M_SHOW_SAVE_PANEL); + appMessage.AddMessenger("target", target); + appMessage.AddMessage("message", &result); + appMessage.AddString("title", "Save Playlist"); + appMessage.AddString("label", "Save"); + be_app->PostMessage(&appMessage); break; - case M_PLAYLIST_OPEN: - if (!fOpenPanel) - fOpenPanel = new BFilePanel(B_OPEN_PANEL); - fOpenPanel->Show(); + } + case M_PLAYLIST_SAVE_RESULT: { + _SavePlaylist(message); break; + } case M_PLAYLIST_EMPTY: fListView->RemoveAll(); @@ -177,11 +192,11 @@ BMenuBar* menuBar = new BMenuBar(frame, "main menu"); BMenu* fileMenu = new BMenu("Playlist"); menuBar->AddItem(fileMenu); -// fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS, -// new BMessage(M_PLAYLIST_OPEN), 'O')); -// fileMenu->AddItem(new BMenuItem("Save"B_UTF8_ELLIPSIS, -// new BMessage(M_PLAYLIST_SAVE), 'S')); -// fileMenu->AddSeparatorItem(); + fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS, + new BMessage(M_PLAYLIST_OPEN), 'O')); + fileMenu->AddItem(new BMenuItem("Save"B_UTF8_ELLIPSIS, + new BMessage(M_PLAYLIST_SAVE), 'S')); + fileMenu->AddSeparatorItem(); fileMenu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W')); @@ -207,7 +222,6 @@ } -// _ObjectChanged void PlaylistWindow::_ObjectChanged(const Notifier* object) { @@ -230,3 +244,108 @@ } } + +static void +display_save_alert(const char* message) +{ + BAlert* alert = new BAlert("Save Error", message, "Ok", NULL, NULL, + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->Go(NULL); +} + + +static void +display_save_alert(status_t error) +{ + BString errorMessage("Saving the playlist failed.\n\nError: "); + errorMessage << strerror(error); + display_save_alert(errorMessage.String()); +} + + +void +PlaylistWindow::_SavePlaylist(const BMessage* message) +{ + entry_ref ref; + const char* name; + if (message->FindRef("directory", &ref) != B_OK + || message->FindString("name", &name) != B_OK) { + display_save_alert("Internal error (malformed message). " + "Saving the Playlist failed."); + return; + } + + BString tempName(name); + tempName << system_time(); + + BPath origPath(&ref); + BPath tempPath(&ref); + if (origPath.InitCheck() != B_OK || tempPath.InitCheck() != B_OK + || origPath.Append(name) != B_OK + || tempPath.Append(tempName.String()) != B_OK) { + display_save_alert("Internal error (out of memory). " + "Saving the Playlist failed."); + return; + } + + BEntry origEntry(origPath.Path()); + BEntry tempEntry(tempPath.Path()); + if (origEntry.InitCheck() != B_OK || tempEntry.InitCheck() != B_OK) { + display_save_alert("Internal error (out of memory). " + "Saving the Playlist failed."); + return; + } + + class TempEntryRemover { + public: + TempEntryRemover(BEntry* entry) + : fEntry(entry) + { + } + ~TempEntryRemover() + { + if (fEntry) + fEntry->Remove(); + } + void Detach() + { + fEntry = NULL; + } + private: + BEntry* fEntry; + } remover(&tempEntry); + + BFile file(&tempEntry, B_CREATE_FILE | B_ERASE_FILE | B_WRITE_ONLY); + if (file.InitCheck() != B_OK) { + BString errorMessage("Saving the playlist failed:\n\nError: "); + errorMessage << strerror(file.InitCheck()); + display_save_alert(errorMessage.String()); + return; + } + + AutoLocker lock(fPlaylist); + if (!lock.IsLocked()) { + display_save_alert("Internal error (locking failed). " + "Saving the Playlist failed."); + return; + } + + status_t ret = fPlaylist->Flatten(&file); + if (ret != B_OK) { + display_save_alert(ret); + return; + } + lock.Unlock(); + + if (origEntry.Exists()) { + // TODO: copy attributes + } + + // clobber original entry, if it exists + tempEntry.Rename(name, true); + remover.Detach(); + + BNodeInfo info(&file); + info.SetType("application/x-vnd.haiku-playlist"); +} + Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h 2008-10-10 18:55:06 UTC (rev 27955) @@ -39,6 +39,7 @@ private: void _CreateMenu(BRect& frame); void _ObjectChanged(const Notifier* object); + void _SavePlaylist(const BMessage* message); Playlist* fPlaylist; PlaylistListView* fListView; @@ -47,9 +48,6 @@ BMenuItem* fUndoMI; BMenuItem* fRedoMI; - BFilePanel* fOpenPanel; - BFilePanel* fSavePanel; - RWLocker* fLocker; CommandStack* fCommandStack; ListenerAdapter fCommandStackListener; Modified: haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp 2008-10-10 18:51:15 UTC (rev 27954) +++ haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp 2008-10-10 18:55:06 UTC (rev 27955) @@ -20,7 +20,6 @@ #ifdef __HAIKU__ # include -# include # include # include #endif From julun at mail.berlios.de Fri Oct 10 21:07:20 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 10 Oct 2008 21:07:20 +0200 Subject: [Haiku-commits] r27956 - haiku/trunk/src/apps/showimage Message-ID: <200810101907.m9AJ7KlE024041@sheep.berlios.de> Author: julun Date: 2008-10-10 21:07:20 +0200 (Fri, 10 Oct 2008) New Revision: 27956 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27956&view=rev Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp Log: * cleanup Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp =================================================================== --- haiku/trunk/src/apps/showimage/ShowImageView.cpp 2008-10-10 18:55:06 UTC (rev 27955) +++ haiku/trunk/src/apps/showimage/ShowImageView.cpp 2008-10-10 19:07:20 UTC (rev 27956) @@ -71,7 +71,7 @@ #define SHOW_IMAGE_ORIENTATION_ATTRIBUTE "ShowImage:orientation" const rgb_color kBorderColor = { 0, 0, 0, 255 }; -enum ShowImageView::image_orientation +enum ShowImageView::image_orientation ShowImageView::fTransformation[ImageProcessor::kNumberOfAffineTransformations][kNumberOfOrientations] = { // rotate 90? {k90, k180, k270, k0, k270V, k0V, k90V, k0H}, @@ -181,7 +181,7 @@ { ShowImageSettings* settings; settings = my_app->Settings(); - + InitPatterns(); fDither = BScreen().ColorSpace() == B_CMAP8; fBitmap = NULL; @@ -231,7 +231,7 @@ //! Use patterns to simulate marching ants for selection -void +void ShowImageView::InitPatterns() { uchar p; @@ -257,21 +257,21 @@ int i; uchar p; bool set; - + // rotate up p = fPatternUp.data[0]; for (i = 0; i <= 6; i ++) { - fPatternUp.data[i] = fPatternUp.data[i+1]; + fPatternUp.data[i] = fPatternUp.data[i+1]; } fPatternUp.data[7] = p; - + // rotate down p = fPatternDown.data[7]; for (i = 7; i >= 1; i --) { fPatternDown.data[i] = fPatternDown.data[i-1]; } fPatternDown.data[0] = p; - + // rotate to left p = fPatternLeft.data[0]; set = (p & 0x80) != 0; @@ -279,7 +279,7 @@ p &= 0xfe; if (set) p |= 1; memset(fPatternLeft.data, p, 8); - + // rotate to right p = fPatternRight.data[0]; set = (p & 1) != 0; @@ -300,7 +300,7 @@ ShowImageView::Pulse() { // animate marching ants - if (HasSelection() && fAnimateSelection && fIsActiveWin) { + if (HasSelection() && fAnimateSelection && fIsActiveWin) { RotatePatterns(); DrawSelectionBox(); } @@ -331,7 +331,7 @@ fScalingCountDown --; } } -#endif +#endif } @@ -348,7 +348,7 @@ BTranslatorRoster *roster = BTranslatorRoster::Default(); if (!roster) return false; - + BMessage ioExtension; if (ioExtension.AddInt32("/documentIndex", fDocumentIndex) != B_OK) return false; @@ -358,7 +358,7 @@ if (roster->Identify(&file, &ioExtension, &info, 0, NULL, B_TRANSLATOR_BITMAP) != B_OK) return false; - + return true; } @@ -387,7 +387,7 @@ //! send message to parent about new image -void +void ShowImageView::Notify() { BMessage msg(MSG_UPDATE_STATUS); @@ -404,7 +404,7 @@ } -void +void ShowImageView::UpdateStatusText() { BMessage msg(MSG_UPDATE_STATUS_TEXT); @@ -417,7 +417,7 @@ fSelectionRect.Height()+1.0); status_to_send << size; } - + msg.AddString("status", status_to_send.String()); SendMessageToWindow(&msg); } @@ -520,7 +520,7 @@ return B_ERROR; // Now that I've successfully loaded the new bitmap, - // I can be sure it is safe to delete the old one, + // I can be sure it is safe to delete the old one, // and clear everything fUndo.Clear(); SetHasSelection(false); @@ -587,7 +587,7 @@ fDocumentCount = 1; fImageType = info.name; - + GetPath(&fCaption); if (fDocumentCount > 1) fCaption << ", " << fDocumentIndex << "/" << fDocumentCount; @@ -625,7 +625,7 @@ BBitmap *newBitmap = NULL; if (outstream.DetachBitmap(&newBitmap) != B_OK) return B_ERROR; - + return PasteBitmap(newBitmap, point); } @@ -641,7 +641,7 @@ } -void +void ShowImageView::SetShowCaption(bool show) { if (fShowCaption != show) { @@ -764,7 +764,7 @@ if (width == 0 || height == 0) return rect; - fShrinkOrZoomToBounds = (fShrinkToBounds && + fShrinkOrZoomToBounds = (fShrinkToBounds && (bitmapWidth >= width || bitmapHeight >= height)) || (fZoomToBounds && (bitmapWidth < width && bitmapHeight < height)); if (fShrinkOrZoomToBounds) { @@ -784,7 +784,7 @@ } } else { // zoom image - rect.right = floorf(bitmapWidth * fZoom) - 1; + rect.right = floorf(bitmapWidth * fZoom) - 1; rect.bottom = floorf(bitmapHeight * fZoom) - 1; // update the bitmap size after the zoom @@ -885,7 +885,7 @@ BFont font; BPoint position; BRect rect; - LayoutCaption(font, position, rect); + LayoutCaption(font, position, rect); PushState(); @@ -911,7 +911,7 @@ BFont font; BPoint pos; BRect rect; - LayoutCaption(font, pos, rect); + LayoutCaption(font, pos, rect); // draw over portion of image where caption is located BRegion clip(rect); @@ -1047,7 +1047,7 @@ BBitmap* ShowImageView::CopyFromRect(BRect srcRect) -{ +{ BRect rect(0, 0, srcRect.Width(), srcRect.Height()); BView view(rect, NULL, B_FOLLOW_NONE, B_WILL_DRAW); BBitmap *bitmap = new(nothrow) BBitmap(rect, fBitmap->ColorSpace(), true); @@ -1079,7 +1079,7 @@ BRect rect(0, 0, fSelectionRect.Width(), fSelectionRect.Height()); if (!imageSize) { // scale image to view size - rect.right = floorf((rect.right + 1.0) * fZoom - 1.0); + rect.right = floorf((rect.right + 1.0) * fZoom - 1.0); rect.bottom = floorf((rect.bottom + 1.0) * fZoom - 1.0); } BView view(rect, NULL, B_FOLLOW_NONE, B_WILL_DRAW); @@ -1120,7 +1120,7 @@ translator_info *outInfo; bool found = false; - int32 outNumInfo; + int32 outNumInfo; if (roster->GetTranslators(&stream, NULL, &outInfo, &outNumInfo) == B_OK) { for (int32 i = 0; i < outNumInfo; i++) { const translation_format *fmts; @@ -1129,8 +1129,8 @@ for (int32 j = 0; j < num_fmts; j++) { if (strcmp(fmts[j].MIME, "image/x-be-bitmap") != 0) { // needed to send data in message - msg->AddString("be:types", fmts[j].MIME); - // needed to pass data via file + msg->AddString("be:types", fmts[j].MIME); + // needed to pass data via file msg->AddString("be:filetypes", fmts[j].MIME); msg->AddString("be:type_descriptions", fmts[j].name); } @@ -1156,7 +1156,7 @@ // fill the drag message BMessage drag(B_SIMPLE_DATA); drag.AddInt32("be:actions", B_COPY_TARGET); - drag.AddString("be:clip_name", "Bitmap Clip"); + drag.AddString("be:clip_name", "Bitmap Clip"); // ShowImage specific fields drag.AddPoint("be:_source_point", sourcePoint); drag.AddRect("be:_frame", fSelectionRect); @@ -1199,10 +1199,10 @@ return false; BBitmapStream stream(bitmap); - + translator_info *outInfo; int32 outNumInfo; - if (roster->GetTranslators(&stream, NULL, &outInfo, &outNumInfo) == B_OK) { + if (roster->GetTranslators(&stream, NULL, &outInfo, &outNumInfo) == B_OK) { for (int32 i = 0; i < outNumInfo; i++) { const translation_format *fmts; int32 num_fmts; @@ -1210,7 +1210,7 @@ for (int32 j = 0; j < num_fmts; j++) { if (strcmp(fmts[j].MIME, type) == 0) { *format = fmts[j]; - found = true; + found = true; break; } } @@ -1247,7 +1247,7 @@ BNodeInfo info(&file); if (info.InitCheck() == B_OK) info.SetType(format->MIME); - + loop = false; // break out of loop gracefully (indicates no errors) } @@ -1343,9 +1343,9 @@ GetMouse(&point, &buttons); if (buttons == B_PRIMARY_MOUSE_BUTTON) { if ((modifiers() & B_CONTROL_KEY) != 0) { - buttons = B_SECONDARY_MOUSE_BUTTON; // simulate second button + buttons = B_SECONDARY_MOUSE_BUTTON; // simulate second button } else if ((modifiers() & B_SHIFT_KEY) != 0) { - buttons = B_TERTIARY_MOUSE_BUTTON; // simulate third button + buttons = B_TERTIARY_MOUSE_BUTTON; // simulate third button } } return buttons; @@ -1378,7 +1378,7 @@ if (srcBits.bottom > fBitmap->Bounds().bottom) srcBits.bottom = srcBits.top + destRect.Height(); else - srcBits.bottom = merge->Bounds().bottom; + srcBits.bottom = merge->Bounds().bottom; } @@ -1405,14 +1405,14 @@ BRect srcBits, destRect; GetMergeRects(merge, selection, srcBits, destRect); view.DrawBitmap(merge, srcBits, destRect); - + view.Sync(); bitmap->RemoveChild(&view); bitmap->Unlock(); - + DeleteBitmap(); fBitmap = bitmap; - + SendMessageToWindow(MSG_MODIFIED); } else delete bitmap; @@ -1424,7 +1424,7 @@ { if (!HasSelection()) return; - + if (!fSelBitmap) { // Even though the merge will not change // the background image, I still need to save @@ -1448,7 +1448,7 @@ point = ViewToImage(position); buttons = GetMouseButtons(); - + if (HasSelection() && fSelectionRect.Contains(point) && (buttons & (B_PRIMARY_MOUSE_BUTTON | B_SECONDARY_MOUSE_BUTTON))) { if (!fSelBitmap) @@ -1456,11 +1456,11 @@ BPoint sourcePoint = point; BeginDrag(sourcePoint); - + while (buttons) { // Keep reading mouse movement until // the user lets up on all mouse buttons - GetMouse(&point, &buttons); + GetMouse(&point, &buttons); snooze(25 * 1000); // sleep for 25 milliseconds to minimize CPU usage during loop } @@ -1470,11 +1470,11 @@ // (Some of the selection may be in the border area, which can be OK) BPoint last, diff; last = ViewToImage(point); - diff = last - sourcePoint; - + diff = last - sourcePoint; + BRect newSelection = fSelectionRect; newSelection.OffsetBy(diff); - + if (fBitmap->Bounds().Intersects(newSelection)) { // Do not accept the new selection box location // if it does not intersect with the bitmap rectangle @@ -1486,7 +1486,7 @@ AnimateSelection(true); } else if (buttons == B_PRIMARY_MOUSE_BUTTON) { MergeSelection(); - // If there is an existing selection, + // If there is an existing selection, // Make it part of the background image // begin new selection @@ -1497,7 +1497,7 @@ fFirstPoint = point; fCopyFromRect.Set(point.x, point.y, point.x, point.y); fSelectionRect = fCopyFromRect; - Invalidate(); + Invalidate(); } else if (buttons == B_SECONDARY_MOUSE_BUTTON) { ShowPopUpMenu(ConvertToScreen(position)); } else if (buttons == B_TERTIARY_MOUSE_BUTTON) { @@ -1641,16 +1641,16 @@ } switch (*bytes) { - case B_DOWN_ARROW: + case B_DOWN_ARROW: ScrollRestrictedBy(0, 10); break; - case B_UP_ARROW: + case B_UP_ARROW: ScrollRestrictedBy(0, -10); break; - case B_LEFT_ARROW: + case B_LEFT_ARROW: ScrollRestrictedBy(-10, 0); break; - case B_RIGHT_ARROW: + case B_RIGHT_ARROW: ScrollRestrictedBy(10, 0); break; case B_ENTER: @@ -1685,7 +1685,7 @@ BMessenger tracker(kTrackerSignature); if (tracker.SendMessage(&trash) == B_OK) if (!NextFile()) { - // This is the last (or only file) in this directory, + // This is the last (or only file) in this directory, // close the window SendMessageToWindow(B_QUIT_REQUESTED); } @@ -1698,7 +1698,7 @@ case '-': ZoomOut(); break; - } + } } @@ -1713,7 +1713,7 @@ const float kscrollBy = 40; float dy, dx; float x, y; - x = 0; y = 0; + x = 0; y = 0; if (msg->FindFloat("be:wheel_delta_x", &dx) == B_OK) x = dx * kscrollBy; if (msg->FindFloat("be:wheel_delta_y", &dy) == B_OK) @@ -1804,14 +1804,14 @@ // adjust drop point before scaling is factored in point = ConvertFromScreen(point); point = ViewToImage(point); - + PasteBitmap(bitmap, point); } } } } break; - + case B_COPY_TARGET: HandleDrop(message); break; @@ -1837,7 +1837,7 @@ ShowImageView::FixupScrollBar(orientation o, float bitmapLength, float viewLength) { float prop, range; - BScrollBar *psb; + BScrollBar *psb; psb = ScrollBar(o); if (psb) { @@ -1851,7 +1851,7 @@ } psb->SetRange(0, range); psb->SetProportion(prop); - psb->SetSteps(10, 100); + psb->SetSteps(10, 100); } } @@ -1864,7 +1864,7 @@ rctbitmap = AlignBitmap(); rctbitmap.OffsetTo(0, 0); } - + FixupScrollBar(B_HORIZONTAL, rctbitmap.Width() + 2 * PEN_SIZE, rctview.Width()); FixupScrollBar(B_VERTICAL, rctbitmap.Height() + 2 * PEN_SIZE, rctview.Height()); } @@ -1890,13 +1890,13 @@ int32 undoType = fUndo.GetType(); if (undoType != UNDO_UNDO && undoType != UNDO_REDO) return; - + // backup current selection BRect undoneSelRect; BBitmap *undoneSelection; undoneSelRect = fSelectionRect; undoneSelection = CopySelection(); - + if (undoType == UNDO_UNDO) { BBitmap *undoRestore; undoRestore = fUndo.GetRestoreBitmap(); @@ -1938,17 +1938,17 @@ if (bitmap->Lock()) { bitmap->AddChild(&view); view.DrawBitmap(fBitmap, fBitmap->Bounds()); - + view.FillRect(rect, B_SOLID_LOW); // draw white rect - + view.Sync(); bitmap->RemoveChild(&view); bitmap->Unlock(); - + DeleteBitmap(); fBitmap = bitmap; - + SendMessageToWindow(MSG_MODIFIED); } else delete bitmap; @@ -2010,20 +2010,20 @@ // but only if the resulting selection rectangle // intersects with the background bitmap rectangle fSelectionRect = offsetRect; - + Invalidate(); - + return B_OK; } - + return B_ERROR; } void ShowImageView::Paste() -{ - if (be_clipboard->Lock()) { +{ + if (be_clipboard->Lock()) { BMessage *pclip; if ((pclip = be_clipboard->Data()) != NULL) { BPoint point(0, 0); @@ -2033,7 +2033,7 @@ PasteBitmap(pbits, point); } - be_clipboard->Unlock(); + be_clipboard->Unlock(); } } @@ -2064,7 +2064,7 @@ fHasSelection = bHasSelection; UpdateStatusText(); - + BMessage msg(MSG_SELECTION); msg.AddBool("has_selection", fHasSelection); SendMessageToWindow(&msg); @@ -2142,7 +2142,7 @@ } -int +int ShowImageView::CompareEntries(const void* a, const void* b) { entry_ref *r1, *r2; @@ -2168,13 +2168,13 @@ const int32 n = entries->CountItems(); for (int32 i = 0; i < n; i ++) { entry_ref* ref = (entry_ref*)entries->ItemAt(i); - delete ref; + delete ref; } entries->MakeEmpty(); } -void +void ShowImageView::SetTrackerSelectionToCurrent() { BMessage setsel(B_SET_PROPERTY); @@ -2207,15 +2207,15 @@ entries.AddItem(new entry_ref(entry)); } } - + entries.SortItems(CompareEntries); - + cur = entries.IndexOf(in_current); ASSERT(cur >= 0); // remove it so FreeEntries() does not delete it entries.RemoveItem(in_current); - + if (next) { // find the next image in the list if (rewind) cur = 0; // start with first @@ -2258,7 +2258,7 @@ // image is found. // entry_ref nextRef = *in_current; - bool foundRef = false; + bool foundRef = false; while (!foundRef) { BMessage request(B_GET_PROPERTY); @@ -2277,16 +2277,16 @@ else spc.AddRef("data", &nextRef); request.AddSpecifier(&spc); - + BMessage reply; if (fTrackerMessenger.SendMessage(&request, &reply) != B_OK) return FindNextImageByDir(in_current, ref, next, rewind);; if (reply.FindRef("result", &nextRef) != B_OK) return FindNextImageByDir(in_current, ref, next, rewind);; - + if (IsImage(&nextRef)) foundRef = true; - + rewind = false; // stop asking for the first ref in the directory } @@ -2422,7 +2422,7 @@ void -ShowImageView::DoImageOperation(ImageProcessor::operation op, bool quiet) +ShowImageView::DoImageOperation(ImageProcessor::operation op, bool quiet) { BMessenger msgr; ImageProcessor imageProcessor(op, fBitmap, msgr, 0); @@ -2430,7 +2430,7 @@ BBitmap* bm = imageProcessor.DetachBitmap(); if (bm == NULL) { // operation failed - return; + return; } // update orientation state @@ -2459,13 +2459,13 @@ // set new bitmap DeleteBitmap(); - fBitmap = bm; + fBitmap = bm; if (!quiet) { // remove selection SetHasSelection(false); Notify(); - } + } } @@ -2490,7 +2490,7 @@ void -ShowImageView::Flip(bool vertical) +ShowImageView::Flip(bool vertical) { if (vertical) { UserDoImageOperation(ImageProcessor::kFlipLeftToRight); @@ -2514,17 +2514,17 @@ void ShowImageView::ResizeImage(int w, int h) { - if (fBitmap == NULL || w < 1 || h < 1) + if (fBitmap == NULL || w < 1 || h < 1) return; - + Scaler scaler(fBitmap, BRect(0, 0, w-1, h-1), BMessenger(), 0, false); scaler.Start(false); BBitmap* scaled = scaler.DetachBitmap(); if (scaled == NULL) { // operation failed - return; + return; } - + // remove selection SetHasSelection(false); fUndo.Clear(); @@ -2591,7 +2591,7 @@ } } - // set icon + // set icon BNode node(&fCurrentRef); BNodeInfo info(&node); info.SetIcon(clear ? NULL : &icon, which); @@ -2621,7 +2621,7 @@ } -void +void ShowImageView::WindowActivated(bool active) { fIsActiveWin = active; From julun at mail.berlios.de Fri Oct 10 21:08:58 2008 From: julun at mail.berlios.de (julun at BerliOS) Date: Fri, 10 Oct 2008 21:08:58 +0200 Subject: [Haiku-commits] r27957 - haiku/trunk/src/apps/showimage Message-ID: <200810101908.m9AJ8weh024217@sheep.berlios.de> Author: julun Date: 2008-10-10 21:08:57 +0200 (Fri, 10 Oct 2008) New Revision: 27957 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27957&view=rev Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp Log: * traverse the entry so that symlinks to files can be opened as well Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp =================================================================== --- haiku/trunk/src/apps/showimage/ShowImageView.cpp 2008-10-10 19:07:20 UTC (rev 27956) +++ haiku/trunk/src/apps/showimage/ShowImageView.cpp 2008-10-10 19:08:57 UTC (rev 27957) @@ -92,7 +92,7 @@ static bool entry_ref_is_file(const entry_ref *ref) { - BEntry entry(ref); + BEntry entry(ref, true); if (entry.InitCheck() != B_OK) return false; From stippi at mail.berlios.de Fri Oct 10 21:14:20 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Fri, 10 Oct 2008 21:14:20 +0200 Subject: [Haiku-commits] r27958 - in haiku/trunk: data/artwork/icons src/servers/mail Message-ID: <200810101914.m9AJEKau024853@sheep.berlios.de> Author: stippi Date: 2008-10-10 21:14:20 +0200 (Fri, 10 Oct 2008) New Revision: 27958 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27958&view=rev Added: haiku/trunk/data/artwork/icons/Server_MailDaemon Modified: haiku/trunk/src/servers/mail/mail_daemon.rdef Log: zuMi was at it again and created a cool icon for the mail_daemon. Almost a pity to use this gem for a background application. :-) Added: haiku/trunk/data/artwork/icons/Server_MailDaemon =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_MailDaemon ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/servers/mail/mail_daemon.rdef =================================================================== --- haiku/trunk/src/servers/mail/mail_daemon.rdef 2008-10-10 19:08:57 UTC (rev 27957) +++ haiku/trunk/src/servers/mail/mail_daemon.rdef 2008-10-10 19:14:20 UTC (rev 27958) @@ -125,6 +125,57 @@ $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F0F0FFFFFFFFFFFFFFFFFFFFF" }; +resource(0, "BEOS:M:text/x-partial-email") #'MICN' array +{ + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFF001B0000FFFFFFFFFFFFFFFF" + $"FFFFFF001B3F1B1B00FFFFFFFFFFFFFF" + $"FFFF001B3F3F3F3F1B0FFF00FFFFFFFF" + $"FF001B3F3F00000F0F0FFF1B0000FFFF" + $"001B3F3F1C1C1C0FFFFFFF2B1B1B0000" + $"001B1B3F00001C0FFF1C7B2B2C1B000F" + $"0F00001B0F0F0F0FFF1C3F7B1B000FFF" + $"FF0F0F000FFFFFFFFF1C3F1B000FFFFF" + $"FFFFFF0F0FFF001B1B1C1B000FFFFFFF" + $"FFFFFFFFFFFF0F00001B000FFFFFFFFF" + $"FFFFFFFFFFFFFF0F0F000FFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFF" +}; + +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon { + $"6E6369660A04016A0501020116023D5F72B9240538B7E13CEB504758E9489EE5" + $"7CFFFDA9020116023C848B3B432FBBCE623CEFF849000048C0007CFF00A90201" + $"16033CA678B855AB36D0E03B325649022C493FC300FF7AEAFFAE05FF02010602" + $"3A96BFB896BF3696BF3896BF4761C8478000B0FFC10600C4830503C704400201" + $"06023D00000000000000003C80004A20004A6000FFFFEA0600D9AF05038D8026" + $"0B060AFE9B0B38563E523C523E5250504E52524E504A4E4C56445834523A5834" + $"323A4A2F53364E344E384E3852020A4A3C4C3B4B3D4E3C4D3B4E3E46404A4046" + $"40484248414644BE0EC221BF8DC21E3846303E3044303A3438343837363E363C" + $"363E36483648364A3650324F3250360202312A2F2A332A312D332D2F2D020328" + $"30B695B95228302A2A282C2C2A2E2E2E2C2C2E02092D24292433243429342734" + $"2D3935333239353B373B363B37373C373C334029442F442644243E2440243C26" + $"38B523BCFFB5BCBBF6292F2B332629020B4E304C304F30523250315433563456" + $"3356364E385036C4FBBCE8493D4B3B4640404442433C46324A364A2E4A28462A" + $"482644243E2442243A283626382A3441343B34433402033A503D4F395039493B" + $"4B39473E443B4440470A08375634593655325739513C533A5337590604FE292C" + $"2B2B2A2C2B2CB8212DB7482D2F2D2B2A2E2A292A0605EE035C4C4C5CC4F15C4A" + $"5C34503D49384C42464442434245420604EE4444464E444D484F584C44504751" + $"414F150A00010930212101178400040A0101091001178400040A080109000A09" + $"010A000A000100000A01010720181C0A01010630181C01178400040A01010130" + $"161C01178400040A04010120161C0A010205041001178400040A010107000A01" + $"01061001178400040A020106000A020105000A030104000A010101123FC74400" + $"000000000040000042FF4800000001178400040A040101000A070102000A0101" + $"03123F34DC0000000000003F3E3A41F7B04381C001178400040A060103000A05" + $"010800" +}; + +#else // HAIKU_TARGET_PLATFORM_HAIKU + resource large_icon { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -160,26 +211,6 @@ $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; -resource(0, "BEOS:M:text/x-partial-email") #'MICN' array -{ - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFF001B0000FFFFFFFFFFFFFFFF" - $"FFFFFF001B3F1B1B00FFFFFFFFFFFFFF" - $"FFFF001B3F3F3F3F1B0FFF00FFFFFFFF" - $"FF001B3F3F00000F0F0FFF1B0000FFFF" - $"001B3F3F1C1C1C0FFFFFFF2B1B1B0000" - $"001B1B3F00001C0FFF1C7B2B2C1B000F" - $"0F00001B0F0F0F0FFF1C3F7B1B000FFF" - $"FF0F0F000FFFFFFFFF1C3F1B000FFFFF" - $"FFFFFF0F0FFF001B1B1C1B000FFFFFFF" - $"FFFFFFFFFFFF0F00001B000FFFFFFFFF" - $"FFFFFFFFFFFFFF0F0F000FFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFF" -}; - resource mini_icon { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFF0000FFFFFF" @@ -199,3 +230,4 @@ $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; +#endif // HAIKU_TARGET_PLATFORM_HAIKU From superstippi at gmx.de Fri Oct 10 21:34:36 2008 From: superstippi at gmx.de (Stephan Assmus) Date: Fri, 10 Oct 2008 21:34:36 +0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <48EE2897.9060703@bug-br.org.br> References: <1486112797-BeMail@laptop> <20081009173754.680.1@stippis2.1223566143.fake> <48EE2897.9060703@bug-br.org.br> Message-ID: <20081010193436.153780@gmx.net> Hi, > Von: Bruno Albuquerque > Stephan Assmus wrote: > > Pretty much every morning and various times during the day, I use Haiku > and > > MediaPlayer to listen to music, mp3s from various encoders. I have not > had > > any problems with it. The only problems I run into regularily is that > there > > is no sound with OSS for a couple seconds after booting, and when the > > system has been running for several hours, there is no sound anymore > > either, even after restarting the Media Server. That being said, I don't > > seek so much, but I do skip to different songs and drop different albums > > onto the player without restarting it for the whole session. If you have > a > > file with a problem, maybe you can post it somewhere? Or are these > random > > problems with all sorts of files? > > I have exactly the same problem with OSS and trying to debug it is a > nightmare because restarting the media_server usually makes the audio > stop completely so I can not even try to figure out if something > specific happens that triggers audio suddenly start working some seconds > after booting. Did you manage to notice anything related to this? In > other words, did you try debugging this at all? If so, any success? Would you say that the silence period on startup has decreased with the smaller buffers? It may have something to do with the drift calculation. I can probably check something... hm. But otherwise I am a bit clueless and have not looked into it yet. Mostly because I didn't try to configure a startup sound and therefor it wasn't annoying enough to me yet. :-) Best regards, -Stephan From host.haiku at gmx.de Fri Oct 10 22:01:37 2008 From: host.haiku at gmx.de (julun) Date: Fri, 10 Oct 2008 22:01:37 +0200 Subject: [Haiku-commits] r27952 - in haiku/trunk: headers/private/kernel/arch/x86 src/system/boot src/system/boot/arch/m68k src/system/boot/arch/ppc src/system/kernel/arch/x86 src/system/kernel/lib src/system/kernel/lib/arch/m68k src/system/kernel/lib/arch/ppc src/system/kernel/lib/arch/x86 src/system/libroot/posix/string src/system/libroot/posix/string/arch/generic src/system/libroot/posix/string/arch/m68k src/system/libroot/posix/string/arch/ppc src/system/libroot/posix/string/arch/x86 src/system/runtime_loader src/system/runtime_loader/arch/m68k src/system/runtime_loader/arch/ppc In-Reply-To: <200810101843.m9AIhmhB020020@sheep.berlios.de> References: <200810101843.m9AIhmhB020020@sheep.berlios.de> Message-ID: <48EFB4A1.7080405@gmx.de> Hi Ingo, bonefish at BerliOS schrieb: > Author: bonefish > Date: 2008-10-10 20:43:46 +0200 (Fri, 10 Oct 2008) > New Revision: 27952 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27952&view=rev > > Added: > haiku/trunk/src/system/libroot/posix/string/arch/generic/memset.c > Removed: > haiku/trunk/src/system/libroot/posix/string/memset.c > Modified: > haiku/trunk/headers/private/kernel/arch/x86/arch_cpu.h > haiku/trunk/src/system/boot/Jamfile > haiku/trunk/src/system/boot/arch/m68k/Jamfile > haiku/trunk/src/system/boot/arch/ppc/Jamfile > haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp > haiku/trunk/src/system/kernel/arch/x86/asm_offsets.cpp > haiku/trunk/src/system/kernel/lib/Jamfile > haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile > haiku/trunk/src/system/kernel/lib/arch/ppc/Jamfile > haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S > haiku/trunk/src/system/libroot/posix/string/Jamfile > haiku/trunk/src/system/libroot/posix/string/arch/m68k/Jamfile > haiku/trunk/src/system/libroot/posix/string/arch/ppc/Jamfile > haiku/trunk/src/system/libroot/posix/string/arch/x86/arch_string.S > haiku/trunk/src/system/runtime_loader/Jamfile > haiku/trunk/src/system/runtime_loader/arch/m68k/Jamfile > haiku/trunk/src/system/runtime_loader/arch/ppc/Jamfile > Log: > * Implemented x86 assembly version of memset(). > * memset() is now available through the commpage. > * CPU modules can provide a model-optimized memset(). this change has the bad side effect that one can't start the debugger anymore. No gdb in Terminal nor if an app crashes. I have done a clean build on gcc4. Best regards, Karsten From bonefish at mail.berlios.de Fri Oct 10 22:07:09 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 10 Oct 2008 22:07:09 +0200 Subject: [Haiku-commits] r27959 - haiku/trunk/src/system/kernel/lib/arch/x86 Message-ID: <200810102007.m9AK799B029808@sheep.berlios.de> Author: bonefish Date: 2008-10-10 22:07:08 +0200 (Fri, 10 Oct 2008) New Revision: 27959 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27959&view=rev Modified: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S Log: Save one byte of code. Modified: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 19:14:20 UTC (rev 27958) +++ haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 20:07:08 UTC (rev 27959) @@ -86,7 +86,7 @@ 1: // lwordwise // prepare %eax -- the low byte must be copied to the other bytes mov %al, %ah - mov %ax, %dx + mov %eax, %edx shl $16, %eax mov %dx, %ax From dlmcpaul at gmail.com Fri Oct 10 23:37:01 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Sat, 11 Oct 2008 08:37:01 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <48EDFD32.5030307@bug-br.org.br> References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> Message-ID: 2008/10/9 Bruno Albuquerque : > While you are at it, do you have any idea why the duration information > for this file is not correctly calculated? > > http://www.bug-br.org.br/virtual-void.mp3 > > What happens is that the actual music finishes and the position slider > is still at around 1/4 of its total length. Then the music starts again > and the slider continues moving. I have committed a fix for this. Let me know if there are any issues. -- Cheers David From bonefish at mail.berlios.de Fri Oct 10 23:49:03 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Fri, 10 Oct 2008 23:49:03 +0200 Subject: [Haiku-commits] r27960 - haiku/trunk/src/system/kernel/lib/arch/x86 Message-ID: <200810102149.m9ALn3Fb013688@sheep.berlios.de> Author: bonefish Date: 2008-10-10 23:49:03 +0200 (Fri, 10 Oct 2008) New Revision: 27960 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27960&view=rev Modified: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S Log: memset() returned the wrong value. Fascinatingly there's even software (APR) that uses it. Modified: haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 20:07:08 UTC (rev 27959) +++ haiku/trunk/src/system/kernel/lib/arch/x86/arch_string.S 2008-10-10 21:49:03 UTC (rev 27960) @@ -106,7 +106,7 @@ pop %edi // return value is the value passed in - mov 12(%ebp), %eax + mov 8(%ebp), %eax mov %ebp, %esp pop %ebp From axeld at mail.berlios.de Sat Oct 11 00:13:06 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 11 Oct 2008 00:13:06 +0200 Subject: [Haiku-commits] r27961 - in haiku/trunk: headers/posix/sys headers/private/runtime_loader src/system/libroot/posix/sys src/system/runtime_loader Message-ID: <200810102213.m9AMD6GD016691@sheep.berlios.de> Author: axeld Date: 2008-10-11 00:13:05 +0200 (Sat, 11 Oct 2008) New Revision: 27961 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27961&view=rev Modified: haiku/trunk/headers/posix/sys/stat.h haiku/trunk/headers/private/runtime_loader/runtime_loader.h haiku/trunk/src/system/libroot/posix/sys/stat.c haiku/trunk/src/system/runtime_loader/elf.cpp Log: * Threw away the broken stat() vs. _stat() mechanism to allow for more fields in struct stat. * Instead, I followed Marcus' great idea and added a compatibility check in the runtime loader: now, R5 binaries (also shared libraries) are detected, and they get special versions for stat(), fstat(), and lstat() that return the smaller stat struct. * However, I've disabled (in src/system/libroot/posix/sys/stat.c) using the larger stat field for now, as this breaks some of our optional packages. So until we rebuild them all, this shouldn't be enabled. * This should now also be used for BeOS compatibility in libnetwork.so. Modified: haiku/trunk/headers/posix/sys/stat.h =================================================================== --- haiku/trunk/headers/posix/sys/stat.h 2008-10-10 21:49:03 UTC (rev 27960) +++ haiku/trunk/headers/posix/sys/stat.h 2008-10-10 22:13:05 UTC (rev 27961) @@ -23,11 +23,6 @@ time_t st_mtime; /* last modification time */ time_t st_ctime; /* last change time, not creation time */ time_t st_crtime; /* creation time */ - - /* Haiku extensions: - * TODO: we might also define special types for files and TTYs - * TODO: we should find another solution for this, as BStatable::GetStat() - * can only retrieve the R5 stat structure */ unsigned int st_type; /* attribute/index type */ blkcnt_t st_blocks; /* number of blocks allocated for object */ }; @@ -104,25 +99,13 @@ extern int chmod(const char *path, mode_t mode); extern int fchmod(int fd, mode_t mode); -extern int _stat(const char *path, struct stat *st, size_t statSize); -extern int _fstat(int fd, struct stat *st, size_t statSize); -extern int _lstat(const char *path, struct stat *st, size_t statSize); +extern int stat(const char *path, struct stat *st); +extern int fstat(int fd, struct stat *st); +extern int lstat(const char *path, struct stat *st); extern int mkdir(const char *path, mode_t mode); extern int mkfifo(const char *path, mode_t mode); extern mode_t umask(mode_t cmask); -/* This achieves backwards compatibility with R5 */ -#if 0 /* def HAIKU_TARGET_PLATFORM_HAIKU */ -#define stat(fd, st) _stat(fd, st, sizeof(struct stat)) -#define fstat(fd, st) _fstat(fd, st, sizeof(struct stat)) -#define lstat(fd, st) _lstat(fd, st, sizeof(struct stat)) -#else -/* ... and this fixes the build for R5 for now */ -extern int stat(const char *path, struct stat *st); -extern int fstat(int fd, struct stat *st); -extern int lstat(const char *path, struct stat *st); -#endif - #ifdef __cplusplus } #endif Modified: haiku/trunk/headers/private/runtime_loader/runtime_loader.h =================================================================== --- haiku/trunk/headers/private/runtime_loader/runtime_loader.h 2008-10-10 21:49:03 UTC (rev 27960) +++ haiku/trunk/headers/private/runtime_loader/runtime_loader.h 2008-10-10 22:13:05 UTC (rev 27961) @@ -43,6 +43,7 @@ int major; int middle; int minor; + bool haiku; } gcc_version; addr_t entry_point; Modified: haiku/trunk/src/system/libroot/posix/sys/stat.c =================================================================== --- haiku/trunk/src/system/libroot/posix/sys/stat.c 2008-10-10 21:49:03 UTC (rev 27960) +++ haiku/trunk/src/system/libroot/posix/sys/stat.c 2008-10-10 22:13:05 UTC (rev 27961) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006, Axel D?rfler, axeld at pinc-software.de. All rights reserved. + * Copyright 2002-2008, Axel D?rfler, axeld at pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -18,63 +18,71 @@ return err; -// R5 compatibility -#define R5_STAT_SIZE 60 -#undef stat -#undef fstat -#undef lstat +// BeOS compatibility +#define BEOS_STAT_SIZE 60 -extern int stat(const char *path, struct stat *stat); -extern int fstat(int fd, struct stat *stat); -extern int lstat(const char *path, struct stat *stat); - int stat(const char *path, struct stat *stat) { - return _stat(path, stat, R5_STAT_SIZE); + int status = _kern_read_stat(-1, path, true, stat, BEOS_STAT_SIZE/*sizeof(struct stat)*/); + + RETURN_AND_SET_ERRNO(status); } int fstat(int fd, struct stat *stat) { - return _fstat(fd, stat, R5_STAT_SIZE); + int status = _kern_read_stat(fd, NULL, false, stat, BEOS_STAT_SIZE/*sizeof(struct stat)*/); + + RETURN_AND_SET_ERRNO(status); } int lstat(const char *path, struct stat *stat) { - return _lstat(path, stat, R5_STAT_SIZE); + int status = _kern_read_stat(-1, path, false, stat, BEOS_STAT_SIZE/*sizeof(struct stat)*/); + + RETURN_AND_SET_ERRNO(status); } -// #pragma mark - +// #pragma mark - BeOS compatibility +#ifndef _KERNEL_MODE + +int __be_stat(const char *path, struct stat *stat); +int __be_fstat(int fd, struct stat *stat); +int __be_lstat(const char *path, struct stat *stat); + + int -_stat(const char *path, struct stat *stat, size_t statSize) +__be_stat(const char *path, struct stat *stat) { - int status = _kern_read_stat(-1, path, true, stat, statSize); + int status = _kern_read_stat(-1, path, true, stat, BEOS_STAT_SIZE); RETURN_AND_SET_ERRNO(status); } int -_lstat(const char *path, struct stat *stat, size_t statSize) +__be_fstat(int fd, struct stat *stat) { - int status = _kern_read_stat(-1, path, false, stat, statSize); + int status = _kern_read_stat(fd, NULL, false, stat, BEOS_STAT_SIZE); RETURN_AND_SET_ERRNO(status); } int -_fstat(int fd, struct stat *stat, size_t statSize) +__be_lstat(const char *path, struct stat *stat) { - int status = _kern_read_stat(fd, NULL, false, stat, statSize); + int status = _kern_read_stat(-1, path, false, stat, BEOS_STAT_SIZE); RETURN_AND_SET_ERRNO(status); } + +#endif // !_KERNEL_MODE Modified: haiku/trunk/src/system/runtime_loader/elf.cpp =================================================================== --- haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-10 21:49:03 UTC (rev 27960) +++ haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-10 22:13:05 UTC (rev 27961) @@ -651,6 +651,7 @@ int gccMajor = 0; int gccMiddle = 0; int gccMinor = 0; + bool isHaiku = true; // Read up to 10 comments. The first three or four are usually from the // glue code. @@ -720,11 +721,15 @@ gccMiddle = version[1]; gccMinor = version[2]; } + + if (gccMajor == 2 && strcmp(gccPlatform, "haiku")) + isHaiku = false; } image->gcc_version.major = gccMajor; image->gcc_version.middle = gccMiddle; image->gcc_version.minor = gccMinor; + image->gcc_version.haiku = isHaiku; return gccMajor != 0; } @@ -1099,47 +1104,83 @@ } +/*! This functions is called when we run BeOS images on Haiku. + It allows us to redirect functions to ensure compatibility. +*/ +static const char* +beos_compatibility_map_symbol(const char* symbolName) +{ + struct symbol_mapping { + const char* from; + const char* to; + }; + static const struct symbol_mapping kMappings[] = { + // TODO: improve this, and also use it for libnet.so compatibility! + {"fstat", "__be_fstat"}, + {"lstat", "__be_lstat"}, + {"stat", "__be_stat"}, + }; + const uint32 kMappingCount = sizeof(kMappings) / sizeof(kMappings[0]); + + for (uint32 i = 0; i < kMappingCount; i++) { + if (!strcmp(symbolName, kMappings[i].from)) + return kMappings[i].to; + } + + return symbolName; +} + + int resolve_symbol(image_t *rootImage, image_t *image, struct Elf32_Sym *sym, - addr_t *sym_addr) + addr_t *symAddress) { - struct Elf32_Sym *sym2; - char *symname; - image_t *shimg; - switch (sym->st_shndx) { case SHN_UNDEF: + { + struct Elf32_Sym *sharedSym; + image_t *sharedImage; + const char *symName; + // patch the symbol name - symname = SYMNAME(image, sym); + symName = SYMNAME(image, sym); + if (!image->gcc_version.haiku) { + // The image has been compiled with a BeOS compiler. This means + // we'll have to redirect some functions for compatibility. + symName = beos_compatibility_map_symbol(symName); + } // it's undefined, must be outside this image, try the other images - sym2 = find_undefined_symbol(rootImage, image, symname, &shimg); - if (!sym2) { + sharedSym = find_undefined_symbol(rootImage, image, symName, + &sharedImage); + if (sharedSym == NULL) { FATAL("elf_resolve_symbol: could not resolve symbol '%s'\n", - symname); + symName); return B_MISSING_SYMBOL; } // make sure they're the same type if (ELF32_ST_TYPE(sym->st_info) != STT_NOTYPE - && ELF32_ST_TYPE(sym->st_info) != ELF32_ST_TYPE(sym2->st_info)) { + && ELF32_ST_TYPE(sym->st_info) + != ELF32_ST_TYPE(sharedSym->st_info)) { FATAL("elf_resolve_symbol: found symbol '%s' in shared image " - "but wrong type\n", symname); + "but wrong type\n", symName); return B_MISSING_SYMBOL; } - if (ELF32_ST_BIND(sym2->st_info) != STB_GLOBAL - && ELF32_ST_BIND(sym2->st_info) != STB_WEAK) { + if (ELF32_ST_BIND(sharedSym->st_info) != STB_GLOBAL + && ELF32_ST_BIND(sharedSym->st_info) != STB_WEAK) { FATAL("elf_resolve_symbol: found symbol '%s' but not " - "exported\n", symname); + "exported\n", symName); return B_MISSING_SYMBOL; } - *sym_addr = sym2->st_value + shimg->regions[0].delta; + *symAddress = sharedSym->st_value + sharedImage->regions[0].delta; return B_NO_ERROR; + } case SHN_ABS: - *sym_addr = sym->st_value + image->regions[0].delta; + *symAddress = sym->st_value + image->regions[0].delta; return B_NO_ERROR; case SHN_COMMON: @@ -1149,7 +1190,7 @@ default: // standard symbol - *sym_addr = sym->st_value + image->regions[0].delta; + *symAddress = sym->st_value + image->regions[0].delta; return B_NO_ERROR; } } From axeld at mail.berlios.de Sat Oct 11 01:21:04 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 11 Oct 2008 01:21:04 +0200 Subject: [Haiku-commits] r27962 - haiku/trunk/src/apps/activitymonitor Message-ID: <200810102321.m9ANL46D016237@sheep.berlios.de> Author: axeld Date: 2008-10-11 01:20:59 +0200 (Sat, 11 Oct 2008) New Revision: 27962 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27962&view=rev Modified: haiku/trunk/src/apps/activitymonitor/ActivityView.cpp haiku/trunk/src/apps/activitymonitor/DataSource.cpp haiku/trunk/src/apps/activitymonitor/DataSource.h Log: * The network usage data sources are now actually using a single scale as intended before. * Also found a bug in the scales that prevented them from working. Modified: haiku/trunk/src/apps/activitymonitor/ActivityView.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/ActivityView.cpp 2008-10-10 22:13:05 UTC (rev 27961) +++ haiku/trunk/src/apps/activitymonitor/ActivityView.cpp 2008-10-10 23:20:59 UTC (rev 27962) @@ -115,7 +115,7 @@ { if (!fInitialized || fMinimumValue > value) fMinimumValue = value; - if (!fInitialized || fMaximumValue > value) + if (!fInitialized || fMaximumValue < value) fMaximumValue = value; fInitialized = true; Modified: haiku/trunk/src/apps/activitymonitor/DataSource.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/DataSource.cpp 2008-10-10 22:13:05 UTC (rev 27961) +++ haiku/trunk/src/apps/activitymonitor/DataSource.cpp 2008-10-10 23:20:59 UTC (rev 27962) @@ -1066,6 +1066,13 @@ } +scale_type +NetworkUsageDataSource::ScaleType() const +{ + return kBytePerSecondScale; +} + + bool NetworkUsageDataSource::Primary() const { Modified: haiku/trunk/src/apps/activitymonitor/DataSource.h =================================================================== --- haiku/trunk/src/apps/activitymonitor/DataSource.h 2008-10-10 22:13:05 UTC (rev 27961) +++ haiku/trunk/src/apps/activitymonitor/DataSource.h 2008-10-10 23:20:59 UTC (rev 27962) @@ -267,6 +267,7 @@ virtual const char* Name() const; virtual const char* Label() const; virtual bool AdaptiveScale() const; + virtual scale_type ScaleType() const; virtual bool Primary() const; private: From mmu_man at mail.berlios.de Sat Oct 11 01:27:26 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Sat, 11 Oct 2008 01:27:26 +0200 Subject: [Haiku-commits] r27963 - haiku/trunk/src/apps/codycam Message-ID: <200810102327.m9ANRQmP026374@sheep.berlios.de> Author: mmu_man Date: 2008-10-11 01:27:25 +0200 (Sat, 11 Oct 2008) New Revision: 27963 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27963&view=rev Modified: haiku/trunk/src/apps/codycam/SftpClient.cpp Log: Support IP:port notation in the server field for sftp, pass it as -oPort=port. Modified: haiku/trunk/src/apps/codycam/SftpClient.cpp =================================================================== --- haiku/trunk/src/apps/codycam/SftpClient.cpp 2008-10-10 23:20:59 UTC (rev 27962) +++ haiku/trunk/src/apps/codycam/SftpClient.cpp 2008-10-10 23:27:25 UTC (rev 27963) @@ -73,8 +73,16 @@ { bool rc = false; BString cmd("sftp "); + BString host(server.c_str()); + BString port; + if (host.FindFirst(':')) + host.MoveInto(port, host.FindFirst(':'), host.Length()); + port.RemoveAll(":"); + if (port.Length()) + cmd << "-oPort=" << port << " "; cmd << login.c_str(); - cmd << "@" << server.c_str(); + cmd << "@" << host.String(); + printf("COMMAND: '%s'\n", cmd.String()); SetCommandLine(cmd.String()); rc = SpawningUploadClient::Connect(server, login, passwd); BString reply; From korli at mail.berlios.de Sat Oct 11 01:43:57 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sat, 11 Oct 2008 01:43:57 +0200 Subject: [Haiku-commits] r27964 - haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich Message-ID: <200810102343.m9ANhvui019943@sheep.berlios.de> Author: korli Date: 2008-10-11 01:43:56 +0200 (Sat, 11 Oct 2008) New Revision: 27964 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27964&view=rev Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c Log: take sample rate from settings into account Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c 2008-10-10 23:27:25 UTC (rev 27963) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c 2008-10-10 23:43:56 UTC (rev 27964) @@ -678,13 +678,12 @@ memcpy(data->channels, card->multi.chans, size * sizeof(card->multi.chans[0])); } - data->output_rates = B_SR_48000;// | B_SR_44100 | B_SR_CVSR; - data->input_rates = B_SR_48000;// | B_SR_44100 | B_SR_CVSR; - /*data->output_rates = B_SR_44100; - data->input_rates = B_SR_44100;*/ + switch (current_settings.sample_rate) { + case 48000: data->output_rates = data->input_rates = B_SR_48000; break; + case 44100: data->output_rates = data->input_rates = B_SR_44100; break; + } data->min_cvsr_rate = 0; data->max_cvsr_rate = 48000; - //data->max_cvsr_rate = 44100; data->output_formats = B_FMT_16BIT; data->input_formats = B_FMT_16BIT; @@ -731,18 +730,17 @@ data->output_latency = 0; data->input_latency = 0; data->timecode_kind = 0; - data->input.rate = B_SR_48000; - data->input.cvsr = 48000; - data->input.format = B_FMT_16BIT; - data->output.rate = B_SR_48000; - data->output.cvsr = 48000; - data->output.format = B_FMT_16BIT; - /*data->input.rate = B_SR_44100; - data->input.cvsr = 44100; - data->input.format = B_FMT_16BIT; - data->output.rate = B_SR_44100; - data->output.cvsr = 44100; - data->output.format = B_FMT_16BIT;*/ + switch (current_settings.sample_rate) { + case 48000: + data->input.rate = data->output.rate = B_SR_48000; + data->input.cvsr = data->output.cvsr = 48000; + break; + case 44100: + data->input.rate = data->output.rate = B_SR_44100; + data->input.cvsr = data->output.cvsr = 44100; + break; + } + data->input.format = data->output.format = B_FMT_16BIT; return B_OK; } From anevilyak at mail.berlios.de Sat Oct 11 06:52:23 2008 From: anevilyak at mail.berlios.de (anevilyak at BerliOS) Date: Sat, 11 Oct 2008 06:52:23 +0200 Subject: [Haiku-commits] r27965 - in haiku/trunk: build/jam src/add-ons/media/media-add-ons src/add-ons/media/media-add-ons/firewire_dv Message-ID: <200810110452.m9B4qNwu030748@sheep.berlios.de> Author: anevilyak Date: 2008-10-11 06:52:20 +0200 (Sat, 11 Oct 2008) New Revision: 27965 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27965&view=rev Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/Jamfile haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/debug.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/glue.h Modified: haiku/trunk/build/jam/HaikuImage haiku/trunk/src/add-ons/media/media-add-ons/Jamfile Log: Add the current version of JiSheng Zhang's firewire_dv media add-on to the build. This is mostly complete, excepting BBufferConsumer's virtuals are not yet implemented, and needs more testing to ensure that the encoded stream is correctly read from the camera, though based off preliminary tests by Francois, detection/publishing at least seems to work. Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/build/jam/HaikuImage 2008-10-11 04:52:20 UTC (rev 27965) @@ -106,6 +106,7 @@ usb_webcam.media_addon video_producer_demo.media_addon video_window_demo.media_addon + firewire_dv.media_addon #legacy.media_addon ; BEOS_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder Modified: haiku/trunk/src/add-ons/media/media-add-ons/Jamfile =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/Jamfile 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/Jamfile 2008-10-11 04:52:20 UTC (rev 27965) @@ -15,4 +15,5 @@ SubInclude HAIKU_TOP src add-ons media media-add-ons usb_webcam ; SubInclude HAIKU_TOP src add-ons media media-add-ons video_producer_demo ; SubInclude HAIKU_TOP src add-ons media media-add-ons videowindow ; +SubInclude HAIKU_TOP src add-ons media media-add-ons firewire_dv ; Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp 2008-10-11 04:52:20 UTC (rev 27965) @@ -0,0 +1,400 @@ +/* + * FireWire DV media addon for Haiku + * + * Copyright (c) 2008, JiSheng Zhang (jszhang3 at mail.ustc.edu.cn) + * Distributed under the terms of the MIT License. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FireWireCard.h" +#include "glue.h" + +#define TAG (1<<6) +#define CHANNEL 63 + +/* for DV format */ +#define FIX_FRAME 1 + +struct frac { + int n,d; +}; + +struct frac frame_cycle[2] = { + {8000*100, 2997}, /* NTSC 8000 cycle / 29.97 Hz */ + {320, 1}, /* PAL 8000 cycle / 25 Hz */ +}; +int npackets[] = { + 250 /* NTSC */, + 300 /* PAL */ +}; +struct frac pad_rate[2] = { + {203, 2997}, /* = (8000 - 29.97 * 250)/(29.97 * 250) */ + {1, 15}, /* = (8000 - 25 * 300)/(25 * 300) */ +}; +char *system_name[] = {"NTSC", "PAL"}; +int frame_rate[] = {30, 25}; + +#define DV_PSIZE 512 +#define DV_DSIZE 480 +#define DV_NCHUNK 64 + +#define DV_NPACKET_R 256 +#define DV_NPACKET_T 255 +#define DV_TNBUF 100 /* XXX too large value causes block noise */ +#define DV_NEMPTY 10 /* depends on DV_TNBUF */ +#define DV_RBUFSIZE (DV_PSIZE * DV_NPACKET_R) +#define DV_MAXBLOCKS (300) +#define DV_CYCLE_FRAC 0xc00 + +/* for MPEGTS format */ +typedef uint8_t mpeg_ts_pld[188]; + +struct mpeg_pldt { +#if BYTE_ORDER == BIG_ENDIAN + uint32_t :7, + c_count:13, + c_offset:12; +#else /* BYTE_ORDER != BIG_ENDIAN */ + uint32_t c_offset:12, + c_count:13, + :7; +#endif /* BYTE_ORDER == BIG_ENDIAN */ + mpeg_ts_pld payload; +}; + + +#define MPEG_NCHUNK 8 +#define MPEG_PSIZE 596 +#define MPEG_NPACKET_R 4096 +#define MPEG_RBUFSIZE (MPEG_PSIZE * MPEG_NPACKET_R) + + +FireWireCard::FireWireCard(const char *path) + : fInitStatus(B_OK) + , fDev(-1) + , fBuf(NULL) + , fPad(NULL) +{ + printf("FireWireCard opening %s\n", path); + + fDev = open(path, O_RDWR); + if (fDev < 0) { + printf("FireWireCard opening %s failed\n", path); + fInitStatus = B_ERROR; + return; + } +} + + +FireWireCard::~FireWireCard() +{ + if (fDev > 0) + close(fDev); +} + + +status_t +FireWireCard::InitCheck() +{ + return fInitStatus; +} + + +ssize_t +FireWireCard::Read(void **data) +{ + if (fFormat == FMT_MPEGTS) + return MpegtsRead(data); + else + return DvRead(data); +} + + +status_t +FireWireCard::Extract(void *dest, void **src, ssize_t *sizeUsed) +{ + if (fFormat == FMT_MPEGTS) + return MpegtsExtract(dest, src, sizeUsed); + else + return DvExtract(dest, src, sizeUsed); +} + + +void +FireWireCard::GetBufInfo(size_t *rbufsize, int *rcount) +{ + *rbufsize = fRbufSize; + *rcount = fRcount; +} + + +status_t +FireWireCard::DetectRecvFn() +{ + char *buf, ich = TAG | CHANNEL; + struct fw_isochreq isoreq; + struct fw_isobufreq bufreq; + int len; + u_int32_t *ptr; + struct ciphdr *ciph; + + bufreq.rx.nchunk = 8; + bufreq.rx.npacket = 16; + bufreq.rx.psize = 1024; + bufreq.tx.nchunk = 0; + bufreq.tx.npacket = 0; + bufreq.tx.psize = 0; + + if (ioctl(fDev, FW_SSTBUF, &bufreq) < 0) + return errno; + + isoreq.ch = ich & 0x3f; + isoreq.tag = (ich >> 6) & 3; + + if (ioctl(fDev, FW_SRSTREAM, &isoreq) < 0) + return errno; + + buf = (char *)malloc(1024*16); + len = read(fDev, buf, 1024*16); + if (len < 0) + return errno; + ptr = (u_int32_t *) buf; + ciph = (struct ciphdr *)(ptr + 1); + + switch(ciph->fmt) { + case CIP_FMT_DVCR: + fprintf(stderr, "Detected DV format on input.\n"); + fFormat = FMT_DV; + fBuf = malloc(DV_RBUFSIZE); + fRbufSize = DV_PSIZE; + fRcount = DV_NPACKET_R; + fPad = malloc(DV_DSIZE*DV_MAXBLOCKS); + memset(fPad, 0xff, DV_DSIZE*DV_MAXBLOCKS); + break; + case CIP_FMT_MPEG: + fprintf(stderr, "Detected MPEG TS format on input.\n"); + fFormat = FMT_MPEGTS; + fBuf = malloc(MPEG_RBUFSIZE); + fRbufSize = MPEG_PSIZE; + fRcount = MPEG_NPACKET_R; + break; + default: + fprintf(stderr, "Unsupported format for receiving: fmt=0x%x", ciph->fmt); + } + free(buf); + return B_OK; +} + + +ssize_t +FireWireCard::DvRead(void **buffer) +{ + struct fw_isochreq isoreq; + struct fw_isobufreq bufreq; + ssize_t len; + char ich = TAG|CHANNEL; + + bufreq.rx.nchunk = DV_NCHUNK; + bufreq.rx.npacket = DV_NPACKET_R; + bufreq.rx.psize = DV_PSIZE; + bufreq.tx.nchunk = 0; + bufreq.tx.npacket = 0; + bufreq.tx.psize = 0; + if (ioctl(fDev, FW_SSTBUF, &bufreq) < 0) + return errno; + + isoreq.ch = ich & 0x3f; + isoreq.tag = (ich >> 6) & 3; + + if (ioctl(fDev, FW_SRSTREAM, &isoreq) < 0) + return errno; + + len = read(fDev, fBuf, DV_RBUFSIZE); + if (len < 0) { + if (errno == EAGAIN) { + fprintf(stderr, "(EAGAIN) - push 'Play'?\n"); + fflush(stderr); + } else + fprintf(stderr, "read failed"); + return errno; + } + *buffer = fBuf; + return len; +} + + +status_t +FireWireCard::DvExtract(void *dest, void **src, ssize_t *sizeUsed) +{ + struct dvdbc *dv; + struct ciphdr *ciph; + struct fw_pkt *pkt; + u_int32_t *ptr; + int nblocks[] = {250 /* NTSC */, 300 /* PAL */}; + int npad, k, m, system = -1, nb; + + k = m = 0; + ptr = (u_int32_t *) (*src); + + pkt = (struct fw_pkt *) ptr; + ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ + if (ciph->fmt != CIP_FMT_DVCR) { + fprintf(stderr, "unknown format 0x%x", ciph->fmt); + return B_ERROR; + } + ptr = (u_int32_t *) (ciph + 1); /* skip cip header */ + if (pkt->mode.stream.len <= sizeof(struct ciphdr)) + /* no payload */ + return B_ERROR; + for (dv = (struct dvdbc *)ptr; + (char *)dv < (char *)(ptr + ciph->len); + dv+=6) { + + if (dv->sct == DV_SCT_HEADER && dv->dseq == 0) { + if (system < 0) { + system = ciph->fdf.dv.fs; + fprintf(stderr, "%s\n", system_name[system]); + } + + /* Fix DSF bit */ + if (system == 1 && + (dv->payload[0] & DV_DSF_12) == 0) + dv->payload[0] |= DV_DSF_12; + nb = nblocks[system]; + fprintf(stderr, "%d", k%10); +#if FIX_FRAME + if (m > 0 && m != nb) { + /* padding bad frame */ + npad = ((nb - m) % nb); + if (npad < 0) + npad += nb; + fprintf(stderr, "(%d blocks padded)", + npad); + npad *= DV_DSIZE; + memcpy(dest, fPad, npad); + dest = (char *)dest + npad; + } +#endif + k++; + if (k % frame_rate[system] == 0) { + /* every second */ + fprintf(stderr, "\n"); + } + fflush(stderr); + m = 0; + } + if (k == 0) + continue; + m++; + memcpy(dest, dv, DV_DSIZE); + dest = (char *)dest + DV_DSIZE; + } + ptr = (u_int32_t *)dv; + *src = ptr; + return B_OK; +} + + +ssize_t +FireWireCard::MpegtsRead(void **buffer) +{ + struct fw_isochreq isoreq; + struct fw_isobufreq bufreq; + char ich = TAG|CHANNEL; + ssize_t len; + + + bufreq.rx.nchunk = MPEG_NCHUNK; + bufreq.rx.npacket = MPEG_NPACKET_R; + bufreq.rx.psize = MPEG_PSIZE; + bufreq.tx.nchunk = 0; + bufreq.tx.npacket = 0; + bufreq.tx.psize = 0; + if (ioctl(fDev, FW_SSTBUF, &bufreq) < 0) + return errno; + + isoreq.ch = ich & 0x3f; + isoreq.tag = (ich >> 6) & 3; + + if (ioctl(fDev, FW_SRSTREAM, &isoreq) < 0) + return errno; + + len = read(fDev, fBuf, MPEG_RBUFSIZE); + if (len < 0) { + if (errno == EAGAIN) { + fprintf(stderr, "(EAGAIN) - push 'Play'?\n"); + fflush(stderr); + } else + fprintf(stderr, "read failed"); + return errno; + } + *buffer = fBuf; + return len; +} + + +status_t +FireWireCard::MpegtsExtract(void *dest, void **src, ssize_t *sizeUsed) +{ + uint32_t *ptr; + struct fw_pkt *pkt; + struct ciphdr *ciph; + struct mpeg_pldt *pld; + int pkt_size, startwr; + + ptr = (uint32_t *)(*src); + startwr = 0; + + pkt = (struct fw_pkt *) ptr; + /* there is no CRC in the 1394 header */ + ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ + if (ciph->fmt != CIP_FMT_MPEG) { + fprintf(stderr, "unknown format 0x%x", ciph->fmt); + return B_ERROR; + } + if (ciph->fn != 3) { + fprintf(stderr, "unsupported MPEG TS stream, fn=%d (only" + "fn=3 is supported)", ciph->fn); + return B_ERROR; + } + ptr = (uint32_t *) (ciph + 1); /* skip cip header */ + + if (pkt->mode.stream.len <= sizeof(struct ciphdr)) { + /* no payload */ + /* tlen needs to be decremented before end of the loop */ + goto next; + } + + /* This is a condition that needs to be satisfied to start + writing the data */ + if (ciph->dbc % (1<fn) == 0) + startwr = 1; + /* Read out all the MPEG TS data blocks from current packet */ + for (pld = (struct mpeg_pldt *)ptr; + (intptr_t)pld < (intptr_t)((char *)ptr + + pkt->mode.stream.len - sizeof(struct ciphdr)); + pld++) { + if (startwr == 1) { + memcpy(dest, pld->payload, sizeof(pld->payload)); + dest = (char *)dest + sizeof(pld->payload); + } + } + +next: + /* CRCs are removed from both header and trailer + so that only 4 bytes of 1394 header remains */ + pkt_size = pkt->mode.stream.len + 4; + ptr = (uint32_t *)((intptr_t)pkt + pkt_size); + *src = ptr; + return B_OK; +} Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h 2008-10-11 04:52:20 UTC (rev 27965) @@ -0,0 +1,47 @@ +/* + * FireWire DV media addon for Haiku + * + * Copyright (c) 2008, JiSheng Zhang (jszhang3 at mail.ustc.edu.cn) + * Distributed under the terms of the MIT License. + * + */ + +#ifndef __FIREWIRE_CARD_H +#define __FIREWIRE_CARD_H + +class FireWireCard +{ +public: + enum fmt_type { + FMT_MPEGTS = 0, + FMT_DV = 1, + }; + FireWireCard(const char *path); + ~FireWireCard(); + + status_t InitCheck(); + + status_t DetectRecvFn(); + ssize_t Read(void **buffer); + status_t Extract(void *dest, void **src, ssize_t *sizeUsed); + + void GetBufInfo(size_t *rbufsize, int *rcount); + +private: + ssize_t DvRead(void **buffer); + status_t DvExtract(void *dest, void **src, ssize_t *sizeUsed); + ssize_t MpegtsRead(void **buffer); + status_t MpegtsExtract(void *dest, void **src, ssize_t *sizeUsed); + + + status_t fInitStatus; + int fDev; + void *fBuf; + void *fPad; + size_t fRbufSize; + int fRcount; + fmt_type fFormat; + +}; + +#endif Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp 2008-10-11 04:52:20 UTC (rev 27965) @@ -0,0 +1,183 @@ +/* + * FireWire DV media addon for Haiku + * + * Copyright (c) 2008, JiSheng Zhang (jszhang3 at mail.ustc.edu.cn) + * Distributed under the terms of the MIT License. + * + * Based on DVB media addon + * Copyright (c) 2004-2007 Marcus Overhagen + */ + +#include "FireWireDVAddOn.h" +#include "FireWireCard.h" +#include "FireWireDVNode.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "debug.h" + +struct device_info +{ + FireWireCard * card; + char name[16]; + media_format in_formats[1]; + media_format out_formats[1]; + flavor_info flavor; +}; + +extern "C" BMediaAddOn * +make_media_addon(image_id id) +{ + CALLED(); + return new FireWireDVAddOn(id); +} + +FireWireDVAddOn::~FireWireDVAddOn() +{ + CALLED(); + FreeDeviceList(); +} + +FireWireDVAddOn::FireWireDVAddOn(image_id id) + : BMediaAddOn(id) +{ + CALLED(); + ScanFolder("/dev/bus/fw"); +} + +status_t +FireWireDVAddOn::InitCheck(const char **out_failure_text) +{ + CALLED(); + if (!fDeviceList.CountItems()) { + *out_failure_text = "No supported device found"; + return B_ERROR; + } + return B_OK; +} + +int32 +FireWireDVAddOn::CountFlavors() +{ + CALLED(); + return fDeviceList.CountItems(); +} + +status_t +FireWireDVAddOn::GetFlavorAt(int32 n, const flavor_info **out_info) +{ + CALLED(); + device_info *dev = (device_info *)fDeviceList.ItemAt(n); + if (!dev) + return B_ERROR; + *out_info = &dev->flavor; + return B_OK; +} + +BMediaNode * +FireWireDVAddOn::InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error) +{ + CALLED(); + device_info *dev = (device_info *)fDeviceList.ItemAt(info->internal_id); + if (!dev || dev->flavor.internal_id != info->internal_id) { + *out_error = B_ERROR; + return NULL; + } + *out_error = B_OK; + + return new FireWireDVNode(this, dev->name, dev->flavor.internal_id, dev->card); +} + +bool +FireWireDVAddOn::WantsAutoStart() +{ + CALLED(); + return false; +} + +status_t +FireWireDVAddOn::AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore) +{ + CALLED(); + return B_ERROR; +} + +void +FireWireDVAddOn::ScanFolder(const char *path) +{ + CALLED(); + BDirectory dir(path); + if (dir.InitCheck() != B_OK) + return; + + BEntry ent; + + while (dir.GetNextEntry(&ent) == B_OK) { + BPath path(&ent); + if (!ent.IsDirectory() && !ent.IsSymLink()) { + FireWireCard *card = new FireWireCard(path.Path()); + if (card->InitCheck() == B_OK) + AddDevice(card, path.Path()); + else + delete card; + } + } +} + +void +FireWireDVAddOn::AddDevice(FireWireCard *card, const char *path) +{ + const char *fwnumber; + + // get card name, info and type + + // get interface number + const char *p = strrchr(path, '/'); + fwnumber = p ? p + 1 : ""; + + // create device_info + device_info *dev = new device_info; + fDeviceList.AddItem(dev); + + dev->card = card; + + sprintf(dev->name, "FireWire-%s", fwnumber); + + // setup supported formats (the lazy way) + memset(dev->in_formats, 0, sizeof(dev->in_formats)); + memset(dev->out_formats, 0, sizeof(dev->out_formats)); + dev->in_formats[1].type = B_MEDIA_ENCODED_VIDEO; + dev->out_formats[1].type = B_MEDIA_ENCODED_VIDEO; + + // setup flavor info + dev->flavor.name = dev->name; + dev->flavor.info = "The FireWireDVNode outputs to fw_raw drivers."; + dev->flavor.kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER + | B_CONTROLLABLE | B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT; + dev->flavor.flavor_flags = B_FLAVOR_IS_GLOBAL; + dev->flavor.internal_id = fDeviceList.CountItems() - 1; + dev->flavor.possible_count = 1; + dev->flavor.in_format_count = 1; + dev->flavor.in_format_flags = 0; + dev->flavor.in_formats = dev->in_formats; + dev->flavor.out_format_count = 1; + dev->flavor.out_format_flags = 0; + dev->flavor.out_formats = dev->out_formats; +} + + +void +FireWireDVAddOn::FreeDeviceList() +{ + device_info *dev; + while ((dev = (device_info *)fDeviceList.RemoveItem((int32)0))) { + delete dev->card; + delete dev; + } +} Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h 2008-10-11 04:52:20 UTC (rev 27965) @@ -0,0 +1,45 @@ +/* + * FireWire DV media addon for Haiku + * + * Copyright (c) 2008, JiSheng Zhang (jszhang3 at mail.ustc.edu.cn) + * Distributed under the terms of the MIT License. + * + * Based on DVB media addon + * Copyright (c) 2004-2007 Marcus Overhagen + */ + +#ifndef _FIREWIRE_DV_ADDON_H_ +#define _FIREWIRE_DV_ADDON_H_ + +#include + +class FireWireCard; + +class FireWireDVAddOn : public BMediaAddOn +{ +public: + FireWireDVAddOn(image_id id); + ~FireWireDVAddOn(); + + status_t InitCheck(const char **out_failure_text); + + int32 CountFlavors(); + + status_t GetFlavorAt(int32 n, const flavor_info **out_info); + + BMediaNode *InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error); + + bool WantsAutoStart(); + status_t AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore); + +protected: + void ScanFolder(const char *path); + + void AddDevice(FireWireCard *card, const char *path); + void FreeDeviceList(); + +protected: + BList fDeviceList; +}; + +#endif Added: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp 2008-10-10 23:43:56 UTC (rev 27964) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp 2008-10-11 04:52:20 UTC (rev 27965) @@ -0,0 +1,692 @@ +/* + * FireWire DV media addon for Haiku + * + * Copyright (c) 2008, JiSheng Zhang (jszhang3 at mail.ustc.edu.cn) + * Distributed under the terms of the MIT License. + * + * Based on DVB media addon + * Copyright (c) 2004-2007 Marcus Overhagen + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "FireWireDVNode.h" +#include "FireWireCard.h" +#include "debug.h" + +#define REVISION "unknown" +#define VERSION "1.0" +#define BUILD __DATE__ " "__TIME__ + +// debugging +#ifdef TRACE +# undef TRACE +#endif +#define TRACE_FIREWIRE_NODE +#ifdef TRACE_FIREWIRE_NODE +# define TRACE(x...) printf(x) +#else +# define TRACE(x...) +#endif + +#define RETURN_IF_ERROR(expr) { status_t e = (expr); if (e != B_OK) return e; } + +#define M_REFRESH_PARAMETER_WEB (BTimedEventQueue::B_USER_EVENT + 1) + +FireWireDVNode::FireWireDVNode( + BMediaAddOn *addon, const char *name, + int32 internal_id, FireWireCard *card) + : BMediaNode(name) + , BBufferProducer(B_MEDIA_ENCODED_VIDEO) + , BControllable() + , BMediaEventLooper() + , fOutputEnabledEncVideo(false) + , fCard(card) + , fCaptureThreadsActive(false) + , fThreadIdCardReader(-1) + , fTerminateThreads(false) + , fBufferGroupEncVideo(0) + , fCaptureActive(false) +{ + CALLED(); + + AddNodeKind(B_PHYSICAL_INPUT); +// AddNodeKind(B_PHYSICAL_OUTPUT); + + fInternalID = internal_id; + fAddOn = addon; + + fInitStatus = B_OK; + + fDefaultFormatEncVideo.type = B_MEDIA_ENCODED_VIDEO; +} + + +FireWireDVNode::~FireWireDVNode() +{ + CALLED(); + + StopCapture(); + fWeb = NULL; +} + + +/* BMediaNode */ + + +BMediaAddOn * +FireWireDVNode::AddOn(int32 *internal_id) const +{ + if (internal_id) + *internal_id = fInternalID; + return fAddOn; +} + + +status_t +FireWireDVNode::HandleMessage(int32 message, const void *data, size_t size) +{ + return B_ERROR; +} + + +void +FireWireDVNode::Preroll() +{ + /* This hook may be called before the node is started to give the hardware + * a chance to start. */ +} + + +void +FireWireDVNode::SetTimeSource(BTimeSource *time_source) +{ + CALLED(); +} + + +void +FireWireDVNode::SetRunMode(run_mode mode) +{ + CALLED(); + TRACE("FireWireDVNode::SetRunMode(%d)\n", mode); +} + + +/* BMediaEventLooper */ + + +void +FireWireDVNode::NodeRegistered() +{ + CALLED(); + + SetPriority(B_REAL_TIME_PRIORITY); + Run(); + + fOutputEncVideo.node = Node(); + fOutputEncVideo.source.port = ControlPort(); + fOutputEncVideo.source.id = 0; + fOutputEncVideo.destination = media_destination::null; + fOutputEncVideo.format = fDefaultFormatEncVideo; + strcpy(fOutputEncVideo.name, "encoded video"); + + RefreshParameterWeb(); +} + + +void +FireWireDVNode::HandleEvent(const media_timed_event *event, + bigtime_t lateness, bool realTimeEvent) +{ + + switch(event->type) + { + case M_REFRESH_PARAMETER_WEB: + RefreshParameterWeb(); + break; + case BTimedEventQueue::B_START: + HandleStart(event->event_time); + break; + case BTimedEventQueue::B_STOP: + HandleStop(); + break; + case BTimedEventQueue::B_WARP: + HandleTimeWarp(event->bigdata); + break; + case BTimedEventQueue::B_SEEK: + HandleSeek(event->bigdata); + break; + case BTimedEventQueue::B_HANDLE_BUFFER: + case BTimedEventQueue::B_DATA_STATUS: + case BTimedEventQueue::B_PARAMETER: + default: + TRACE("FireWireDVNode::HandleEvent: Unhandled event -- %lx\n", event->type); + break; + } +} + + +/* BBufferProducer */ + + +status_t +FireWireDVNode::FormatChangeRequested(const media_source &source, + const media_destination &destination, media_format *io_format, + int32 *_deprecated_) +{ + CALLED(); + + // we don't support any other formats, so we just reject any format changes. + return B_ERROR; +} + + +status_t +FireWireDVNode::GetNextOutput(int32 *cookie, media_output *out_output) +{ + CALLED(); + + if (*cookie == 0) { + *out_output = fOutputEncVideo; + *cookie += 1; + return B_OK; + } else { + return B_BAD_INDEX; + } +} + + +status_t +FireWireDVNode::DisposeOutputCookie(int32 cookie) +{ + CALLED(); + // do nothing because we don't use the cookie for anything special + return B_OK; +} + + +status_t +FireWireDVNode::SetBufferGroup(const media_source &source, BBufferGroup *group) +{ + CALLED(); + return B_ERROR; +} + + +status_t +FireWireDVNode::VideoClippingChanged(const media_source &for_source, + int16 num_shorts, int16 *clip_data, + const media_video_display_info &display, int32 *_deprecated_) +{ + CALLED(); + return B_ERROR; +} + + +status_t +FireWireDVNode::GetLatency(bigtime_t *out_latency) +{ + CALLED(); + + *out_latency = EventLatency() + SchedulingLatency(); + return B_OK; +} + + +status_t +FireWireDVNode::FormatSuggestionRequested( + media_type type, int32 quality, media_format *format) +{ + CALLED(); + + if (format == NULL) { + fprintf(stderr, "\tERROR - NULL format pointer passed in!\n"); + return B_BAD_VALUE; + } + + // this is the format we'll be returning (our preferred format) + *format = fDefaultFormatEncVideo; + + // a wildcard type is okay; we can specialize it + if (type == B_MEDIA_UNKNOWN_TYPE) [... truncated: 663 lines follow ...] From bonefish at mail.berlios.de Sat Oct 11 09:30:55 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sat, 11 Oct 2008 09:30:55 +0200 Subject: [Haiku-commits] r27966 - in haiku/trunk: headers/private/kernel src/system/kernel/cache src/system/kernel/vm Message-ID: <200810110730.m9B7UtCk001623@sheep.berlios.de> Author: bonefish Date: 2008-10-11 09:30:44 +0200 (Sat, 11 Oct 2008) New Revision: 27966 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27966&view=rev Modified: haiku/trunk/headers/private/kernel/vm_types.h haiku/trunk/src/system/kernel/cache/vnode_store.cpp haiku/trunk/src/system/kernel/cache/vnode_store.h haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h haiku/trunk/src/system/kernel/vm/VMDeviceCache.cpp haiku/trunk/src/system/kernel/vm/VMDeviceCache.h haiku/trunk/src/system/kernel/vm/vm.cpp haiku/trunk/src/system/kernel/vm/vm_cache.cpp Log: * Added "flags" parameter to VMCache::Read(). * Use the new VMCache::Read() flags parameter to directly read into the physical page in the page fault handler instead of mapping it first. Modified: haiku/trunk/headers/private/kernel/vm_types.h =================================================================== --- haiku/trunk/headers/private/kernel/vm_types.h 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/headers/private/kernel/vm_types.h 2008-10-11 07:30:44 UTC (rev 27966) @@ -213,7 +213,7 @@ virtual bool HasPage(off_t offset); virtual status_t Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes); + uint32 flags, size_t *_numBytes); virtual status_t Write(off_t offset, const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes); virtual status_t WriteAsync(off_t offset, const iovec* vecs, Modified: haiku/trunk/src/system/kernel/cache/vnode_store.cpp =================================================================== --- haiku/trunk/src/system/kernel/cache/vnode_store.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/cache/vnode_store.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -11,8 +11,35 @@ #include #include +#include +#include "io_requests.h" + +static inline status_t +memset_physical(addr_t address, int value, size_t length) +{ + while (length > 0) { + addr_t pageOffset = address % B_PAGE_SIZE; + addr_t virtualAddress; + status_t error = vm_get_physical_page(address - pageOffset, + &virtualAddress, 0); + if (error != B_OK) + return error; + + size_t toSet = min_c(length, B_PAGE_SIZE - pageOffset); + memset((void*)(virtualAddress + pageOffset), value, toSet); + + vm_put_physical_page(virtualAddress); + + length -= toSet; + address += toSet; + } + + return B_OK; +} + + status_t VMVnodeCache::Init(struct vnode *vnode) { @@ -41,12 +68,12 @@ status_t VMVnodeCache::Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes) + uint32 flags, size_t *_numBytes) { size_t bytesUntouched = *_numBytes; status_t status = vfs_read_pages(fVnode, NULL, offset, vecs, count, - 0, _numBytes); + flags, _numBytes); bytesUntouched -= *_numBytes; @@ -61,9 +88,12 @@ for (int32 i = count; i-- > 0 && bytesUntouched != 0;) { size_t length = min_c(bytesUntouched, vecs[i].iov_len); - // ToDo: will have to map the pages in later (when we switch to physical pages) - memset((void *)((addr_t)vecs[i].iov_base + vecs[i].iov_len - length), - 0, length); + addr_t address = (addr_t)vecs[i].iov_base + vecs[i].iov_len - length; + if ((flags & B_PHYSICAL_IO_REQUEST) != 0) + memset_physical(address, 0, length); + else + memset((void*)address, 0, length); + bytesUntouched -= length; } Modified: haiku/trunk/src/system/kernel/cache/vnode_store.h =================================================================== --- haiku/trunk/src/system/kernel/cache/vnode_store.h 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/cache/vnode_store.h 2008-10-11 07:30:44 UTC (rev 27966) @@ -20,7 +20,7 @@ virtual bool HasPage(off_t offset); virtual status_t Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes); + uint32 flags, size_t *_numBytes); virtual status_t Write(off_t offset, const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes); virtual status_t WriteAsync(off_t offset, const iovec* vecs, Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -496,7 +496,7 @@ status_t VMAnonymousCache::Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes) + uint32 flags, size_t *_numBytes) { off_t pageIndex = offset >> PAGE_SHIFT; @@ -517,7 +517,7 @@ * B_PAGE_SIZE; status_t status = vfs_read_pages(swapFile->vnode, swapFile->cookie, pos, - vecs + i, j - i, 0, _numBytes); + vecs + i, j - i, flags, _numBytes); if (status != B_OK) return status; } Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2008-10-11 07:30:44 UTC (rev 27966) @@ -39,7 +39,7 @@ virtual bool HasPage(off_t offset); virtual status_t Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes); + uint32 flags, size_t *_numBytes); virtual status_t Write(off_t offset, const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes); virtual status_t WriteAsync(off_t offset, const iovec* vecs, Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -96,7 +96,7 @@ status_t VMAnonymousNoSwapCache::Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes) + uint32 flags, size_t *_numBytes) { panic("anonymous_store: read called. Invalid!\n"); return B_ERROR; Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h =================================================================== --- haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h 2008-10-11 07:30:44 UTC (rev 27966) @@ -23,7 +23,7 @@ virtual bool HasPage(off_t offset); virtual status_t Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes); + uint32 flags, size_t *_numBytes); virtual status_t Write(off_t offset, const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes); Modified: haiku/trunk/src/system/kernel/vm/VMDeviceCache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/VMDeviceCache.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMDeviceCache.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -27,7 +27,7 @@ status_t VMDeviceCache::Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes) + uint32 flags, size_t *_numBytes) { panic("device_store: read called. Invalid!\n"); return B_ERROR; Modified: haiku/trunk/src/system/kernel/vm/VMDeviceCache.h =================================================================== --- haiku/trunk/src/system/kernel/vm/VMDeviceCache.h 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/VMDeviceCache.h 2008-10-11 07:30:44 UTC (rev 27966) @@ -19,7 +19,7 @@ virtual bool HasPage(off_t offset); virtual status_t Read(off_t offset, const iovec *vecs, size_t count, - size_t *_numBytes); + uint32 flags, size_t *_numBytes); virtual status_t Write(off_t offset, const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes); Modified: haiku/trunk/src/system/kernel/vm/vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -45,6 +45,7 @@ #include #include "VMAnonymousCache.h" +#include "io_requests.h" //#define TRACE_VM @@ -4438,16 +4439,13 @@ // get a virtual address for the page iovec vec; - map->ops->get_physical_page( - page->physical_page_number * B_PAGE_SIZE, - (addr_t *)&vec.iov_base, PHYSICAL_PAGE_CAN_WAIT); + vec.iov_base = (void*)(page->physical_page_number * B_PAGE_SIZE); size_t bytesRead = vec.iov_len = B_PAGE_SIZE; // read it in - status_t status = cache->Read(cacheOffset, &vec, 1, &bytesRead); + status_t status = cache->Read(cacheOffset, &vec, 1, + B_PHYSICAL_IO_REQUEST, &bytesRead); - map->ops->put_physical_page((addr_t)vec.iov_base); - cache->Lock(); if (status < B_OK) { Modified: haiku/trunk/src/system/kernel/vm/vm_cache.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_cache.cpp 2008-10-11 04:52:20 UTC (rev 27965) +++ haiku/trunk/src/system/kernel/vm/vm_cache.cpp 2008-10-11 07:30:44 UTC (rev 27966) @@ -861,7 +861,8 @@ status_t -VMCache::Read(off_t offset, const iovec *vecs, size_t count, size_t *_numBytes) +VMCache::Read(off_t offset, const iovec *vecs, size_t count, uint32 flags, + size_t *_numBytes) { return B_ERROR; } From mmu_man at mail.berlios.de Sat Oct 11 10:24:39 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Sat, 11 Oct 2008 10:24:39 +0200 Subject: [Haiku-commits] r27967 - haiku/trunk/src/apps/codycam Message-ID: <200810110824.m9B8Od2V006634@sheep.berlios.de> Author: mmu_man Date: 2008-10-11 10:24:39 +0200 (Sat, 11 Oct 2008) New Revision: 27967 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27967&view=rev Modified: haiku/trunk/src/apps/codycam/CodyCam.cpp Log: Got rid of the ugly non-working hack to hide the password and use BTextView::HideTyping() instead. Seems the BeOS one removes the text on call !? Modified: haiku/trunk/src/apps/codycam/CodyCam.cpp =================================================================== --- haiku/trunk/src/apps/codycam/CodyCam.cpp 2008-10-11 07:30:44 UTC (rev 27966) +++ haiku/trunk/src/apps/codycam/CodyCam.cpp 2008-10-11 08:24:39 UTC (rev 27967) @@ -619,10 +619,6 @@ if (control != NULL) { strncpy(fFtpInfo.passwordText, ((BTextControl*)control)->Text(), 64); FTPINFO("password = '%s'\n", fFtpInfo.passwordText); - if (Lock()) { - ((BTextControl*)control)->SetText(""); - Unlock(); - } } break; @@ -785,6 +781,9 @@ fPasswordSetting->Value(), new BMessage(msg_password)); fPassword->SetTarget(this); fPassword->SetDivider(fPassword->Divider() - 30); + fPassword->TextView()->HideTyping(true); + // BeOS HideTyping() seems broken, it empties the text + fPassword->SetText(fPasswordSetting->Value()); fFtpSetupBox->AddChild(fPassword); aFrame.top = aFrame.bottom + kYBuffer; From mmu_man at mail.berlios.de Sat Oct 11 10:41:55 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sat, 11 Oct 2008 10:41:55 +0200 Subject: [Haiku-commits] r27968 - haiku/trunk/src/system/runtime_loader Message-ID: <200810110841.m9B8ft1E008264@sheep.berlios.de> Author: mmu_man Date: 2008-10-11 10:41:54 +0200 (Sat, 11 Oct 2008) New Revision: 27968 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27968&view=rev Modified: haiku/trunk/src/system/runtime_loader/elf.cpp Log: Avoid crashing if gccPlatform is NULL, thanks Axel! Modified: haiku/trunk/src/system/runtime_loader/elf.cpp =================================================================== --- haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-11 08:24:39 UTC (rev 27967) +++ haiku/trunk/src/system/runtime_loader/elf.cpp 2008-10-11 08:41:54 UTC (rev 27968) @@ -722,7 +722,7 @@ gccMinor = version[2]; } - if (gccMajor == 2 && strcmp(gccPlatform, "haiku")) + if (gccMajor == 2 && gccPlatform != NULL && strcmp(gccPlatform, "haiku")) isHaiku = false; } From stefano.ceccherini at gmail.com Sat Oct 11 12:38:46 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Sat, 11 Oct 2008 12:38:46 +0200 Subject: [Haiku-commits] r27967 - haiku/trunk/src/apps/codycam In-Reply-To: <200810110824.m9B8Od2V006634@sheep.berlios.de> References: <200810110824.m9B8Od2V006634@sheep.berlios.de> Message-ID: <894b9700810110338s2374cabfp7f69e0a14b9022bf@mail.gmail.com> 2008/10/11 mmu_man at BerliOS : > Author: mmu_man > Date: 2008-10-11 10:24:39 +0200 (Sat, 11 Oct 2008) > New Revision: 27967 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27967&view=rev > > Modified: > haiku/trunk/src/apps/codycam/CodyCam.cpp > Log: > Got rid of the ugly non-working hack to hide the password and use BTextView::HideTyping() instead. Seems the BeOS one removes the text on call !? > Yes. Also our implementation does that. From korli at mail.berlios.de Sat Oct 11 16:58:12 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sat, 11 Oct 2008 16:58:12 +0200 Subject: [Haiku-commits] r27969 - haiku/trunk/src/system/libroot/os Message-ID: <200810111458.m9BEwC9D003630@sheep.berlios.de> Author: korli Date: 2008-10-11 16:58:12 +0200 (Sat, 11 Oct 2008) New Revision: 27969 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27969&view=rev Modified: haiku/trunk/src/system/libroot/os/driver_settings.c Log: * correctly init ref_count on driver settings handles * unload settings when ref_count is zero and boot device is available Modified: haiku/trunk/src/system/libroot/os/driver_settings.c =================================================================== --- haiku/trunk/src/system/libroot/os/driver_settings.c 2008-10-11 08:41:54 UTC (rev 27968) +++ haiku/trunk/src/system/libroot/os/driver_settings.c 2008-10-11 14:58:12 UTC (rev 27969) @@ -39,6 +39,7 @@ # include # include # include +# include #endif #ifdef _BOOT_MODE # include @@ -405,6 +406,7 @@ handle->text = buffer; #ifdef _KERNEL_MODE + handle->ref_count = 1; strlcpy(handle->name, driverName, sizeof(handle->name)); #endif @@ -644,6 +646,8 @@ strlcpy(handle->name, settings->name, sizeof(handle->name)); handle->magic = 0; + handle->ref_count = 0; + // this triggers parsing the settings when they are actually used list_add_item(&sHandles, handle); @@ -659,19 +663,18 @@ status_t -unload_driver_settings(void *handle) +unload_driver_settings(void *_handle) { + settings_handle *handle = (settings_handle *)_handle; if (!check_handle(handle)) return B_BAD_VALUE; #ifdef _KERNEL_MODE mutex_lock(&sLock); - // ToDo: as soon as "/boot" is accessible, we should start throwing away settings -#if 0 - if (--handle->ref_count == 0) { + if (--handle->ref_count == 0 && gBootDevice > 0) { + // don't unload an handle when /boot is not available list_remove_link(&handle->link); } else -#endif handle = NULL; mutex_unlock(&sLock); #endif @@ -696,7 +699,10 @@ // see if we already have these settings loaded mutex_lock(&sLock); handle = find_driver_settings(driverName); - if (handle != NULL) { + if (handle != NULL && handle->ref_count == 0 && gBootDevice > 0) { + // an handle with a zero ref_count should be unloaded if /boot is available + free_settings(handle); + } else if (handle != NULL) { handle->ref_count++; // we got it, now let's see if it already has been parsed From mmu_man at mail.berlios.de Sat Oct 11 17:05:12 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Sat, 11 Oct 2008 17:05:12 +0200 Subject: [Haiku-commits] r27970 - in haiku/trunk: headers/private/graphics src/add-ons/kernel/drivers/graphics Message-ID: <200810111505.m9BF5BJQ004631@sheep.berlios.de> Author: mmu_man Date: 2008-10-11 17:05:11 +0200 (Sat, 11 Oct 2008) New Revision: 27970 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27970&view=rev Removed: haiku/trunk/headers/private/graphics/cirrus/ haiku/trunk/src/add-ons/kernel/drivers/graphics/cirrus/ Log: Remove that cirrus driver I never really started on. QEMU is getting vmware graphics support anyway now. From bonefish at mail.berlios.de Sat Oct 11 17:17:12 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sat, 11 Oct 2008 17:17:12 +0200 Subject: [Haiku-commits] r27971 - in haiku/trunk: build/config_headers src/system/kernel/vm Message-ID: <200810111517.m9BFHC6S006653@sheep.berlios.de> Author: bonefish Date: 2008-10-11 17:17:12 +0200 (Sat, 11 Oct 2008) New Revision: 27971 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27971&view=rev Modified: haiku/trunk/build/config_headers/tracing_config.h haiku/trunk/src/system/kernel/vm/vm.cpp haiku/trunk/src/system/kernel/vm/vm_daemons.cpp haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: * Added kernel tracing for the page daemon and the page writer. * Added some commented out debug output in vm.cpp. Modified: haiku/trunk/build/config_headers/tracing_config.h =================================================================== --- haiku/trunk/build/config_headers/tracing_config.h 2008-10-11 15:05:11 UTC (rev 27970) +++ haiku/trunk/build/config_headers/tracing_config.h 2008-10-11 15:17:12 UTC (rev 27971) @@ -28,6 +28,8 @@ #define KERNEL_HEAP_TRACING 0 #define KTRACE_PRINTF_STACK_TRACE 0 /* stack trace depth */ #define PAGE_ALLOCATION_TRACING 0 +#define PAGE_DAEMON_TRACING 0 +#define PAGE_WRITER_TRACING 0 #define PARANOIA_TRACING 0 #define PARANOIA_TRACING_STACK_TRACE 0 /* stack trace depth */ #define OBJECT_CACHE_TRACING 0 Modified: haiku/trunk/src/system/kernel/vm/vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 15:05:11 UTC (rev 27970) +++ haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 15:17:12 UTC (rev 27971) @@ -1529,6 +1529,9 @@ // grab a ref to the address space (the area holds this) atomic_add(&addressSpace->ref_count, 1); +// ktrace_printf("map_backing_store: cache: %p (source: %p), \"%s\" -> %p", +// cache, sourceCache, areaName, area); + *_area = area; return B_OK; @@ -4717,6 +4720,10 @@ return B_BAD_ADDRESS; } +// ktrace_printf("page fault: %s %#lx, %s, area: %p", +// isWrite ? "write" : "read", originalAddress, isUser ? "user" : "kernel", +// area); + // check permissions uint32 protection = get_area_page_protection(area, address); if (isUser && (protection & B_USER_PROTECTION) == 0) { Modified: haiku/trunk/src/system/kernel/vm/vm_daemons.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-11 15:05:11 UTC (rev 27970) +++ haiku/trunk/src/system/kernel/vm/vm_daemons.cpp 2008-10-11 15:17:12 UTC (rev 27971) @@ -12,6 +12,7 @@ #include +#include #include #include #include @@ -109,6 +110,84 @@ // #pragma mark - +#if PAGE_DAEMON_TRACING + +namespace PageDaemonTracing { + +class ActivatePage : public AbstractTraceEntry { + public: + ActivatePage(vm_page* page) + : + fCache(page->cache), + fPage(page) + { + Initialized(); + } + + virtual void AddDump(TraceOutput& out) + { + out.Print("page activated: %p, cache: %p", fPage, fCache); + } + + private: + VMCache* fCache; + vm_page* fPage; +}; + + +class DeactivatePage : public AbstractTraceEntry { + public: + DeactivatePage(vm_page* page) + : + fCache(page->cache), + fPage(page) + { + Initialized(); + } + + virtual void AddDump(TraceOutput& out) + { + out.Print("page deactivated: %p, cache: %p", fPage, fCache); + } + + private: + VMCache* fCache; + vm_page* fPage; +}; + + +class FreedPageSwap : public AbstractTraceEntry { + public: + FreedPageSwap(vm_page* page) + : + fCache(page->cache), + fPage(page) + { + Initialized(); + } + + virtual void AddDump(TraceOutput& out) + { + out.Print("page swap freed: %p, cache: %p", fPage, fCache); + } + + private: + VMCache* fCache; + vm_page* fPage; +}; + +} // namespace PageDaemonTracing + +# define T(x) new(std::nothrow) PageDaemonTracing::x + +#else +# define T(x) +#endif // PAGE_DAEMON_TRACING + + +// #pragma mark - + + #ifdef TRACK_PAGE_USAGE_STATS static void @@ -205,6 +284,7 @@ vm_page_set_state(page, PAGE_STATE_ACTIVE); page->usage_count = 1; TRACE(("page %p -> move to active\n", page)); + T(ActivatePage(page)); } else if (page->usage_count < 127) page->usage_count++; @@ -237,6 +317,7 @@ else vm_page_set_state(page, PAGE_STATE_INACTIVE); TRACE(("page %p -> move to inactive\n", page)); + T(DeactivatePage(page)); } return true; @@ -260,6 +341,7 @@ // We need to mark the page modified, since otherwise it could be // stolen and we'd lose its data. vm_page_set_state(page, PAGE_STATE_MODIFIED); + T(FreedPageSwap(page)); return true; } } @@ -299,7 +381,7 @@ * pagesLeft / sLowPagesCount; uint32 leftToFree = sLowPagesCount - pagesLeft; TRACE(("wait interval %Ld, scan pages %lu, free %lu, " - "target %lu\n", scanWaitInterval, scanPagesCount, + "target %lu\n", scanWaitInterval, scanPagesCount, pagesLeft, leftToFree)); for (uint32 i = 0; i < scanPagesCount && leftToFree > 0; i++) { Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-11 15:05:11 UTC (rev 27970) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-11 15:17:12 UTC (rev 27971) @@ -230,6 +230,39 @@ #endif // PAGE_ALLOCATION_TRACING +#if PAGE_WRITER_TRACING + +namespace PageWriterTracing { + +class WritePage : public AbstractTraceEntry { + public: + WritePage(vm_page* page) + : + fCache(page->cache), + fPage(page) + { + Initialized(); + } + + virtual void AddDump(TraceOutput& out) + { + out.Print("page write: %p, cache: %p", fPage, fCache); + } + + private: + VMCache* fCache; + vm_page* fPage; +}; + +} // namespace PageWriterTracing + +# define TPW(x) new(std::nothrow) PageWriterTracing::x + +#else +# define TPW(x) +#endif // PAGE_WRITER_TRACING + + /*! Dequeues a page from the head of the given queue */ static vm_page * dequeue_page(page_queue *queue) @@ -1222,6 +1255,8 @@ locker.Unlock(); //dprintf("write page %p, cache %p (%ld)\n", page, page->cache, page->cache->ref_count); + TPW(WritePage(page)); + vm_clear_map_flags(page, PAGE_MODIFIED); cache->AcquireRefLocked(); numPages++; From korli at mail.berlios.de Sat Oct 11 17:31:16 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sat, 11 Oct 2008 17:31:16 +0200 Subject: [Haiku-commits] r27972 - haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich Message-ID: <200810111531.m9BFVG5t009126@sheep.berlios.de> Author: korli Date: 2008-10-11 17:31:15 +0200 (Sat, 11 Oct 2008) New Revision: 27972 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27972&view=rev Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.h haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c Log: moved the check for settings like sample rate, buffer count, buffer frames in open() changes on auich.settings are now taken into account when restarting media_server Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c 2008-10-11 15:17:12 UTC (rev 27971) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c 2008-10-11 15:31:15 UTC (rev 27972) @@ -721,30 +721,13 @@ void *settings_handle; pci_info info; num_cards = 0; - + PRINT(("init_driver()\n")); // get driver settings - settings_handle = load_driver_settings("auich.settings"); + settings_handle = load_driver_settings(AUICH_SETTINGS); if (settings_handle != NULL) { - const char *item; - char *end; - uint32 value; - - item = get_driver_parameter (settings_handle, "sample_rate", "48000", "48000"); - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.sample_rate = value; - - item = get_driver_parameter (settings_handle, "buffer_frames", "256", "256"); - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.buffer_frames = value; - - item = get_driver_parameter (settings_handle, "buffer_count", "4", "4"); - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.buffer_count = value; - current_settings.use_thread = get_driver_boolean_parameter (settings_handle, "use_thread", false, false); - unload_driver_settings (settings_handle); } Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.h =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.h 2008-10-11 15:17:12 UTC (rev 27971) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.h 2008-10-11 15:31:15 UTC (rev 27972) @@ -167,6 +167,8 @@ } auich_dev; +#define AUICH_SETTINGS "auich.settings" + typedef struct { uint32 sample_rate; uint32 buffer_frames; Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c 2008-10-11 15:17:12 UTC (rev 27971) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/multi.c 2008-10-11 15:31:15 UTC (rev 27972) @@ -29,6 +29,7 @@ * */ +#include #include #include #include @@ -43,6 +44,7 @@ #include "util.h" #include "io.h" + static void auich_ac97_get_mix(void *card, const void *cookie, int32 type, float *values) { auich_dev *dev = (auich_dev*)card; @@ -1011,6 +1013,7 @@ auich_open(const char *name, uint32 flags, void** cookie) { auich_dev *card = NULL; + void *settings_handle; int ix; LOG(("open()\n")); @@ -1039,6 +1042,31 @@ *cookie = card; card->multi.card = card; + // get driver settings + settings_handle = load_driver_settings(AUICH_SETTINGS); + if (settings_handle != NULL) { + const char *item; + char *end; + uint32 value; + + item = get_driver_parameter (settings_handle, "sample_rate", "48000", "48000"); + value = strtoul (item, &end, 0); + if (*end == '\0') + current_settings.sample_rate = value; + + item = get_driver_parameter (settings_handle, "buffer_frames", "256", "256"); + value = strtoul (item, &end, 0); + if (*end == '\0') + current_settings.buffer_frames = value; + + item = get_driver_parameter (settings_handle, "buffer_count", "4", "4"); + value = strtoul (item, &end, 0); + if (*end == '\0') + current_settings.buffer_count = value; + + unload_driver_settings(settings_handle); + } + LOG(("stream_new\n")); card->rstream = auich_stream_new(card, AUICH_USE_RECORD, current_settings.buffer_frames, current_settings.buffer_count); From zooey at mail.berlios.de Sat Oct 11 19:28:58 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Sat, 11 Oct 2008 19:28:58 +0200 Subject: [Haiku-commits] r27973 - haiku/trunk/headers/private/net Message-ID: <200810111728.m9BHSwES009250@sheep.berlios.de> Author: zooey Date: 2008-10-11 19:28:57 +0200 (Sat, 11 Oct 2008) New Revision: 27973 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27973&view=rev Modified: haiku/trunk/headers/private/net/ProtocolUtilities.h Log: * we no longer demand the socket that receives a broadcast datagram to have the SO_BROADCAST flags set (the flag is only needed for sending a broadcast) - fixes part of #2065 Modified: haiku/trunk/headers/private/net/ProtocolUtilities.h =================================================================== --- haiku/trunk/headers/private/net/ProtocolUtilities.h 2008-10-11 15:31:15 UTC (rev 27972) +++ haiku/trunk/headers/private/net/ProtocolUtilities.h 2008-10-11 17:28:57 UTC (rev 27973) @@ -199,13 +199,6 @@ DECL_DATAGRAM_SOCKET(inline status_t)::_SocketEnqueue(net_buffer *_buffer) { - if (_buffer->flags & MSG_BCAST) { - // only deliver datagrams sent to a broadcast address - // to sockets with SO_BROADCAST on. - if (!(fSocket->options & SO_BROADCAST)) - return B_OK; - } - net_buffer *buffer = ModuleBundle::Buffer()->clone(_buffer, false); if (buffer == NULL) return B_NO_MEMORY; From bga at bug-br.org.br Sat Oct 11 20:11:01 2008 From: bga at bug-br.org.br (Bruno Albuquerque) Date: Sat, 11 Oct 2008 15:11:01 -0300 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> Message-ID: <48F0EC35.1070408@bug-br.org.br> David McPaul escreveu: > I have committed a fix for this. Let me know if there are any issues. Yep. It is way better, but seeking is broken on that same file now. Ideas? -Bruno -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: multipart/alternative Size: 1 bytes Desc: not available URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.173 / Virus Database: 270.8.0/1720 - Release Date: 11/10/2008 15:59 From bonefish at mail.berlios.de Sat Oct 11 20:11:13 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sat, 11 Oct 2008 20:11:13 +0200 Subject: [Haiku-commits] r27974 - in haiku/trunk: headers/private/kernel src/system/kernel Message-ID: <200810111811.m9BIBDr7015966@sheep.berlios.de> Author: bonefish Date: 2008-10-11 20:11:12 +0200 (Sat, 11 Oct 2008) New Revision: 27974 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27974&view=rev Modified: haiku/trunk/headers/private/kernel/thread.h haiku/trunk/headers/private/kernel/thread_types.h haiku/trunk/src/system/kernel/scheduler.cpp haiku/trunk/src/system/kernel/thread.cpp Log: Added functions to pin a thread to the current CPU (i.e. it will only be scheduled on that CPU) and to avoid unscheduling it. Modified: haiku/trunk/headers/private/kernel/thread.h =================================================================== --- haiku/trunk/headers/private/kernel/thread.h 2008-10-11 17:28:57 UTC (rev 27973) +++ haiku/trunk/headers/private/kernel/thread.h 2008-10-11 18:11:12 UTC (rev 27974) @@ -205,4 +205,32 @@ } +static inline void +thread_pin_to_current_cpu(struct thread* thread) +{ + thread->pinned_to_cpu++; +} + + +static inline void +thread_unpin_from_current_cpu(struct thread* thread) +{ + thread->pinned_to_cpu--; +} + + +static inline void +thread_disable_scheduling(struct thread* thread) +{ + thread->keep_scheduled++; +} + + +static inline void +thread_enable_scheduling(struct thread* thread) +{ + thread->keep_scheduled--; +} + + #endif /* _THREAD_H */ Modified: haiku/trunk/headers/private/kernel/thread_types.h =================================================================== --- haiku/trunk/headers/private/kernel/thread_types.h 2008-10-11 17:28:57 UTC (rev 27973) +++ haiku/trunk/headers/private/kernel/thread_types.h 2008-10-11 18:11:12 UTC (rev 27974) @@ -230,6 +230,9 @@ int32 state; int32 next_state; struct cpu_ent *cpu; + struct cpu_ent *previous_cpu; + int32 pinned_to_cpu; + int32 keep_scheduled; sigset_t sig_pending; sigset_t sig_block_mask; Modified: haiku/trunk/src/system/kernel/scheduler.cpp =================================================================== --- haiku/trunk/src/system/kernel/scheduler.cpp 2008-10-11 17:28:57 UTC (rev 27973) +++ haiku/trunk/src/system/kernel/scheduler.cpp 2008-10-11 18:11:12 UTC (rev 27974) @@ -543,7 +543,7 @@ if ((fromThread->flags & THREAD_FLAGS_DEBUGGER_INSTALLED) != 0) user_debug_thread_unscheduled(fromThread); - toThread->cpu = fromThread->cpu; + toThread->previous_cpu = toThread->cpu = fromThread->cpu; fromThread->cpu = NULL; arch_thread_set_current_thread(toThread); @@ -560,8 +560,11 @@ static int32 reschedule_event(timer *unused) { - // this function is called as a result of the timer event set by the scheduler - // returning this causes a reschedule on the timer event + if (thread_get_current_thread()->keep_scheduled > 0) + return B_HANDLED_INTERRUPT; + + // this function is called as a result of the timer event set by the + // scheduler returning this causes a reschedule on the timer event thread_get_current_thread()->cpu->preempted = 1; return B_INVOKE_SCHEDULER; } @@ -617,6 +620,14 @@ } #endif + // skip thread, if it doesn't want to run on this CPU + if (nextThread->pinned_to_cpu > 0 + && nextThread->previous_cpu != oldThread->cpu) { + prevThread = nextThread; + nextThread = nextThread->queue_next; + continue; + } + // always extract real time threads if (nextThread->priority >= B_FIRST_REAL_TIME_PRIORITY) break; Modified: haiku/trunk/src/system/kernel/thread.cpp =================================================================== --- haiku/trunk/src/system/kernel/thread.cpp 2008-10-11 17:28:57 UTC (rev 27973) +++ haiku/trunk/src/system/kernel/thread.cpp 2008-10-11 18:11:12 UTC (rev 27974) @@ -223,6 +223,9 @@ thread->id = threadID >= 0 ? threadID : allocate_thread_id(); thread->team = NULL; thread->cpu = cpu; + thread->previous_cpu = NULL; + thread->pinned_to_cpu = 0; + thread->keep_scheduled = 0; thread->fault_handler = 0; thread->page_faults_allowed = 1; thread->kernel_stack_area = -1; From bonefish at mail.berlios.de Sat Oct 11 20:12:10 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sat, 11 Oct 2008 20:12:10 +0200 Subject: [Haiku-commits] r27975 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200810111812.m9BICA22016063@sheep.berlios.de> Author: bonefish Date: 2008-10-11 20:12:10 +0200 (Sat, 11 Oct 2008) New Revision: 27975 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27975&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp Log: Don't disable interrupts in flush_tmap() and map_iospace_chunk(), just pin the thread to the current CPU. Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-11 18:11:12 UTC (rev 27974) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-11 18:12:10 UTC (rev 27975) @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -648,12 +649,11 @@ static void flush_tmap(vm_translation_map *map) { - cpu_status state; - if (map->arch_data->num_invalidate_pages <= 0) return; - state = disable_interrupts(); + struct thread* thread = thread_get_current_thread(); + thread_pin_to_current_cpu(thread); if (map->arch_data->num_invalidate_pages > PAGE_INVALIDATE_CACHE_SIZE) { // invalidate all pages @@ -701,7 +701,7 @@ } map->arch_data->num_invalidate_pages = 0; - restore_interrupts(state); + thread_unpin_from_current_cpu(thread); } @@ -711,7 +711,6 @@ int i; page_table_entry *pt; addr_t ppn; - int state; pa &= ~(B_PAGE_SIZE - 1); // make sure it's page aligned va &= ~(B_PAGE_SIZE - 1); // make sure it's page aligned @@ -729,12 +728,13 @@ pt[i].global = 1; } - state = disable_interrupts(); + struct thread* thread = thread_get_current_thread(); + thread_pin_to_current_cpu(thread); arch_cpu_invalidate_TLB_range(va, va + (IOSPACE_CHUNK_SIZE - B_PAGE_SIZE)); smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_RANGE, va, va + (IOSPACE_CHUNK_SIZE - B_PAGE_SIZE), 0, NULL, SMP_MSG_FLAG_SYNC); - restore_interrupts(state); + thread_unpin_from_current_cpu(thread); return B_OK; } From stippi at mail.berlios.de Sat Oct 11 20:25:38 2008 From: stippi at mail.berlios.de (stippi at mail.berlios.de) Date: Sat, 11 Oct 2008 20:25:38 +0200 Subject: [Haiku-commits] r27976 - haiku/trunk/src/servers/app Message-ID: <200810111825.m9BIPcLp017474@sheep.berlios.de> Author: stippi Date: 2008-10-11 20:25:36 +0200 (Sat, 11 Oct 2008) New Revision: 27976 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27976&view=rev Modified: haiku/trunk/src/servers/app/WorkspacesView.cpp Log: Polished the rendering of the miniature windows in Workspaces. * The window names are now drawn. * The window scaling is improved to avoid wobbly placement when windows move slightly. * The tab rect is scaled to size, not a single line. Modified: haiku/trunk/src/servers/app/WorkspacesView.cpp =================================================================== --- haiku/trunk/src/servers/app/WorkspacesView.cpp 2008-10-11 18:12:10 UTC (rev 27975) +++ haiku/trunk/src/servers/app/WorkspacesView.cpp 2008-10-11 18:25:36 UTC (rev 27976) @@ -150,15 +150,22 @@ BRect frame = windowFrame; frame.OffsetTo(windowPosition); + // scale down the rect float factor = workspaceFrame.Width() / screenFrame.Width(); - frame.left = rintf(frame.left * factor); - frame.right = rintf(frame.right * factor); + frame.left = frame.left * factor; + frame.right = frame.right * factor; factor = workspaceFrame.Height() / screenFrame.Height(); - frame.top = rintf(frame.top * factor); - frame.bottom = rintf(frame.bottom * factor); + frame.top = frame.top * factor; + frame.bottom = frame.bottom * factor; - frame.OffsetBy(workspaceFrame.LeftTop()); + // offset by the workspace fame position + // and snap to integer coordinates without distorting the size too much + frame.OffsetTo(rintf(frame.left + workspaceFrame.left), + rintf(frame.top + workspaceFrame.top)); + frame.right = rintf(frame.right); + frame.bottom = rintf(frame.bottom); + return frame; } @@ -181,7 +188,8 @@ tabFrame = _WindowFrame(workspaceFrame, screenFrame, tabFrame, tabFrame.LeftTop() - offset); - if (!workspaceFrame.Intersects(frame) && !workspaceFrame.Intersects(tabFrame)) + if (!workspaceFrame.Intersects(frame) + && !workspaceFrame.Intersects(tabFrame)) return; // ToDo: let decorator do this! @@ -206,48 +214,55 @@ if (tabFrame.right >= frame.right) tabFrame.right = frame.right - 1; - tabFrame.top = frame.top - 1; tabFrame.bottom = frame.top - 1; + tabFrame.top = min_c(tabFrame.top, tabFrame.bottom); tabFrame = tabFrame & workspaceFrame; if (decorator != NULL && tabFrame.IsValid()) { - drawingEngine->StrokeLine(tabFrame.LeftTop(), tabFrame.RightBottom(), yellow); + drawingEngine->FillRect(tabFrame, yellow); backgroundRegion.Exclude(tabFrame); } drawingEngine->StrokeRect(frame, frameColor); + BRect fillFrame = frame.InsetByCopy(1, 1) & workspaceFrame; frame = frame & workspaceFrame; - if (frame.IsValid()) { - drawingEngine->FillRect(frame.InsetByCopy(1, 1), white); - backgroundRegion.Exclude(frame); - } + if (!frame.IsValid()) + return; + // fill the window itself + drawingEngine->FillRect(fillFrame, white); + // draw title - // TODO: disabled because it's much too slow this way - the mini-window - // functionality should probably be moved into the Window class, - // so that it has only to be recalculated on demand. With double buffered - // windows, this would also open up the door to have a more detailed - // preview. -#if 0 + // TODO: the mini-window functionality should probably be moved into the + // Window class, so that it has only to be recalculated on demand. With + // double buffered windows, this would also open up the door to have a + // more detailed preview. BString title(window->Title()); - ServerFont font = fDrawState->Font(); - font.SetSize(7); - fDrawState->SetFont(font); + const ServerFont& font = fDrawState->Font(); - fDrawState->Font().TruncateString(&title, B_TRUNCATE_END, frame.Width() - 4); - float width = drawingEngine->StringWidth(title.String(), title.Length(), - fDrawState, NULL); - float height = drawingEngine->StringHeight(title.String(), title.Length(), - fDrawState); + font.TruncateString(&title, B_TRUNCATE_END, fillFrame.Width() - 4); + font_height fontHeight; + font.GetHeight(fontHeight); + float height = ceilf(fontHeight.ascent) + ceilf(fontHeight.descent); + if (title.Length() > 0 && height < frame.Height() - 2) { + rgb_color textColor = tint_color(white, B_DARKEN_4_TINT); + drawingEngine->SetHighColor(textColor); + drawingEngine->SetLowColor(white); - drawingEngine->DrawString(title.String(), title.Length(), - BPoint(frame.left + (frame.Width() - width) / 2, - frame.top + (frame.Height() + height) / 2), - fDrawState, NULL); -#endif + float width = font.StringWidth(title.String(), title.Length()); + + BPoint textOffset; + textOffset.x = rintf(frame.left + (frame.Width() - width) / 2); + textOffset.y = rintf(frame.top + (frame.Height() - height) / 2 + + fontHeight.ascent); + drawingEngine->DrawString(title.String(), title.Length(), textOffset); + } + + // prevent the next window down from drawing over this window + backgroundRegion.Exclude(frame); } @@ -286,6 +301,12 @@ backgroundRegion.IntersectWith(&workspaceRegion); drawingEngine->ConstrainClippingRegion(&backgroundRegion); + ServerFont font = fDrawState->Font(); + font.SetSize(ceilf(max_c(9.0, + min_c(Frame().Height(), Frame().Width()) / 15))); + fDrawState->SetFont(font); + drawingEngine->SetFont(font); + // We draw from top down and cut the window out of the clipping region // which reduces the flickering ::Window* window; From axeld at mail.berlios.de Sat Oct 11 22:06:05 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 11 Oct 2008 22:06:05 +0200 Subject: [Haiku-commits] r27977 - haiku/trunk/src/servers/app Message-ID: <200810112006.m9BK65XU028468@sheep.berlios.de> Author: axeld Date: 2008-10-11 22:06:04 +0200 (Sat, 11 Oct 2008) New Revision: 27977 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27977&view=rev Modified: haiku/trunk/src/servers/app/WorkspacesView.cpp haiku/trunk/src/servers/app/WorkspacesView.h Log: * If you click on a window in the Workspaces view, it won't move until you move the mouse a bit more. This should help with "fast" workspace switches when you click on a workspace and accidently move the mouse a bit. Modified: haiku/trunk/src/servers/app/WorkspacesView.cpp =================================================================== --- haiku/trunk/src/servers/app/WorkspacesView.cpp 2008-10-11 18:25:36 UTC (rev 27976) +++ haiku/trunk/src/servers/app/WorkspacesView.cpp 2008-10-11 20:06:04 UTC (rev 27977) @@ -467,6 +467,7 @@ fLeftTopOffset = where - windowFrame.LeftTop(); fSelectedWorkspace = index; + fClickPoint = where; if (index >= 0) _Invalidate(); @@ -550,10 +551,15 @@ leftTop = fSelectedWindow->Anchor(fSelectedWorkspace).position; } - Window()->Desktop()->MoveWindowBy(fSelectedWindow, left - leftTop.x, top - leftTop.y, - fSelectedWorkspace); + float diff = (fClickPoint.x - where.x) * (fClickPoint.x - where.x) + + (fClickPoint.y - where.y) * (fClickPoint.y - where.y); + if (!fHasMoved && diff > 4) + fHasMoved = true; - fHasMoved = true; + if (fHasMoved) { + Window()->Desktop()->MoveWindowBy(fSelectedWindow, left - leftTop.x, + top - leftTop.y, fSelectedWorkspace); + } } Modified: haiku/trunk/src/servers/app/WorkspacesView.h =================================================================== --- haiku/trunk/src/servers/app/WorkspacesView.h 2008-10-11 18:25:36 UTC (rev 27976) +++ haiku/trunk/src/servers/app/WorkspacesView.h 2008-10-11 20:06:04 UTC (rev 27977) @@ -56,6 +56,7 @@ ::Window* fSelectedWindow; int32 fSelectedWorkspace; bool fHasMoved; + BPoint fClickPoint; BPoint fLeftTopOffset; }; From axeld at mail.berlios.de Sat Oct 11 22:16:35 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sat, 11 Oct 2008 22:16:35 +0200 Subject: [Haiku-commits] r27978 - haiku/trunk/src/add-ons/kernel/file_systems/bfs Message-ID: <200810112016.m9BKGZG0029329@sheep.berlios.de> Author: axeld Date: 2008-10-11 22:16:35 +0200 (Sat, 11 Oct 2008) New Revision: 27978 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27978&view=rev Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp Log: * Use a block size of 512 - since there is no standard, we're just following the masses (whatever stupidity created this misery). Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp 2008-10-11 20:06:04 UTC (rev 27977) +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp 2008-10-11 20:16:35 UTC (rev 27978) @@ -56,8 +56,7 @@ } else stat.st_size = inode->Size(); - stat.st_blocks = inode->AllocatedSize() / node.InodeSize(); - // TODO: decide for a unit to use for st_blocks! + stat.st_blocks = inode->AllocatedSize() / 512; } From anevilyak at gmail.com Sat Oct 11 22:45:49 2008 From: anevilyak at gmail.com (Rene Gollent) Date: Sat, 11 Oct 2008 15:45:49 -0500 Subject: [Haiku-commits] r27975 - haiku/trunk/src/system/kernel/arch/x86 In-Reply-To: <200810111812.m9BICA22016063@sheep.berlios.de> References: <200810111812.m9BICA22016063@sheep.berlios.de> Message-ID: On Sat, Oct 11, 2008 at 1:12 PM, bonefish at BerliOS wrote: > Author: bonefish > Date: 2008-10-11 20:12:10 +0200 (Sat, 11 Oct 2008) > New Revision: 27975 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27975&view=rev > > Modified: > haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp > Log: > Don't disable interrupts in flush_tmap() and map_iospace_chunk(), just > pin the thread to the current CPU. > > Should this change have made much of a performance difference? I might be imagining it, but the "Patience..." portion of jam at least seems measurably faster on my a64 compared to before this revision. Regards, Rene From bonefish at mail.berlios.de Sat Oct 11 22:55:34 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sat, 11 Oct 2008 22:55:34 +0200 Subject: [Haiku-commits] r27979 - in haiku/trunk: headers/private/system src/add-ons/kernel/bus_managers/ide src/add-ons/kernel/bus_managers/scsi src/add-ons/kernel/busses/scsi/ahci src/system/kernel/arch/generic src/system/kernel/arch/m68k src/system/kernel/arch/ppc src/system/kernel/arch/x86 src/system/kernel/cache src/system/kernel/vm Message-ID: <200810112055.m9BKtYr0000848@sheep.berlios.de> Author: bonefish Date: 2008-10-11 22:55:32 +0200 (Sat, 11 Oct 2008) New Revision: 27979 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27979&view=rev Modified: haiku/trunk/headers/private/system/vm_defs.h haiku/trunk/src/add-ons/kernel/bus_managers/ide/emulation.c haiku/trunk/src/add-ons/kernel/bus_managers/ide/pio.c haiku/trunk/src/add-ons/kernel/bus_managers/scsi/dma_buffer.c haiku/trunk/src/add-ons/kernel/bus_managers/scsi/emulation.c haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/util.c haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.cpp haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.h haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp haiku/trunk/src/system/kernel/cache/file_cache.cpp haiku/trunk/src/system/kernel/vm/vm.cpp haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: * Replaced the vm_get_physical_page() "flags" PHYSICAL_PAGE_{NO,CAN}_WAIT into an actual flag PHYSICAL_PAGE_DONT_WAIT. * Pass the flags through to the chunk mapper callback. Modified: haiku/trunk/headers/private/system/vm_defs.h =================================================================== --- haiku/trunk/headers/private/system/vm_defs.h 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/headers/private/system/vm_defs.h 2008-10-11 20:55:32 UTC (rev 27979) @@ -49,8 +49,7 @@ // flags for vm_get_physical_page() enum { - PHYSICAL_PAGE_NO_WAIT = 0, - PHYSICAL_PAGE_CAN_WAIT, + PHYSICAL_PAGE_DONT_WAIT = 0x01 }; // mapping argument for several internal VM functions Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ide/emulation.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/ide/emulation.c 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/add-ons/kernel/bus_managers/ide/emulation.c 2008-10-11 20:55:32 UTC (rev 27979) @@ -43,7 +43,7 @@ request->data_resid = request->data_length - transferSize; - // normally, all flags are set to "success", but for Request Sense + // normally, all flags are set to "success", but for Request Sense // this would have overwritten the sense we want to read device->subsys_status = SCSI_REQ_CMP; request->device_status = SCSI_STATUS_GOOD; @@ -68,7 +68,7 @@ int sgCount = request->sg_count; int requestSize; - SHOW_FLOW(3, "offset=%u, req_size_limit=%d, size=%d, sg_list=%p, sg_cnt=%d, %s buffer", + SHOW_FLOW(3, "offset=%u, req_size_limit=%d, size=%d, sg_list=%p, sg_cnt=%d, %s buffer", offset, allocationLength, size, sgList, sgCount, toBuffer ? "to" : "from"); // skip unused S/G entries @@ -81,7 +81,7 @@ if (sgCount == 0) return 0; - // remaining bytes we are allowed to copy from/to request + // remaining bytes we are allowed to copy from/to request requestSize = min(allocationLength, request->data_length) - offset; // copy one S/G entry at a time @@ -92,8 +92,8 @@ bytes = min(size, requestSize); bytes = min(bytes, sgList->size); - if (vm_get_physical_page((addr_t)sgList->address, &virtualAddress, - PHYSICAL_PAGE_CAN_WAIT) != B_OK) + if (vm_get_physical_page((addr_t)sgList->address, &virtualAddress, 0) + != B_OK) return false; SHOW_FLOW(4, "buffer=%p, virt_addr=%p, bytes=%d, to_buffer=%d", Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ide/pio.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/ide/pio.c 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/add-ons/kernel/bus_managers/ide/pio.c 2008-10-11 20:55:32 UTC (rev 27979) @@ -9,30 +9,30 @@ PIO data transmission This file is more difficult then you might expect as the SCSI system - uses physical addresses everywhere which have to be mapped into + uses physical addresses everywhere which have to be mapped into virtual address space during transmission. Additionally, during ATAPI commands we may have to transmit more data then exist because the - data len specified by the command doesn't need to be the same as + data len specified by the command doesn't need to be the same as of the data buffer provided. - - The handling of S/G entries of odd size may look superfluous as the + + The handling of S/G entries of odd size may look superfluous as the SCSI bus manager can take care of that. In general, this would be possible as most controllers need even alignment for DMA as well, but some can handle _any_ S/G list and it wouldn't be sensitive to enforce stricter alignement just for some rare PIO transmissions. - + Little hint for the meaning of "transferred": this is the number of bytes sent over the bus. For read-transmissions, this may be one more then copied into the buffer (the extra byte read is stored in device->odd_byte), for write-transmissions, this may be one less (the waiting byte is pending in device->odd_byte). - + In terms of error handling: we don't bother checking transmission of every - single byte via read/write_pio(). At least at the end of the request, when + single byte via read/write_pio(). At least at the end of the request, when the status bits are verified, we will see that something has gone wrong. - + TBD: S/G entries may have odd start address. For non-Intel architecture - we either have to copy data to an aligned buffer or have to modify + we either have to copy data to an aligned buffer or have to modify PIO-handling in controller drivers. */ @@ -73,7 +73,7 @@ if (write) { // if there is a byte left from last chunk, transmit it together - // with the first byte of the current chunk (IDE requires 16 bits + // with the first byte of the current chunk (IDE requires 16 bits // to be transmitted at once) if (device->has_odd_byte) { uint8 buffer[2]; @@ -90,7 +90,7 @@ controller->write_pio(channel_cookie, (uint16 *)virtualAddress, length / 2, false); - // take care if chunk size was odd, which means that 1 byte remains + // take care if chunk size was odd, which means that 1 byte remains virtualAddress += length & ~1; *transferred += length & ~1; @@ -111,7 +111,7 @@ length / 2, false); // take care of odd chunk size; - // in this case we read 1 byte to few! + // in this case we read 1 byte to few! virtualAddress += length & ~1; *transferred += length & ~1; @@ -150,15 +150,14 @@ SHOW_FLOW(4, "Transmitting to/from physical address %lx, %d bytes left", physicalAddress, length); - if (vm_get_physical_page(physicalAddress, &virtualAddress, - PHYSICAL_PAGE_CAN_WAIT) != B_OK) { + if (vm_get_physical_page(physicalAddress, &virtualAddress, 0) != B_OK) { // ouch: this should never ever happen set_sense(device, SCSIS_KEY_HARDWARE_ERROR, SCSIS_ASC_INTERNAL_FAILURE); return B_ERROR; } // if chunks starts in the middle of a page, we have even less then - // a page left + // a page left page_left = B_PAGE_SIZE - physicalAddress % B_PAGE_SIZE; SHOW_FLOW(4, "page_left=%d", page_left); @@ -175,7 +174,7 @@ if (err != B_OK) return err; - length -= cur_len; + length -= cur_len; physicalAddress += cur_len; } @@ -242,7 +241,7 @@ int cur_len; // if device asks for odd number of bytes, append an extra byte to - // make length even (this is the "length + 1" term) + // make length even (this is the "length + 1" term) cur_len = min(length + 1, (int)(sizeof(buffer))) / 2; bus->controller->write_pio(bus->channel_cookie, (uint16 *)buffer, cur_len, false); Modified: haiku/trunk/src/add-ons/kernel/bus_managers/scsi/dma_buffer.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/scsi/dma_buffer.c 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/add-ons/kernel/bus_managers/scsi/dma_buffer.c 2008-10-11 20:55:32 UTC (rev 27979) @@ -119,8 +119,8 @@ bytes = min( size, sg_list->size ); - if (vm_get_physical_page((addr_t)sg_list->address, &virtualAddress, - PHYSICAL_PAGE_CAN_WAIT) != B_OK) + if (vm_get_physical_page((addr_t)sg_list->address, &virtualAddress, 0) + != B_OK) return false; if (to_buffer) Modified: haiku/trunk/src/add-ons/kernel/bus_managers/scsi/emulation.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/scsi/emulation.c 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/add-ons/kernel/bus_managers/scsi/emulation.c 2008-10-11 20:55:32 UTC (rev 27979) @@ -464,8 +464,8 @@ bytes = min(size, req_size); bytes = min(bytes, sg_list->size); - if (vm_get_physical_page((addr_t)sg_list->address, (void *)&virtualAddress, - PHYSICAL_PAGE_CAN_WAIT) != B_OK) + if (vm_get_physical_page((addr_t)sg_list->address, + (void*)&virtualAddress, 0) != B_OK) return false; SHOW_FLOW(0, "buffer = %p, virt_addr = %#lx, bytes = %lu, to_buffer = %d", Modified: haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/util.c =================================================================== --- haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/util.c 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/add-ons/kernel/busses/scsi/ahci/util.c 2008-10-11 20:55:32 UTC (rev 27979) @@ -93,8 +93,8 @@ size_t size = min_c(dataSize, sgTable[i].size); addr_t address; - if (vm_get_physical_page((addr_t)sgTable[i].address, &address, - PHYSICAL_PAGE_CAN_WAIT) < B_OK) + if (vm_get_physical_page((addr_t)sgTable[i].address, &address, 0) + < B_OK) return B_ERROR; TRACE("sg_memcpy phyAddr %p, addr %p, size %lu\n", sgTable[i].address, (void *)address, size); Modified: haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -90,7 +90,8 @@ break; } - sMapIOSpaceChunk(paddr_desc[index].va, index * sIOSpaceChunkSize); + sMapIOSpaceChunk(paddr_desc[index].va, index * sIOSpaceChunkSize, + flags); mutex_unlock(&sMutex); return B_OK; @@ -99,7 +100,7 @@ // replace an earlier mapping if (queue_peek(&mapped_paddr_lru) == NULL) { // no free slots available - if (flags == PHYSICAL_PAGE_NO_WAIT) { + if ((flags & PHYSICAL_PAGE_DONT_WAIT) != 0) { // put back to the caller and let them handle this mutex_unlock(&sMutex); return B_NO_MEMORY; @@ -123,7 +124,7 @@ virtual_pmappings[(*va - sIOSpaceBase) / sIOSpaceChunkSize] = paddr_desc + index; - sMapIOSpaceChunk(paddr_desc[index].va, index * sIOSpaceChunkSize); + sMapIOSpaceChunk(paddr_desc[index].va, index * sIOSpaceChunkSize, flags); mutex_unlock(&sMutex); return B_OK; Modified: haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.h =================================================================== --- haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.h 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/arch/generic/generic_vm_physical_page_mapper.h 2008-10-11 20:55:32 UTC (rev 27979) @@ -12,7 +12,8 @@ extern "C" { #endif -typedef status_t (*generic_map_iospace_chunk_func)(addr_t, addr_t); +typedef status_t (*generic_map_iospace_chunk_func)(addr_t virtualAddress, + addr_t physicalAddress, uint32 flags); status_t generic_get_physical_page(addr_t pa, addr_t *va, uint32 flags); status_t generic_put_physical_page(addr_t va); Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -17,10 +17,10 @@ #endif /* (mmu_man) Implementation details on 68030 and others: - + Unlike on x86 we can't just switch the context to another team by just setting a register to another page directory, since we only have one - page table containing both kernel and user address mappings. + page table containing both kernel and user address mappings. The 030 supports arbitrary layout of the page directory tree, including a 1-bit first level (2 entries top level table) that would map kernel and user land at a single place. But 040 and later only support a fixed @@ -28,7 +28,7 @@ Since 68k SMP hardware is rare enough we don't want to support them, we can take some shortcuts. - + As we don't want a separate user and kernel space, we'll use a single table. With the 7/7/6 split the 2nd level would require 32KB of tables, which is small enough to not want to use the list hack from x86. @@ -227,7 +227,7 @@ int32 index; status_t err = B_ERROR; // no pagetable here TRACE(("%s(%p,)\n", __FUNCTION__, va)); - + index = VADDR_TO_PRENT(va); TRACE(("%s: pr[%d].type %d\n", __FUNCTION__, index, pr[index].type)); if (pr && pr[index].type == DT_ROOT) { @@ -252,7 +252,7 @@ pt = (page_table_entry *)pa; index = 0; // single descriptor } - + if (pt && pt[index].type == DT_PAGE) { *_physicalAddress = PTE_TO_PA(pt[index]); // we should only be passed page va, but just in case. @@ -261,7 +261,7 @@ } } } - + return err; } @@ -370,7 +370,7 @@ pgtbl_pn = PDE_TO_PN(pgdir[j]); page = vm_lookup_page(pgtbl_pn); pgtbl = (page_table_entry *)page; - + if (!page) { panic("destroy_tmap: didn't find pgtable page\n"); return; @@ -504,7 +504,7 @@ need = 1; need += (VADDR_TO_PDENT(end) + 1 - VADDR_TO_PDENT(start) + NUM_PAGETBL_PER_PAGE - 1) / NUM_PAGETBL_PER_PAGE; } - + return need; } @@ -552,7 +552,7 @@ for (i = 0; i < NUM_DIRTBL_PER_PAGE; i++) { unsigned aindex = rindex & ~(NUM_DIRTBL_PER_PAGE-1); /* aligned */ page_root_entry *apr = &pr[aindex + i]; - + // put in the pgdir put_pgdir_in_pgroot(apr, pgdir, attributes | (attributes & B_USER_PROTECTION ? B_WRITE_AREA : B_KERNEL_WRITE_AREA)); @@ -571,7 +571,7 @@ // now, fill in the pentry do { err = get_physical_page_tmap(PRE_TO_PA(pr[rindex]), - &pd_pg, PHYSICAL_PAGE_NO_WAIT); + &pd_pg, PHYSICAL_PAGE_DONT_WAIT); } while (err < 0); pd = (page_directory_entry *)pd_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -598,7 +598,7 @@ for (i = 0; i < NUM_PAGETBL_PER_PAGE; i++) { unsigned aindex = dindex & ~(NUM_PAGETBL_PER_PAGE-1); /* aligned */ page_directory_entry *apd = &pd[aindex + i]; - + // put in the pgdir put_pgtable_in_pgdir(apd, pgtable, attributes | (attributes & B_USER_PROTECTION ? B_WRITE_AREA : B_KERNEL_WRITE_AREA)); @@ -615,7 +615,7 @@ // now, fill in the pentry do { err = get_physical_page_tmap(PDE_TO_PA(pd[dindex]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (err < 0); pt = (page_table_entry *)pt_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -668,7 +668,7 @@ do { status = get_physical_page_tmap(PRE_TO_PA(pr[index]), - &pd_pg, PHYSICAL_PAGE_NO_WAIT); + &pd_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pd = (page_directory_entry *)pd_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -684,7 +684,7 @@ do { status = get_physical_page_tmap(PDE_TO_PA(pd[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -751,7 +751,7 @@ pt = (page_table_entry *)sQueryPage; index = 0; // single descriptor } - + if (pt /*&& pt[index].type == DT_PAGE*/) { *_physical = PTE_TO_PA(pt[index]); // we should only be passed page va, but just in case. @@ -764,10 +764,10 @@ } } } - + // unmap the pg table from the indirect desc. sQueryDesc.type = DT_INVALID; - + return err; } @@ -795,7 +795,7 @@ do { status = get_physical_page_tmap(PRE_TO_PA(pr[index]), - &pd_pg, PHYSICAL_PAGE_NO_WAIT); + &pd_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pd = (page_directory_entry *)pd_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -811,7 +811,7 @@ do { status = get_physical_page_tmap(PDE_TO_PA(pd[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -825,7 +825,7 @@ pi_pg = pt_pg; do { status = get_physical_page_tmap(PIE_TO_PA(pi[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // add offset from start of page @@ -880,7 +880,7 @@ restart: if (start >= end) return B_OK; - + index = VADDR_TO_PRENT(start); if (pr[index].type != DT_ROOT) { // no pagedir here, move the start up to access the next page table @@ -890,7 +890,7 @@ do { status = get_physical_page_tmap(PRE_TO_PA(pr[index]), - &pd_pg, PHYSICAL_PAGE_NO_WAIT); + &pd_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pd = (page_directory_entry *)pd_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -906,7 +906,7 @@ do { status = get_physical_page_tmap(PDE_TO_PA(pd[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -962,7 +962,7 @@ do { status = get_physical_page_tmap(PRE_TO_PA(pr[index]), - &pd_pg, PHYSICAL_PAGE_NO_WAIT); + &pd_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pd = (page_directory_entry *)pd_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -978,7 +978,7 @@ do { status = get_physical_page_tmap(PDE_TO_PA(pd[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // we want the table at rindex, not at rindex%(tbl/page) @@ -992,7 +992,7 @@ pi_pg = pt_pg; do { status = get_physical_page_tmap(PIE_TO_PA(pi[index]), - &pt_pg, PHYSICAL_PAGE_NO_WAIT); + &pt_pg, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); pt = (page_table_entry *)pt_pg; // add offset from start of page @@ -1059,7 +1059,7 @@ static status_t -map_iospace_chunk(addr_t va, addr_t pa) +map_iospace_chunk(addr_t va, addr_t pa, uint32 flags) { int i; page_table_entry *pt; @@ -1218,7 +1218,7 @@ // clear out the bottom 2 GB, unmap everything memset(page_hole_pgdir + FIRST_USER_PGDIR_ENT, 0, sizeof(page_directory_entry) * NUM_USER_PGDIR_ENTS); #endif - + sKernelPhysicalPageRoot = (page_root_entry *)args->arch_args.phys_pgroot; sKernelVirtualPageRoot = (page_root_entry *)args->arch_args.vir_pgroot; @@ -1349,18 +1349,18 @@ int32 index; // first get pa for the indirect descriptor - + index = VADDR_TO_PRENT((addr_t)&sQueryDesc); physicalPageDir = PRE_TO_PA(sKernelVirtualPageRoot[index]); get_physical_page_tmap(physicalPageDir, - (addr_t *)&pageDirEntry, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pageDirEntry, PHYSICAL_PAGE_DONT_WAIT); index = VADDR_TO_PDENT((addr_t)&sQueryDesc); physicalPageTable = PDE_TO_PA(pageDirEntry[index]); get_physical_page_tmap(physicalPageTable, - (addr_t *)&pageTableEntry, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pageTableEntry, PHYSICAL_PAGE_DONT_WAIT); index = VADDR_TO_PTENT((addr_t)&sQueryDesc); @@ -1371,25 +1371,25 @@ put_physical_page_tmap((addr_t)pageTableEntry); put_physical_page_tmap((addr_t)pageDirEntry); - + // then the va for the page table for the query page. - + //sQueryPageTable = (page_indirect_entry *)(queryPage); index = VADDR_TO_PRENT(queryPage); physicalPageDir = PRE_TO_PA(sKernelVirtualPageRoot[index]); get_physical_page_tmap(physicalPageDir, - (addr_t *)&pageDirEntry, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pageDirEntry, PHYSICAL_PAGE_DONT_WAIT); index = VADDR_TO_PDENT(queryPage); physicalPageTable = PDE_TO_PA(pageDirEntry[index]); get_physical_page_tmap(physicalPageTable, - (addr_t *)&pageTableEntry, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pageTableEntry, PHYSICAL_PAGE_DONT_WAIT); index = VADDR_TO_PTENT(queryPage); - + put_page_indirect_entry_in_pgtable(&pageTableEntry[index], physicalIndirectDesc, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, false); @@ -1424,7 +1424,7 @@ uint32 index; uint32 i; TRACE(("early_tmap: entry pa 0x%lx va 0x%lx\n", pa, va)); - + // everything much simpler here because pa = va // thanks to transparent translation which hasn't been disabled yet Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -119,7 +119,7 @@ } vm_translation_map_arch_info; -void +void ppc_translation_map_change_asid(vm_translation_map *map) { // this code depends on the kernel being at 0x80000000, fix if we change that @@ -157,7 +157,7 @@ } -static void +static void destroy_tmap(vm_translation_map *map) { if (map->map_count > 0) { @@ -167,7 +167,7 @@ // mark the vsid base not in use int baseBit = map->arch_data->vsid_base >> VSID_BASE_SHIFT; - atomic_and((vint32 *)&sVSIDBaseBitmap[baseBit / 32], + atomic_and((vint32 *)&sVSIDBaseBitmap[baseBit / 32], ~(1 << (baseBit % 32))); free(map->arch_data); @@ -177,7 +177,7 @@ static void fill_page_table_entry(page_table_entry *entry, uint32 virtualSegmentID, - addr_t virtualAddress, addr_t physicalAddress, uint8 protection, + addr_t virtualAddress, addr_t physicalAddress, uint8 protection, bool secondaryHash) { // lower 32 bit - set at once @@ -237,7 +237,7 @@ if (entry->valid) continue; - fill_page_table_entry(entry, virtualSegmentID, virtualAddress, physicalAddress, + fill_page_table_entry(entry, virtualSegmentID, virtualAddress, physicalAddress, protection, false); map->map_count++; return B_OK; @@ -254,7 +254,7 @@ if (entry->valid) continue; - fill_page_table_entry(entry, virtualSegmentID, virtualAddress, physicalAddress, + fill_page_table_entry(entry, virtualSegmentID, virtualAddress, physicalAddress, protection, false); map->map_count++; return B_OK; @@ -374,7 +374,7 @@ static status_t -map_iospace_chunk(addr_t va, addr_t pa) +map_iospace_chunk(addr_t va, addr_t pa, uint32 flags) { pa &= ~(B_PAGE_SIZE - 1); // make sure it's page aligned va &= ~(B_PAGE_SIZE - 1); // make sure it's page aligned @@ -386,7 +386,7 @@ } -static addr_t +static addr_t get_mapped_size_tmap(vm_translation_map *map) { return map->map_count; @@ -432,7 +432,7 @@ } -static void +static void flush_tmap(vm_translation_map *map) { // TODO: arch_cpu_global_TLB_invalidate() is extremely expensive and doesn't @@ -586,7 +586,7 @@ } // create an area to cover the page table - sPageTableArea = create_area("page_table", (void **)&sPageTable, B_EXACT_ADDRESS, + sPageTableArea = create_area("page_table", (void **)&sPageTable, B_EXACT_ADDRESS, sPageTableSize, B_ALREADY_WIRED, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); // init physical page mapper @@ -613,7 +613,7 @@ */ status_t -arch_vm_translation_map_early_map(kernel_args *ka, addr_t virtualAddress, addr_t physicalAddress, +arch_vm_translation_map_early_map(kernel_args *ka, addr_t virtualAddress, addr_t physicalAddress, uint8 attributes, addr_t (*get_free_page)(kernel_args *)) { uint32 virtualSegmentID = get_sr((void *)virtualAddress) & 0xffffff; @@ -647,7 +647,7 @@ // XXX currently assumes this translation map is active -status_t +status_t arch_vm_translation_map_early_query(addr_t va, addr_t *out_physical) { //PANIC_UNIMPLEMENTED(); Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -379,7 +379,7 @@ // now, fill in the pentry do { err = get_physical_page_tmap(ADDR_REVERSE_SHIFT(pd[index].addr), - (addr_t *)&pt, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pt, PHYSICAL_PAGE_DONT_WAIT); } while (err < 0); index = VADDR_TO_PTENT(va); @@ -425,7 +425,7 @@ do { status = get_physical_page_tmap(ADDR_REVERSE_SHIFT(pd[index].addr), - (addr_t *)&pt, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pt, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); for (index = VADDR_TO_PTENT(start); (index < 1024) && (start < end); @@ -517,7 +517,7 @@ do { status = get_physical_page_tmap(ADDR_REVERSE_SHIFT(pd[index].addr), - (addr_t *)&pt, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pt, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); index = VADDR_TO_PTENT(va); @@ -573,7 +573,7 @@ do { status = get_physical_page_tmap(ADDR_REVERSE_SHIFT(pd[index].addr), - (addr_t *)&pt, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pt, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); for (index = VADDR_TO_PTENT(start); index < 1024 && start < end; index++, start += B_PAGE_SIZE) { @@ -619,7 +619,7 @@ do { status = get_physical_page_tmap(ADDR_REVERSE_SHIFT(pd[index].addr), - (addr_t *)&pt, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pt, PHYSICAL_PAGE_DONT_WAIT); } while (status < B_OK); index = VADDR_TO_PTENT(va); @@ -706,7 +706,7 @@ static status_t -map_iospace_chunk(addr_t va, addr_t pa) +map_iospace_chunk(addr_t va, addr_t pa, uint32 flags) { int i; page_table_entry *pt; @@ -979,7 +979,7 @@ physicalPageTable = ADDR_REVERSE_SHIFT(sKernelVirtualPageDirectory[index].addr); get_physical_page_tmap(physicalPageTable, - (addr_t *)&pageTableEntry, PHYSICAL_PAGE_NO_WAIT); + (addr_t *)&pageTableEntry, PHYSICAL_PAGE_DONT_WAIT); index = VADDR_TO_PTENT((addr_t)sQueryPageTable); put_page_table_entry_in_pgtable(&pageTableEntry[index], physicalPageTable, Modified: haiku/trunk/src/system/kernel/cache/file_cache.cpp =================================================================== --- haiku/trunk/src/system/kernel/cache/file_cache.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/cache/file_cache.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -235,7 +235,7 @@ addr_t virtualAddress; if (vm_get_physical_page( pages[i]->physical_page_number * B_PAGE_SIZE, - &virtualAddress, PHYSICAL_PAGE_CAN_WAIT) < B_OK) { + &virtualAddress, 0) < B_OK) { panic("could not get physical page"); } @@ -334,7 +334,7 @@ addr_t virtualAddress; vm_get_physical_page(page->physical_page_number * B_PAGE_SIZE, - &virtualAddress, PHYSICAL_PAGE_CAN_WAIT); + &virtualAddress, 0); add_to_iovec(vecs, vecCount, MAX_IO_VECS, virtualAddress, B_PAGE_SIZE); // ToDo: check if the array is large enough! @@ -649,7 +649,7 @@ addr_t virtualAddress; vm_get_physical_page(page->physical_page_number * B_PAGE_SIZE, - &virtualAddress, PHYSICAL_PAGE_CAN_WAIT); + &virtualAddress, 0); // copy the contents of the page already in memory if (doWrite) { Modified: haiku/trunk/src/system/kernel/vm/vm.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/vm/vm.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -3107,7 +3107,8 @@ gKernelStartup = true; // vm_get_physical_page() needs to lock... - if (vm_get_physical_page(address, ©Address, PHYSICAL_PAGE_NO_WAIT) != B_OK) { + if (vm_get_physical_page(address, ©Address, PHYSICAL_PAGE_DONT_WAIT) + != B_OK) { kprintf("getting the hardware page failed."); gKernelStartup = false; return 0; @@ -4624,11 +4625,13 @@ // try to get a mapping for the src and dest page so we can copy it for (;;) { - map->ops->get_physical_page(sourcePage->physical_page_number * B_PAGE_SIZE, - (addr_t *)&source, PHYSICAL_PAGE_CAN_WAIT); + map->ops->get_physical_page( + sourcePage->physical_page_number * B_PAGE_SIZE, + (addr_t *)&source, 0); - if (map->ops->get_physical_page(page->physical_page_number * B_PAGE_SIZE, - (addr_t *)&dest, PHYSICAL_PAGE_NO_WAIT) == B_OK) + if (map->ops->get_physical_page( + page->physical_page_number * B_PAGE_SIZE, + (addr_t *)&dest, PHYSICAL_PAGE_DONT_WAIT) == B_OK) break; // it couldn't map the second one, so sleep and retry Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-11 20:16:35 UTC (rev 27978) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-11 20:55:32 UTC (rev 27979) @@ -817,7 +817,7 @@ { addr_t virtualAddress; vm_get_physical_page(page->physical_page_number << PAGE_SHIFT, - &virtualAddress, PHYSICAL_PAGE_CAN_WAIT); + &virtualAddress, 0); memset((void *)virtualAddress, 0, B_PAGE_SIZE); From zooey at mail.berlios.de Sat Oct 11 23:25:58 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Sat, 11 Oct 2008 23:25:58 +0200 Subject: [Haiku-commits] r27980 - haiku/trunk/src/tests/kits/net Message-ID: <200810112125.m9BLPwHP004255@sheep.berlios.de> Author: zooey Date: 2008-10-11 23:25:58 +0200 (Sat, 11 Oct 2008) New Revision: 27980 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27980&view=rev Modified: haiku/trunk/src/tests/kits/net/udp_echo.c Log: * improved flexibility when doing broadcasts (the broadcasting address can now be specified), in order to be able to do global broadcasts as well as network (IP-level) broadcasts Modified: haiku/trunk/src/tests/kits/net/udp_echo.c =================================================================== --- haiku/trunk/src/tests/kits/net/udp_echo.c 2008-10-11 20:55:32 UTC (rev 27979) +++ haiku/trunk/src/tests/kits/net/udp_echo.c 2008-10-11 21:25:58 UTC (rev 27980) @@ -39,7 +39,7 @@ if (len > 0) len--; printf("trying to send %u bytes...\n", len); - status = sendto(sockFD, buf, len, 0, + status = sendto(sockFD, buf, len, 0, (struct sockaddr*)serverAddr, sizeof(struct sockaddr_in)); if (status < 0) { printf("sendto(): %x (%s)\n", errno, strerror(errno)); @@ -70,7 +70,7 @@ setsockopt(sockFD, SOL_SOCKET, SO_BROADCAST, &option, sizeof(option)); - status = sendto(sockFD, buf, len, 0, + status = sendto(sockFD, buf, len, 0, (struct sockaddr*)serverAddr, sizeof(struct sockaddr_in)); if (status < 0) { printf("sendto(): %s\n", strerror(errno)); @@ -112,7 +112,7 @@ buf[i] = tolower(buf[i]); } printf("sending <%s>\n", buf); - status = sendto(sockFD, buf, status, 0, + status = sendto(sockFD, buf, status, 0, (struct sockaddr*)&clientAddr, sizeof(clientAddr)); if (status < 0) { printf("sendto(): %x (%s)\n", errno, strerror(errno)); @@ -134,6 +134,7 @@ SERVER_MODE, } mode; unsigned short bindPort = 0; + const char* bindAddr = NULL; if (argc < 2) { printf("usage: %s client [local-port]\n", __progname); @@ -154,22 +155,28 @@ serverAddr.sin_addr.s_addr = inet_addr(argv[2]); if (argc > 4) bindPort = atoi(argv[4]); - printf("client connected to server(%lx:%u)\n", serverAddr.sin_addr.s_addr, + printf("client connected to server(%lx:%u)\n", serverAddr.sin_addr.s_addr, ntohs(serverAddr.sin_port)); } else if (!strcmp(argv[1], "broadcast")) { mode = BROADCAST_MODE; if (argc < 3) { - printf("usage: %s broadcast [local-port]\n", __progname); + printf("usage: %s broadcast [local-addr] [broadcast-addr] [local-port]\n", __progname); exit(5); } + if (argc > 3) + bindAddr = argv[3]; + memset(&serverAddr, 0, sizeof(struct sockaddr_in)); serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(atoi(argv[2])); - serverAddr.sin_addr.s_addr = INADDR_BROADCAST; + if (argc > 4) + serverAddr.sin_addr.s_addr = inet_addr(argv[4]); + else + serverAddr.sin_addr.s_addr = INADDR_BROADCAST; - if (argc > 3) - bindPort = atoi(argv[3]); + if (argc > 5) + bindPort = atoi(argv[5]); } else if (!strcmp(argv[1], "server")) { mode = SERVER_MODE; if (argc < 3) { @@ -181,11 +188,17 @@ sockFD = socket(AF_INET, SOCK_DGRAM, 0); - if (bindPort > 0) { + if (bindAddr != NULL || bindPort > 0) { memset(&localAddr, 0, sizeof(struct sockaddr_in)); localAddr.sin_family = AF_INET; - localAddr.sin_port = htons(bindPort); - printf("binding to port %u\n", bindPort); + if (bindAddr != NULL) { + localAddr.sin_addr.s_addr = inet_addr(bindAddr); + printf("binding to addr %s\n", bindAddr); + } + if (bindPort > 0) { + localAddr.sin_port = htons(bindPort); + printf("binding to port %u\n", bindPort); + } status = bind(sockFD, (struct sockaddr *)&localAddr, sizeof(localAddr)); if (status < 0) { printf("bind(): %x (%s)\n", errno, strerror(errno)); From mmu_man at mail.berlios.de Sat Oct 11 23:47:01 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sat, 11 Oct 2008 23:47:01 +0200 Subject: [Haiku-commits] r27981 - haiku/trunk/src/system/kernel/lib/arch/m68k Message-ID: <200810112147.m9BLl1O9006626@sheep.berlios.de> Author: mmu_man Date: 2008-10-11 23:47:00 +0200 (Sat, 11 Oct 2008) New Revision: 27981 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27981&view=rev Modified: haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile Log: 10000l for Ingo for having me spend hours spotting this funny typo! Modified: haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-11 21:25:58 UTC (rev 27980) +++ haiku/trunk/src/system/kernel/lib/arch/m68k/Jamfile 2008-10-11 21:47:00 UTC (rev 27981) @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src system kernel lib arch m86k ; +SubDir HAIKU_TOP src system kernel lib arch m68k ; SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; From korli at mail.berlios.de Sat Oct 11 23:54:44 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sat, 11 Oct 2008 23:54:44 +0200 Subject: [Haiku-commits] r27982 - haiku/trunk/src/add-ons/kernel/drivers/audio/echo Message-ID: <200810112154.m9BLsiRx007254@sheep.berlios.de> Author: korli Date: 2008-10-11 23:54:43 +0200 (Sat, 11 Oct 2008) New Revision: 27982 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27982&view=rev Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.cpp haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.h haiku/trunk/src/add-ons/kernel/drivers/audio/echo/multi.cpp Log: we load settings on open(), changes are taken into account on media_server restarts Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.cpp 2008-10-11 21:47:00 UTC (rev 27981) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.cpp 2008-10-11 21:54:43 UTC (rev 27982) @@ -24,7 +24,6 @@ #include #include -#include #include #include "OsSupportBeOS.h" #include "EchoGalsXface.h" @@ -74,14 +73,6 @@ char * names[NUM_CARDS*20+1]; #endif // CARDBUS -echo_settings current_settings = { - 2, // channels - 16, // bits per sample - 48000, // sample rate - 512, // buffer frames - 2 // buffer count -}; - extern device_hooks multi_hooks; #ifdef MIDI_SUPPORT extern device_hooks midi_hooks; @@ -535,52 +526,6 @@ { PRINT(("init_driver()\n")); - void *settings_handle; - // get driver settings - settings_handle = load_driver_settings ("echo.settings"); - if (settings_handle != NULL) { - const char* item; - char* end; - uint32 value; - - item = get_driver_parameter (settings_handle, "channels", NULL, NULL); - if (item) { - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.channels = value; - } - PRINT(("channels %lu\n", current_settings.channels)); - - item = get_driver_parameter (settings_handle, "bitsPerSample", NULL, NULL); - if (item) { - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.bitsPerSample = value; - } - PRINT(("bitsPerSample %lu\n", current_settings.bitsPerSample)); - - item = get_driver_parameter (settings_handle, "sample_rate", NULL, NULL); - if (item) { - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.sample_rate = value; - } - PRINT(("sample_rate %lu\n", current_settings.sample_rate)); - - item = get_driver_parameter (settings_handle, "buffer_frames", NULL, NULL); - if (item) { - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.buffer_frames = value; - } - PRINT(("buffer_frames %lu\n", current_settings.buffer_frames)); - - item = get_driver_parameter (settings_handle, "buffer_count", NULL, NULL); - if (item) { - value = strtoul (item, &end, 0); - if (*end == '\0') current_settings.buffer_count = value; - } - PRINT(("buffer_count %lu\n", current_settings.buffer_count)); - - unload_driver_settings (settings_handle); - } - #ifdef CARDBUS // Get card services client module if (get_module(CB_ENABLER_MODULE_NAME, (module_info **)&cbemi) != B_OK) { Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.h =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.h 2008-10-11 21:47:00 UTC (rev 27981) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/echo/echo.h 2008-10-11 21:54:43 UTC (rev 27982) @@ -39,16 +39,6 @@ #define DEVNAME 32 #define NUM_CARDS 3 -typedef struct { - uint8 channels; - uint8 bitsPerSample; - uint32 sample_rate; - uint32 buffer_frames; - int32 buffer_count; -} echo_settings; - -extern echo_settings current_settings; - /* * Echo midi */ Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/echo/multi.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/audio/echo/multi.cpp 2008-10-11 21:47:00 UTC (rev 27981) +++ haiku/trunk/src/add-ons/kernel/drivers/audio/echo/multi.cpp 2008-10-11 21:54:43 UTC (rev 27982) @@ -29,6 +29,7 @@ * */ +#include #include #include #include "debug.h" @@ -46,7 +47,23 @@ B_MIX_NOMINAL = 1 << 2 } mixer_type; +typedef struct { + uint8 channels; + uint8 bitsPerSample; + uint32 sample_rate; + uint32 buffer_frames; + int32 buffer_count; +} echo_settings; +echo_settings current_settings = { + 2, // channels + 16, // bits per sample + 48000, // sample rate + 512, // buffer frames + 2 // buffer count +}; + + static void echo_channel_get_mix(void *card, MIXER_AUDIO_CHANNEL channel, int32 type, float *values) { echo_dev *dev = (echo_dev*) card; @@ -490,8 +507,8 @@ data->interface_version = B_CURRENT_INTERFACE_VERSION; data->interface_minimum = B_CURRENT_INTERFACE_VERSION; - strncpy(data->friendly_name, card->caps.szName, 32); - strcpy(data->vendor_info, AUTHOR); + strncpy(data->friendly_name, card->caps.szName, sizeof(data->friendly_name)); + strncpy(data->vendor_info, AUTHOR, sizeof(data->vendor_info)); data->output_channel_count = card->multi.output_channel_count; data->input_channel_count = card->multi.input_channel_count; @@ -534,11 +551,12 @@ data->interface_flags = B_MULTI_INTERFACE_PLAYBACK | B_MULTI_INTERFACE_RECORD; data->start_latency = 3000; - strcpy(data->control_panel,""); + strcpy(data->control_panel, ""); return B_OK; } + static status_t echo_get_enabled_channels(echo_dev *card, multi_channel_enable *data) { @@ -556,6 +574,7 @@ return B_OK; } + static status_t echo_set_enabled_channels(echo_dev *card, multi_channel_enable *data) { @@ -566,6 +585,7 @@ return B_OK; } + static status_t echo_get_global_format(echo_dev *card, multi_format_info *data) { @@ -588,6 +608,7 @@ return B_OK; } + static status_t echo_get_buffers(echo_dev *card, multi_buffer_list *data) { @@ -610,7 +631,6 @@ ASSERT(current_settings.buffer_count == 2); data->flags = B_MULTI_BUFFER_PLAYBACK | B_MULTI_BUFFER_RECORD; // XXX ??? -// data->flags = 0; data->return_playback_buffers = current_settings.buffer_count; /* playback_buffers[b][] */ data->return_playback_channels = 0; /* playback_buffers[][c] */ @@ -677,6 +697,7 @@ release_sem_etc(stream->card->buffer_ready_sem, 1, B_DO_NOT_RESCHEDULE); } + void echo_record_inth(void* inthparams) { @@ -698,6 +719,7 @@ release_sem_etc(stream->card->buffer_ready_sem, 1, B_DO_NOT_RESCHEDULE); } + static status_t echo_buffer_exchange(echo_dev *card, multi_buffer_info *data) { @@ -929,7 +951,53 @@ #ifdef CARDBUS card->opened = true; #endif + + void *settings_handle; + // get driver settings + settings_handle = load_driver_settings ("echo.settings"); + if (settings_handle != NULL) { + const char* item; + char* end; + uint32 value; + + item = get_driver_parameter (settings_handle, "channels", NULL, NULL); + if (item) { + value = strtoul (item, &end, 0); + if (*end == '\0') current_settings.channels = value; + } + PRINT(("channels %u\n", current_settings.channels)); + item = get_driver_parameter (settings_handle, "bitsPerSample", NULL, NULL); + if (item) { + value = strtoul (item, &end, 0); + if (*end == '\0') current_settings.bitsPerSample = value; + } + PRINT(("bitsPerSample %u\n", current_settings.bitsPerSample)); + + item = get_driver_parameter (settings_handle, "sample_rate", NULL, NULL); + if (item) { + value = strtoul (item, &end, 0); + if (*end == '\0') current_settings.sample_rate = value; + } + PRINT(("sample_rate %lu\n", current_settings.sample_rate)); + + item = get_driver_parameter (settings_handle, "buffer_frames", NULL, NULL); + if (item) { + value = strtoul (item, &end, 0); + if (*end == '\0') current_settings.buffer_frames = value; + } + PRINT(("buffer_frames %lu\n", current_settings.buffer_frames)); + + item = get_driver_parameter (settings_handle, "buffer_count", NULL, NULL); + if (item) { + value = strtoul (item, &end, 0); + if (*end == '\0') current_settings.buffer_count = value; + } + PRINT(("buffer_count %lu\n", current_settings.buffer_count)); + + unload_driver_settings (settings_handle); + } + LOG(("creating play streams\n")); i = card->caps.wNumPipesOut - 2; From axeld at mail.berlios.de Sun Oct 12 00:10:34 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 00:10:34 +0200 Subject: [Haiku-commits] r27983 - in haiku/trunk: headers/private/net src/add-ons/kernel/network/stack Message-ID: <200810112210.m9BMAYqh008947@sheep.berlios.de> Author: axeld Date: 2008-10-12 00:10:31 +0200 (Sun, 12 Oct 2008) New Revision: 27983 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27983&view=rev Modified: haiku/trunk/headers/private/net/net_socket.h haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp haiku/trunk/src/add-ons/kernel/network/stack/interfaces.h haiku/trunk/src/add-ons/kernel/network/stack/net_socket.cpp haiku/trunk/src/add-ons/kernel/network/stack/routes.cpp haiku/trunk/src/add-ons/kernel/network/stack/routes.h Log: * Actually implemented the SO_BINDTODEVICE socket option I added some time ago. * This makes it possible to select a specific device, even if no interface has been configured for it yet. To make it work, each interface now has a private direct route which will be returned if a socket is bound to a device. * This will be used for example in DHCP to make it work when more than one adapter is attached. Modified: haiku/trunk/headers/private/net/net_socket.h =================================================================== --- haiku/trunk/headers/private/net/net_socket.h 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/headers/private/net/net_socket.h 2008-10-11 22:10:31 UTC (rev 27983) @@ -29,6 +29,7 @@ int options; int linger; + int bound_to_device; struct { uint32 buffer_size; Modified: haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-11 22:10:31 UTC (rev 27983) @@ -208,19 +208,19 @@ status_t status = (interface == NULL) ? ENODEV : B_OK; switch (option) { - case SIOCGIFINDEX: - if (interface) - request.ifr_index = interface->index; - else - request.ifr_index = 0; - break; + case SIOCGIFINDEX: + if (interface) + request.ifr_index = interface->index; + else + request.ifr_index = 0; + break; - case SIOCGIFNAME: - if (interface) - strlcpy(request.ifr_name, interface->name, IF_NAMESIZE); - else - status = B_BAD_VALUE; // TODO should be ENXIO? - break; + case SIOCGIFNAME: + if (interface) + strlcpy(request.ifr_name, interface->name, IF_NAMESIZE); + else + status = B_BAD_VALUE; // TODO: should be ENXIO? + break; } if (status < B_OK) @@ -386,7 +386,12 @@ domain = protocol->module->get_domain(protocol); net_route *route = NULL; - status_t status = get_buffer_route(domain, buffer, &route); + status_t status; + if (protocol->socket->bound_to_device > 0) { + status = get_device_route(domain, protocol->socket->bound_to_device, + &route); + } else + status = get_buffer_route(domain, buffer, &route); if (status < B_OK) return status; Modified: haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/interfaces.cpp 2008-10-11 22:10:31 UTC (rev 27983) @@ -258,6 +258,16 @@ interface->metric = 0; interface->device_interface = grab_device_interface(deviceInterface); + // setup direct route for bound devices + interface->direct_route.destination = NULL; + interface->direct_route.mask = NULL; + interface->direct_route.gateway = NULL; + interface->direct_route.flags = 0; + interface->direct_route.mtu = 0; + interface->direct_route.interface = interface; + interface->direct_route.ref_count = 1; + // make sure this doesn't get deleted accidently + status_t status = get_domain_datalink_protocols(interface); if (status < B_OK) { delete interface; Modified: haiku/trunk/src/add-ons/kernel/network/stack/interfaces.h =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/interfaces.h 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/interfaces.h 2008-10-11 22:10:31 UTC (rev 27983) @@ -50,6 +50,7 @@ struct net_interface_private : net_interface { char base_name[IF_NAMESIZE]; net_device_interface *device_interface; + net_route_private direct_route; }; Modified: haiku/trunk/src/add-ons/kernel/network/stack/net_socket.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/net_socket.cpp 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/net_socket.cpp 2008-10-11 22:10:31 UTC (rev 27983) @@ -183,7 +183,7 @@ return bytesWritten; dataBuffer += bytesWritten; - dataBufferLen -= bytesWritten; + dataBufferLen -= bytesWritten; } messageHeader->msg_controllen -= dataBufferLen; @@ -235,7 +235,7 @@ status_t status = create_socket(family, type, protocol, &socket); if (status < B_OK) return status; - + status = socket->first_info->open(socket->first_protocol); if (status < B_OK) { socket_delete(socket); @@ -570,7 +570,7 @@ mutex_lock(&socket->lock); // first remove the pending connections, then the already connected - // ones as needed + // ones as needed net_socket_private *child; while (socket->child_count > backlog && (child = (net_socket_private *)list_remove_tail_item( @@ -764,7 +764,7 @@ memcpy(&socket->address, address, sizeof(sockaddr)); - status_t status = socket->first_info->bind(socket->first_protocol, + status_t status = socket->first_info->bind(socket->first_protocol, (sockaddr *)address); if (status < B_OK) { // clear address again, as binding failed @@ -1326,6 +1326,21 @@ socket->options &= ~option; return B_OK; + case SO_BINDTODEVICE: + { + if (length != sizeof(int32)) + return B_BAD_VALUE; + + int index = *(const int32 *)value; + if (index < 0) + return B_BAD_VALUE; + + // TODO: we might want to check if the device exists at all + // (although it doesn't really harm when we don't) + socket->bound_to_device = index; + return B_OK; + } + default: break; } @@ -1373,7 +1388,7 @@ if (error == B_OK) error = socket_listen(sockets[0], 1); - // connect them + // connect them if (error == B_OK) { error = socket_connect(sockets[1], (sockaddr*)&sockets[0]->address, sockets[0]->address.ss_len); Modified: haiku/trunk/src/add-ons/kernel/network/stack/routes.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/routes.cpp 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/routes.cpp 2008-10-11 22:10:31 UTC (rev 27983) @@ -8,6 +8,7 @@ #include "domains.h" +#include "interfaces.h" #include "routes.h" #include "stack_private.h" #include "utility.h" @@ -608,6 +609,32 @@ status_t +get_device_route(struct net_domain *_domain, uint32 index, net_route **_route) +{ + net_domain_private *domain = (net_domain_private *)_domain; + + MutexLocker _(domain->lock); + + net_interface_private *interface = NULL; + + while (true) { + interface = (net_interface_private *)list_get_next_item( + &domain->interfaces, interface); + if (interface == NULL) + break; + + if (interface->device->index == index) { + atomic_add(&interface->direct_route.ref_count, 1); + *_route = &interface->direct_route; + return B_OK; + } + } + + return ENETUNREACH; +} + + +status_t get_buffer_route(net_domain *_domain, net_buffer *buffer, net_route **_route) { net_domain_private *domain = (net_domain_private *)_domain; Modified: haiku/trunk/src/add-ons/kernel/network/stack/routes.h =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/routes.h 2008-10-11 21:54:43 UTC (rev 27982) +++ haiku/trunk/src/add-ons/kernel/network/stack/routes.h 2008-10-11 22:10:31 UTC (rev 27983) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2006-2008, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -42,8 +42,10 @@ void invalidate_routes(net_domain *, net_interface *); struct net_route *get_route(struct net_domain *domain, const struct sockaddr *address); +status_t get_device_route(struct net_domain *domain, uint32 index, + struct net_route **_route); status_t get_buffer_route(struct net_domain *domain, - struct net_buffer *buffer, struct net_route **_route); + struct net_buffer *buffer, struct net_route **_route); void put_route(struct net_domain *domain, struct net_route *route); status_t register_route_info(struct net_domain *domain, From axeld at mail.berlios.de Sun Oct 12 00:46:39 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 00:46:39 +0200 Subject: [Haiku-commits] r27984 - haiku/trunk/src/add-ons/kernel/network/stack Message-ID: <200810112246.m9BMkd1i030191@sheep.berlios.de> Author: axeld Date: 2008-10-12 00:46:38 +0200 (Sun, 12 Oct 2008) New Revision: 27984 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27984&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp Log: * datalink_send_datagram() can be called with a NULL protocol which I missed with the last commit. Modified: haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-11 22:10:31 UTC (rev 27983) +++ haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-11 22:46:38 UTC (rev 27984) @@ -387,7 +387,7 @@ net_route *route = NULL; status_t status; - if (protocol->socket->bound_to_device > 0) { + if (protocol != NULL && protocol->socket->bound_to_device > 0) { status = get_device_route(domain, protocol->socket->bound_to_device, &route); } else @@ -408,7 +408,7 @@ \param _matchedType will be set to either zero or MSG_BCAST if non-NULL. */ bool -datalink_is_local_address(net_domain *_domain, const struct sockaddr *address, +datalink_is_local_address(net_domain *_domain, const struct sockaddr *address, net_interface **_interface, uint32 *_matchedType) { net_domain_private *domain = (net_domain_private *)_domain; @@ -437,7 +437,7 @@ // check for matching broadcast address if interface support broadcasting if (interface->flags & IFF_BROADCAST - && domain->address_module->equal_addresses(interface->destination, + && domain->address_module->equal_addresses(interface->destination, address)) { matchedType = MSG_BCAST; break; From korli at mail.berlios.de Sun Oct 12 01:26:31 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sun, 12 Oct 2008 01:26:31 +0200 Subject: [Haiku-commits] r27985 - haiku/trunk/src/apps/soundrecorder Message-ID: <200810112326.m9BNQVuh013445@sheep.berlios.de> Author: korli Date: 2008-10-12 01:26:31 +0200 (Sun, 12 Oct 2008) New Revision: 27985 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27985&view=rev Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp Log: SoundRecorder window is now not zoomable Modified: haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp =================================================================== --- haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-11 22:46:38 UTC (rev 27984) +++ haiku/trunk/src/apps/soundrecorder/RecorderWindow.cpp 2008-10-11 23:26:31 UTC (rev 27985) @@ -98,7 +98,7 @@ RecorderWindow::RecorderWindow() : BWindow(BRect(XPOS,YPOS,XPOS+MIN_WIDTH,YPOS+MIN_HEIGHT), "SoundRecorder", B_TITLED_WINDOW, - B_ASYNCHRONOUS_CONTROLS | B_NOT_V_RESIZABLE), + B_ASYNCHRONOUS_CONTROLS | B_NOT_V_RESIZABLE | B_NOT_ZOOMABLE), fPlayer(NULL), fSoundList(NULL), fPlayFile(NULL), From stippi at mail.berlios.de Sun Oct 12 01:33:59 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 01:33:59 +0200 Subject: [Haiku-commits] r27986 - in haiku/trunk/src/apps/mediaplayer: . settings support Message-ID: <200810112333.m9BNXxlt007109@sheep.berlios.de> Author: stippi Date: 2008-10-12 01:33:59 +0200 (Sun, 12 Oct 2008) New Revision: 27986 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27986&view=rev Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp haiku/trunk/src/apps/mediaplayer/settings/Settings.cpp haiku/trunk/src/apps/mediaplayer/settings/Settings.h haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.cpp haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.h Log: Remember the last used file panel folder. Also remember the folder even if the user cancled the file panel. Some improvements to the SettingsMessage and some more helpful comments here and there. Modified: haiku/trunk/src/apps/mediaplayer/MainApp.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/MainApp.cpp 2008-10-11 23:33:59 UTC (rev 27986) @@ -33,6 +33,7 @@ #include #include "EventQueue.h" +#include "Settings.h" #include "SettingsWindow.h" @@ -56,6 +57,8 @@ fMediaServerRunning(false), fMediaAddOnServerRunning(false) { + mpSettings settings = Settings::CurrentSettings(); + fLastFilePanelFolder = settings.filePanelFolder; } @@ -76,6 +79,11 @@ fSettingsWindow->Quit(); fSettingsWindow = NULL; + // store the current file panel ref in the global settings + mpSettings settings = Settings::CurrentSettings(); + settings.filePanelFolder = fLastFilePanelFolder; + Settings::Default()->SaveSettings(settings); + return BApplication::QuitRequested(); } @@ -260,6 +268,18 @@ case M_SAVE_PANEL_RESULT: _HandleSavePanelResult(message); break; + case B_CANCEL: { + // The user canceled a file panel, but store at least the current + // file panel folder. + uint32 oldWhat; + if (message->FindInt32("old_what", (int32*)&oldWhat) != B_OK) + break; + if (oldWhat == M_OPEN_PANEL_RESULT && fOpenFilePanel != NULL) + fOpenFilePanel->GetPanelDirectory(&fLastFilePanelFolder); + else if (oldWhat == M_SAVE_PANEL_RESULT && fSaveFilePanel != NULL) + fSaveFilePanel->GetPanelDirectory(&fLastFilePanelFolder); + break; + } default: BApplication::MessageReceived(message); Modified: haiku/trunk/src/apps/mediaplayer/settings/Settings.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/settings/Settings.cpp 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/settings/Settings.cpp 2008-10-11 23:33:59 UTC (rev 27986) @@ -21,14 +21,16 @@ || loopSound != other.loopSound || useOverlays != other.useOverlays || scaleBilinear != other.scaleBilinear - || backgroundMovieVolumeMode != other.backgroundMovieVolumeMode; + || backgroundMovieVolumeMode != other.backgroundMovieVolumeMode + || filePanelFolder != other.filePanelFolder; } Settings::Settings(const char* filename) : BLocker("settings lock"), - fSettingsMessage(B_USER_CONFIG_DIRECTORY, filename) + fSettingsMessage(B_USER_SETTINGS_DIRECTORY, filename) { + // The settings are loaded from disk in the SettingsMessage constructor. } @@ -51,6 +53,11 @@ settings.backgroundMovieVolumeMode = fSettingsMessage.GetValue("bgMovieVolumeMode", (uint32)mpSettings::BG_MOVIES_FULL_VOLUME); + + entry_ref defaultFilePanelFolder; + // an "unset" entry_ref + settings.filePanelFolder = fSettingsMessage.GetValue( + "filePanelDirectory", defaultFilePanelFolder); } @@ -73,6 +80,9 @@ fSettingsMessage.SetValue("bgMovieVolumeMode", settings.backgroundMovieVolumeMode); + fSettingsMessage.SetValue("filePanelDirectory", + settings.filePanelFolder); + // Save at this point, although saving is also done on destruction, // this will make sure the settings are saved even when the player // crashes. Modified: haiku/trunk/src/apps/mediaplayer/settings/Settings.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/settings/Settings.h 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/settings/Settings.h 2008-10-11 23:33:59 UTC (rev 27986) @@ -9,30 +9,32 @@ #ifndef SETTINGS_H #define SETTINGS_H +#include #include #include "Notifier.h" #include "SettingsMessage.h" struct mpSettings { - bool autostart; - bool closeWhenDonePlayingMovie; - bool closeWhenDonePlayingSound; - bool loopMovie; - bool loopSound; - bool useOverlays; - bool scaleBilinear; - enum { - BG_MOVIES_FULL_VOLUME = 0, - BG_MOVIES_HALF_VLUME = 1, - BG_MOVIES_MUTED = 2 - }; - uint32 backgroundMovieVolumeMode; - - bool operator!=(const mpSettings& other) const; + bool autostart; + bool closeWhenDonePlayingMovie; + bool closeWhenDonePlayingSound; + bool loopMovie; + bool loopSound; + bool useOverlays; + bool scaleBilinear; + enum { + BG_MOVIES_FULL_VOLUME = 0, + BG_MOVIES_HALF_VLUME = 1, + BG_MOVIES_MUTED = 2 + }; + uint32 backgroundMovieVolumeMode; + entry_ref filePanelFolder; + + bool operator!=(const mpSettings& other) const; }; -#define SETTINGS_FILENAME "MediaPlayerSettings" +#define SETTINGS_FILENAME "MediaPlayer" class Settings : public BLocker, public Notifier { public: Modified: haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp 2008-10-11 23:33:59 UTC (rev 27986) @@ -276,6 +276,9 @@ void SettingsWindow::Show() { + // The Settings that we want to be able to revert to is the state at which + // the SettingsWindow was shown. So the current settings are stored in + // fLastSettings. Settings::Default()->LoadSettings(fLastSettings); fSettings = fLastSettings; AdoptSettings(); Modified: haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.cpp 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.cpp 2008-10-11 23:33:59 UTC (rev 27986) @@ -9,6 +9,7 @@ #include "SettingsMessage.h" +#include #include #include @@ -158,7 +159,7 @@ status_t -SettingsMessage::SetValue(const char* name, BPoint value) +SettingsMessage::SetValue(const char* name, const BPoint& value) { if (ReplacePoint(name, value) == B_OK) return B_OK; @@ -167,7 +168,7 @@ status_t -SettingsMessage::SetValue(const char* name, BRect value) +SettingsMessage::SetValue(const char* name, const BRect& value) { if (ReplaceRect(name, value) == B_OK) return B_OK; @@ -176,6 +177,15 @@ status_t +SettingsMessage::SetValue(const char* name, const entry_ref& value) +{ + if (ReplaceRef(name, &value) == B_OK) + return B_OK; + return AddRef(name, &value); +} + + +status_t SettingsMessage::SetValue(const char* name, const BMessage* value) { if (ReplaceMessage(name, value) == B_OK) @@ -305,6 +315,16 @@ } +entry_ref +SettingsMessage::GetValue(const char* name, const entry_ref& defaultValue) const +{ + entry_ref value; + if (FindRef(name, &value) != B_OK) + return defaultValue; + return value; +} + + BMessage SettingsMessage::GetValue(const char* name, const BMessage& defaultValue) const { Modified: haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.h 2008-10-11 23:26:31 UTC (rev 27985) +++ haiku/trunk/src/apps/mediaplayer/support/SettingsMessage.h 2008-10-11 23:33:59 UTC (rev 27986) @@ -36,8 +36,9 @@ const char* value); status_t SetValue(const char* name, const BString& value); - status_t SetValue(const char *name, BPoint value); - status_t SetValue(const char* name, BRect value); + status_t SetValue(const char *name, const BPoint& value); + status_t SetValue(const char* name, const BRect& value); + status_t SetValue(const char* name, const entry_ref& value); status_t SetValue(const char* name, const BMessage* value); status_t SetValue(const char* name, @@ -65,6 +66,8 @@ BPoint defaultValue) const; BRect GetValue(const char* name, BRect defaultValue) const; + entry_ref GetValue(const char* name, + const entry_ref& defaultValue) const; BMessage GetValue(const char* name, const BMessage& defaultValue) const; From axeld at mail.berlios.de Sun Oct 12 02:03:06 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 02:03:06 +0200 Subject: [Haiku-commits] r27987 - haiku/trunk/src/system/kernel/device_manager Message-ID: <200810120003.m9C036hn009152@sheep.berlios.de> Author: axeld Date: 2008-10-12 02:03:05 +0200 (Sun, 12 Oct 2008) New Revision: 27987 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27987&view=rev Modified: haiku/trunk/src/system/kernel/device_manager/device_manager.cpp Log: * The device manager must use kprintf() when printing out stuff in the KDL. Modified: haiku/trunk/src/system/kernel/device_manager/device_manager.cpp =================================================================== --- haiku/trunk/src/system/kernel/device_manager/device_manager.cpp 2008-10-11 23:33:59 UTC (rev 27986) +++ haiku/trunk/src/system/kernel/device_manager/device_manager.cpp 2008-10-12 00:03:05 UTC (rev 27987) @@ -230,7 +230,7 @@ put_level(int32 level) { while (level-- > 0) - dprintf(" "); + kprintf(" "); } @@ -241,31 +241,31 @@ return; put_level(level + 2); - dprintf("\"%s\" : ", attr->name); + kprintf("\"%s\" : ", attr->name); switch (attr->type) { case B_STRING_TYPE: - dprintf("string : \"%s\"", attr->value.string); + kprintf("string : \"%s\"", attr->value.string); break; case B_INT8_TYPE: case B_UINT8_TYPE: - dprintf("uint8 : %u (%#x)", attr->value.ui8, attr->value.ui8); + kprintf("uint8 : %u (%#x)", attr->value.ui8, attr->value.ui8); break; case B_INT16_TYPE: case B_UINT16_TYPE: - dprintf("uint16 : %u (%#x)", attr->value.ui16, attr->value.ui16); + kprintf("uint16 : %u (%#x)", attr->value.ui16, attr->value.ui16); break; case B_INT32_TYPE: case B_UINT32_TYPE: - dprintf("uint32 : %lu (%#lx)", attr->value.ui32, attr->value.ui32); + kprintf("uint32 : %lu (%#lx)", attr->value.ui32, attr->value.ui32); break; case B_INT64_TYPE: case B_UINT64_TYPE: - dprintf("uint64 : %Lu (%#Lx)", attr->value.ui64, attr->value.ui64); + kprintf("uint64 : %Lu (%#Lx)", attr->value.ui64, attr->value.ui64); break; default: - dprintf("raw data"); + kprintf("raw data"); } - dprintf("\n"); + kprintf("\n"); } @@ -2126,7 +2126,7 @@ device_node::Dump(int32 level) { put_level(level); - dprintf("(%ld) @%p \"%s\" (ref %ld, init %ld, module %p, data %p)\n", level, + kprintf("(%ld) @%p \"%s\" (ref %ld, init %ld, module %p, data %p)\n", level, this, ModuleName(), fRefCount, fInitialized, DriverModule(), DriverData()); @@ -2139,7 +2139,7 @@ while (deviceIterator.HasNext()) { Device* device = deviceIterator.Next(); put_level(level); - dprintf("device: %s, %p\n", device->ModuleName(), device->Data()); + kprintf("device: %s, %p\n", device->ModuleName(), device->Data()); } NodeList::ConstIterator iterator = Children().GetIterator(); @@ -2232,10 +2232,6 @@ recursive_lock_init(&sLock, "device manager"); init_node_tree(); -#ifdef TRACE_DEVICE_MANAGER - sRootNode->Dump(); -#endif - register_generic_syscall(DEVICE_MANAGER_SYSCALLS, control_device_manager, 1, 0); From ingo_weinhold at gmx.de Sun Oct 12 09:34:29 2008 From: ingo_weinhold at gmx.de (Ingo Weinhold) Date: Sun, 12 Oct 2008 09:34:29 +0200 Subject: [Haiku-commits] r27975 - haiku/trunk/src/system/kernel/arch/x86 In-Reply-To: References: <200810111812.m9BICA22016063@sheep.berlios.de> Message-ID: <20081012093429.406.1@knochen-vm.localdomain> On 2008-10-11 at 22:45:49 [+0200], Rene Gollent wrote: > On Sat, Oct 11, 2008 at 1:12 PM, bonefish at BerliOS > wrote: > > Author: bonefish > > Date: 2008-10-11 20:12:10 +0200 (Sat, 11 Oct 2008) > > New Revision: 27975 > > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27975&view=rev > > > > Modified: > > haiku/trunk/src/system/kernel/arch/x86/arch_vm_translation_map.cpp > > Log: > > Don't disable interrupts in flush_tmap() and map_iospace_chunk(), just > > pin the thread to the current CPU. > > Should this change have made much of a performance difference? I might > be imagining it, but the "Patience..." portion of jam at least seems > measurably faster on my a64 compared to before this revision. On SMP machines it might indeed improve thing a bit (though not dramatically). On non-SMP machines there should be no difference. CU, Ingo From zooey at mail.berlios.de Sun Oct 12 10:10:13 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Sun, 12 Oct 2008 10:10:13 +0200 Subject: [Haiku-commits] r27988 - haiku/trunk/src/tests/kits/net Message-ID: <200810120810.m9C8AD9C016287@sheep.berlios.de> Author: zooey Date: 2008-10-12 10:10:11 +0200 (Sun, 12 Oct 2008) New Revision: 27988 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27988&view=rev Modified: haiku/trunk/src/tests/kits/net/udp_echo.c Log: * fixed output format and a warning Modified: haiku/trunk/src/tests/kits/net/udp_echo.c =================================================================== --- haiku/trunk/src/tests/kits/net/udp_echo.c 2008-10-12 00:03:05 UTC (rev 27987) +++ haiku/trunk/src/tests/kits/net/udp_echo.c 2008-10-12 08:10:11 UTC (rev 27988) @@ -104,7 +104,7 @@ exit(5); } buf[status] = 0; - printf("got <%s> from client(%lx:%u)\n", buf, clientAddr.sin_addr.s_addr, clientAddr.sin_port); + printf("got <%s> from client(%08x:%u)\n", buf, clientAddr.sin_addr.s_addr, clientAddr.sin_port); for (i = 0; i < status; ++i) { if (islower(buf[i])) buf[i] = toupper(buf[i]); @@ -132,7 +132,7 @@ CLIENT_MODE, BROADCAST_MODE, SERVER_MODE, - } mode; + } mode = 0; unsigned short bindPort = 0; const char* bindAddr = NULL; @@ -155,7 +155,7 @@ serverAddr.sin_addr.s_addr = inet_addr(argv[2]); if (argc > 4) bindPort = atoi(argv[4]); - printf("client connected to server(%lx:%u)\n", serverAddr.sin_addr.s_addr, + printf("client connected to server(%08x:%u)\n", serverAddr.sin_addr.s_addr, ntohs(serverAddr.sin_port)); } else if (!strcmp(argv[1], "broadcast")) { mode = BROADCAST_MODE; From stippi at mail.berlios.de Sun Oct 12 13:06:29 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 13:06:29 +0200 Subject: [Haiku-commits] r27989 - haiku/trunk/src/kits/storage Message-ID: <200810121106.m9CB6TI9010663@sheep.berlios.de> Author: stippi Date: 2008-10-12 13:06:28 +0200 (Sun, 12 Oct 2008) New Revision: 27989 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27989&view=rev Modified: haiku/trunk/src/kits/storage/FindDirectory.cpp Log: Honour line 80 chars per line limit. Modified: haiku/trunk/src/kits/storage/FindDirectory.cpp =================================================================== --- haiku/trunk/src/kits/storage/FindDirectory.cpp 2008-10-12 08:10:11 UTC (rev 27988) +++ haiku/trunk/src/kits/storage/FindDirectory.cpp 2008-10-12 11:06:28 UTC (rev 27989) @@ -36,7 +36,8 @@ device = volume->Device(); char buffer[B_PATH_NAME_LENGTH]; - status_t error = find_directory(which, device, createIt, buffer, B_PATH_NAME_LENGTH); + status_t error = find_directory(which, device, createIt, buffer, + B_PATH_NAME_LENGTH); if (error == B_OK) error = path->SetTo(buffer); From stippi at mail.berlios.de Sun Oct 12 13:12:15 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 13:12:15 +0200 Subject: [Haiku-commits] r27990 - haiku/trunk/src/kits/storage Message-ID: <200810121112.m9CBCFZA019312@sheep.berlios.de> Author: stippi Date: 2008-10-12 13:12:14 +0200 (Sun, 12 Oct 2008) New Revision: 27990 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27990&view=rev Modified: haiku/trunk/src/kits/storage/NodeInfo.cpp Log: Rewrote BNodeInfo::GetTrackerIcon(). * Exit the function early in case of error, instead of maintaining the error until the end. * Separate more clearly the condition that a file type is available at all versus not. This removes a redundancy when falling back to the generic file icon. * Add retrieving the icon from the super type. Even check if there is a preferred app for the super type that supplies an icon before using the icon of the super type itself. Hopefully I didn't introduce new errors, but that the super type icon was not used was the main problem I tried to fix. Modified: haiku/trunk/src/kits/storage/NodeInfo.cpp =================================================================== --- haiku/trunk/src/kits/storage/NodeInfo.cpp 2008-10-12 11:06:28 UTC (rev 27989) +++ haiku/trunk/src/kits/storage/NodeInfo.cpp 2008-10-12 11:12:14 UTC (rev 27990) @@ -728,7 +728,6 @@ return B_BAD_VALUE; // set some icon size related variables - status_t error = B_OK; BRect bounds; switch (iconSize) { case B_MINI_ICON: @@ -745,87 +744,97 @@ } // check parameters and initialization - if (error == B_OK - && (icon->InitCheck() != B_OK || icon->Bounds() != bounds)) { - error = B_BAD_VALUE; - } - if (error == B_OK && InitCheck() != B_OK) - error = B_NO_INIT; + if (icon->InitCheck() != B_OK || icon->Bounds() != bounds) + return B_BAD_VALUE; - bool success = false; + if (InitCheck() != B_OK) + return B_NO_INIT; - // get node MIME type, and, if that fails, the generic icon + // Ask GetIcon() first. + if (GetIcon(icon, iconSize) == B_OK) + return B_OK; + + // If not successful, see if the node has a type available at all. If no type + // is available, use one of the standard types depending on + status_t error = B_OK; char mimeString[B_MIME_TYPE_LENGTH]; - if (error == B_OK) { - if (GetType(mimeString) != B_OK) { - struct stat stat; - error = fNode->GetStat(&stat); - if (error == B_OK) { - // no type available -- get the icon for the appropriate type (file/dir/etc.) - BMimeType type; - if (S_ISREG(stat.st_mode)) { - // is it an application (executable) or just a regular file? - if ((stat.st_mode & S_IXUSR) != 0) - type.SetTo(B_APP_MIME_TYPE); - else - type.SetTo(B_FILE_MIME_TYPE); - } else if (S_ISDIR(stat.st_mode)) { - // it's either a volume or just a standard directory - fs_info info; - if (fs_stat_dev(stat.st_dev, &info) == 0 && stat.st_ino == info.root) - type.SetTo(B_VOLUME_MIME_TYPE); - else - type.SetTo(B_DIRECTORY_MIME_TYPE); - } else if (S_ISLNK(stat.st_mode)) - type.SetTo(B_SYMLINK_MIME_TYPE); - - success = (type.GetIcon(icon, iconSize) == B_OK); - // NOTE: if there is an icon but getting it failes for some reason, - // the error is not reported, and the fall back retrieval methods - // are still tried. (IAW, we can't differentiate the reason for error.) - } + if (GetType(mimeString) != B_OK) { + // Get the icon from a mime type... + BMimeType type; + + struct stat stat; + error = fNode->GetStat(&stat); + if (error == B_OK) { + // no type available -- get the icon for the appropriate type (file/dir/etc.) + if (S_ISREG(stat.st_mode)) { + // is it an application (executable) or just a regular file? + if ((stat.st_mode & S_IXUSR) != 0) + type.SetTo(B_APP_MIME_TYPE); + else + type.SetTo(B_FILE_MIME_TYPE); + } else if (S_ISDIR(stat.st_mode)) { + // it's either a volume or just a standard directory + fs_info info; + if (fs_stat_dev(stat.st_dev, &info) == 0 && stat.st_ino == info.root) + type.SetTo(B_VOLUME_MIME_TYPE); + else + type.SetTo(B_DIRECTORY_MIME_TYPE); + } else if (S_ISLNK(stat.st_mode)) + type.SetTo(B_SYMLINK_MIME_TYPE); + } else { + // GetStat() failed. + // Return the icon for "application/octet-stream" from the MIME database. + type.SetTo(B_FILE_MIME_TYPE); } - } - // Ask GetIcon(). - if (error == B_OK && !success) - success = (GetIcon(icon, iconSize) == B_OK); + return type.GetIcon(icon, iconSize); - // Get the preferred application and ask the MIME database, if that - // application has a special icon for the node's file type. - if (error == B_OK && !success) { + } else { + // We know the mimetype of the node. + bool success = false; + + // Get the preferred application and ask the MIME database, if that + // application has a special icon for the node's file type. char signature[B_MIME_TYPE_LENGTH]; if (GetPreferredApp(signature) == B_OK) { BMimeType type(signature); - success = (type.GetIconForType(mimeString, icon, iconSize) == B_OK); + success = type.GetIconForType(mimeString, icon, iconSize) == B_OK; } - } - // Ask the MIME database whether there is an icon for the node's file type. - BMimeType nodeType; - if (error == B_OK && !success) { - nodeType.SetTo(mimeString); - success = (nodeType.GetIcon(icon, iconSize) == B_OK); - } + // TODO: Confirm Tracker asks preferred app icons before asking mime icons. - // Ask the MIME database for the preferred application for the node's - // file type and whether this application has a special icon for the type. - if (error == B_OK && !success) { - char signature[B_MIME_TYPE_LENGTH]; - if (nodeType.GetPreferredApp(signature) == B_OK) { + BMimeType nodeType(mimeString); + + // Ask the MIME database for the preferred application for the node's + // file type and whether this application has a special icon for the type. + if (!success && nodeType.GetPreferredApp(signature) == B_OK) { BMimeType type(signature); - success = (type.GetIconForType(mimeString, icon, iconSize) == B_OK); + success = type.GetIconForType(mimeString, icon, iconSize) == B_OK; } + + // Ask the MIME database whether there is an icon for the node's file type. + if (!success) + success = nodeType.GetIcon(icon, iconSize) == B_OK; + + // Get the super type if still no success. + BMimeType superType; + if (!success && nodeType.GetSupertype(&superType) == B_OK) { + // Ask the MIME database for the preferred application for the node's + // super type and whether this application has a special icon for the type. + if (superType.GetPreferredApp(signature) == B_OK) { + BMimeType type(signature); + success = type.GetIconForType(superType.Type(), icon, iconSize) == B_OK; + } + // Get the icon of the super type itself. + if (!success) + success = superType.GetIcon(icon, iconSize) == B_OK; + } + + if (success) + return B_OK; } - // Return the icon for "application/octet-stream" from the MIME database. - if (error == B_OK && !success) { - // get the "application/octet-stream" icon - BMimeType type(B_FILE_MIME_TYPE); - error = type.GetIcon(icon, iconSize); - success = (error == B_OK); - } - return error; + return B_ERROR; } // GetTrackerIcon From bonefish at mail.berlios.de Sun Oct 12 14:26:28 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sun, 12 Oct 2008 14:26:28 +0200 Subject: [Haiku-commits] r27991 - in haiku/trunk: headers/private/system src/system/libroot/posix/stdlib src/system/runtime_loader Message-ID: <200810121226.m9CCQSnl031613@sheep.berlios.de> Author: bonefish Date: 2008-10-12 14:26:27 +0200 (Sun, 12 Oct 2008) New Revision: 27991 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27991&view=rev Modified: haiku/trunk/headers/private/system/user_runtime.h haiku/trunk/src/system/libroot/posix/stdlib/exit.c haiku/trunk/src/system/runtime_loader/export.c Log: We need to let the runtime loader call shared object termination hooks from exit(). Modified: haiku/trunk/headers/private/system/user_runtime.h =================================================================== --- haiku/trunk/headers/private/system/user_runtime.h 2008-10-12 11:12:14 UTC (rev 27990) +++ haiku/trunk/headers/private/system/user_runtime.h 2008-10-12 12:26:27 UTC (rev 27991) @@ -46,6 +46,8 @@ void (*call_atexit_hooks_for_range)(addr_t start, addr_t size); + void (*call_termination_hooks)(); + const struct user_space_program_args *program_args; }; Modified: haiku/trunk/src/system/libroot/posix/stdlib/exit.c =================================================================== --- haiku/trunk/src/system/libroot/posix/stdlib/exit.c 2008-10-12 11:12:14 UTC (rev 27990) +++ haiku/trunk/src/system/libroot/posix/stdlib/exit.c 2008-10-12 12:26:27 UTC (rev 27991) @@ -8,14 +8,17 @@ */ -#include +#include + +#include #include #include #include -#include -#include +#include +#include + extern void _IO_cleanup(void); extern void _thread_do_exit_notification(void); @@ -144,6 +147,8 @@ // close all open files _IO_cleanup(); + __gRuntimeLoader->call_termination_hooks(); + // exit with status code _kern_exit_team(status); } Modified: haiku/trunk/src/system/runtime_loader/export.c =================================================================== --- haiku/trunk/src/system/runtime_loader/export.c 2008-10-12 11:12:14 UTC (rev 27990) +++ haiku/trunk/src/system/runtime_loader/export.c 2008-10-12 12:26:27 UTC (rev 27991) @@ -37,7 +37,8 @@ get_next_image_dependency, elf_reinit_after_fork, - NULL // call_atexit_hooks_for_range + NULL, // call_atexit_hooks_for_range + terminate_program }; From bonefish at mail.berlios.de Sun Oct 12 14:30:59 2008 From: bonefish at mail.berlios.de (bonefish at BerliOS) Date: Sun, 12 Oct 2008 14:30:59 +0200 Subject: [Haiku-commits] r27992 - haiku/trunk/src/tests/system/kernel Message-ID: <200810121230.m9CCUx64032074@sheep.berlios.de> Author: bonefish Date: 2008-10-12 14:30:59 +0200 (Sun, 12 Oct 2008) New Revision: 27992 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27992&view=rev Modified: haiku/trunk/src/tests/system/kernel/time_stats.cpp Log: Added option '-b' for setting the buffer size used for the scheduling analysis. Modified: haiku/trunk/src/tests/system/kernel/time_stats.cpp =================================================================== --- haiku/trunk/src/tests/system/kernel/time_stats.cpp 2008-10-12 12:26:27 UTC (rev 27991) +++ haiku/trunk/src/tests/system/kernel/time_stats.cpp 2008-10-12 12:30:59 UTC (rev 27992) @@ -37,6 +37,8 @@ "the user and kernel times of all threads that ran during that time.\n" "\n" "Options:\n" + " -b - When doing scheduling analysis: the size of the buffer\n" + " used (in MB)\n" " -h, --help - Print this usage info.\n" " -o - Print the results to file .\n" " -s - Also perform a scheduling analysis over the time the\n" @@ -212,12 +214,13 @@ static void -do_scheduling_analysis(bigtime_t startTime, bigtime_t endTime) +do_scheduling_analysis(bigtime_t startTime, bigtime_t endTime, + size_t bufferSize) { printf("\n"); // allocate a chunk of memory for the scheduling analysis - void* buffer = malloc(SCHEDULING_ANALYSIS_BUFFER_SIZE); + void* buffer = malloc(bufferSize); if (buffer == NULL) { fprintf(stderr, "Error: Failed to allocate memory for the scheduling " "analysis.\n"); @@ -228,7 +231,7 @@ // do the scheduling analysis scheduling_analysis analysis; status_t error = _kern_analyze_scheduling(startTime, endTime, buffer, - SCHEDULING_ANALYSIS_BUFFER_SIZE, &analysis); + bufferSize, &analysis); if (error != B_OK) { fprintf(stderr, "Error: Scheduling analysis failed: %s\n", strerror(error)); @@ -359,7 +362,7 @@ static void do_timing_analysis(int argc, const char* const* argv, bool schedulingAnalysis, - int outFD) + int outFD, size_t bufferSize) { // gather initial usage info thread_info initialUsage[MAX_THREADS]; @@ -478,7 +481,7 @@ } if (schedulingAnalysis) - do_scheduling_analysis(startTime, endTime); + do_scheduling_analysis(startTime, endTime, bufferSize); } @@ -487,6 +490,7 @@ { const char* outputFile = NULL; bool schedulingAnalysis = false; + size_t bufferSize = SCHEDULING_ANALYSIS_BUFFER_SIZE; while (true) { static struct option sLongOptions[] = { @@ -496,11 +500,20 @@ }; opterr = 0; // don't print errors - int c = getopt_long(argc, (char**)argv, "+ho:s", sLongOptions, NULL); + int c = getopt_long(argc, (char**)argv, "+b:ho:s", sLongOptions, NULL); if (c == -1) break; switch (c) { + case 'b': + bufferSize = atol(optarg); + if (bufferSize < 1 || bufferSize > 1024) { + fprintf(stderr, "Error: Invalid buffer size. Should be " + "between 1 and 1024 MB\n"); + exit(1); + } + bufferSize *= 1024 * 1024; + break; case 'h': print_usage_and_exit(false); break; @@ -532,7 +545,8 @@ } } - do_timing_analysis(argc - optind, argv + optind, schedulingAnalysis, outFD); + do_timing_analysis(argc - optind, argv + optind, schedulingAnalysis, outFD, + bufferSize); return 0; } From korli at mail.berlios.de Sun Oct 12 15:07:01 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Sun, 12 Oct 2008 15:07:01 +0200 Subject: [Haiku-commits] r27993 - haiku/trunk/src/servers/media_addon Message-ID: <200810121307.m9CD71Rv001935@sheep.berlios.de> Author: korli Date: 2008-10-12 15:07:01 +0200 (Sun, 12 Oct 2008) New Revision: 27993 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27993&view=rev Modified: haiku/trunk/src/servers/media_addon/main.cpp Log: made several inherited methods virtual Modified: haiku/trunk/src/servers/media_addon/main.cpp =================================================================== --- haiku/trunk/src/servers/media_addon/main.cpp 2008-10-12 12:30:59 UTC (rev 27992) +++ haiku/trunk/src/servers/media_addon/main.cpp 2008-10-12 13:07:01 UTC (rev 27993) @@ -69,28 +69,28 @@ class MediaAddonServer : BApplication { public: - MediaAddonServer(const char *sig); - ~MediaAddonServer(); - void ReadyToRun(); - bool QuitRequested(); - void MessageReceived(BMessage *msg); + MediaAddonServer(const char *sig); + virtual ~MediaAddonServer(); + virtual void ReadyToRun(); + virtual bool QuitRequested(); + virtual void MessageReceived(BMessage *msg); - void WatchDir(BEntry *dir); - void AddOnAdded(const char *path, ino_t file_node); - void AddOnRemoved(ino_t file_node); - void HandleMessage(int32 code, const void *data, size_t size); +private: + void WatchDir(BEntry *dir); + void AddOnAdded(const char *path, ino_t file_node); + void AddOnRemoved(ino_t file_node); + void HandleMessage(int32 code, const void *data, size_t size); - void PutAddonIfPossible(AddOnInfo *info); - void InstantiatePhysicalInputsAndOutputs(AddOnInfo *info); - void InstantiateAutostartFlavors(AddOnInfo *info); - void DestroyInstantiatedFlavors(AddOnInfo *info); + void PutAddonIfPossible(AddOnInfo *info); + void InstantiatePhysicalInputsAndOutputs(AddOnInfo *info); + void InstantiateAutostartFlavors(AddOnInfo *info); + void DestroyInstantiatedFlavors(AddOnInfo *info); - void ScanAddOnFlavors(BMediaAddOn *addon); + void ScanAddOnFlavors(BMediaAddOn *addon); - port_id ControlPort() const { return fControlPort; } + port_id ControlPort() const { return fControlPort; } -private: - static int32 _ControlThread(void *arg); + static int32 _ControlThread(void *arg); Map *fFileMap; Map *fInfoMap; From axeld at mail.berlios.de Sun Oct 12 15:29:29 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 15:29:29 +0200 Subject: [Haiku-commits] r27994 - in haiku/trunk/src/add-ons/kernel: bus_managers/ide generic/ide_adapter Message-ID: <200810121329.m9CDTTaQ004052@sheep.berlios.de> Author: axeld Date: 2008-10-12 15:29:28 +0200 (Sun, 12 Oct 2008) New Revision: 27994 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27994&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ide/ata.c haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c Log: Marcus + Michael: * Fixed LBA48 access in the ide_adapter. This should fix bug #2700 and probably others as well: accessing data beyond the 128 GB barrier on PATA hard drives did not work and could potentially screw the first blocks of your hard drive. * Also fixed queued LBA48 access in the IDE bus manager (this has already been removed in the ATA bus manager). * Whitespace cleanup. Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ide/ata.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/ide/ata.c 2008-10-12 13:07:01 UTC (rev 27993) +++ haiku/trunk/src/add-ons/kernel/bus_managers/ide/ata.c 2008-10-12 13:29:28 UTC (rev 27994) @@ -49,13 +49,13 @@ ata_dpc_PIO(ide_qrequest *qrequest) { ide_device_info *device = qrequest->device; - uint32 timeout = qrequest->request->timeout > 0 ? + uint32 timeout = qrequest->request->timeout > 0 ? qrequest->request->timeout : IDE_STD_TIMEOUT; SHOW_FLOW0(3, ""); if (check_rw_error(device, qrequest) - || !check_rw_status(device, qrequest->is_write ? device->left_blocks > 0 : true)) + || !check_rw_status(device, qrequest->is_write ? device->left_blocks > 0 : true)) { // failure reported by device SHOW_FLOW0( 3, "command finished unsuccessfully" ); @@ -182,7 +182,7 @@ /** create IDE read/write command */ static bool -create_rw_taskfile(ide_device_info *device, ide_qrequest *qrequest, +create_rw_taskfile(ide_device_info *device, ide_qrequest *qrequest, uint64 pos, size_t length, bool write) { SHOW_FLOW0( 3, "" ); @@ -216,8 +216,8 @@ device->tf.queued48.lba_24_31 = (pos >> 24) & 0xff; device->tf.queued48.lba_32_39 = (pos >> 32) & 0xff; device->tf.queued48.lba_40_47 = (pos >> 40) & 0xff; - device->tf.queued48.command = write ? IDE_CMD_WRITE_DMA_QUEUED - : IDE_CMD_READ_DMA_QUEUED; + device->tf.queued48.command = write ? IDE_CMD_WRITE_DMA_QUEUED_EXT + : IDE_CMD_READ_DMA_QUEUED_EXT; return true; } else { // non-queued LBA48 @@ -260,7 +260,7 @@ device->tf.queued.lba_8_15 = (pos >> 8) & 0xff; device->tf.queued.lba_16_23 = (pos >> 16) & 0xff; device->tf.queued.lba_24_27 = (pos >> 24) & 0xf; - device->tf.queued.command = write ? IDE_CMD_WRITE_DMA_QUEUED + device->tf.queued.command = write ? IDE_CMD_WRITE_DMA_QUEUED : IDE_CMD_READ_DMA_QUEUED; return true; } else { @@ -303,7 +303,7 @@ track_size = infoblock->current_heads * infoblock->current_sectors; if (track_size == 0) { - set_sense(device, + set_sense(device, SCSIS_KEY_MEDIUM_ERROR, SCSIS_ASC_MEDIUM_FORMAT_CORRUPTED); return false; } @@ -342,7 +342,7 @@ ide_bus_info *bus = device->bus; uint32 timeout; - // make a copy first as settings may get changed by user during execution + // make a copy first as settings may get changed by user during execution qrequest->is_write = write; qrequest->uses_dma = device->DMA_enabled; @@ -375,7 +375,7 @@ goto err_setup; // if no timeout is specified, use standard - timeout = qrequest->request->timeout > 0 ? + timeout = qrequest->request->timeout > 0 ? qrequest->request->timeout : IDE_STD_TIMEOUT; // in DMA mode, we continue with "accessing", @@ -383,7 +383,7 @@ // on PIO write, we continue with "accessing" if (!send_command(device, qrequest, !device->is_atapi, timeout, (!qrequest->uses_dma && !qrequest->is_write) ? - ide_state_async_waiting : ide_state_accessing)) + ide_state_async_waiting : ide_state_accessing)) goto err_send; if (qrequest->uses_dma) { @@ -419,7 +419,7 @@ } else { // on PIO read, we start with waiting, on PIO write we can // transmit data immediately; we let the service thread do - // the writing, so the caller can issue the next command + // the writing, so the caller can issue the next command // immediately (this optimisation really pays on SMP systems // only) SHOW_FLOW0(3, "Ready for PIO"); @@ -438,9 +438,9 @@ finish_checksense(qrequest); return; - + err_send: - // error during/after send; + // error during/after send; // in this case, the device discards queued request automatically if (qrequest->uses_dma) abort_dma(device, qrequest); @@ -499,7 +499,7 @@ set_sense(device, SCSIS_KEY_MEDIUM_ERROR, SCSIS_ASC_RANDOM_POS_ERROR); return true; } - + if ((error & ide_error_mcr) != 0) { // XXX proper sense key? // for TUR this case is not defined !? @@ -548,7 +548,7 @@ status = bus->controller->get_altstatus(bus->channel_cookie); - // if device is busy, other flags are indeterminate + // if device is busy, other flags are indeterminate if ((status & ide_status_bsy) != 0) { device->subsys_status = SCSI_SEQUENCE_FAIL; return false; @@ -704,7 +704,7 @@ SHOW_INFO0(2, "Enabled command queueing"); - // official IBM docs talk about 31 queue entries, though + // official IBM docs talk about 31 queue entries, though // their disks report 32; let's hope their docs are wrong return initialize_qreq_array(device, device->infoblock.queue_depth + 1); } Modified: haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c =================================================================== --- haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c 2008-10-12 13:07:01 UTC (rev 27993) +++ haiku/trunk/src/add-ons/kernel/generic/ide_adapter/ide_adapter.c 2008-10-12 13:29:28 UTC (rev 27994) @@ -57,7 +57,7 @@ return B_ERROR; for (i = 0; i < 7; i++) { - if (((1 << (i-7)) & mask) != 0) { + if (((1 << (i + 6)) & mask) != 0) { SHOW_FLOW( 4, "%x->HI(%x)", tf->raw.r[i + 7], i ); pci->write_io_8(device, ioaddr + 1 + i, tf->raw.r[i + 7]); } From stippi at mail.berlios.de Sun Oct 12 16:10:58 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 16:10:58 +0200 Subject: [Haiku-commits] r27995 - in haiku/trunk/docs/welcome: . teammonitor-images tracker-images workspaces-images Message-ID: <200810121410.m9CEAwUJ009431@sheep.berlios.de> Author: stippi Date: 2008-10-12 16:10:56 +0200 (Sun, 12 Oct 2008) New Revision: 27995 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27995&view=rev Added: haiku/trunk/docs/welcome/teammonitor-images/ haiku/trunk/docs/welcome/teammonitor-images/teammonitor.png haiku/trunk/docs/welcome/tracker-images/get-info.png haiku/trunk/docs/welcome/tracker-images/transaction-status.png Modified: haiku/trunk/docs/welcome/attributes.html haiku/trunk/docs/welcome/deskbar.html haiku/trunk/docs/welcome/tracker-images/open-with.png haiku/trunk/docs/welcome/tracker.html haiku/trunk/docs/welcome/twitcher.html haiku/trunk/docs/welcome/welcome.html haiku/trunk/docs/welcome/workspaces-images/workspaces.png haiku/trunk/docs/welcome/workspaces.html Log: Patch by Humdinger: * Improved Tracker and Deskbar introductions. * Updated and improved a few graphics and added some more. (Humdinger: The Teammonitor intro was missing from your patch.) Modified: haiku/trunk/docs/welcome/attributes.html =================================================================== --- haiku/trunk/docs/welcome/attributes.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/attributes.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -77,7 +77,7 @@

    Besides all the "META:*" attributes that hold the contact's information, there are two attributes that are managed by the system:

    • BEOS:TYPE holds the file type as a MIME string, here "application/x-person. It determines the default icon and the application that opens the file when you e.g. double click it.
    • -
    • "_trk/pinfo_le" is kept by Tracker as... I'm not sure, I'm still investigating... :)

    +
  • "_trk/pinfo_le" is the attribute with which Tracker keeps track of a file's icon position.
  • Note the backslash after "Clara". In Terminal you have to "escape" special characters like '"*\$?!. The space between "Clara" and "Botters" is also one of those. Therefore the backslash is really in front of the space character, and not after "Clara".


    Modified: haiku/trunk/docs/welcome/deskbar.html =================================================================== --- haiku/trunk/docs/welcome/deskbar.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/deskbar.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -28,7 +28,7 @@

    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 has to be in this compacted format when it's put in the lower corners of the screen. +

    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

    @@ -37,27 +37,27 @@ settings.png
      -
    • About This System... -- Shows some basic information of the system, licenses and the credits of the Haiku project.
    • +
    • About This System... - Shows some basic information of the system, licenses and the credits of the Haiku project.
    • -
    • Find... -- Opens the query dialog.
    • -
    • Show Replicants -- Shows/hides the little Replicant widget you use to drag it around, remove or access its context menu.
    • -
    • Deskbar Settings
        -
      • Configure Deskbar Menu... -- Opens a panel to configure the Deskbar menu (see below).
      • -
      • Always on Top -- The Deskbar always stays above all other windows.
      • -
      • Auto Raise -- The Deskbar pops to the front if the mouse pointer touches it.
      • -
      • Sort Running Applications -- Sorts the list of running programs alphabetically.
      • -
      • Tracker always First -- Even if you sort alphabetically, the Tracker entry always stays first in the list.
      • -
      • 24 Hour Clock -- Toggles between 24 and 12 hour clock.
      • -
      • Show Seconds -- Adds the display of seconds to the clock.
      • -
      • European Date -- Shows the date in European format: day-month-year
      • +
      • Find... - Opens the query dialog.
      • +
      • Show Replicants - Shows/hides the little Replicant widget you use to drag it around, remove or access its context menu.
      • +
      • Deskbar Settings
          +
        • Configure Deskbar Menu... - Opens a panel to configure the Deskbar menu (see below).
        • +
        • Always on Top - The Deskbar always stays above all other windows.
        • +
        • Auto Raise - The Deskbar pops to the front if the mouse pointer touches it.
        • +
        • Sort Running Applications - Sorts the list of running programs alphabetically.
        • +
        • Tracker always First - Even if you sort alphabetically, the Tracker entry always stays first in the list.
        • +
        • 24 Hour Clock - Toggles between 24 and 12 hour clock.
        • +
        • Show Seconds - Adds the display of seconds to the clock.
        • +
        • European Date - Shows the date in European format: day-month-year
        • ---- Full Date ----
        • -
        • Show Application Expander -- Provides a small widget to show/hide all windows of a program directly under its entry in the Deskbar.
        • -
        • Expand New Applications -- Newly launched programs have their windows automatically expanded under their entry in the Deskbar.
        • +
        • Show Application Expander - Provides a small widget to show/hide all windows of a program directly under its entry in the Deskbar.
        • +
        • Expand New Applications - Newly launched programs have their windows automatically expanded under their entry in the Deskbar.
      • -
      • Restart -- Restarts the system.
      • -
      • Shutdown -- Shuts down the system.
      • -
      • Recent Documents, Folders, Applications -- List the last recently opened documents, folders and applications (see Configure Deskbar Menu... below). -
      • Applications, Demos, Deskbar Applets, Preferences -- List of installed applications, demos, applets and preferences (see Configure Deskbar Menu... below).
      • +
      • Restart - Restarts the system.
      • +
      • Shutdown - Shuts down the system.
      • +
      • Recent Documents, Folders, Applications - List the last recently opened documents, folders and applications (see Configure Deskbar Menu... below). +
      • Applications, Demos, Deskbar Applets, Preferences - List of installed applications, demos, applets and preferences (see Configure Deskbar Menu... below).

      Configure Deskbar Menu...

      Added: haiku/trunk/docs/welcome/teammonitor-images/teammonitor.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/teammonitor-images/teammonitor.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/docs/welcome/tracker-images/get-info.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/get-info.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/docs/welcome/tracker-images/open-with.png =================================================================== (Binary files differ) Added: haiku/trunk/docs/welcome/tracker-images/transaction-status.png =================================================================== (Binary files differ) Property changes on: haiku/trunk/docs/welcome/tracker-images/transaction-status.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -15,7 +15,7 @@

      Welcome     - Previous: The Twitcher + Previous: The Team Monitor     Next: The Deskbar

      @@ -25,7 +25,7 @@

      The Tracker

      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 e.g. crashed or frozen Tracker is to call the TeamManager with CTRL+ALT+DEL to kill Tracker and then click the Restart Desktop... button. The same brings back a wayward Deskbar. +

      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

      @@ -36,7 +36,7 @@

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

      Warning:
      -Before you disconnect e.g. a harddrive or USB stick, make sure you have successfully unmounted the volume. This garantees that all data transfer has finished. Otherwise you may lose data or corrupt the disk!
      +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

      @@ -56,9 +56,9 @@


      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...

      +This is also true for keyboard navigation.

      Keyboard navigation

      -

      A few shortcuts are essential for keyboard navigation: +

      A few shortcuts are essential:

      • ALT+CURSOR-UP - Open parent folder.
      • ALT+CURSOR-DOWN or RETURN - Open selected folder.
      • ALT+W - Close window.
      • @@ -78,7 +78,7 @@
      • Clean Up (ALT+K) - Aligns all icons to an invisible grid. Hold down SHIFT and the menu becomes Clean Up All which additionally sorts all icons alphabetically.
      • Select... (SHIFT+ALT+A) - Select files according to a regular expression.
      -

      The rest of the functions are pretty self-explanatory, leaving the... +

      The rest of the functions are pretty self-explanatory, leaving the Tracker preferences.

      Tracker preferences

      @@ -97,8 +97,8 @@

      Working with files

      -

      When invoked on a selected file, the File menu offers about the same options as when you open a context menu by right-clicking the file. Exceptions are commands that don't specifically target a selected file, like Find.. or New.... -

      As usual the usage of the commands is pretty clear, so we'll concentrate on the niftier parts.

      +

      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 usage of the commands is pretty clear.

      • Find... - Find a file or folder. See topic Query for more info.
      • New... - Create a new folder or any other file based on a template.

        @@ -106,13 +106,29 @@

        Choosing Edit Templates... opens the folder /boot/home/config/settings/Tracker/Tracker New Templates. Creating a file in that folder will offer its filetype with the file's name and other attributes as template in the New... menu. Here, there's a file "Text" with the filetype text/plain. See topic Filetypes for more info.

      • Open With... - A submenu offers all applications that can handle this filetype.

        -open-with.png -

        The preferred application that would open the file when double-clicked, is checkmarked. This submenu list first those applications that can handle the exact filetype, in this case it's a text file, the type text/plain. Next come all applications that can handle that supertype in general, here text/*. Last in the list are those that can deal with any file. If you don't click on an app in the submenu, but on the Open With... entry instead, a panel opens: +open-with.png +

        The preferred application that would open the file when double-clicked, is checkmarked. This submenu lists first those applications that can handle the exact filetype, in this case it's a text file, the type text/plain. Next come all applications that can handle that supertype in general, here text/*. Last in the list are those that can deal with any file. If you don't click on an app in the submenu, but on the Open With... entry instead, a panel opens:

        open-with-preferred

        Here you'll again find the programs that were listed in the submenu. By selecting one and clicking the Open and Make Preferred button, you changed the preferred application for every file of that filetype, here text/plain. +

      • +
      • Get Info +

        +get-info +

        The panel presents info on the selected file and lets you set the default application and, after you expanded that part of the panel, permissions and owner. Clicking on the path will open it in a Tracker window.

      • +
      • Edit Name, Duplicate and Move to Trash - lets you rename or duplicate a file or put the selected file(s) to the trash.
      • +
      • Move to, Copy to and Create Link - lets you move, copy or link the selected file(s) using the submenu navigating method. Holding SHIFT while invoking the menu offers the option to create a relative link.
      • +
      • Cut, Copy and Paste - lets you cut, copy and paste files using the clipboard. By holding SHIFT while invoking the menu you can Copy/Cut more files, maybe from another folder that you can paste somewhere else later. Also, while holding SHIFT you can paste the copied files in the clipboard as links.
      • +
      • Identify - will sniff out and set the type of a file if it didn't have one before, e.g. if you transfered a file with wget which doesn't set a filetype itself. Holding SHIFT while invoking the menu changes the item to identify the filetype and correct it if it was false before.

      +

      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. +

      + +
      +

      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/trunk/docs/welcome/twitcher.html =================================================================== --- haiku/trunk/docs/welcome/twitcher.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/twitcher.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -17,7 +17,7 @@     Previous: Workspaces     - Next: The Tracker + Next: The Team Monitor

    Modified: haiku/trunk/docs/welcome/welcome.html =================================================================== --- haiku/trunk/docs/welcome/welcome.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/welcome.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -46,6 +46,7 @@
  • Haiku's GUI
  • Workspaces
  • Twitcher
  • +
  • Team Monitor
  • Tracker
  • Deskbar
  • Filetypes (plus Workshop)
  • Modified: haiku/trunk/docs/welcome/workspaces-images/workspaces.png =================================================================== (Binary files differ) Modified: haiku/trunk/docs/welcome/workspaces.html =================================================================== --- haiku/trunk/docs/welcome/workspaces.html 2008-10-12 13:29:28 UTC (rev 27994) +++ haiku/trunk/docs/welcome/workspaces.html 2008-10-12 14:10:56 UTC (rev 27995) @@ -28,11 +28,11 @@

    The Workspaces Applet

    -

    workspaces.png +

    workspaces.png

    The Workspaces applet shows a miniature version of all workspaces. There are several options available from the context menu of the applet's window, which are all pretty self-explaining. Since the applet is a Replicant, you can resize the window as desired and then drag&drop it by its handle onto the desktop (make sure "Show Replicants" is activated in the Deskbar menu).

    Switching workspaces

    -

    You can switch between workspaces by either clicking into the Workspaces applet or by using the keyboard shortcut ALT+Fx, where "x" is the workspace number. Also, clicking on an application or one of its windows in the Deskbar will send you to the workspace it resides in. +

    You can switch between workspaces by either clicking into the Workspaces applet or by using the keyboard shortcut ALT+Fx, where "x" is the workspace number. Also, clicking on an application or one of its windows in the Deskbar will send you to the workspace it's in.

    Moving windows between workspaces

    From zooey at mail.berlios.de Sun Oct 12 17:39:23 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Sun, 12 Oct 2008 17:39:23 +0200 Subject: [Haiku-commits] r27996 - haiku/trunk/src/add-ons/kernel/network/stack Message-ID: <200810121539.m9CFdNOQ017118@sheep.berlios.de> Author: zooey Date: 2008-10-12 17:39:23 +0200 (Sun, 12 Oct 2008) New Revision: 27996 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27996&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp Log: * fixed receiving of IP-level broadcasts - fixing the rest of #2065 Modified: haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-12 14:10:56 UTC (rev 27995) +++ haiku/trunk/src/add-ons/kernel/network/stack/datalink.cpp 2008-10-12 15:39:23 UTC (rev 27996) @@ -435,8 +435,10 @@ if (domain->address_module->equal_addresses(interface->address, address)) break; - // check for matching broadcast address if interface support broadcasting - if (interface->flags & IFF_BROADCAST + // check for matching broadcast address if interface supports + // broadcasting (IFF_BROADCAST is a link-level flag, so it is + // a property of the device) + if ((interface->device->flags & IFF_BROADCAST) && domain->address_module->equal_addresses(interface->destination, address)) { matchedType = MSG_BCAST; From zooey at mail.berlios.de Sun Oct 12 19:00:59 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Sun, 12 Oct 2008 19:00:59 +0200 Subject: [Haiku-commits] r27997 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4 Message-ID: <200810121700.m9CH0x7Y029045@sheep.berlios.de> Author: zooey Date: 2008-10-12 19:00:58 +0200 (Sun, 12 Oct 2008) New Revision: 27997 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27997&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp Log: * fixed sending of IP-level broadcasts Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp 2008-10-12 15:39:23 UTC (rev 27996) +++ haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp 2008-10-12 17:00:58 UTC (rev 27997) @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -1249,6 +1250,7 @@ sockaddr_in &source = *(sockaddr_in *)buffer->source; sockaddr_in &destination = *(sockaddr_in *)buffer->destination; + sockaddr_in &broadcastAddress = *(sockaddr_in *)interface->destination; bool headerIncluded = false, checksumNeeded = true; if (protocol != NULL) @@ -1258,8 +1260,10 @@ if (destination.sin_addr.s_addr == INADDR_ANY) return EDESTADDRREQ; - else if (destination.sin_addr.s_addr == INADDR_BROADCAST) { - // TODO check for local broadcast addresses as well? + else if ((interface->device->flags & IFF_BROADCAST) != 0 + && (destination.sin_addr.s_addr == INADDR_BROADCAST + || destination.sin_addr.s_addr + == broadcastAddress.sin_addr.s_addr)) { if (protocol && !(protocol->socket->options & SO_BROADCAST)) return B_BAD_VALUE; buffer->flags |= MSG_BCAST; From mmu_man at mail.berlios.de Sun Oct 12 20:07:48 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sun, 12 Oct 2008 20:07:48 +0200 Subject: [Haiku-commits] r27998 - haiku/trunk/src/system/libroot/posix/string/arch/m68k Message-ID: <200810121807.m9CI7mF5019586@sheep.berlios.de> Author: mmu_man Date: 2008-10-12 20:07:47 +0200 (Sun, 12 Oct 2008) New Revision: 27998 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27998&view=rev Modified: haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S Log: Enable and fix the asm memcpy(). It's far from optimized, but works now and fixes the build. Modified: haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S 2008-10-12 17:00:58 UTC (rev 27997) +++ haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S 2008-10-12 18:07:47 UTC (rev 27998) @@ -4,7 +4,7 @@ */ #warning M68K: optimize memcpy -#if 0 +#if 1 #define FUNCTION(x) .global x; .type x, at function; x /* that should be enough for now */ @@ -15,11 +15,11 @@ move.l (4,%a7),%a1 move.l (8,%a7),%a0 move.l (12,%a7),%d0 +_memcpy_loop: addi.l #-1,%d0 blt _memcpy_out -_memcpy_loop: move.b (%a0)+,(%a1)+ - dbf %d0,_memcpy_loop + bra _memcpy_loop _memcpy_out: move.l (4,%a7),%a0 move.l %a0,%d0 From mmu_man at mail.berlios.de Sun Oct 12 20:13:13 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sun, 12 Oct 2008 20:13:13 +0200 Subject: [Haiku-commits] r27999 - in haiku/trunk: headers/private/system/arch/m68k src/system/kernel/arch/m68k Message-ID: <200810121813.m9CIDDk2020026@sheep.berlios.de> Author: mmu_man Date: 2008-10-12 20:13:11 +0200 (Sun, 12 Oct 2008) New Revision: 27999 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27999&view=rev Added: haiku/trunk/headers/private/system/arch/m68k/asm_defs.h Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_commpage.cpp haiku/trunk/src/system/kernel/arch/m68k/arch_cpu.cpp haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp Log: - Add m68k pendant of: r27529 & r27778 - handle skipIframes parameter r27530 - allow faults with ints disabled if there is a handler r27648 - call the end-of-interrupt thread callback r27718 - add , not used yet r27722 - register the commpage as image and symbols (but we don't use it yet) - remove dupped call to thread_get_current_thread() - use 16MB iospace for now, 4MB seems too small. Added: haiku/trunk/headers/private/system/arch/m68k/asm_defs.h =================================================================== --- haiku/trunk/headers/private/system/arch/m68k/asm_defs.h 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/headers/private/system/arch/m68k/asm_defs.h 2008-10-12 18:13:11 UTC (rev 27999) @@ -0,0 +1,17 @@ +/* + * Copyright 2008, Fran?ois Revol, revol at free.fr. + * Distributed under the terms of the MIT License. + */ +#ifndef SYSTEM_ARCH_M68K_ASM_DEFS_H +#define SYSTEM_ARCH_M68K_ASM_DEFS_H + + +#define SYMBOL(name) .global name; name +#define SYMBOL_END(name) 1: .size name, 1b - name +#define STATIC_FUNCTION(name) .type name, @function; name +#define FUNCTION(name) .global name; .type name, @function; name +#define FUNCTION_END(name) 1: .size name, 1b - name + + +#endif /* SYSTEM_ARCH_M68K_ASM_DEFS_H */ + Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_commpage.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_commpage.cpp 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_commpage.cpp 2008-10-12 18:13:11 UTC (rev 27999) @@ -11,6 +11,7 @@ #include #include +#include #include @@ -20,6 +21,9 @@ { /* no optimized memcpy or anything yet */ /* we don't use it for syscall yet either */ + // add syscall to the commpage image + image_id image = get_commpage_image(); + return B_OK; } Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_cpu.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_cpu.cpp 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_cpu.cpp 2008-10-12 18:13:11 UTC (rev 27999) @@ -16,6 +16,8 @@ #include #include #include +#include +#include extern struct m68k_cpu_ops cpu_ops_030; extern struct m68k_cpu_ops cpu_ops_040; @@ -93,6 +95,9 @@ status_t arch_cpu_init_post_modules(kernel_args *args) { + // add the functions to the commpage image + image_id image = get_commpage_image(); + return B_OK; } Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp 2008-10-12 18:13:11 UTC (rev 27999) @@ -284,18 +284,32 @@ } +/*! Captures a stack trace (the return addresses) of the current thread. + \param returnAddresses The array the return address shall be written to. + \param maxCount The maximum number of return addresses to be captured. + \param skipIframes The number of interrupt frames that shall be skipped. If + greater than 0, \a skipFrames is ignored. + \param skipFrames The number of stack frames that shall be skipped. + \param userOnly If \c true, only userland return addresses are captured. + \return The number of return addresses written to the given array. +*/ int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount, int32 skipIframes, int32 skipFrames, bool userOnly) { -// TODO: Support skipIframes! struct iframe_stack *frameStack; addr_t framePointer; int32 count = 0; int32 i, num = 0, last = 0; - // always skip our own frame - skipFrames++; + // Keep skipping normal stack frames until we've skipped the iframes we're + // supposed to skip. + if (skipIframes > 0) { + skipFrames = INT_MAX; + } else { + // always skip our own frame + skipFrames++; + } struct thread* thread = thread_get_current_thread(); framePointer = (addr_t)get_current_stack_frame(); @@ -323,6 +337,11 @@ if (frame) { ip = frame->cpu.pc; nextFrame = frame->a[6]; + + if (skipIframes > 0) { + if (--skipIframes == 0) + skipFrames = 0; + } } else { if (get_next_frame(framePointer, &nextFrame, &ip) != B_OK) break; Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp 2008-10-12 18:13:11 UTC (rev 27999) @@ -168,6 +168,7 @@ { int vector = iframe->cpu.vector >> 2; int ret = B_HANDLED_INTERRUPT; + bool hardwareInterrupt = false; if (vector != -1) { dprintf("m68k_exception_entry: time %lld vector 0x%x, iframe %p, " @@ -193,7 +194,6 @@ if (kernelDebugger) { // if this thread has a fault handler, we're allowed to be here - struct thread *thread = thread_get_current_thread(); if (thread && thread->fault_handler != 0) { iframe->cpu.pc = thread->fault_handler; break; @@ -206,6 +206,17 @@ (void *)iframe->cpu.pc); break; } else if ((iframe->cpu.sr & SR_IP_MASK) != 0) { + // interrupts disabled + + // If a page fault handler is installed, we're allowed to be here. + // TODO: Now we are generally allowing user_memcpy() with interrupts + // disabled, which in most cases is a bug. We should add some thread + // flag allowing to explicitly indicate that this handling is desired. + if (thread && thread->fault_handler != 0) { + iframe->cpu.pc = thread->fault_handler; + return; + } + // if the interrupts were disabled, and we are not running the // kernel startup the page fault was not allowed to happen and // we must panic @@ -265,6 +276,7 @@ } #endif dprintf("handling I/O interrupts done\n"); + hardwareInterrupt = true; break; } @@ -288,6 +300,14 @@ scheduler_reschedule(); RELEASE_THREAD_LOCK(); restore_interrupts(state); + } else if (hardwareInterrupt && thread->post_interrupt_callback != NULL) { + void (*callback)(void*) = thread->post_interrupt_callback; + void* data = thread->post_interrupt_data; + + thread->post_interrupt_callback = NULL; + thread->post_interrupt_data = NULL; + + callback(data); } // pop iframe Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp 2008-10-12 18:07:47 UTC (rev 27998) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp 2008-10-12 18:13:11 UTC (rev 27999) @@ -66,7 +66,8 @@ #endif // 4 MB of iospace -#define IOSPACE_SIZE (4*1024*1024) +//#define IOSPACE_SIZE (4*1024*1024) +#define IOSPACE_SIZE (16*1024*1024) // 256K = 2^6*4K #define IOSPACE_CHUNK_SIZE (NUM_PAGEENT_PER_TBL*B_PAGE_SIZE) From anevilyak at mail.berlios.de Sun Oct 12 20:15:54 2008 From: anevilyak at mail.berlios.de (anevilyak at BerliOS) Date: Sun, 12 Oct 2008 20:15:54 +0200 Subject: [Haiku-commits] r28000 - haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv Message-ID: <200810121815.m9CIFsjJ020235@sheep.berlios.de> Author: anevilyak Date: 2008-10-12 20:15:54 +0200 (Sun, 12 Oct 2008) New Revision: 28000 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28000&view=rev Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.h haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/Jamfile Log: Code style cleanup / honored 80 column line length limit. Modified FireWireDVAddOn to use BObjectList. Feel free to chime in if I missed any style violations. Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.cpp 2008-10-12 18:15:54 UTC (rev 28000) @@ -6,6 +6,8 @@ * */ +#include "FireWireCard.h" + #include #include #include @@ -16,7 +18,6 @@ #include #include -#include "FireWireCard.h" #include "glue.h" #define TAG (1<<6) @@ -79,11 +80,11 @@ #define MPEG_RBUFSIZE (MPEG_PSIZE * MPEG_NPACKET_R) -FireWireCard::FireWireCard(const char *path) - : fInitStatus(B_OK) - , fDev(-1) - , fBuf(NULL) - , fPad(NULL) +FireWireCard::FireWireCard(const char* path) + : fInitStatus(B_OK), + fDev(-1), + fBuf(NULL), + fPad(NULL) { printf("FireWireCard opening %s\n", path); @@ -111,7 +112,7 @@ ssize_t -FireWireCard::Read(void **data) +FireWireCard::Read(void** data) { if (fFormat == FMT_MPEGTS) return MpegtsRead(data); @@ -121,7 +122,7 @@ status_t -FireWireCard::Extract(void *dest, void **src, ssize_t *sizeUsed) +FireWireCard::Extract(void* dest, void** src, ssize_t* sizeUsed) { if (fFormat == FMT_MPEGTS) return MpegtsExtract(dest, src, sizeUsed); @@ -131,7 +132,7 @@ void -FireWireCard::GetBufInfo(size_t *rbufsize, int *rcount) +FireWireCard::GetBufInfo(size_t* rbufsize, int* rcount) { *rbufsize = fRbufSize; *rcount = fRcount; @@ -141,12 +142,13 @@ status_t FireWireCard::DetectRecvFn() { - char *buf, ich = TAG | CHANNEL; + char* buf; + char ich = TAG | CHANNEL; struct fw_isochreq isoreq; struct fw_isobufreq bufreq; int len; - u_int32_t *ptr; - struct ciphdr *ciph; + u_int32_t* ptr; + struct ciphdr* ciph; bufreq.rx.nchunk = 8; bufreq.rx.npacket = 16; @@ -164,12 +166,12 @@ if (ioctl(fDev, FW_SRSTREAM, &isoreq) < 0) return errno; - buf = (char *)malloc(1024*16); + buf = (char*)malloc(1024*16); len = read(fDev, buf, 1024*16); if (len < 0) return errno; - ptr = (u_int32_t *) buf; - ciph = (struct ciphdr *)(ptr + 1); + ptr = (u_int32_t*) buf; + ciph = (struct ciphdr*)(ptr + 1); switch(ciph->fmt) { case CIP_FMT_DVCR: @@ -197,7 +199,7 @@ ssize_t -FireWireCard::DvRead(void **buffer) +FireWireCard::DvRead(void** buffer) { struct fw_isochreq isoreq; struct fw_isobufreq bufreq; @@ -234,30 +236,30 @@ status_t -FireWireCard::DvExtract(void *dest, void **src, ssize_t *sizeUsed) +FireWireCard::DvExtract(void* dest, void** src, ssize_t* sizeUsed) { - struct dvdbc *dv; - struct ciphdr *ciph; - struct fw_pkt *pkt; - u_int32_t *ptr; + struct dvdbc* dv; + struct ciphdr* ciph; + struct fw_pkt* pkt; + u_int32_t* ptr; int nblocks[] = {250 /* NTSC */, 300 /* PAL */}; int npad, k, m, system = -1, nb; k = m = 0; - ptr = (u_int32_t *) (*src); + ptr = (u_int32_t*) (*src); - pkt = (struct fw_pkt *) ptr; - ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ + pkt = (struct fw_pkt*) ptr; + ciph = (struct ciphdr*)(ptr + 1); /* skip iso header */ if (ciph->fmt != CIP_FMT_DVCR) { fprintf(stderr, "unknown format 0x%x", ciph->fmt); return B_ERROR; } - ptr = (u_int32_t *) (ciph + 1); /* skip cip header */ + ptr = (u_int32_t*) (ciph + 1); /* skip cip header */ if (pkt->mode.stream.len <= sizeof(struct ciphdr)) /* no payload */ return B_ERROR; - for (dv = (struct dvdbc *)ptr; - (char *)dv < (char *)(ptr + ciph->len); + for (dv = (struct dvdbc*)ptr; + (char*)dv < (char *)(ptr + ciph->len); dv+=6) { if (dv->sct == DV_SCT_HEADER && dv->dseq == 0) { @@ -282,7 +284,7 @@ npad); npad *= DV_DSIZE; memcpy(dest, fPad, npad); - dest = (char *)dest + npad; + dest = (char*)dest + npad; } #endif k++; @@ -297,16 +299,16 @@ continue; m++; memcpy(dest, dv, DV_DSIZE); - dest = (char *)dest + DV_DSIZE; + dest = (char*)dest + DV_DSIZE; } - ptr = (u_int32_t *)dv; + ptr = (u_int32_t*)dv; *src = ptr; return B_OK; } ssize_t -FireWireCard::MpegtsRead(void **buffer) +FireWireCard::MpegtsRead(void** buffer) { struct fw_isochreq isoreq; struct fw_isobufreq bufreq; @@ -344,20 +346,20 @@ status_t -FireWireCard::MpegtsExtract(void *dest, void **src, ssize_t *sizeUsed) +FireWireCard::MpegtsExtract(void* dest, void** src, ssize_t* sizeUsed) { - uint32_t *ptr; - struct fw_pkt *pkt; - struct ciphdr *ciph; - struct mpeg_pldt *pld; + uint32_t* ptr; + struct fw_pkt* pkt; + struct ciphdr* ciph; + struct mpeg_pldt* pld; int pkt_size, startwr; ptr = (uint32_t *)(*src); startwr = 0; - pkt = (struct fw_pkt *) ptr; + pkt = (struct fw_pkt*) ptr; /* there is no CRC in the 1394 header */ - ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ + ciph = (struct ciphdr*)(ptr + 1); /* skip iso header */ if (ciph->fmt != CIP_FMT_MPEG) { fprintf(stderr, "unknown format 0x%x", ciph->fmt); return B_ERROR; @@ -367,7 +369,7 @@ "fn=3 is supported)", ciph->fn); return B_ERROR; } - ptr = (uint32_t *) (ciph + 1); /* skip cip header */ + ptr = (uint32_t*) (ciph + 1); /* skip cip header */ if (pkt->mode.stream.len <= sizeof(struct ciphdr)) { /* no payload */ @@ -381,12 +383,12 @@ startwr = 1; /* Read out all the MPEG TS data blocks from current packet */ for (pld = (struct mpeg_pldt *)ptr; - (intptr_t)pld < (intptr_t)((char *)ptr + + (intptr_t)pld < (intptr_t)((char*)ptr + pkt->mode.stream.len - sizeof(struct ciphdr)); pld++) { if (startwr == 1) { memcpy(dest, pld->payload, sizeof(pld->payload)); - dest = (char *)dest + sizeof(pld->payload); + dest = (char*)dest + sizeof(pld->payload); } } @@ -394,7 +396,8 @@ /* CRCs are removed from both header and trailer so that only 4 bytes of 1394 header remains */ pkt_size = pkt->mode.stream.len + 4; - ptr = (uint32_t *)((intptr_t)pkt + pkt_size); + ptr = (uint32_t*)((intptr_t)pkt + pkt_size); *src = ptr; return B_OK; } + Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireCard.h 2008-10-12 18:15:54 UTC (rev 28000) @@ -9,35 +9,37 @@ #ifndef __FIREWIRE_CARD_H #define __FIREWIRE_CARD_H +#include + class FireWireCard { public: - enum fmt_type { - FMT_MPEGTS = 0, - FMT_DV = 1, - }; - FireWireCard(const char *path); - ~FireWireCard(); + enum fmt_type { + FMT_MPEGTS = 0, + FMT_DV = 1, + }; + FireWireCard(const char* path); + ~FireWireCard(); status_t InitCheck(); status_t DetectRecvFn(); - ssize_t Read(void **buffer); - status_t Extract(void *dest, void **src, ssize_t *sizeUsed); + ssize_t Read(void** buffer); + status_t Extract(void* dest, void** src, ssize_t* sizeUsed); - void GetBufInfo(size_t *rbufsize, int *rcount); + void GetBufInfo(size_t* rbufsize, int* rcount); private: - ssize_t DvRead(void **buffer); - status_t DvExtract(void *dest, void **src, ssize_t *sizeUsed); - ssize_t MpegtsRead(void **buffer); - status_t MpegtsExtract(void *dest, void **src, ssize_t *sizeUsed); + ssize_t DvRead(void** buffer); + status_t DvExtract(void* dest, void** src, ssize_t* sizeUsed); + ssize_t MpegtsRead(void** buffer); + status_t MpegtsExtract(void* dest, void** src, + ssize_t* sizeUsed); - status_t fInitStatus; int fDev; - void *fBuf; - void *fPad; + void* fBuf; + void* fPad; size_t fRbufSize; int fRcount; fmt_type fFormat; @@ -45,3 +47,4 @@ }; #endif + Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.cpp 2008-10-12 18:15:54 UTC (rev 28000) @@ -15,6 +15,7 @@ #include #include #include + #include #include #include @@ -24,35 +25,38 @@ struct device_info { - FireWireCard * card; - char name[16]; + FireWireCard* card; + char name[16]; media_format in_formats[1]; media_format out_formats[1]; flavor_info flavor; }; -extern "C" BMediaAddOn * +extern "C" BMediaAddOn* make_media_addon(image_id id) { CALLED(); return new FireWireDVAddOn(id); } -FireWireDVAddOn::~FireWireDVAddOn() + +FireWireDVAddOn::FireWireDVAddOn(image_id id) + : BMediaAddOn(id) { CALLED(); - FreeDeviceList(); + ScanFolder("/dev/bus/fw"); } -FireWireDVAddOn::FireWireDVAddOn(image_id id) - : BMediaAddOn(id) + +FireWireDVAddOn::~FireWireDVAddOn() { CALLED(); - ScanFolder("/dev/bus/fw"); + FreeDeviceList(); } + status_t -FireWireDVAddOn::InitCheck(const char **out_failure_text) +FireWireDVAddOn::InitCheck(const char** out_failure_text) { CALLED(); if (!fDeviceList.CountItems()) { @@ -62,6 +66,7 @@ return B_OK; } + int32 FireWireDVAddOn::CountFlavors() { @@ -69,31 +74,36 @@ return fDeviceList.CountItems(); } + status_t -FireWireDVAddOn::GetFlavorAt(int32 n, const flavor_info **out_info) +FireWireDVAddOn::GetFlavorAt(int32 n, const flavor_info** out_info) { CALLED(); - device_info *dev = (device_info *)fDeviceList.ItemAt(n); + device_info* dev = fDeviceList.ItemAt(n); if (!dev) return B_ERROR; *out_info = &dev->flavor; return B_OK; } + BMediaNode * -FireWireDVAddOn::InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error) +FireWireDVAddOn::InstantiateNodeFor(const flavor_info* info, BMessage* config, + status_t* out_error) { CALLED(); - device_info *dev = (device_info *)fDeviceList.ItemAt(info->internal_id); + device_info* dev = fDeviceList.ItemAt(info->internal_id); if (!dev || dev->flavor.internal_id != info->internal_id) { *out_error = B_ERROR; return NULL; } *out_error = B_OK; - return new FireWireDVNode(this, dev->name, dev->flavor.internal_id, dev->card); + return new FireWireDVNode(this, dev->name, dev->flavor.internal_id, + dev->card); } + bool FireWireDVAddOn::WantsAutoStart() { @@ -101,15 +111,18 @@ return false; } + status_t -FireWireDVAddOn::AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore) +FireWireDVAddOn::AutoStart(int index, BMediaNode** outNode, + int32* outInternalID, bool* outHasMore) { CALLED(); return B_ERROR; } + void -FireWireDVAddOn::ScanFolder(const char *path) +FireWireDVAddOn::ScanFolder(const char* path) { CALLED(); BDirectory dir(path); @@ -130,10 +143,11 @@ } } + void -FireWireDVAddOn::AddDevice(FireWireCard *card, const char *path) +FireWireDVAddOn::AddDevice(FireWireCard* card, const char* path) { - const char *fwnumber; + const char* fwnumber; // get card name, info and type @@ -175,9 +189,10 @@ void FireWireDVAddOn::FreeDeviceList() { - device_info *dev; - while ((dev = (device_info *)fDeviceList.RemoveItem((int32)0))) { + device_info* dev; + while ((dev = fDeviceList.RemoveItemAt(0L))) { delete dev->card; delete dev; } } + Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h 2008-10-12 18:15:54 UTC (rev 28000) @@ -12,34 +12,37 @@ #define _FIREWIRE_DV_ADDON_H_ #include +#include class FireWireCard; +struct device_info; class FireWireDVAddOn : public BMediaAddOn { public: - FireWireDVAddOn(image_id id); - ~FireWireDVAddOn(); + FireWireDVAddOn(image_id id); + ~FireWireDVAddOn(); - status_t InitCheck(const char **out_failure_text); + status_t InitCheck(const char** out_failure_text); int32 CountFlavors(); - status_t GetFlavorAt(int32 n, const flavor_info **out_info); + status_t GetFlavorAt(int32 n, const flavor_info** out_info); - BMediaNode *InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error); + BMediaNode* InstantiateNodeFor(const flavor_info* info, + BMessage* config, status_t* out_error); bool WantsAutoStart(); - status_t AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore); + status_t AutoStart(int index, BMediaNode** outNode, + int32* outInternalID, bool* outHasMore); protected: - void ScanFolder(const char *path); - - void AddDevice(FireWireCard *card, const char *path); + void ScanFolder(const char* path); + void AddDevice(FireWireCard* card, const char* path); void FreeDeviceList(); protected: - BList fDeviceList; + BObjectList fDeviceList; }; #endif Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp 2008-10-12 18:15:54 UTC (rev 28000) @@ -8,6 +8,8 @@ * Copyright (c) 2004-2007 Marcus Overhagen */ +#include "FireWireDVNode.h" + #include #include #include @@ -17,18 +19,17 @@ #include #include -#include +#include #include #include -#include -#include -#include -#include #include - #include #include +#include +#include #include +#include +#include #include "FireWireDVNode.h" #include "FireWireCard.h" @@ -42,7 +43,7 @@ #ifdef TRACE # undef TRACE #endif -#define TRACE_FIREWIRE_NODE +//#define TRACE_FIREWIRE_NODE #ifdef TRACE_FIREWIRE_NODE # define TRACE(x...) printf(x) #else @@ -53,20 +54,19 @@ #define M_REFRESH_PARAMETER_WEB (BTimedEventQueue::B_USER_EVENT + 1) -FireWireDVNode::FireWireDVNode( - BMediaAddOn *addon, const char *name, - int32 internal_id, FireWireCard *card) - : BMediaNode(name) - , BBufferProducer(B_MEDIA_ENCODED_VIDEO) - , BControllable() - , BMediaEventLooper() - , fOutputEnabledEncVideo(false) - , fCard(card) - , fCaptureThreadsActive(false) - , fThreadIdCardReader(-1) - , fTerminateThreads(false) - , fBufferGroupEncVideo(0) - , fCaptureActive(false) +FireWireDVNode::FireWireDVNode(BMediaAddOn* addon, const char* name, + int32 internal_id, FireWireCard* card) + : BMediaNode(name), + BBufferProducer(B_MEDIA_ENCODED_VIDEO), + BControllable(), + BMediaEventLooper(), + fOutputEnabledEncVideo(false), + fCard(card), + fCaptureThreadsActive(false), + fThreadIdCardReader(-1), + fTerminateThreads(false), + fBufferGroupEncVideo(0), + fCaptureActive(false) { CALLED(); @@ -92,10 +92,8 @@ /* BMediaNode */ - - -BMediaAddOn * -FireWireDVNode::AddOn(int32 *internal_id) const +BMediaAddOn* +FireWireDVNode::AddOn(int32* internal_id) const { if (internal_id) *internal_id = fInternalID; @@ -104,7 +102,7 @@ status_t -FireWireDVNode::HandleMessage(int32 message, const void *data, size_t size) +FireWireDVNode::HandleMessage(int32 message, const void* data, size_t size) { return B_ERROR; } @@ -119,7 +117,7 @@ void -FireWireDVNode::SetTimeSource(BTimeSource *time_source) +FireWireDVNode::SetTimeSource(BTimeSource* time_source) { CALLED(); } @@ -134,8 +132,6 @@ /* BMediaEventLooper */ - - void FireWireDVNode::NodeRegistered() { @@ -156,8 +152,8 @@ void -FireWireDVNode::HandleEvent(const media_timed_event *event, - bigtime_t lateness, bool realTimeEvent) +FireWireDVNode::HandleEvent(const media_timed_event* event, + bigtime_t lateness, bool realTimeEvent) { switch(event->type) @@ -188,12 +184,10 @@ /* BBufferProducer */ - - status_t -FireWireDVNode::FormatChangeRequested(const media_source &source, - const media_destination &destination, media_format *io_format, - int32 *_deprecated_) +FireWireDVNode::FormatChangeRequested(const media_source& source, + const media_destination& destination, media_format* io_format, + int32* _deprecated_) { CALLED(); @@ -203,7 +197,7 @@ status_t -FireWireDVNode::GetNextOutput(int32 *cookie, media_output *out_output) +FireWireDVNode::GetNextOutput(int32* cookie, media_output* out_output) { CALLED(); @@ -227,7 +221,7 @@ status_t -FireWireDVNode::SetBufferGroup(const media_source &source, BBufferGroup *group) +FireWireDVNode::SetBufferGroup(const media_source& source, BBufferGroup* group) { CALLED(); return B_ERROR; @@ -235,9 +229,9 @@ status_t -FireWireDVNode::VideoClippingChanged(const media_source &for_source, - int16 num_shorts, int16 *clip_data, - const media_video_display_info &display, int32 *_deprecated_) +FireWireDVNode::VideoClippingChanged(const media_source& for_source, + int16 num_shorts, int16* clip_data, + const media_video_display_info& display, int32* _deprecated_) { CALLED(); return B_ERROR; @@ -245,7 +239,7 @@ status_t -FireWireDVNode::GetLatency(bigtime_t *out_latency) +FireWireDVNode::GetLatency(bigtime_t* out_latency) { CALLED(); @@ -256,7 +250,7 @@ status_t FireWireDVNode::FormatSuggestionRequested( - media_type type, int32 quality, media_format *format) + media_type type, int32 quality, media_format* format) { CALLED(); @@ -280,7 +274,8 @@ status_t -FireWireDVNode::FormatProposal(const media_source &source, media_format *format) +FireWireDVNode::FormatProposal(const media_source& source, + media_format* format) { CALLED(); /* The connection process: @@ -320,9 +315,9 @@ status_t -FireWireDVNode::PrepareToConnect(const media_source &source, - const media_destination &destination, media_format *format, - media_source *out_source, char *out_name) +FireWireDVNode::PrepareToConnect(const media_source& source, + const media_destination& destination, media_format* format, + media_source* out_source, char* out_name) { /* The connection process: * BBufferProducer::FormatProposal @@ -372,9 +367,9 @@ void -FireWireDVNode::Connect(status_t error, const media_source &source, - const media_destination &destination, const media_format &format, - char *io_name) +FireWireDVNode::Connect(status_t error, const media_source& source, + const media_destination& destination, const media_format& format, + char* io_name) { /* The connection process: * BBufferProducer::FormatProposal @@ -417,7 +412,7 @@ void FireWireDVNode::Disconnect(const media_source &source, - const media_destination &destination) + const media_destination& destination) { CALLED(); @@ -428,16 +423,16 @@ void -FireWireDVNode::LateNoticeReceived(const media_source &source, - bigtime_t how_much, bigtime_t performance_time) +FireWireDVNode::LateNoticeReceived(const media_source& source, + bigtime_t how_much, bigtime_t performance_time) { TRACE("FireWireDVNode::LateNoticeReceived %Ld late at %Ld\n", how_much, performance_time); } void -FireWireDVNode::EnableOutput(const media_source &source, bool enabled, - int32 *_deprecated_) +FireWireDVNode::EnableOutput(const media_source& source, bool enabled, + int32* _deprecated_) { CALLED(); fOutputEnabledEncVideo = enabled; @@ -445,9 +440,9 @@ void -FireWireDVNode::AdditionalBufferRequested(const media_source &source, - media_buffer_id prev_buffer, bigtime_t prev_time, - const media_seek_tag *prev_tag) +FireWireDVNode::AdditionalBufferRequested(const media_source& source, + media_buffer_id prev_buffer, bigtime_t prev_time, + const media_seek_tag* prev_tag) { CALLED(); // we don't support offline mode @@ -456,8 +451,6 @@ /* FireWireDVNode */ - - void FireWireDVNode::HandleTimeWarp(bigtime_t performance_time) { @@ -559,7 +552,7 @@ int32 -FireWireDVNode::_card_reader_thread_(void *arg) +FireWireDVNode::_card_reader_thread_(void* arg) { static_cast(arg)->card_reader_thread(); return 0; @@ -585,10 +578,10 @@ continue; } - end = (char *)data + sizeUsed; + end = (char*)data + sizeUsed; while (data < end) { - BBuffer *buf = fBufferGroupEncVideo->RequestBuffer(rbufsize, 10000); + BBuffer* buf = fBufferGroupEncVideo->RequestBuffer(rbufsize, 10000); if (!buf) { TRACE("OutVideo: request buffer timout\n"); continue; @@ -608,12 +601,12 @@ //what should the start_time be? hdr->start_time = TimeSource()->PerformanceTimeFor(system_time()); - lock.Lock(); + fLock.Lock(); if (B_OK != SendBuffer(buf, fOutputEncVideo.destination)) { TRACE("OutVideo: sending buffer failed\n"); buf->Recycle(); } - lock.Unlock(); + fLock.Unlock(); } } @@ -631,7 +624,7 @@ void -FireWireDVNode::SetAboutInfo(BParameterGroup *about) +FireWireDVNode::SetAboutInfo(BParameterGroup* about) { //May need more useful infomation? about->MakeNullParameter(0, B_MEDIA_NO_TYPE, "FireWireDV media_addon info:", B_GENERIC); @@ -648,17 +641,17 @@ FireWireDVNode::CreateParameterWeb() { /* Set up the parameter web */ - BParameterWeb *web = new BParameterWeb(); + BParameterWeb* web = new BParameterWeb(); BString name; name << Name(); - BParameterGroup *main = web->MakeGroup(name.String()); + BParameterGroup* main = web->MakeGroup(name.String()); if (!fCaptureActive) { - BParameterGroup *info = main->MakeGroup("Info"); + BParameterGroup* info = main->MakeGroup("Info"); info->MakeNullParameter(0, B_MEDIA_NO_TYPE, info->Name(), B_GENERIC); - BParameterGroup *about = main->MakeGroup("About"); + BParameterGroup* about = main->MakeGroup("About"); about->MakeNullParameter(0, B_MEDIA_NO_TYPE, about->Name(), B_GENERIC); SetAboutInfo(about); info->MakeNullParameter(0, B_MEDIA_NO_TYPE, "Node is stopped", B_GENERIC); @@ -666,7 +659,7 @@ return web; } - BParameterGroup *about = main->MakeGroup("About"); + BParameterGroup* about = main->MakeGroup("About"); about->MakeNullParameter(0, B_MEDIA_NO_TYPE, about->Name(), B_GENERIC); SetAboutInfo(about); @@ -675,7 +668,8 @@ status_t -FireWireDVNode::GetParameterValue(int32 id, bigtime_t *last_change, void *value, size_t *size) +FireWireDVNode::GetParameterValue(int32 id, bigtime_t* last_change, + void* value, size_t* size) { TRACE("FireWireDVNode::GetParameterValue, id 0x%lx\n", id); //do we need Parameter for firewire dv? @@ -684,9 +678,12 @@ void -FireWireDVNode::SetParameterValue(int32 id, bigtime_t when, const void *value, size_t size) +FireWireDVNode::SetParameterValue(int32 id, bigtime_t when, const void* value, + size_t size) { - TRACE("FireWireDVNode::SetParameterValue, id 0x%lx, size %ld, value 0x%lx\n", id, size, *(const int32 *)value); + TRACE("FireWireDVNode::SetParameterValue, id 0x%lx, size %ld, " + "value 0x%lx\n", id, size, *(const int32*)value); //do we need parameter for firewire dv? TRACE("FireWireDVNode::SetParameterValue finished\n"); } + Modified: haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.h =================================================================== --- haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.h 2008-10-12 18:13:11 UTC (rev 27999) +++ haiku/trunk/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.h 2008-10-12 18:15:54 UTC (rev 28000) @@ -27,119 +27,121 @@ class FireWireDVNode : public virtual BBufferProducer, public virtual BControllable, public virtual BMediaEventLooper { public: - FireWireDVNode(BMediaAddOn *addon, - const char *name, int32 internal_id, FireWireCard *card); -virtual ~FireWireDVNode(); + FireWireDVNode(BMediaAddOn *addon, + const char *name, int32 internal_id, + FireWireCard *card); + virtual ~FireWireDVNode(); + + virtual status_t InitCheck() const { return fInitStatus; } -virtual status_t InitCheck() const { return fInitStatus; } - /* BMediaNode */ public: -virtual BMediaAddOn *AddOn(int32 * internal_id) const; -virtual status_t HandleMessage(int32 message, const void *data, - size_t size); + virtual BMediaAddOn *AddOn(int32 * internal_id) const; + virtual status_t HandleMessage(int32 message, const void *data, + size_t size); protected: -virtual void Preroll(); -virtual void SetTimeSource(BTimeSource * time_source); -virtual void SetRunMode(run_mode mode); + virtual void Preroll(); + virtual void SetTimeSource(BTimeSource * time_source); + virtual void SetRunMode(run_mode mode); /* BMediaEventLooper */ protected: -virtual void NodeRegistered(); + virtual void NodeRegistered(); + virtual void HandleEvent(const media_timed_event *event, + bigtime_t lateness, + bool realTimeEvent = false); -virtual void HandleEvent(const media_timed_event *event, - bigtime_t lateness, bool realTimeEvent = false); - /* BBufferProducer */ protected: -virtual status_t FormatSuggestionRequested(media_type type, int32 quality, - media_format * format); -virtual status_t FormatProposal(const media_source &source, - media_format *format); -virtual status_t FormatChangeRequested(const media_source &source, - const media_destination &destination, - media_format *io_format, int32 *_deprecated_); -virtual status_t GetNextOutput(int32 * cookie, media_output * out_output); -virtual status_t DisposeOutputCookie(int32 cookie); -virtual status_t SetBufferGroup(const media_source &for_source, - BBufferGroup * group); -virtual status_t VideoClippingChanged(const media_source &for_source, - int16 num_shorts, int16 *clip_data, - const media_video_display_info &display, - int32 * _deprecated_); -virtual status_t GetLatency(bigtime_t * out_latency); -virtual status_t PrepareToConnect(const media_source &what, - const media_destination &where, - media_format *format, - media_source *out_source, char *out_name); -virtual void Connect(status_t error, const media_source &source, - const media_destination &destination, - const media_format & format, char *io_name); -virtual void Disconnect(const media_source & what, - const media_destination & where); -virtual void LateNoticeReceived(const media_source & what, - bigtime_t how_much, bigtime_t performance_time); -virtual void EnableOutput(const media_source & what, bool enabled, - int32 * _deprecated_); -virtual void AdditionalBufferRequested(const media_source & source, - media_buffer_id prev_buffer, bigtime_t prev_time, - const media_seek_tag * prev_tag); + virtual status_t FormatSuggestionRequested(media_type type, + int32 quality, media_format* format); + virtual status_t FormatProposal(const media_source &source, + media_format* format); + virtual status_t FormatChangeRequested( + const media_source &source, + const media_destination &destination, + media_format* io_format, + int32* _deprecated_); + virtual status_t GetNextOutput(int32* cookie, + media_output* out_output); + virtual status_t DisposeOutputCookie(int32 cookie); + virtual status_t SetBufferGroup(const media_source& for_source, + BBufferGroup* group); + virtual status_t VideoClippingChanged( [... truncated: 137 lines follow ...] From axeld at mail.berlios.de Sun Oct 12 21:14:56 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 21:14:56 +0200 Subject: [Haiku-commits] r28001 - haiku/trunk/src/system/kernel/fs Message-ID: <200810121914.m9CJEu0x025003@sheep.berlios.de> Author: axeld Date: 2008-10-12 21:14:55 +0200 (Sun, 12 Oct 2008) New Revision: 28001 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28001&view=rev Modified: haiku/trunk/src/system/kernel/fs/vfs_request_io.cpp Log: * do_iterative_fd_io_iterate() must check for B_BUFFER_OVERFLOW to handle the case it has to call the file map translation hook again to fulfill the whole request; it already handled the partial case correctly. * This fixes an occasional "Value too large" error when accesssing fragmented files. Modified: haiku/trunk/src/system/kernel/fs/vfs_request_io.cpp =================================================================== --- haiku/trunk/src/system/kernel/fs/vfs_request_io.cpp 2008-10-12 18:15:54 UTC (rev 28000) +++ haiku/trunk/src/system/kernel/fs/vfs_request_io.cpp 2008-10-12 19:14:55 UTC (rev 28001) @@ -206,7 +206,7 @@ uint32 vecCount = kMaxSubRequests; status_t error = cookie->get_vecs(cookie->cookie, request, requestOffset, requestLength, vecs, &vecCount); - if (error != B_OK) + if (error != B_OK && error != B_BUFFER_OVERFLOW) return error; if (vecCount == 0) { *_partialTransfer = true; From stippi at mail.berlios.de Sun Oct 12 21:30:59 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 21:30:59 +0200 Subject: [Haiku-commits] r28002 - in haiku/trunk: headers/os/interface src/kits/interface Message-ID: <200810121930.m9CJUxZ0026493@sheep.berlios.de> Author: stippi Date: 2008-10-12 21:30:59 +0200 (Sun, 12 Oct 2008) New Revision: 28002 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28002&view=rev Modified: haiku/trunk/headers/os/interface/Window.h haiku/trunk/src/kits/interface/Window.cpp Log: * Refactored a method for getting the transit from a mouse moved message. * In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead, prevent B_MOUSE_MOVED message from being stolen that are important for detecting transit changes. The point is that some apps (like Tracker) are shooting themselves in the foot because they steal mouse messages via GetMouse() in one place, but then rely on sane transit values in another place. The way it works now, the view in question may get notified of the same mouse moved coordinate twice, once via GetMouse() and once via MouseMoved(). Modified: haiku/trunk/headers/os/interface/Window.h =================================================================== --- haiku/trunk/headers/os/interface/Window.h 2008-10-12 19:14:55 UTC (rev 28001) +++ haiku/trunk/headers/os/interface/Window.h 2008-10-12 19:30:59 UTC (rev 28002) @@ -301,6 +301,8 @@ BHandler* target, bool usePreferred); bool _StealMouseMessage(BMessage* message, bool& deleteMessage); + uint32 _TransitForMouseMoved(BView* view, + BView* viewUnderMouse) const; bool InUpdate(); void _DequeueAll(); Modified: haiku/trunk/src/kits/interface/Window.cpp =================================================================== --- haiku/trunk/src/kits/interface/Window.cpp 2008-10-12 19:14:55 UTC (rev 28001) +++ haiku/trunk/src/kits/interface/Window.cpp 2008-10-12 19:30:59 UTC (rev 28002) @@ -3006,8 +3006,8 @@ Returns \c true in case the message should still be dispatched */ bool -BWindow::_UnpackMessage(unpack_cookie& cookie, BMessage** _message, BHandler** _target, - bool* _usePreferred) +BWindow::_UnpackMessage(unpack_cookie& cookie, BMessage** _message, + BHandler** _target, bool* _usePreferred) { if (cookie.message == NULL) return false; @@ -3140,21 +3140,7 @@ viewUnderMouse = _FindView(token); // add transit information - int32 transit; - if (viewUnderMouse == view) { - // the mouse is over the target view - if (fLastMouseMovedView != view) - transit = B_ENTERED_VIEW; - else - transit = B_INSIDE_VIEW; - } else { - // the mouse is not over the target view - if (view == fLastMouseMovedView) - transit = B_EXITED_VIEW; - else - transit = B_OUTSIDE_VIEW; - } - + uint32 transit = _TransitForMouseMoved(view, viewUnderMouse);; message->AddInt32("be:transit", transit); if (usePreferred || viewUnderMouse == NULL) @@ -3210,27 +3196,55 @@ message->RemoveName("_feed_focus"); deleteMessage = false; } else { - // The message is only thought for the preferred handler, so we - // can just remove it. - MessageQueue()->RemoveMessage(message); deleteMessage = true; if (message->what == B_MOUSE_MOVED) { // We need to update the last mouse moved view, as this message - // won't make it to _SanitizeMessage() anymore + // won't make it to _SanitizeMessage() anymore. BView* viewUnderMouse = NULL; int32 token; if (message->FindInt32("_view_token", &token) == B_OK) viewUnderMouse = _FindView(token); - fLastMouseMovedView = viewUnderMouse; + // Don't remove important transit messages! + uint32 transit = _TransitForMouseMoved(fLastMouseMovedView, + viewUnderMouse); + if (transit == B_ENTERED_VIEW || transit == B_EXITED_VIEW) + deleteMessage = false; } + + if (deleteMessage) { + // The message is only thought for the preferred handler, so we + // can just remove it. + MessageQueue()->RemoveMessage(message); + } } return true; } +uint32 +BWindow::_TransitForMouseMoved(BView* view, BView* viewUnderMouse) const +{ + uint32 transit; + if (viewUnderMouse == view) { + // the mouse is over the target view + if (fLastMouseMovedView != view) + transit = B_ENTERED_VIEW; + else + transit = B_INSIDE_VIEW; + } else { + // the mouse is not over the target view + if (view == fLastMouseMovedView) + transit = B_EXITED_VIEW; + else + transit = B_OUTSIDE_VIEW; + } + return transit; +} + + /*! Handles keyboard input before it gets forwarded to the target handler. This includes shortcut evaluation, keyboard navigation, etc. From stippi at mail.berlios.de Sun Oct 12 21:32:42 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 21:32:42 +0200 Subject: [Haiku-commits] r28003 - in haiku/trunk/src/tests/servers/app: . view_transit Message-ID: <200810121932.m9CJWggZ026652@sheep.berlios.de> Author: stippi Date: 2008-10-12 21:32:41 +0200 (Sun, 12 Oct 2008) New Revision: 28003 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28003&view=rev Added: haiku/trunk/src/tests/servers/app/view_transit/ haiku/trunk/src/tests/servers/app/view_transit/Jamfile haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp Modified: haiku/trunk/src/tests/servers/app/Jamfile Log: Added a test application for view transit changes, including the problem of stealing (not anymore) mouse messages that are important for maintaining the correct transit. Modified: haiku/trunk/src/tests/servers/app/Jamfile =================================================================== --- haiku/trunk/src/tests/servers/app/Jamfile 2008-10-12 19:30:59 UTC (rev 28002) +++ haiku/trunk/src/tests/servers/app/Jamfile 2008-10-12 19:32:41 UTC (rev 28003) @@ -190,6 +190,7 @@ SubInclude HAIKU_TOP src tests servers app stress_test ; SubInclude HAIKU_TOP src tests servers app textview ; SubInclude HAIKU_TOP src tests servers app view_state ; +SubInclude HAIKU_TOP src tests servers app view_transit ; SubInclude HAIKU_TOP src tests servers app window_creation ; SubInclude HAIKU_TOP src tests servers app workspace_activated ; SubInclude HAIKU_TOP src tests servers app workspace_switcher ; Added: haiku/trunk/src/tests/servers/app/view_transit/Jamfile =================================================================== --- haiku/trunk/src/tests/servers/app/view_transit/Jamfile 2008-10-12 19:30:59 UTC (rev 28002) +++ haiku/trunk/src/tests/servers/app/view_transit/Jamfile 2008-10-12 19:32:41 UTC (rev 28003) @@ -0,0 +1,13 @@ +SubDir HAIKU_TOP src tests servers app view_transit ; + +SetSubDirSupportedPlatformsBeOSCompatible ; +AddSubDirSupportedPlatforms libbe_test ; + +UseHeaders [ FDirName os app ] ; +UseHeaders [ FDirName os interface ] ; + +Application ViewState : + ViewTransit.cpp + : be +; + Added: haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp =================================================================== --- haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp 2008-10-12 19:30:59 UTC (rev 28002) +++ haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp 2008-10-12 19:32:41 UTC (rev 28003) @@ -0,0 +1,134 @@ +/* + * Copyright 2008, Stephan A?mus + * Distributed under the terms of the MIT License. + */ + + +#include +#include +#include + +#include + + +class View : public BView { +public: + View(BRect rect, const char* name, uint32 followMode, + uint8 red, uint8 green, uint8 blue); + virtual ~View(); + + virtual void Draw(BRect updateRect); + + virtual void MouseDown(BPoint where); + virtual void MouseMoved(BPoint where, uint32 transit, + const BMessage* dragMessage); + +private: + void _SetTransit(uint32 transit); + + uint32 fLastTransit; +}; + + +View::View(BRect rect, const char* name, uint32 followMode, + uint8 red, uint8 green, uint8 blue) + : BView(rect, name, followMode, B_WILL_DRAW), + fLastTransit(B_OUTSIDE_VIEW) +{ + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + SetHighColor(red, green, blue); +} + + +View::~View() +{ +} + + +void +View::Draw(BRect updateRect) +{ + if (fLastTransit == B_INSIDE_VIEW || fLastTransit == B_ENTERED_VIEW) + FillRect(updateRect); +} + + +void +View::MouseDown(BPoint where) +{ + uint32 buttons; + do { + GetMouse(&where, &buttons); + } while (buttons != 0); +} + + +void +View::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) +{ + _SetTransit(transit); +} + + +void +View::_SetTransit(uint32 transit) +{ + if (transit == fLastTransit) + return; + + switch (transit) { + case B_ENTERED_VIEW: + if (fLastTransit == B_INSIDE_VIEW) + printf("%s, B_ENTERED_VIEW, but already inside!\n", Name()); + break; + + case B_EXITED_VIEW: + if (fLastTransit == B_OUTSIDE_VIEW) + printf("%s, B_EXITED_VIEW, but already outside!\n", Name()); + break; + + case B_INSIDE_VIEW: + if (fLastTransit == B_OUTSIDE_VIEW) + printf("%s, B_INSIDE_VIEW, but never entered!\n", Name()); + if (fLastTransit == B_EXITED_VIEW) + printf("%s, B_INSIDE_VIEW, but just exited!\n", Name()); + break; + + case B_OUTSIDE_VIEW: + if (fLastTransit == B_INSIDE_VIEW) + printf("%s, B_OUTSIDE_VIEW, but never exited!\n", Name()); + if (fLastTransit == B_ENTERED_VIEW) + printf("%s, B_OUTSIDE_VIEW, but just entered!\n", Name()); + break; + } + + fLastTransit = transit; + Invalidate(); +} + + +// #pragma mark - + + +int +main(int argc, char **argv) +{ + BApplication app("application/x-vnd.haiku-view_transit"); + + BWindow* window = new BWindow(BRect(100, 100, 400, 400), + "ViewTransit-Test", B_TITLED_WINDOW, + B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE); + + BRect frame = window->Bounds(); + frame.right /= 2; + window->AddChild(new View(frame, "L ", B_FOLLOW_ALL, 255, 0, 0)); + frame.left = frame.right + 1; + frame.right = window->Bounds().right; + window->AddChild(new View(frame, "R", B_FOLLOW_TOP_BOTTOM | B_FOLLOW_RIGHT, + 0, 255, 0)); + + window->Show(); + + app.Run(); + return 0; +} From axeld at mail.berlios.de Sun Oct 12 21:59:52 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Sun, 12 Oct 2008 21:59:52 +0200 Subject: [Haiku-commits] r28004 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200810121959.m9CJxqRS028570@sheep.berlios.de> Author: axeld Date: 2008-10-12 21:59:51 +0200 (Sun, 12 Oct 2008) New Revision: 28004 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28004&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp Log: mmlr: * Actually call prepare_sleep_state() instead of calling enter_sleep_state() twice... * Commented out disabling interrupts when calling enter_sleep_state(), as our ACPI modules would then crash (needs memory & uses sems with interrupts disabled). This way, it at least works on some hardware, including emulators (as before). Modified: haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp 2008-10-12 19:32:41 UTC (rev 28003) +++ haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp 2008-10-12 19:59:51 UTC (rev 28004) @@ -108,11 +108,11 @@ if (get_module(B_ACPI_MODULE_NAME, (module_info**)&acpi) != B_OK) return B_NOT_SUPPORTED; - status_t status = acpi->enter_sleep_state(ACPI_POWER_STATE_OFF); + status_t status = acpi->prepare_sleep_state(ACPI_POWER_STATE_OFF, NULL, 0); if (status == B_OK) { - cpu_status state = disable_interrupts(); + //cpu_status state = disable_interrupts(); status = acpi->enter_sleep_state(ACPI_POWER_STATE_OFF); - restore_interrupts(state); + //restore_interrupts(state); } put_module(B_ACPI_MODULE_NAME); From alex at zappotek.com Sun Oct 12 22:03:46 2008 From: alex at zappotek.com (Alexandre Deckner) Date: Sun, 12 Oct 2008 22:03:46 +0200 Subject: [Haiku-commits] r28002 - in haiku/trunk: headers/os/interface src/kits/interface In-Reply-To: <200810121930.m9CJUxZ0026493@sheep.berlios.de> References: <200810121930.m9CJUxZ0026493@sheep.berlios.de> Message-ID: <48F25822.6050609@zappotek.com> stippi at BerliOS wrote: > Author: stippi > Date: 2008-10-12 21:30:59 +0200 (Sun, 12 Oct 2008) > New Revision: 28002 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28002&view=rev > > Modified: > haiku/trunk/headers/os/interface/Window.h > haiku/trunk/src/kits/interface/Window.cpp > Log: > * Refactored a method for getting the transit from a mouse moved message. > * In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead, > prevent B_MOUSE_MOVED message from being stolen that are important for > detecting transit changes. The point is that some apps (like Tracker) are > shooting themselves in the foot because they steal mouse messages via > GetMouse() in one place, but then rely on sane transit values in another > place. The way it works now, the view in question may get notified of the > same mouse moved coordinate twice, once via GetMouse() and once via > MouseMoved(). > Hooray! This indeed fixes #2453 :-] Thanks, Alex From stippi at mail.berlios.de Sun Oct 12 23:12:08 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 23:12:08 +0200 Subject: [Haiku-commits] r28005 - haiku/trunk/src/apps/mediaplayer Message-ID: <200810122112.m9CLC8a6003850@sheep.berlios.de> Author: stippi Date: 2008-10-12 23:12:07 +0200 (Sun, 12 Oct 2008) New Revision: 28005 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28005&view=rev Modified: haiku/trunk/src/apps/mediaplayer/Controller.cpp haiku/trunk/src/apps/mediaplayer/Controller.h Log: Fix playback of playlists when "auto play files" is off. The playback stopped after every new file of a playlist. Modified: haiku/trunk/src/apps/mediaplayer/Controller.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/Controller.cpp 2008-10-12 19:59:51 UTC (rev 28004) +++ haiku/trunk/src/apps/mediaplayer/Controller.cpp 2008-10-12 21:12:07 UTC (rev 28005) @@ -114,6 +114,8 @@ { Settings::Default()->AddListener(&fGlobalSettingsListener); _AdoptGlobalSettings(); + + fAutoplay = fAutoplaySetting; } @@ -189,8 +191,10 @@ if (fRef == ref) { if (InitCheck() == B_OK) { - SetPosition(0.0); - StartPlaying(); + if (fAutoplay) { + SetPosition(0.0); + StartPlaying(true); + } } return B_OK; } @@ -488,6 +492,8 @@ StopPlaying(); SetPosition(0.0); + + fAutoplay = fAutoplaySetting; } @@ -499,6 +505,7 @@ BAutolock _(this); StartPlaying(); + fAutoplay = true; } @@ -510,6 +517,8 @@ BAutolock _(this); PausePlaying(); + + fAutoplay = fAutoplaySetting; } @@ -520,8 +529,11 @@ BAutolock _(this); - if (InitCheck() == B_OK) + if (InitCheck() == B_OK) { NodeManager::TogglePlaying(); + + fAutoplay = IsPlaying() || fAutoplaySetting; + } } @@ -784,7 +796,7 @@ mpSettings settings = Settings::CurrentSettings(); // thread safe - fAutoplay = settings.autostart; + fAutoplaySetting = settings.autostart; // not yet used: fLoopMovies = settings.loopMovie; fLoopSounds = settings.loopSound; Modified: haiku/trunk/src/apps/mediaplayer/Controller.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/Controller.h 2008-10-12 19:59:51 UTC (rev 28004) +++ haiku/trunk/src/apps/mediaplayer/Controller.h 2008-10-12 21:12:07 UTC (rev 28005) @@ -183,7 +183,12 @@ bigtime_t fLastSeekEventTime; ListenerAdapter fGlobalSettingsListener; + + bool fAutoplaySetting; + // maintains the auto-play setting bool fAutoplay; + // is true if the player is already playing + // otherwise it's the same as fAutoplaySetting bool fLoopMovies; bool fLoopSounds; uint32 fBackgroundMovieVolumeMode; From stippi at mail.berlios.de Sun Oct 12 23:13:59 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Sun, 12 Oct 2008 23:13:59 +0200 Subject: [Haiku-commits] r28006 - haiku/trunk/src/apps/mediaplayer/playlist Message-ID: <200810122113.m9CLDxYA004108@sheep.berlios.de> Author: stippi Date: 2008-10-12 23:13:59 +0200 (Sun, 12 Oct 2008) New Revision: 28006 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28006&view=rev Modified: haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h Log: * Some work in progress towards supporting "Playlist->Save" versus "Playlist->Save As...". * Fixed loading of playlists. Sorting the list after loading it is not the idea of restoring a manually sorted playlist. Modified: haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp 2008-10-12 21:12:07 UTC (rev 28005) +++ haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp 2008-10-12 21:13:59 UTC (rev 28006) @@ -54,6 +54,7 @@ // init new entries for (int32 i = 0; i < fNewCount; i++) { if (temp.GetRefAt(i, &fNewRefs[i]) < B_OK) { + // indicate bad object init delete[] fNewRefs; fNewRefs = NULL; return; Modified: haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp 2008-10-12 21:12:07 UTC (rev 28005) +++ haiku/trunk/src/apps/mediaplayer/playlist/Playlist.cpp 2008-10-12 21:13:59 UTC (rev 28006) @@ -253,7 +253,7 @@ } if (index <= fCurrentIndex) SetCurrentRefIndex(fCurrentIndex + count); - // empty the other list, so that the entry_refs are no ours + // empty the other list, so that the entry_refs are now ours other.fRefs.MakeEmpty(); return true; } @@ -395,11 +395,31 @@ Playlist temporaryPlaylist; Playlist* playlist = add ? &temporaryPlaylist : this; + bool sortPlaylist = true; entry_ref ref; - for (int i = 0; refsReceivedMessage->FindRef("refs", i, &ref) == B_OK; i++) - AppendToPlaylistRecursive(ref, playlist); - playlist->Sort(); + int32 subAppendIndex = CountItems(); + for (int i = 0; refsReceivedMessage->FindRef("refs", i, &ref) == B_OK; + i++) { + Playlist subPlaylist; + if (_IsPlaylist(_MIMEString(&ref))) { + AppendPlaylistToPlaylist(ref, &subPlaylist); + // Do not sort the whole playlist anymore, as that + // will screw up the ordering in the saved playlist. + sortPlaylist = false; + } else { + AppendToPlaylistRecursive(ref, &subPlaylist); + // At least sort the this subsection of the playlist + // if the whole playlist is not sorted anymore. + if (!sortPlaylist) + subPlaylist.Sort(); + } + int32 subPlaylistCount = subPlaylist.CountItems(); + AdoptPlaylist(subPlaylist, subAppendIndex); + subAppendIndex += subPlaylistCount; + } + if (sortPlaylist) + playlist->Sort(); if (add) AdoptPlaylist(temporaryPlaylist, appendIndex); @@ -416,17 +436,9 @@ { // recursively append the ref (dive into folders) BEntry entry(&ref, true); - if (entry.InitCheck() < B_OK) { - printf("Not OK\n"); + if (entry.InitCheck() < B_OK || !entry.Exists()) return; - } - if (!entry.Exists()) { - BPath path = BPath(&ref); - //printf("Don't exist - %s\n", path.Path()); - return; - } - if (entry.IsDirectory()) { BDirectory dir(&entry); if (dir.InitCheck() < B_OK) @@ -441,39 +453,51 @@ if (_IsMediaFile(mimeString)) { //printf("Adding\n"); playlist->AddRef(ref); - } else if (_IsTextPlaylist(mimeString)) { - //printf("RunPlaylist thing\n"); - BFile file(&ref, B_READ_ONLY); - FileReadWrite lineReader(&file); - - BString str; - entry_ref refPath; - status_t err; - BPath path; - while (lineReader.Next(str)) { - str = str.RemoveFirst("file://"); - str = str.RemoveLast(".."); - path = BPath(str.String()); - printf("Line %s\n", path.Path()); - if (path.Path() != NULL) { - if ((err = get_ref_for_path(path.Path(), &refPath)) == B_OK) { - playlist->AddRef(refPath); - } else - printf("Error - %s: [%lx]\n", strerror(err), (int32) err); - } else - printf("Error - No File Found in playlist\n"); - } - } else if (_IsBinaryPlaylist(mimeString)) { - BFile file(&ref, B_READ_ONLY); - Playlist temp; - if (temp.Unflatten(&file) == B_OK) - playlist->AdoptPlaylist(temp, playlist->CountItems()); } else printf("MIME Type = %s\n", mimeString.String()); } } +/*static*/ void +Playlist::AppendPlaylistToPlaylist(const entry_ref& ref, Playlist* playlist) +{ + BEntry entry(&ref, true); + if (entry.InitCheck() < B_OK || !entry.Exists()) + return; + + BString mimeString = _MIMEString(&ref); + if (_IsTextPlaylist(mimeString)) { + //printf("RunPlaylist thing\n"); + BFile file(&ref, B_READ_ONLY); + FileReadWrite lineReader(&file); + + BString str; + entry_ref refPath; + status_t err; + BPath path; + while (lineReader.Next(str)) { + str = str.RemoveFirst("file://"); + str = str.RemoveLast(".."); + path = BPath(str.String()); + printf("Line %s\n", path.Path()); + if (path.Path() != NULL) { + if ((err = get_ref_for_path(path.Path(), &refPath)) == B_OK) { + playlist->AddRef(refPath); + } else + printf("Error - %s: [%lx]\n", strerror(err), (int32) err); + } else + printf("Error - No File Found in playlist\n"); + } + } else if (_IsBinaryPlaylist(mimeString)) { + BFile file(&ref, B_READ_ONLY); + Playlist temp; + if (temp.Unflatten(&file) == B_OK) + playlist->AdoptPlaylist(temp, playlist->CountItems()); + } +} + + // #pragma mark - @@ -521,6 +545,13 @@ } +/*static*/ bool +Playlist::_IsPlaylist(const BString& mimeString) +{ + return _IsTextPlaylist(mimeString) || _IsBinaryPlaylist(mimeString); +} + + /*static*/ BString Playlist::_MIMEString(const entry_ref* ref) { Modified: haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h 2008-10-12 21:12:07 UTC (rev 28005) +++ haiku/trunk/src/apps/mediaplayer/playlist/Playlist.h 2008-10-12 21:13:59 UTC (rev 28006) @@ -91,13 +91,16 @@ int32 appendIndex = -1); static void AppendToPlaylistRecursive(const entry_ref& ref, Playlist* playlist); + static void AppendPlaylistToPlaylist(const entry_ref& ref, + Playlist* playlist); private: - static int playlist_cmp(const void* p1, const void* p2); - static bool _IsMediaFile(const BString& mimeString); - static bool _IsTextPlaylist(const BString& mimeString); - static bool _IsBinaryPlaylist(const BString& mimeString); - static BString _MIMEString(const entry_ref* entry); + static int playlist_cmp(const void* p1, const void* p2); + static bool _IsMediaFile(const BString& mimeString); + static bool _IsTextPlaylist(const BString& mimeString); + static bool _IsBinaryPlaylist(const BString& mimeString); + static bool _IsPlaylist(const BString& mimeString); + static BString _MIMEString(const entry_ref* entry); void _NotifyRefAdded(const entry_ref& ref, int32 index) const; void _NotifyRefRemoved(int32 index) const; Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-12 21:12:07 UTC (rev 28005) +++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp 2008-10-12 21:13:59 UTC (rev 28006) @@ -34,12 +34,21 @@ #include "PlaylistListView.h" #include "RWLocker.h" -#define DEBUG 1 +// TODO: +// Maintaining a playlist file on disk is a bit tricky. The playlist ref should +// be discarded when the user +// * loads a new playlist via Open, +// * loads a new playlist via dropping it on the MainWindow, +// * loads a new playlist via dropping it into the ListView while replacing +// the contents, +// * replacing the contents by other stuff. + enum { // file M_PLAYLIST_OPEN = 'open', M_PLAYLIST_SAVE = 'save', + M_PLAYLIST_SAVE_AS = 'svas', M_PLAYLIST_SAVE_RESULT = 'psrs', // edit @@ -153,6 +162,14 @@ break; } case M_PLAYLIST_SAVE: { + if (fSavedPlaylistRef != entry_ref()) { + _SavePlaylist(fSavedPlaylistRef); + break; + } else { + // FALL THROUGH + } + } + case M_PLAYLIST_SAVE_AS: { BMessenger target(this); BMessage result(M_PLAYLIST_SAVE_RESULT); BMessage appMessage(M_SHOW_SAVE_PANEL); @@ -194,9 +211,13 @@ menuBar->AddItem(fileMenu); fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS, new BMessage(M_PLAYLIST_OPEN), 'O')); - fileMenu->AddItem(new BMenuItem("Save"B_UTF8_ELLIPSIS, - new BMessage(M_PLAYLIST_SAVE), 'S')); + fileMenu->AddItem(new BMenuItem("Save As"B_UTF8_ELLIPSIS, + new BMessage(M_PLAYLIST_SAVE_AS), 'S', B_SHIFT_KEY)); +// fileMenu->AddItem(new BMenuItem("Save", +// new BMessage(M_PLAYLIST_SAVE), 'S')); + fileMenu->AddSeparatorItem(); + fileMenu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W')); @@ -296,6 +317,29 @@ return; } + _SavePlaylist(origEntry, tempEntry, name); +} + + +void +PlaylistWindow::_SavePlaylist(const entry_ref& ref) +{ + BString tempName(ref.name); + tempName << system_time(); + entry_ref tempRef(ref); + tempRef.set_name(tempName.String()); + + BEntry origEntry(&ref); + BEntry tempEntry(&tempRef); + + _SavePlaylist(origEntry, tempEntry, ref.name); +} + + +void +PlaylistWindow::_SavePlaylist(BEntry& origEntry, BEntry& tempEntry, + const char* finalName) +{ class TempEntryRemover { public: TempEntryRemover(BEntry* entry) @@ -342,7 +386,7 @@ } // clobber original entry, if it exists - tempEntry.Rename(name, true); + tempEntry.Rename(finalName, true); remover.Detach(); BNodeInfo info(&file); Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h =================================================================== --- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h 2008-10-12 21:12:07 UTC (rev 28005) +++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h 2008-10-12 21:13:59 UTC (rev 28006) @@ -11,6 +11,7 @@ #define PLAYLIST_WINDOW_H +#include #include #include "ListenerAdapter.h" @@ -27,7 +28,7 @@ class BFilePanel; class PlaylistWindow : public BWindow { - public: +public: PlaylistWindow(BRect frame, Playlist* playlist, Controller* controller); @@ -36,21 +37,27 @@ virtual bool QuitRequested(); virtual void MessageReceived(BMessage* message); - private: +private: void _CreateMenu(BRect& frame); void _ObjectChanged(const Notifier* object); - void _SavePlaylist(const BMessage* message); + void _SavePlaylist(const BMessage* filePanelMessage); + void _SavePlaylist(const entry_ref& ref); + void _SavePlaylist(BEntry& origEntry, + BEntry& tempEntry, const char* finalName); + Playlist* fPlaylist; PlaylistListView* fListView; BView* fTopView; BMenuItem* fUndoMI; BMenuItem* fRedoMI; - + RWLocker* fLocker; CommandStack* fCommandStack; ListenerAdapter fCommandStackListener; + + entry_ref fSavedPlaylistRef; }; #endif // PLAYLIST_WINDOW_H From mmu_man at mail.berlios.de Sun Oct 12 23:23:05 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sun, 12 Oct 2008 23:23:05 +0200 Subject: [Haiku-commits] r28007 - haiku/trunk/src/system/kernel/arch/m68k Message-ID: <200810122123.m9CLN5Pd004587@sheep.berlios.de> Author: mmu_man Date: 2008-10-12 23:23:04 +0200 (Sun, 12 Oct 2008) New Revision: 28007 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28007&view=rev Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S Log: Fix identifying iframes in stack_traces. What you get copying ppc code without trying to understand :) Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp 2008-10-12 21:13:59 UTC (rev 28006) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_debug.cpp 2008-10-12 21:23:04 UTC (rev 28007) @@ -194,7 +194,7 @@ // see if the frame pointer matches the iframe struct iframe *frame = NULL; for (i = 0; i < frameStack->index; i++) { - if (framePointer == (((addr_t)frameStack->frames[i] - 8) & ~0xf)) { + if (framePointer == (addr_t)frameStack->frames[i]) { // it's an iframe frame = frameStack->frames[i]; break; @@ -324,7 +324,7 @@ // see if the frame pointer matches the iframe struct iframe *frame = NULL; for (i = 0; i < frameStack->index; i++) { - if (framePointer == (((addr_t)frameStack->frames[i] - 8) & ~0xf)) { + if (framePointer == (addr_t)frameStack->frames[i]) { // it's an iframe frame = frameStack->frames[i]; break; Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S 2008-10-12 21:13:59 UTC (rev 28006) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S 2008-10-12 21:23:04 UTC (rev 28007) @@ -108,6 +108,7 @@ sub.l #IFRAME_fpu-IFRAME_fp,%sp null_sav_2: + move.l %sp,%fp /* have stack_trace() find the iframe */ move.l %sp,-(%sp) /* push address of iframe */ bsr m68k_exception_entry /* call C entry */ add.l #4,%sp From mmu_man at mail.berlios.de Sun Oct 12 23:34:33 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sun, 12 Oct 2008 23:34:33 +0200 Subject: [Haiku-commits] r28008 - haiku/trunk/src/system/boot/platform/atari_m68k Message-ID: <200810122134.m9CLYX2X005378@sheep.berlios.de> Author: mmu_man Date: 2008-10-12 23:34:31 +0200 (Sun, 12 Oct 2008) New Revision: 28008 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28008&view=rev Modified: haiku/trunk/src/system/boot/platform/atari_m68k/atari_memory_map.h haiku/trunk/src/system/boot/platform/atari_m68k/mmu.cpp Log: Avoid using the first physical page. The first 2kB are supposedly protected by the hardware (though it should be accessible by supervisor...) This fixes an segfault. Now the kernel panics in M68KAtari::InitTimer()... "WRITEME" :) Modified: haiku/trunk/src/system/boot/platform/atari_m68k/atari_memory_map.h =================================================================== --- haiku/trunk/src/system/boot/platform/atari_m68k/atari_memory_map.h 2008-10-12 21:23:04 UTC (rev 28007) +++ haiku/trunk/src/system/boot/platform/atari_m68k/atari_memory_map.h 2008-10-12 21:34:31 UTC (rev 28008) @@ -6,7 +6,9 @@ #define ATARI_MEMORY_MAP_H /* the DMA-accessible RAM */ -#define ATARI_CHIPRAM_BASE 0x00000000 +/*#define ATARI_CHIPRAM_BASE 0x00000000*/ +/* actually, the first 2kB aren't usable */ +#define ATARI_CHIPRAM_BASE 0x00001000 #define ATARI_CHIPRAM_MAX 0x00e00000 #define ATARI_CHIPRAM_LAST \ (ATARI_CHIPRAM_BASE + (ATARI_CHIPRAM_MAX - 1)) Modified: haiku/trunk/src/system/boot/platform/atari_m68k/mmu.cpp =================================================================== --- haiku/trunk/src/system/boot/platform/atari_m68k/mmu.cpp 2008-10-12 21:23:04 UTC (rev 28007) +++ haiku/trunk/src/system/boot/platform/atari_m68k/mmu.cpp 2008-10-12 21:34:31 UTC (rev 28008) @@ -625,7 +625,7 @@ // st ram as 1st range gKernelArgs.physical_memory_range[0].start = ATARI_CHIPRAM_BASE; - gKernelArgs.physical_memory_range[0].size = *TOSVARphystop; + gKernelArgs.physical_memory_range[0].size = *TOSVARphystop - ATARI_CHIPRAM_BASE; gKernelArgs.num_physical_memory_ranges = 1; // fast ram as 2nd range From mmu_man at mail.berlios.de Sun Oct 12 23:35:50 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Sun, 12 Oct 2008 23:35:50 +0200 Subject: [Haiku-commits] r28009 - haiku/trunk/src/system/kernel/vm Message-ID: <200810122135.m9CLZoOL005444@sheep.berlios.de> Author: mmu_man Date: 2008-10-12 23:35:49 +0200 (Sun, 12 Oct 2008) New Revision: 28009 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28009&view=rev Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: Fix ifdef, should be DEBUG_PAGE_QUEUE there. Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-12 21:34:31 UTC (rev 28008) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2008-10-12 21:35:49 UTC (rev 28009) @@ -1880,7 +1880,7 @@ if (reserved || sReservedPages < free_page_queue_count()) { page = dequeue_page(queue); if (page == NULL) { -#ifdef DEBUG +#ifdef DEBUG_PAGE_QUEUE if (queue->count != 0) panic("queue %p corrupted, count = %d\n", queue, queue->count); #endif From korli at mail.berlios.de Mon Oct 13 00:21:54 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 00:21:54 +0200 Subject: [Haiku-commits] r28010 - haiku/trunk/src/add-ons/kernel/network/protocols/unix Message-ID: <200810122221.m9CMLslo010083@sheep.berlios.de> Author: korli Date: 2008-10-13 00:21:54 +0200 (Mon, 13 Oct 2008) New Revision: 28010 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28010&view=rev Modified: haiku/trunk/src/add-ons/kernel/network/protocols/unix/UnixFifo.cpp Log: No newline at end of file Modified: haiku/trunk/src/add-ons/kernel/network/protocols/unix/UnixFifo.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/network/protocols/unix/UnixFifo.cpp 2008-10-12 21:35:49 UTC (rev 28009) +++ haiku/trunk/src/add-ons/kernel/network/protocols/unix/UnixFifo.cpp 2008-10-12 22:21:54 UTC (rev 28010) @@ -574,4 +574,5 @@ // Write as much as we can. RETURN_ERROR(fBuffer.Write(request)); -} \ No newline at end of file +} + From korli at mail.berlios.de Mon Oct 13 00:23:11 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 00:23:11 +0200 Subject: [Haiku-commits] r28011 - haiku/trunk/src/add-ons/media/plugins/ogg Message-ID: <200810122223.m9CMNBrT010142@sheep.berlios.de> Author: korli Date: 2008-10-13 00:23:11 +0200 (Mon, 13 Oct 2008) New Revision: 28011 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28011&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/ogg/OggReaderPlugin.h Log: fix a warning Modified: haiku/trunk/src/add-ons/media/plugins/ogg/OggReaderPlugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/ogg/OggReaderPlugin.h 2008-10-12 22:21:54 UTC (rev 28010) +++ haiku/trunk/src/add-ons/media/plugins/ogg/OggReaderPlugin.h 2008-10-12 22:23:11 UTC (rev 28011) @@ -57,6 +57,7 @@ public: class StreamInterface { public: + virtual ~StreamInterface() {}; virtual ssize_t ReadPage() = 0; }; }; From korli at mail.berlios.de Mon Oct 13 00:24:42 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 00:24:42 +0200 Subject: [Haiku-commits] r28012 - haiku/trunk/src/add-ons/tracker/zipomatic Message-ID: <200810122224.m9CMOgWh010241@sheep.berlios.de> Author: korli Date: 2008-10-13 00:24:42 +0200 (Mon, 13 Oct 2008) New Revision: 28012 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28012&view=rev Modified: haiku/trunk/src/add-ons/tracker/zipomatic/GenericThread.cpp Log: fix a warning (return local address). Modified: haiku/trunk/src/add-ons/tracker/zipomatic/GenericThread.cpp =================================================================== --- haiku/trunk/src/add-ons/tracker/zipomatic/GenericThread.cpp 2008-10-12 22:23:11 UTC (rev 28011) +++ haiku/trunk/src/add-ons/tracker/zipomatic/GenericThread.cpp 2008-10-12 22:24:42 UTC (rev 28012) @@ -3,6 +3,8 @@ #include "GenericThread.h" +#include + GenericThread::GenericThread(const char * a_thread_name, int32 a_priority, BMessage * a_message) : m_thread_data_store (a_message), @@ -313,7 +315,7 @@ { thread_info t_thread_info; GetInfo (& t_thread_info); - return (t_thread_info.name); + return strdup(t_thread_info.name); } thread_state From mmu_man at mail.berlios.de Mon Oct 13 00:43:51 2008 From: mmu_man at mail.berlios.de (mmu_man at BerliOS) Date: Mon, 13 Oct 2008 00:43:51 +0200 Subject: [Haiku-commits] r28013 - haiku/trunk/src/system/kernel/platform/atari_m68k Message-ID: <200810122243.m9CMhpjM028310@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 00:43:45 +0200 (Mon, 13 Oct 2008) New Revision: 28013 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28013&view=rev Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp Log: Add support for using the MFP0 timer A. Not calibrated though. Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp =================================================================== --- haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 22:24:42 UTC (rev 28012) +++ haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 22:43:45 UTC (rev 28013) @@ -1,5 +1,5 @@ /* - Just a dummy. No BIOS services are required in the kernel. + Atari kernel platform code. */ #include @@ -288,8 +288,10 @@ status_t M68KAtari::InitTimer(struct kernel_args *kernelArgs) { - panic("WRITEME"); - return B_NO_INIT; + + out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it + install_io_interrupt_handler(fMFP[0]->Vector()+13, &pit_timer_interrupt, NULL, 0); + return B_OK; } @@ -504,12 +506,17 @@ void M68KAtari::SetHardwareTimer(bigtime_t timeout) { + uint8 counts = (uint8)(timeout & 0x0ff); + //XXX: SCALE + out8(fMFP[0]->Base() + MFP_TADR, counts); + out8(fMFP[0]->Base() + MFP_TACR, 0x01); // delay mode, device by 4 } void M68KAtari::ClearHardwareTimer(void) { + out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it } From mmu_man at mail.berlios.de Mon Oct 13 00:52:54 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 00:52:54 +0200 Subject: [Haiku-commits] r28014 - haiku/trunk/src/system/kernel/platform/atari_m68k Message-ID: <200810122252.m9CMqssb007948@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 00:52:51 +0200 (Mon, 13 Oct 2008) New Revision: 28014 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28014&view=rev Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp Log: Might work better with the interrupt handler... I should go to bed now. Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp =================================================================== --- haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 22:43:45 UTC (rev 28013) +++ haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 22:52:51 UTC (rev 28014) @@ -5,6 +5,7 @@ #include #include +#include #include @@ -13,7 +14,7 @@ //#include #include #include -#include +#include #include "debugger_keymaps.h" @@ -118,6 +119,8 @@ private: MFP *MFPForIrq(int irq); + static int32 MFPTimerInterrupt(void *data); + int fRTC; MFP *fMFP[2]; @@ -290,7 +293,7 @@ { out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it - install_io_interrupt_handler(fMFP[0]->Vector()+13, &pit_timer_interrupt, NULL, 0); + install_io_interrupt_handler(fMFP[0]->Vector()+13, &MFPTimerInterrupt, fMFP[0], 0); return B_OK; } @@ -542,7 +545,13 @@ return NULL; } +int32 +M68KAtari::MFPTimerInterrupt(void *data) +{ + return timer_interrupt(); +} + // static buffer for constructing the actual M68KPlatform static char *sM68KPlatformBuffer[sizeof(M68KAtari)]; #warning PTR HERE ??? From mmlr at mail.berlios.de Mon Oct 13 01:02:20 2008 From: mmlr at mail.berlios.de (mmlr at mail.berlios.de) Date: Mon, 13 Oct 2008 01:02:20 +0200 Subject: [Haiku-commits] r28015 - haiku/trunk/src/kits/storage Message-ID: <200810122302.m9CN2K5P018507@sheep.berlios.de> Author: mmlr Date: 2008-10-13 01:02:13 +0200 (Mon, 13 Oct 2008) New Revision: 28015 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28015&view=rev Modified: haiku/trunk/src/kits/storage/Directory.cpp Log: Fix strange validity check in BDirectory::Contains(). If either path ends up as invalid it must not be used. Modified: haiku/trunk/src/kits/storage/Directory.cpp =================================================================== --- haiku/trunk/src/kits/storage/Directory.cpp 2008-10-12 22:52:51 UTC (rev 28014) +++ haiku/trunk/src/kits/storage/Directory.cpp 2008-10-12 23:02:13 UTC (rev 28015) @@ -505,7 +505,7 @@ // the entry and check, if the latter is a prefix of the first one. BPath dirPath(this, ".", true); BPath entryPath(entry); - if (dirPath.InitCheck() == B_OK && entryPath.InitCheck() != B_OK) + if (dirPath.InitCheck() != B_OK || entryPath.InitCheck() != B_OK) return false; return !strncmp(dirPath.Path(), entryPath.Path(), strlen(dirPath.Path())); From mmu_man at mail.berlios.de Mon Oct 13 01:33:12 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 01:33:12 +0200 Subject: [Haiku-commits] r28016 - in haiku/trunk/src/system/kernel: arch/m68k platform/atari_m68k Message-ID: <200810122333.m9CNXCPh006103@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 01:33:11 +0200 (Mon, 13 Oct 2008) New Revision: 28016 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28016&view=rev Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp Log: - init PIC earlier - stub out RTC Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp 2008-10-12 23:02:13 UTC (rev 28015) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_int.cpp 2008-10-12 23:33:11 UTC (rev 28016) @@ -334,6 +334,7 @@ vbr = args->arch_args.phys_vbr; /* point VBR to the new table */ asm volatile ("movec %0,%%vbr" : : "r"(vbr):); + return B_OK; } @@ -341,7 +342,9 @@ status_t arch_int_init_post_vm(kernel_args *args) { - return B_OK; + status_t err; + err = M68KPlatform::Default()->InitPIC(args); + return err; } @@ -502,9 +505,6 @@ status_t arch_int_init_post_device_manager(struct kernel_args *args) { - status_t err; - err = M68KPlatform::Default()->InitPIC(args); - return err; #if 0 /* PIC modules */ // get the interrupt controller driver modules PICModuleList picModules; Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp =================================================================== --- haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 23:02:13 UTC (rev 28015) +++ haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-12 23:33:11 UTC (rev 28016) @@ -23,6 +23,11 @@ #define MFP0_VECTOR_BASE 64 #define MFP1_VECTOR_BASE (MFP0_VECTOR_BASE+16) + +#define RTC_BASE 0xFFFF8960 + +#define RTC_VECTOR (MFP1_VECTOR_BASE+14) + // ? #define SCC_C0_VECTOR_BASE (MFP1_VECTOR_BASE+16) // ?? @@ -89,6 +94,19 @@ int fVector; }; + class RTC { + public: + RTC(uint32 base, int vector); + ~RTC(); + + uint32 Base() const { return fBase; }; + int Vector() const { return fVector; }; + + private: + uint32 fBase; + int fVector; + }; + M68KAtari(); virtual ~M68KAtari(); @@ -121,10 +139,10 @@ MFP *MFPForIrq(int irq); static int32 MFPTimerInterrupt(void *data); - int fRTC; - MFP *fMFP[2]; + RTC *fRTC; + // native features (ARAnyM emulator) uint32 (*nfGetID)(const char *name); int32 (*nfCall)(uint32 ID, ...); @@ -203,13 +221,30 @@ } +// #pragma mark - M68KAtari::RTc + + +static char sRTCBuffer[sizeof(M68KAtari::RTC)]; + +// constructor +M68KAtari::RTC::RTC(uint32 base, int vector) +{ + fBase = base; + fVector = vector; +} + + +M68KAtari::RTC::~RTC() +{ +} + + // #pragma mark - M68KAtari // constructor M68KAtari::M68KAtari() - : M68KPlatform(B_ATARI_PLATFORM, M68K_PLATFORM_ATARI), - fRTC(-1) + : M68KPlatform(B_ATARI_PLATFORM, M68K_PLATFORM_ATARI) { } @@ -269,7 +304,6 @@ status_t M68KAtari::InitPIC(struct kernel_args *kernelArgs) { - panic("WRITEME"); fMFP[0] = new(sMFP0Buffer) M68KAtari::MFP(MFP0_BASE, MFP0_VECTOR_BASE); //if (kernelArgs->arch_args.machine == /*TT*/) { fMFP[1] = new(sMFP1Buffer) M68KAtari::MFP(MFP1_BASE, MFP1_VECTOR_BASE); @@ -282,8 +316,8 @@ M68KAtari::InitRTC(struct kernel_args *kernelArgs, struct real_time_data *data) { - panic("WRITEME"); - return B_NO_INIT; + fRTC = new(sRTCBuffer) M68KAtari::RTC(RTC_BASE, RTC_VECTOR); +#warning M68K: FIXME return B_OK; } @@ -496,12 +530,14 @@ void M68KAtari::SetHardwareRTC(uint32 seconds) { +#warning M68K: WRITEME } uint32 M68KAtari::GetHardwareRTC() { +#warning M68K: WRITEME return 0; } From axeld at mail.berlios.de Mon Oct 13 01:34:08 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 01:34:08 +0200 Subject: [Haiku-commits] r28017 - haiku/trunk/src/servers/net Message-ID: <200810122334.m9CNY8Zm006154@sheep.berlios.de> Author: axeld Date: 2008-10-13 01:34:08 +0200 (Mon, 13 Oct 2008) New Revision: 28017 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28017&view=rev Modified: haiku/trunk/src/servers/net/DHCPClient.cpp haiku/trunk/src/servers/net/NetServer.cpp Log: * DHCP now actually uses the new SO_BINDTODEVICE socket option to make sure the request is sent only on the device it should. Modified: haiku/trunk/src/servers/net/DHCPClient.cpp =================================================================== --- haiku/trunk/src/servers/net/DHCPClient.cpp 2008-10-12 23:33:11 UTC (rev 28016) +++ haiku/trunk/src/servers/net/DHCPClient.cpp 2008-10-12 23:34:08 UTC (rev 28017) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2006-2008, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -408,6 +409,24 @@ int option = 1; setsockopt(socket, SOL_SOCKET, SO_BROADCAST, &option, sizeof(option)); + if (state == INIT) { + // The local interface does not have an address yet, bind the socket + // to the device directly. + int linkSocket = ::socket(AF_LINK, SOCK_DGRAM, 0); + if (linkSocket >= 0) { + // we need to know the index of the device to be able to bind to it + ifreq request; + prepare_request(request, fDevice.String()); + if (ioctl(linkSocket, SIOCGIFINDEX, &request, sizeof(struct ifreq)) + == 0) { + setsockopt(socket, SOL_SOCKET, SO_BINDTODEVICE, + &request.ifr_index, sizeof(int)); + } + + close(linkSocket); + } + } + bigtime_t previousLeaseTime = fLeaseTime; fLeaseTime = 0; fRenewalTime = 0; Modified: haiku/trunk/src/servers/net/NetServer.cpp =================================================================== --- haiku/trunk/src/servers/net/NetServer.cpp 2008-10-12 23:33:11 UTC (rev 28016) +++ haiku/trunk/src/servers/net/NetServer.cpp 2008-10-12 23:34:08 UTC (rev 28017) @@ -588,14 +588,8 @@ request.ifr_route = route; if (autoConfig) { - // add a default route to make the interface accessible, even without an address - if (ioctl(socket, SIOCADDRT, &request, sizeof(request)) < 0) { - fprintf(stderr, "%s: Could not add route for %s: %s\n", - Name(), device, strerror(errno)); - } else { - _QuitLooperForDevice(device); - startAutoConfig = true; - } + _QuitLooperForDevice(device); + startAutoConfig = true; } else if (addressMessage.FindString("gateway", &string) == B_OK && parse_address(familyIndex, string, gateway)) { // add gateway route, if we're asked for it From axeld at mail.berlios.de Mon Oct 13 01:50:41 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 01:50:41 +0200 Subject: [Haiku-commits] r28018 - in haiku/trunk: headers/private/kernel src/add-ons/kernel/debugger/demangle src/system/kernel/arch/x86 src/system/kernel/debug Message-ID: <200810122350.m9CNofh2006906@sheep.berlios.de> Author: axeld Date: 2008-10-13 01:50:41 +0200 (Mon, 13 Oct 2008) New Revision: 28018 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28018&view=rev Added: haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc3+.cpp Removed: haiku/trunk/src/add-ons/kernel/debugger/demangle/demangle.cpp Modified: haiku/trunk/headers/private/kernel/debug.h haiku/trunk/src/add-ons/kernel/debugger/demangle/Jamfile haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp haiku/trunk/src/system/kernel/debug/debug.cpp Log: * Changed the way the demangle functionality works: instead of having a kernel debugger add-on set a demangle hook, all modules under debugger/demangle/ are now considered demangle modules. * Added another function to the demangle module interface that gives you access to the arguments. * Implemented a demangling module for GCC2. * The older demangling module is now called "gcc3+", but doesn't support getting the arguments yet. * The "call" KDL command is now using demangling to automatically show you the arguments of a call from a stack crawl. * Minor cleanup. Modified: haiku/trunk/headers/private/kernel/debug.h =================================================================== --- haiku/trunk/headers/private/kernel/debug.h 2008-10-12 23:34:08 UTC (rev 28017) +++ haiku/trunk/headers/private/kernel/debug.h 2008-10-12 23:50:41 UTC (rev 28018) @@ -66,6 +66,16 @@ // TODO: add hooks for tunnelling gdb ? }; +struct debugger_demangle_module_info { + module_info info; + + const char* (*demangle_symbol)(const char* name, char* buffer, + size_t bufferSize, bool* _isObjectMethod); + status_t (*get_next_argument)(uint32* _cookie, const char* symbol, + char* name, size_t nameSize, int32* _type, size_t* _argumentLength); +}; + + extern int dbg_register_file[B_MAX_CPU_COUNT][14]; typedef struct debug_page_fault_info { @@ -89,21 +99,21 @@ extern status_t debug_init(struct kernel_args *args); extern status_t debug_init_post_vm(struct kernel_args *args); extern status_t debug_init_post_modules(struct kernel_args *args); -extern void debug_early_boot_message(const char *string); -extern void debug_puts(const char *s, int32 length); -extern bool debug_debugger_running(void); -extern bool debug_screen_output_enabled(void); -extern void debug_stop_screen_debug_output(void); -extern void debug_set_page_fault_info(addr_t faultAddress, addr_t pc, - uint32 flags); +extern void debug_early_boot_message(const char *string); +extern void debug_puts(const char *s, int32 length); +extern bool debug_debugger_running(void); +extern bool debug_screen_output_enabled(void); +extern void debug_stop_screen_debug_output(void); +extern void debug_set_page_fault_info(addr_t faultAddress, addr_t pc, + uint32 flags); extern debug_page_fault_info* debug_get_page_fault_info(); -extern void kputs(const char *string); -extern void kputs_unfiltered(const char *string); -extern void kprintf_unfiltered(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); -extern void dprintf_no_syslog(const char *format, ...) - __attribute__ ((format (__printf__, 1, 2))); +extern void kputs(const char *string); +extern void kputs_unfiltered(const char *string); +extern void kprintf_unfiltered(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); +extern void dprintf_no_syslog(const char *format, ...) + __attribute__ ((format (__printf__, 1, 2))); extern bool is_debug_variable_defined(const char* variableName); extern bool set_debug_variable(const char* variableName, uint64 value); @@ -125,8 +135,11 @@ const char* oldName, const char* description); extern bool print_debugger_command_usage(const char* command); -extern void debug_set_demangle_hook(const char *(*hook)(const char *)); -extern const char *debug_demangle(const char *); +extern const char *debug_demangle_symbol(const char* symbol, char* buffer, + size_t bufferSize, bool* _isObjectMethod); +extern status_t debug_get_next_demangled_argument(uint32* _cookie, + const char* symbol, char* name, size_t nameSize, + int32* _type, size_t* _argumentLength); extern struct thread* debug_set_debugged_thread(struct thread* thread); extern struct thread* debug_get_debugged_thread(); Modified: haiku/trunk/src/add-ons/kernel/debugger/demangle/Jamfile =================================================================== --- haiku/trunk/src/add-ons/kernel/debugger/demangle/Jamfile 2008-10-12 23:34:08 UTC (rev 28017) +++ haiku/trunk/src/add-ons/kernel/debugger/demangle/Jamfile 2008-10-12 23:50:41 UTC (rev 28018) @@ -1,43 +1,35 @@ SubDir HAIKU_TOP src add-ons kernel debugger demangle ; -if $(HAIKU_GCC_VERSION[1]) >= 4 { - UsePrivateHeaders kernel ; -UseHeaders [ FDirName $(HAIKU_TOP) src system kernel debug ] ; +# GCC3/4 only solution (using parts of libsubc++) +if $(HAIKU_GCC_VERSION[1]) >= 3 { + rule ExtractObject + { + SetupKernel $(2) ; + Depends $(1) : $(2) ; + Objects $(1) ; -rule ExtractObject -{ - SetupKernel $(2) ; - Depends $(1) : $(2) ; - Objects $(1) ; + MakeLocateDebug $(1) ; + } - MakeLocateDebug $(1) ; -} + actions ExtractObject + { + #$(TARGET_AR) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ; + pwd + echo $(TARGET_AR) -x "$(2)" "$(1)" + } -actions ExtractObject -{ - #$(TARGET_AR) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ; - pwd - echo $(TARGET_AR) -x "$(2)" "$(1)" -} + ExtractObject cp-demangle.o : $(TARGET_STATIC_LIBSUPC++) foo ; -ExtractObject cp-demangle.o : $(TARGET_STATIC_LIBSUPC++) foo ; - -KernelMergeObject demangle_module.o : - demangle.cpp - : - : -; - - - -KernelAddon demangle : - demangle.cpp - #demangle_module.o - cp-demangle.o + KernelAddon gcc3+ : + gcc3+.cpp + cp-demangle.o ; +} -#LINKFLAGS on demangle = -lsupc++ ; +# GCC2 solution -} +KernelAddon gcc2 : + gcc2.cpp +; Deleted: haiku/trunk/src/add-ons/kernel/debugger/demangle/demangle.cpp Added: haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp 2008-10-12 23:34:08 UTC (rev 28017) +++ haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp 2008-10-12 23:50:41 UTC (rev 28018) @@ -0,0 +1,394 @@ +/* + * Copyright 2008, Axel D?rfler, axeld at pinc-software.de. + * This file may be used under the terms of the MIT License. + */ + + +#include +#include +#include + +#include + +#include + + +enum { + TYPE_FUNCTION, + TYPE_METHOD, +}; + + +static void +ignore_qualifiers(const char** _arg) +{ + while (isupper(**_arg)) + (*_arg)++; +} + + +static uint32 +argument_type(const char* arg, size_t& length) +{ + length = sizeof(int); + + switch (char type = arg[0]) { + case 'P': // pointer + case 'R': // reference + length = sizeof(void*); + ignore_qualifiers(&arg); + if (arg[0] == 'c') + return B_STRING_TYPE; + + return type == 'P' ? B_POINTER_TYPE : B_REF_TYPE; + case 'x': + length = sizeof(long long); + return B_INT64_TYPE; + case 'l': + if (sizeof(long) == 4) + return B_INT32_TYPE; + return B_INT64_TYPE; + case 'i': + return B_INT32_TYPE; + case 's': + return B_INT16_TYPE; + case 'c': + return B_INT8_TYPE; + case 'b': + return B_BOOL_TYPE; + case 'U': + switch (arg[1]) { + case 'x': + length = sizeof(long long); + return B_UINT64_TYPE; + case 'l': + if (sizeof(long) == 4) + return B_UINT32_TYPE; + return B_UINT64_TYPE; + case 'i': + return B_UINT32_TYPE; + case 's': + return B_UINT16_TYPE; + case 'c': + return B_UINT8_TYPE; + default: + return B_UINT32_TYPE; + } + break; + + default: + return B_ANY_TYPE; + } +} + + +static uint32 +parse_number(const char** _arg, bool numberLeft) +{ + const char* arg = *_arg; + + while (isdigit(arg[0])) + arg++; + + uint32 value; + + if (arg[0] == '_' && (!numberLeft || isdigit(arg[1]))) { + // long value + value = strtoul(*_arg, (char**)_arg, 10); + if (**_arg == '_') + (*_arg)++; + } else { + value = **_arg - '0'; + (*_arg)++; + } + + return value; +} + + +static uint32 +parse_repeats(const char** _arg, uint32& index) +{ + if (**_arg != 'N') + return 0; + + (*_arg)++; + + uint32 count = parse_number(_arg, true); + index = parse_number(_arg, false); + + return count; +} + + +static void +skip_numbers(const char** _arg, int32 count) +{ + // skip leading character + (*_arg)++; + + while (count-- > 0) { + parse_number(_arg, count != 0); + } +} + + +static uint32 +argument_name_length(const char** _arg) +{ + if (**_arg == 'N') + return 0; + + ignore_qualifiers(_arg); + + // See if it's a built-in type + if (isalpha(**_arg)) + return 0; + + return strtoul(*_arg, (char**)_arg, 10); +} + + +static uint32 +argument_length(const char** _arg) +{ + if (**_arg == 'N') { + // skip repeats + skip_numbers(_arg, 2); + return 0; + } else if (**_arg == 'T') { + // skip reference + skip_numbers(_arg, 1); + return 0; + } + + ignore_qualifiers(_arg); + + // See if it's a built-in type + if (isalpha(**_arg)) + return 1; + + return strtoul(*_arg, (char**)_arg, 10); +} + + +static const char* +next_argument(const char* arg) +{ + if (arg == NULL) + return NULL; + + uint32 length = argument_length(&arg); + arg += length; + + if (!arg[0]) + return NULL; + + return arg; +} + + +static uint32 +count_namespaces(const char** _mangled) +{ + const char* mangled = *_mangled; + + int32 namespaces = 0; + if (mangled[0] == 'Q') { + // more than one namespace + if (mangled[1] == '_') { + // more than 9 namespaces + namespaces = strtoul(mangled + 1, (char**)&mangled, 10); + if (mangled[0] != '_') + namespaces = 0; + } else + namespaces = mangled[1] - '0'; + + mangled++; + } else if (isdigit(mangled[0])) + namespaces = 1; + + *_mangled = mangled; + return namespaces; +} + + +static const char* +first_argument(const char* mangled) +{ + int32 namespaces = count_namespaces(&mangled); + + while (namespaces-- > 0) { + if (!isdigit(mangled[0])) + break; + + mangled += strtoul(mangled, (char**)&mangled, 10); + } + + return mangled; +} + + +static const char* +mangled_start(const char* name, size_t* _symbolLength, int32* _symbolType) +{ + if (name == NULL) + return NULL; + + const char* mangled = strstr(name, "__"); + if (mangled == NULL) + return NULL; + + if (_symbolLength != NULL) + *_symbolLength = mangled - name; + + if (mangled[2] == 'F') { + if (_symbolType != NULL) + *_symbolType = TYPE_FUNCTION; + return mangled + 3; + } + + if (_symbolType != NULL) + *_symbolType = TYPE_METHOD; + return mangled + 2; +} + + + +// #pragma mark - + + +const char* +demangle_symbol(const char* name, char* buffer, size_t bufferSize, + bool* _isObjectMethod) +{ + size_t nameLength; + int32 type; + const char* mangled = mangled_start(name, &nameLength, &type); + if (mangled == NULL) + return NULL; + + if (_isObjectMethod != NULL) { + // we can only guess with GCC2 mangling + *_isObjectMethod = type == TYPE_METHOD; + } + + const char* namespaceStart = mangled; + int32 namespaces = count_namespaces(&namespaceStart); + + buffer[0] = '\0'; + + while (namespaces-- > 0) { + if (!isdigit(namespaceStart[0])) + break; + + uint32 length = strtoul(namespaceStart, (char**)&namespaceStart, 10); + uint32 max = strlen(buffer) + length + 1; + strlcat(buffer, namespaceStart, min_c(max, bufferSize)); + strlcat(buffer, "::", bufferSize); + namespaceStart += length; + } + + size_t max = strlen(buffer) + nameLength + 1; + strlcat(buffer, name, min_c(max, bufferSize)); + return buffer; +} + + +status_t +get_next_argument(uint32* _cookie, const char* symbol, char* name, + size_t nameSize, int32* _type, size_t* _argumentLength) +{ + const char* mangled = mangled_start(symbol, NULL, NULL); + if (mangled == NULL) + return B_BAD_VALUE; + + const char* arg = first_argument(mangled); + + // (void) is not an argument + if (arg != NULL && arg[0] == 'v') + return B_ENTRY_NOT_FOUND; + + uint32 current = *_cookie; + for (uint32 i = 0; i < current; i++) { + arg = next_argument(arg); + if (arg != NULL && arg[0] == 'N') { + // repeat argument 'count' times + uint32 index; + uint32 count = parse_repeats(&arg, index); + if (current <= i + count) { + // it's a repeat case + status_t status = get_next_argument(&index, symbol, name, + nameSize, _type, _argumentLength); + if (status == B_OK) + (*_cookie)++; + return status; + } + + i += count - 1; + } + } + + if (arg == NULL) + return B_ENTRY_NOT_FOUND; + + if (arg[0] == 'T') { + // duplicate argument + arg++; + uint32 index = parse_number(&arg, false); + status_t status = get_next_argument(&index, symbol, name, + nameSize, _type, _argumentLength); + if (status == B_OK) + (*_cookie)++; + return status; + } + + (*_cookie)++; + + size_t argumentLength; + int32 type = argument_type(arg, argumentLength); + if (_type != NULL) + *_type = type; + if (_argumentLength != NULL) + *_argumentLength = argumentLength; + + uint32 length = argument_name_length(&arg); + strlcpy(name, arg, min_c(length + 1, nameSize)); + + return B_OK; +} + + +static status_t +std_ops(int32 op, ...) +{ +#if __GNUC__ != 2 + return B_NOT_SUPPORTED; +#else + switch (op) { + case B_MODULE_INIT: + case B_MODULE_UNINIT: + return B_OK; + } + + return B_BAD_VALUE; +#endif +} + + +static struct debugger_demangle_module_info sModuleInfo = { + { + "debugger/demangle/gcc2/v1", + 0, + std_ops + }, + + demangle_symbol, + get_next_argument, +}; + +module_info *modules[] = { + (module_info *)&sModuleInfo, + NULL +}; + Copied: haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc3+.cpp (from rev 27987, haiku/trunk/src/add-ons/kernel/debugger/demangle/demangle.cpp) =================================================================== --- haiku/trunk/src/add-ons/kernel/debugger/demangle/demangle.cpp 2008-10-12 00:03:05 UTC (rev 27987) +++ haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc3+.cpp 2008-10-12 23:50:41 UTC (rev 28018) @@ -0,0 +1,174 @@ +/* + * Copyright 2008, Fran?ois Revol, revol at free.fr + * Distributed under the terms of the MIT License. + */ + +#include +#include +#include +#include + +#include + +#define DEMANGLE_BUFFER_SIZE (16*1024) +static char sDemangleBuffer[DEMANGLE_BUFFER_SIZE]; + +extern "C" void set_debug_demangle_hook(const char *(*demangle_hook)(const char *)); + +/* gcc's __cxa_demangle calls malloc and friends... + * we don't want to let it call the real one from inside the kernel debugger... + * instead we just return it a static buffer. + */ + +void * +malloc(size_t len) +{ + if (len < DEMANGLE_BUFFER_SIZE) + return sDemangleBuffer; + return NULL; +} + + +void +free(void *ptr) +{ +} + + +void * +realloc(void * oldPtr, size_t newSize) +{ + return NULL; +} + + +/* doesn't work, va_list sux... */ +#if 0 +class DemangleDebugOutputFilter : public DebugOutputFilter { +public: + DemangleDebugOutputFilter(); + virtual ~DemangleDebugOutputFilter(); + void SetChain(DebugOutputFilter *chain); + virtual void PrintString(const char* string); + virtual void Print(const char* format, va_list args); +private: + DebugOutputFilter *fChained; +}; + + +DemangleDebugOutputFilter::DemangleDebugOutputFilter() +{ +} + + +DemangleDebugOutputFilter::~DemangleDebugOutputFilter() +{ +} + + +void +DemangleDebugOutputFilter::SetChain(DebugOutputFilter *chain) +{ + fChained = chain; +} + + +void +DemangleDebugOutputFilter::PrintString(const char* string) +{ + fChained->PrintString(string); +} + + +void +DemangleDebugOutputFilter::Print(const char* format, va_list args) +{ + int i; + const char *p = format; + while ((p = strchr(p, '%'))) { + if (p[1] == '%') { + p+=2; + continue; + } + p++; + while (*p && !isalpha(*p)) + p++; + switch (*p) { + case 's': + { + const char **ptr = &va_arg(args, char *); + //char *symbol = va_arg(args, char *); + char *symbol = *ptr; + char *demangled; + size_t length = DEMANGLE_BUFFER_SIZE; + int status; + + demangled = abi::__cxa_demangle(symbol, sDemangleBuffer, &length, &status); + if (status > 0) { + } + break; + } + case 'd': + case 'i': + { + int d; + d = va_arg(args, int); + break; + } + case 'L': + { + long long d; + d = va_arg(args, long long); + break; + } + case 'f': + { + float f; + f = va_arg(args, float); + break; + } + case '\0': + break; + default: + panic("unknown printf format\n"); + break; + } + i++; + } + fChained->Print(format, args); +} +#endif + + +static const char * +demangle_symbol(const char *sym, char* buffer, size_t bufferSize, + bool* _isObjectMethod) +{ + char *demangled; + size_t length = DEMANGLE_BUFFER_SIZE; + int status; + + demangled = abi::__cxa_demangle(sym, sDemangleBuffer, &length, &status); + if (status == 0) + return demangled; + // something bad happened + return sym; +} + + +static struct debugger_demangle_module_info sModuleInfo = { + { + "debugger/demangle/gcc3+/v1", + 0, + NULL + }, + + demangle_symbol, + NULL, +}; + +module_info *modules[] = { + (module_info *)&sModuleInfo, + NULL +}; + Modified: haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2008-10-12 23:34:08 UTC (rev 28017) +++ haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2008-10-12 23:50:41 UTC (rev 28018) @@ -99,10 +99,6 @@ } } - if (status == B_OK) { - *_symbolName = debug_demangle(*_symbolName); - } - return status; } @@ -126,11 +122,17 @@ status = lookup_symbol(thread, eip, &baseAddress, &symbol, &image, &exactMatch); + char buffer[64]; + const char* name = debug_demangle_symbol(symbol, buffer, sizeof(buffer), + NULL); + if (name == NULL) + name = symbol; + kprintf("%2ld %08lx (+%4ld) %08lx", callIndex, ebp, diff, eip); if (status == B_OK) { - if (symbol != NULL) { - kprintf(" <%s>:%s + 0x%04lx%s\n", image, symbol, + if (name != NULL) { + kprintf(" <%s>:%s + 0x%04lx%s\n", image, name, eip - baseAddress, exactMatch ? "" : " (nearest)"); } else { kprintf(" <%s@%p>:unknown + 0x%04lx\n", image, @@ -437,6 +439,15 @@ static void +set_debug_argument_variable(int32 index, uint64 value) +{ + char name[8]; + snprintf(name, sizeof(name), "_arg%ld", index); + set_debug_variable(name, value); +} + + +static void print_call(struct thread *thread, addr_t eip, addr_t ebp, addr_t nextEbp, int32 argCount) { @@ -444,6 +455,9 @@ addr_t baseAddress; bool exactMatch; status_t status; + char buffer[64]; + const char* name = NULL; + bool isObjectMethod; status = lookup_symbol(thread, eip, &baseAddress, &symbol, &image, &exactMatch); @@ -452,8 +466,16 @@ if (status == B_OK) { if (symbol != NULL) { - kprintf(" <%s>:%s%s", image, symbol, - exactMatch ? "" : " (nearest)"); + if (exactMatch && argCount <= 0) { + name = debug_demangle_symbol(symbol, buffer, sizeof(buffer), + &isObjectMethod); + if (argCount < 0) + isObjectMethod = false; + } + if (name == NULL) { + kprintf(" <%s>:%s%s", image, symbol, + exactMatch ? "" : " (nearest)"); + } } else { kprintf(" <%s@%p>:unknown + 0x%04lx", image, (void *)baseAddress, eip - baseAddress); @@ -469,20 +491,114 @@ } int32 *arg = (int32 *)(nextEbp + 8); - kprintf("("); - for (int32 i = 0; i < argCount; i++) { - if (i > 0) - kprintf(", "); - kprintf("%#lx", *arg); - if (*arg > -0x10000 && *arg < 0x10000) - kprintf(" (%ld)", *arg); + if (name != NULL) { + if (isObjectMethod) { + const char* lastName = strrchr(name, ':') - 1; + int namespaceLength = lastName - name; - char name[8]; - snprintf(name, sizeof(name), "_arg%ld", i + 1); - set_debug_variable(name, *(uint32 *)arg); + kprintf(" <%s> %.*s<%p>%s", image, namespaceLength, name, + *(uint32 **)arg, lastName); + set_debug_variable("_this", *(uint32 *)arg); + arg++; + } else + kprintf(" <%s> %s", image, name); - arg++; + kprintf("("); + + char buffer[64]; + size_t length; + int32 type, i = 0; + uint32 cookie = 0; + while (debug_get_next_demangled_argument(&cookie, symbol, buffer, + sizeof(buffer), &type, &length) == B_OK) { + if (i++ > 0) + kprintf(", "); + + // retrieve value and type identifier + + uint64 value; + + switch (type) { + case B_INT64_TYPE: + value = *(int64*)arg; + kprintf("int64: %Ld", value); + break; + case B_INT32_TYPE: + value = *(int32*)arg; + kprintf("int32: %ld", (int32)value); + break; + case B_INT16_TYPE: + value = *(int16*)arg; + kprintf("int16: %d", (int16)value); + break; + case B_INT8_TYPE: + value = *(int8*)arg; + kprintf("int8: %d", (int8)value); + break; + case B_UINT64_TYPE: + value = *(uint64*)arg; + kprintf("uint64: %Lx", value); + if (value < 0x100000) + kprintf(" (%Lu)", value); + break; + case B_UINT32_TYPE: + value = *(uint32*)arg; + kprintf("uint32: %lx", (uint32)value); + if (value < 0x100000) + kprintf(" (%lu)", (uint32)value); + break; + case B_UINT16_TYPE: + value = *(uint16*)arg; + kprintf("uint16: %#x (%u)", (uint16)value, (uint16)value); + break; + case B_UINT8_TYPE: + value = *(uint8*)arg; + kprintf("uint8: %#x (%u)", (uint8)value, (uint8)value); + break; + case B_BOOL_TYPE: + value = *(uint8*)arg; + kprintf(value ? "true" : "false"); + break; + default: + if (buffer[0]) { + kprintf("%s%s: ", buffer, type == B_POINTER_TYPE ? "*" + : type == B_REF_TYPE ? "&" : ""); + } + + if (length == 4) { + value = *(uint32*)arg; + kprintf("%#lx", (uint32)value); + break; + } + + if (length == 8) + value = *(uint64*)arg; + else + value = (uint64)arg; + kprintf("%#Lx", value); + break; + } + + if (type == B_STRING_TYPE && value != 0) + kprintf(" \"%s\"", (char*)value); + + set_debug_argument_variable(i, value); + arg = (int32*)((uint8*)arg + length); + } + } else { + kprintf("("); + + for (int32 i = 0; i < argCount; i++) { + if (i > 0) + kprintf(", "); + kprintf("%#lx", *arg); + if (*arg > -0x10000 && *arg < 0x10000) + kprintf(" (%ld)", *arg); + + set_debug_argument_variable(i + 1, *(uint32 *)arg); + arg++; + } } kprintf(")\n"); @@ -500,7 +616,8 @@ "the specified thread.\n" " - The ID of the thread for which to print the call.\n" " - The index of the call in the stack trace.\n" - " - The number of call arguments to print.\n"; + " - The number of call arguments to print (use 'c' to\n" + " force the C++ demangler to use class methods).\n"; if (argc == 2 && strcmp(argv[1], "--help") == 0) { kprintf(usage, argv[0]); return 0; @@ -512,8 +629,11 @@ int32 argCount = 0; if (argc >= 2 && argv[argc - 1][0] == '-') { - argCount = strtoul(argv[argc - 1] + 1, NULL, 0); - if (argCount < 0 || argCount > 16) { + if (argv[argc - 1][1] != 'c') + argCount = strtoul(argv[argc - 1] + 1, NULL, 0); + else + argCount = -1; + if (argCount < -1 || argCount > 16) { kprintf("Invalid argument count \"%ld\".\n", argCount); return 0; } Modified: haiku/trunk/src/system/kernel/debug/debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/debug/debug.cpp 2008-10-12 23:34:08 UTC (rev 28017) +++ haiku/trunk/src/system/kernel/debug/debug.cpp 2008-10-12 23:50:41 UTC (rev 28018) @@ -81,7 +81,7 @@ static int64 sMessageRepeatLastTime = 0; static int32 sMessageRepeatCount = 0; -static debugger_module_info *sDebuggerModules[8]; +static debugger_module_info* sDebuggerModules[8]; static const uint32 kMaxDebuggerModules = sizeof(sDebuggerModules) / sizeof(sDebuggerModules[0]); @@ -91,7 +91,7 @@ static char sLineBuffer[HISTORY_SIZE][LINE_BUFFER_SIZE] = { "", }; static int32 sCurrentLine = 0; -static const char *(*sDemangleHook)(const char *) = NULL; +static debugger_demangle_module_info* sDemangleModule; static struct thread* sDebuggedThread; @@ -1105,7 +1105,7 @@ status_t -debug_init_post_modules(struct kernel_args *args) +debug_init_post_modules(struct kernel_args* args) { void *cookie; @@ -1115,6 +1115,9 @@ syslog_init_post_threads(); // load kernel debugger addons + + static const char* kDemanglePrefix = "debugger/demangle/"; + cookie = open_module_list("debugger"); uint32 count = 0; while (count < kMaxDebuggerModules) { @@ -1124,7 +1127,14 @@ if (read_next_module_name(cookie, name, &nameLength) != B_OK) [... truncated: 93 lines follow ...] From axeld at mail.berlios.de Mon Oct 13 03:39:04 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 03:39:04 +0200 Subject: [Haiku-commits] r28019 - haiku/trunk/src/system/kernel/arch/x86 Message-ID: <200810130139.m9D1d4ht021137@sheep.berlios.de> Author: axeld Date: 2008-10-13 03:39:03 +0200 (Mon, 13 Oct 2008) New Revision: 28019 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28019&view=rev Modified: haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp Log: * Factored out the demangled function call dump to a print_demangled_call(). * The stack_trace() command now also uses this call by default to give you the arguments to all functions in a stack crawl (beware of templates for now, though). * Use the new option '-d' to disable the demangling. You can now also specify '-d' in the "call" command which has the same meaning there. * NULL pointers are now printed as "NULL", and NULL strings are printed as well. Modified: haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2008-10-12 23:50:41 UTC (rev 28018) +++ haiku/trunk/src/system/kernel/arch/x86/arch_debug.cpp 2008-10-13 01:39:03 UTC (rev 28019) @@ -104,8 +104,136 @@ static void +set_debug_argument_variable(int32 index, uint64 value) +{ + char name[8]; + snprintf(name, sizeof(name), "_arg%ld", index); + set_debug_variable(name, value); +} + + +static status_t +print_demangled_call(const char* image, const char* symbol, addr_t args, + bool noObjectMethod, bool addDebugVariables) +{ + bool isObjectMethod; + char buffer[64]; + const char* name = debug_demangle_symbol(symbol, buffer, sizeof(buffer), + &isObjectMethod); + if (name == NULL) + return B_ERROR; + + uint32* arg = (uint32*)args; + + if (noObjectMethod) + isObjectMethod = false; + if (isObjectMethod) { + const char* lastName = strrchr(name, ':') - 1; + int namespaceLength = lastName - name; + + kprintf("<%s> %.*s<%p>%s", image, namespaceLength, name, + *(uint32 **)arg, lastName); + if (addDebugVariables) + set_debug_variable("_this", *(uint32 *)arg); + arg++; + } else + kprintf("<%s> %s", image, name); + + kprintf("("); + + size_t length; + int32 type, i = 0; + uint32 cookie = 0; + while (debug_get_next_demangled_argument(&cookie, symbol, buffer, + sizeof(buffer), &type, &length) == B_OK) { + if (i++ > 0) + kprintf(", "); + + // retrieve value and type identifier + + uint64 value; + + switch (type) { + case B_INT64_TYPE: + value = *(int64*)arg; + kprintf("int64: %Ld", value); + break; + case B_INT32_TYPE: + value = *(int32*)arg; + kprintf("int32: %ld", (int32)value); + break; + case B_INT16_TYPE: + value = *(int16*)arg; + kprintf("int16: %d", (int16)value); + break; + case B_INT8_TYPE: + value = *(int8*)arg; + kprintf("int8: %d", (int8)value); + break; + case B_UINT64_TYPE: + value = *(uint64*)arg; + kprintf("uint64: %#Lx", value); + if (value < 0x100000) + kprintf(" (%Lu)", value); + break; + case B_UINT32_TYPE: + value = *(uint32*)arg; + kprintf("uint32: %#lx", (uint32)value); + if (value < 0x100000) + kprintf(" (%lu)", (uint32)value); + break; + case B_UINT16_TYPE: + value = *(uint16*)arg; + kprintf("uint16: %#x (%u)", (uint16)value, (uint16)value); + break; + case B_UINT8_TYPE: + value = *(uint8*)arg; + kprintf("uint8: %#x (%u)", (uint8)value, (uint8)value); + break; + case B_BOOL_TYPE: + value = *(uint8*)arg; + kprintf(value ? "true" : "false"); + break; + default: + if (buffer[0]) { + kprintf("%s%s: ", buffer, type == B_POINTER_TYPE ? "*" + : type == B_REF_TYPE ? "&" : ""); + } + + if (length == 4) { + value = *(uint32*)arg; + if (value == 0 + && (type == B_POINTER_TYPE || type == B_REF_TYPE)) + kprintf("NULL"); + else + kprintf("%#lx", (uint32)value); + break; + } + + if (length == 8) + value = *(uint64*)arg; + else + value = (uint64)arg; + kprintf("%#Lx", value); + break; + } + + if (type == B_STRING_TYPE) + kprintf(" \"%s\"", (char*)value); + + if (addDebugVariables) + set_debug_argument_variable(i, value); + arg = (uint32*)((uint8*)arg + length); + } + + kprintf(")"); + return B_OK; +} + + +static void print_stack_frame(struct thread *thread, addr_t eip, addr_t ebp, addr_t nextEbp, - int32 callIndex) + int32 callIndex, bool demangle) { const char *symbol, *image; addr_t baseAddress; @@ -122,29 +250,30 @@ status = lookup_symbol(thread, eip, &baseAddress, &symbol, &image, &exactMatch); - char buffer[64]; - const char* name = debug_demangle_symbol(symbol, buffer, sizeof(buffer), - NULL); - if (name == NULL) - name = symbol; + kprintf("%2ld %08lx (+%4ld) %08lx ", callIndex, ebp, diff, eip); - kprintf("%2ld %08lx (+%4ld) %08lx", callIndex, ebp, diff, eip); - if (status == B_OK) { - if (name != NULL) { - kprintf(" <%s>:%s + 0x%04lx%s\n", image, name, - eip - baseAddress, exactMatch ? "" : " (nearest)"); - } else { - kprintf(" <%s@%p>:unknown + 0x%04lx\n", image, - (void *)baseAddress, eip - baseAddress); + if (exactMatch && demangle) { + status = print_demangled_call(image, symbol, nextEbp + 8, false, + false); } + + if (!exactMatch || !demangle || status != B_OK) { + if (symbol != NULL) { + kprintf("<%s>:%s%s", image, symbol, + exactMatch ? "" : " (nearest)"); + } else + kprintf("<%s@%p>:unknown", image, (void *)baseAddress); + } + + kprintf(" + 0x%04lx\n", eip - baseAddress); } else { vm_area *area = NULL; if (thread->team->address_space != NULL) area = vm_area_lookup(thread->team->address_space, eip); if (area != NULL) { - kprintf(" %ld:%s@%p + %#lx\n", area->id, area->name, (void *)area->base, - eip - area->base); + kprintf("%ld:%s@%p + %#lx\n", area->id, area->name, + (void*)area->base, eip - area->base); } else kprintf("\n"); } @@ -358,12 +487,20 @@ static int stack_trace(int argc, char **argv) { - static const char* usage = "usage: %s [ ]\n" + static const char* usage = "usage: %s [-d] [ ]\n" "Prints a stack trace for the current, respectively the specified\n" "thread.\n" + " -d - Disables the demangling of the symbols.\n" " - The ID of the thread for which to print the stack\n" " trace.\n"; - if (argc > 2 || argc == 2 && strcmp(argv[1], "--help") == 0) { + bool demangle = true; + int32 threadIndex = 1; + if (argc > 1 && !strcmp(argv[1], "-d")) { + demangle = false; + threadIndex++; + } + + if (argc > threadIndex + 1 || argc == 2 && strcmp(argv[1], "--help") == 0) { kprintf(usage, argv[0]); return 0; } @@ -374,8 +511,8 @@ uint32 ebp = x86_read_ebp(); int32 num = 0, last = 0; - setup_for_thread(argc == 2 ? argv[1] : NULL, &thread, &ebp, - &oldPageDirectory); + setup_for_thread(argc == threadIndex + 1 ? argv[threadIndex] : NULL, + &thread, &ebp, &oldPageDirectory); if (thread != NULL) { kprintf("stack trace for thread %ld \"%s\"\n", thread->id, @@ -391,7 +528,7 @@ } } - kprintf("frame caller :function + offset\n"); + kprintf("frame caller :function + offset\n"); bool onKernelStack = true; @@ -403,7 +540,8 @@ struct iframe *frame = (struct iframe *)ebp; print_iframe(frame); - print_stack_frame(thread, frame->eip, ebp, frame->ebp, callIndex); + print_stack_frame(thread, frame->eip, ebp, frame->ebp, callIndex, + demangle); ebp = frame->ebp; } else { @@ -417,7 +555,7 @@ if (eip == 0 || ebp == 0) break; - print_stack_frame(thread, eip, ebp, nextEbp, callIndex); + print_stack_frame(thread, eip, ebp, nextEbp, callIndex, demangle); ebp = nextEbp; } @@ -439,15 +577,6 @@ static void -set_debug_argument_variable(int32 index, uint64 value) -{ - char name[8]; - snprintf(name, sizeof(name), "_arg%ld", index); - set_debug_variable(name, value); -} - - -static void print_call(struct thread *thread, addr_t eip, addr_t ebp, addr_t nextEbp, int32 argCount) { @@ -455,29 +584,28 @@ addr_t baseAddress; bool exactMatch; status_t status; - char buffer[64]; - const char* name = NULL; - bool isObjectMethod; + bool demangled = false; + int32 *arg = (int32 *)(nextEbp + 8); status = lookup_symbol(thread, eip, &baseAddress, &symbol, &image, &exactMatch); - kprintf("%08lx %08lx", ebp, eip); + kprintf("%08lx %08lx ", ebp, eip); if (status == B_OK) { if (symbol != NULL) { - if (exactMatch && argCount <= 0) { - name = debug_demangle_symbol(symbol, buffer, sizeof(buffer), - &isObjectMethod); - if (argCount < 0) - isObjectMethod = false; + if (exactMatch && (argCount == 0 || argCount == -1)) { + status = print_demangled_call(image, symbol, (addr_t)arg, + argCount == -1, true); + if (status == B_OK) + demangled = true; } - if (name == NULL) { - kprintf(" <%s>:%s%s", image, symbol, + if (!demangled) { + kprintf("<%s>:%s%s", image, symbol, exactMatch ? "" : " (nearest)"); } } else { - kprintf(" <%s@%p>:unknown + 0x%04lx", image, + kprintf("<%s@%p>:unknown + 0x%04lx", image, (void *)baseAddress, eip - baseAddress); } } else { @@ -485,110 +613,14 @@ if (thread->team->address_space != NULL) area = vm_area_lookup(thread->team->address_space, eip); if (area != NULL) { - kprintf(" %ld:%s@%p + %#lx", area->id, area->name, + kprintf("%ld:%s@%p + %#lx", area->id, area->name, (void *)area->base, eip - area->base); } } - int32 *arg = (int32 *)(nextEbp + 8); - - if (name != NULL) { - if (isObjectMethod) { - const char* lastName = strrchr(name, ':') - 1; - int namespaceLength = lastName - name; - - kprintf(" <%s> %.*s<%p>%s", image, namespaceLength, name, - *(uint32 **)arg, lastName); - set_debug_variable("_this", *(uint32 *)arg); - arg++; - } else - kprintf(" <%s> %s", image, name); - + if (!demangled) { kprintf("("); - char buffer[64]; - size_t length; - int32 type, i = 0; - uint32 cookie = 0; - while (debug_get_next_demangled_argument(&cookie, symbol, buffer, - sizeof(buffer), &type, &length) == B_OK) { - if (i++ > 0) - kprintf(", "); - - // retrieve value and type identifier - - uint64 value; - - switch (type) { - case B_INT64_TYPE: - value = *(int64*)arg; - kprintf("int64: %Ld", value); - break; - case B_INT32_TYPE: - value = *(int32*)arg; - kprintf("int32: %ld", (int32)value); - break; - case B_INT16_TYPE: - value = *(int16*)arg; - kprintf("int16: %d", (int16)value); - break; - case B_INT8_TYPE: - value = *(int8*)arg; - kprintf("int8: %d", (int8)value); - break; - case B_UINT64_TYPE: - value = *(uint64*)arg; - kprintf("uint64: %Lx", value); - if (value < 0x100000) - kprintf(" (%Lu)", value); - break; - case B_UINT32_TYPE: - value = *(uint32*)arg; - kprintf("uint32: %lx", (uint32)value); - if (value < 0x100000) - kprintf(" (%lu)", (uint32)value); - break; - case B_UINT16_TYPE: - value = *(uint16*)arg; - kprintf("uint16: %#x (%u)", (uint16)value, (uint16)value); - break; - case B_UINT8_TYPE: - value = *(uint8*)arg; - kprintf("uint8: %#x (%u)", (uint8)value, (uint8)value); - break; - case B_BOOL_TYPE: - value = *(uint8*)arg; - kprintf(value ? "true" : "false"); - break; - default: - if (buffer[0]) { - kprintf("%s%s: ", buffer, type == B_POINTER_TYPE ? "*" - : type == B_REF_TYPE ? "&" : ""); - } - - if (length == 4) { - value = *(uint32*)arg; - kprintf("%#lx", (uint32)value); - break; - } - - if (length == 8) - value = *(uint64*)arg; - else - value = (uint64)arg; - kprintf("%#Lx", value); - break; - } - - if (type == B_STRING_TYPE && value != 0) - kprintf(" \"%s\"", (char*)value); - - set_debug_argument_variable(i, value); - arg = (int32*)((uint8*)arg + length); - } - } else { - kprintf("("); - for (int32 i = 0; i < argCount; i++) { if (i > 0) kprintf(", "); @@ -599,9 +631,10 @@ set_debug_argument_variable(i + 1, *(uint32 *)arg); arg++; } - } - kprintf(")\n"); + kprintf(")\n"); + } else + kprintf("\n"); set_debug_variable("_frame", nextEbp); } @@ -617,7 +650,8 @@ " - The ID of the thread for which to print the call.\n" " - The index of the call in the stack trace.\n" " - The number of call arguments to print (use 'c' to\n" - " force the C++ demangler to use class methods).\n"; + " force the C++ demangler to use class methods,\n" + " use 'd' to disable demangling).\n"; if (argc == 2 && strcmp(argv[1], "--help") == 0) { kprintf(usage, argv[0]); return 0; @@ -629,11 +663,14 @@ int32 argCount = 0; if (argc >= 2 && argv[argc - 1][0] == '-') { - if (argv[argc - 1][1] != 'c') + if (argv[argc - 1][1] == 'c') + argCount = -1; + else if (argv[argc - 1][1] == 'd') + argCount = -2; + else argCount = strtoul(argv[argc - 1] + 1, NULL, 0); - else - argCount = -1; - if (argCount < -1 || argCount > 16) { + + if (argCount < -2 || argCount > 16) { kprintf("Invalid argument count \"%ld\".\n", argCount); return 0; } From axeld at mail.berlios.de Mon Oct 13 03:48:01 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 03:48:01 +0200 Subject: [Haiku-commits] r28020 - haiku/trunk/build/jam Message-ID: <200810130148.m9D1m14D022540@sheep.berlios.de> Author: axeld Date: 2008-10-13 03:48:00 +0200 (Mon, 13 Oct 2008) New Revision: 28020 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28020&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: * Added ACPI bus manager module back to the image - if it doesn't work for you, please let us know. Especially shutting down your system can potentially change its behaviour (maybe even for the better, but maybe not :-)). * Added the GCC2 KDL demangle module to the image by default. * White space cleanup. Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-13 01:39:03 UTC (rev 28019) +++ haiku/trunk/build/jam/HaikuImage 2008-10-13 01:48:00 UTC (rev 28020) @@ -132,15 +132,15 @@ ; BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ; BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com etherpci $(X86_ONLY)ipro1000 - $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 - $(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce - #vlance + $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 + $(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce + #vlance $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm $(GPL_ONLY)bcm440x $(GPL_ONLY)bcm570x ; #BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi - config_manager agp_gart usb firewire #acpi + config_manager agp_gart usb firewire acpi ; BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs $(GPL_ONLY)reiserfs ; #googlefs $(GPL_ONLY)ntfs ; @@ -171,6 +171,11 @@ if $(TARGET_ARCH) = x86 { AddFilesToHaikuImage beos system add-ons kernel cpu : generic_x86 ; + + if $(HAIKU_GCC_VERSION[1]) = 2 { + AddFilesToHaikuImage beos system add-ons kernel debugger demangle : + gcc2 ; + } } # drivers @@ -595,7 +600,7 @@ HAIKU_IMAGE_DIR ?= $(HAIKU_DEFAULT_IMAGE_DIR) ; HAIKU_IMAGE = $(HAIKU_IMAGE_NAME) ; HAIKU_IMAGE_SIZE ?= $(HAIKU_DEFAULT_IMAGE_SIZE) ; # 100 MB -HAIKU_IMAGE_LABEL ?= $(HAIKU_DEFAULT_IMAGE_LABEL) ; +HAIKU_IMAGE_LABEL ?= $(HAIKU_DEFAULT_IMAGE_LABEL) ; MakeLocate $(HAIKU_IMAGE) : $(HAIKU_IMAGE_DIR) ; # Set the default installation directory. From stefano.ceccherini at gmail.com Mon Oct 13 08:28:40 2008 From: stefano.ceccherini at gmail.com (Stefano Ceccherini) Date: Mon, 13 Oct 2008 08:28:40 +0200 Subject: [Haiku-commits] r28012 - haiku/trunk/src/add-ons/tracker/zipomatic In-Reply-To: <200810122224.m9CMOgWh010241@sheep.berlios.de> References: <200810122224.m9CMOgWh010241@sheep.berlios.de> Message-ID: <894b9700810122328w4e2acbb2h51ed3055f2f14039@mail.gmail.com> 2008/10/13 korli at BerliOS : > Author: korli > Date: 2008-10-13 00:24:42 +0200 (Mon, 13 Oct 2008) > New Revision: 28012 > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28012&view=rev > > Modified: > haiku/trunk/src/add-ons/tracker/zipomatic/GenericThread.cpp > Log: > fix a warning (return local address). That code is also duplicated in Expander (but I already fixed that problem there). We should make these apps share the code, maybe. From mmu_man at mail.berlios.de Mon Oct 13 10:32:47 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 10:32:47 +0200 Subject: [Haiku-commits] r28021 - haiku/trunk/build/jam Message-ID: <200810130832.m9D8WlbN007796@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 10:32:46 +0200 (Mon, 13 Oct 2008) New Revision: 28021 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28021&view=rev Modified: haiku/trunk/build/jam/HaikuImage Log: acpi bus manager is likely only for x86... at least I don't need it on m68k ;) Modified: haiku/trunk/build/jam/HaikuImage =================================================================== --- haiku/trunk/build/jam/HaikuImage 2008-10-13 01:48:00 UTC (rev 28020) +++ haiku/trunk/build/jam/HaikuImage 2008-10-13 08:32:46 UTC (rev 28021) @@ -140,7 +140,7 @@ ; #BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi - config_manager agp_gart usb firewire acpi + config_manager agp_gart usb firewire $(X86_ONLY)acpi ; BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs $(GPL_ONLY)reiserfs ; #googlefs $(GPL_ONLY)ntfs ; From jackburton at mail.berlios.de Mon Oct 13 10:47:23 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 13 Oct 2008 10:47:23 +0200 Subject: [Haiku-commits] r28022 - haiku/trunk/src/preferences/screen Message-ID: <200810130847.m9D8lN78009063@sheep.berlios.de> Author: jackburton Date: 2008-10-13 10:47:21 +0200 (Mon, 13 Oct 2008) New Revision: 28022 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28022&view=rev Modified: haiku/trunk/src/preferences/screen/RefreshSlider.cpp haiku/trunk/src/preferences/screen/RefreshSlider.h haiku/trunk/src/preferences/screen/RefreshWindow.cpp Log: fixed gcc4 warnings Modified: haiku/trunk/src/preferences/screen/RefreshSlider.cpp =================================================================== --- haiku/trunk/src/preferences/screen/RefreshSlider.cpp 2008-10-13 08:32:46 UTC (rev 28021) +++ haiku/trunk/src/preferences/screen/RefreshSlider.cpp 2008-10-13 08:47:21 UTC (rev 28022) @@ -21,7 +21,7 @@ RefreshSlider::RefreshSlider(BRect frame, float min, float max, uint32 resizingMode) : BSlider(frame, "Screen", "Refresh Rate:", - new BMessage(SLIDER_INVOKE_MSG), rintf(min * 10), rintf(max * 10), + new BMessage(SLIDER_INVOKE_MSG), (int32)rintf(min * 10), (int32)rintf(max * 10), B_BLOCK_THUMB, resizingMode), fStatus(new (std::nothrow) char[32]) { @@ -87,7 +87,7 @@ } -char* +const char* RefreshSlider::UpdateText() const { if (fStatus != NULL) Modified: haiku/trunk/src/preferences/screen/RefreshSlider.h =================================================================== --- haiku/trunk/src/preferences/screen/RefreshSlider.h 2008-10-13 08:32:46 UTC (rev 28021) +++ haiku/trunk/src/preferences/screen/RefreshSlider.h 2008-10-13 08:47:21 UTC (rev 28022) @@ -20,7 +20,7 @@ virtual ~RefreshSlider(); virtual void DrawFocusMark(); - virtual char* UpdateText() const; + virtual const char* UpdateText() const; virtual void KeyDown(const char* bytes, int32 numBytes); private: Modified: haiku/trunk/src/preferences/screen/RefreshWindow.cpp =================================================================== --- haiku/trunk/src/preferences/screen/RefreshWindow.cpp 2008-10-13 08:32:46 UTC (rev 28021) +++ haiku/trunk/src/preferences/screen/RefreshWindow.cpp 2008-10-13 08:47:21 UTC (rev 28022) @@ -41,7 +41,7 @@ rect.top += stringView->Bounds().Height() + 14; fRefreshSlider = new RefreshSlider(rect, min, max, B_FOLLOW_TOP | B_FOLLOW_LEFT_RIGHT); - fRefreshSlider->SetValue(rint(current * 10)); + fRefreshSlider->SetValue((int32)rintf(current * 10)); fRefreshSlider->SetModificationMessage(new BMessage(SLIDER_MODIFICATION_MSG)); float width, height; fRefreshSlider->GetPreferredSize(&width, &height); From mmu_man at mail.berlios.de Mon Oct 13 11:25:18 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 11:25:18 +0200 Subject: [Haiku-commits] r28023 - in haiku/trunk/src/system: kernel/arch/m68k libroot/os/arch/m68k libroot/posix/arch/m68k libroot/posix/string/arch/m68k Message-ID: <200810130925.m9D9PIra013735@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 11:25:13 +0200 (Mon, 13 Oct 2008) New Revision: 28023 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28023&view=rev Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_030_asm.S haiku/trunk/src/system/kernel/arch/m68k/arch_040_asm.S haiku/trunk/src/system/kernel/arch/m68k/arch_asm.S haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S haiku/trunk/src/system/libroot/os/arch/m68k/atomic.S haiku/trunk/src/system/libroot/os/arch/m68k/byteorder.S haiku/trunk/src/system/libroot/os/arch/m68k/system_time_asm.S haiku/trunk/src/system/libroot/posix/arch/m68k/Jamfile haiku/trunk/src/system/libroot/posix/arch/m68k/siglongjmp.S haiku/trunk/src/system/libroot/posix/arch/m68k/sigsetjmp.S haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S Log: - use asm_def.h and FUNCTION_END - remove some dead ppc code Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_030_asm.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_030_asm.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_030_asm.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -1,5 +1,5 @@ -#define FUNCTION(x) .global x; .type x, at function; x +#include .text @@ -8,17 +8,20 @@ FUNCTION(flush_insn_pipeline_030): nop rts +FUNCTION_END(flush_insn_pipeline_030) /* flush all ATC entries */ FUNCTION(flush_atc_all_030): pflusha rts +FUNCTION_END(flush_atc_all_030) /* flush ATC entries for given address */ FUNCTION(flush_atc_addr_030): move.l (4,%a7),%a0 pflush #0,#0,(%a0) rts +FUNCTION_END(flush_atc_addr_030) Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_040_asm.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_040_asm.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_040_asm.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -1,5 +1,5 @@ -#define FUNCTION(x) .global x; .type x, at function; x +#include .text /* gas doesn't seem to get the -m arg... */ @@ -9,22 +9,26 @@ FUNCTION(flush_insn_pipeline_040): nop rts +FUNCTION_END(flush_insn_pipeline_040) /* flush all ATC entries */ FUNCTION(flush_atc_all_040): pflusha rts +FUNCTION_END(flush_atc_all_040) /* flush all user (non-global) ATC entries */ FUNCTION(flush_atc_user_040): pflushan rts +FUNCTION_END(flush_atc_user_040) /* flush ATC entries for given address */ FUNCTION(flush_atc_addr_040): move.l (4,%a7),%a0 pflush (%a0) rts +FUNCTION_END(flush_atc_addr_040) Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_asm.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_asm.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_asm.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -8,7 +8,7 @@ #include -#define FUNCTION(x) .global x; .type x, at function; x +#include .text @@ -16,12 +16,14 @@ FUNCTION(reboot): reset rts +FUNCTION_END(reboot) /* void arch_int_enable_interrupts(void) */ FUNCTION(arch_int_enable_interrupts): andi #0xf8ff,%sr rts +FUNCTION_END(arch_int_enable_interrupts) /* int arch_int_disable_interrupts(void) @@ -36,6 +38,7 @@ lsr.l #8,%d0 andi.l #7,%d0 rts +FUNCTION_END(arch_int_disable_interrupts) /* void arch_int_restore_interrupts(int oldState) @@ -50,6 +53,7 @@ or.w %d0,%d1 move %d1,%sr rts +FUNCTION_END(arch_int_restore_interrupts) /* bool arch_int_are_interrupts_enabled(void) */ @@ -61,12 +65,14 @@ moveq.l #1,%d0 arch_int_are_interrupts_enabled_no: rts +FUNCTION_END(arch_int_are_interrupts_enabled) // ToDo: fixme FUNCTION(dbg_save_registers): #warning M68K: implement dbx_save_registers! rts +FUNCTION_END(dbg_save_registers) /* long long get_time_base(void) */ @@ -76,6 +82,7 @@ clr.l %d1 //passed through a0 or d0:d1 ? rts +FUNCTION_END(get_time_base) #warning M68K: FIX m68k_context_switch @@ -97,6 +104,7 @@ //move.w (%sp)+,%sr rts +FUNCTION_END(m68k_context_switch) // void m68k_switch_stack_and_call(addr_t newKstack, @@ -111,6 +119,7 @@ jsr (%a1) // call the target function _loop: bra _loop +FUNCTION_END(m68k_switch_stack_and_call) // m68k_kernel_thread_root(): parameters in r13-r15, the functions to call @@ -130,4 +139,5 @@ // debugger (without a message at the moment). clr.l -(%sp) jmp kernel_debugger +FUNCTION_END(m68k_kernel_thread_root) Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,7 +3,7 @@ ** Distributed under the terms of the OpenBeOS License. */ -#define FUNCTION(x) .global x; .type x, at function; x +#include .text Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_exceptions.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -6,13 +6,11 @@ * Distributed under the terms of the NewOS License. */ +#include + #include "asm_offsets.h" -#define FUNCTION(x) .global x; .type x, at function; x -#define LOCAL_FUNCTION(x) .type x, at function; x - - /* General exception handling concept: Starting with 68020 the vector offset (=vector number * 4) is part @@ -89,6 +87,7 @@ /* this one just returns */ FUNCTION(__m68k_exception_noop): rte +FUNCTION_END(__m68k_exception_noop) /* see arch_asm.S for ctx switch */ @@ -129,374 +128,6 @@ movem.l (%sp)+,%d0-%d7/%a0-%a6 rte - +FUNCTION_END(__m68k_exception_common) -#if 0 /* PPC */ - -/* code in each exception vector */ -#define VEC_ENTRY() \ - mtsprg1 %r1 ; /* temporarily save r1 in SPRG1 */ \ - mfsprg0 %r1 ; /* ppc_cpu_exception_context* -> r1 */ \ - stw %r0, 16(%r1) ; /* save r0 */ \ - mflr %r0 ; /* save LR in r0 */ \ - bl exception_vector_common ; /* continue with the common part */ - -/* defines an exception vector */ -#define DEFINE_VECTOR(offset, name) \ -.skip offset - (. - __irqvec_start); \ -FUNCTION(name): \ - VEC_ENTRY() - - -.global __irqvec_start -__irqvec_start: - .long 0 - -/* Called by the exception vector code. - * LR: Points to the end of the exception vector code we're coming from. - * r0: original LR - * r1: ppc_cpu_exception_context* (physical address) - * SPRG1: original r1 - */ -exception_vector_common: - stw %r0, 20(%r1) /* save original LR */ - stw %r2, 24(%r1) /* save r2 */ - stw %r3, 28(%r1) /* save r3 */ - - /* load the virtual address of the ppc_cpu_exception_context for this CPU */ - lwz %r1, 4(%r1) - - /* Address translation is turned off. We map this code via BAT, turn on - address translation, and continue in the kernel proper. */ - li %r0, 0x10|0x2 /* BATL_MC | BATL_PP_RW */ - mtibatl 0, %r0 /* load lower word of the instruction BAT */ - li %r0, 0x2 /* BEPI = 0, BL = 0 (128 KB), BATU_VS */ - mtibatu 0, %r0 /* load upper word of the instruction BAT */ - isync - sync - - /* turn on address translation */ - mfsrr1 %r0 /* load saved msr */ - rlwinm %r0, %r0, 28, 30, 31 /* extract mmu bits */ - mfmsr %r3 /* load the current msr */ - rlwimi %r3, %r0, 4, 26, 27 /* merge the mmu bits with the current msr */ - li %r0, 1 - rlwimi %r3, %r0, 13, 18, 18 /* turn on FPU, too */ - mtmsr %r3 /* load new msr (turning the mmu back on) */ - isync - - /* Get LR -- it points to the end of the exception vector code. We adjust it - to point to the beginning and can use it to identify the vector later. */ - mflr %r3 - subi %r3, %r3, 20 /* 5 instructions */ - - /* jump to kernel code (ppc_exception_tail) */ - lwz %r2, 0(%r1) - mtlr %r2 - blr - - -DEFINE_VECTOR(0x100, system_reset_exception) -DEFINE_VECTOR(0x200, machine_check_exception) -DEFINE_VECTOR(0x300, DSI_exception) -DEFINE_VECTOR(0x400, ISI_exception) -DEFINE_VECTOR(0x500, external_interrupt_exception) -DEFINE_VECTOR(0x600, alignment_exception) -DEFINE_VECTOR(0x700, program_exception) -DEFINE_VECTOR(0x800, FP_unavailable_exception) -DEFINE_VECTOR(0x900, decrementer_exception) -DEFINE_VECTOR(0xc00, system_call_exception) -DEFINE_VECTOR(0xd00, trace_exception) -DEFINE_VECTOR(0xe00, FP_assist_exception) -DEFINE_VECTOR(0xf00, perf_monitor_exception) -DEFINE_VECTOR(0xf20, altivec_unavailable_exception) -DEFINE_VECTOR(0x1000, ITLB_miss_exception) -DEFINE_VECTOR(0x1100, DTLB_miss_on_load_exception) -DEFINE_VECTOR(0x1200, DTLB_miss_on_store_exception) -DEFINE_VECTOR(0x1300, instruction_address_breakpoint_exception) -DEFINE_VECTOR(0x1400, system_management_exception) -DEFINE_VECTOR(0x1600, altivec_assist_exception) -DEFINE_VECTOR(0x1700, thermal_management_exception) - -.global __irqvec_end -__irqvec_end: - - -/* This is where exception_vector_common continues. We're in the kernel here. - r1: ppc_cpu_exception_context* (virtual address) - r3: exception vector offset - SPRG1: original r1 - */ -FUNCTION(ppc_exception_tail): - /* turn off BAT */ - li %r2, 0 - mtibatu 0, %r2 - mtibatl 0, %r2 - isync - sync - - /* save CR */ - mfcr %r0 - - mfsrr1 %r2 /* load saved msr */ - andi. %r2, %r2, (1 << 14) /* see if it was in kernel mode */ - beq .kernel /* yep */ - - /* We come from userland. Load the kernel stack top address for the current - userland thread. */ - mr %r2, %r1 - lwz %r1, 8(%r1) - b .restore_stack_end - -.kernel: - mr %r2, %r1 - mfsprg1 %r1 - -.restore_stack_end: - /* now r2 points to the ppc_cpu_exception_context, r1 to the kernel stack */ - /* restore the CR, it was messed up in the previous compare */ - mtcrf 0xff, %r0 - - /* align r1 to 8 bytes, so the iframe will be aligned too */ - rlwinm %r1, %r1, 0, 0, 28 - - /* save the registers */ - bl __save_regs - - /* iframe pointer to r4 and a backup to r20 */ - mr %r4, %r1 - mr %r20, %r1 - - /* adjust the stack pointer for ABI compatibility */ - subi %r1, %r1, 8 /* make sure there's space for the previous - frame pointer and the return address */ - rlwinm %r1, %r1, 0, 0, 27 /* 16 byte align the stack pointer */ - li %r0, 0 - stw %r0, 0(%r1) /* previous frame pointer: NULL */ - /* 4(%r1) is room for the return address to be filled in by the - called function. */ - - /* r3: exception vector offset - r4: iframe pointer */ - bl ppc_exception_entry - - /* move the iframe to r1 */ - mr %r1, %r20 - - b __restore_regs_and_rfi - - -/* called by ppc_exception_tail - * register expectations: - * r1: stack - * r2: ppc_cpu_exception_context* - * SPRG1: original r1 - * r0,r3, LR: scrambled, but saved in scratch memory - * all other regs should have been unmodified by the exception handler, - * and ready to be saved - */ -__save_regs: - /* Note: The iframe must be 8 byte aligned. The stack pointer we are passed - in r1 is aligned. So we store the floating point registers first and - need to take care that an even number of 4 byte registers is stored, - or insert padding respectively. */ - - /* push f0-f31 */ - stfdu %f0, -8(%r1) - stfdu %f1, -8(%r1) - stfdu %f2, -8(%r1) - stfdu %f3, -8(%r1) - stfdu %f4, -8(%r1) - stfdu %f5, -8(%r1) - stfdu %f6, -8(%r1) - stfdu %f7, -8(%r1) - stfdu %f8, -8(%r1) - stfdu %f9, -8(%r1) - stfdu %f10, -8(%r1) - stfdu %f11, -8(%r1) - stfdu %f12, -8(%r1) - stfdu %f13, -8(%r1) - stfdu %f14, -8(%r1) - stfdu %f15, -8(%r1) - stfdu %f16, -8(%r1) - stfdu %f17, -8(%r1) - stfdu %f18, -8(%r1) - stfdu %f19, -8(%r1) - stfdu %f20, -8(%r1) - stfdu %f21, -8(%r1) - stfdu %f22, -8(%r1) - stfdu %f23, -8(%r1) - stfdu %f24, -8(%r1) - stfdu %f25, -8(%r1) - stfdu %f26, -8(%r1) - stfdu %f27, -8(%r1) - stfdu %f28, -8(%r1) - stfdu %f29, -8(%r1) - stfdu %f30, -8(%r1) - stfdu %f31, -8(%r1) - - /* push r0-r3 */ - lwz %r0, 16(%r2) /* original r0 */ - stwu %r0, -4(%r1) /* push r0 */ - mfsprg1 %r0 /* original r1 */ - stwu %r0, -4(%r1) /* push r1 */ - lwz %r0, 24(%r2) /* original r2 */ - stwu %r0, -4(%r1) /* push r2 */ - lwz %r0, 28(%r2) /* original r3 */ - stwu %r0, -4(%r1) /* push r3 */ - - /* push r4-r31 */ - stwu %r4, -4(%r1) - stwu %r5, -4(%r1) - stwu %r6, -4(%r1) - stwu %r7, -4(%r1) - stwu %r8, -4(%r1) - stwu %r9, -4(%r1) - stwu %r10, -4(%r1) - stwu %r11, -4(%r1) - stwu %r12, -4(%r1) - stwu %r13, -4(%r1) - stwu %r14, -4(%r1) - stwu %r15, -4(%r1) - stwu %r16, -4(%r1) - stwu %r17, -4(%r1) - stwu %r18, -4(%r1) - stwu %r19, -4(%r1) - stwu %r20, -4(%r1) - stwu %r21, -4(%r1) - stwu %r22, -4(%r1) - stwu %r23, -4(%r1) - stwu %r24, -4(%r1) - stwu %r25, -4(%r1) - stwu %r26, -4(%r1) - stwu %r27, -4(%r1) - stwu %r28, -4(%r1) - stwu %r29, -4(%r1) - stwu %r30, -4(%r1) - stwu %r31, -4(%r1) - - /* save some of the other regs */ - mffs %f0 - stfsu %f0, -4(%r1) /* push FPSCR */ - mfctr %r0 - stwu %r0, -4(%r1) /* push CTR */ - mfxer %r0 - stwu %r0, -4(%r1) /* push XER */ - mfcr %r0 - stwu %r0, -4(%r1) /* push CR */ - lwz %r0, 20(%r2) /* original LR */ - stwu %r0, -4(%r1) /* push LR */ - mfspr %r0, %dsisr - stwu %r0, -4(%r1) /* push DSISR */ - mfspr %r0, %dar - stwu %r0, -4(%r1) /* push DAR */ - mfspr %r0, %srr1 - stwu %r0, -4(%r1) /* push SRR1 */ - mfspr %r0, %srr0 - stwu %r0, -4(%r1) /* push SRR0 */ - - stwu %r3, -4(%r1) /* exception vector offset */ - - blr - - -/* called at the tail end of each of the exceptions - * r1: iframe pointer - */ -__restore_regs_and_rfi: - lwzu %r0, 4(%r1) /* SRR0 (skip vector offset) */ - mtspr %srr0, %r0 - lwzu %r0, 4(%r1) /* SRR1 */ - mtspr %srr1, %r0 - lwzu %r0, 4(%r1) /* DAR */ - mtspr %dar, %r0 - lwzu %r0, 4(%r1) /* DSISR */ - mtspr %dsisr, %r0 - lwzu %r0, 4(%r1) /* LR */ - mtlr %r0 - lwzu %r0, 4(%r1) /* CR */ - mtcr %r0 - lwzu %r0, 4(%r1) /* XER */ - mtxer %r0 - lwzu %r0, 4(%r1) /* CTR */ - mtctr %r0 - lfsu %f0, 4(%r1) /* FPSCR */ - mtfsf 0xff, %f0 - - lwzu %r31, 4(%r1) - lwzu %r30, 4(%r1) - lwzu %r29, 4(%r1) - lwzu %r28, 4(%r1) - lwzu %r27, 4(%r1) - lwzu %r26, 4(%r1) - lwzu %r25, 4(%r1) - lwzu %r24, 4(%r1) - lwzu %r23, 4(%r1) - lwzu %r22, 4(%r1) - lwzu %r21, 4(%r1) - lwzu %r20, 4(%r1) - lwzu %r19, 4(%r1) - lwzu %r18, 4(%r1) - lwzu %r17, 4(%r1) - lwzu %r16, 4(%r1) - lwzu %r15, 4(%r1) - lwzu %r14, 4(%r1) - lwzu %r13, 4(%r1) - lwzu %r12, 4(%r1) - lwzu %r11, 4(%r1) - lwzu %r10, 4(%r1) - lwzu %r9, 4(%r1) - lwzu %r8, 4(%r1) - lwzu %r7, 4(%r1) - lwzu %r6, 4(%r1) - lwzu %r5, 4(%r1) - lwzu %r4, 4(%r1) - lwzu %r3, 4(%r1) - - /* Stop here, before we overwrite r1, and continue with the floating point - registers first. */ - addi %r2, %r1, 16 /* skip r3-r0 */ - - /* f31-f0 */ - lfd %f31, 0(%r2) - lfdu %f30, 8(%r2) - lfdu %f29, 8(%r2) - lfdu %f28, 8(%r2) - lfdu %f27, 8(%r2) - lfdu %f26, 8(%r2) - lfdu %f25, 8(%r2) - lfdu %f24, 8(%r2) - lfdu %f23, 8(%r2) - lfdu %f22, 8(%r2) - lfdu %f21, 8(%r2) - lfdu %f20, 8(%r2) - lfdu %f19, 8(%r2) - lfdu %f18, 8(%r2) - lfdu %f17, 8(%r2) - lfdu %f16, 8(%r2) - lfdu %f15, 8(%r2) - lfdu %f14, 8(%r2) - lfdu %f13, 8(%r2) - lfdu %f12, 8(%r2) - lfdu %f11, 8(%r2) - lfdu %f10, 8(%r2) - lfdu %f9, 8(%r2) - lfdu %f8, 8(%r2) - lfdu %f7, 8(%r2) - lfdu %f6, 8(%r2) - lfdu %f5, 8(%r2) - lfdu %f4, 8(%r2) - lfdu %f3, 8(%r2) - lfdu %f2, 8(%r2) - lfdu %f1, 8(%r2) - lfd %f0, 8(%r2) - - /* r2-r0 */ - lwzu %r2, 4(%r1) - lwz %r0, 8(%r1) - lwz %r1, 4(%r1) - - /* return from interrupt */ - rfi -#endif /* PPC */ Modified: haiku/trunk/src/system/libroot/os/arch/m68k/atomic.S =================================================================== --- haiku/trunk/src/system/libroot/os/arch/m68k/atomic.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/os/arch/m68k/atomic.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,6 +3,8 @@ ** Distributed under the terms of the OpenBeOS License. */ +#include + /* * gcc/config/m68k/m68k.h:CALL_USED_REGISTERS: * d0,d1,a0,a1 are scratch regs, not to be saved. @@ -16,8 +18,6 @@ * have any SMP Amiga anyway it should be ok. */ -#define FUNCTION(x) .global x; .type x, at function; x - .text /* int atomic_add(int *value, int increment) @@ -31,6 +31,7 @@ bne miss1 // d0 = old value rts +FUNCTION_END(atomic_add) /* int atomic_and(int *value, int andValue) */ @@ -43,6 +44,7 @@ bne miss2 // d0 = old value rts +FUNCTION_END(atomic_and) /* int atomic_or(int *value, int orValue) */ @@ -54,6 +56,7 @@ cas.l %d0,%d1,(%a0) bne miss3 rts +FUNCTION_END(atomic_or) /* int atomic_set(int *value, int setTo) */ @@ -64,6 +67,7 @@ miss4: cas.l %d0,%d1,(%a0) bne miss4 rts +FUNCTION_END(atomic_set) /* int atomic_test_and_set(int *value, int setTo, int testValue) */ @@ -73,6 +77,7 @@ move.l (12,%a7),%d0 cas.l %d0,%d1,(%a0) rts +FUNCTION_END(atomic_test_and_set) /* int atomic_get(int *value) */ @@ -84,6 +89,7 @@ // we must use cas... so we change to the same value if matching, // else we get the correct one anyway rts +FUNCTION_END(atomic_get) /* m68k elf convention is to return structs in (a0) * but use d0/d1 for int64 and small structs. @@ -110,6 +116,7 @@ // return value d0:d1 movem.l (%a7)+,%d2-%d3/%a2 rts +FUNCTION_END(atomic_add64) /* int64 atomic_and64(vint64 *value, int64 andValue) */ FUNCTION(atomic_and64): @@ -129,6 +136,7 @@ // return value d0:d1 movem.l (%a7)+,%d2-%d3/%a2 rts +FUNCTION_END(atomic_and64) /* int64 atomic_or64(vint64 *value, int64 orValue) */ FUNCTION(atomic_or64): @@ -148,6 +156,7 @@ // return value d0:d1 movem.l (%a7)+,%d2-%d3/%a2 rts +FUNCTION_END(atomic_or64) /* int64 atomic_set64(vint64 *value, int64 newValue) */ FUNCTION(atomic_set64): @@ -165,6 +174,7 @@ // return value d0:d1 movem.l (%a7)+,%d2-%d3/%a2 rts +FUNCTION_END(atomic_set64) /* int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst) */ FUNCTION(atomic_test_and_set64): @@ -181,6 +191,7 @@ // return value d0:d1 movem.l (%a7)+,%d2-%d3/%a2 rts +FUNCTION_END(atomic_test_and_set64) /* int64 atomic_get64(vint64 *value) */ FUNCTION(atomic_get64): @@ -197,4 +208,4 @@ // return value movem.l (%a7)+,%d2-%d3/%a2 rts - +FUNCTION_END(atomic_get64) Modified: haiku/trunk/src/system/libroot/os/arch/m68k/byteorder.S =================================================================== --- haiku/trunk/src/system/libroot/os/arch/m68k/byteorder.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/os/arch/m68k/byteorder.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,7 +3,7 @@ ** Distributed under the terms of the OpenBeOS License. */ -#define FUNCTION(x) .global x; .type x, at function; x +#include .text @@ -18,8 +18,8 @@ lsl.w #8,%d0 move.b %d1,%d0 rts +FUNCTION_END(__swap_int16) - /* uint32 __swap_int32(uint32 value) */ FUNCTION(__swap_int32): @@ -32,8 +32,8 @@ lsl.l #8,%d0 move.b (4,%a7),%d0 rts +FUNCTION_END(__swap_int32) - /* uint64 __swap_int64(uint64 value) */ FUNCTION(__swap_int64): @@ -54,8 +54,8 @@ lsl.l #8,%d0 move.b (8,%a7),%d0 rts +FUNCTION_END(__swap_int64) - /* TODO: The following functions can surely be optimized. A simple optimization * would be to define macros with the contents of the __swap_int{32,64} * functions and use those instead of calling the functions. @@ -66,12 +66,14 @@ FUNCTION(__swap_float): jmp __swap_int32 //rts +FUNCTION_END(__swap_float) - /* double __swap_double(double value) */ FUNCTION(__swap_double): jmp __swap_int32 //rts - //XXX:check sizeof(double) +#warning M68K: XXX:check sizeof(double) +FUNCTION_END(__swap_double) + Modified: haiku/trunk/src/system/libroot/os/arch/m68k/system_time_asm.S =================================================================== --- haiku/trunk/src/system/libroot/os/arch/m68k/system_time_asm.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/os/arch/m68k/system_time_asm.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,7 +3,7 @@ ** Distributed under the terms of the OpenBeOS License. */ -#define FUNCTION(x) .global x; .type x, at function; x +#include .text @@ -12,4 +12,4 @@ FUNCTION(__m68k_get_time_base): #warning M68K: implement __m68k_get_time_base() rts - +FUNCTION_END(__m68k_get_time_base) Modified: haiku/trunk/src/system/libroot/posix/arch/m68k/Jamfile =================================================================== --- haiku/trunk/src/system/libroot/posix/arch/m68k/Jamfile 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/posix/arch/m68k/Jamfile 2008-10-13 09:25:13 UTC (rev 28023) @@ -1,5 +1,7 @@ SubDir HAIKU_TOP src system libroot posix arch m68k ; +UsePrivateSystemHeaders ; + local genericSources = setjmp_save_sigs.c longjmp_return.c Modified: haiku/trunk/src/system/libroot/posix/arch/m68k/siglongjmp.S =================================================================== --- haiku/trunk/src/system/libroot/posix/arch/m68k/siglongjmp.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/posix/arch/m68k/siglongjmp.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,6 +3,8 @@ * reserved. Distributed under the terms of the Haiku License. */ +#include + #include "setjmp_internal.h" /* int __siglongjmp(jmp_buf buffer, int value) */ @@ -22,5 +24,8 @@ move.l (JMP_REGS_PC,%a0),(%a7) jmp __longjmp_return +FUNCTION_END(siglongjmp) +FUNCTION_END(longjmp) +FUNCTION_END(_longjmp) #pragma weak longjmp=siglongjmp Modified: haiku/trunk/src/system/libroot/posix/arch/m68k/sigsetjmp.S =================================================================== --- haiku/trunk/src/system/libroot/posix/arch/m68k/sigsetjmp.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/posix/arch/m68k/sigsetjmp.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,6 +3,8 @@ * reserved. Distributed under the terms of the Haiku License. */ +#include + #include "setjmp_internal.h" /* int sigsetjmp(jmp_buf buffer, int saveMask) */ @@ -25,6 +27,8 @@ #warning M68K: check this. jmp __setjmp_save_sigs +FUNCTION_END(__sigsetjmp) +FUNCTION_END(sigsetjmp) /* int setjmp(jmp_buf buffer) */ @@ -36,6 +40,6 @@ move.l %a0,-(%a7) // call __sigsetjmp with saveMask = 0 jmp __sigsetjmp +FUNCTION_END(setjmp) - #pragma weak _setjmp=setjmp Modified: haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S =================================================================== --- haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S 2008-10-13 08:47:21 UTC (rev 28022) +++ haiku/trunk/src/system/libroot/posix/string/arch/m68k/arch_string.S 2008-10-13 09:25:13 UTC (rev 28023) @@ -3,9 +3,10 @@ ** Distributed under the terms of the NewOS License. */ +#include + #warning M68K: optimize memcpy #if 1 -#define FUNCTION(x) .global x; .type x, at function; x /* that should be enough for now */ @@ -24,4 +25,5 @@ move.l (4,%a7),%a0 move.l %a0,%d0 rts +FUNCTION_END(memcpy) #endif From dlmcpaul at mail.berlios.de Mon Oct 13 12:41:39 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Mon, 13 Oct 2008 12:41:39 +0200 Subject: [Haiku-commits] r28024 - haiku/trunk/src/add-ons/media/plugins/raw_decoder Message-ID: <200810131041.m9DAfdek031772@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-13 12:41:37 +0200 (Mon, 13 Oct 2008) New Revision: 28024 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28024&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp Log: Don't change the buffer size assigned by the reader Modified: haiku/trunk/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp 2008-10-13 09:25:13 UTC (rev 28023) +++ haiku/trunk/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp 2008-10-13 10:41:37 UTC (rev 28024) @@ -108,10 +108,11 @@ // since we can translate to a different buffer size, // suggest something nicer than delivered by the // file reader (perhaps we should even report wildcard?) - ioEncodedFormat->u.raw_audio.buffer_size = AudioBufferSize( - ioEncodedFormat->u.raw_audio.channel_count, - ioEncodedFormat->u.raw_audio.format, - ioEncodedFormat->u.raw_audio.frame_rate); + // I don't believe we can negotiate the buffer size with the reader +// ioEncodedFormat->u.raw_audio.buffer_size = AudioBufferSize( +// ioEncodedFormat->u.raw_audio.channel_count, +// ioEncodedFormat->u.raw_audio.format, +// ioEncodedFormat->u.raw_audio.frame_rate); return B_OK; } @@ -143,8 +144,7 @@ { char s[1024]; - string_for_format(*ioDecodedFormat, s, sizeof(s)); - TRACE("RawDecoder::NegotiateAudioOutputFormat enter: %s\n", s); + TRACE("RawDecoder::NegotiateAudioOutputFormat enter:\n"); ioDecodedFormat->type = B_MEDIA_RAW_AUDIO; switch (ioDecodedFormat->u.raw_audio.format) { @@ -198,15 +198,19 @@ ioDecodedFormat->u.raw_audio.channel_mask = 0; ioDecodedFormat->u.raw_audio.matrix_mask = 0; - if (ioDecodedFormat->u.raw_audio.buffer_size < 128 || ioDecodedFormat->u.raw_audio.buffer_size > 65536) { - ioDecodedFormat->u.raw_audio.buffer_size = AudioBufferSize( - ioDecodedFormat->u.raw_audio.channel_count, - ioDecodedFormat->u.raw_audio.format, - ioDecodedFormat->u.raw_audio.frame_rate); - } else { + ioDecodedFormat->u.raw_audio.buffer_size = fInputFormat.u.raw_audio.buffer_size; + +// I don't believe we can negotiate the buffer size with the reader +// the decoder might use a different buffer for output but it must read all bytes given. +// if (ioDecodedFormat->u.raw_audio.buffer_size < 128 || ioDecodedFormat->u.raw_audio.buffer_size > 65536) { +// ioDecodedFormat->u.raw_audio.buffer_size = AudioBufferSize( +// ioDecodedFormat->u.raw_audio.channel_count, +// ioDecodedFormat->u.raw_audio.format, +// ioDecodedFormat->u.raw_audio.frame_rate); +// } else { // round down to exact multiple of output frame size - ioDecodedFormat->u.raw_audio.buffer_size = (ioDecodedFormat->u.raw_audio.buffer_size / fOutputFrameSize) * fOutputFrameSize; - } +// ioDecodedFormat->u.raw_audio.buffer_size = (ioDecodedFormat->u.raw_audio.buffer_size / fOutputFrameSize) * fOutputFrameSize; +// } fOutputBufferFrameCount = ioDecodedFormat->u.raw_audio.buffer_size / fOutputFrameSize; @@ -505,6 +509,9 @@ if (fSwapOutput) fSwapOutput(buffer, *frameCount * fInputFormat.u.raw_audio.channel_count); + + TRACE("framecount %Ld, time %Ld\n",*frameCount, mediaHeader->start_time); + return *frameCount ? B_OK : B_ERROR; } From dlmcpaul at mail.berlios.de Mon Oct 13 12:43:07 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Mon, 13 Oct 2008 12:43:07 +0200 Subject: [Haiku-commits] r28025 - haiku/trunk/src/add-ons/media/plugins/wav_reader Message-ID: <200810131043.m9DAh7IF000513@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-13 12:43:06 +0200 (Mon, 13 Oct 2008) New Revision: 28025 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28025&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h Log: rework seeking calculations Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp 2008-10-13 10:41:37 UTC (rev 28024) +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp 2008-10-13 10:43:06 UTC (rev 28025) @@ -46,16 +46,16 @@ struct wavdata { - uint64 position; - uint64 datasize; + int64 position; + int64 datasize; - int32 bitsperframe; - int32 fps; + uint32 bitrate; + uint32 fps; void *buffer; - int32 buffersize; + uint32 buffersize; - int64 framecount; + uint64 framecount; bigtime_t duration; bool raw; @@ -63,6 +63,30 @@ media_format format; }; +static bigtime_t FrameToTime(uint64 frame, uint32 fps) { + return frame * 1000000LL / fps; +} + +static uint64 TimeToFrame(bigtime_t time, uint32 fps) { + return (time * fps) / 1000000LL; +} + +static int64 TimeToPosition(bigtime_t time, uint32 bitrate) { + return (time * bitrate) / 8000000LL; +} + +static bigtime_t PositionToTime(int64 position, uint32 bitrate) { + return (position * 8000000LL) / bitrate; +} + +static int64 FrameToPosition(uint64 frame, uint32 bitrate, uint32 fps) { + return TimeToPosition(FrameToTime(frame,fps),bitrate); +} + +static uint64 PositionToFrame(int64 position, uint32 bitrate, uint32 fps) { + return TimeToFrame(PositionToTime(position,bitrate),fps); +} + WavReader::WavReader() { TRACE("WavReader::WavReader\n"); @@ -204,19 +228,23 @@ } fChannelCount = UINT16(format.channels); - fFrameRate = UINT32(format.samples_per_sec); + fSampleRate = UINT32(format.samples_per_sec); + fBlockAlign = UINT16(format.block_align); fBitsPerSample = UINT16(format.bits_per_sample); if (fBitsPerSample == 0) { - printf("WavReader::Sniff: Error, bits_per_sample = 0 assuming 8\n"); - fBitsPerSample = 8; + printf("WavReader::Sniff: Error, bits_per_sample = 0 calculating\n"); + fBitsPerSample = fBlockAlign * 8 / fChannelCount; } + fFrameRate = fSampleRate * fChannelCount; + fAvgBytesPerSec = format.avg_bytes_per_sec; - fFrameCount = foundFact ? UINT32(fact.sample_length) : 0; + + // fact.sample_length is really no of samples for all channels + fFrameCount = foundFact ? UINT32(fact.sample_length) / fChannelCount : 0; fFormatCode = UINT16(format.format_tag); if (fFormatCode == 0xfffe && foundFmtExt) fFormatCode = (format_ext.guid[1] << 8) | format_ext.guid[0]; - fBlockAlign = UINT16(format.block_align); int min_align = (fFormatCode == 0x0001) ? (fBitsPerSample * fChannelCount + 7) / 8 : 1; if (fBlockAlign < min_align) fBlockAlign = min_align; @@ -224,6 +252,7 @@ TRACE(" fDataStart %Ld\n", fDataStart); TRACE(" fDataSize %Ld\n", fDataSize); TRACE(" fChannelCount %ld\n", fChannelCount); + TRACE(" fSampleRate %ld\n", fSampleRate); TRACE(" fFrameRate %ld\n", fFrameRate); TRACE(" fFrameCount %Ld\n", fFrameCount); TRACE(" fBitsPerSample %d\n", fBitsPerSample); @@ -231,7 +260,7 @@ TRACE(" min_align %d\n", min_align); TRACE(" fFormatCode 0x%04x\n", fFormatCode); - // XXX fact.sample_length contains duration of encodec files? + // XXX fact.sample_length contains duration of encoded files? *streamCount = 1; return B_OK; @@ -262,29 +291,25 @@ data->position = 0; data->datasize = fDataSize; - data->bitsperframe = fChannelCount * fBitsPerSample; - data->fps = fFrameRate; + data->fps = fSampleRate; data->buffersize = (BUFFER_SIZE / fBlockAlign) * fBlockAlign; data->buffer = malloc(data->buffersize); - data->framecount = fFrameCount ? fFrameCount : (8 * fDataSize) / data->bitsperframe; - if (fFormatCode == 0x0055) { - // mp3 in wav file - if (fAvgBytesPerSec) { - data->duration = (data->datasize * 1000000LL) / fAvgBytesPerSec; - } else { - data->duration = (data->framecount * 1000000LL) / data->fps / fBitsPerSample * fChannelCount; - } - } else { - data->duration = (data->framecount * 1000000LL) / data->fps; - } + data->framecount = fFrameCount ? fFrameCount : (8 * fDataSize) / (fChannelCount * fBitsPerSample); data->raw = fFormatCode == 0x0001; - TRACE(" bitsperframe %ld\n", data->bitsperframe); - TRACE(" fps %ld\n", data->fps); + if (!fAvgBytesPerSec) { + fAvgBytesPerSec = fSampleRate * fBlockAlign; + } + + data->duration = (data->datasize * 1000000LL) / fAvgBytesPerSec; + data->bitrate = fAvgBytesPerSec * 8; + + TRACE(" raw %s\n", data->raw ? "true" : "false"); + TRACE(" framecount %Ld\n", data->framecount); + TRACE(" duration %Ld\n", data->duration); + TRACE(" bitrate %ld\n", data->bitrate); + TRACE(" fps %ld\n", data->fps); TRACE(" buffersize %ld\n", data->buffersize); - TRACE(" framecount %Ld\n", data->framecount); - TRACE(" duration %Ld\n", data->duration); - TRACE(" raw %d\n", data->raw); BMediaFormats formats; if (fFormatCode == 0x0001) { @@ -293,7 +318,8 @@ description.family = B_BEOS_FORMAT_FAMILY; description.u.beos.format = B_BEOS_FORMAT_RAW_AUDIO; formats.GetFormatFor(description, &data->format); - data->format.u.raw_audio.frame_rate = fFrameRate; + // Really SampleRate + data->format.u.raw_audio.frame_rate = fSampleRate; data->format.u.raw_audio.channel_count = fChannelCount; switch (fBitsPerSample) { case 8: @@ -321,7 +347,8 @@ description.family = B_WAV_FORMAT_FAMILY; description.u.wav.codec = fFormatCode; formats.GetFormatFor(description, &data->format); - data->format.u.encoded_audio.output.frame_rate = fFrameRate; + // Really SampleRate + data->format.u.encoded_audio.output.frame_rate = fSampleRate; data->format.u.encoded_audio.output.channel_count = fChannelCount; } @@ -358,96 +385,76 @@ return B_OK; } - status_t -WavReader::Seek(void *cookie, +WavReader::CalculateNewPosition(void *cookie, uint32 flags, - int64 *frame, bigtime_t *time) + int64 *frame, bigtime_t *time, int64 *position) { - // Seek to the given position wavdata *data = reinterpret_cast(cookie); - uint64 pos; if (flags & B_MEDIA_SEEK_TO_FRAME) { - if (data->raw) - pos = (*frame * data->bitsperframe) / 8; - else - pos = (*frame * fDataSize) / data->framecount; - pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("WavReader::Seek to frame %Ld, pos %Ld\n", *frame, pos); + TRACE(" to frame %Ld",*frame); + *position = FrameToPosition(*frame, data->bitrate, data->fps); + } else if (flags & B_MEDIA_SEEK_TO_TIME) { - if (data->raw) - pos = (*time * data->fps * data->bitsperframe) / (1000000LL * 8); - else - pos = (*time * fDataSize) / data->duration; - pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("WavReader::Seek to time %Ld, pos %Ld\n", *time, pos); + TRACE(" to time %Ld", *time); + *position = TimeToPosition(*time, data->bitrate); } else { + printf("WavReader::CalculateNewPosition invalid flag passed %ld\n", flags); return B_ERROR; } - if (data->raw) - *frame = (8 * pos) / data->bitsperframe; - else - *frame = (pos * data->framecount) / fDataSize; - *time = (*frame * 1000000LL) / data->fps; + *position = (*position / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("WavReader::Seek newtime %Ld\n", *time); - TRACE("WavReader::Seek newframe %Ld\n", *frame); + TRACE(", position %Ld ", *position); + + *frame = PositionToFrame(*position, data->bitrate, data->fps); + *time = FrameToTime(*frame,data->fps); + + TRACE("newtime %Ld ", *time); + TRACE("newframe %Ld\n", *frame); - if (pos < 0 || pos > data->datasize) { - TRACE("WavReader::Seek invalid position %Ld\n", pos); + if (*position < 0 || *position > data->datasize) { + printf("WavReader::CalculateNewPosition invalid position %Ld\n", *position); return B_ERROR; } - data->position = pos; return B_OK; } status_t -WavReader::FindKeyFrame(void* cookie, uint32 flags, - int64* frame, bigtime_t* time) +WavReader::Seek(void *cookie, + uint32 flags, + int64 *frame, bigtime_t *time) { - // Find a seek position without actually seeking + // Seek to the given position wavdata *data = reinterpret_cast(cookie); - uint64 pos; - - if (flags & B_MEDIA_SEEK_TO_FRAME) { - if (data->raw) - pos = (*frame * data->bitsperframe) / 8; - else - pos = (*frame * fDataSize) / data->framecount; - pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("WavReader::Seek to frame %Ld, pos %Ld\n", *frame, pos); - } else if (flags & B_MEDIA_SEEK_TO_TIME) { - if (data->raw) - pos = (*time * data->fps * data->bitsperframe) / (1000000LL * 8); - else - pos = (*time * fDataSize) / data->duration; - pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("WavReader::Seek to time %Ld, pos %Ld\n", *time, pos); - } else { - return B_ERROR; - } - - if (data->raw) - *frame = (8 * pos) / data->bitsperframe; - else - *frame = (pos * data->framecount) / fDataSize; - *time = (*frame * 1000000LL) / data->fps; - - TRACE("WavReader::Seek newtime %Ld\n", *time); - TRACE("WavReader::Seek newframe %Ld\n", *frame); + status_t status; + int64 pos; - if (pos < 0 || pos > data->datasize) { - TRACE("WavReader::Seek invalid position %Ld\n", pos); - return B_ERROR; + TRACE("WavReader::Seek"); + status = CalculateNewPosition(cookie, flags, frame, time, &pos); + + if (status == B_OK) { + // set the new position so next GetNextChunk will read from new seek pos + data->position = pos; } - return B_OK; + return status; } status_t +WavReader::FindKeyFrame(void* cookie, uint32 flags, + int64* frame, bigtime_t* time) +{ + // Find a seek position without actually seeking + int64 pos; + TRACE("WavReader::FindKeyFrame"); + + return CalculateNewPosition(cookie, flags, frame, time, &pos); +} + +status_t WavReader::GetNextChunk(void *cookie, const void **chunkBuffer, size_t *chunkSize, media_header *mediaHeader) @@ -456,28 +463,25 @@ // XXX it might be much better to not return any start_time information for encoded formats here, // XXX and instead use the last time returned from seek and count forward after decoding. - if (data->raw) - mediaHeader->start_time = (((8 * data->position) / data->bitsperframe) * 1000000LL) / data->fps; - else - mediaHeader->start_time = (data->position * data->duration) / fDataSize; + mediaHeader->start_time = PositionToTime(data->position,data->bitrate); mediaHeader->file_pos = fDataStart + data->position; -/* - printf("position = %9Ld\n", data->position); - printf("fDataSize = %9Ld\n", fDataSize); - printf("duration = %9Ld\n", data->duration); - printf("start_time = %9Ld\n", mediaHeader->start_time); -*/ + TRACE("(%s) position = %9Ld ", data->raw ? "raw" : "encoded", data->position); + TRACE("frame = %9Ld ", PositionToFrame(data->position,data->bitrate,data->fps)); + TRACE("fDataSize = %9Ld ", fDataSize); + TRACE("start_time = %9Ld\n", mediaHeader->start_time); int64 maxreadsize = data->datasize - data->position; int32 readsize = data->buffersize; if (maxreadsize < readsize) readsize = maxreadsize; - if (readsize == 0) + if (readsize == 0) { + printf("WavReader::GetNextChunk: LAST BUFFER ERROR at time %9Ld\n",mediaHeader->start_time); return B_LAST_BUFFER_ERROR; - + } + if (readsize != Source()->ReadAt(fDataStart + data->position, data->buffer, readsize)) { - TRACE("WavReader::GetNextChunk: unexpected read error\n"); + printf("WavReader::GetNextChunk: unexpected read error at position %9Ld\n",fDataStart + data->position); return B_ERROR; } Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h =================================================================== --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h 2008-10-13 10:41:37 UTC (rev 28024) +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h 2008-10-13 10:43:06 UTC (rev 28025) @@ -55,7 +55,10 @@ status_t GetNextChunk(void *cookie, const void **chunkBuffer, size_t *chunkSize, media_header *mediaHeader); - + + status_t CalculateNewPosition(void* cookie, uint32 flags, + int64 *frame, bigtime_t *time, int64 *position); + BPositionIO *Source() { return fSource; } private: @@ -67,10 +70,11 @@ int64 fFrameCount; int32 fChannelCount; int32 fFrameRate; - int fBitsPerSample; + int32 fSampleRate; + uint16 fBitsPerSample; uint16 fFormatCode; uint16 fBlockAlign; - uint16 fAvgBytesPerSec; + uint32 fAvgBytesPerSec; }; From dlmcpaul at mail.berlios.de Mon Oct 13 12:45:52 2008 From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS) Date: Mon, 13 Oct 2008 12:45:52 +0200 Subject: [Haiku-commits] r28026 - haiku/trunk/src/add-ons/media/plugins/mp3_decoder Message-ID: <200810131045.m9DAjqTY003654@sheep.berlios.de> Author: dlmcpaul Date: 2008-10-13 12:45:49 +0200 (Mon, 13 Oct 2008) New Revision: 28026 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28026&view=rev Modified: haiku/trunk/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp Log: add additional tracing Modified: haiku/trunk/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp =================================================================== --- haiku/trunk/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp 2008-10-13 10:43:06 UTC (rev 28025) +++ haiku/trunk/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp 2008-10-13 10:45:49 UTC (rev 28026) @@ -166,6 +166,7 @@ ioDecodedFormat->u.raw_audio.buffer_size = AudioBufferSize(ioDecodedFormat->u.raw_audio); else ioDecodedFormat->u.raw_audio.buffer_size = (ioDecodedFormat->u.raw_audio.buffer_size / frame_size) * frame_size; + if (ioDecodedFormat->u.raw_audio.channel_mask == 0) ioDecodedFormat->u.raw_audio.channel_mask = (fChannelCount == 1) ? B_CHANNEL_LEFT : B_CHANNEL_LEFT | B_CHANNEL_RIGHT; @@ -240,6 +241,7 @@ *frameCount = out_bytes / fFrameSize; + TRACE("framecount %Ld, time %Ld\n",*frameCount, mediaHeader->start_time); return (out_bytes > 0) ? B_OK : last_err; } From dlmcpaul at gmail.com Mon Oct 13 12:52:06 2008 From: dlmcpaul at gmail.com (David McPaul) Date: Mon, 13 Oct 2008 21:52:06 +1100 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <48F0EC35.1070408@bug-br.org.br> References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> <48F0EC35.1070408@bug-br.org.br> Message-ID: 2008/10/12 Bruno Albuquerque : > David McPaul escreveu: > >> I have committed a fix for this. Let me know if there are any issues. > > Yep. It is way better, but seeking is broken on that same file now. Ideas? > > -Bruno How about now? -- Cheers David From stippi at mail.berlios.de Mon Oct 13 13:53:23 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 13:53:23 +0200 Subject: [Haiku-commits] r28027 - haiku/trunk/docs/welcome Message-ID: <200810131153.m9DBrNhu017577@sheep.berlios.de> Author: stippi Date: 2008-10-13 13:53:22 +0200 (Mon, 13 Oct 2008) New Revision: 28027 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28027&view=rev Added: haiku/trunk/docs/welcome/teammonitor.html Modified: haiku/trunk/docs/welcome/tracker.html Log: Patch by Humdinger: * Added the missing Team Monitor intro. * Fixed navigation in the preceeding and following files. Changes by myself: * Removed the bottom navigation in the Twitcher intro, since the file is so short anyways. Added: haiku/trunk/docs/welcome/teammonitor.html =================================================================== --- haiku/trunk/docs/welcome/teammonitor.html 2008-10-13 10:45:49 UTC (rev 28026) +++ haiku/trunk/docs/welcome/teammonitor.html 2008-10-13 11:53:22 UTC (rev 28027) @@ -0,0 +1,48 @@ + + + + + Team Monitor + + + + + +
    +

    + Welcome +     + Previous: The Twitcher +     + Next: The Tracker +

    +
    + +
    + +

    The Team Monitor

    +

    With CTRL+ALT+DEL you invoke the Team Monitor which lists all currently running programs. +

    +
    +

    Programs that were launched by the system are blue, those started by the user black.
    +Applications that are unresponsive, which is often a sign the program has crashed, are marked red. You can kill a program by selecting it and pressing the Kill Application button. +

    If your Tracker or Deskbar crashed or froze, a new button appears (you may have to kill the offending team first): Restart the Desktop will restart Tracker and/or Deskbar for you. +

    + +
    + +
    +

    + Welcome +     + Previous: The Twitcher +     + Next: The Tracker +

    +
    + + + Modified: haiku/trunk/docs/welcome/tracker.html =================================================================== --- haiku/trunk/docs/welcome/tracker.html 2008-10-13 10:45:49 UTC (rev 28026) +++ haiku/trunk/docs/welcome/tracker.html 2008-10-13 11:53:22 UTC (rev 28027) @@ -135,7 +135,7 @@

    Welcome     - Previous: The Twitcher + Previous: The Team Monitor     Next: The Deskbar

    From stippi at mail.berlios.de Mon Oct 13 14:02:32 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 14:02:32 +0200 Subject: [Haiku-commits] r28028 - haiku/trunk/src/apps/text_search Message-ID: <200810131202.m9DC2W0G018847@sheep.berlios.de> Author: stippi Date: 2008-10-13 14:02:32 +0200 (Mon, 13 Oct 2008) New Revision: 28028 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28028&view=rev Modified: haiku/trunk/src/apps/text_search/GrepWindow.cpp Log: Fixed the layout/width of the search string text view. Modified: haiku/trunk/src/apps/text_search/GrepWindow.cpp =================================================================== --- haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-13 11:53:22 UTC (rev 28027) +++ haiku/trunk/src/apps/text_search/GrepWindow.cpp 2008-10-13 12:02:32 UTC (rev 28028) @@ -610,7 +610,7 @@ background->AddChild(fButton); fSearchText->MoveTo(8, 8); - fSearchText->ResizeBy(width - 16, 0); + fSearchText->ResizeTo(width - 16, fSearchText->Frame().Height()); fSearchText->MakeFocus(true); fShowLinesCheckbox->MoveTo( From bga at bug-br.org.br Mon Oct 13 14:13:49 2008 From: bga at bug-br.org.br (Bruno Albuquerque) Date: Mon, 13 Oct 2008 10:13:49 -0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: <20081010193436.153780@gmx.net> References: <1486112797-BeMail@laptop> <20081009173754.680.1@stippis2.1223566143.fake> <48EE2897.9060703@bug-br.org.br> <20081010193436.153780@gmx.net> Message-ID: <48F33B7D.8030607@bug-br.org.br> Stephan Assmus wrote: >> I have exactly the same problem with OSS and trying to debug it is a >> nightmare because restarting the media_server usually makes the audio >> stop completely so I can not even try to figure out if something >> specific happens that triggers audio suddenly start working some seconds >> after booting. Did you manage to notice anything related to this? In >> other words, did you try debugging this at all? If so, any success? > > Would you say that the silence period on startup has decreased with the > smaller buffers? It may have something to do with the drift > calculation. I can probably check something... hm. But otherwise I am > a bit clueless and have not looked into it yet. Mostly because I > didn't try to configure a startup sound and therefor it wasn't annoying > enough to me yet. :-) I am not sure. I just know that the problem was always there but I don't know if it was longer before. The reason I noticed it was exactly because I tried to use a startup sound. -Bruno From bga at bug-br.org.br Mon Oct 13 14:16:15 2008 From: bga at bug-br.org.br (Bruno Albuquerque) Date: Mon, 13 Oct 2008 10:16:15 -0200 Subject: [Haiku-commits] r27942 - haiku/trunk/src/add-ons/media/plugins/mp3_reader In-Reply-To: References: <200810091211.m99CBh8U018557@sheep.berlios.de> <48EDFD32.5030307@bug-br.org.br> <48F0EC35.1070408@bug-br.org.br> Message-ID: <48F33C0F.7040507@bug-br.org.br> David McPaul wrote: > 2008/10/12 Bruno Albuquerque : >>> I have committed a fix for this. Let me know if there are any issues. >> >> Yep. It is way better, but seeking is broken on that same file now. Ideas? > > How about now? Will check as soon as I get back home later today. -Bruno From mmlr at mail.berlios.de Mon Oct 13 14:34:47 2008 From: mmlr at mail.berlios.de (mmlr at mail.berlios.de) Date: Mon, 13 Oct 2008 14:34:47 +0200 Subject: [Haiku-commits] r28029 - haiku/trunk/src/system/kernel/disk_device_manager Message-ID: <200810131234.m9DCYlTp023198@sheep.berlios.de> Author: mmlr Date: 2008-10-13 14:34:44 +0200 (Mon, 13 Oct 2008) New Revision: 28029 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28029&view=rev Modified: haiku/trunk/src/system/kernel/disk_device_manager/KDiskDevice.cpp Log: If a device reports no media is present, don't try to get the geometry anyway. This confused some USB card readers, that would stop working if you still requested the geometry when they reported no media. Note the case that the B_GET_MEDIA_STATUS fails (because it's not implemented or an error occured) is still handeld in _GetMediaStatus() and then we still try to get the geometry to check for media presence. This should fix that some USB card readers wouldn't work and should also remove the wrongly reported size in DriveSetup for CD drives that don't actually contain a media. Modified: haiku/trunk/src/system/kernel/disk_device_manager/KDiskDevice.cpp =================================================================== --- haiku/trunk/src/system/kernel/disk_device_manager/KDiskDevice.cpp 2008-10-13 12:02:32 UTC (rev 28028) +++ haiku/trunk/src/system/kernel/disk_device_manager/KDiskDevice.cpp 2008-10-13 12:34:44 UTC (rev 28029) @@ -69,10 +69,8 @@ if (error != B_OK) return error; } else { - // no media: try to get the device geometry, but don't fail, if - // we can't get it - if (GetGeometry(&fDeviceData.geometry) != B_OK) - _ResetGeometry(); + // no media present: reset the geometry + _ResetGeometry(); } // set device flags From stippi at mail.berlios.de Mon Oct 13 14:40:08 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 14:40:08 +0200 Subject: [Haiku-commits] r28030 - haiku/trunk/src/apps/deskbar Message-ID: <200810131240.m9DCe8QH024011@sheep.berlios.de> Author: stippi Date: 2008-10-13 14:40:07 +0200 (Mon, 13 Oct 2008) New Revision: 28030 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28030&view=rev Modified: haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp haiku/trunk/src/apps/deskbar/BarView.cpp haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp haiku/trunk/src/apps/deskbar/StatusView.cpp haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp haiku/trunk/src/apps/deskbar/WindowMenuItem.cpp Log: Never use the current menu UI color, but always the view color of any given menu. Fixes #974. Modified: haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/BarMenuTitle.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -86,7 +86,7 @@ { BMenu *menu = Menu(); BRect frame(Frame()); - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = menu->ViewColor(); rgb_color dark = tint_color(menuColor, B_DARKEN_1_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); rgb_color black = {0, 0, 0, 255}; Modified: haiku/trunk/src/apps/deskbar/BarView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BarView.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/BarView.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -131,8 +131,8 @@ { BRect bounds(Bounds()); - rgb_color hilite = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT); - rgb_color light = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_LIGHTEN_2_TINT); + rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT); + rgb_color light = tint_color(ViewColor(), B_LIGHTEN_2_TINT); SetHighColor(hilite); if (AcrossTop()) Modified: haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/CalendarMenuItem.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -132,7 +132,7 @@ Menu()->DrawString(text, point); if (today) { - Menu()->SetLowColor(ui_color(B_MENU_BACKGROUND_COLOR)); + Menu()->SetLowColor(Menu()->ViewColor()); Menu()->SetFont(be_plain_font); } Modified: haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -659,7 +659,7 @@ TExpandoMenuBar::DrawBackground(BRect) { BRect bounds(Bounds()); - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = ViewColor(); rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT); rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT); rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT); Modified: haiku/trunk/src/apps/deskbar/StatusView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/StatusView.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/StatusView.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -325,7 +325,7 @@ void TReplicantTray::Draw(BRect) { - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = ViewColor(); rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); @@ -1441,7 +1441,7 @@ void TDragRegion::Draw(BRect) { - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = ViewColor(); rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT); rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT); rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT); @@ -1479,7 +1479,7 @@ void TDragRegion::DrawDragRegion() { - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = ViewColor(); rgb_color menuHilite = tint_color(menuColor, B_HIGHLIGHT_BACKGROUND_TINT); rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); Modified: haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -220,7 +220,7 @@ BRect frame(Frame()); BMenu *menu = Menu(); menu->PushState(); - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = menu->ViewColor(); // if not selected or being tracked on, fill with gray TBarView *barview = (static_cast(be_app))->BarView(); @@ -413,9 +413,10 @@ label = Label(); TBarView *barview = (static_cast(be_app))->BarView(); - bool canHandle = !barview->Dragging() || barview->AppCanHandleTypes(Signature()); + bool canHandle = !barview->Dragging() + || barview->AppCanHandleTypes(Signature()); if (IsSelected() && IsEnabled() && canHandle) - menu->SetLowColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), + menu->SetLowColor(tint_color(menu->ViewColor(), B_HIGHLIGHT_BACKGROUND_TINT)); else menu->SetLowColor(menu->ViewColor()); Modified: haiku/trunk/src/apps/deskbar/WindowMenuItem.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/WindowMenuItem.cpp 2008-10-13 12:34:44 UTC (rev 28029) +++ haiku/trunk/src/apps/deskbar/WindowMenuItem.cpp 2008-10-13 12:40:07 UTC (rev 28030) @@ -171,7 +171,7 @@ TWindowMenuItem::Draw() { if (fExpanded) { - rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR); + rgb_color menuColor = Menu()->ViewColor(); BRect frame(Frame()); BMenu *menu = Menu(); From mmu_man at mail.berlios.de Mon Oct 13 14:56:18 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 14:56:18 +0200 Subject: [Haiku-commits] r28031 - in haiku/trunk: headers/private/kernel/arch/m68k src/system/kernel/arch/m68k src/system/kernel/platform/atari_m68k Message-ID: <200810131256.m9DCuIDY027438@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 14:56:16 +0200 (Mon, 13 Oct 2008) New Revision: 28031 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28031&view=rev Modified: haiku/trunk/headers/private/kernel/arch/m68k/arch_cpu.h haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp Log: - cleanup - remove dead ppc code - add support for probing hardware registers the way linux does (early, hook with VBR to trap faults) - detect MFPs this way. Modified: haiku/trunk/headers/private/kernel/arch/m68k/arch_cpu.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/m68k/arch_cpu.h 2008-10-13 12:40:07 UTC (rev 28030) +++ haiku/trunk/headers/private/kernel/arch/m68k/arch_cpu.h 2008-10-13 12:56:16 UTC (rev 28031) @@ -436,6 +436,10 @@ extern bool m68k_set_fault_handler(addr_t *handlerLocation, addr_t handler) __attribute__((noinline)); +extern bool m68k_is_hw_register_readable(addr_t address); +extern bool m68k_is_hw_register_writable(addr_t address, uint16 value); + // defined in kernel: arch/m68k/cpu_asm.S + #ifdef __cplusplus } #endif Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S =================================================================== --- haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S 2008-10-13 12:40:07 UTC (rev 28030) +++ haiku/trunk/src/system/kernel/arch/m68k/arch_cpu_asm.S 2008-10-13 12:56:16 UTC (rev 28031) @@ -7,173 +7,83 @@ .text -#if 0 /* PPC stuff ahead... */ -/* uint32 get_sdr1(void); - */ -FUNCTION(get_sdr1): - mfsdr1 %r3 - blr +.cpu 68020 -/* void set_sdr1(uint32 value); - * r3 +/* + * Those two probe hardware register for presence, trapping bus errors. + * inspired by the Linux version, cf. + * http://lxr.linux.no/linux+v2.6.27/arch/m68k/mm/hwtest.c + * + * though I'm not sure why the tests are on words only. + * Some regs are bytes only and the even byte is unmapped... + * but probably ignored. */ -FUNCTION(set_sdr1): - mtsdr1 %r3 - blr -/* uint32 get_sr(void *virtualAddress); - * r3 +/* extern bool m68k_is_hw_register_readable(addr_t address); */ -FUNCTION(get_sr): - mfsrin %r3, %r3 - blr +FUNCTION(m68k_is_hw_register_readable): + /* a1: saved_vbr */ + /* save sp */ + move.l %sp,saved_sp + /* set our fault vector in the table */ + move.l #trap_fault_r,fault_vector -/* void set_sr(void *virtualAddress, uint32 value); - * r3 r4 - */ -FUNCTION(set_sr): - mtsrin %r4, %r3 - blr + /* swap our table in */ + movec %vbr,%a1 + move.l #temp_vectors,%a0 + movec %a0,%vbr -/* uint32 get_msr(void); - */ -FUNCTION(get_msr): - mfmsr %r3 - blr + /* attempt the access */ + move.l 4(%sp),%a0 + moveq #0,%d0 + move.w (%a0),%d1 -/* uint32 set_msr(uint32 value); - * r3 - */ -FUNCTION(set_msr): - mtmsr %r3 - blr + nop /* flush the pipeline */ + moveq #1,%d0 +trap_fault_r: + /* restore */ + movec %a1,%vbr + move.l saved_sp,%sp + rts +FUNCTION_END(m68k_is_hw_register_readable) -/* uint32 get_pvr(void); - */ -FUNCTION(get_pvr): - mfpvr %r3 - blr - -#define get_ibat(num) \ - mfibatu %r4, num; \ - stw %r4, 0(%r3); \ - mfibatl %r4, num; \ - stw %r4, 4(%r3); \ - -#define set_ibat(num); \ - lwz %r4, 0(%r3); \ - mtibatu num, %r4; \ - lwz %r4, 4(%r3); \ - mtibatl num, %r4; - -/* void get_ibat0-3(block_address_translation *bat); - * r3 +/* extern bool m68k_is_hw_register_writable(addr_t address, uint32 value); */ -FUNCTION(get_ibat0): - get_ibat(0) - blr -FUNCTION(get_ibat1): - get_ibat(1) - blr -FUNCTION(get_ibat2): - get_ibat(2) - blr -FUNCTION(get_ibat3): - get_ibat(3) - blr +FUNCTION(m68k_is_hw_register_writable): + /* a1: saved_vbr */ + /* save sp */ + move.l %sp,saved_sp + /* set our fault vector in the table */ + move.l #trap_fault_w,fault_vector -/* void set_ibat0-3(block_address_translation *bat); - * r3 - */ -FUNCTION(set_ibat0): - set_ibat(0) - blr -FUNCTION(set_ibat1): - set_ibat(1) - blr -FUNCTION(set_ibat2): - set_ibat(2) - blr -FUNCTION(set_ibat3): - set_ibat(3) - blr + /* swap our table in */ + movec %vbr,%a1 + move.l #temp_vectors,%a0 + movec %a0,%vbr -/* void reset_ibats(void) - */ -FUNCTION(reset_ibats): - li %r3, 0 - mtibatu 0, %r3 - mtibatl 0, %r3 - mtibatu 1, %r3 - mtibatl 1, %r3 - mtibatu 2, %r3 - mtibatl 2, %r3 - mtibatu 3, %r3 - mtibatl 3, %r3 - blr + /* attempt the access */ + move.l 4(%sp),%a0 + move.l 8(%sp),%d1 + moveq #0,%d0 + move.w %d1,(%a0) -#define get_dbat(num) \ - mfdbatu %r4, num; \ - stw %r4, 0(%r3); \ - mfdbatl %r4, num; \ - stw %r4, 4(%r3); + nop /* flush the pipeline */ + moveq #1,%d0 +trap_fault_w: + /* restore */ + movec %a1,%vbr + move.l saved_sp,%sp + rts +FUNCTION_END(m68k_is_hw_register_writable) -#define set_dbat(num) \ - lwz %r4, 0(%r3); \ - mtdbatu num, %r4; \ - lwz %r4, 4(%r3); \ - mtdbatl num, %r4; +/* scratch data for the 2 functions above */ +saved_sp: + .long 0 +temp_vectors: + .long 0 /* reset sp */ + .long 0 /* reset pc */ +fault_vector: + .long 0 /* fault */ -/* void get_dbat0-3(block_address_translation *bat); - * r3 - */ -FUNCTION(get_dbat0): - get_dbat(0) - blr -FUNCTION(get_dbat1): - get_dbat(1) - blr -FUNCTION(get_dbat2): - get_dbat(2) - blr -FUNCTION(get_dbat3): - get_dbat(3) - blr -/* void set_dbat0-3(block_address_translation *bat); - * r3 - */ -FUNCTION(set_dbat0): - set_dbat(0) - blr -FUNCTION(set_dbat1): - set_dbat(1) - blr -FUNCTION(set_dbat2): - set_dbat(2) - blr -FUNCTION(set_dbat3): - set_dbat(3) - blr - -/* void reset_dbats(void) - */ -FUNCTION(reset_dbats): - li %r3, 0 - mtdbatu 0, %r3 - mtdbatl 0, %r3 - mtdbatu 1, %r3 - mtdbatl 1, %r3 - mtdbatu 2, %r3 - mtdbatl 2, %r3 - mtdbatu 3, %r3 - mtdbatl 3, %r3 - blr - -/* void __eieio(void) - */ -FUNCTION(__eieio): - eieio - blr -#endif Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp =================================================================== --- haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-13 12:40:07 UTC (rev 28030) +++ haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp 2008-10-13 12:56:16 UTC (rev 28031) @@ -85,6 +85,9 @@ uint32 Base() const { return fBase; }; int Vector() const { return fVector; }; + uint8 ReadReg(uint32 reg) { return in8(fBase + reg); }; + void WriteReg(uint32 reg, uint8 v) { out8(fBase + reg, v); }; + void EnableIOInterrupt(int irq); void DisableIOInterrupt(int irq); bool AcknowledgeIOInterrupt(int irq); @@ -261,6 +264,7 @@ fMFP[0] = NULL; fMFP[1] = NULL; + // initialize ARAnyM NatFeatures nfGetID = kernelArgs->arch_args.plat_args.atari.nat_feat.nf_get_id; nfCall = @@ -268,6 +272,14 @@ nfPage = (char *) kernelArgs->arch_args.plat_args.atari.nat_feat.nf_page; + // probe for hardware + if (m68k_is_hw_register_readable(MFP0_BASE)) + fMFP[0] = new(sMFP0Buffer) M68KAtari::MFP(MFP0_BASE, MFP0_VECTOR_BASE); + else + panic("You MUST have an ST MFP! Wait, is that *really* an Atari ???"); + if (m68k_is_hw_register_readable(MFP1_BASE)) + fMFP[1] = new(sMFP1Buffer) M68KAtari::MFP(MFP1_BASE, MFP1_VECTOR_BASE); + //} return B_OK; } @@ -304,10 +316,6 @@ status_t M68KAtari::InitPIC(struct kernel_args *kernelArgs) { - fMFP[0] = new(sMFP0Buffer) M68KAtari::MFP(MFP0_BASE, MFP0_VECTOR_BASE); - //if (kernelArgs->arch_args.machine == /*TT*/) { - fMFP[1] = new(sMFP1Buffer) M68KAtari::MFP(MFP1_BASE, MFP1_VECTOR_BASE); - //} return B_NO_INIT; } @@ -326,7 +334,7 @@ M68KAtari::InitTimer(struct kernel_args *kernelArgs) { - out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it + fMFP[0]->WriteReg(MFP_TACR, 0); // stop it install_io_interrupt_handler(fMFP[0]->Vector()+13, &MFPTimerInterrupt, fMFP[0], 0); return B_OK; } @@ -547,15 +555,15 @@ { uint8 counts = (uint8)(timeout & 0x0ff); //XXX: SCALE - out8(fMFP[0]->Base() + MFP_TADR, counts); - out8(fMFP[0]->Base() + MFP_TACR, 0x01); // delay mode, device by 4 + fMFP[0]->WriteReg(MFP_TADR, counts); + fMFP[0]->WriteReg(MFP_TACR, 0x01); // delay mode, device by 4 } void M68KAtari::ClearHardwareTimer(void) { - out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it + fMFP[0]->WriteReg(MFP_TACR, 0); // stop it } From axeld at mail.berlios.de Mon Oct 13 15:10:36 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 15:10:36 +0200 Subject: [Haiku-commits] r28032 - haiku/trunk/src/add-ons/kernel/debugger/demangle Message-ID: <200810131310.m9DDAaY9029718@sheep.berlios.de> Author: axeld Date: 2008-10-13 15:10:35 +0200 (Mon, 13 Oct 2008) New Revision: 28032 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28032&view=rev Modified: haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp Log: * Symbols with templates are completely ignored for now (ie. they won't confuse the demangler anymore). * Functions with leading "__" won't confuse the demangler anymore either. * Added a maximum argument count of 32 to reduce the risk of endless loops. * Added protection against recursively calling get_next_argument_internal() more than once. * Added detection for floats, and doubles (long doubles will currently make it reject the symbol). Modified: haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp 2008-10-13 12:56:16 UTC (rev 28031) +++ haiku/trunk/src/add-ons/kernel/debugger/demangle/gcc2.cpp 2008-10-13 13:10:35 UTC (rev 28032) @@ -39,6 +39,10 @@ ignore_qualifiers(&arg); if (arg[0] == 'c') return B_STRING_TYPE; + if (arg[0] == 't') { + // TODO: templates are not yet supported + return 0; + } return type == 'P' ? B_POINTER_TYPE : B_REF_TYPE; case 'x': @@ -76,6 +80,19 @@ } break; + case 'f': + return B_FLOAT_TYPE; + case 'd': + length = sizeof(double); + return B_DOUBLE_TYPE; + case 'r': + // TODO: is "long double" supported under Haiku at all? + return 0; + + case 't': + // TODO: templates are not yet supported + return 0; + default: return B_ANY_TYPE; } @@ -235,70 +252,48 @@ if (name == NULL) return NULL; - const char* mangled = strstr(name, "__"); + // search '__' starting from the end, don't accept them at the start + size_t pos = strlen(name) - 1; + const char* mangled = NULL; + + while (pos > 1) { + if (name[pos] == '_') { + if (name[pos - 1] == '_') { + mangled = name + pos + 1; + break; + } else + pos--; + } + pos--; + } + if (mangled == NULL) return NULL; + if (mangled[0] == 'H') { + // TODO: we don't support templates yet + return NULL; + } + if (_symbolLength != NULL) - *_symbolLength = mangled - name; + *_symbolLength = pos - 1; - if (mangled[2] == 'F') { + if (mangled[0] == 'F') { if (_symbolType != NULL) *_symbolType = TYPE_FUNCTION; - return mangled + 3; + return mangled + 1; } if (_symbolType != NULL) *_symbolType = TYPE_METHOD; - return mangled + 2; + return mangled; } - -// #pragma mark - - - -const char* -demangle_symbol(const char* name, char* buffer, size_t bufferSize, - bool* _isObjectMethod) +static status_t +get_next_argument_internal(uint32* _cookie, const char* symbol, char* name, + size_t nameSize, int32* _type, size_t* _argumentLength, bool repeating) { - size_t nameLength; - int32 type; - const char* mangled = mangled_start(name, &nameLength, &type); - if (mangled == NULL) - return NULL; - - if (_isObjectMethod != NULL) { - // we can only guess with GCC2 mangling - *_isObjectMethod = type == TYPE_METHOD; - } - - const char* namespaceStart = mangled; - int32 namespaces = count_namespaces(&namespaceStart); - - buffer[0] = '\0'; - - while (namespaces-- > 0) { - if (!isdigit(namespaceStart[0])) - break; - - uint32 length = strtoul(namespaceStart, (char**)&namespaceStart, 10); - uint32 max = strlen(buffer) + length + 1; - strlcat(buffer, namespaceStart, min_c(max, bufferSize)); - strlcat(buffer, "::", bufferSize); - namespaceStart += length; - } - - size_t max = strlen(buffer) + nameLength + 1; - strlcat(buffer, name, min_c(max, bufferSize)); - return buffer; -} - - -status_t -get_next_argument(uint32* _cookie, const char* symbol, char* name, - size_t nameSize, int32* _type, size_t* _argumentLength) -{ const char* mangled = mangled_start(symbol, NULL, NULL); if (mangled == NULL) return B_BAD_VALUE; @@ -310,6 +305,9 @@ return B_ENTRY_NOT_FOUND; uint32 current = *_cookie; + if (current > 32) + return B_TOO_MANY_ARGS; + for (uint32 i = 0; i < current; i++) { arg = next_argument(arg); if (arg != NULL && arg[0] == 'N') { @@ -317,9 +315,12 @@ uint32 index; uint32 count = parse_repeats(&arg, index); if (current <= i + count) { + if (repeating) + return B_LINK_LIMIT; + // it's a repeat case - status_t status = get_next_argument(&index, symbol, name, - nameSize, _type, _argumentLength); + status_t status = get_next_argument_internal(&index, symbol, name, + nameSize, _type, _argumentLength, true); if (status == B_OK) (*_cookie)++; return status; @@ -334,10 +335,13 @@ if (arg[0] == 'T') { // duplicate argument + if (repeating) + return B_LINK_LIMIT; + arg++; uint32 index = parse_number(&arg, false); - status_t status = get_next_argument(&index, symbol, name, - nameSize, _type, _argumentLength); + status_t status = get_next_argument_internal(&index, symbol, name, + nameSize, _type, _argumentLength, true); if (status == B_OK) (*_cookie)++; return status; @@ -347,6 +351,9 @@ size_t argumentLength; int32 type = argument_type(arg, argumentLength); + if (type == 0) + return B_NOT_SUPPORTED; + if (_type != NULL) *_type = type; if (_argumentLength != NULL) @@ -359,6 +366,55 @@ } +// #pragma mark - + + +const char* +demangle_symbol(const char* name, char* buffer, size_t bufferSize, + bool* _isObjectMethod) +{ + size_t nameLength; + int32 type; + const char* mangled = mangled_start(name, &nameLength, &type); + if (mangled == NULL) + return NULL; + + if (_isObjectMethod != NULL) { + // we can only guess with GCC2 mangling + *_isObjectMethod = type == TYPE_METHOD; + } + + const char* namespaceStart = mangled; + int32 namespaces = count_namespaces(&namespaceStart); + + buffer[0] = '\0'; + + while (namespaces-- > 0) { + if (!isdigit(namespaceStart[0])) + break; + + uint32 length = strtoul(namespaceStart, (char**)&namespaceStart, 10); + uint32 max = strlen(buffer) + length + 1; + strlcat(buffer, namespaceStart, min_c(max, bufferSize)); + strlcat(buffer, "::", bufferSize); + namespaceStart += length; + } + + size_t max = strlen(buffer) + nameLength + 1; + strlcat(buffer, name, min_c(max, bufferSize)); + return buffer; +} + + +status_t +get_next_argument(uint32* _cookie, const char* symbol, char* name, + size_t nameSize, int32* _type, size_t* _argumentLength) +{ + return get_next_argument_internal(_cookie, symbol, name, nameSize, _type, + _argumentLength, false); +} + + static status_t std_ops(int32 op, ...) { From axeld at mail.berlios.de Mon Oct 13 15:38:02 2008 From: axeld at mail.berlios.de (axeld at BerliOS) Date: Mon, 13 Oct 2008 15:38:02 +0200 Subject: [Haiku-commits] r28033 - haiku/trunk/src/system/libroot/os Message-ID: <200810131338.m9DDc2PT001051@sheep.berlios.de> Author: axeld Date: 2008-10-13 15:38:01 +0200 (Mon, 13 Oct 2008) New Revision: 28033 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28033&view=rev Modified: haiku/trunk/src/system/libroot/os/driver_settings.c Log: Fixed two problems recently introduced by korli and found by aldeck: * When invalidating unused settings, we should remove the handle from the list before freeing it, or else the settings list will be corrupted. * We should protect the safemode settings against being removed, or else they won't be availabe anymore after we mounted the boot device. Modified: haiku/trunk/src/system/libroot/os/driver_settings.c =================================================================== --- haiku/trunk/src/system/libroot/os/driver_settings.c 2008-10-13 13:10:35 UTC (rev 28032) +++ haiku/trunk/src/system/libroot/os/driver_settings.c 2008-10-13 13:38:01 UTC (rev 28033) @@ -646,9 +646,15 @@ strlcpy(handle->name, settings->name, sizeof(handle->name)); handle->magic = 0; - handle->ref_count = 0; - // this triggers parsing the settings when they are actually used + + if (!strcmp(handle->name, B_SAFEMODE_DRIVER_SETTINGS)) { + // These settings cannot be reloaded, so we better don't through + // them away. + handle->ref_count = 1; + } else + handle->ref_count = 0; + list_add_item(&sHandles, handle); settings = settings->next; @@ -700,7 +706,9 @@ mutex_lock(&sLock); handle = find_driver_settings(driverName); if (handle != NULL && handle->ref_count == 0 && gBootDevice > 0) { - // an handle with a zero ref_count should be unloaded if /boot is available + // A handle with a zero ref_count should be unloaded if /boot is + // available. + list_remove_link(&handle->link); free_settings(handle); } else if (handle != NULL) { handle->ref_count++; From korli at users.berlios.de Mon Oct 13 15:42:43 2008 From: korli at users.berlios.de (=?ISO-8859-1?Q?J=E9r=F4me_Duval?=) Date: Mon, 13 Oct 2008 15:42:43 +0200 Subject: [Haiku-commits] r28033 - haiku/trunk/src/system/libroot/os In-Reply-To: <200810131338.m9DDc2PT001051@sheep.berlios.de> References: <200810131338.m9DDc2PT001051@sheep.berlios.de> Message-ID: Hi Axel, 2008/10/13 axeld at BerliOS > Fixed two problems recently introduced by korli and found by aldeck: > * When invalidating unused settings, we should remove the handle from the > list > before freeing it, or else the settings list will be corrupted. > * We should protect the safemode settings against being removed, or else > they > won't be availabe anymore after we mounted the boot device. > > Thanks! Didn't I say it was to be reviewed ? :) Bye, J?r?me -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackburton at mail.berlios.de Mon Oct 13 15:55:55 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 13 Oct 2008 15:55:55 +0200 Subject: [Haiku-commits] r28034 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810131355.m9DDttEw003005@sheep.berlios.de> Author: jackburton Date: 2008-10-13 15:55:53 +0200 (Mon, 13 Oct 2008) New Revision: 28034 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28034&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: worked on the acpi namespace dumper: I kept the recursive implementation of the function, but I had to use a different thread, then, to read the data, without smashing the buffer passed by read(). It still doesnt' work correctly 100% (because I obviously made some stupid mistake, please review), but at least 'cat /dev/acpi/namespace' doesn't KDL anymore, and it even shows something. Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 13:38:01 UTC (rev 28033) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 13:55:53 UTC (rev 28034) @@ -11,16 +11,22 @@ #include "acpi_priv.h" +#include typedef struct acpi_ns_device_info { device_node *node; acpi_root_info *acpi; void *acpi_cookie; + thread_id thread; + struct ring_buffer *buffer; + sem_id write_sem; + sem_id sync_sem; } acpi_ns_device_info; + static void -dump_acpi_namespace(acpi_ns_device_info *device, char *root, void *buf, size_t* num_bytes, int indenting) +dump_acpi_namespace(acpi_ns_device_info *device, char *root, int indenting) { char result[255]; char output[255]; @@ -29,7 +35,7 @@ int i, depth; uint32 type; void *counter = NULL; - + size_t written = 0; hid[8] = '\0'; tabs[0] = '\0'; for (i = 0; i < indenting; i++) { @@ -38,7 +44,7 @@ sprintf(tabs, "%s|--- ", tabs); depth = sizeof(char) * 5 * indenting + sizeof(char); // index into result where the device name will be. - dprintf("acpi_ns_dump: recursing from %s, depth %d\n", root, depth); + //dprintf("acpi_ns_dump: recursing from %s, depth %d\n", root, depth); while (device->acpi->get_next_entry(ACPI_TYPE_ANY, root, result, 255, &counter) == B_OK) { type = device->acpi->get_object_type(result); sprintf(output, "%s%s", tabs, result + depth); @@ -89,17 +95,33 @@ sprintf(output, "%s BUFFER_FIELD", output); break; } - // TODO: This is obviously broken! - // We should respect "*num_bytes", otherwise - // we could have a buffer overflow. See ticket #2786 - sprintf((buf + *num_bytes), "%s", output); - *num_bytes += strlen(output); - - dump_acpi_namespace(device, result, buf, num_bytes, indenting + 1); + written = 0; + if (acquire_sem(device->sync_sem) == B_OK) { + //dprintf("writing %ld bytes to the buffer.\n", strlen(output)); + written = ring_buffer_write(device->buffer, output, strlen(output)); + //dprintf("written %ld bytes\n", written); + release_sem(device->sync_sem); + } + + if (written > 0) + release_sem_etc(device->write_sem, 1, 0); + + dump_acpi_namespace(device, result, indenting + 1); } +// dprintf("dump_acpi_namespace() returns\n"); } +static int32 +acpi_namespace_dump(void *arg) +{ + acpi_ns_device_info *device = (acpi_ns_device_info*)(arg); + dump_acpi_namespace(device, "\\", 0); + release_sem(device->write_sem); + return 0; +} + + /* ---------- acpi_namespace_open - handle open() calls ----- */ @@ -108,9 +130,31 @@ acpi_namespace_open(void *_cookie, const char* path, int flags, void** cookie) { acpi_ns_device_info *device = (acpi_ns_device_info *)_cookie; + dprintf("\nacpi_ns_dump: device_open\n"); + *cookie = device; - + + device->buffer = create_ring_buffer(2048); + + device->write_sem = create_sem(0, "sem"); + if (device->write_sem < 0) + return device->write_sem; + + device->sync_sem = create_sem(1, "sync sem"); + if (device->sync_sem < 0) { + delete_sem(device->write_sem); + return device->sync_sem; + } + + device->thread = spawn_kernel_thread(acpi_namespace_dump, "acpi dumper", + B_NORMAL_PRIORITY, device); + if (device->thread < 0) { + delete_sem(device->write_sem); + delete_sem(device->sync_sem); + return device->thread; + } + resume_thread(device->thread); return B_OK; } @@ -122,22 +166,31 @@ acpi_namespace_read(void *_cookie, off_t position, void *buf, size_t* num_bytes) { acpi_ns_device_info *device = (acpi_ns_device_info *)_cookie; - size_t bytes = 0; - dprintf("acpi_namespace_read(cookie: %p, position: %ld, buffer: %p, size: %ld)\n", - _cookie, position, buf, *num_bytes); - if (position == 0) { // First read - dump_acpi_namespace(device, "\\", buf, &bytes, 0); - if (bytes <= *num_bytes) { - *num_bytes = bytes; - dprintf("acpi_ns_dump: read %lu bytes\n", *num_bytes); - } else { - *num_bytes = 0; - return B_IO_ERROR; + size_t bytesRead = -1; + size_t bytesToRead = 0; + status_t status; + dprintf("acpi_namespace_read(cookie: %p, position: %ld, buffer: %p, size: %ld)\n", + _cookie, position, buf, *num_bytes); + + status = acquire_sem_etc(device->write_sem, 1, 0, 0); + if (status == B_OK) { + if (acquire_sem(device->sync_sem) == B_OK) { + bytesToRead = ring_buffer_readable(device->buffer); + bytesRead = ring_buffer_read(device->buffer, buf, bytesToRead); + release_sem(device->sync_sem); } - } else { + } + + dprintf("semaphore acquired: %s\n", strerror(status)); + if (bytesRead < 0) { *num_bytes = 0; + dprintf("returning %s\n", strerror(bytesRead)); + return bytesRead; } + + *num_bytes = bytesRead; + dprintf("%ld bytes read\n", bytesRead); return B_OK; } @@ -174,7 +227,15 @@ static status_t acpi_namespace_close(void* cookie) { + status_t status; dprintf("acpi_ns_dump: device_close\n"); + acpi_ns_device_info *device = (acpi_ns_device_info *)cookie; + + delete_sem(device->write_sem); + delete_sem(device->sync_sem); + wait_for_thread(device->thread, &status); + + delete_ring_buffer(device->buffer); return B_OK; } @@ -187,7 +248,7 @@ acpi_namespace_free(void* cookie) { dprintf("acpi_ns_dump: device_free\n"); - + return B_OK; } @@ -213,7 +274,7 @@ return err; } - *cookie = device; + *cookie = device; return B_OK; } From mmu_man at mail.berlios.de Mon Oct 13 15:55:58 2008 From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de) Date: Mon, 13 Oct 2008 15:55:58 +0200 Subject: [Haiku-commits] r28035 - haiku/trunk/headers/private/kernel/arch/m68k Message-ID: <200810131355.m9DDtwLu003027@sheep.berlios.de> Author: mmu_man Date: 2008-10-13 15:55:57 +0200 (Mon, 13 Oct 2008) New Revision: 28035 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28035&view=rev Modified: haiku/trunk/headers/private/kernel/arch/m68k/arch_platform.h Log: ADd platform hooks to read RTC. platform code should mimic the PC CMOS chip. Modified: haiku/trunk/headers/private/kernel/arch/m68k/arch_platform.h =================================================================== --- haiku/trunk/headers/private/kernel/arch/m68k/arch_platform.h 2008-10-13 13:55:53 UTC (rev 28034) +++ haiku/trunk/headers/private/kernel/arch/m68k/arch_platform.h 2008-10-13 13:55:57 UTC (rev 28035) @@ -48,6 +48,9 @@ virtual void DisableIOInterrupt(int irq) = 0; virtual bool AcknowledgeIOInterrupt(int irq) = 0; + // mimic the PC CMOS + virtual uint8 ReadRTCReg(uint8 reg) = 0; + virtual void WriteRTCReg(uint8 reg, uint8 val) = 0; virtual void SetHardwareRTC(uint32 seconds) = 0; virtual uint32 GetHardwareRTC() = 0; From axeld at pinc-software.de Mon Oct 13 16:03:16 2008 From: axeld at pinc-software.de (=?iso-8859-1?q?=41=78=65=6c=20=44=f6=72=66=6c=65=72?=) Date: Mon, 13 Oct 2008 16:03:16 +0200 (MEST) Subject: [Haiku-commits] r28033 - haiku/trunk/src/system/libroot/os Message-ID: <200810131403.m9DE3GKx005360@post.webmailer.de> J?r?me wrote: > Thanks! Didn't I say it was to be reviewed ? :) I haven't read the commit messages yet, as I currently have to use webmail :-) Bye, Axel. From jackburton at mail.berlios.de Mon Oct 13 16:24:20 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 13 Oct 2008 16:24:20 +0200 Subject: [Haiku-commits] r28036 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810131424.m9DEOKI3006574@sheep.berlios.de> Author: jackburton Date: 2008-10-13 16:24:19 +0200 (Mon, 13 Oct 2008) New Revision: 28036 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28036&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: build fix for nongcc4 build Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 13:55:57 UTC (rev 28035) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 14:24:19 UTC (rev 28036) @@ -228,8 +228,9 @@ acpi_namespace_close(void* cookie) { status_t status; + acpi_ns_device_info *device = (acpi_ns_device_info *)cookie; + dprintf("acpi_ns_dump: device_close\n"); - acpi_ns_device_info *device = (acpi_ns_device_info *)cookie; delete_sem(device->write_sem); delete_sem(device->sync_sem); From jackburton at mail.berlios.de Mon Oct 13 16:29:36 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 13 Oct 2008 16:29:36 +0200 Subject: [Haiku-commits] r28037 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810131429.m9DETZ0n006849@sheep.berlios.de> Author: jackburton Date: 2008-10-13 16:29:33 +0200 (Mon, 13 Oct 2008) New Revision: 28037 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28037&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: also add a '\n' character, thanks to Francesco Piccinno for noticing Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 14:24:19 UTC (rev 28036) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 14:29:33 UTC (rev 28037) @@ -95,6 +95,7 @@ sprintf(output, "%s BUFFER_FIELD", output); break; } + strcat(output, "\n"); written = 0; if (acquire_sem(device->sync_sem) == B_OK) { //dprintf("writing %ld bytes to the buffer.\n", strlen(output)); From jackburton at mail.berlios.de Mon Oct 13 16:41:34 2008 From: jackburton at mail.berlios.de (jackburton at mail.berlios.de) Date: Mon, 13 Oct 2008 16:41:34 +0200 Subject: [Haiku-commits] r28038 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi Message-ID: <200810131441.m9DEfYS3007672@sheep.berlios.de> Author: jackburton Date: 2008-10-13 16:41:33 +0200 (Mon, 13 Oct 2008) New Revision: 28038 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28038&view=rev Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c Log: sprintf -> snprintf. Also removed useless dprintf() Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c =================================================================== --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 14:29:33 UTC (rev 28037) +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_ns_dump.c 2008-10-13 14:41:33 UTC (rev 28038) @@ -41,58 +41,59 @@ for (i = 0; i < indenting; i++) { sprintf(tabs, "%s| ", tabs); } - sprintf(tabs, "%s|--- ", tabs); + snprintf(tabs, sizeof(tabs), "%s|--- ", tabs); depth = sizeof(char) * 5 * indenting + sizeof(char); // index into result where the device name will be. //dprintf("acpi_ns_dump: recursing from %s, depth %d\n", root, depth); while (device->acpi->get_next_entry(ACPI_TYPE_ANY, root, result, 255, &counter) == B_OK) { type = device->acpi->get_object_type(result); - sprintf(output, "%s%s", tabs, result + depth); + snprintf(output, sizeof(output), "%s%s", tabs, result + depth); switch(type) { - case ACPI_TYPE_ANY: + case ACPI_TYPE_ANY: + default: break; case ACPI_TYPE_INTEGER: - sprintf(output, "%s INTEGER", output); + snprintf(output, sizeof(output), "%s INTEGER", output); break; case ACPI_TYPE_STRING: - sprintf(output, "%s STRING", output); + snprintf(output, sizeof(output), "%s STRING", output); break; case ACPI_TYPE_BUFFER: - sprintf(output, "%s BUFFER", output); + snprintf(output, sizeof(output), "%s BUFFER", output); break; case ACPI_TYPE_PACKAGE: - sprintf(output, "%s PACKAGE", output); + snprintf(output, sizeof(output), "%s PACKAGE", output); break; case ACPI_TYPE_FIELD_UNIT: - sprintf(output, "%s FIELD UNIT", output); + snprintf(output, sizeof(output), "%s FIELD UNIT", output); break; case ACPI_TYPE_DEVICE: device->acpi->get_device_hid(result, hid); - sprintf(output, "%s DEVICE (%s)", output, hid); + snprintf(output, sizeof(output), "%s DEVICE (%s)", output, hid); break; case ACPI_TYPE_EVENT: - sprintf(output, "%s EVENT", output); + snprintf(output, sizeof(output), "%s EVENT", output); break; case ACPI_TYPE_METHOD: - sprintf(output, "%s METHOD", output); + snprintf(output, sizeof(output), "%s METHOD", output); break; case ACPI_TYPE_MUTEX: - sprintf(output, "%s MUTEX", output); + snprintf(output, sizeof(output), "%s MUTEX", output); break; case ACPI_TYPE_REGION: - sprintf(output, "%s REGION", output); + snprintf(output, sizeof(output), "%s REGION", output); break; case ACPI_TYPE_POWER: - sprintf(output, "%s POWER", output); + snprintf(output, sizeof(output), "%s POWER", output); break; case ACPI_TYPE_PROCESSOR: - sprintf(output, "%s PROCESSOR", output); + snprintf(output, sizeof(output), "%s PROCESSOR", output); break; case ACPI_TYPE_THERMAL: - sprintf(output, "%s THERMAL", output); + snprintf(output, sizeof(output), "%s THERMAL", output); break; case ACPI_TYPE_BUFFER_FIELD: - sprintf(output, "%s BUFFER_FIELD", output); + snprintf(output, sizeof(output), "%s BUFFER_FIELD", output); break; } strcat(output, "\n"); @@ -109,7 +110,6 @@ dump_acpi_namespace(device, result, indenting + 1); } -// dprintf("dump_acpi_namespace() returns\n"); } @@ -170,7 +170,7 @@ size_t bytesRead = -1; size_t bytesToRead = 0; status_t status; - dprintf("acpi_namespace_read(cookie: %p, position: %ld, buffer: %p, size: %ld)\n", + dprintf("acpi_namespace_read(cookie: %p, position: %lld, buffer: %p, size: %ld)\n", _cookie, position, buf, *num_bytes); status = acquire_sem_etc(device->write_sem, 1, 0, 0); @@ -182,16 +182,13 @@ } } - dprintf("semaphore acquired: %s\n", strerror(status)); if (bytesRead < 0) { *num_bytes = 0; - dprintf("returning %s\n", strerror(bytesRead)); return bytesRead; } *num_bytes = bytesRead; - dprintf("%ld bytes read\n", bytesRead); return B_OK; } From zooey at mail.berlios.de Mon Oct 13 17:30:25 2008 From: zooey at mail.berlios.de (zooey at BerliOS) Date: Mon, 13 Oct 2008 17:30:25 +0200 Subject: [Haiku-commits] r28039 - haiku/trunk/src/kits/interface Message-ID: <200810131530.m9DFUPCP014222@sheep.berlios.de> Author: zooey Date: 2008-10-13 17:30:24 +0200 (Mon, 13 Oct 2008) New Revision: 28039 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28039&view=rev Modified: haiku/trunk/src/kits/interface/PicturePlayer.cpp Log: * fixed build in DEBUG mode Modified: haiku/trunk/src/kits/interface/PicturePlayer.cpp =================================================================== --- haiku/trunk/src/kits/interface/PicturePlayer.cpp 2008-10-13 14:41:33 UTC (rev 28038) +++ haiku/trunk/src/kits/interface/PicturePlayer.cpp 2008-10-13 15:30:24 UTC (rev 28039) @@ -51,7 +51,7 @@ } -#if DEBUG +#if DEBUG > 1 static const char * PictureOpToString(int op) { @@ -106,7 +106,7 @@ RETURN_STRING(B_PIC_SET_FONT_SHEAR); RETURN_STRING(B_PIC_SET_FONT_BPP); RETURN_STRING(B_PIC_SET_FONT_FACE); - default: return "Unknown op"; + default: return "Unknown op"; } #undef RETURN_STRING } @@ -162,7 +162,7 @@ fprintf(file, "PicturePlayer: A smaller than needed function table was supplied.\n"); #endif functionTable = dummyTable; - memcpy(functionTable, callBackTable, tableEntries * sizeof(void *)); + memcpy(functionTable, callBackTable, tableEntries * sizeof(void *)); } const char *data = reinterpret_cast(fData); @@ -194,7 +194,7 @@ case B_PIC_STROKE_LINE: { - ((fnc_BPointBPoint)functionTable[2])(userData, + ((fnc_BPointBPoint)functionTable[2])(userData, *reinterpret_cast(data), /* start */ *reinterpret_cast(data + sizeof(BPoint))); /* end */ break; @@ -246,7 +246,7 @@ case B_PIC_STROKE_ARC: { - ((fnc_BPointBPointff)functionTable[9])(userData, + ((fnc_BPointBPointff)functionTable[9])(userData, *reinterpret_cast(data), /* center */ *reinterpret_cast(data + sizeof(BPoint)), /* radii */ *reinterpret_cast(data + 2 * sizeof(BPoint)), /* startTheta */ @@ -285,7 +285,7 @@ case B_PIC_STROKE_POLYGON: { int32 numPoints = *reinterpret_cast(data); - ((fnc_iPBPointb)functionTable[13])(userData, + ((fnc_iPBPointb)functionTable[13])(userData, numPoints, reinterpret_cast(data + sizeof(int32)), /* points */ *reinterpret_cast(data + sizeof(int32) + numPoints * sizeof(BPoint))); /* is-closed */ @@ -294,7 +294,7 @@ case B_PIC_FILL_POLYGON: { - ((fnc_iPBPoint)functionTable[14])(userData, + ((fnc_iPBPoint)functionTable[14])(userData, *reinterpret_cast(data), /* numPoints */ reinterpret_cast(data + sizeof(int32))); /* points */ break; @@ -303,24 +303,24 @@ case B_PIC_STROKE_SHAPE: case B_PIC_FILL_SHAPE: { - const bool stroke = (op == B_PIC_STROKE_SHAPE); + const bool stroke = (op == B_PIC_STROKE_SHAPE); int32 opCount = *reinterpret_cast(data); int32 ptCount = *reinterpret_cast(data + sizeof(int32)); const uint32 *opList = reinterpret_cast(data + 2 * sizeof(int32)); const BPoint *ptList = reinterpret_cast(data + 2 * sizeof(int32) + opCount * sizeof(uint32)); // TODO: remove BShape data copying - BShape shape; + BShape shape; shape.SetData(opCount, ptCount, opList, ptList); const int32 tableIndex = stroke ? 15 : 16; ((fnc_BShape)functionTable[tableIndex])(userData, &shape); break; } - + case B_PIC_DRAW_STRING: { - ((fnc_Pcff)functionTable[17])(userData, + ((fnc_Pcff)functionTable[17])(userData, reinterpret_cast(data + 2 * sizeof(float)), /* string */ *reinterpret_cast(data), /* escapement.space */ *reinterpret_cast(data + sizeof(float))); /* escapement.nonspace */ @@ -348,14 +348,14 @@ *reinterpret_cast(data + sizeof(BPoint))); break; } - + case B_PIC_SET_CLIPPING_RECTS: { // TODO: Not sure if it's compatible with R5's BPicture version const uint32 numRects = *reinterpret_cast(data); const BRect *rects = reinterpret_cast(data + sizeof(uint32)); ((fnc_PBRecti)functionTable[20])(userData, rects, numRects); - + break; } @@ -393,7 +393,7 @@ case B_PIC_ENTER_FONT_STATE: { ((fnc)functionTable[26])(userData); - fontStateBlockSize = size; + fontStateBlockSize = size; break; } @@ -435,14 +435,14 @@ } case B_PIC_SET_FORE_COLOR: - { + { ((fnc_Color)functionTable[33])(userData, *reinterpret_cast(data)); /* color */ break; } case B_PIC_SET_BACK_COLOR: - { + { ((fnc_Color)functionTable[34])(userData, *reinterpret_cast(data)); /* color */ break; @@ -510,7 +510,7 @@ *reinterpret_cast(data)); /* flags */ break; } - + case B_PIC_SET_FONT_SHEAR: { ((fnc_f)functionTable[44])(userData, @@ -537,9 +537,9 @@ break; } - // Skip the already handled block unless it's one of these two, + // Skip the already handled block unless it's one of these two, // since they can contain other nested ops. - if (op != B_PIC_ENTER_STATE_CHANGE && op != B_PIC_ENTER_FONT_STATE) { + if (op != B_PIC_ENTER_STATE_CHANGE && op != B_PIC_ENTER_FONT_STATE) { pos += size; data += size; if (stateBlockSize > 0) @@ -547,24 +547,24 @@ if (fontStateBlockSize > 0) fontStateBlockSize -= size + 6; } - + // call the exit_state_change hook if needed if (stateBlockSize == 0) { ((fnc)functionTable[25])(userData); - stateBlockSize = -1; + stateBlockSize = -1; } - + // call the exit_font_state hook if needed if (fontStateBlockSize == 0) { ((fnc)functionTable[27])(userData); - fontStateBlockSize = -1; + fontStateBlockSize = -1; } #if DEBUG numOps++; #if DEBUG > 1 fprintf(file, "executed in %lld usecs\n", system_time() - startOpTime); #endif -#endif +#endif // TODO: what if too much was read, should we return B_ERROR? } From stippi at mail.berlios.de Mon Oct 13 17:46:00 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 17:46:00 +0200 Subject: [Haiku-commits] r28040 - in haiku/trunk: data/artwork/icons src/data/beos_mime/application Message-ID: <200810131546.m9DFk0fW015819@sheep.berlios.de> Author: stippi Date: 2008-10-13 17:46:00 +0200 (Mon, 13 Oct 2008) New Revision: 28040 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28040&view=rev Added: haiku/trunk/data/artwork/icons/File_Archive_7zip haiku/trunk/src/data/beos_mime/application/x-7z-compressed Log: * zuMi sent a nice icon for 7zip archives. * Added 7zip mime type. (TODO: Add proper recognition rule.) Added: haiku/trunk/data/artwork/icons/File_Archive_7zip =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/File_Archive_7zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/src/data/beos_mime/application/x-7z-compressed =================================================================== --- haiku/trunk/src/data/beos_mime/application/x-7z-compressed 2008-10-13 15:30:24 UTC (rev 28039) +++ haiku/trunk/src/data/beos_mime/application/x-7z-compressed 2008-10-13 15:46:00 UTC (rev 28040) @@ -0,0 +1,51 @@ + +resource(0, "BEOS:TYPE") #'MIMS' "application/x-vnd.Be-meta-mime"; + +resource(1, "META:TYPE") "application/x-7z-compressed"; + +// TODO: Please add a proper rule here, someone who knows. +//resource(2, "META:SNIFF_RULE") "0.40 (\"\\037\\213\")"; + +resource(3, "META:PREF_APP") #'MSIG' "application/x-vnd.haiku-Expander"; + +resource(4, "META:EXTENS") message(234) { + "extensions" = "7zip", + "extensions" = "7z", + "type" = "application/x-7z-compressed" +}; + +resource(6, "META:ICON") #'VICN' array { + $"6E636966080301000005FF020006023CC7EE389BC0BA16573E39B04977C84556" + $"E300FFF8EAFFF5DEAC020006023C96323A4D3FBAFC013D5A974B57A54A022600" + $"983F04FFE6C276020006023A492400000000000040000047000044000000FFEF" + $"CEFFFFD16E02000602BB8A46BA62453C0CE4BD0B7C487ECB4BD08500E1AB36FF" + $"FFEBC0020006043B80000000000000003B80004AC000440000003F4D54690101" + $"0172FFFFFFFFC3DAE5040188110608B2AB445F49C62DC959C521CAC2C755C7C9" + $"C7C0C625CAECC2F2C9BCC48CCC1CC1595F405B3E5943060AEEEA0E234022C1D8" + $"22C0BC22C348B40BC4C7B647C63EB4FBC58EB7DDC715B99EC79CB99FC217BEC1" + $"BCDCBBA1BB96BD24BC34BA49BB0AB905BAECB623BD02B766BBBFB4CABE5B0606" + $"BA0B3EBC76C283B89ABF85B784C0FAB80BBE35B70A392ABB83B808BC45B746BA" + $"98B8F3B992B9F9060AEAEE0EBF8DBD1CC6133FC618C550C8A9C274C7A7C3C7C9" + $"6EC17059C0655ABD825ABEEF5ABC61C969BB91C5DCB9D2C7CDBA87C472B94EC3" + $"3AB910C181BA7DC269B9A3C064BB8A060CEEEEEEC59341C221BE88C3E6BF4B42" + $"BDDABF27BD75BCE0BF91BDFFBE5ABB9DC0EFBA6BC263BA45C4E2BA45C392BA45" + $"C684BA85C84EBD7ACA0EBBD3C92EBF59CB0B44CB67C3C8C8E2C297CA75C4E2C7" + $"6FC5A3C5FFC5CEC314C5D2C490C5CAC1970606BA0B444EBA6BC263BA45C4E2BA" + $"45C392BA45C684BA85C84EBD7ACA0EBBD3C92EBF59CB0B44CB6706076E3BC593" + $"41C3DFC2B9C4ECC16EC2CFC405444ECB67C3C8C8E2C297CA75C4E2C76FC5A3C5" + $"FFC5CEC314C5D2C490C5CAC1970607EE3AC59341C221BE88C3E6BF4B42BDDABF" + $"27BD75BCE0BF91BDFFBE5ABB9DC0EFBA6BC263444EC3DFC2B9C2CFC405C4ECC1" + $"6E0606EE0A234022C1D822C0BC22C348B40BC4C7B647C63EB4FBC58EB7DDC715" + $"B99EC79CB99FC2170606EA0E2340B99FC217BEC1BCDCBBA1BB96BD24BC34BA49" + $"BB0AB905BAECB623BD02B766BBBFB4CABE5B0607BA3BBF8DBD1CC6133FC85BBD" + $"37C775BE3CC91DBC5BC969BB91C5DCB9D2C7CDBA87C472B94EC33AB910C181BA" + $"7DC269B9A3C064BB8A0607BA3BC6133FC618C550C8A9C274C7A7C3C7C96EC170" + $"59C0655ABD825ABEEF5ABC61C969BB91C85BBD37C91DBC5BC775BE3C0408FEBB" + $"3F423A333F36BBD4B9A732392B38393A4F3A4B37C6A0BE0946414B42C093BFD5" + $"3F3838BDDBBE4EBCD5BAEBBED22FBF7308023F383F2E0606F60F3E3022492444" + $"244D245A2255225A225A305A30553049324D324432080441274727432D432F08" + $"044D2951294D2F512F0C0A070100000A0004010203041001178400040A020407" + $"09020A000A0302060B000A050105000A040108000A00010C1815FF0117822004" + $"0A00010D1001178200040A00010E1001178402040A06010E000A01010F1C15FF" + $"01178222040A0001101C15FF0117822204" +}; From stippi at mail.berlios.de Mon Oct 13 17:52:06 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 17:52:06 +0200 Subject: [Haiku-commits] r28041 - in haiku/trunk: data/artwork/icons src/servers/input Message-ID: <200810131552.m9DFq61B016306@sheep.berlios.de> Author: stippi Date: 2008-10-13 17:52:05 +0200 (Mon, 13 Oct 2008) New Revision: 28041 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28041&view=rev Added: haiku/trunk/data/artwork/icons/Server_Input Modified: haiku/trunk/src/servers/input/input_server.rdef Log: Added input_server icon by zuMi. Thanks! Added: haiku/trunk/data/artwork/icons/Server_Input =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/Server_Input ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/servers/input/input_server.rdef =================================================================== --- haiku/trunk/src/servers/input/input_server.rdef 2008-10-13 15:46:00 UTC (rev 28040) +++ haiku/trunk/src/servers/input/input_server.rdef 2008-10-13 15:52:05 UTC (rev 28041) @@ -15,9 +15,33 @@ internal = 0, short_info = "input_server", - long_info = "input_server ?2002-2006 Haiku" + long_info = "input_server ?2002-2008 Haiku" }; +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon array { + $"6E6369660804016E05010200060339A8B53A3D37BF18F73E87E74C12504788C9" + $"00AAB5BE77E9ECF0FFAAB5BE020006033AAE0D382BEDBD010D3FB50F4B0D3246" + $"8219003B5C7377D3DBE0FF3B5C730200060339A8B53A3D37BF18F73E87E74C02" + $"504788C900C8CFD477FFFFFFFFC8CFD402010603387CED38DA2DBA7FD33A2E1C" + $"4A6CD34A7679004A607279F9F9F9FF4A607202030603B400000000000000003D" + $"20004A40004A700000E9ECF07C7C95AAFF394F61020106033A80000000000000" + $"003A80004A800046800000FFFFFF7EFF0606FF9D040407060AEAAF083F3C5845" + $"57495B4859475D495B4C5C4B5A4D564D584E544C544B45593E294E0A043E3A58" + $"44405A264E0A044844444236503A5206032E46463F474244394D3A520605AE00" + $"4246444743474547464648284008044347524C5946454402044A24C57E24C1F8" + $"24422C42B60542B9894A34C1F834C57E34522C52B98952B6050C0A0001003020" + $"1E01178822040A01010130201E01178822040A02010120201E0A030101123F87" + $"7F0000000000003F877F43A5D143E0F201178322040A04010130201E01178422" + $"040A01010230201E01158400040A05010320201E0A00010520201E0A01010412" + $"3FE5413BA1FEBB61DF3FA0804664A5C616A101178400040A060104023FE5413B" + $"A1FEBBA1FE3FE5414670ABC64A300A01010630201E01178400040A0701062020" + $"1E" +}; + +#else // !HAIKU_TARGET_PLATFORM_HAIKU + resource large_icon array { $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -71,3 +95,5 @@ $"FFFF0000000000000011FFFFFFFFFFFF" $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }; + +#endif // !HAIKU_TARGET_PLATFORM_HAIKU From stippi at mail.berlios.de Mon Oct 13 17:54:24 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 17:54:24 +0200 Subject: [Haiku-commits] r28042 - haiku/trunk/data/artwork/icons Message-ID: <200810131554.m9DFsOjO016425@sheep.berlios.de> Author: stippi Date: 2008-10-13 17:54:21 +0200 (Mon, 13 Oct 2008) New Revision: 28042 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28042&view=rev Added: haiku/trunk/data/artwork/icons/App_Expander_3 Log: Variation of the Expander icon with arrow - different color scheme. Added: haiku/trunk/data/artwork/icons/App_Expander_3 =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_Expander_3 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From stippi at mail.berlios.de Mon Oct 13 18:06:01 2008 From: stippi at mail.berlios.de (stippi at BerliOS) Date: Mon, 13 Oct 2008 18:06:01 +0200 Subject: [Haiku-commits] r28043 - in haiku/trunk: data/artwork/icons src/apps/mandelbrot Message-ID: <200810131606.m9DG61E1017586@sheep.berlios.de> Author: stippi Date: 2008-10-13 18:06:00 +0200 (Mon, 13 Oct 2008) New Revision: 28043 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28043&view=rev Added: haiku/trunk/data/artwork/icons/App_Mandelbrot haiku/trunk/data/artwork/icons/App_Mandelbrot_2 Modified: haiku/trunk/src/apps/mandelbrot/Mandelbrot.rdef Log: Meanwhile and zuMi both have send me an icon for the Mandelbrot demo. I have made a new icon which should incorporate the best stuff from both icons. Thanks a lot to both of you! The Mandelbrot_2 icon shows the fractal with the initial color palette that the real Mandelbrot demo will use, but I like zuMi's colors better. Just adding it for reference. Added: haiku/trunk/data/artwork/icons/App_Mandelbrot =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_Mandelbrot ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: haiku/trunk/data/artwork/icons/App_Mandelbrot_2 =================================================================== (Binary files differ) Property changes on: haiku/trunk/data/artwork/icons/App_Mandelbrot_2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: haiku/trunk/src/apps/mandelbrot/Mandelbrot.rdef =================================================================== --- haiku/trunk/src/apps/mandelbrot/Mandelbrot.rdef 2008-10-13 15:54:21 UTC (rev 28042) +++ haiku/trunk/src/apps/mandelbrot/Mandelbrot.rdef 2008-10-13 16:06:00 UTC (rev 28043) @@ -1,5 +1,33 @@ -resource large_icon -{ +#ifdef HAIKU_TARGET_PLATFORM_HAIKU + +resource vector_icon { + $"6E6369660C04006B0500020006023B4FDF3A26DEBE07943F1FB649C6A13E02F4" + $"00F9DAB6FFE6A150020006023B75BB3D9724BF9A803D78F84BB32A477AA100F0" + $"C38EFFDA7905020006023C00CE3D7208BF75413E02AE4BEF0E47CB5800FFC682" + $"FFEDB26D020006023A314B3C4677BF9A803D78F84BF24648E9FD00FFD9ACFFF3" + $"B062020106023DCF153C6C82BACE033C342748000049C00000FF7575FFC20505" + $"020106023DCF153C6C82BACE033C342748000049C000007BFF75FF0EC8050201" + $"06023DCF153C6C82BACE033C342748000049C00000C83636FF79030302000602" + $"36CC96BB7B4D3BA7F536F07C46A8AB49A25A00A76404FF7F4C000200060236EE" + $"F93B80F6BF3E753AB74A4B669742DBD600FDEBD4FFF9DAB603704A1E0E0A0450" + $"5C5C585D5652500A05484A5250584E564648420A0626484D5C4F5B56342E262C" + $"270A044A532C44312C4F38020E3BBD8F3D37BD61BC0DBB0DBD3FBBA0BBA8BB05" + $"BD58B9D239B9D8BCD9B9CEBD0DBAEDBDD4BAEFBDBDBAC3BF9F39BFF3BC33C054" + $"39C1F1BE75C321BD98C287BE90C334BF13C44EBE74C3F5BFD6C4BBBF92C3E7BF" + $"71C3DAC0AEC44F454744494645444244424442473E47C036473BC10BBCA2C207" + $"BD66C0F0BC8DC0DEBBB7C18EBC17C019BB4AC05CBC37C07EBC383F3702052C3B" + $"333E2C3B2E332E33353744354033483749454C3BC213C5F03C4C404E384A0A04" + $"26482A452F2B2C270A042F2B4F3854352C270A044A554D5C54354F380A042648" + $"4D5C4A552A450A042C44312C2F2B2A450A042A454A554A532C440A044D5C4F5B" + $"563454350A042E262C2754355634100A0001001001158400040A010101100117" + $"8400040A0B0101000A0101021001178400040A060103000A080105000A020106" + $"000A030107000A040108000A050109000A0701041001178100040A010104000A" + $"09010A000A09010C000A0A010D000A0A010B00" +}; + +#else // !HAIKU_TARGET_PLATFORM_HAIKU + +resource large_icon { $"FFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FFFF001B1C1B0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $"FF003F1B1C1B1C1C0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" @@ -34,8 +62,7 @@ $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1111000000111111FFFFFFFFFFFF" }; -resource mini_icon -{ +resource mini_icon { $"FF000000FFFFFFFFFFFFFFFFFFFFFFFF" $"00151B1C0000FFFFFFFFFFFFFFFFFFFF" $"00150A161B1C0000FFFFFFFFFFFFFFFF" @@ -54,6 +81,8 @@ $"FFFFFFFFFFFFFFFF110000001111FFFF" }; +#endif // !HAIKU_TARGET_PLATFORM_HAIKU + resource app_signature "application/x-vnd.Be-MAND"; resource app_flags B_MULTIPLE_LAUNCH; From korli at mail.berlios.de Mon Oct 13 20:57:44 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 20:57:44 +0200 Subject: [Haiku-commits] r28044 - in haiku/vendor/mesa/current: glu/libnurbs/interface glu/libnurbs/internals glu/libnurbs/nurbtess glu/libtess glu/libutil headers/private/internal headers/public src/drivers/common src/glapi src/main src/math src/shader src/shader/slang src/shader/slang/library src/sparc src/swrast src/swrast_setup src/tnl src/tnl_dd src/vbo src/x86 src/x86-64 Message-ID: <200810131857.m9DIviw6024235@sheep.berlios.de> Author: korli Date: 2008-10-13 20:57:21 +0200 (Mon, 13 Oct 2008) New Revision: 28044 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28044&view=rev Added: haiku/vendor/mesa/current/src/shader/prog_uniform.c haiku/vendor/mesa/current/src/shader/prog_uniform.h Removed: haiku/vendor/mesa/current/src/swrast/s_pointtemp.h haiku/vendor/mesa/current/src/x86/matypes.h Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/bezierEval.h haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatch.h haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatchMesh.h haiku/vendor/mesa/current/glu/libnurbs/interface/glcurveval.h haiku/vendor/mesa/current/glu/libnurbs/interface/glimports.h haiku/vendor/mesa/current/glu/libnurbs/interface/glrenderer.h haiku/vendor/mesa/current/glu/libnurbs/interface/glsurfeval.h haiku/vendor/mesa/current/glu/libnurbs/interface/mystdio.h haiku/vendor/mesa/current/glu/libnurbs/interface/mystdlib.h haiku/vendor/mesa/current/glu/libnurbs/internals/arc.h haiku/vendor/mesa/current/glu/libnurbs/internals/arcsorter.h haiku/vendor/mesa/current/glu/libnurbs/internals/arctess.h haiku/vendor/mesa/current/glu/libnurbs/internals/backend.cc haiku/vendor/mesa/current/glu/libnurbs/internals/backend.h haiku/vendor/mesa/current/glu/libnurbs/internals/basiccrveval.h haiku/vendor/mesa/current/glu/libnurbs/internals/basicsurfeval.h haiku/vendor/mesa/current/glu/libnurbs/internals/bezierarc.h haiku/vendor/mesa/current/glu/libnurbs/internals/bin.h haiku/vendor/mesa/current/glu/libnurbs/internals/bufpool.cc haiku/vendor/mesa/current/glu/libnurbs/internals/bufpool.h haiku/vendor/mesa/current/glu/libnurbs/internals/cachingeval.h haiku/vendor/mesa/current/glu/libnurbs/internals/coveandtiler.h haiku/vendor/mesa/current/glu/libnurbs/internals/curve.h haiku/vendor/mesa/current/glu/libnurbs/internals/curvelist.h haiku/vendor/mesa/current/glu/libnurbs/internals/dataTransform.h haiku/vendor/mesa/current/glu/libnurbs/internals/defines.h haiku/vendor/mesa/current/glu/libnurbs/internals/displaylist.h haiku/vendor/mesa/current/glu/libnurbs/internals/displaymode.h haiku/vendor/mesa/current/glu/libnurbs/internals/flist.h haiku/vendor/mesa/current/glu/libnurbs/internals/flistsorter.h haiku/vendor/mesa/current/glu/libnurbs/internals/gridline.h haiku/vendor/mesa/current/glu/libnurbs/internals/gridtrimvertex.h haiku/vendor/mesa/current/glu/libnurbs/internals/gridvertex.h haiku/vendor/mesa/current/glu/libnurbs/internals/hull.h haiku/vendor/mesa/current/glu/libnurbs/internals/jarcloc.h haiku/vendor/mesa/current/glu/libnurbs/internals/knotvector.cc haiku/vendor/mesa/current/glu/libnurbs/internals/knotvector.h haiku/vendor/mesa/current/glu/libnurbs/internals/mapdesc.h haiku/vendor/mesa/current/glu/libnurbs/internals/maplist.h haiku/vendor/mesa/current/glu/libnurbs/internals/mesher.h haiku/vendor/mesa/current/glu/libnurbs/internals/monotonizer.h haiku/vendor/mesa/current/glu/libnurbs/internals/myassert.h haiku/vendor/mesa/current/glu/libnurbs/internals/mymath.h haiku/vendor/mesa/current/glu/libnurbs/internals/mysetjmp.h haiku/vendor/mesa/current/glu/libnurbs/internals/mystring.h haiku/vendor/mesa/current/glu/libnurbs/internals/nurbsconsts.h haiku/vendor/mesa/current/glu/libnurbs/internals/nurbstess.cc haiku/vendor/mesa/current/glu/libnurbs/internals/nurbstess.h haiku/vendor/mesa/current/glu/libnurbs/internals/patch.h haiku/vendor/mesa/current/glu/libnurbs/internals/patchlist.h haiku/vendor/mesa/current/glu/libnurbs/internals/pwlarc.h haiku/vendor/mesa/current/glu/libnurbs/internals/quilt.h haiku/vendor/mesa/current/glu/libnurbs/internals/reader.h haiku/vendor/mesa/current/glu/libnurbs/internals/renderhints.h haiku/vendor/mesa/current/glu/libnurbs/internals/simplemath.h haiku/vendor/mesa/current/glu/libnurbs/internals/slicer.h haiku/vendor/mesa/current/glu/libnurbs/internals/sorter.h haiku/vendor/mesa/current/glu/libnurbs/internals/subdivider.h haiku/vendor/mesa/current/glu/libnurbs/internals/trimline.h haiku/vendor/mesa/current/glu/libnurbs/internals/trimregion.h haiku/vendor/mesa/current/glu/libnurbs/internals/trimvertex.h haiku/vendor/mesa/current/glu/libnurbs/internals/trimvertpool.h haiku/vendor/mesa/current/glu/libnurbs/internals/types.h haiku/vendor/mesa/current/glu/libnurbs/internals/uarray.h haiku/vendor/mesa/current/glu/libnurbs/internals/varray.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/definitions.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/directedLine.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/glimports.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/gridWrap.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/monoChain.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/monoPolyPart.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/monoTriangulation.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/mystdio.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/mystdlib.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/partitionX.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/partitionY.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/polyDBG.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/polyUtil.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/primitiveStream.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/quicksort.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/rectBlock.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampleComp.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampleCompBot.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampleCompRight.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampleCompTop.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampleMonoPoly.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/sampledLine.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/searchTree.h haiku/vendor/mesa/current/glu/libnurbs/nurbtess/zlassert.h haiku/vendor/mesa/current/glu/libtess/dict-list.h haiku/vendor/mesa/current/glu/libtess/dict.c haiku/vendor/mesa/current/glu/libtess/dict.h haiku/vendor/mesa/current/glu/libtess/geom.c haiku/vendor/mesa/current/glu/libtess/geom.h haiku/vendor/mesa/current/glu/libtess/memalloc.c haiku/vendor/mesa/current/glu/libtess/memalloc.h haiku/vendor/mesa/current/glu/libtess/mesh.c haiku/vendor/mesa/current/glu/libtess/mesh.h haiku/vendor/mesa/current/glu/libtess/normal.c haiku/vendor/mesa/current/glu/libtess/normal.h haiku/vendor/mesa/current/glu/libtess/priorityq-heap.c haiku/vendor/mesa/current/glu/libtess/priorityq-heap.h haiku/vendor/mesa/current/glu/libtess/priorityq-sort.h haiku/vendor/mesa/current/glu/libtess/priorityq.c haiku/vendor/mesa/current/glu/libtess/priorityq.h haiku/vendor/mesa/current/glu/libtess/render.c haiku/vendor/mesa/current/glu/libtess/render.h haiku/vendor/mesa/current/glu/libtess/sweep.c haiku/vendor/mesa/current/glu/libtess/sweep.h haiku/vendor/mesa/current/glu/libtess/tess.c haiku/vendor/mesa/current/glu/libtess/tess.h haiku/vendor/mesa/current/glu/libtess/tessmono.c haiku/vendor/mesa/current/glu/libtess/tessmono.h haiku/vendor/mesa/current/glu/libutil/error.c haiku/vendor/mesa/current/glu/libutil/glue.c haiku/vendor/mesa/current/glu/libutil/gluint.h haiku/vendor/mesa/current/glu/libutil/mipmap.c haiku/vendor/mesa/current/glu/libutil/project.c haiku/vendor/mesa/current/glu/libutil/quad.c haiku/vendor/mesa/current/glu/libutil/registry.c haiku/vendor/mesa/current/headers/private/internal/glcore.h haiku/vendor/mesa/current/headers/public/gl.h haiku/vendor/mesa/current/headers/public/glu.h haiku/vendor/mesa/current/src/drivers/common/driverfuncs.c haiku/vendor/mesa/current/src/drivers/common/driverfuncs.h haiku/vendor/mesa/current/src/glapi/dispatch.h haiku/vendor/mesa/current/src/glapi/glapi.c haiku/vendor/mesa/current/src/glapi/glapioffsets.h haiku/vendor/mesa/current/src/glapi/glapitable.h haiku/vendor/mesa/current/src/glapi/glapitemp.h haiku/vendor/mesa/current/src/glapi/glprocs.h haiku/vendor/mesa/current/src/glapi/glthread.c haiku/vendor/mesa/current/src/glapi/glthread.h haiku/vendor/mesa/current/src/main/api_arrayelt.c haiku/vendor/mesa/current/src/main/api_loopback.c haiku/vendor/mesa/current/src/main/api_noop.c haiku/vendor/mesa/current/src/main/api_validate.c haiku/vendor/mesa/current/src/main/arrayobj.c haiku/vendor/mesa/current/src/main/attrib.c haiku/vendor/mesa/current/src/main/attrib.h haiku/vendor/mesa/current/src/main/bufferobj.c haiku/vendor/mesa/current/src/main/bufferobj.h haiku/vendor/mesa/current/src/main/buffers.c haiku/vendor/mesa/current/src/main/buffers.h haiku/vendor/mesa/current/src/main/colortab.c haiku/vendor/mesa/current/src/main/config.h haiku/vendor/mesa/current/src/main/context.c haiku/vendor/mesa/current/src/main/context.h haiku/vendor/mesa/current/src/main/dd.h haiku/vendor/mesa/current/src/main/depth.c haiku/vendor/mesa/current/src/main/dlist.c haiku/vendor/mesa/current/src/main/drawpix.c haiku/vendor/mesa/current/src/main/enable.c haiku/vendor/mesa/current/src/main/enums.c haiku/vendor/mesa/current/src/main/execmem.c haiku/vendor/mesa/current/src/main/extensions.c haiku/vendor/mesa/current/src/main/fbobject.c haiku/vendor/mesa/current/src/main/fbobject.h haiku/vendor/mesa/current/src/main/framebuffer.c haiku/vendor/mesa/current/src/main/get.c haiku/vendor/mesa/current/src/main/getstring.c haiku/vendor/mesa/current/src/main/glheader.h haiku/vendor/mesa/current/src/main/hash.c haiku/vendor/mesa/current/src/main/image.c haiku/vendor/mesa/current/src/main/image.h haiku/vendor/mesa/current/src/main/imports.c haiku/vendor/mesa/current/src/main/imports.h haiku/vendor/mesa/current/src/main/light.c haiku/vendor/mesa/current/src/main/lines.c haiku/vendor/mesa/current/src/main/mipmap.c haiku/vendor/mesa/current/src/main/mipmap.h haiku/vendor/mesa/current/src/main/mtypes.h haiku/vendor/mesa/current/src/main/points.c haiku/vendor/mesa/current/src/main/shaders.c haiku/vendor/mesa/current/src/main/state.c haiku/vendor/mesa/current/src/main/texcompress_fxt1.c haiku/vendor/mesa/current/src/main/texenvprogram.c haiku/vendor/mesa/current/src/main/texformat.c haiku/vendor/mesa/current/src/main/texformat.h haiku/vendor/mesa/current/src/main/texformat_tmp.h haiku/vendor/mesa/current/src/main/teximage.c haiku/vendor/mesa/current/src/main/teximage.h haiku/vendor/mesa/current/src/main/texobj.c haiku/vendor/mesa/current/src/main/texobj.h haiku/vendor/mesa/current/src/main/texrender.c haiku/vendor/mesa/current/src/main/texstate.c haiku/vendor/mesa/current/src/main/texstate.h haiku/vendor/mesa/current/src/main/texstore.c haiku/vendor/mesa/current/src/main/texstore.h haiku/vendor/mesa/current/src/main/varray.c haiku/vendor/mesa/current/src/main/varray.h haiku/vendor/mesa/current/src/main/version.h haiku/vendor/mesa/current/src/main/vtxfmt_tmp.h haiku/vendor/mesa/current/src/math/m_debug_util.h haiku/vendor/mesa/current/src/math/m_eval.c haiku/vendor/mesa/current/src/math/m_eval.h haiku/vendor/mesa/current/src/math/m_translate.h haiku/vendor/mesa/current/src/math/m_xform.c haiku/vendor/mesa/current/src/shader/arbprogparse.c haiku/vendor/mesa/current/src/shader/arbprogram.c haiku/vendor/mesa/current/src/shader/arbprogram.h haiku/vendor/mesa/current/src/shader/arbprogram_syn.h haiku/vendor/mesa/current/src/shader/nvprogram.c haiku/vendor/mesa/current/src/shader/nvprogram.h haiku/vendor/mesa/current/src/shader/prog_execute.c haiku/vendor/mesa/current/src/shader/prog_execute.h haiku/vendor/mesa/current/src/shader/prog_instruction.c haiku/vendor/mesa/current/src/shader/prog_instruction.h haiku/vendor/mesa/current/src/shader/prog_parameter.c haiku/vendor/mesa/current/src/shader/prog_parameter.h haiku/vendor/mesa/current/src/shader/prog_print.c haiku/vendor/mesa/current/src/shader/prog_statevars.c haiku/vendor/mesa/current/src/shader/prog_statevars.h haiku/vendor/mesa/current/src/shader/program.c haiku/vendor/mesa/current/src/shader/program.h haiku/vendor/mesa/current/src/shader/programopt.c haiku/vendor/mesa/current/src/shader/programopt.h haiku/vendor/mesa/current/src/shader/shader_api.c haiku/vendor/mesa/current/src/shader/shader_api.h haiku/vendor/mesa/current/src/shader/slang/library/slang_120_core.gc haiku/vendor/mesa/current/src/shader/slang/library/slang_120_core_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_builtin_120_common_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_builtin_120_fragment_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_common_builtin.gc haiku/vendor/mesa/current/src/shader/slang/library/slang_common_builtin_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_core.gc haiku/vendor/mesa/current/src/shader/slang/library/slang_core_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_fragment_builtin_gc.h haiku/vendor/mesa/current/src/shader/slang/library/slang_pp_version.syn haiku/vendor/mesa/current/src/shader/slang/library/slang_pp_version_syn.h haiku/vendor/mesa/current/src/shader/slang/library/slang_shader.syn haiku/vendor/mesa/current/src/shader/slang/library/slang_shader_syn.h haiku/vendor/mesa/current/src/shader/slang/library/slang_vertex_builtin_gc.h haiku/vendor/mesa/current/src/shader/slang/slang_builtin.c haiku/vendor/mesa/current/src/shader/slang/slang_builtin.h haiku/vendor/mesa/current/src/shader/slang/slang_codegen.c haiku/vendor/mesa/current/src/shader/slang/slang_codegen.h haiku/vendor/mesa/current/src/shader/slang/slang_compile.c haiku/vendor/mesa/current/src/shader/slang/slang_compile.h haiku/vendor/mesa/current/src/shader/slang/slang_compile_function.c haiku/vendor/mesa/current/src/shader/slang/slang_compile_operation.c haiku/vendor/mesa/current/src/shader/slang/slang_compile_operation.h haiku/vendor/mesa/current/src/shader/slang/slang_compile_struct.c haiku/vendor/mesa/current/src/shader/slang/slang_compile_struct.h haiku/vendor/mesa/current/src/shader/slang/slang_compile_variable.c haiku/vendor/mesa/current/src/shader/slang/slang_compile_variable.h haiku/vendor/mesa/current/src/shader/slang/slang_emit.c haiku/vendor/mesa/current/src/shader/slang/slang_emit.h haiku/vendor/mesa/current/src/shader/slang/slang_ir.c haiku/vendor/mesa/current/src/shader/slang/slang_ir.h haiku/vendor/mesa/current/src/shader/slang/slang_label.h haiku/vendor/mesa/current/src/shader/slang/slang_library_noise.c haiku/vendor/mesa/current/src/shader/slang/slang_link.c haiku/vendor/mesa/current/src/shader/slang/slang_link.h haiku/vendor/mesa/current/src/shader/slang/slang_log.c haiku/vendor/mesa/current/src/shader/slang/slang_mem.c haiku/vendor/mesa/current/src/shader/slang/slang_mem.h haiku/vendor/mesa/current/src/shader/slang/slang_preprocess.c haiku/vendor/mesa/current/src/shader/slang/slang_print.c haiku/vendor/mesa/current/src/shader/slang/slang_simplify.c haiku/vendor/mesa/current/src/shader/slang/slang_simplify.h haiku/vendor/mesa/current/src/shader/slang/slang_storage.c haiku/vendor/mesa/current/src/shader/slang/slang_typeinfo.c haiku/vendor/mesa/current/src/shader/slang/slang_typeinfo.h haiku/vendor/mesa/current/src/shader/slang/slang_utility.c haiku/vendor/mesa/current/src/shader/slang/slang_vartable.c haiku/vendor/mesa/current/src/sparc/glapi_sparc.S haiku/vendor/mesa/current/src/swrast/s_aaline.c haiku/vendor/mesa/current/src/swrast/s_aalinetemp.h haiku/vendor/mesa/current/src/swrast/s_aatriangle.c haiku/vendor/mesa/current/src/swrast/s_aatritemp.h haiku/vendor/mesa/current/src/swrast/s_accum.c haiku/vendor/mesa/current/src/swrast/s_alpha.c haiku/vendor/mesa/current/src/swrast/s_atifragshader.c haiku/vendor/mesa/current/src/swrast/s_bitmap.c haiku/vendor/mesa/current/src/swrast/s_blend.c haiku/vendor/mesa/current/src/swrast/s_blit.c haiku/vendor/mesa/current/src/swrast/s_buffers.c haiku/vendor/mesa/current/src/swrast/s_context.c haiku/vendor/mesa/current/src/swrast/s_context.h haiku/vendor/mesa/current/src/swrast/s_copypix.c haiku/vendor/mesa/current/src/swrast/s_drawpix.c haiku/vendor/mesa/current/src/swrast/s_feedback.c haiku/vendor/mesa/current/src/swrast/s_fog.c haiku/vendor/mesa/current/src/swrast/s_fragprog.c haiku/vendor/mesa/current/src/swrast/s_lines.c haiku/vendor/mesa/current/src/swrast/s_linetemp.h haiku/vendor/mesa/current/src/swrast/s_logic.c haiku/vendor/mesa/current/src/swrast/s_masking.c haiku/vendor/mesa/current/src/swrast/s_points.c haiku/vendor/mesa/current/src/swrast/s_readpix.c haiku/vendor/mesa/current/src/swrast/s_span.c haiku/vendor/mesa/current/src/swrast/s_span.h haiku/vendor/mesa/current/src/swrast/s_stencil.c haiku/vendor/mesa/current/src/swrast/s_texcombine.c haiku/vendor/mesa/current/src/swrast/s_texfilter.c haiku/vendor/mesa/current/src/swrast/s_texstore.c haiku/vendor/mesa/current/src/swrast/s_triangle.c haiku/vendor/mesa/current/src/swrast/s_tritemp.h haiku/vendor/mesa/current/src/swrast/s_zoom.c haiku/vendor/mesa/current/src/swrast/swrast.h haiku/vendor/mesa/current/src/swrast_setup/ss_context.c haiku/vendor/mesa/current/src/swrast_setup/ss_context.h haiku/vendor/mesa/current/src/swrast_setup/ss_triangle.c haiku/vendor/mesa/current/src/swrast_setup/ss_tritmp.h haiku/vendor/mesa/current/src/tnl/t_context.c haiku/vendor/mesa/current/src/tnl/t_context.h haiku/vendor/mesa/current/src/tnl/t_draw.c haiku/vendor/mesa/current/src/tnl/t_pipeline.c haiku/vendor/mesa/current/src/tnl/t_vb_fog.c haiku/vendor/mesa/current/src/tnl/t_vb_program.c haiku/vendor/mesa/current/src/tnl/t_vertex.c haiku/vendor/mesa/current/src/tnl/t_vp_build.c haiku/vendor/mesa/current/src/tnl/tnl.h haiku/vendor/mesa/current/src/tnl_dd/t_dd_tritmp.h haiku/vendor/mesa/current/src/tnl_dd/t_dd_vb.c haiku/vendor/mesa/current/src/vbo/vbo.h haiku/vendor/mesa/current/src/vbo/vbo_context.c haiku/vendor/mesa/current/src/vbo/vbo_exec.c haiku/vendor/mesa/current/src/vbo/vbo_exec.h haiku/vendor/mesa/current/src/vbo/vbo_exec_api.c haiku/vendor/mesa/current/src/vbo/vbo_exec_array.c haiku/vendor/mesa/current/src/vbo/vbo_exec_draw.c haiku/vendor/mesa/current/src/vbo/vbo_exec_eval.c haiku/vendor/mesa/current/src/vbo/vbo_rebase.c haiku/vendor/mesa/current/src/vbo/vbo_save.c haiku/vendor/mesa/current/src/vbo/vbo_save.h haiku/vendor/mesa/current/src/vbo/vbo_save_api.c haiku/vendor/mesa/current/src/vbo/vbo_save_draw.c haiku/vendor/mesa/current/src/vbo/vbo_save_loopback.c haiku/vendor/mesa/current/src/vbo/vbo_split.c haiku/vendor/mesa/current/src/vbo/vbo_split_copy.c haiku/vendor/mesa/current/src/vbo/vbo_split_inplace.c haiku/vendor/mesa/current/src/x86-64/glapi_x86-64.S haiku/vendor/mesa/current/src/x86-64/xform4.S haiku/vendor/mesa/current/src/x86/common_x86.c haiku/vendor/mesa/current/src/x86/glapi_x86.S Log: updating mesa vendor with version 7.2 Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/bezierEval.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/bezierEval.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/bezierEval.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatch.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatch.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatch.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatch.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatchMesh.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatchMesh.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/bezierPatchMesh.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/glcurveval.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/glcurveval.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/glcurveval.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glcurveval.h Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/glimports.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/glimports.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/glimports.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glimports.h Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/glrenderer.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/glrenderer.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/glrenderer.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glrenderer.h Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/glsurfeval.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/glsurfeval.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/glsurfeval.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glsurfeval.h Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/mystdio.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/mystdio.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/mystdio.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * mystdio.h @@ -43,7 +39,7 @@ #define __glumystdio_h_ #ifdef STANDALONE -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #ifdef LIBRARYBUILD @@ -51,12 +47,12 @@ #include #define _glu_dprintf printf #else -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #endif #ifdef GLBUILD -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #ifndef NULL Modified: haiku/vendor/mesa/current/glu/libnurbs/interface/mystdlib.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/interface/mystdlib.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/interface/mystdlib.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * mystdlib.h Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/arc.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/arc.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/arc.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * arc.h Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/arcsorter.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/arcsorter.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/arcsorter.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * arcsorter.h Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/arctess.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/arctess.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/arctess.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * arctess.h Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/backend.cc =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/backend.cc 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/backend.cc 2008-10-13 18:57:21 UTC (rev 28044) @@ -246,7 +246,7 @@ *------------------------------------------------------------------------- */ void -Backend::bgntmesh( char * ) +Backend::bgntmesh( const char * ) { #ifndef NOWIREFRAME Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/backend.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/backend.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/backend.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * backend.h @@ -65,7 +61,7 @@ void surfbbox( long, REAL *, REAL * ); void surfgrid( REAL, REAL, long, REAL, REAL, long ); void surfmesh( long, long, long, long ); - void bgntmesh( char * ); + void bgntmesh( const char * ); void endtmesh( void ); void swaptmesh( void ); void tmeshvert( GridTrimVertex * ); Modified: haiku/vendor/mesa/current/glu/libnurbs/internals/basiccrveval.h =================================================================== --- haiku/vendor/mesa/current/glu/libnurbs/internals/basiccrveval.h 2008-10-13 16:06:00 UTC (rev 28043) +++ haiku/vendor/mesa/current/glu/libnurbs/internals/basiccrveval.h 2008-10-13 18:57:21 UTC (rev 28044) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. [... truncated: 56729 lines follow ...] From korli at mail.berlios.de Mon Oct 13 21:00:17 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 21:00:17 +0200 Subject: [Haiku-commits] r28045 - haiku/vendor/mesa Message-ID: <200810131900.m9DJ0Hdi024673@sheep.berlios.de> Author: korli Date: 2008-10-13 21:00:17 +0200 (Mon, 13 Oct 2008) New Revision: 28045 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28045&view=rev Added: haiku/vendor/mesa/7.2/ Log: tagging Mesa 7.2 Copied: haiku/vendor/mesa/7.2 (from rev 28044, haiku/vendor/mesa/current) From korli at mail.berlios.de Mon Oct 13 21:38:13 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 21:38:13 +0200 Subject: [Haiku-commits] r28046 - in haiku/trunk: headers/os/opengl/GL headers/private/opengl/GL/internal src/kits/opengl/glu/libnurbs/interface src/kits/opengl/glu/libnurbs/internals src/kits/opengl/glu/libnurbs/nurbtess src/kits/opengl/glu/libtess src/kits/opengl/glu/libutil src/kits/opengl/mesa src/kits/opengl/mesa/drivers/common src/kits/opengl/mesa/glapi src/kits/opengl/mesa/main src/kits/opengl/mesa/math src/kits/opengl/mesa/shader src/kits/opengl/mesa/shader/slang src/kits/opengl/mesa/shader/slang/library src/kits/opengl/mesa/sparc src/kits/opengl/mesa/swrast src/kits/opengl/mesa/swrast_setup src/kits/opengl/mesa/tnl src/kits/opengl/mesa/tnl_dd src/kits/opengl/mesa/vbo src/kits/opengl/mesa/x86 src/kits/opengl/mesa/x86-64 Message-ID: <200810131938.m9DJcDIh031089@sheep.berlios.de> Author: korli Date: 2008-10-13 21:37:51 +0200 (Mon, 13 Oct 2008) New Revision: 28046 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28046&view=rev Added: haiku/trunk/src/kits/opengl/mesa/shader/prog_uniform.c haiku/trunk/src/kits/opengl/mesa/shader/prog_uniform.h Removed: haiku/trunk/src/kits/opengl/mesa/swrast/s_pointtemp.h Modified: haiku/trunk/headers/os/opengl/GL/gl.h haiku/trunk/headers/os/opengl/GL/glu.h haiku/trunk/headers/private/opengl/GL/internal/glcore.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierEval.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatch.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatchMesh.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glcurveval.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glimports.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glrenderer.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glsurfeval.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdio.h haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdlib.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arc.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arcsorter.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arctess.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/backend.cc haiku/trunk/src/kits/opengl/glu/libnurbs/internals/backend.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/basiccrveval.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/basicsurfeval.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/bezierarc.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/bin.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/bufpool.cc haiku/trunk/src/kits/opengl/glu/libnurbs/internals/bufpool.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/cachingeval.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/coveandtiler.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/curve.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/curvelist.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/dataTransform.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/defines.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/displaylist.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/displaymode.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/flist.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/flistsorter.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/gridline.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/gridtrimvertex.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/gridvertex.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/hull.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/jarcloc.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/knotvector.cc haiku/trunk/src/kits/opengl/glu/libnurbs/internals/knotvector.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/mapdesc.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/maplist.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/mesher.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/monotonizer.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/myassert.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/mymath.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/mysetjmp.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/mystring.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/nurbsconsts.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/nurbstess.cc haiku/trunk/src/kits/opengl/glu/libnurbs/internals/nurbstess.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/patch.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/patchlist.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/pwlarc.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/quilt.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/reader.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/renderhints.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/simplemath.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/slicer.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/sorter.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/subdivider.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/trimline.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/trimregion.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/trimvertex.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/trimvertpool.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/types.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/uarray.h haiku/trunk/src/kits/opengl/glu/libnurbs/internals/varray.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/definitions.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/directedLine.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/glimports.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/gridWrap.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/monoChain.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/monoPolyPart.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/monoTriangulation.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/mystdio.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/mystdlib.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/partitionX.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/partitionY.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/polyDBG.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/polyUtil.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/primitiveStream.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/quicksort.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/rectBlock.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampleComp.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampleCompBot.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampleCompRight.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampleCompTop.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampleMonoPoly.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/sampledLine.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/searchTree.h haiku/trunk/src/kits/opengl/glu/libnurbs/nurbtess/zlassert.h haiku/trunk/src/kits/opengl/glu/libtess/dict-list.h haiku/trunk/src/kits/opengl/glu/libtess/dict.c haiku/trunk/src/kits/opengl/glu/libtess/dict.h haiku/trunk/src/kits/opengl/glu/libtess/geom.c haiku/trunk/src/kits/opengl/glu/libtess/geom.h haiku/trunk/src/kits/opengl/glu/libtess/memalloc.c haiku/trunk/src/kits/opengl/glu/libtess/memalloc.h haiku/trunk/src/kits/opengl/glu/libtess/mesh.c haiku/trunk/src/kits/opengl/glu/libtess/mesh.h haiku/trunk/src/kits/opengl/glu/libtess/normal.c haiku/trunk/src/kits/opengl/glu/libtess/normal.h haiku/trunk/src/kits/opengl/glu/libtess/priorityq-heap.c haiku/trunk/src/kits/opengl/glu/libtess/priorityq-heap.h haiku/trunk/src/kits/opengl/glu/libtess/priorityq-sort.h haiku/trunk/src/kits/opengl/glu/libtess/priorityq.c haiku/trunk/src/kits/opengl/glu/libtess/priorityq.h haiku/trunk/src/kits/opengl/glu/libtess/render.c haiku/trunk/src/kits/opengl/glu/libtess/render.h haiku/trunk/src/kits/opengl/glu/libtess/sweep.c haiku/trunk/src/kits/opengl/glu/libtess/sweep.h haiku/trunk/src/kits/opengl/glu/libtess/tess.c haiku/trunk/src/kits/opengl/glu/libtess/tess.h haiku/trunk/src/kits/opengl/glu/libtess/tessmono.c haiku/trunk/src/kits/opengl/glu/libtess/tessmono.h haiku/trunk/src/kits/opengl/glu/libutil/error.c haiku/trunk/src/kits/opengl/glu/libutil/glue.c haiku/trunk/src/kits/opengl/glu/libutil/gluint.h haiku/trunk/src/kits/opengl/glu/libutil/mipmap.c haiku/trunk/src/kits/opengl/glu/libutil/project.c haiku/trunk/src/kits/opengl/glu/libutil/quad.c haiku/trunk/src/kits/opengl/glu/libutil/registry.c haiku/trunk/src/kits/opengl/mesa/Jamfile haiku/trunk/src/kits/opengl/mesa/drivers/common/driverfuncs.c haiku/trunk/src/kits/opengl/mesa/drivers/common/driverfuncs.h haiku/trunk/src/kits/opengl/mesa/glapi/dispatch.h haiku/trunk/src/kits/opengl/mesa/glapi/glapi.c haiku/trunk/src/kits/opengl/mesa/glapi/glapioffsets.h haiku/trunk/src/kits/opengl/mesa/glapi/glapitable.h haiku/trunk/src/kits/opengl/mesa/glapi/glapitemp.h haiku/trunk/src/kits/opengl/mesa/glapi/glprocs.h haiku/trunk/src/kits/opengl/mesa/glapi/glthread.c haiku/trunk/src/kits/opengl/mesa/glapi/glthread.h haiku/trunk/src/kits/opengl/mesa/main/api_arrayelt.c haiku/trunk/src/kits/opengl/mesa/main/api_loopback.c haiku/trunk/src/kits/opengl/mesa/main/api_noop.c haiku/trunk/src/kits/opengl/mesa/main/api_validate.c haiku/trunk/src/kits/opengl/mesa/main/arrayobj.c haiku/trunk/src/kits/opengl/mesa/main/attrib.c haiku/trunk/src/kits/opengl/mesa/main/attrib.h haiku/trunk/src/kits/opengl/mesa/main/bufferobj.c haiku/trunk/src/kits/opengl/mesa/main/bufferobj.h haiku/trunk/src/kits/opengl/mesa/main/buffers.c haiku/trunk/src/kits/opengl/mesa/main/buffers.h haiku/trunk/src/kits/opengl/mesa/main/colortab.c haiku/trunk/src/kits/opengl/mesa/main/config.h haiku/trunk/src/kits/opengl/mesa/main/context.c haiku/trunk/src/kits/opengl/mesa/main/context.h haiku/trunk/src/kits/opengl/mesa/main/dd.h haiku/trunk/src/kits/opengl/mesa/main/depth.c haiku/trunk/src/kits/opengl/mesa/main/dlist.c haiku/trunk/src/kits/opengl/mesa/main/drawpix.c haiku/trunk/src/kits/opengl/mesa/main/enable.c haiku/trunk/src/kits/opengl/mesa/main/enums.c haiku/trunk/src/kits/opengl/mesa/main/execmem.c haiku/trunk/src/kits/opengl/mesa/main/extensions.c haiku/trunk/src/kits/opengl/mesa/main/fbobject.c haiku/trunk/src/kits/opengl/mesa/main/fbobject.h haiku/trunk/src/kits/opengl/mesa/main/framebuffer.c haiku/trunk/src/kits/opengl/mesa/main/get.c haiku/trunk/src/kits/opengl/mesa/main/getstring.c haiku/trunk/src/kits/opengl/mesa/main/glheader.h haiku/trunk/src/kits/opengl/mesa/main/hash.c haiku/trunk/src/kits/opengl/mesa/main/image.c haiku/trunk/src/kits/opengl/mesa/main/image.h haiku/trunk/src/kits/opengl/mesa/main/imports.c haiku/trunk/src/kits/opengl/mesa/main/imports.h haiku/trunk/src/kits/opengl/mesa/main/light.c haiku/trunk/src/kits/opengl/mesa/main/lines.c haiku/trunk/src/kits/opengl/mesa/main/mipmap.c haiku/trunk/src/kits/opengl/mesa/main/mipmap.h haiku/trunk/src/kits/opengl/mesa/main/mtypes.h haiku/trunk/src/kits/opengl/mesa/main/points.c haiku/trunk/src/kits/opengl/mesa/main/shaders.c haiku/trunk/src/kits/opengl/mesa/main/state.c haiku/trunk/src/kits/opengl/mesa/main/texcompress_fxt1.c haiku/trunk/src/kits/opengl/mesa/main/texenvprogram.c haiku/trunk/src/kits/opengl/mesa/main/texformat.c haiku/trunk/src/kits/opengl/mesa/main/texformat.h haiku/trunk/src/kits/opengl/mesa/main/texformat_tmp.h haiku/trunk/src/kits/opengl/mesa/main/teximage.c haiku/trunk/src/kits/opengl/mesa/main/teximage.h haiku/trunk/src/kits/opengl/mesa/main/texobj.c haiku/trunk/src/kits/opengl/mesa/main/texobj.h haiku/trunk/src/kits/opengl/mesa/main/texrender.c haiku/trunk/src/kits/opengl/mesa/main/texstate.c haiku/trunk/src/kits/opengl/mesa/main/texstate.h haiku/trunk/src/kits/opengl/mesa/main/texstore.c haiku/trunk/src/kits/opengl/mesa/main/texstore.h haiku/trunk/src/kits/opengl/mesa/main/varray.c haiku/trunk/src/kits/opengl/mesa/main/varray.h haiku/trunk/src/kits/opengl/mesa/main/version.h haiku/trunk/src/kits/opengl/mesa/main/vtxfmt_tmp.h haiku/trunk/src/kits/opengl/mesa/math/m_debug_util.h haiku/trunk/src/kits/opengl/mesa/math/m_eval.c haiku/trunk/src/kits/opengl/mesa/math/m_eval.h haiku/trunk/src/kits/opengl/mesa/math/m_translate.h haiku/trunk/src/kits/opengl/mesa/math/m_xform.c haiku/trunk/src/kits/opengl/mesa/shader/arbprogparse.c haiku/trunk/src/kits/opengl/mesa/shader/arbprogram.c haiku/trunk/src/kits/opengl/mesa/shader/arbprogram.h haiku/trunk/src/kits/opengl/mesa/shader/arbprogram_syn.h haiku/trunk/src/kits/opengl/mesa/shader/nvprogram.c haiku/trunk/src/kits/opengl/mesa/shader/nvprogram.h haiku/trunk/src/kits/opengl/mesa/shader/prog_execute.c haiku/trunk/src/kits/opengl/mesa/shader/prog_execute.h haiku/trunk/src/kits/opengl/mesa/shader/prog_instruction.c haiku/trunk/src/kits/opengl/mesa/shader/prog_instruction.h haiku/trunk/src/kits/opengl/mesa/shader/prog_parameter.c haiku/trunk/src/kits/opengl/mesa/shader/prog_parameter.h haiku/trunk/src/kits/opengl/mesa/shader/prog_print.c haiku/trunk/src/kits/opengl/mesa/shader/prog_statevars.c haiku/trunk/src/kits/opengl/mesa/shader/prog_statevars.h haiku/trunk/src/kits/opengl/mesa/shader/program.c haiku/trunk/src/kits/opengl/mesa/shader/program.h haiku/trunk/src/kits/opengl/mesa/shader/programopt.c haiku/trunk/src/kits/opengl/mesa/shader/programopt.h haiku/trunk/src/kits/opengl/mesa/shader/shader_api.c haiku/trunk/src/kits/opengl/mesa/shader/shader_api.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_120_core.gc haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_120_core_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_builtin_120_common_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_common_builtin.gc haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_common_builtin_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_core.gc haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_core_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_fragment_builtin_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_pp_version.syn haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_pp_version_syn.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_shader.syn haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_shader_syn.h haiku/trunk/src/kits/opengl/mesa/shader/slang/library/slang_vertex_builtin_gc.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_builtin.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_builtin.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_codegen.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_codegen.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_function.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_operation.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_operation.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_struct.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_struct.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_variable.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_compile_variable.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_emit.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_emit.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_ir.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_ir.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_label.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_library_noise.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_link.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_link.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_log.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_mem.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_mem.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_preprocess.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_print.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_simplify.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_simplify.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_storage.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_typeinfo.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_typeinfo.h haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_utility.c haiku/trunk/src/kits/opengl/mesa/shader/slang/slang_vartable.c haiku/trunk/src/kits/opengl/mesa/sparc/glapi_sparc.S haiku/trunk/src/kits/opengl/mesa/swrast/s_aaline.c haiku/trunk/src/kits/opengl/mesa/swrast/s_aalinetemp.h haiku/trunk/src/kits/opengl/mesa/swrast/s_aatriangle.c haiku/trunk/src/kits/opengl/mesa/swrast/s_aatritemp.h haiku/trunk/src/kits/opengl/mesa/swrast/s_accum.c haiku/trunk/src/kits/opengl/mesa/swrast/s_alpha.c haiku/trunk/src/kits/opengl/mesa/swrast/s_atifragshader.c haiku/trunk/src/kits/opengl/mesa/swrast/s_bitmap.c haiku/trunk/src/kits/opengl/mesa/swrast/s_blend.c haiku/trunk/src/kits/opengl/mesa/swrast/s_blit.c haiku/trunk/src/kits/opengl/mesa/swrast/s_buffers.c haiku/trunk/src/kits/opengl/mesa/swrast/s_context.c haiku/trunk/src/kits/opengl/mesa/swrast/s_context.h haiku/trunk/src/kits/opengl/mesa/swrast/s_copypix.c haiku/trunk/src/kits/opengl/mesa/swrast/s_drawpix.c haiku/trunk/src/kits/opengl/mesa/swrast/s_feedback.c haiku/trunk/src/kits/opengl/mesa/swrast/s_fog.c haiku/trunk/src/kits/opengl/mesa/swrast/s_fragprog.c haiku/trunk/src/kits/opengl/mesa/swrast/s_lines.c haiku/trunk/src/kits/opengl/mesa/swrast/s_linetemp.h haiku/trunk/src/kits/opengl/mesa/swrast/s_logic.c haiku/trunk/src/kits/opengl/mesa/swrast/s_masking.c haiku/trunk/src/kits/opengl/mesa/swrast/s_points.c haiku/trunk/src/kits/opengl/mesa/swrast/s_readpix.c haiku/trunk/src/kits/opengl/mesa/swrast/s_span.c haiku/trunk/src/kits/opengl/mesa/swrast/s_span.h haiku/trunk/src/kits/opengl/mesa/swrast/s_stencil.c haiku/trunk/src/kits/opengl/mesa/swrast/s_texcombine.c haiku/trunk/src/kits/opengl/mesa/swrast/s_texfilter.c haiku/trunk/src/kits/opengl/mesa/swrast/s_texstore.c haiku/trunk/src/kits/opengl/mesa/swrast/s_triangle.c haiku/trunk/src/kits/opengl/mesa/swrast/s_tritemp.h haiku/trunk/src/kits/opengl/mesa/swrast/s_zoom.c haiku/trunk/src/kits/opengl/mesa/swrast/swrast.h haiku/trunk/src/kits/opengl/mesa/swrast_setup/ss_context.c haiku/trunk/src/kits/opengl/mesa/swrast_setup/ss_context.h haiku/trunk/src/kits/opengl/mesa/swrast_setup/ss_triangle.c haiku/trunk/src/kits/opengl/mesa/swrast_setup/ss_tritmp.h haiku/trunk/src/kits/opengl/mesa/tnl/t_context.c haiku/trunk/src/kits/opengl/mesa/tnl/t_context.h haiku/trunk/src/kits/opengl/mesa/tnl/t_draw.c haiku/trunk/src/kits/opengl/mesa/tnl/t_pipeline.c haiku/trunk/src/kits/opengl/mesa/tnl/t_vb_fog.c haiku/trunk/src/kits/opengl/mesa/tnl/t_vb_program.c haiku/trunk/src/kits/opengl/mesa/tnl/t_vertex.c haiku/trunk/src/kits/opengl/mesa/tnl/t_vp_build.c haiku/trunk/src/kits/opengl/mesa/tnl/tnl.h haiku/trunk/src/kits/opengl/mesa/tnl_dd/t_dd_tritmp.h haiku/trunk/src/kits/opengl/mesa/tnl_dd/t_dd_vb.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo.h haiku/trunk/src/kits/opengl/mesa/vbo/vbo_context.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec.h haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec_api.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec_array.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec_draw.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_exec_eval.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_rebase.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_save.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_save.h haiku/trunk/src/kits/opengl/mesa/vbo/vbo_save_api.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_save_draw.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_save_loopback.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_split.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_split_copy.c haiku/trunk/src/kits/opengl/mesa/vbo/vbo_split_inplace.c haiku/trunk/src/kits/opengl/mesa/x86-64/glapi_x86-64.S haiku/trunk/src/kits/opengl/mesa/x86-64/xform4.S haiku/trunk/src/kits/opengl/mesa/x86/common_x86.c haiku/trunk/src/kits/opengl/mesa/x86/glapi_x86.S Log: updated mesa to 7.2 Modified: haiku/trunk/headers/os/opengl/GL/gl.h =================================================================== --- haiku/trunk/headers/os/opengl/GL/gl.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/headers/os/opengl/GL/gl.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 7.0 + * Version: 6.5.1 * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -2210,6 +2210,39 @@ #endif /* GL_MESA_program_debug */ +#ifndef GL_MESA_texture_array +#define GL_MESA_texture_array 1 + +/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. + */ +#ifndef GL_EXT_texture_array + +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif /* GL_GLEXT_PROTOTYPES */ + +#if 0 +/* (temporarily) disabled because of collision with typedef in glext.h + * that happens if apps include both gl.h and glext.h + */ +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#endif + +#endif + + #ifndef GL_ATI_blend_equation_separate #define GL_ATI_blend_equation_separate 1 Modified: haiku/trunk/headers/os/opengl/GL/glu.h =================================================================== --- haiku/trunk/headers/os/opengl/GL/glu.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/headers/os/opengl/GL/glu.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,31 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ #ifndef __glu_h__ #define __glu_h__ Modified: haiku/trunk/headers/private/opengl/GL/internal/glcore.h =================================================================== --- haiku/trunk/headers/private/opengl/GL/internal/glcore.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/headers/private/opengl/GL/internal/glcore.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -2,45 +2,41 @@ #define __gl_core_h_ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ #include #define GL_CORE_SGI 1 #define GL_CORE_MESA 2 #define GL_CORE_APPLE 4 +#define GL_CORE_WINDOWS 8 typedef struct __GLcontextRec __GLcontext; Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierEval.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierEval.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierEval.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /cvs/mesa/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatch.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatch.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatch.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /cvs/mesa/Mesa/src/glu/sgi/libnurbs/interface/bezierPatch.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatchMesh.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatchMesh.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/bezierPatchMesh.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,38 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* ** $Header: /cvs/mesa/Mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h,v 1.1 2001/03/17 00:25:40 brianp Exp $ */ Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glcurveval.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glcurveval.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glcurveval.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glcurveval.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glimports.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glimports.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glimports.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glimports.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glrenderer.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glrenderer.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glrenderer.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glrenderer.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glsurfeval.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glsurfeval.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/glsurfeval.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * glsurfeval.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdio.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdio.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdio.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * mystdio.h @@ -43,7 +39,7 @@ #define __glumystdio_h_ #ifdef STANDALONE -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #ifdef LIBRARYBUILD @@ -51,12 +47,12 @@ #include #define _glu_dprintf printf #else -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #endif #ifdef GLBUILD -inline void _glu_dprintf( char *, ... ) { } +inline void _glu_dprintf( const char *, ... ) { } #endif #ifndef NULL Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdlib.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdlib.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/interface/mystdlib.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * mystdlib.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arc.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arc.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arc.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * arc.h Modified: haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arcsorter.h =================================================================== --- haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arcsorter.h 2008-10-13 19:00:17 UTC (rev 28045) +++ haiku/trunk/src/kits/opengl/glu/libnurbs/internals/arcsorter.h 2008-10-13 19:37:51 UTC (rev 28046) @@ -1,36 +1,32 @@ /* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ /* * arcsorter.h [... truncated: 56486 lines follow ...] From korli at mail.berlios.de Mon Oct 13 22:11:27 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 22:11:27 +0200 Subject: [Haiku-commits] r28047 - in haiku/trunk/src/kits/opengl/mesa: . x86 Message-ID: <200810132011.m9DKBRmk002979@sheep.berlios.de> Author: korli Date: 2008-10-13 22:11:27 +0200 (Mon, 13 Oct 2008) New Revision: 28047 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28047&view=rev Removed: haiku/trunk/src/kits/opengl/mesa/x86/matypes.h Modified: haiku/trunk/src/kits/opengl/mesa/Jamfile Log: matypes.h is a generated header Modified: haiku/trunk/src/kits/opengl/mesa/Jamfile =================================================================== --- haiku/trunk/src/kits/opengl/mesa/Jamfile 2008-10-13 19:37:51 UTC (rev 28046) +++ haiku/trunk/src/kits/opengl/mesa/Jamfile 2008-10-13 20:11:27 UTC (rev 28047) @@ -34,8 +34,26 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast_setup ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) tnl ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) vbo ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ; +BuildPlatformMain gen_matypes : + gen_matypes.c ; + +rule MkMaTypes { + MakeLocateArch $(<) ; + Depends $(<) : gen_matypes ; + MkMaTypes1 $(<) : gen_matypes ; + LocalClean clean : $(<) ; +} + +actions MkMaTypes1 +{ + $(2) > $(1) ; +} + + +{ local defines ; defines = BEOS_THREADS GNU_ASSEMBLER ; @@ -59,6 +77,8 @@ local arch_sources ; if $(TARGET_ARCH) = x86 { + MkMaTypes matypes.h ; + arch_sources = common_x86.c common_x86_asm.S @@ -88,8 +108,10 @@ x86sse.c ; -SEARCH_SOURCE += [ FDirName $(SUBDIR) x86 rtasm ] ; + Includes [ FGristFiles $(arch_sources) ] : matypes.h ; + SEARCH_SOURCE += [ FDirName $(SUBDIR) x86 rtasm ] ; + } else if $(TARGET_ARCH) = ppc { arch_sources = @@ -108,9 +130,7 @@ arch_sources = t_vtx_generic.c ; } -SEARCH_SOURCE += [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ; - StaticLibrary libmesa.a : # main Deleted: haiku/trunk/src/kits/opengl/mesa/x86/matypes.h From korli at mail.berlios.de Mon Oct 13 22:19:13 2008 From: korli at mail.berlios.de (korli at BerliOS) Date: Mon, 13 Oct 2008 22:19:13 +0200 Subject: [Haiku-commits] r28048 - haiku/trunk/src/data/etc/timezones Message-ID: <200810132019.m9DKJDPE004000@sheep.berlios.de> Author: korli Date: 2008-10-13 22:19:11 +0200 (Mon, 13 Oct 2008) New Revision: 28048 ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28048&view=rev Modified: haiku/trunk/src/data/etc/timezones/africa haiku/trunk/src/data/etc/timezones/asia haiku/trunk/src/data/etc/timezones/europe haiku/trunk/src/data/etc/timezones/leapseconds haiku/trunk/src/data/etc/timezones/southamerica Log: update to tzdata2008g Modified: haiku/trunk/src/data/etc/timezones/africa =================================================================== --- haiku/trunk/src/data/etc/timezones/africa 2008-10-13 20:11:27 UTC (rev 28047) +++ haiku/trunk/src/data/etc/timezones/africa 2008-10-13 20:19:11 UTC (rev 28048) @@ -1,4 +1,4 @@ -# @(#)africa 8.13 +# @(#)africa 8.16 #
     
     # This data is by no means authoritative; if you think you know better,
    @@ -394,23 +394,70 @@
     # It seems that Mauritius observed daylight saving time from 1982-10-10 to 
     # 1983-03-20 as well, but that was not successful....
     # http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
    -#
    +
     # From Alex Krivenyshev (2008-06-25):
     # http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD
    -#
    +
     # From Arthur David Olson (2008-06-30):
     # The www.timeanddate.com article cited by Steffen Thorsen notes that "A
     # final decision has yet to be made on the times that daylight saving
     # would begin and end on these dates." As a place holder, use midnight.
    -#
    +
     # From Paul Eggert (2008-06-30):
     # Follow Thorsen on DST in 1982/1983, instead of Shanks & Pottenger.
     
    +# From Steffen Thorsen (2008-07-10):
    +# According to
    +# 
    +# http://www.lexpress.mu/display_article.php?news_id=111216
    +# 
    +# (in French), Mauritius will start and end their DST a few days earlier
    +# than previously announced (2008-11-01 to 2009-03-31).  The new start
    +# date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
    +# given, but it is probably at either 2 or 3 wall clock time).
    +# 
    +# A little strange though, since the article says that they moved the date 
    +# to align itself with Europe and USA which also change time on that date, 
    +# but that means they have not paid attention to what happened in 
    +# USA/Canada last year (DST ends first Sunday in November). I also wonder 
    +# why that they end on a Friday, instead of aligning with Europe which 
    +# changes two days later.
    +
    +# From Alex Krivenyshev (2008-07-11):
    +# Seems that English language article "The revival of daylight saving
    +# time:  Energy conservation?"-# No. 16578 (07/11/2008) was originally
    +# published on Monday, June 30, 2008...
    +#
    +# I guess that article in French "Le gouvernement avance l'introduction
    +# de l'heure d'ete" stating that DST in Mauritius starting on October 26
    +# and ending on March 27, 2009 is the most recent one.
    +# ...
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
    +# 
    +
    +# From Riad M. Hossen Ally (2008-08-03):
    +# The Government of Mauritius weblink
    +# 
    +# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=3D4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
    +# 
    +# Cabinet Decision of July 18th, 2008 states as follows:
    +#
    +# 4. ...Cabinet has agreed to the introduction into the National Assembly
    +# of the Time Bill which provides for the introduction of summer time in
    +# Mauritius. The summer time period which will be of one hour ahead of
    +# the standard time, will be aligned with that in Europe and the United
    +# States of America. It will start at two o'clock in the morning on the
    +# last Sunday of October and will end at two o'clock in the morning on
    +# the last Sunday of March the following year. The summer time for the
    +# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
    +# and end on 29 March 2009.
    +
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
     Rule Mauritius	1982	only	-	Oct	10	0:00	1:00	S
     Rule Mauritius	1983	only	-	Mar	21	0:00	0	-
    -Rule Mauritius	2008	only	-	Nov	 1	0:00	1:00	S
    -Rule Mauritius	2009	only	-	Apr	 1	0:00	0	-
    +Rule Mauritius	2008	max	-	Oct	lastSun	2:00	1:00	S
    +Rule Mauritius	2009	max	-	Mar	lastSun	2:00	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone Indian/Mauritius	3:50:00 -	LMT	1907		# Port Louis
     			4:00 Mauritius	MU%sT	# Mauritius Time
    @@ -475,7 +522,7 @@
     # published on the web.
     #
     # It's also confirmed here:
    -# 
    +# 
     # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
     # 
     # on a government portal as being  between june 1st and sept 27th (not yet
    @@ -495,7 +542,22 @@
     # From Arthur David Olson (2008-05-09):
     # XXX--guess that it is only Morocco for now; guess only 2008 for now.
     
    +# From Steffen Thorsen (2008-08-27):
    +# Morocco will change the clocks back on the midnight between August 31 
    +# and September 1. They originally planned to observe DST to near the end 
    +# of September:
    +#
    +# One article about it (in French):
    +# 
    +# http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
    +# 
    +#
    +# We have some further details posted here:
    +# 
    +# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
    +# 
     # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
    +
     Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	S
     Rule	Morocco	1939	only	-	Nov	19	 0:00	0	-
     Rule	Morocco	1940	only	-	Feb	25	 0:00	1:00	S
    @@ -512,7 +574,7 @@
     Rule	Morocco	1978	only	-	Jun	 1	 0:00	1:00	S
     Rule	Morocco	1978	only	-	Aug	 4	 0:00	0	-
     Rule	Morocco	2008	only	-	Jun	 1	 0:00	1:00	S
    -Rule	Morocco	2008	only	-	Sep	28	 0:00	0	-
    +Rule	Morocco	2008	only	-	Sep	 1	 0:00	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
     			 0:00	Morocco	WE%sT	1984 Mar 16
    
    Modified: haiku/trunk/src/data/etc/timezones/asia
    ===================================================================
    --- haiku/trunk/src/data/etc/timezones/asia	2008-10-13 20:11:27 UTC (rev 28047)
    +++ haiku/trunk/src/data/etc/timezones/asia	2008-10-13 20:19:11 UTC (rev 28048)
    @@ -1,4 +1,4 @@
    -# @(#)asia	8.21
    +# @(#)asia	8.23
     # 
     
     # This data is by no means authoritative; if you think you know better,
    @@ -1416,7 +1416,7 @@
     # From Steffen Thorsen (2008-03-31):
     # eznis airways, which operates several domestic flights, has a flight
     # schedule here:
    -# 
     # http://www.eznis.com/Container.jsp?id=112
     # 
     # (click the English flag for English)
    @@ -1541,11 +1541,24 @@
     # From Arthur David Olson (2008-05-19):
     # XXX--midnight transitions is a guess; 2008 only is a guess.
     
    +# From Alexander Krivenyshev (2008-08-28):
    +# Pakistan government has decided to keep the watches one-hour advanced
    +# for another 2 months--plan to return to Standard Time on October 31
    +# instead of August 31.
    +#
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_pakistan02.html
    +# 
    +# OR
    +# 
    +# http://dailymailnews.com/200808/28/news/dmbrn03.html
    +# 
    +
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
     Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
     Rule Pakistan	2002	only	-	Oct	Sun>=2	0:01	0	-
     Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
    -Rule Pakistan	2008	only	-	Sep	1	0:00	0	-
    +Rule Pakistan	2008	only	-	Nov	1	0:00	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Karachi	4:28:12 -	LMT	1907
     			5:30	-	IST	1942 Sep
    @@ -1665,6 +1678,23 @@
     # For lack of better information, predict that future changes will be
     # the 2nd Thursday of September at 02:00.
     
    +# From Alexander Krivenyshev (2008-08-28):
    +# Here is an article, that Mideast running on different clocks at Ramadan.
    +#
    +# Gaza Strip (as Egypt) ended DST at midnight Thursday (Aug 28, 2008), while
    +# the West Bank will end Daylight Saving Time at midnight Sunday (Aug 31, 2008).
    +#
    +# 
    +# http://www.guardian.co.uk/world/feedarticle/7759001
    +# 
    +# 
    +# http://www.abcnews.go.com/International/wireStory?id=5676087
    +# 
    +# or
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_gazastrip01.html
    +# 
    +
     # The rules for Egypt are stolen from the `africa' file.
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
     Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
    @@ -1680,7 +1710,8 @@
     Rule Palestine	2005	only	-	Oct	 4	2:00	0	-
     Rule Palestine	2006	max	-	Apr	 1	0:00	1:00	S
     Rule Palestine	2006	only	-	Sep	22	0:00	0	-
    -Rule Palestine	2007	max	-	Sep	Thu>=8	2:00	0	-
    +Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
    +Rule Palestine	2008	max	-	Aug	lastThu	2:00	0	-
     
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
    
    Modified: haiku/trunk/src/data/etc/timezones/europe
    ===================================================================
    --- haiku/trunk/src/data/etc/timezones/europe	2008-10-13 20:11:27 UTC (rev 28047)
    +++ haiku/trunk/src/data/etc/timezones/europe	2008-10-13 20:19:11 UTC (rev 28048)
    @@ -1,4 +1,4 @@
    -# @(#)europe	8.14
    +# @(#)europe	8.18
     # 
     
     # This data is by no means authoritative; if you think you know better,
    @@ -483,7 +483,45 @@
     Rule	C-Eur	1944	1945	-	Apr	Mon>=1	 2:00s	1:00	S
     # Whitman gives 1944 Oct 7; go with Shanks & Pottenger.
     Rule	C-Eur	1944	only	-	Oct	 2	 2:00s	0	-
    -Rule	C-Eur	1945	only	-	Sep	16	 2:00	0	-
    +# From Jesper Norgaard Welen (2008-07-13):
    +#
    +# I found what is probably a typo of 2:00 which should perhaps be 2:00s
    +# in the C-Eur rule from tz database version 2008d (this part was
    +# corrected in version 2008d). The circumstancial evidence is simply the
    +# tz database itself, as seen below:
    +#
    +# Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15  0:01
    +#    0:00 France WE%sT 1945 Sep 16  3:00
    +#
    +# Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
    +#    0:00 France WE%sT 1945 Sep 16 3:00
    +#
    +# Zone Europe/Belgrade 1:22:00 - LMT 1884
    +#    1:00 1:00 CEST 1945 Sep 16  2:00s
    +#
    +# Rule France 1945 only - Sep 16  3:00 0 -
    +# Rule Belgium 1945 only - Sep 16  2:00s 0 -
    +# Rule Neth 1945 only - Sep 16 2:00s 0 -
    +#
    +# The rule line to be changed is:
    +#
    +# Rule C-Eur 1945 only - Sep 16  2:00 0 -
    +#
    +# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
    +# 2:00 standard time, e.g. 3:00 local time.  However there are no
    +# countries that use C-Eur rules in September 1945, so the only items
    +# affected are apparently these ficticious zones that translates acronyms
    +# CET and MET:
    +#
    +# Zone CET  1:00 C-Eur CE%sT
    +# Zone MET  1:00 C-Eur ME%sT
    +#
    +# It this is right then the corrected version would look like:
    +#
    +# Rule C-Eur 1945 only - Sep 16  2:00s 0 -
    +#
    +# A small step for mankind though 8-)
    +Rule	C-Eur	1945	only	-	Sep	16	 2:00s	0	-
     Rule	C-Eur	1977	1980	-	Apr	Sun>=1	 2:00s	1:00	S
     Rule	C-Eur	1977	only	-	Sep	lastSun	 2:00s	0	-
     Rule	C-Eur	1978	only	-	Oct	 1	 2:00s	0	-
    @@ -726,7 +764,8 @@
     Zone	Europe/Sofia	1:33:16 -	LMT	1880
     			1:56:56	-	IMT	1894 Nov 30 # Istanbul MT?
     			2:00	-	EET	1942 Nov  2  3:00
    -			1:00	C-Eur	CE%sT	1945 Apr  2  3:00
    +			1:00	C-Eur	CE%sT	1945
    +			1:00	-	CET	1945 Apr 2 3:00
     			2:00	-	EET	1979 Mar 31 23:00
     			2:00	Bulg	EE%sT	1982 Sep 26  2:00
     			2:00	C-Eur	EE%sT	1991
    @@ -1094,8 +1133,8 @@
     # [See tz-link.htm for the URL.]
     
     # From Joerg Schilling (2002-10-23):
    -# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by 
    +# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
    +# 
     # General [Nikolai] Bersarin.
     
     # From Paul Eggert (2003-03-08):
    @@ -1204,7 +1243,7 @@
     Zone	Europe/Budapest	1:16:20 -	LMT	1890 Oct
     			1:00	C-Eur	CE%sT	1918
     			1:00	Hungary	CE%sT	1941 Apr  6  2:00
    -			1:00	C-Eur	CE%sT	1945 May  1 23:00
    +			1:00	C-Eur	CE%sT	1945
     			1:00	Hungary	CE%sT	1980 Sep 28  2:00s
     			1:00	EU	CE%sT
     
    @@ -2121,7 +2160,8 @@
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Europe/Belgrade	1:22:00	-	LMT	1884
     			1:00	-	CET	1941 Apr 18 23:00
    -			1:00	C-Eur	CE%sT	1945 May  8  2:00s
    +			1:00	C-Eur	CE%sT	1945
    +			1:00	-	CET	1945 May 8 2:00s
     			1:00	1:00	CEST	1945 Sep 16  2:00s
     # Metod Kozelj reports that the legal date of
     # transition to EU rules was 1982-11-27, for all of Yugoslavia at the time.
    @@ -2313,6 +2353,27 @@
     # (on a non-government server though) describing dates between 2002 and 2006:
     # http://www.alomaliye.com/bkk_2002_3769.htm
     
    +# From Sue Williams (2008-08-11):
    +# I spotted this news article about a potential change in Turkey.
    +#
    +# 
    +# http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1
    +# 
    +
    +# From Sue Williams (2008-08-20):
    +# This article says that around the end of March 2011, Turkey wants to
    +# adjust the clocks forward by 1/2 hour and stay that way permanently.
    +# The article indicates that this is a change in timezone offset in addition
    +# to stopping observance of DST.
    +# This proposal has not yet been approved.
    +#
    +# Read more here...
    +#
    +# Turkey to abandon daylight saving time in 2011
    +# 
    +# http://www.turkishdailynews.com.tr/article.php?enewsid=112989
    +# 
    +
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
     Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
     Rule	Turkey	1916	only	-	Oct	 1	0:00	0	-
    
    Modified: haiku/trunk/src/data/etc/timezones/leapseconds
    ===================================================================
    --- haiku/trunk/src/data/etc/timezones/leapseconds	2008-10-13 20:11:27 UTC (rev 28047)
    +++ haiku/trunk/src/data/etc/timezones/leapseconds	2008-10-13 20:19:11 UTC (rev 28048)
    @@ -1,4 +1,4 @@
    -# @(#)leapseconds	8.5
    +# @(#)leapseconds	8.6
     
     # Allowance for leapseconds added to each timezone file.
     
    @@ -44,40 +44,49 @@
     Leap	1997	Jun	30	23:59:60	+	S
     Leap	1998	Dec	31	23:59:60	+	S
     Leap	2005	Dec	31	23:59:60	+	S
    +Leap	2008	Dec	31	23:59:60	+	S
     
     # INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
     #
     # SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
     #
     # SERVICE DE LA ROTATION TERRESTRE
    -# OBSERVATOIRE DE PARIS				
    +# OBSERVATOIRE DE PARIS
     # 61, Av. de l'Observatoire 75014 PARIS (France)
     # Tel.      : 33 (0) 1 40 51 22 26
     # FAX       : 33 (0) 1 40 51 22 91
    -# Internet  : services.iers at obspm.fr
    +# e-mail    : services.iers at obspm.fr
    +# http://hpiers.obspm.fr/eop-pc
     #
    -# Paris, 18 January 2008
    +# Paris, 4 July 2008
     #
    -# Bulletin C 35
    +# Bulletin C 36
     #
    -# To authorities responsible		
    +# To authorities responsible
     # for the measurement and
    -# distribution of time	
    +# distribution of time
     #
    -# INFORMATION ON UTC - TAI
    +# UTC TIME STEP
    +# on the 1st of January 2009
     #
    -# NO positive leap second will be introduced at the end of June 2008.
    -# The difference between Coordinated Universal Time UTC and the
    -# International Atomic Time TAI is :		
    +# A positive leap second will be introduced at the end of December 2008.
    +# The sequence of dates of the UTC second markers will be:		
     #
    -# from 2006 January 1, 0h UTC, until further notice : UTC-TAI = -33 s
    +# 2008 December 31,     23h 59m 59s
    +# 2008 December 31,     23h 59m 60s
    +# 2009 January   1,      0h  0m  0s
     #
    +# The difference between UTC and the International Atomic Time TAI is:
    +#
    +# from 2006 January 1, 0h UTC, to 2009 January 1  0h UTC  : UTC-TAI = - 33s
    +# from 2009 January 1, 0h UTC, until further notice       : UTC-TAI = - 34s
    +#
     # Leap seconds can be introduced in UTC at the end of the months of December
    -# or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
    -# six months, either to announce a time step in UTC, or to confirm that there
    +# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
    +# six months, either to announce a time step in UTC or to confirm that there
     # will be no time step at the next possible date.
     #
     # Daniel GAMBIS
    -# Head			
    -# Earth Orientation Center of the IERS
    +# Head		
    +# Earth Orientation Center of IERS
     # Observatoire de Paris, France
    
    Modified: haiku/trunk/src/data/etc/timezones/southamerica
    ===================================================================
    --- haiku/trunk/src/data/etc/timezones/southamerica	2008-10-13 20:11:27 UTC (rev 28047)
    +++ haiku/trunk/src/data/etc/timezones/southamerica	2008-10-13 20:19:11 UTC (rev 28048)
    @@ -1,4 +1,4 @@
    -# @(#)southamerica	8.26
    +# @(#)southamerica	8.29
     # 
     
     # This data is by no means authoritative; if you think you know better,
    @@ -164,9 +164,22 @@
     # From Paul Eggert (2007-12-22):
     # For dates after mid-2008, the following rules are my guesses and
     # are quite possibly wrong, but are more likely than no DST at all.
    +
    +# From Alexander Krivenyshev (2008-09-05):
    +# As per message from Carlos Alberto Fonseca Arauz (Nicaragua),
    +# Argentina will start DST on Sunday October 19, 2008.
    +#
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_argentina03.html
    +# 
    +# OR
    +# 
    +# http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish)
    +# 
    +
     Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
     Rule	Arg	2008	max	-	Mar	Sun>=15	0:00	0	-
    -Rule	Arg	2008	max	-	Oct	Sun>=1	0:00	1:00	S
    +Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:00	S
      
     # From Mariano Absatz (2004-05-21):
     # Today it was officially published that the Province of Mendoza is changing
    @@ -591,6 +604,36 @@
     # Decretos sobre o Horario de Verao no Brasil
     # .
     
    +# From Steffen Thorsen (2008-08-29):
    +# As announced by the government and many newspapers in Brazil late
    +# yesterday, Brazil will start DST on 2008-10-19 (need to change rule) and
    +# it will end on 2009-02-15 (current rule for Brazil is fine). Based on
    +# past years experience with the elections, there was a good chance that
    +# the start was postponed to November, but it did not happen this year.
    +#
    +# It has not yet been posted to http://pcdsh01.on.br/DecHV.html
    +#
    +# An official page about it:
    +# 
    +# http://www.mme.gov.br/site/news/detail.do?newsId=16722
    +# 
    +# Note that this link does not always work directly, but must be accessed
    +# by going to
    +# 
    +# http://www.mme.gov.br/first
    +# 
    +#
    +# One example link that works directly:
    +# 
    +# http://jornale.com.br/index.php?option=com_content&task=view&id=13530&Itemid=54
    +# (Portuguese)
    +# 
    +#
    +# We have a written a short article about it as well:
    +# 
    +# http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
    +# 
    +
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
     # Decree 20,466 (1931-10-01)
     # Decree 21,896 (1932-01-10)
    @@ -724,12 +767,34 @@
     Rule	Brazil	2007	only	-	Feb	25	 0:00	0	-
     # Decree 6,212 (2007-09-26),
     # adopted by the same states as before.
    -Rule	Brazil	2007	max	-	Oct	Sun>=8	 0:00	1:00	S
    -Rule	Brazil	2008	max	-	Feb	Sun>=15	 0:00	0	-
    +Rule	Brazil	2007	only	-	Oct	Sun>=8	 0:00	1:00	S
    +# From Frederico A. C. Neves (2008-09-10):
    +# Acording to this decree
    +# 
    +# http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm
    +# 
    +# [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the
    +# 3rd Feb Sunday. There is an exception on the return date when this is
    +# the Carnival Sunday then the return date will be the next Sunday...
    +Rule	Brazil	2008	max	-	Oct	Sun>=15	0:00	1:00	S
    +Rule	Brazil	2008	2011	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2012	only	-	Feb	Sun>=22	0:00	0	-
    +Rule	Brazil	2013	2014	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2015	only	-	Feb	Sun>=22	0:00	0	-
    +Rule	Brazil	2016	2022	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2023	only	-	Feb	Sun>=22	0:00	0	-
    +Rule	Brazil	2024	2025	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2026	only	-	Feb	Sun>=22	0:00	0	-
    +Rule	Brazil	2027	2033	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2034	only	-	Feb	Sun>=22	0:00	0	-
    +Rule	Brazil	2035	2036	-	Feb	Sun>=15	0:00	0	-
    +Rule	Brazil	2037	only	-	Feb	Sun>=22	0:00	0	-
    +# From Arthur David Olson (2008-09-29):
    +# The next is wrong in some years but is better than nothing.
    +Rule	Brazil	2038	max	-	Feb	Sun>=15	0:00	0	-
    +
     # The latest ruleset listed above says that the following states observe DST:
     # DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP.
    -# For dates after mid-2008, the above rules with TO="max" are guesses
    -# and are quite possibly wrong, but are more likely than no DST at all.
     
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     #
    
    
    
    From anevilyak at mail.berlios.de  Mon Oct 13 22:57:39 2008
    From: anevilyak at mail.berlios.de (anevilyak at BerliOS)
    Date: Mon, 13 Oct 2008 22:57:39 +0200
    Subject: [Haiku-commits] r28049 -
    	haiku/trunk/src/add-ons/kernel/bus_managers/ata
    Message-ID: <200810132057.m9DKvcYO015884@sheep.berlios.de>
    
    Author: anevilyak
    Date: 2008-10-13 22:57:37 +0200 (Mon, 13 Oct 2008)
    New Revision: 28049
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28049&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/bus_managers/ata/emulation.c
       haiku/trunk/src/add-ons/kernel/bus_managers/ata/pio.c
    Log:
    Adjust ata bus manager to compensate for r27979.
    
    
    
    Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ata/emulation.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/bus_managers/ata/emulation.c	2008-10-13 20:19:11 UTC (rev 28048)
    +++ haiku/trunk/src/add-ons/kernel/bus_managers/ata/emulation.c	2008-10-13 20:57:37 UTC (rev 28049)
    @@ -58,7 +58,7 @@
     		bytes = min(bytes, sgList->size);
     
     		if (vm_get_physical_page((addr_t)sgList->address, &virtualAddress,
    -				PHYSICAL_PAGE_CAN_WAIT) != B_OK) 
    +				0) != B_OK) 
     			return false;
     
     		SHOW_FLOW(4, "buffer=%p, virt_addr=%p, bytes=%d, to_buffer=%d",
    
    Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ata/pio.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/bus_managers/ata/pio.c	2008-10-13 20:19:11 UTC (rev 28048)
    +++ haiku/trunk/src/add-ons/kernel/bus_managers/ata/pio.c	2008-10-13 20:57:37 UTC (rev 28049)
    @@ -152,7 +152,7 @@
     			physicalAddress, length);
     
     		if (vm_get_physical_page(physicalAddress, &virtualAddress,
    -				PHYSICAL_PAGE_CAN_WAIT) != B_OK) {
    +				0) != B_OK) {
     			// ouch: this should never ever happen
     //xxx fix this			set_sense(device, SCSIS_KEY_HARDWARE_ERROR, SCSIS_ASC_INTERNAL_FAILURE);
     			return B_ERROR;
    
    
    
    From korli at mail.berlios.de  Mon Oct 13 23:10:54 2008
    From: korli at mail.berlios.de (korli at BerliOS)
    Date: Mon, 13 Oct 2008 23:10:54 +0200
    Subject: [Haiku-commits] r28050 - in haiku/trunk: build/jam
    	headers/build/os/opengl/GL src/kits/opengl/mesa
    Message-ID: <200810132110.m9DLAsos018504@sheep.berlios.de>
    
    Author: korli
    Date: 2008-10-13 23:10:52 +0200 (Mon, 13 Oct 2008)
    New Revision: 28050
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28050&view=rev
    
    Modified:
       haiku/trunk/build/jam/BuildSetup
       haiku/trunk/headers/build/os/opengl/GL/gl.h
       haiku/trunk/headers/build/os/opengl/GL/glext.h
       haiku/trunk/headers/build/os/opengl/GL/glu.h
       haiku/trunk/headers/build/os/opengl/GL/glut.h
       haiku/trunk/src/kits/opengl/mesa/Jamfile
    Log:
    * updated build opengl headers to 7.2
    * added opengl to build be api headers
    * define USES_BE_API for gen_matypes
    this should fix the build for Linux which don't provide GL headers :)
    
    
    Modified: haiku/trunk/build/jam/BuildSetup
    ===================================================================
    --- haiku/trunk/build/jam/BuildSetup	2008-10-13 20:57:37 UTC (rev 28049)
    +++ haiku/trunk/build/jam/BuildSetup	2008-10-13 21:10:52 UTC (rev 28050)
    @@ -734,6 +734,7 @@
     		[ FDirName $(HAIKU_TOP) headers build os drivers ]
     		[ FDirName $(HAIKU_TOP) headers build os kernel ]
     		[ FDirName $(HAIKU_TOP) headers build os interface ]
    +		[ FDirName $(HAIKU_TOP) headers build os opengl ]
     		[ FDirName $(HAIKU_TOP) headers build os storage ]
     		[ FDirName $(HAIKU_TOP) headers build os support ]
     	;
    
    Modified: haiku/trunk/headers/build/os/opengl/GL/gl.h
    ===================================================================
    --- haiku/trunk/headers/build/os/opengl/GL/gl.h	2008-10-13 20:57:37 UTC (rev 28049)
    +++ haiku/trunk/headers/build/os/opengl/GL/gl.h	2008-10-13 21:10:52 UTC (rev 28050)
    @@ -1,8 +1,8 @@
     /*
      * Mesa 3-D graphics library
    - * Version:  6.3
    + * Version:  6.5.1
      *
    - * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
    + * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
      *
      * Permission is hereby granted, free of charge, to any person obtaining a
      * copy of this software and associated documentation files (the "Software"),
    @@ -39,7 +39,6 @@
     #if !defined(__SCITECH_SNAP__)
     
     #if defined(__BEOS__)
    -#include 
     #include      /* to get some BeOS-isms */
     #endif
     
    @@ -63,6 +62,9 @@
     #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
     #  define GLAPI extern
     #  define GLAPIENTRY __stdcall
    +#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
    +#  define GLAPI __attribute__((visibility("default")))
    +#  define GLAPIENTRY
     #endif /* WIN32 && !CYGWIN */
     
     #if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
    @@ -82,7 +84,8 @@
     #include 
     #endif
     
    -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
    +#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) \
    +     && !defined(OPENSTEP) && !defined(__CYGWIN__) || defined(__MINGW32__)
     #include 
     #endif
     
    @@ -102,7 +105,7 @@
     #define APIENTRY GLAPIENTRY
     #endif
     
    -/* "P" suffix for when function returns a pointer */
    +/* "P" suffix to be used for a pointer to a function */
     #ifndef APIENTRYP
     #define APIENTRYP APIENTRY *
     #endif
    @@ -439,16 +442,16 @@
     #define GL_OR_INVERTED				0x150D
     
     /* Stencil */
    +#define GL_STENCIL_BITS				0x0D57
     #define GL_STENCIL_TEST				0x0B90
    -#define GL_STENCIL_WRITEMASK			0x0B98
    -#define GL_STENCIL_BITS				0x0D57
    +#define GL_STENCIL_CLEAR_VALUE			0x0B91
     #define GL_STENCIL_FUNC				0x0B92
     #define GL_STENCIL_VALUE_MASK			0x0B93
    -#define GL_STENCIL_REF				0x0B97
     #define GL_STENCIL_FAIL				0x0B94
    +#define GL_STENCIL_PASS_DEPTH_FAIL		0x0B95
     #define GL_STENCIL_PASS_DEPTH_PASS		0x0B96
    -#define GL_STENCIL_PASS_DEPTH_FAIL		0x0B95
    -#define GL_STENCIL_CLEAR_VALUE			0x0B91
    +#define GL_STENCIL_REF				0x0B97
    +#define GL_STENCIL_WRITEMASK			0x0B98
     #define GL_STENCIL_INDEX			0x1901
     #define GL_KEEP					0x1E00
     #define GL_REPLACE				0x1E01
    @@ -498,16 +501,16 @@
     
     /* Implementation limits */
     #define GL_MAX_LIST_NESTING			0x0B31
    +#define GL_MAX_EVAL_ORDER			0x0D30
    +#define GL_MAX_LIGHTS				0x0D31
    +#define GL_MAX_CLIP_PLANES			0x0D32
    +#define GL_MAX_TEXTURE_SIZE			0x0D33
    +#define GL_MAX_PIXEL_MAP_TABLE			0x0D34
     #define GL_MAX_ATTRIB_STACK_DEPTH		0x0D35
     #define GL_MAX_MODELVIEW_STACK_DEPTH		0x0D36
     #define GL_MAX_NAME_STACK_DEPTH			0x0D37
     #define GL_MAX_PROJECTION_STACK_DEPTH		0x0D38
     #define GL_MAX_TEXTURE_STACK_DEPTH		0x0D39
    -#define GL_MAX_EVAL_ORDER			0x0D30
    -#define GL_MAX_LIGHTS				0x0D31
    -#define GL_MAX_CLIP_PLANES			0x0D32
    -#define GL_MAX_TEXTURE_SIZE			0x0D33
    -#define GL_MAX_PIXEL_MAP_TABLE			0x0D34
     #define GL_MAX_VIEWPORT_DIMS			0x0D3A
     #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH	0x0D3B
     
    @@ -565,22 +568,22 @@
     #define GL_MAP2_GRID_DOMAIN			0x0DD2
     #define GL_MAP2_GRID_SEGMENTS			0x0DD3
     #define GL_COEFF				0x0A00
    +#define GL_ORDER				0x0A01
     #define GL_DOMAIN				0x0A02
    -#define GL_ORDER				0x0A01
     
     /* Hints */
    -#define GL_FOG_HINT				0x0C54
    -#define GL_LINE_SMOOTH_HINT			0x0C52
     #define GL_PERSPECTIVE_CORRECTION_HINT		0x0C50
     #define GL_POINT_SMOOTH_HINT			0x0C51
    +#define GL_LINE_SMOOTH_HINT			0x0C52
     #define GL_POLYGON_SMOOTH_HINT			0x0C53
    +#define GL_FOG_HINT				0x0C54
     #define GL_DONT_CARE				0x1100
     #define GL_FASTEST				0x1101
     #define GL_NICEST				0x1102
     
     /* Scissor box */
    +#define GL_SCISSOR_BOX				0x0C10
     #define GL_SCISSOR_TEST				0x0C11
    -#define GL_SCISSOR_BOX				0x0C10
     
     /* Pixel Mode / Transfer */
     #define GL_MAP_COLOR				0x0D10
    @@ -685,8 +688,8 @@
     
     /* Errors */
     #define GL_NO_ERROR 				0x0
    +#define GL_INVALID_ENUM				0x0500
     #define GL_INVALID_VALUE			0x0501
    -#define GL_INVALID_ENUM				0x0500
     #define GL_INVALID_OPERATION			0x0502
     #define GL_STACK_OVERFLOW			0x0503
     #define GL_STACK_UNDERFLOW			0x0504
    @@ -851,7 +854,7 @@
     
     GLAPI GLenum GLAPIENTRY glGetError( void );
     
    -GLAPI const GLubyte GLAPIENTRYP glGetString( GLenum name );
    +GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
     
     GLAPI void GLAPIENTRY glFinish( void );
     
    @@ -2150,37 +2153,26 @@
     
     
     
    -/*
    - * ???. GL_MESA_trace
    - * XXX obsolete
    - */
    -#ifndef GL_MESA_trace
    -#define GL_MESA_trace 1
    +#if GL_ARB_shader_objects
     
    -#define GL_TRACE_ALL_BITS_MESA			0xFFFF
    -#define GL_TRACE_OPERATIONS_BIT_MESA		0x0001
    -#define GL_TRACE_PRIMITIVES_BIT_MESA		0x0002
    -#define GL_TRACE_ARRAYS_BIT_MESA		0x0004
    -#define GL_TRACE_TEXTURES_BIT_MESA		0x0008
    -#define GL_TRACE_PIXELS_BIT_MESA		0x0010
    -#define GL_TRACE_ERRORS_BIT_MESA		0x0020
    -#define GL_TRACE_MASK_MESA			0x8755
    -#define GL_TRACE_NAME_MESA			0x8756
    +#ifndef GL_MESA_shader_debug
    +#define GL_MESA_shader_debug 1
     
    -GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask );
    -GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask );
    -GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName );
    -GLAPI void GLAPIENTRY glEndTraceMESA( void );
    -GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask );
    -GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment );
    -GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment );
    -GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment );
    -GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment );
    -GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment );
    +#define GL_DEBUG_OBJECT_MESA              0x8759
    +#define GL_DEBUG_PRINT_MESA               0x875A
    +#define GL_DEBUG_ASSERT_MESA              0x875B
     
    -#endif /* GL_MESA_trace */
    +GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
    +GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
    +GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
    +                                         GLsizei *length, GLcharARB *debugLog);
    +GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
     
    +#endif /* GL_MESA_shader_debug */
     
    +#endif /* GL_ARB_shader_objects */
    +
    +
     /*
      * ???. GL_MESA_packed_depth_stencil
      * XXX obsolete
    @@ -2211,17 +2203,46 @@
     
     typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
     
    -extern void
    -glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback,
    -                      GLvoid *data);
    +GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
     
    -extern void
    -glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name,
    -                           GLfloat *v);
    +GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
     
     #endif /* GL_MESA_program_debug */
     
     
    +#ifndef GL_MESA_texture_array
    +#define GL_MESA_texture_array 1
    +
    +/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
    + */
    +#ifndef GL_EXT_texture_array
    +
    +#ifdef GL_GLEXT_PROTOTYPES
    +GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
    +    GLenum attachment, GLuint texture, GLint level, GLint layer);
    +#endif /* GL_GLEXT_PROTOTYPES */
    +
    +#if 0
    +/* (temporarily) disabled because of collision with typedef in glext.h
    + * that happens if apps include both gl.h and glext.h
    + */
    +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
    +    GLenum attachment, GLuint texture, GLint level, GLint layer);
    +#endif
    +
    +#define GL_TEXTURE_1D_ARRAY_EXT         0x8C18
    +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT   0x8C19
    +#define GL_TEXTURE_2D_ARRAY_EXT         0x8C1A
    +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT   0x8C1B
    +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
    +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
    +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
    +#endif
    +
    +#endif
    +
    +
     #ifndef GL_ATI_blend_equation_separate
     #define GL_ATI_blend_equation_separate 1
     
    @@ -2233,17 +2254,7 @@
     #endif /* GL_ATI_blend_equation_separate */
     
     
    -/* As soon as the official glext.h is updated to include this, it will be 
    - * removed from here.
    - */
    -#ifndef GL_OES_read_format
    -#define GL_OES_read_format 1
     
    -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES   0x8B9A
    -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
    -
    -#endif /* GL_OES_read_format */
    -
     /**
      ** NOTE!!!!!  If you add new functions to this file, or update
      ** glext.h be sure to regenerate the gl_mangle.h file.  See comments
    @@ -2251,6 +2262,7 @@
      **/
     
     
    +
     /**********************************************************************
      * Begin system-specific stuff
      */
    
    Modified: haiku/trunk/headers/build/os/opengl/GL/glext.h
    ===================================================================
    --- haiku/trunk/headers/build/os/opengl/GL/glext.h	2008-10-13 20:57:37 UTC (rev 28049)
    +++ haiku/trunk/headers/build/os/opengl/GL/glext.h	2008-10-13 21:10:52 UTC (rev 28050)
    @@ -6,32 +6,26 @@
     #endif
     
     /*
    -** License Applicability. Except to the extent portions of this file are
    -** made subject to an alternative license as permitted in the SGI Free
    -** Software License B, Version 1.1 (the "License"), the contents of this
    -** file are subject only to the provisions of the License. You may not use
    -** this file except in compliance with the License. You may obtain a copy
    -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
    -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
    +** Copyright (c) 2007 The Khronos Group Inc.
     ** 
    -** http://oss.sgi.com/projects/FreeB
    +** Permission is hereby granted, free of charge, to any person obtaining a
    +** copy of this software and/or associated documentation files (the
    +** "Materials"), to deal in the Materials without restriction, including
    +** without limitation the rights to use, copy, modify, merge, publish,
    +** distribute, sublicense, and/or sell copies of the Materials, and to
    +** permit persons to whom the Materials are furnished to do so, subject to
    +** the following conditions:
     ** 
    -** Note that, as provided in the License, the Software is distributed on an
    -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
    -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
    -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
    -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
    +** The above copyright notice and this permission notice shall be included
    +** in all copies or substantial portions of the Materials.
     ** 
    -** Original Code. The Original Code is: OpenGL Sample Implementation,
    -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
    -** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
    -** Copyright in any portions created by third parties is as indicated
    -** elsewhere herein. All Rights Reserved.
    -** 
    -** Additional Notice Provisions: This software was created using the
    -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
    -** not been independently verified as being compliant with the OpenGL(R)
    -** version 1.2.1 Specification.
    +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
     */
     
     #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
    @@ -52,9 +46,9 @@
     /*************************************************************/
     
     /* Header file version number, required by OpenGL ABI for Linux */
    -/* glext.h last updated 2004/7/26 */
    -/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
    -#define GL_GLEXT_VERSION 24
    +/* glext.h last updated 2008/08/10 */
    +/* Current version at http://www.opengl.org/registry/ */
    +#define GL_GLEXT_VERSION 41
     
     #ifndef GL_VERSION_1_2
     #define GL_UNSIGNED_BYTE_3_3_2            0x8032
    @@ -372,6 +366,230 @@
     #define GL_SRC2_ALPHA                     GL_SOURCE2_ALPHA
     #endif
     
    +#ifndef GL_VERSION_2_0
    +#define GL_BLEND_EQUATION_RGB             GL_BLEND_EQUATION
    +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622
    +#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623
    +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624
    +#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625
    +#define GL_CURRENT_VERTEX_ATTRIB          0x8626
    +#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
    +#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643
    +#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
    +#define GL_STENCIL_BACK_FUNC              0x8800
    +#define GL_STENCIL_BACK_FAIL              0x8801
    +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
    +#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
    +#define GL_MAX_DRAW_BUFFERS               0x8824
    +#define GL_DRAW_BUFFER0                   0x8825
    +#define GL_DRAW_BUFFER1                   0x8826
    +#define GL_DRAW_BUFFER2                   0x8827
    +#define GL_DRAW_BUFFER3                   0x8828
    +#define GL_DRAW_BUFFER4                   0x8829
    +#define GL_DRAW_BUFFER5                   0x882A
    +#define GL_DRAW_BUFFER6                   0x882B
    +#define GL_DRAW_BUFFER7                   0x882C
    +#define GL_DRAW_BUFFER8                   0x882D
    +#define GL_DRAW_BUFFER9                   0x882E
    +#define GL_DRAW_BUFFER10                  0x882F
    +#define GL_DRAW_BUFFER11                  0x8830
    +#define GL_DRAW_BUFFER12                  0x8831
    +#define GL_DRAW_BUFFER13                  0x8832
    +#define GL_DRAW_BUFFER14                  0x8833
    +#define GL_DRAW_BUFFER15                  0x8834
    +#define GL_BLEND_EQUATION_ALPHA           0x883D
    +#define GL_POINT_SPRITE                   0x8861
    +#define GL_COORD_REPLACE                  0x8862
    +#define GL_MAX_VERTEX_ATTRIBS             0x8869
    +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
    +#define GL_MAX_TEXTURE_COORDS             0x8871
    +#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
    +#define GL_FRAGMENT_SHADER                0x8B30
    +#define GL_VERTEX_SHADER                  0x8B31
    +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
    +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
    +#define GL_MAX_VARYING_FLOATS             0x8B4B
    +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
    +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
    +#define GL_SHADER_TYPE                    0x8B4F
    +#define GL_FLOAT_VEC2                     0x8B50
    +#define GL_FLOAT_VEC3                     0x8B51
    +#define GL_FLOAT_VEC4                     0x8B52
    +#define GL_INT_VEC2                       0x8B53
    +#define GL_INT_VEC3                       0x8B54
    +#define GL_INT_VEC4                       0x8B55
    +#define GL_BOOL                           0x8B56
    +#define GL_BOOL_VEC2                      0x8B57
    +#define GL_BOOL_VEC3                      0x8B58
    +#define GL_BOOL_VEC4                      0x8B59
    +#define GL_FLOAT_MAT2                     0x8B5A
    +#define GL_FLOAT_MAT3                     0x8B5B
    +#define GL_FLOAT_MAT4                     0x8B5C
    +#define GL_SAMPLER_1D                     0x8B5D
    +#define GL_SAMPLER_2D                     0x8B5E
    +#define GL_SAMPLER_3D                     0x8B5F
    +#define GL_SAMPLER_CUBE                   0x8B60
    +#define GL_SAMPLER_1D_SHADOW              0x8B61
    +#define GL_SAMPLER_2D_SHADOW              0x8B62
    +#define GL_DELETE_STATUS                  0x8B80
    +#define GL_COMPILE_STATUS                 0x8B81
    +#define GL_LINK_STATUS                    0x8B82
    +#define GL_VALIDATE_STATUS                0x8B83
    +#define GL_INFO_LOG_LENGTH                0x8B84
    +#define GL_ATTACHED_SHADERS               0x8B85
    +#define GL_ACTIVE_UNIFORMS                0x8B86
    +#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
    +#define GL_SHADER_SOURCE_LENGTH           0x8B88
    +#define GL_ACTIVE_ATTRIBUTES              0x8B89
    +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
    +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
    +#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
    +#define GL_CURRENT_PROGRAM                0x8B8D
    +#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0
    +#define GL_LOWER_LEFT                     0x8CA1
    +#define GL_UPPER_LEFT                     0x8CA2
    +#define GL_STENCIL_BACK_REF               0x8CA3
    +#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
    +#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
    +#endif
    +
    +#ifndef GL_VERSION_2_1
    +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
    +#define GL_PIXEL_PACK_BUFFER              0x88EB
    +#define GL_PIXEL_UNPACK_BUFFER            0x88EC
    +#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED
    +#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF
    +#define GL_FLOAT_MAT2x3                   0x8B65
    +#define GL_FLOAT_MAT2x4                   0x8B66
    +#define GL_FLOAT_MAT3x2                   0x8B67
    +#define GL_FLOAT_MAT3x4                   0x8B68
    +#define GL_FLOAT_MAT4x2                   0x8B69
    +#define GL_FLOAT_MAT4x3                   0x8B6A
    +#define GL_SRGB                           0x8C40
    +#define GL_SRGB8                          0x8C41
    +#define GL_SRGB_ALPHA                     0x8C42
    +#define GL_SRGB8_ALPHA8                   0x8C43
    +#define GL_SLUMINANCE_ALPHA               0x8C44
    +#define GL_SLUMINANCE8_ALPHA8             0x8C45
    +#define GL_SLUMINANCE                     0x8C46
    +#define GL_SLUMINANCE8                    0x8C47
    +#define GL_COMPRESSED_SRGB                0x8C48
    +#define GL_COMPRESSED_SRGB_ALPHA          0x8C49
    +#define GL_COMPRESSED_SLUMINANCE          0x8C4A
    +#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B
    +#endif
    +
    +#ifndef GL_VERSION_3_0
    +#define GL_COMPARE_REF_TO_TEXTURE         GL_COMPARE_R_TO_TEXTURE_ARB
    +#define GL_CLIP_DISTANCE0                 GL_CLIP_PLANE0
    +#define GL_CLIP_DISTANCE1                 GL_CLIP_PLANE1
    +#define GL_CLIP_DISTANCE2                 GL_CLIP_PLANE2
    +#define GL_CLIP_DISTANCE3                 GL_CLIP_PLANE3
    +#define GL_CLIP_DISTANCE4                 GL_CLIP_PLANE4
    +#define GL_CLIP_DISTANCE5                 GL_CLIP_PLANE5
    +#define GL_MAX_CLIP_DISTANCES             GL_MAX_CLIP_PLANES
    +#define GL_MAJOR_VERSION                  0x821B
    +#define GL_MINOR_VERSION                  0x821C
    +#define GL_NUM_EXTENSIONS                 0x821D
    +#define GL_CONTEXT_FLAGS                  0x821E
    +#define GL_DEPTH_BUFFER                   0x8223
    +#define GL_STENCIL_BUFFER                 0x8224
    +#define GL_COMPRESSED_RED                 0x8225
    +#define GL_COMPRESSED_RG                  0x8226
    +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
    +#define GL_RGBA32F                        0x8814
    +#define GL_RGB32F                         0x8815
    +#define GL_RGBA16F                        0x881A
    +#define GL_RGB16F                         0x881B
    +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD
    +#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF
    +#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904
    +#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905
    +#define GL_CLAMP_VERTEX_COLOR             0x891A
    +#define GL_CLAMP_FRAGMENT_COLOR           0x891B
    +#define GL_CLAMP_READ_COLOR               0x891C
    +#define GL_FIXED_ONLY                     0x891D
    +#define GL_MAX_VARYING_COMPONENTS         GL_MAX_VARYING_FLOATS
    +#define GL_TEXTURE_RED_TYPE               0x8C10
    +#define GL_TEXTURE_GREEN_TYPE             0x8C11
    +#define GL_TEXTURE_BLUE_TYPE              0x8C12
    +#define GL_TEXTURE_ALPHA_TYPE             0x8C13
    +#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14
    +#define GL_TEXTURE_INTENSITY_TYPE         0x8C15
    +#define GL_TEXTURE_DEPTH_TYPE             0x8C16
    +#define GL_UNSIGNED_NORMALIZED            0x8C17
    +#define GL_TEXTURE_1D_ARRAY               0x8C18
    +#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19
    +#define GL_TEXTURE_2D_ARRAY               0x8C1A
    +#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B
    +#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C
    +#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D
    +#define GL_R11F_G11F_B10F                 0x8C3A
    +#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B
    +#define GL_RGB9_E5                        0x8C3D
    +#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E
    +#define GL_TEXTURE_SHARED_SIZE            0x8C3F
    +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
    +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
    +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
    +#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83
    +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
    +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
    +#define GL_PRIMITIVES_GENERATED           0x8C87
    +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
    +#define GL_RASTERIZER_DISCARD             0x8C89
    +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
    +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
    +#define GL_INTERLEAVED_ATTRIBS            0x8C8C
    +#define GL_SEPARATE_ATTRIBS               0x8C8D
    +#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E
    +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
    +#define GL_RGBA32UI                       0x8D70
    +#define GL_RGB32UI                        0x8D71
    +#define GL_RGBA16UI                       0x8D76
    +#define GL_RGB16UI                        0x8D77
    +#define GL_RGBA8UI                        0x8D7C
    +#define GL_RGB8UI                         0x8D7D
    +#define GL_RGBA32I                        0x8D82
    +#define GL_RGB32I                         0x8D83
    +#define GL_RGBA16I                        0x8D88
    +#define GL_RGB16I                         0x8D89
    +#define GL_RGBA8I                         0x8D8E
    +#define GL_RGB8I                          0x8D8F
    +#define GL_RED_INTEGER                    0x8D94
    +#define GL_GREEN_INTEGER                  0x8D95
    +#define GL_BLUE_INTEGER                   0x8D96
    +#define GL_ALPHA_INTEGER                  0x8D97
    +#define GL_RGB_INTEGER                    0x8D98
    +#define GL_RGBA_INTEGER                   0x8D99
    +#define GL_BGR_INTEGER                    0x8D9A
    +#define GL_BGRA_INTEGER                   0x8D9B
    +#define GL_SAMPLER_1D_ARRAY               0x8DC0
    +#define GL_SAMPLER_2D_ARRAY               0x8DC1
    +#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3
    +#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
    +#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
    +#define GL_UNSIGNED_INT_VEC2              0x8DC6
    +#define GL_UNSIGNED_INT_VEC3              0x8DC7
    +#define GL_UNSIGNED_INT_VEC4              0x8DC8
    +#define GL_INT_SAMPLER_1D                 0x8DC9
    +#define GL_INT_SAMPLER_2D                 0x8DCA
    +#define GL_INT_SAMPLER_3D                 0x8DCB
    +#define GL_INT_SAMPLER_CUBE               0x8DCC
    +#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE
    +#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
    +#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1
    +#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
    +#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
    +#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
    +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6
    +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
    +#define GL_QUERY_WAIT                     0x8E13
    +#define GL_QUERY_NO_WAIT                  0x8E14
    +#define GL_QUERY_BY_REGION_WAIT           0x8E15
    +#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16
    +#endif
    +
     #ifndef GL_ARB_multitexture
     #define GL_TEXTURE0_ARB                   0x84C0
     #define GL_TEXTURE1_ARB                   0x84C1
    @@ -825,6 +1043,217 @@
     #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
     #endif
     
    +#ifndef GL_ARB_color_buffer_float
    +#define GL_RGBA_FLOAT_MODE_ARB            0x8820
    +#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A
    +#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B
    +#define GL_CLAMP_READ_COLOR_ARB           0x891C
    +#define GL_FIXED_ONLY_ARB                 0x891D
    +#endif
    +
    +#ifndef GL_ARB_half_float_pixel
    +#define GL_HALF_FLOAT_ARB                 0x140B
    +#endif
    +
    +#ifndef GL_ARB_texture_float
    +#define GL_TEXTURE_RED_TYPE_ARB           0x8C10
    +#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11
    +#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12
    +#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13
    +#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14
    +#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15
    +#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16
    +#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17
    +#define GL_RGBA32F_ARB                    0x8814
    +#define GL_RGB32F_ARB                     0x8815
    +#define GL_ALPHA32F_ARB                   0x8816
    +#define GL_INTENSITY32F_ARB               0x8817
    +#define GL_LUMINANCE32F_ARB               0x8818
    +#define GL_LUMINANCE_ALPHA32F_ARB         0x8819
    +#define GL_RGBA16F_ARB                    0x881A
    +#define GL_RGB16F_ARB                     0x881B
    +#define GL_ALPHA16F_ARB                   0x881C
    +#define GL_INTENSITY16F_ARB               0x881D
    +#define GL_LUMINANCE16F_ARB               0x881E
    +#define GL_LUMINANCE_ALPHA16F_ARB         0x881F
    +#endif
    +
    +#ifndef GL_ARB_pixel_buffer_object
    +#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB
    +#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC
    +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED
    +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
    +#endif
    +
    +#ifndef GL_ARB_depth_buffer_float
    +#define GL_DEPTH_COMPONENT32F             0x8CAC
    +#define GL_DEPTH32F_STENCIL8              0x8CAD
    +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
    +#endif
    +
    +#ifndef GL_ARB_draw_instanced
    +#endif
    +
    +#ifndef GL_ARB_framebuffer_object
    +#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
    +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
    +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
    +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
    +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
    +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
    +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
    +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
    +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
    +#define GL_FRAMEBUFFER_DEFAULT            0x8218
    +#define GL_FRAMEBUFFER_UNDEFINED          0x8219
    +#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A
    +#define GL_INDEX                          0x8222
    +#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
    +#define GL_DEPTH_STENCIL                  0x84F9
    +#define GL_UNSIGNED_INT_24_8              0x84FA
    +#define GL_DEPTH24_STENCIL8               0x88F0
    +#define GL_TEXTURE_STENCIL_SIZE           0x88F1
    +#define GL_FRAMEBUFFER_BINDING            0x8CA6
    +#define GL_DRAW_FRAMEBUFFER_BINDING       GL_FRAMEBUFFER_BINDING
    +#define GL_RENDERBUFFER_BINDING           0x8CA7
    +#define GL_READ_FRAMEBUFFER               0x8CA8
    +#define GL_DRAW_FRAMEBUFFER               0x8CA9
    +#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA
    +#define GL_RENDERBUFFER_SAMPLES           0x8CAB
    +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
    +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
    +#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
    +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
    +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
    +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
    +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
    +#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
    +#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF
    +#define GL_COLOR_ATTACHMENT0              0x8CE0
    +#define GL_COLOR_ATTACHMENT1              0x8CE1
    +#define GL_COLOR_ATTACHMENT2              0x8CE2
    +#define GL_COLOR_ATTACHMENT3              0x8CE3
    +#define GL_COLOR_ATTACHMENT4              0x8CE4
    +#define GL_COLOR_ATTACHMENT5              0x8CE5
    +#define GL_COLOR_ATTACHMENT6              0x8CE6
    +#define GL_COLOR_ATTACHMENT7              0x8CE7
    +#define GL_COLOR_ATTACHMENT8              0x8CE8
    +#define GL_COLOR_ATTACHMENT9              0x8CE9
    +#define GL_COLOR_ATTACHMENT10             0x8CEA
    +#define GL_COLOR_ATTACHMENT11             0x8CEB
    +#define GL_COLOR_ATTACHMENT12             0x8CEC
    +#define GL_COLOR_ATTACHMENT13             0x8CED
    +#define GL_COLOR_ATTACHMENT14             0x8CEE
    +#define GL_COLOR_ATTACHMENT15             0x8CEF
    +#define GL_DEPTH_ATTACHMENT               0x8D00
    +#define GL_STENCIL_ATTACHMENT             0x8D20
    +#define GL_FRAMEBUFFER                    0x8D40
    +#define GL_RENDERBUFFER                   0x8D41
    +#define GL_RENDERBUFFER_WIDTH             0x8D42
    +#define GL_RENDERBUFFER_HEIGHT            0x8D43
    +#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
    +#define GL_STENCIL_INDEX1                 0x8D46
    +#define GL_STENCIL_INDEX4                 0x8D47
    +#define GL_STENCIL_INDEX8                 0x8D48
    +#define GL_STENCIL_INDEX16                0x8D49
    +#define GL_RENDERBUFFER_RED_SIZE          0x8D50
    +#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
    +#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
    +#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
    +#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
    +#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
    +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
    +#define GL_MAX_SAMPLES                    0x8D57
    +#endif
    +
    +#ifndef GL_ARB_framebuffer_sRGB
    +#define GL_FRAMEBUFFER_SRGB               0x8DB9
    +#endif
    +
    +#ifndef GL_ARB_geometry_shader4
    +#define GL_LINES_ADJACENCY_ARB            0x000A
    +#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B
    +#define GL_TRIANGLES_ADJACENCY_ARB        0x000C
    +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D
    +#define GL_PROGRAM_POINT_SIZE_ARB         0x8642
    +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
    +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
    +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
    +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
    +#define GL_GEOMETRY_SHADER_ARB            0x8DD9
    +#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA
    +#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB
    +#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC
    +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
    +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
    +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
    +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
    +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
    +#endif
    +
    +#ifndef GL_ARB_half_float_vertex
    +#define GL_HALF_FLOAT                     0x140B
    +#endif
    +
    +#ifndef GL_ARB_instanced_arrays
    +#endif
    +
    +#ifndef GL_ARB_map_buffer_range
    +#define GL_MAP_READ_BIT                   0x0001
    +#define GL_MAP_WRITE_BIT                  0x0002
    +#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004
    +#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008
    +#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010
    +#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020
    +#endif
    +
    +#ifndef GL_ARB_texture_buffer_object
    +#define GL_TEXTURE_BUFFER_ARB             0x8C2A
    +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B
    +#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C
    +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
    +#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E
    +#endif
    +
    +#ifndef GL_ARB_texture_compression_rgtc
    +#define GL_COMPRESSED_RED_RGTC1           0x8DBB
    +#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC
    +#define GL_COMPRESSED_RG_RGTC2            0x8DBD
    +#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE
    +#endif
    +
    +#ifndef GL_ARB_texture_rg
    +#define GL_RG                             0x8227
    +#define GL_RG_INTEGER                     0x8228
    +#define GL_R8                             0x8229
    +#define GL_R16                            0x822A
    +#define GL_RG8                            0x822B
    +#define GL_RG16                           0x822C
    +#define GL_R16F                           0x822D
    +#define GL_R32F                           0x822E
    +#define GL_RG16F                          0x822F
    +#define GL_RG32F                          0x8230
    +#define GL_R8I                            0x8231
    +#define GL_R8UI                           0x8232
    +#define GL_R16I                           0x8233
    +#define GL_R16UI                          0x8234
    +#define GL_R32I                           0x8235
    +#define GL_R32UI                          0x8236
    +#define GL_RG8I                           0x8237
    +#define GL_RG8UI                          0x8238
    +#define GL_RG16I                          0x8239
    +#define GL_RG16UI                         0x823A
    +#define GL_RG32I                          0x823B
    +#define GL_RG32UI                         0x823C
    +#endif
    +
    +#ifndef GL_ARB_vertex_array_object
    +#define GL_VERTEX_ARRAY_BINDING           0x85B5
    +#endif
    +
     #ifndef GL_EXT_abgr
     #define GL_ABGR_EXT                       0x8000
     #endif
    @@ -2793,6 +3222,11 @@
     #ifndef GL_ATI_vertex_attrib_array_object
     #endif
     
    +#ifndef GL_OES_read_format
    +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
    +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
    +#endif
    +
     #ifndef GL_EXT_depth_bounds_test
     #define GL_DEPTH_BOUNDS_TEST_EXT          0x8890
     #define GL_DEPTH_BOUNDS_EXT               0x8891
    @@ -2846,10 +3280,431 @@
     /* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
     #endif
     
    +#ifndef GL_EXT_framebuffer_object
    +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
    +#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
    +#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
    +#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
    +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
    +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
    +#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
    +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
    +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
    +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
    +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
    +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
    +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
    +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
    +#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
    +#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
    +#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
    +#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
    +#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
    +#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
    +#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
    +#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
    +#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
    +#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
    +#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
    +#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
    +#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
    +#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
    +#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
    +#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
    +#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
    +#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
    +#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
    +#define GL_FRAMEBUFFER_EXT                0x8D40
    +#define GL_RENDERBUFFER_EXT               0x8D41
    +#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
    +#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
    +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
    +#define GL_STENCIL_INDEX1_EXT             0x8D46
    +#define GL_STENCIL_INDEX4_EXT             0x8D47
    +#define GL_STENCIL_INDEX8_EXT             0x8D48
    +#define GL_STENCIL_INDEX16_EXT            0x8D49
    +#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
    +#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
    +#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
    +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
    +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
    +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55
    +#endif
     
    +#ifndef GL_GREMEDY_string_marker
    +#endif
    +
    +#ifndef GL_EXT_packed_depth_stencil
    +#define GL_DEPTH_STENCIL_EXT              0x84F9
    +#define GL_UNSIGNED_INT_24_8_EXT          0x84FA
    +#define GL_DEPTH24_STENCIL8_EXT           0x88F0
    +#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1
    +#endif
    +
    +#ifndef GL_EXT_stencil_clear_tag
    +#define GL_STENCIL_TAG_BITS_EXT           0x88F2
    +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3
    +#endif
    +
    +#ifndef GL_EXT_texture_sRGB
    +#define GL_SRGB_EXT                       0x8C40
    +#define GL_SRGB8_EXT                      0x8C41
    +#define GL_SRGB_ALPHA_EXT                 0x8C42
    +#define GL_SRGB8_ALPHA8_EXT               0x8C43
    +#define GL_SLUMINANCE_ALPHA_EXT           0x8C44
    +#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45
    +#define GL_SLUMINANCE_EXT                 0x8C46
    +#define GL_SLUMINANCE8_EXT                0x8C47
    +#define GL_COMPRESSED_SRGB_EXT            0x8C48
    +#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49
    +#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A
    +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
    +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C
    +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
    +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
    +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
    +#endif
    +
    +#ifndef GL_EXT_framebuffer_blit
    +#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
    +#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
    +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   GL_FRAMEBUFFER_BINDING_EXT
    +#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA
    +#endif
    +
    +#ifndef GL_EXT_framebuffer_multisample
    +#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB
    +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
    +#define GL_MAX_SAMPLES_EXT                0x8D57
    +#endif
    +
    +#ifndef GL_MESAX_texture_stack
    +#define GL_TEXTURE_1D_STACK_MESAX         0x8759
    +#define GL_TEXTURE_2D_STACK_MESAX         0x875A
    +#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B
    +#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C
    +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
    +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
    +#endif
    +
    +#ifndef GL_EXT_timer_query
    +#define GL_TIME_ELAPSED_EXT               0x88BF
    +#endif
    +
    +#ifndef GL_EXT_gpu_program_parameters
    +#endif
    +
    +#ifndef GL_APPLE_flush_buffer_range
    +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
    +#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13
    +#endif
    +
    +#ifndef GL_NV_gpu_program4
    +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904
    +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905
    +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906
    +#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907
    +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
    +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
    +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
    +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
    +#endif
    +
    +#ifndef GL_NV_geometry_program4
    +#define GL_LINES_ADJACENCY_EXT            0x000A
    +#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B
    +#define GL_TRIANGLES_ADJACENCY_EXT        0x000C
    +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D
    +#define GL_GEOMETRY_PROGRAM_NV            0x8C26
    +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
    +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
    +#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA
    +#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB
    +#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC
    +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
    +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
    +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
    +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
    +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
    +#define GL_PROGRAM_POINT_SIZE_EXT         0x8642
    +#endif
    +
    +#ifndef GL_EXT_geometry_shader4
    +#define GL_GEOMETRY_SHADER_EXT            0x8DD9
    +/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
    +/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
    +/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
    +/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
    +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
    +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
    +#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B
    +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
    +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
    +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
    +/* reuse GL_LINES_ADJACENCY_EXT */
    +/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
    +/* reuse GL_TRIANGLES_ADJACENCY_EXT */
    +/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
    +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
    +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
    +/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
    +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
    +/* reuse GL_PROGRAM_POINT_SIZE_EXT */
    +#endif
    +
    +#ifndef GL_NV_vertex_program4
    +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
    +#endif
    +
    +#ifndef GL_EXT_gpu_shader4
    
    [... truncated: 1306 lines follow ...]
    
    
    From korli at mail.berlios.de  Mon Oct 13 23:24:52 2008
    From: korli at mail.berlios.de (korli at BerliOS)
    Date: Mon, 13 Oct 2008 23:24:52 +0200
    Subject: [Haiku-commits] r28051 - haiku/trunk/src/kits/opengl/mesa
    Message-ID: <200810132124.m9DLOqsJ021906@sheep.berlios.de>
    
    Author: korli
    Date: 2008-10-13 23:24:51 +0200 (Mon, 13 Oct 2008)
    New Revision: 28051
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28051&view=rev
    
    Modified:
       haiku/trunk/src/kits/opengl/mesa/Jamfile
    Log:
    forgot to use HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
    
    
    Modified: haiku/trunk/src/kits/opengl/mesa/Jamfile
    ===================================================================
    --- haiku/trunk/src/kits/opengl/mesa/Jamfile	2008-10-13 21:10:52 UTC (rev 28050)
    +++ haiku/trunk/src/kits/opengl/mesa/Jamfile	2008-10-13 21:24:51 UTC (rev 28051)
    @@ -43,15 +43,16 @@
     
     rule MkMaTypes
     {
    -        MakeLocateArch $(<) ;
    -        Depends $(<) : gen_matypes ;
    -        MkMaTypes1 $(<) : gen_matypes ;
    -        LocalClean clean : $(<) ;
    +	MakeLocateArch $(<) ;
    +	Depends $(<) : gen_matypes ;
    +	MkMaTypes1 $(<) : gen_matypes ;
    +	LocalClean clean : $(<) ;
     }
     
     actions MkMaTypes1
     {
    -        $(2) > $(1) ;
    +	$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR);
    +	$(2) > $(1) ;
     }
     
     
    
    
    
    From bga at bug-br.org.br  Mon Oct 13 23:45:30 2008
    From: bga at bug-br.org.br (Bruno G. Albuquerque)
    Date: Mon, 13 Oct 2008 18:45:30 -0300
    Subject: [Haiku-commits]
     =?iso-8859-15?q?r27942_-_haiku/trunk/src/add-ons/?=
     =?iso-8859-15?q?media/plugins/mp3=5Freader?=
    In-Reply-To: 
    Message-ID: <613729286-BeMail@Gaspode>
    
    On Mon, 13 Oct 2008 21:52:06 +1100, David McPaul said:
    
    > >> I have committed a fix for this.  Let me know if there are any issues.
    > >
    > > Yep. It is way better, but seeking is broken on that same file now. Ideas?
    > 
    > How about now?
    
    It is *PERFECT*. Thank you very much.
    
    Npow I have this small WAV file here that when played through Media Player sounds very 
    distorted but that VLC (for example) plays ok. I will send it to you in a separate email 
    so that if/when you have some time, you can take a look at it. This is of general 
    interest as this is the standard audio file used for beeps in BeOS.
    
    Thanks again.
    
    -Bruno
    
    --
    Fortune Cookie Says:
    
    UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
    		-- Doug Gwyn
    
    
    
    
    From axeld at mail.berlios.de  Mon Oct 13 23:51:44 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Mon, 13 Oct 2008 23:51:44 +0200
    Subject: [Haiku-commits] r28052 - in haiku/trunk: headers/os/storage
    	headers/private/kernel/disk_device_manager
    	headers/private/storage headers/private/system
    	src/kits/storage/disk_device src/system/kernel/disk_device_manager
    Message-ID: <200810132151.m9DLpiiD026572@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-13 23:51:43 +0200 (Mon, 13 Oct 2008)
    New Revision: 28052
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28052&view=rev
    
    Modified:
       haiku/trunk/headers/os/storage/DiskDeviceDefs.h
       haiku/trunk/headers/private/kernel/disk_device_manager/ddm_userland_interface.h
       haiku/trunk/headers/private/storage/DiskDevice.h
       haiku/trunk/headers/private/storage/DiskDeviceRoster.h
       haiku/trunk/headers/private/system/syscalls.h
       haiku/trunk/src/kits/storage/disk_device/DiskDevice.cpp
       haiku/trunk/src/kits/storage/disk_device/DiskDeviceRoster.cpp
       haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp
       haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp
    Log:
    * Made the use of file devices more convenient and complete by adding
      the methods IsFile() and GetFilePath() to BDiskDevice, and
      BDiskDeviceRoster::GetFileDeviceForPath().
    * Added new syscalls to implement this functionality.
    * Added new flag B_DISK_DEVICE_IS_FILE.
    * Fixed wrong operator precedence assumption in the BDiskDevice class at
      several places.
    * Minor cleanup.
    
    
    Modified: haiku/trunk/headers/os/storage/DiskDeviceDefs.h
    ===================================================================
    --- haiku/trunk/headers/os/storage/DiskDeviceDefs.h	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/headers/os/storage/DiskDeviceDefs.h	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -62,6 +62,7 @@
     	B_DISK_DEVICE_HAS_MEDIA		= 0x02,
     	B_DISK_DEVICE_READ_ONLY		= 0x04,
     	B_DISK_DEVICE_WRITE_ONCE	= 0x08,
    +	B_DISK_DEVICE_IS_FILE		= 0x10,
     };
     
     // disk system flags
    
    Modified: haiku/trunk/headers/private/kernel/disk_device_manager/ddm_userland_interface.h
    ===================================================================
    --- haiku/trunk/headers/private/kernel/disk_device_manager/ddm_userland_interface.h	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/headers/private/kernel/disk_device_manager/ddm_userland_interface.h	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -26,21 +26,25 @@
     partition_id _user_get_next_disk_device_id(int32 *cookie, size_t *neededSize);
     partition_id _user_find_disk_device(const char *filename, size_t *neededSize);
     partition_id _user_find_partition(const char *filename, size_t *neededSize);
    +partition_id _user_find_file_disk_device(const char *filename,
    +				size_t *neededSize);
     status_t _user_get_disk_device_data(partition_id deviceID, bool deviceOnly,
     				user_disk_device_data *buffer, size_t bufferSize,
     				size_t *neededSize);
     
     partition_id _user_register_file_device(const char *filename);
     status_t _user_unregister_file_device(partition_id deviceID,
    -									  const char *filename);
    +				const char *filename);
     	// Only a valid deviceID or filename need to be passed. The other one
     	// is -1/NULL. If both is given only filename is ignored.
    +status_t _user_get_file_disk_device_path(partition_id id, char* buffer,
    +				size_t bufferSize);
     
     // disk systems
     status_t _user_get_disk_system_info(disk_system_id id,
    -									user_disk_system_info *info);
    +				user_disk_system_info *info);
     status_t _user_get_next_disk_system_info(int32 *cookie,
    -										 user_disk_system_info *info);
    +				user_disk_system_info *info);
     status_t _user_find_disk_system(const char *name, user_disk_system_info *info);
     
     // disk device modification
    
    Modified: haiku/trunk/headers/private/storage/DiskDevice.h
    ===================================================================
    --- haiku/trunk/headers/private/storage/DiskDevice.h	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/headers/private/storage/DiskDevice.h	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -37,6 +37,9 @@
     									bool receiveCompleteProgressUpdates = true);
     			status_t			CancelModifications();
     
    +			bool				IsFile() const;
    +			status_t			GetFilePath(BPath* path) const;
    +
     private:
     			friend class BDiskDeviceList;
     			friend class BDiskDeviceRoster;
    
    Modified: haiku/trunk/headers/private/storage/DiskDeviceRoster.h
    ===================================================================
    --- haiku/trunk/headers/private/storage/DiskDeviceRoster.h	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/headers/private/storage/DiskDeviceRoster.h	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -28,7 +28,7 @@
     	// Basic masks
     	B_DEVICE_REQUEST_MOUNT_POINT			= 0x0001,	// mount point changes
     	B_DEVICE_REQUEST_MOUNTING				= 0x0002,	// mounting/unmounting
    -	B_DEVICE_REQUEST_PARTITION				= 0x0004,	// partition changes 
    +	B_DEVICE_REQUEST_PARTITION				= 0x0004,	// partition changes
     	B_DEVICE_REQUEST_DEVICE					= 0x0008,	// device changes (media changes)
     	B_DEVICE_REQUEST_DEVICE_LIST			= 0x0010,	// device additions/removals
     	B_DEVICE_REQUEST_JOB_LIST				= 0x0020, 	// job addition/initiation/cancellation/completion
    @@ -125,6 +125,8 @@
     								BDiskDevice* device);
     			status_t		GetPartitionForPath(const char* filename,
     								BDiskDevice* device, BPartition** _partition);
    +			status_t		GetFileDeviceForPath(const char* filename,
    +								BDiskDevice* device);
     
     			status_t		StartWatching(BMessenger target,
     								uint32 eventMask = B_DEVICE_REQUEST_ALL);
    
    Modified: haiku/trunk/headers/private/system/syscalls.h
    ===================================================================
    --- haiku/trunk/headers/private/system/syscalls.h	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/headers/private/system/syscalls.h	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -441,9 +441,14 @@
     /* Disk Device Manager syscalls */
     
     // iterating, retrieving device/partition data
    -extern partition_id	_kern_get_next_disk_device_id(int32 *cookie, size_t *neededSize);
    -extern partition_id	_kern_find_disk_device(const char *filename, size_t *neededSize);
    -extern partition_id	_kern_find_partition(const char *filename, size_t *neededSize);
    +extern partition_id	_kern_get_next_disk_device_id(int32 *cookie,
    +						size_t *neededSize);
    +extern partition_id	_kern_find_disk_device(const char *filename,
    +						size_t *neededSize);
    +extern partition_id	_kern_find_partition(const char *filename,
    +						size_t *neededSize);
    +extern partition_id	_kern_find_file_disk_device(const char *filename,
    +						size_t *neededSize);
     extern status_t		_kern_get_disk_device_data(partition_id deviceID,
     						bool deviceOnly, struct user_disk_device_data *buffer,
     						size_t bufferSize, size_t *neededSize);
    @@ -452,6 +457,8 @@
     						const char *filename);
     	// Only a valid deviceID or filename need to be passed. The other one
     	// is -1/NULL. If both is given only filename is ignored.
    +extern status_t		_kern_get_file_disk_device_path(partition_id id,
    +						char* buffer, size_t bufferSize);
     
     // disk systems
     extern status_t		_kern_get_disk_system_info(disk_system_id id,
    
    Modified: haiku/trunk/src/kits/storage/disk_device/DiskDevice.cpp
    ===================================================================
    --- haiku/trunk/src/kits/storage/disk_device/DiskDevice.cpp	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/src/kits/storage/disk_device/DiskDevice.cpp	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -59,8 +59,8 @@
     bool
     BDiskDevice::HasMedia() const
     {
    -	return (fDeviceData
    -		&& fDeviceData->device_flags & B_DISK_DEVICE_HAS_MEDIA);
    +	return fDeviceData
    +		&& (fDeviceData->device_flags & B_DISK_DEVICE_HAS_MEDIA) != 0;
     }
     
     
    @@ -71,8 +71,8 @@
     bool
     BDiskDevice::IsRemovableMedia() const
     {
    -	return (fDeviceData
    -		&& fDeviceData->device_flags & B_DISK_DEVICE_REMOVABLE);
    +	return fDeviceData
    +		&& (fDeviceData->device_flags & B_DISK_DEVICE_REMOVABLE) != 0;
     }
     
     
    @@ -80,8 +80,8 @@
     bool
     BDiskDevice::IsReadOnlyMedia() const
     {
    -	return (fDeviceData
    -		&& fDeviceData->device_flags & B_DISK_DEVICE_READ_ONLY);
    +	return fDeviceData
    +		&& (fDeviceData->device_flags & B_DISK_DEVICE_READ_ONLY) != 0;
     }
     
     
    @@ -89,8 +89,8 @@
     bool
     BDiskDevice::IsWriteOnceMedia() const
     {
    -	return (fDeviceData
    -		&& fDeviceData->device_flags & B_DISK_DEVICE_WRITE_ONCE);
    +	return fDeviceData
    +		&& (fDeviceData->device_flags & B_DISK_DEVICE_WRITE_ONCE) != 0;
     }
     
     
    @@ -190,7 +190,7 @@
     status_t
     BDiskDevice::InitCheck() const
     {
    -	return (fDeviceData ? B_OK : B_NO_INIT);
    +	return fDeviceData ? B_OK : B_NO_INIT;
     }
     
     
    @@ -216,7 +216,7 @@
     		{
     			return Visit(device, 0);
     		}
    -		
    +
     		virtual bool Visit(BPartition *partition, int32 level)
     		{
     			return partition->_IsModified();
    @@ -229,7 +229,7 @@
     
     // PrepareModifications
     /*!	\brief Initializes the partition hierarchy for modifications.
    - * 	
    + *
      * 	Subsequent modifications are performed on so-called \a shadow structure
      * 	and not written to device until \ref CommitModifications is called.
      *
    @@ -333,6 +333,36 @@
     }
     
     
    +/*!	\brief Returns whether or not this device is a virtual device backed
    +		up by a file.
    +*/
    +bool
    +BDiskDevice::IsFile() const
    +{
    +	return fDeviceData
    +		&& (fDeviceData->device_flags & B_DISK_DEVICE_IS_FILE) != 0;
    +}
    +
    +
    +/*!	\brief Retrieves the path of the file backing up the disk device.*/
    +status_t
    +BDiskDevice::GetFilePath(BPath* path) const
    +{
    +	if (path == NULL)
    +		return B_BAD_VALUE;
    +	if (!IsFile())
    +		return B_BAD_TYPE;
    +
    +	char pathBuffer[B_PATH_NAME_LENGTH];
    +	status_t status = _kern_get_file_disk_device_path(
    +		fDeviceData->device_partition_data.id, pathBuffer, sizeof(pathBuffer));
    +	if (status != B_OK)
    +		return status;
    +
    +	return path->SetTo(pathBuffer);
    +}
    +
    +
     // copy constructor
     /*!	\brief Privatized copy constructor to avoid usage.
     */
    
    Modified: haiku/trunk/src/kits/storage/disk_device/DiskDeviceRoster.cpp
    ===================================================================
    --- haiku/trunk/src/kits/storage/disk_device/DiskDeviceRoster.cpp	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/src/kits/storage/disk_device/DiskDeviceRoster.cpp	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -377,7 +377,7 @@
     	return B_OK;
     }
     
    -// GetDeviceForPath
    +
     status_t
     BDiskDeviceRoster::GetDeviceForPath(const char *filename, BDiskDevice *device)
     {
    @@ -392,11 +392,10 @@
     	return device->_SetTo(id, true, neededSize);
     }
     
    -// GetPartitionForPath
    +
     status_t
     BDiskDeviceRoster::GetPartitionForPath(const char *filename,
    -									   BDiskDevice *device,
    -									   BPartition **partition)
    +	BDiskDevice *device, BPartition **partition)
     {
     	if (!filename || !device || !partition)
     		return B_BAD_VALUE;
    @@ -416,6 +415,25 @@
     	return B_OK;
     }
     
    +
    +status_t
    +BDiskDeviceRoster::GetFileDeviceForPath(const char *filename,
    +	BDiskDevice *device)
    +{
    +	if (!filename || !device)
    +		return B_BAD_VALUE;
    +
    +	// get the device ID
    +	size_t neededSize = 0;
    +	partition_id id = _kern_find_file_disk_device(filename, &neededSize);
    +	if (id < 0)
    +		return id;
    +
    +	// download the device data
    +	return device->_SetTo(id, true, neededSize);
    +}
    +
    +
     // StartWatching
     /*!	\brief Adds a target to the list of targets to be notified on disk device
     		   events.
    
    Modified: haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/src/system/kernel/disk_device_manager/KFileDiskDevice.cpp	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -27,6 +27,7 @@
     	: KDiskDevice(id),
     	  fFilePath(NULL)
     {
    +	SetDeviceFlags(DeviceFlags() | B_DISK_DEVICE_IS_FILE);
     }
     
     // destructor
    
    Modified: haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp	2008-10-13 21:24:51 UTC (rev 28051)
    +++ haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp	2008-10-13 21:51:43 UTC (rev 28052)
    @@ -4,6 +4,7 @@
      *
      * Authors:
      *		Ingo Weinhold, bonefish at cs.tu-berlin.de
    + *		Axel D?rfler, axeld at pinc-software.de
      */
     
     /*! \file ddm_userland_interface.cpp
    @@ -15,6 +16,7 @@
     
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -328,6 +330,38 @@
     }
     
     
    +partition_id
    +_user_find_file_disk_device(const char *_filename, size_t *neededSize)
    +{
    +	UserStringParameter filename;
    +	status_t error = filename.Init(_filename, B_PATH_NAME_LENGTH);
    +	if (error != B_OK)
    +		return error;
    +
    +	KPath path(filename, true);
    +
    +	partition_id id = B_ENTRY_NOT_FOUND;
    +	KDiskDeviceManager *manager = KDiskDeviceManager::Default();
    +	// find the device
    +	if (KFileDiskDevice* device = manager->RegisterFileDevice(path.Path())) {
    +		PartitionRegistrar _(device, true);
    +		id = device->ID();
    +		if (neededSize) {
    +			if (DeviceReadLocker locker = device) {
    +				// get the needed size
    +				UserDataWriter writer;
    +				device->WriteUserData(writer);
    +				error = copy_to_user_value(neededSize, writer.AllocatedSize());
    +				if (error != B_OK)
    +					return error;
    +			} else
    +				return B_ERROR;
    +		}
    +	}
    +	return id;
    +}
    +
    +
     // _user_get_disk_device_data
     /*!	\brief Writes data describing the disk device identified by ID and all
     		   its partitions into the supplied buffer.
    @@ -459,6 +493,31 @@
     }
     
     
    +status_t
    +_user_get_file_disk_device_path(partition_id id, char* buffer,
    +	size_t bufferSize)
    +{
    +	if (id < 0 || buffer == NULL || bufferSize == 0)
    +		return B_BAD_VALUE;
    +
    +	KDiskDeviceManager *manager = KDiskDeviceManager::Default();
    +
    +	if (KDiskDevice *device = manager->RegisterDevice(id, true)) {
    +		PartitionRegistrar _(device, true);
    +		if (DeviceReadLocker locker = device) {
    +			KFileDiskDevice* fileDevice
    +				= dynamic_cast(device);
    +			if (fileDevice == NULL)
    +				return B_BAD_VALUE;
    +
    +			return user_strlcpy(buffer, fileDevice->FilePath(), bufferSize);
    +		}
    +	}
    +
    +	return B_ERROR;
    +}
    +
    +
     // _user_get_disk_system_info
     status_t
     _user_get_disk_system_info(disk_system_id id, user_disk_system_info *_info)
    
    
    
    From axeld at mail.berlios.de  Mon Oct 13 23:54:40 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Mon, 13 Oct 2008 23:54:40 +0200
    Subject: [Haiku-commits] r28053 -
    	haiku/trunk/src/add-ons/kernel/file_systems/bfs
    Message-ID: <200810132154.m9DLsei5026799@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-13 23:54:40 +0200 (Mon, 13 Oct 2008)
    New Revision: 28053
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28053&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs_control.h
       haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp
    Log:
    * Changed the way the BFS_IOCTL_UPDATE_BOOT_BLOCK ioctl works; it's a bit
      more flexible to use now.
    
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs_control.h
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs_control.h	2008-10-13 21:51:43 UTC (rev 28052)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs_control.h	2008-10-13 21:54:40 UTC (rev 28053)
    @@ -1,5 +1,5 @@
     /*
    - * Copyright 2001-2007, Axel D?rfler, axeld at pinc-software.de
    + * Copyright 2001-2008, Axel D?rfler, axeld at pinc-software.de
      * This file may be used under the terms of the MIT License.
      */
     #ifndef BFS_CONTROL_H
    @@ -8,7 +8,11 @@
     //! additional functionality exported via ioctl()
     
     
    -#include "system_dependencies.h"
    +#ifdef BFS_SHELL
    +#	include "system_dependencies.h"
    +#else
    +#	include 
    +#endif
     
     
     /* ioctl to check the version of BFS used - parameter is a uint32 *
    @@ -18,6 +22,12 @@
     
     #define BFS_IOCTL_UPDATE_BOOT_BLOCK	14204
     
    +struct update_boot_block {
    +	uint32			offset;
    +	const uint8*	data;
    +	uint32			length;
    +};
    +
     /* ioctls to use the "chkbfs" feature from the outside
      * all calls use a struct check_result as single parameter
      */
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp	2008-10-13 21:51:43 UTC (rev 28052)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp	2008-10-13 21:54:40 UTC (rev 28053)
    @@ -624,10 +624,17 @@
     		{
     			// let's makebootable (or anyone else) update the boot block
     			// while BFS is mounted
    -			if (user_memcpy(&volume->SuperBlock().pad_to_block,
    -					(uint8*)buffer + offsetof(disk_super_block, pad_to_block),
    -					sizeof(volume->SuperBlock().pad_to_block)) < B_OK)
    +			update_boot_block update;
    +			if (bufferLength != sizeof(update_boot_block))
    +				return B_BAD_VALUE;
    +			if (user_memcpy(&update, buffer, sizeof(update_boot_block)) != B_OK)
     				return B_BAD_ADDRESS;
    +			if (update.offset < offsetof(disk_super_block, pad_to_block)
    +				|| update.length + update.offset > 512)
    +				return B_BAD_VALUE;
    +			if (user_memcpy((uint8*)&volume->SuperBlock() + update.offset,
    +					update.data, update.length) != B_OK)
    +				return B_BAD_ADDRESS;
     
     			return volume->WriteSuperBlock();
     		}
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 00:08:27 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 00:08:27 +0200
    Subject: [Haiku-commits] r28054 -
    	haiku/trunk/src/bin/makebootable/platform/bios_ia32
    Message-ID: <200810132208.m9DM8RNW028075@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 00:08:26 +0200 (Tue, 14 Oct 2008)
    New Revision: 28054
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28054&view=rev
    
    Modified:
       haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile
       haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp
    Log:
    * makebootable now checks if the partition/image/device is mounted via the
      disk device API, and if that is the case, it will use the private
      BFS_IOCTL_UPDATE_BOOT_BLOCK ioctl to update the boot code.
    * Fixed inconsistent naming of "Bootcode" vs. "BootCode".
    
    
    Modified: haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile
    ===================================================================
    --- haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile	2008-10-13 21:54:40 UTC (rev 28053)
    +++ haiku/trunk/src/bin/makebootable/platform/bios_ia32/Jamfile	2008-10-13 22:08:26 UTC (rev 28054)
    @@ -1,5 +1,9 @@
     SubDir HAIKU_TOP src bin makebootable platform bios_ia32 ;
     
    +SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ;
    +
    +UsePrivateHeaders shared storage ;
    +
     # write the stage 1 boot loader into the makebootable resources
     AddFileDataResource makebootable : RAWT:666:BootCode : stage1.bin ;
     
    
    Modified: haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp
    ===================================================================
    --- haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp	2008-10-13 21:54:40 UTC (rev 28053)
    +++ haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp	2008-10-13 22:08:26 UTC (rev 28054)
    @@ -39,6 +39,13 @@
     
     #ifdef __HAIKU__
     #	include 
    +
    +#	include 
    +#	include 
    +#	include 
    +#	include 
    +
    +#	include "bfs_control.h"
     #endif
     
     
    @@ -46,9 +53,9 @@
     
     static const int kBootCodeSize				= 1024;
     static const int kFirstBootCodePartSize		= 512;
    -static const int kSecondBootcodePartOffset	= 676;
    -static const int kSecondBootcodePartSize	= kBootCodeSize
    -												- kSecondBootcodePartOffset;
    +static const int kSecondBootCodePartOffset	= 676;
    +static const int kSecondBootCodePartSize	= kBootCodeSize
    +												- kSecondBootCodePartOffset;
     static const int kPartitionOffsetOffset		= 506;
     
     static int kArgc;
    @@ -185,8 +192,8 @@
     {
     	int32 cookie = 0;
     	while (get_next_image_info(B_CURRENT_TEAM, &cookie, info) == B_OK) {
    -		if (((addr_t)info->text <= (addr_t)find_own_image 
    -			&& (addr_t)info->text + info->text_size 
    +		if (((addr_t)info->text <= (addr_t)find_own_image
    +			&& (addr_t)info->text + info->text_size
     				> (addr_t)find_own_image)) {
     			return B_OK;
     		}
    @@ -252,7 +259,7 @@
     	bootCodeData = read_boot_code_data(argv[0]);
     #else
     	image_info info;
    -	if (find_own_image(&info) == B_OK)	
    +	if (find_own_image(&info) == B_OK)
     		bootCodeData = read_boot_code_data(info.name);
     #endif
     	if (!bootCodeData) {
    @@ -285,7 +292,7 @@
     		int64 partitionOffset = 0;
     		fs_info info;	// needs to be here (we use the device name later)
     		if (S_ISDIR(st.st_mode)) {
    -			#ifdef __BEOS__
    +			#ifdef __HAIKU__
     
     				// a directory: get the device
     				error = fs_stat_dev(st.st_dev, &info);
    @@ -303,7 +310,7 @@
     				fprintf(stderr, "Error: Specifying directories not supported "
     					"on this platform!\n");
     				exit(1);
    -			
    +
     			#endif
     
     		} else if (S_ISREG(st.st_mode)) {
    @@ -331,7 +338,7 @@
     						break;
     					}
     				}
    -				
    +
     				// Remove de 's' from 'ad2s2' slice device (partition for DOS
     				// users) to get 'ad2' base device
     				baseNameLen--;
    @@ -482,7 +489,7 @@
     					// The given device is the base device. We'll write at
     					// offset 0.
     				}
    -			
    +
     			#else	// !HAIKU_HOST_PLATFORM_LINUX
     
     			// partitions are block devices under Haiku, but not under BeOS
    @@ -510,7 +517,7 @@
     		#ifdef __BEOS__
     
     			// get a partition info
    -			if (!noPartition 
    +			if (!noPartition
     				&& strlen(fileName) >= 3
     				&& strncmp("raw", fileName + strlen(fileName) - 3, 3)) {
     				partition_info partitionInfo;
    @@ -538,9 +545,46 @@
     		write_boot_code_part(fileName, fd, startOffset, bootCodeData, 0,
     			kFirstBootCodePartSize, dryRun);
     		write_boot_code_part(fileName, fd, startOffset, bootCodeData,
    -			kSecondBootcodePartOffset, kSecondBootcodePartSize,
    +			kSecondBootCodePartOffset, kSecondBootCodePartSize,
     			dryRun);
     
    +#ifdef __HAIKU__
    +		// check if this partition is mounted
    +		BDiskDeviceRoster roster;
    +		BPartition* partition;
    +		BDiskDevice device;
    +		status_t status = roster.GetPartitionForPath(fileName, &device,
    +			&partition);
    +		if (status != B_OK) {
    +			status = roster.GetFileDeviceForPath(fileName, &device);
    +			if (status == B_OK)
    +				partition = &device;
    +		}
    +		if (status == B_OK && partition->IsMounted() && !dryRun) {
    +			// This partition is mounted, we need to tell BFS to update its
    +			// boot block (we are using part of the same logical block).
    +			BPath path;
    +			status = partition->GetMountPoint(&path);
    +			if (status == B_OK) {
    +				update_boot_block update;
    +				update.offset = kSecondBootCodePartOffset - 512;
    +				update.data = bootCodeData + kSecondBootCodePartOffset;
    +				update.length = kSecondBootCodePartSize;
    +
    +				int mountFD = open(path.Path(), O_RDONLY);
    +				if (ioctl(mountFD, BFS_IOCTL_UPDATE_BOOT_BLOCK, &update,
    +						sizeof(update_boot_block)) != 0) {
    +					fprintf(stderr, "Could not update BFS boot block: %s\n",
    +						strerror(errno));
    +				}
    +				close(mountFD);
    +			} else {
    +				fprintf(stderr, "Could not update BFS boot code while the "
    +					"partition is mounted!");
    +			}
    +		}
    +#endif	// __HAIKU__
    +
     		close(fd);
     	}
     
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 00:32:30 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 00:32:30 +0200
    Subject: [Haiku-commits] r28055 - in haiku/trunk: headers/os/storage
    	headers/private/fs_shell src/add-ons/kernel/file_systems/bfs
    	src/add-ons/kernel/file_systems/fat
    	src/add-ons/kernel/file_systems/nfs
    	src/add-ons/kernel/file_systems/ramfs
    Message-ID: <200810132232.m9DMWUNH031134@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 00:32:27 +0200 (Tue, 14 Oct 2008)
    New Revision: 28055
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28055&view=rev
    
    Modified:
       haiku/trunk/headers/os/storage/DiskDeviceDefs.h
       haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h
       haiku/trunk/headers/private/fs_shell/fssh_disk_device_defs.h
       haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp
       haiku/trunk/src/add-ons/kernel/file_systems/fat/dosfs.c
       haiku/trunk/src/add-ons/kernel/file_systems/nfs/nfs_add_on.c
       haiku/trunk/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp
    Log:
    * Added a flag B_DISK_SYSTEM_SUPPORTS_WRITING to determine whether or not a
      file system can write to files before mounting.
    * Set the flag for all file systems that actually can write.
    
    
    Modified: haiku/trunk/headers/os/storage/DiskDeviceDefs.h
    ===================================================================
    --- haiku/trunk/headers/os/storage/DiskDeviceDefs.h	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/headers/os/storage/DiskDeviceDefs.h	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -1,5 +1,5 @@
     /*
    - * Copyright 2003-2006, Haiku, Inc. All Rights Reserved.
    + * Copyright 2003-2008, Haiku, Inc. All Rights Reserved.
      * Distributed under the terms of the MIT License.
      */
     #ifndef _DISK_DEVICE_DEFS_H
    @@ -88,6 +88,7 @@
     	B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED					= 0x020000,
     	B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED	= 0x040000,
     	B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED	= 0x080000,
    +	B_DISK_SYSTEM_SUPPORTS_WRITING								= 0x100000,
     
     	// partitioning system specific flags
     	B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD						= 0x001000,
    
    Modified: haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h
    ===================================================================
    --- haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -243,6 +243,7 @@
     #define B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED						FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED
     #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED		FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED
     #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED
    +#define B_DISK_SYSTEM_SUPPORTS_WRITING									FSSH_B_DISK_SYSTEM_SUPPORTS_WRITING
     
     // partitioning system specific flags
     #define B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD		FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD
    
    Modified: haiku/trunk/headers/private/fs_shell/fssh_disk_device_defs.h
    ===================================================================
    --- haiku/trunk/headers/private/fs_shell/fssh_disk_device_defs.h	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/headers/private/fs_shell/fssh_disk_device_defs.h	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -88,6 +88,7 @@
     	FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED				= 0x020000,
     	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED	= 0x040000,
     	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED	= 0x080000,
    +	FSSH_B_DISK_SYSTEM_SUPPORTS_WRITING								= 0x100000,
     
     	// partitioning system specific flags
     	FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD						= 0x001000,
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -2118,7 +2118,8 @@
     {
     	// TODO: We should at least check the partition size.
     	return B_DISK_SYSTEM_SUPPORTS_INITIALIZING
    -		| B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME;
    +		| B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
    +		| B_DISK_SYSTEM_SUPPORTS_WRITING;
     }
     
     
    @@ -2327,6 +2328,7 @@
     //	| B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED
     //	| B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED
     //	| B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED
    +	| B_DISK_SYSTEM_SUPPORTS_WRITING
     	,
     
     	// scanning
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/fat/dosfs.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/fat/dosfs.c	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/fat/dosfs.c	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -1338,7 +1338,7 @@
     
     	"fat",					// short_name
     	"FAT32 File System",	// pretty_name
    -	0,	// DDM flags
    +	B_DISK_SYSTEM_SUPPORTS_WRITING,	// DDM flags
     
     	// scanning
     	dosfs_identify_partition,
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/nfs/nfs_add_on.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/nfs/nfs_add_on.c	2008-10-13 22:08:26 UTC (rev 28054)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/nfs/nfs_add_on.c	2008-10-13 22:32:27 UTC (rev 28055)
    @@ -61,7 +61,7 @@
     	handle = load_driver_settings("nfs");
     	if (handle == NULL)
     		return ENOENT;
    -	
    +
     	str = get_driver_parameter(handle, "high_port", NULL, NULL);
     	if (str) {
     		endptr = str + strlen(str);
    @@ -90,20 +90,20 @@
     		endptr = str + strlen(str);
     		conf_call_tries = strtoul(str, (char **)&endptr, 10);
     	}
    -		
    +
     	unload_driver_settings(handle);
     	return B_OK;
     }
     
     
    -status_t 
    +status_t
     create_socket(fs_nspace *ns)
     {
     	struct sockaddr_in addr;
     	uint16 port=conf_high_port;
    -	
    +
     	ns->s=socket(AF_INET,SOCK_DGRAM,0);
    -	
    +
     	if (ns->s<0)
     		return errno;
     
    @@ -114,7 +114,7 @@
     		//addr.sin_addr.s_addr=htonl(INADDR_LOOPBACK);
     		addr.sin_port=htons(port);
     		memset (addr.sin_zero,0,sizeof(addr.sin_zero));
    -		
    +
     		if (bind(ns->s,(const struct sockaddr *)&addr,sizeof(addr))<0)
     		{
     			if (errno!=EADDRINUSE)
    @@ -135,18 +135,18 @@
     			break;//return B_OK;
     	}
     	while (true);
    -	
    +
     	// doesn't seem to help with autoincrementing port on source address...
     	addr.sin_addr = ns->mountAddr.sin_addr;
     	addr.sin_port = htons(111);
     	//kconnect(ns->s,(const struct sockaddr *)&addr,sizeof(addr));
    -		
    +
     	return B_OK;
     }
     
     
     #if 0
    -static status_t 
    +static status_t
     connect_socket(fs_nspace *ns)
     {
     	uint16 port = conf_high_port;
    @@ -167,28 +167,28 @@
     #endif
     
     
    -status_t 
    +status_t
     init_postoffice(fs_nspace *ns)
     {
     	status_t result;
    -	
    +
     	ns->tid=spawn_kernel_thread ((thread_func)postoffice_func,"NFSv2 Postoffice",B_NORMAL_PRIORITY,ns);
     
     	if (ns->tidtid;
     
     	ns->quit=false;
    -			
    +
     	result=resume_thread (ns->tid);
    -	
    +
     	if (resulttid);
    -		
    +
     		return result;
     	}
    -	
    -	return B_OK;	
    +
    +	return B_OK;
     }
     
     
    @@ -196,38 +196,38 @@
     shutdown_postoffice(fs_nspace *ns)
     {
     	status_t result;
    -	
    +
     	ns->quit=true;
     	close(ns->s);
    -	
    +
     	wait_for_thread (ns->tid,&result);
     }
     
     
    -status_t 
    +status_t
     postoffice_func(fs_nspace *ns)
     {
     	uint8 *buffer=(uint8 *)malloc(B_UDP_MAX_SIZE);
    -	
    +
     	while (!ns->quit)
    -	{		
    +	{
     		struct sockaddr_in from;
     		socklen_t fromLen=sizeof(from);
     
     		ssize_t bytes=recvfrom (ns->s,buffer,B_UDP_MAX_SIZE,0,(struct sockaddr *)&from,&fromLen);
    -		
    +
     		if (bytes>=4)
     		{
     			struct PendingCall *call;
     			int32 xid=B_BENDIAN_TO_HOST_INT32(*((int32 *)buffer));
    -			
    +
     			call=RPCPendingCallsFindAndRemovePendingCall(&ns->pendingCalls,xid,&from);
     
     			if (call)
     			{
     				call->buffer=(uint8 *)malloc(bytes);
     				memcpy (call->buffer,buffer,bytes);
    -				
    +
     				while (release_sem (call->sem)==B_INTERRUPTED);
     			} else {
     				dprintf("nfs: postoffice: can't find pending call to remove for xid %ld\n", xid);
    @@ -236,7 +236,7 @@
     	}
     
     	free (buffer);
    -		
    +
     	return B_OK;
     }
     
    @@ -251,22 +251,22 @@
     	int32 retries=conf_call_tries;
     	status_t result;
     	struct PendingCall *call;
    -	
    +
     	struct XDROutPacket rpc_call;
     	XDROutPacketInit (&rpc_call);
    -	
    +
     	xid=atomic_add(&ns->xid,1);
     #ifdef DEBUG_XID
     	//dbgprintxid(logfd1, xid);
     #endif
    -	
    +
     	XDROutPacketAddInt32(&rpc_call,xid);
     	XDROutPacketAddInt32(&rpc_call,RPC_CALL);
     	XDROutPacketAddInt32(&rpc_call,RPC_VERSION);
     	XDROutPacketAddInt32(&rpc_call,prog);
     	XDROutPacketAddInt32(&rpc_call,vers);
     	XDROutPacketAddInt32(&rpc_call,proc);
    -	
    +
     #if !defined(USE_SYSTEM_AUTHENTICATION)
     	XDROutPacketAddInt32(&rpc_call,RPC_AUTH_NONE);
     	XDROutPacketAddDynamic (&rpc_call,NULL,0);
    @@ -280,7 +280,7 @@
     	XDROutPacketAddInt32(&rpc_call,ns->params.gid);
     	XDROutPacketAddInt32(&rpc_call,0);
     #endif
    -		
    +
     	XDROutPacketAddInt32(&rpc_call,RPC_AUTH_NONE);
     	XDROutPacketAddDynamic (&rpc_call,NULL,0);
     
    @@ -322,7 +322,7 @@
     
     	// we timed out
     
    -	call = RPCPendingCallsFindAndRemovePendingCall(&ns->pendingCalls, xid, addr);	
    +	call = RPCPendingCallsFindAndRemovePendingCall(&ns->pendingCalls, xid, addr);
     
     	dprintf("nfs: xid %ld timed out, removing from queue", xid);
     
    @@ -399,14 +399,14 @@
     			int32 low = XDRInPacketGetInt32(reply);
     			int32 high = XDRInPacketGetInt32(reply);
     
    -			dprintf ("nfs: RPC_PROG_MISMATCH (%ld,%ld)", low, high);				
    +			dprintf ("nfs: RPC_PROG_MISMATCH (%ld,%ld)", low, high);
     		} else if (acceptStat != RPC_SUCCESS)
     			dprintf ("nfs: Accepted but failed (%d)", acceptStat);
     		else
     			success = true;
     	}
     
    -	return success;	
    +	return success;
     }
     
     
    @@ -416,30 +416,30 @@
     {
     	struct XDROutPacket call;
     	uint8 *replyBuf;
    -	
    +
     	XDROutPacketInit (&call);
    -		
    +
     	addr->sin_port=htons(PMAP_PORT);
     
    -	XDROutPacketAddInt32 (&call,prog);		
    +	XDROutPacketAddInt32 (&call,prog);
     	XDROutPacketAddInt32 (&call,vers);
     	XDROutPacketAddInt32 (&call,prot);
     	XDROutPacketAddInt32 (&call,0);
    -	
    +
     	replyBuf=send_rpc_call (ns,addr,PMAP_PROGRAM,PMAP_VERSION,PMAPPROC_GETPORT,&call);
     
     	if (replyBuf)
     	{
     		struct XDRInPacket reply;
     		XDRInPacketInit (&reply);
    -		
    +
     		XDRInPacketSetTo (&reply,replyBuf,0);
     
     		if (is_successful_reply(&reply))
     		{
     			addr->sin_port=htons(XDRInPacketGetInt32(&reply));
     			memset (addr->sin_zero,0,sizeof(addr->sin_zero));
    -			
    +
     			XDRInPacketDestroy(&reply);
     			XDROutPacketDestroy (&call);
     			return B_OK;
    @@ -447,7 +447,7 @@
     
     		XDRInPacketDestroy(&reply);
     	}
    -	
    +
     	XDROutPacketDestroy (&call);
     	return EHOSTUNREACH;
     }
    @@ -461,9 +461,9 @@
     
     	XDROutPacketInit (&call);
     	XDRInPacketInit (&reply);
    -	
    +
     	XDROutPacketAddString (&call,path);
    -	
    +
     	replyBuf=send_rpc_call (ns,&ns->mountAddr,MOUNT_PROGRAM,MOUNT_VERSION,MOUNTPROC_MNT,&call);
     
     	if (!replyBuf)
    @@ -472,7 +472,7 @@
     		XDROutPacketDestroy (&call);
     		return EHOSTUNREACH;
     	}
    -		
    +
     	XDRInPacketSetTo (&reply,replyBuf,0);
     
     	if (!is_successful_reply(&reply))
    @@ -481,22 +481,22 @@
     		XDROutPacketDestroy (&call);
     		return B_ERROR;
     	}
    -			
    +
     	fhstatus=XDRInPacketGetInt32(&reply);
    -	
    +
     	if (fhstatus!=0)
     	{
     		XDRInPacketDestroy (&reply);
     		XDROutPacketDestroy (&call);
     		return map_nfs_to_system_error(fhstatus);
     	}
    -			
    -	XDRInPacketGetFixed (&reply,fhandle->opaque,NFS_FHSIZE);		
    -					
    +
    +	XDRInPacketGetFixed (&reply,fhandle->opaque,NFS_FHSIZE);
    +
     	XDRInPacketDestroy (&reply);
     	XDROutPacketDestroy (&call);
     	return B_OK;
    -}					
    +}
     
     status_t nfs_lookup (fs_nspace *ns, const nfs_fhandle *dir, const char *filename, nfs_fhandle *fhandle,
     						struct stat *st)
    @@ -505,13 +505,13 @@
     	struct XDRInPacket reply;
     	int32 status;
     	uint8 *replyBuf;
    -	
    +
     	XDROutPacketInit (&call);
     	XDRInPacketInit (&reply);
    -	
    +
     	XDROutPacketAddFixed (&call,dir->opaque,NFS_FHSIZE);
     	XDROutPacketAddString (&call,filename);
    -	
    +
     	replyBuf=send_rpc_call (ns,&ns->nfsAddr,NFS_PROGRAM,NFS_VERSION,NFSPROC_LOOKUP,&call);
     
     	if (!replyBuf)
    @@ -520,7 +520,7 @@
     		XDROutPacketDestroy (&call);
     		return EHOSTUNREACH;
     	}
    -			
    +
     	XDRInPacketSetTo(&reply,replyBuf,0);
     
     	if (!is_successful_reply(&reply))
    @@ -529,16 +529,16 @@
     		XDROutPacketDestroy (&call);
     		return B_ERROR;
     	}
    -			
    +
     	status=XDRInPacketGetInt32(&reply);
    -	
    +
     	if (status!=NFS_OK)
     	{
     		XDRInPacketDestroy (&reply);
     		XDROutPacketDestroy (&call);
     		return map_nfs_to_system_error(status);
     	}
    -		
    +
     	XDRInPacketGetFixed (&reply,fhandle->opaque,NFS_FHSIZE);
     
     	if (st)
    @@ -570,7 +570,7 @@
     		XDROutPacketDestroy(&call);
     		return EHOSTUNREACH;
     	}
    -			
    +
     	XDRInPacketSetTo(&reply, replyBuf, 0);
     
     	if (!is_successful_reply(&reply)) {
    @@ -594,7 +594,7 @@
     }
     
     
    -status_t 
    +status_t
     nfs_truncate_file(fs_nspace *ns, const nfs_fhandle *fhandle, struct stat *st)
     {
     	struct XDROutPacket call;
    @@ -611,9 +611,9 @@
     	XDROutPacketAddInt32(&call, -1);
     	XDROutPacketAddInt32(&call, -1);
     	XDROutPacketAddInt32(&call, 0);
    -	XDROutPacketAddInt32(&call, time(NULL));	
    +	XDROutPacketAddInt32(&call, time(NULL));
     	XDROutPacketAddInt32(&call, 0);
    -	XDROutPacketAddInt32(&call, time(NULL));	
    +	XDROutPacketAddInt32(&call, time(NULL));
     	XDROutPacketAddInt32(&call, 0);
     
     	replyBuf = send_rpc_call(ns, &ns->nfsAddr, NFS_PROGRAM, NFS_VERSION,
    @@ -639,7 +639,7 @@
     		return map_nfs_to_system_error(status);
     	}
     
    -	if (st)	
    +	if (st)
     		get_nfs_attr(&reply,st);
     
     	XDRInPacketDestroy(&reply);
    @@ -654,7 +654,7 @@
     	nfs_ftype ftype=(nfs_ftype)XDRInPacketGetInt32(reply);
     	(void) ftype;
     	st->st_mode=XDRInPacketGetInt32(reply);
    -	
    +
     	st->st_dev=0;	// just to be sure
     	st->st_nlink=XDRInPacketGetInt32(reply);
     	st->st_uid=XDRInPacketGetInt32(reply);
    @@ -685,59 +685,59 @@
     	switch (nfsstatus) {
     		case NFS_OK:
     			return B_OK;
    -		
    +
     		case NFSERR_PERM:
     			return EPERM;
    -			
    +
     		case NFSERR_NOENT:
     			return ENOENT;
    -			
    +
     		case NFSERR_IO:
     			return EIO;
     
     		case NFSERR_NXIO:
     			return ENXIO;
    -			
    +
     		case NFSERR_ACCES:
     			return EACCES;
     
     		case NFSERR_EXIST:
     			return EEXIST;
    -			
    +
     		case NFSERR_NODEV:
     			return ENODEV;
    -		
    +
     		case NFSERR_NOTDIR:
     			return ENOTDIR;
    -			
    +
     		case NFSERR_ISDIR:
     			return EISDIR;
    -			
    +
     		case NFSERR_FBIG:
     			return EFBIG;
    -		
    +
     		case NFSERR_NOSPC:
     			return ENOSPC;
    -			
    +
     		case NFSERR_ROFS:
     			return EROFS;
    -		
    +
     		case NFSERR_NAMETOOLONG:
     			return ENAMETOOLONG;
    -			
    +
     		case NFSERR_NOTEMPTY:
     			return ENOTEMPTY;
    -			
    +
     		case NFSERR_STALE:
     			return C_ERROR_STALE;
    -		
    +
     		default:
     			return B_ERROR;
     	}
     }
     
     
    -nfs_fhandle 
    +nfs_fhandle
     handle_from_vnid(fs_nspace *ns, ino_t vnid)
     {
     	fs_node *current;
    @@ -759,9 +759,9 @@
     insert_node(fs_nspace *ns, fs_node *node)
     {
     	fs_node *current;
    -	
    +
     	while (acquire_sem (ns->sem)==B_INTERRUPTED);
    -	
    +
     	current=ns->first;
     
     	while ((current)&&(current->vnid!=node->vnid))
    @@ -773,10 +773,10 @@
     		while (release_sem (ns->sem)==B_INTERRUPTED);
     		return;
     	}
    -	
    +
     	node->next=ns->first;
     	ns->first=node;
    -	
    +
     	while (release_sem (ns->sem)==B_INTERRUPTED);
     }
     
    @@ -786,12 +786,12 @@
     {
     	fs_node *current;
     	fs_node *previous;
    -	
    -	while(acquire_sem (ns->sem)==B_INTERRUPTED);	
    -	
    +
    +	while(acquire_sem (ns->sem)==B_INTERRUPTED);
    +
     	current=ns->first;
     	previous=NULL;
    -	
    +
     	while (current != NULL && current->vnid != vnid) {
     		previous = current;
     		current = current->next;
    @@ -802,10 +802,10 @@
     			previous->next=current->next;
     		else
     			ns->first=current->next;
    -		
    +
     		free(current);
     	}
    -		
    +
     	while (release_sem (ns->sem)==B_INTERRUPTED);
     }
     
    @@ -813,7 +813,7 @@
     //	#pragma mark -
     
     
    -static status_t 
    +static status_t
     fs_read_vnode(fs_volume *_volume, ino_t vnid, fs_vnode *_node, int *_type,
     		uint32 *_flags, bool r)
     
    @@ -822,12 +822,12 @@
     	fs_node *current;
     
     	ns = _volume->private_volume;
    -	
    +
     	if (!r)
     	{
     		while (acquire_sem (ns->sem)==B_INTERRUPTED);
     	}
    -	
    +
     	current=ns->first;
     
     	while ((current)&&(current->vnid!=vnid))
    @@ -835,23 +835,23 @@
     
     	if (!current)
     		return EINVAL;
    -		
    +
     	current->vnid = vnid;
     	_node->private_node = current;
     	_node->ops = &sNFSVnodeOps;
     	*_type = 0;
     	*_flags = 0;
    -	
    -	if (!r)	
    +
    +	if (!r)
     	{
     		while (release_sem (ns->sem)==B_INTERRUPTED);
     	}
    -	
    -	return B_OK;	
    +
    +	return B_OK;
     }
     
     
    -static status_t 
    +static status_t
     fs_release_vnode(fs_volume *_volume, fs_vnode *node, bool r)
     {
     	(void) _volume;
    @@ -861,7 +861,7 @@
     }
     
     
    -static status_t 
    +static status_t
     fs_walk(fs_volume *_volume, fs_vnode *_base, const char *file, ino_t *vnid)
     {
     	bool isLink;
    @@ -873,7 +873,7 @@
     
     	ns = _volume->private_volume;
     	base = _base->private_node;
    -	
    +
     	if (!strcmp(".",file))
     	{
     		*vnid=base->vnid;
    @@ -883,21 +883,21 @@
     	{
     		fs_node *newNode=(fs_node *)malloc(sizeof(fs_node));
     		struct stat st;
    -		
    +
     		if ((result=nfs_lookup(ns,&base->fhandle,file,&newNode->fhandle,&st))vnid=st.st_ino;
     		*vnid=newNode->vnid;
    -		
    +
     		insert_node (ns,newNode);
    -		
    +
     		isLink=S_ISLNK(st.st_mode);
     	}
    -	
    +
     	if ((result=get_vnode (_volume,*vnid,(void **)&dummy))fhandle,&st))opaque,0,NFS_COOKIESIZE);
    -			
    +
     	return B_OK;
     }
     
     
    -static status_t 
    +static status_t
     fs_closedir(fs_volume *_volume, fs_vnode *_node, void *cookie)
     {
     	(void) _volume;
    @@ -942,14 +942,14 @@
     }
     
     
    -static status_t 
    +static status_t
     fs_rewinddir(fs_volume *_volume, fs_vnode *_node, void *_cookie)
     {
     	nfs_cookie *cookie = (nfs_cookie *)_cookie;
     	(void) _volume;
     	(void) _node;
     	memset (cookie->opaque,0,NFS_COOKIESIZE);
    -	
    +
     	return B_OK;
     }
     
    @@ -966,12 +966,12 @@
     	fs_node *node;
     
     	size_t count=min_c(6000,max*300);
    -	
    +
     	*num=0;
     
     	ns = _volume->private_volume;
     	node = _node->private_node;
    -	
    +
     	do
     	{
     		ino_t vnid;
    @@ -980,60 +980,60 @@
     		struct XDROutPacket call;
     		struct XDRInPacket reply;
     		int32 status;
    -		
    +
     		XDROutPacketInit (&call);
     		XDRInPacketInit (&reply);
    -		
    +
     		XDROutPacketAddFixed (&call,node->fhandle.opaque,NFS_FHSIZE);
     		XDROutPacketAddFixed (&call,cookie->opaque,NFS_COOKIESIZE);
     		XDROutPacketAddInt32 (&call,count);
    -			
    +
     		replyBuf=send_rpc_call (ns,&ns->nfsAddr,NFS_PROGRAM,NFS_VERSION,NFSPROC_READDIR,&call);
    -	
    +
     		if (!replyBuf)
     		{
     			XDRInPacketDestroy (&reply);
     			XDROutPacketDestroy (&call);
     			return B_ERROR;
     		}
    -			
    +
     		XDRInPacketSetTo(&reply,replyBuf,0);
    -	
    +
     		if (!is_successful_reply(&reply))
     		{
     			XDRInPacketDestroy (&reply);
     			XDROutPacketDestroy (&call);
     			return B_ERROR;
     		}
    -					
    +
     		status=XDRInPacketGetInt32(&reply);
    -		
    +
     		if (status!=NFS_OK)
     		{
     			XDRInPacketDestroy (&reply);
     			XDROutPacketDestroy (&call);
     			return map_nfs_to_system_error(status);
     		}
    -				
    +
     		while (XDRInPacketGetInt32(&reply)==1)
    -		{			
    +		{
     			nfs_cookie newCookie;
     
    -			vnid=XDRInPacketGetInt32(&reply);			
    +			vnid=XDRInPacketGetInt32(&reply);
     			filename=XDRInPacketGetString(&reply);
    -			
    +
     			XDRInPacketGetFixed(&reply,newCookie.opaque,NFS_COOKIESIZE);
    -			
    +
     			//if (strcmp(".",filename)&&strcmp("..",filename))
     			//if ((ns->rootid != node->vnid) || (strcmp(".",filename)&&strcmp("..",filename)))
     			if (conf_ls_root_parent || ((ns->rootid != node->vnid) || strcmp("..",filename)))
    -			{		
    +			{
     				status_t result;
     				struct stat st;
     
     				fs_node *newNode=(fs_node *)malloc(sizeof(fs_node));
     				newNode->vnid=vnid;
    -				
    +
     				if ((result=nfs_lookup(ns,&node->fhandle,filename,&newNode->fhandle,&st))d_dev=ns->nsid;
     				buf->d_pdev=ns->nsid;
     				buf->d_ino=vnid;
    @@ -1067,13 +1067,13 @@
     				memcpy (cookie->opaque,newCookie.opaque,NFS_COOKIESIZE);
     
     				(*num)++;
    -			}	
    +			}
     			else {
     				memcpy (cookie->opaque,newCookie.opaque,NFS_COOKIESIZE);
     			}
    -				
    +
     			free (filename);
    -			
    +
     			if ((*num)==max)
     			{
     				XDRInPacketDestroy (&reply);
    @@ -1081,19 +1081,19 @@
     				return B_OK;
     			}
     		}
    -		
    +
     		eof=XDRInPacketGetInt32(&reply);
     
     		XDRInPacketDestroy (&reply);
     		XDROutPacketDestroy (&call);
     	}
     	while (eof==0);
    -	
    +
     	return B_OK;
     }
     
     
    -static status_t 
    +static status_t
     fs_free_dircookie(fs_volume *_volume, fs_vnode *_node, void *cookie)
     {
     	(void) _volume;
    @@ -1103,7 +1103,7 @@
     }
     
     
    -static status_t 
    +static status_t
     fs_rstat(fs_volume *_volume, fs_vnode *_node, struct stat *st)
     {
     	fs_nspace *ns;
    @@ -1116,21 +1116,21 @@
     	//dprintf("nfs: rstat()\n");//XXX:mmu_man:debug
     	if ((result=nfs_getattr(ns,&node->fhandle,st))st_dev=ns->nsid;
     //st->st_nlink = 1; //XXX:mmu_man:test
     	return B_OK;
     }
     
     
    -void 
    +void
     fs_nspaceInit(struct fs_nspace *nspace)
     {
     	RPCPendingCallsInit (&nspace->pendingCalls);
     }
     
     
    -void 
    +void
     fs_nspaceDestroy(struct fs_nspace *nspace)
     {
     	RPCPendingCallsDestroy (&nspace->pendingCalls);
    @@ -1183,14 +1183,14 @@
     	params->serverIP |= (v);
     	if (*p++ != ':')
     		return EINVAL;
    -	
    +
     	e = strchr(p, ',');
     	i = (e) ? (e - p) : (strlen(p));
    -	
    +
     	params->_export = malloc(i+1);
     	params->_export[i] = '\0';
     	strncpy(params->_export, p, i);
    -	
    +
     	p = strstr(str, "hostname=");
     	if (!p)
     		return EINVAL;
    @@ -1198,11 +1198,11 @@
     	p += 9;
     	e = strchr(p, ',');
     	i = (e) ? (e - p) : (strlen(p));
    -	
    +
     	params->hostname = malloc(i+1);
     	params->hostname[i] = '\0';
     	strncpy(params->hostname, p, i);
    -	
    +
     	p = strstr(str, "uid=");
     dprintf("nfs:uid!\n");
     	if (p) {
    @@ -1218,13 +1218,13 @@
     		params->gid = v;
     	}
     	dprintf("nfs: ip:%08x server:'%s' export:'%s' hostname:'%s' uid=%d gid=%d \n",
    -		params->serverIP, params->server, params->_export, 
    +		params->serverIP, params->server, params->_export,
     		params->hostname, params->uid, params->gid);
     	return B_OK;
     }
     
    
    [... truncated: 922 lines follow ...]
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 01:04:59 2008
    From: mmu_man at mail.berlios.de (mmu_man at BerliOS)
    Date: Tue, 14 Oct 2008 01:04:59 +0200
    Subject: [Haiku-commits] r28056 - haiku/trunk/src/system/kernel/arch/m68k
    Message-ID: <200810132304.m9DN4xE7001926@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 01:04:49 +0200 (Tue, 14 Oct 2008)
    New Revision: 28056
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28056&view=rev
    
    Modified:
       haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp
    Log:
    Code to read and write the RTC, copied from the x86 version.
    
    
    Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp	2008-10-13 22:32:27 UTC (rev 28055)
    +++ haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp	2008-10-13 23:04:49 UTC (rev 28056)
    @@ -1,18 +1,167 @@
     /*
      * Copyright 2007, Fran?ois Revol, revol at free.fr.
    + * Copyright 2006, Ingo Weinhold . All rights reserved.
    + * Copyright 2005-2007, Axel D?rfler, axeld at pinc-software.de
    + * Copyright 2003, Jeff Ward, jeff at r2d2.stcloudstate.edu. All rights reserved.
    + *
      * Distributed under the terms of the MIT License.
    - *
    - * Copyright 2006, Ingo Weinhold .
    - * All rights reserved. Distributed under the terms of the MIT License.
      */
     
     #include 
     
     #include 
    +#include 
     #include 
     #include 
     
    +typedef struct	{
    +	uint8 second;
    +	uint8 minute;
    +	uint8 hour;
    +	uint8 day;
    +	uint8 month;
    +	uint8 year;
    +	uint8 century;
    +} cmos_time;
     
    +
    +static uint32
    +bcd_to_int(uint8 bcd)
    +{
    +	uint32 numl;
    +	uint32 numh;
    +
    +	numl = bcd & 0x0f;
    +	numh = (bcd & 0xf0) >> 4;
    +
    +	return numh * 10 + numl;
    +}
    +
    +
    +static uint8
    +int_to_bcd(uint32 number)
    +{
    +	uint8 low;
    +	uint8 high;
    +
    +	if (number > 99)
    +		return 0;
    +
    +	high = number / 10;
    +	low = number % 10;
    +
    +	return (high << 4) | low;
    +}
    +
    +
    +static int
    +same_time(const cmos_time *time1, const cmos_time *time2)
    +{
    +	return time1->second == time2->second
    +		&& time1->minute == time2->minute
    +		&& time1->hour == time2->hour
    +		&& time1->day == time2->day
    +		&& time1->month == time2->month
    +		&& time1->year == time2->year
    +		&& time1->century == time2->century;
    +}
    +
    +
    +static uint8
    +cmos_read(uint8 addr)
    +{
    +	return M68KPlatform::Default()->ReadRTCReg(reg);
    +}
    +
    +
    +static void
    +cmos_write(uint8 addr, uint8 data)
    +{
    +	M68KPlatform::Default()->WriteRTCReg(reg, data);
    +}
    +
    +
    +static void
    +set_24_hour_mode(void)
    +{
    +	uint8 status_b;
    +
    +	status_b = cmos_read(0x0b);
    +	status_b |= 0x02;
    +	cmos_write(0x0b, status_b);
    +}
    +
    +
    +static void
    +read_cmos_clock(cmos_time *cmos)
    +{
    +	set_24_hour_mode();
    +
    +	cmos->century = cmos_read(0x32);
    +	cmos->year = cmos_read(0x09);
    +	cmos->month = cmos_read(0x08);
    +	cmos->day = cmos_read(0x07);
    +	cmos->hour = cmos_read(0x04);
    +	cmos->minute = cmos_read(0x02);
    +	cmos->second = cmos_read(0x00);
    +}
    +
    +
    +static void
    +write_cmos_clock(cmos_time *cmos)
    +{
    +	set_24_hour_mode();
    +
    +	cmos_write(0x32, cmos->century);
    +	cmos_write(0x09, cmos->year);
    +	cmos_write(0x08, cmos->month);
    +	cmos_write(0x07, cmos->day);
    +	cmos_write(0x04, cmos->hour);
    +	cmos_write(0x02, cmos->minute);
    +	cmos_write(0x00, cmos->second);
    +}
    +
    +
    +static uint32
    +cmos_to_secs(const cmos_time *cmos)
    +{
    +	struct tm t;
    +	t.tm_year = bcd_to_int(cmos->century) * 100 + bcd_to_int(cmos->year)
    +		- RTC_EPOCH_BASE_YEAR;
    +	t.tm_mon = bcd_to_int(cmos->month) - 1;
    +	t.tm_mday = bcd_to_int(cmos->day);
    +	t.tm_hour = bcd_to_int(cmos->hour);
    +	t.tm_min = bcd_to_int(cmos->minute);
    +	t.tm_sec = bcd_to_int(cmos->second);
    +
    +	return rtc_tm_to_secs(&t);
    +}
    +
    +
    +static void
    +secs_to_cmos(uint32 seconds, cmos_time *cmos)
    +{
    +	int wholeYear;
    +
    +	struct tm t;
    +	rtc_secs_to_tm(seconds, &t);
    +
    +	wholeYear = t.tm_year + RTC_EPOCH_BASE_YEAR;
    +
    +	cmos->century = int_to_bcd(wholeYear / 100);
    +	cmos->year = int_to_bcd(wholeYear % 100);
    +	cmos->month = int_to_bcd(t.tm_mon + 1);
    +	cmos->day = int_to_bcd(t.tm_mday);
    +	cmos->hour = int_to_bcd(t.tm_hour);
    +	cmos->minute = int_to_bcd(t.tm_min);
    +	cmos->second = int_to_bcd(t.tm_sec);
    +}
    +
    +
    +//	#pragma mark -
    +
    +
    +
     static spinlock sSetArchDataLock;
     
     status_t
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 01:08:00 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 01:08:00 +0200
    Subject: [Haiku-commits] r28057 -
    	haiku/trunk/src/tests/servers/app/view_transit
    Message-ID: <200810132308.m9DN80wP006907@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 01:07:50 +0200 (Tue, 14 Oct 2008)
    New Revision: 28057
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28057&view=rev
    
    Modified:
       haiku/trunk/src/tests/servers/app/view_transit/Jamfile
    Log:
    Fixed wrong target name.
    
    
    Modified: haiku/trunk/src/tests/servers/app/view_transit/Jamfile
    ===================================================================
    --- haiku/trunk/src/tests/servers/app/view_transit/Jamfile	2008-10-13 23:04:49 UTC (rev 28056)
    +++ haiku/trunk/src/tests/servers/app/view_transit/Jamfile	2008-10-13 23:07:50 UTC (rev 28057)
    @@ -6,7 +6,7 @@
     UseHeaders [ FDirName os app ] ;
     UseHeaders [ FDirName os interface ] ;
     
    -Application ViewState :
    +Application ViewTransit :
     	ViewTransit.cpp
     	: be
     ;
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 01:08:54 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 01:08:54 +0200
    Subject: [Haiku-commits] r28058 -
    	haiku/trunk/src/tests/servers/app/view_transit
    Message-ID: <200810132308.m9DN8sGn007628@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 01:08:53 +0200 (Tue, 14 Oct 2008)
    New Revision: 28058
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28058&view=rev
    
    Modified:
       haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp
    Log:
    Also test what happens when there is a view with an event mask. (Currently
    shows a bug in the app_server event dispatching which is going to be fixed
    next.)
    
    
    Modified: haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp
    ===================================================================
    --- haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp	2008-10-13 23:07:50 UTC (rev 28057)
    +++ haiku/trunk/src/tests/servers/app/view_transit/ViewTransit.cpp	2008-10-13 23:08:53 UTC (rev 28058)
    @@ -124,8 +124,10 @@
     	window->AddChild(new View(frame, "L ", B_FOLLOW_ALL, 255, 0, 0));
     	frame.left = frame.right + 1;
     	frame.right = window->Bounds().right;
    -	window->AddChild(new View(frame, "R", B_FOLLOW_TOP_BOTTOM | B_FOLLOW_RIGHT,
    -		0, 255, 0));
    +	View* view = new View(frame, "R", B_FOLLOW_TOP_BOTTOM | B_FOLLOW_RIGHT,
    +		0, 255, 0);
    +	window->AddChild(view);
    +	view->SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
     
     	window->Show();
     
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 01:16:30 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 01:16:30 +0200
    Subject: [Haiku-commits] r28059 - in haiku/trunk/src: kits/interface
    	servers/app
    Message-ID: <200810132316.m9DNGUNO018570@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 01:16:30 +0200 (Tue, 14 Oct 2008)
    New Revision: 28059
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28059&view=rev
    
    Modified:
       haiku/trunk/src/kits/interface/Window.cpp
       haiku/trunk/src/servers/app/EventDispatcher.cpp
    Log:
    zooey + axeld + stippi:
    Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
    the transit event:
    * If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
      containing window, it forgot to add the _feed_focus flag, which was a problem
      if the message actually happened to contain tokens (views that registered
      for events.) On the client side, only those views would receive the message,
      while the regular last mouse moved view would not be notified at all.
    * On the client side, never change fLastMouseMovedView if the message is not
      targeted at the preferred handler. In the above situation, any "registered
      for events views" would receive the message first, but viewUnderMouse would
      be NULL and then when the regular last mouse moved view received it, it
      resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).
    
    
    Modified: haiku/trunk/src/kits/interface/Window.cpp
    ===================================================================
    --- haiku/trunk/src/kits/interface/Window.cpp	2008-10-13 23:08:53 UTC (rev 28058)
    +++ haiku/trunk/src/kits/interface/Window.cpp	2008-10-13 23:16:30 UTC (rev 28059)
    @@ -3143,7 +3143,7 @@
     					uint32 transit = _TransitForMouseMoved(view, viewUnderMouse);;
     					message->AddInt32("be:transit", transit);
     
    -					if (usePreferred || viewUnderMouse == NULL)
    +					if (usePreferred)
     						fLastMouseMovedView = viewUnderMouse;
     				}
     			}
    
    Modified: haiku/trunk/src/servers/app/EventDispatcher.cpp
    ===================================================================
    --- haiku/trunk/src/servers/app/EventDispatcher.cpp	2008-10-13 23:08:53 UTC (rev 28058)
    +++ haiku/trunk/src/servers/app/EventDispatcher.cpp	2008-10-13 23:16:30 UTC (rev 28059)
    @@ -814,6 +814,8 @@
     					// that the mouse has exited its views
     					addedTokens = _AddTokens(event, fPreviousMouseTarget,
     						B_POINTER_EVENTS);
    +					if (addedTokens)
    +						_SetFeedFocus(event);
     
     					_SendMessage(fPreviousMouseTarget->Messenger(), event,
     						kMouseTransitImportance);
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 01:23:15 2008
    From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de)
    Date: Tue, 14 Oct 2008 01:23:15 +0200
    Subject: [Haiku-commits] r28060 - haiku/trunk/src/system/kernel/arch/m68k
    Message-ID: <200810132323.m9DNNFj7030577@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 01:23:14 +0200 (Tue, 14 Oct 2008)
    New Revision: 28060
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28060&view=rev
    
    Modified:
       haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp
    Log:
    Fix the build.
    
    
    Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp	2008-10-13 23:16:30 UTC (rev 28059)
    +++ haiku/trunk/src/system/kernel/arch/m68k/arch_real_time_clock.cpp	2008-10-13 23:23:14 UTC (rev 28060)
    @@ -70,14 +70,14 @@
     static uint8
     cmos_read(uint8 addr)
     {
    -	return M68KPlatform::Default()->ReadRTCReg(reg);
    +	return M68KPlatform::Default()->ReadRTCReg(addr);
     }
     
     
     static void
     cmos_write(uint8 addr, uint8 data)
     {
    -	M68KPlatform::Default()->WriteRTCReg(reg, data);
    +	M68KPlatform::Default()->WriteRTCReg(addr, data);
     }
     
     
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 01:24:14 2008
    From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de)
    Date: Tue, 14 Oct 2008 01:24:14 +0200
    Subject: [Haiku-commits] r28061 -
    	haiku/trunk/src/system/kernel/platform/atari_m68k
    Message-ID: <200810132324.m9DNOEJb032307@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 01:24:09 +0200 (Tue, 14 Oct 2008)
    New Revision: 28061
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28061&view=rev
    
    Modified:
       haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp
    Log:
    Timer & RTC code
    
    
    Modified: haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp	2008-10-13 23:23:14 UTC (rev 28060)
    +++ haiku/trunk/src/system/kernel/platform/atari_m68k/platform.cpp	2008-10-13 23:24:09 UTC (rev 28061)
    @@ -18,15 +18,28 @@
     
     #include "debugger_keymaps.h"
     
    +/* which MFP timer to use */
    +#define SYS_TDR		MFP_TADR
    +#define SYS_TCR		MFP_TACR
    +#define SYS_TCRMASK	0x0f	/* mask for timer control (0xf for A&B, 0x7 for C, 0x38 for D) */
    +#define SYS_TENABLE	0x01	/* delay mode with /4 prescaler: 0x01 (<<3 for timer D) */
    +#define SYS_TDISABLE	0x00
    +#define SYS_TVECTOR	13
    +#define MFP_FREQ	2457600UL
    +#define MFP_PRESCALER	4
    +#define MFP_RATE	(MFP_FREQ/MFP_PRESCALER)
    +#define MFP_MAX_TIMER_INTERVAL	(0xff * 1000000L / MFP_RATE)
    +
    +
     #define MFP0_BASE	0xFFFFFA00
     #define MFP1_BASE	0xFFFFFA80
     
     #define MFP0_VECTOR_BASE	64
     #define MFP1_VECTOR_BASE	(MFP0_VECTOR_BASE+16)
     
    -#define RTC_BASE	0xFFFF8960
    +#define TT_RTC_BASE	0xFFFF8960
     
    -#define RTC_VECTOR	(MFP1_VECTOR_BASE+14)
    +#define TT_RTC_VECTOR	(MFP1_VECTOR_BASE+14)
     
     // ?
     #define SCC_C0_VECTOR_BASE	(MFP1_VECTOR_BASE+16)
    @@ -65,7 +78,7 @@
     };
     
     #define in8(a)  (*(volatile uint8 *)(a))
    -#define out8(a, v)  (*(volatile uint8 *)(a) = v)
    +#define out8(v, a)  (*(volatile uint8 *)(a) = v)
     
     
     namespace BPrivate {
    @@ -86,7 +99,7 @@
     		int Vector() const { return fVector; };
     
     		uint8 ReadReg(uint32 reg) { return in8(fBase + reg); };
    -		void WriteReg(uint32 reg, uint8 v) { out8(fBase + reg, v); };
    +		void WriteReg(uint32 reg, uint8 v) { out8(v, fBase + reg); };
     
     		void EnableIOInterrupt(int irq);
     		void DisableIOInterrupt(int irq);
    @@ -105,6 +118,9 @@
     		uint32 Base() const { return fBase; };
     		int Vector() const { return fVector; };
     
    +		uint8 ReadReg(uint32 reg);
    +		void WriteReg(uint32 reg, uint8 v) { out8((uint8)reg,fBase+1); out8(v,fBase+3); };
    +
     	private:
     		uint32 fBase;
     		int fVector;
    @@ -113,6 +129,8 @@
     	M68KAtari();
     	virtual ~M68KAtari();
     
    +	void ProbeHardware(struct kernel_args *kernelArgs);
    +
     	virtual status_t Init(struct kernel_args *kernelArgs);
     	virtual status_t InitSerialDebug(struct kernel_args *kernelArgs);
     	virtual status_t InitPostVM(struct kernel_args *kernelArgs);
    @@ -130,6 +148,8 @@
     	virtual void DisableIOInterrupt(int irq);
     	virtual bool AcknowledgeIOInterrupt(int irq);
     
    +	virtual	uint8 ReadRTCReg(uint8 reg);
    +	virtual	void WriteRTCReg(uint8 reg, uint8 val);
     	virtual	void SetHardwareRTC(uint32 seconds);
     	virtual	uint32 GetHardwareRTC();
     
    @@ -189,7 +209,7 @@
     	uint8 val = in8(reg);
     	if (val & bit == 0) {
     		val |= bit;
    -		out8(reg, val);
    +		out8(val, reg);
     	}
     }
     
    @@ -203,7 +223,7 @@
     	uint8 val = in8(reg);
     	if (val & bit) {
     		val &= ~bit;
    -		out8(reg, val);
    +		out8(val, reg);
     	}
     }
     
    @@ -217,7 +237,7 @@
     	uint8 val = in8(reg);
     	if (val & bit) {
     		val &= ~bit;
    -		out8(reg, val);
    +		out8(val, reg);
     		return true;
     	}
     	return false;
    @@ -242,6 +262,22 @@
     }
     
     
    +uint8
    +M68KAtari::RTC::ReadReg(uint32 reg)
    +{
    +	int waitTime = 10000;
    +
    +	if (reg < 0x0a) {	// time of day stuff...
    +				// check for in progress updates before accessing
    +		out8(0x0a, fBase+1);
    +		while((in8(fBase+3) & 0x80) && --waitTime);
    +	}
    +	
    +	out8((uint8)reg,fBase+1);
    +	return in8(fBase+3);
    +}
    +
    +
     // #pragma mark - M68KAtari
     
     
    @@ -258,11 +294,32 @@
     }
     
     
    +void
    +M68KAtari::ProbeHardware(struct kernel_args *kernelArgs)
    +{
    +	dprintf("Atari hardware:\n");
    +	// if we are here we already know we have one
    +	dprintf("	ST MFP\n");
    +	if (m68k_is_hw_register_readable(MFP1_BASE)) {
    +		dprintf("	TT MFP\n");
    +		fMFP[1] = new(sMFP1Buffer) M68KAtari::MFP(MFP1_BASE, MFP1_VECTOR_BASE);
    +	}
    +	if (m68k_is_hw_register_readable(TT_RTC_BASE)) {
    +		dprintf("	TT RTC MC146818A\n");
    +		fRTC = new(sRTCBuffer) M68KAtari::RTC(TT_RTC_BASE,TT_RTC_VECTOR);
    +	} else
    +		panic("TT RTC required!");
    +
    +
    +}
    +
    +
     status_t
     M68KAtari::Init(struct kernel_args *kernelArgs)
     {
     	fMFP[0] = NULL;
     	fMFP[1] = NULL;
    +	fRTC = NULL;
     
     	// initialize ARAnyM NatFeatures
     	nfGetID =
    @@ -272,14 +329,13 @@
     	nfPage = (char *)
     		kernelArgs->arch_args.plat_args.atari.nat_feat.nf_page;
     
    -	// probe for hardware
    -	if (m68k_is_hw_register_readable(MFP0_BASE))
    +	// probe for ST-MFP
    +	if (m68k_is_hw_register_readable(MFP0_BASE)) {
     		fMFP[0] = new(sMFP0Buffer) M68KAtari::MFP(MFP0_BASE, MFP0_VECTOR_BASE);
    -	else
    +	} else
    +		// won't really work anyway from here
     		panic("You MUST have an ST MFP! Wait, is that *really* an Atari ???");
    -	if (m68k_is_hw_register_readable(MFP1_BASE))
    -		fMFP[1] = new(sMFP1Buffer) M68KAtari::MFP(MFP1_BASE, MFP1_VECTOR_BASE);
    -	//}
    +	
     	return B_OK;
     }
     
    @@ -292,8 +348,11 @@
     
     #warning M68K: add real serial debug output someday
     
    -	//out8(IKBD_BASE+IKBD_DATA, 0x11);
    +	//out8(0x11, IKBD_BASE+IKBD_DATA);
     
    +	// now we can expect to see something
    +	ProbeHardware(kernelArgs);
    +
     	return B_OK;
     }
     
    @@ -316,7 +375,7 @@
     status_t
     M68KAtari::InitPIC(struct kernel_args *kernelArgs)
     {
    -	return B_NO_INIT;
    +	return B_OK;
     }
     
     
    @@ -324,8 +383,6 @@
     M68KAtari::InitRTC(struct kernel_args *kernelArgs,
     	struct real_time_data *data)
     {
    -	fRTC = new(sRTCBuffer) M68KAtari::RTC(RTC_BASE, RTC_VECTOR);
    -#warning M68K: FIXME
     	return B_OK;
     }
     
    @@ -335,7 +392,7 @@
     {
     	
     	fMFP[0]->WriteReg(MFP_TACR, 0); // stop it
    -	install_io_interrupt_handler(fMFP[0]->Vector()+13, &MFPTimerInterrupt, fMFP[0], 0);
    +	install_io_interrupt_handler(fMFP[0]->Vector()+13, &MFPTimerInterrupt, this, 0);
     	return B_OK;
     }
     
    @@ -535,7 +592,26 @@
     	return false;
     }
     
    +
    +uint8
    +M68KAtari::ReadRTCReg(uint8 reg)
    +{
    +	// fake century
    +	// (on MC146818A it's in the RAM, but probably it's used for that purpose...)
    +	// but just in case, we're in 20xx now anyway :)
    +	if (reg == 0x32)
    +		return 0x20;
    +	return fRTC->ReadReg(reg);
    +}
    +
    +
     void
    +M68KAtari::WriteRTCReg(uint8 reg, uint8 val)
    +{
    +	fRTC->WriteReg(reg, val);
    +}
    +
    +void
     M68KAtari::SetHardwareRTC(uint32 seconds)
     {
     #warning M68K: WRITEME
    @@ -553,17 +629,29 @@
     void
     M68KAtari::SetHardwareTimer(bigtime_t timeout)
     {
    -	uint8 counts = (uint8)(timeout & 0x0ff);
    -	//XXX: SCALE
    -	fMFP[0]->WriteReg(MFP_TADR, counts);
    -	fMFP[0]->WriteReg(MFP_TACR, 0x01); // delay mode, device by 4
    +	uint8 nextEventClocks;
    +	if (timeout <= 0)
    +		nextEventClocks = 2;
    +	else if (timeout < MFP_MAX_TIMER_INTERVAL)
    +		nextEventClocks = timeout * MFP_RATE / 1000000;
    +	else
    +		nextEventClocks = 0xff;
    +
    +	fMFP[0]->WriteReg(SYS_TDR, nextEventClocks);
    +	// delay mode, device by 4
    +	fMFP[0]->WriteReg(SYS_TCR, (fMFP[0]->ReadReg(SYS_TCR) & SYS_TCRMASK) | SYS_TENABLE);
    +	// enable irq
    +	EnableIOInterrupt(MFP1_VECTOR_BASE + SYS_TVECTOR);
     }
     
     
     void
     M68KAtari::ClearHardwareTimer(void)
     {
    -	fMFP[0]->WriteReg(MFP_TACR, 0); // stop it
    +	// disable the irq (as on PC but I'm not sure it's needed)
    +	DisableIOInterrupt(MFP1_VECTOR_BASE + SYS_TVECTOR);
    +	// stop it, we don't want another countdown
    +	fMFP[0]->WriteReg(SYS_TCR, (fMFP[0]->ReadReg(SYS_TCR) & SYS_TCRMASK) | SYS_TDISABLE);
     }
     
     
    @@ -592,6 +680,10 @@
     int32
     M68KAtari::MFPTimerInterrupt(void *data)
     {
    +	M68KAtari *_this = (M68KAtari *)data;
    +	// disable the timer, else it will loop again with the same value
    +	_this->ClearHardwareTimer();
    +	// handle the timer
     	return timer_interrupt();
     }
     
    
    
    
    From anevilyak at mail.berlios.de  Tue Oct 14 01:27:51 2008
    From: anevilyak at mail.berlios.de (anevilyak at BerliOS)
    Date: Tue, 14 Oct 2008 01:27:51 +0200
    Subject: [Haiku-commits] r28062 -
    	haiku/trunk/src/tools/makebootable/platform/bios_ia32
    Message-ID: <200810132327.m9DNRpCH005977@sheep.berlios.de>
    
    Author: anevilyak
    Date: 2008-10-14 01:27:50 +0200 (Tue, 14 Oct 2008)
    New Revision: 28062
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28062&view=rev
    
    Modified:
       haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile
    Log:
    Fix build of tool version of makebootable on Haiku.
    
    
    
    Modified: haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile
    ===================================================================
    --- haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile	2008-10-13 23:24:09 UTC (rev 28061)
    +++ haiku/trunk/src/tools/makebootable/platform/bios_ia32/Jamfile	2008-10-13 23:27:50 UTC (rev 28062)
    @@ -1,7 +1,9 @@
     SubDir HAIKU_TOP src tools makebootable platform bios_ia32 ;
     
    -UsePrivateHeaders storage ;
    +SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ;
     
    +UsePrivateHeaders storage shared ;
    +
     SEARCH_SOURCE
     	+= [ FDirName $(HAIKU_TOP) src bin makebootable platform bios_ia32 ] ;
     
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 01:31:20 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 01:31:20 +0200
    Subject: [Haiku-commits] r28063 - haiku/trunk/src/apps/deskbar
    Message-ID: <200810132331.m9DNVK4P012663@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 01:31:19 +0200 (Tue, 14 Oct 2008)
    New Revision: 28063
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28063&view=rev
    
    Modified:
       haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp
       haiku/trunk/src/apps/deskbar/ExpandoMenuBar.h
       haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp
       haiku/trunk/src/apps/deskbar/TeamMenuItem.h
    Log:
    zooey + stippi:
    Reimplemented the drag message over the team entries dragging. The previous
    implementation used the menu bar tracking by faking a B_MOUSE_DOWN event. The
    problem was that in Haiku menus are always sticky and therefor the tracking
    thread was not exited when the user released the mouse (which was supposed to
    trigger the drop event in the Deskbar). The new implementation follows the
    drag in the asynchronous mouse hooks and uses it's own selection state in
    TTeamMenuItem to highlight the eventual drop targets.
    Fixes #2771.
    
    
    Modified: haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp	2008-10-13 23:27:50 UTC (rev 28062)
    +++ haiku/trunk/src/apps/deskbar/ExpandoMenuBar.cpp	2008-10-13 23:31:19 UTC (rev 28063)
    @@ -78,7 +78,8 @@
     	fShowTeamExpander(static_cast(be_app)->Settings()->superExpando),
     	fExpandNewTeams(static_cast(be_app)->Settings()->expandNewTeams),
     	fBarView(bar),
    -	fFirstApp(0)
    +	fFirstApp(0),
    +	fPreviousDragTargetItem(NULL)
     {
     #ifdef DOUBLECLICKBRINGSTOFRONT
     	fLastClickItem = -1;
    @@ -392,8 +393,8 @@
     TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage *message)
     {
     	if (!message) {
    -		//	force a cleanup
    -		fBarView->DragStop(true);
    +		// force a cleanup
    +		_FinishedDrag();
     		BMenuBar::MouseMoved(where, code, message);
     		return;
     	}
    @@ -403,29 +404,61 @@
     		|| Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons) < B_OK)
     		buttons = 0;
     
    +	if (buttons == 0)
    +		return;
    +
     	switch (code) {
     		case B_ENTERED_VIEW:
    -			if (message && buttons != 0) {
    -				fBarView->CacheDragData(message);
    -				MouseDown(where);
    -			}
    +			// fPreviousDragTargetItem should always be NULL here anyways.
    +			if (fPreviousDragTargetItem)
    +				_FinishedDrag();
    +
    +			fBarView->CacheDragData(message);
    +			fPreviousDragTargetItem = NULL;
     			break;
     
    +		case B_OUTSIDE_VIEW:
    +			// NOTE: Should not be here, but for the sake of defensive
    +			// programming...
     		case B_EXITED_VIEW:
    -			if (fBarView->Dragging() && buttons != 0) {
    -				if (!TeamItemAtPoint(where)
    -					&& !InBeMenu(where)
    -					&& (fSeparatorItem && !fSeparatorItem->Frame().Contains(where))
    -					&& !Frame().Contains(where)) {
    -					fBarView->DragStop();
    +			_FinishedDrag();
    +			break;
    +
    +		case B_INSIDE_VIEW:
    +			if (fBarView->Dragging()) {
    +				TTeamMenuItem* item = NULL;
    +				for (int32 i = 0; i < CountItems(); i++) {
    +					BMenuItem* _item = ItemAt(i);
    +					if (_item->Frame().Contains(where)) {
    +						item = dynamic_cast(_item);
    +						break;
    +					}
     				}
    +				if (item == fPreviousDragTargetItem)
    +					break;
    +				if (fPreviousDragTargetItem != NULL)
    +					fPreviousDragTargetItem->SetOverrideSelected(false);
    +				if (item != NULL)
    +					item->SetOverrideSelected(true);
    +				fPreviousDragTargetItem = item;
     			}
     			break;
     	}
    -	BMenuBar::MouseMoved(where, code, message);
     }
     
     
    +void
    +TExpandoMenuBar::MouseUp(BPoint where)
    +{
    +	if (!fBarView->Dragging()) {
    +		BMenuBar::MouseUp(where);
    +		return;
    +	}
    +
    +	_FinishedDrag(true);
    +}
    +
    +
     bool
     TExpandoMenuBar::InBeMenu(BPoint loc) const
     {
    @@ -816,3 +849,17 @@
     	return B_OK;
     }
     
    +
    +void
    +TExpandoMenuBar::_FinishedDrag(bool invoke)
    +{
    +	if (fPreviousDragTargetItem != NULL) {
    +		if (invoke)
    +			fPreviousDragTargetItem->Invoke();
    +		fPreviousDragTargetItem->SetOverrideSelected(false);
    +		fPreviousDragTargetItem = NULL;
    +	}
    +	if (!invoke && fBarView->Dragging())
    +		fBarView->DragStop(true);
    +}
    +
    
    Modified: haiku/trunk/src/apps/deskbar/ExpandoMenuBar.h
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/ExpandoMenuBar.h	2008-10-13 23:27:50 UTC (rev 28062)
    +++ haiku/trunk/src/apps/deskbar/ExpandoMenuBar.h	2008-10-13 23:31:19 UTC (rev 28063)
    @@ -66,6 +66,7 @@
     		virtual void MessageReceived(BMessage *message);
     		virtual void MouseDown(BPoint where);
     		virtual void MouseMoved(BPoint where, uint32 code, const BMessage *);
    +		virtual void MouseUp(BPoint where);
     
     		virtual void Draw(BRect update);
     		virtual void DrawBackground(BRect update);
    @@ -88,7 +89,7 @@
     		void AddTeam(team_id team, const char *signature);
     		void RemoveTeam(team_id team, bool partial);
     
    -		void Hilite(drag_and_drop_selection which);
    +		void _FinishedDrag(bool invoke = false);
     
     		bool fVertical;
     		bool fOverflow;
    @@ -102,6 +103,7 @@
     
     		TBarMenuTitle *fBeMenuItem;
     		TTeamMenuItem *fSeparatorItem;
    +		TTeamMenuItem *fPreviousDragTargetItem;
     
     #ifdef DOUBLECLICKBRINGSTOFRONT
     		int32 fLastClickItem;
    
    Modified: haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp	2008-10-13 23:27:50 UTC (rev 28062)
    +++ haiku/trunk/src/apps/deskbar/TeamMenuItem.cpp	2008-10-13 23:31:19 UTC (rev 28063)
    @@ -101,6 +101,7 @@
     
     	fOverrideWidth = width;
     	fOverrideHeight = height;
    +	fOverriddenSelected = false;
     
     	fDrawLabel = drawLabel;
     	fVertical = vertical;
    @@ -156,6 +157,14 @@
     }
     
     
    +void
    +TTeamMenuItem::SetOverrideSelected(bool selected)
    +{
    +	fOverriddenSelected = selected;
    +	Highlight(selected);
    +}
    +
    +
     float
     TTeamMenuItem::LabelWidth() const
     {
    @@ -225,14 +234,14 @@
     	//	if not selected or being tracked on, fill with gray
     	TBarView *barview = (static_cast(be_app))->BarView();
     	bool canHandle = !barview->Dragging() || barview->AppCanHandleTypes(Signature());
    -	if (!IsSelected() && !menu->IsRedrawAfterSticky() || !canHandle || !IsEnabled()) {
    +	if (!_IsSelected() && !menu->IsRedrawAfterSticky() || !canHandle || !IsEnabled()) {
     		frame.InsetBy(1, 1);
     		menu->SetHighColor(menuColor);
     		menu->FillRect(frame);
     	}
     
     	//	draw the gray, unselected item, border
    -	if (!IsSelected() || !IsEnabled()) {
    +	if (!_IsSelected() || !IsEnabled()) {
     		rgb_color shadow = tint_color(menuColor, B_DARKEN_1_TINT);
     		rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
     
    @@ -257,7 +266,7 @@
     	}
     
     	//	if selected or being tracked on, fill with the hilite gray color
    -	if (IsEnabled() && IsSelected() && !menu->IsRedrawAfterSticky() && canHandle) {
    +	if (IsEnabled() && _IsSelected() && !menu->IsRedrawAfterSticky() && canHandle) {
     		// fill
     		menu->SetHighColor(tint_color(menuColor, B_HIGHLIGHT_BACKGROUND_TINT));
     		menu->FillRect(frame);
    @@ -415,7 +424,7 @@
     	TBarView *barview = (static_cast(be_app))->BarView();
     	bool canHandle = !barview->Dragging()
     		|| barview->AppCanHandleTypes(Signature());
    -	if (IsSelected() && IsEnabled() && canHandle)
    +	if (_IsSelected() && IsEnabled() && canHandle)
     		menu->SetLowColor(tint_color(menu->ViewColor(),
     			B_HIGHLIGHT_BACKGROUND_TINT));
     	else
    @@ -521,3 +530,10 @@
     	return bounds;
     }
     
    +
    +bool
    +TTeamMenuItem::_IsSelected() const
    +{
    +	return IsSelected() || fOverriddenSelected;
    +}
    +
    
    Modified: haiku/trunk/src/apps/deskbar/TeamMenuItem.h
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/TeamMenuItem.h	2008-10-13 23:27:50 UTC (rev 28062)
    +++ haiku/trunk/src/apps/deskbar/TeamMenuItem.h	2008-10-13 23:31:19 UTC (rev 28063)
    @@ -59,6 +59,7 @@
     
     		void SetOverrideWidth(float width);
     		void SetOverrideHeight(float height);
    +		void SetOverrideSelected(bool selected);
     
     		bool IsExpanded();
     		void ToggleExpandState(bool resizeWindow);
    @@ -82,6 +83,8 @@
     			float width = -1.0f, float height = -1.0f,
     			bool drawLabel = true,bool vertical=true);
     
    +		bool _IsSelected() const;
    +
     		BList *fTeam;
     		BBitmap *fIcon;
     		char *fName;
    @@ -96,6 +99,7 @@
     		bool fVertical;
     
     		bool fExpanded;
    +		bool fOverriddenSelected;
     };
     
     #endif /* TEAMMENUITEM_H */
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 01:42:30 2008
    From: mmu_man at mail.berlios.de (mmu_man at BerliOS)
    Date: Tue, 14 Oct 2008 01:42:30 +0200
    Subject: [Haiku-commits] r28064 - in haiku/trunk/src/apps/icon-o-matic: .
    	import_export import_export/styled_text
    Message-ID: <200810132342.m9DNgUXb003385@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 01:42:29 +0200 (Tue, 14 Oct 2008)
    New Revision: 28064
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28064&view=rev
    
    Added:
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h
    Modified:
       haiku/trunk/src/apps/icon-o-matic/Jamfile
       haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp
    Log:
    - handle color drops as a new style
    - handle dropped/pastes text as shapes with path (and style when with text_runs from StyledEdit)
    
    
    Modified: haiku/trunk/src/apps/icon-o-matic/Jamfile
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/Jamfile	2008-10-13 23:31:19 UTC (rev 28063)
    +++ haiku/trunk/src/apps/icon-o-matic/Jamfile	2008-10-13 23:42:29 UTC (rev 28064)
    @@ -50,6 +50,7 @@
     	import_export/flat_icon
     	import_export/message
     	import_export/svg
    +	import_export/styled_text
     	shape
     	shape/commands
     	style
    @@ -229,6 +230,9 @@
     	MessageExporter.cpp
     	MessageImporter.cpp
     
    +	# import_export/styled_text
    +	StyledTextImporter.cpp
    +
     	# import_export/svg
     	DocumentBuilder.cpp
     	PathTokenizer.cpp
    
    Modified: haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp	2008-10-13 23:31:19 UTC (rev 28063)
    +++ haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp	2008-10-13 23:42:29 UTC (rev 28064)
    @@ -11,6 +11,7 @@
     #include 
     #include 
     
    +#include 
     #include 
     #include 
     #include 
    @@ -63,6 +64,8 @@
     #include "StyleContainer.h"
     #include "VectorPath.h"
     
    +#include "StyledTextImporter.h"
    +
     using std::nothrow;
     
     enum {
    @@ -120,6 +123,24 @@
     		return;
     	}
     
    +	if (message->WasDropped()) {
    +		const rgb_color *color;
    +		int32 len;
    +		int32 i;
    +		// create styles from dropped colors
    +		for (i = 0; message->FindData("RGBColor", B_RGB_COLOR_TYPE, i, 
    +			(const void **)&color, &len) == B_OK; i++) {
    +			if (len != sizeof(rgb_color))
    +				continue;
    +			Style* style = new (nothrow) Style(*color);
    +			Style* styles[1] = { style };
    +			AddStylesCommand* styleCommand = new (nothrow) AddStylesCommand(
    +				fDocument->Icon()->Styles(), styles, 1,
    +				fDocument->Icon()->Styles()->CountStyles());
    +			fDocument->CommandStack()->Perform(styleCommand);
    +		}
    +	}
    +
     	switch (message->what) {
     
     		case B_REFS_RECEIVED:
    @@ -130,6 +151,63 @@
     			be_app->PostMessage(message);
     			break;
     
    +		case B_MIME_DATA:
    +			if (message->HasData("text/plain", B_MIME_TYPE)) {
    +				status_t err;
    +				Icon* icon;
    +				icon = new (nothrow) Icon(*fDocument->Icon());
    +				if (icon) {
    +					StyledTextImporter importer;
    +					err = importer.Import(icon, message);
    +					if (err >= B_OK) {
    +							AutoWriteLocker locker(fDocument);
    +
    +							SetIcon(NULL);
    +
    +							// incorporate the loaded icon into the document
    +							// (either replace it or append to it)
    +							fDocument->MakeEmpty(false);
    +								// if append, the document savers are preserved
    +							fDocument->SetIcon(icon);
    +							SetIcon(icon);
    +					}
    +				}
    +			}
    +			break;
    +
    +		case B_PASTE:
    +			if (be_clipboard->Lock()) {
    +				status_t err;
    +				BMessage *clip = be_clipboard->Data();
    +
    +				if (!clip || !clip->HasData("text/plain", B_MIME_TYPE)) {
    +					be_clipboard->Unlock();
    +					break;
    +				}
    +
    +				Icon* icon;
    +				icon = new (nothrow) Icon(*fDocument->Icon());
    +				if (icon) {
    +					StyledTextImporter importer;
    +					err = importer.Import(icon, clip);
    +					if (err >= B_OK) {
    +							AutoWriteLocker locker(fDocument);
    +
    +							SetIcon(NULL);
    +
    +							// incorporate the loaded icon into the document
    +							// (either replace it or append to it)
    +							fDocument->MakeEmpty(false);
    +								// if append, the document savers are preserved
    +							fDocument->SetIcon(icon);
    +							SetIcon(icon);
    +					}
    +				}
    +
    +				be_clipboard->Unlock();
    +			}
    +			break;
    +
     		case MSG_UNDO:
     			fDocument->CommandStack()->Undo();
     			break;
    
    Added: haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-13 23:31:19 UTC (rev 28063)
    +++ haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-13 23:42:29 UTC (rev 28064)
    @@ -0,0 +1,338 @@
    +/*
    + * Copyright 2008, Haiku. All rights reserved.
    + * Distributed under the terms of the MIT License.
    + *
    + * Authors:
    + *		Fran?ois Revol 
    + */
    +#include "StyledTextImporter.h"
    +
    +#include 
    +#include 
    +#include 
    +
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +#include "Defines.h"
    +#include "Icon.h"
    +#include "PathContainer.h"
    +#include "Shape.h"
    +#include "Style.h"
    +#include "StyleContainer.h"
    +#include "VectorPath.h"
    +
    +//#define CALLED() printf("%s()\n", __FUNCTION__);
    +#define CALLED() do {} while (0)
    +
    +using std::nothrow;
    +
    +class ShapeIterator : public BShapeIterator {
    + public:
    +	ShapeIterator(Icon *icon, Shape *to, BPoint offset);
    +	~ShapeIterator() {};
    +
    +	virtual	status_t	IterateMoveTo(BPoint *point);
    +	virtual	status_t	IterateLineTo(int32 lineCount, BPoint *linePts);
    +	virtual	status_t	IterateBezierTo(int32 bezierCount, BPoint *bezierPts);
    +	virtual	status_t	IterateClose();
    +
    + private:
    +	VectorPath				*CurrentPath();
    +	void					NextPath();
    +
    +	Icon *fIcon;
    +	Shape *fShape;
    +	VectorPath *fPath;
    +	BPoint fOffset;
    +};
    +
    +ShapeIterator::ShapeIterator(Icon *icon, Shape *to, BPoint offset)
    +{
    +	CALLED();
    +	fIcon = icon;
    +	fShape = to;
    +	fPath = NULL;
    +	fOffset = offset;
    +}
    +
    +status_t
    +ShapeIterator::IterateMoveTo(BPoint *point)
    +{
    +	CALLED();
    +	if (fPath)
    +		NextPath();
    +	if (!CurrentPath())
    +		return B_ERROR;
    +	fPath->AddPoint(fOffset + *point);
    +	return B_OK;
    +}
    +
    +status_t
    +ShapeIterator::IterateLineTo(int32 lineCount, BPoint *linePts)
    +{
    +	CALLED();
    +	if (!CurrentPath())
    +		return B_ERROR;
    +	while (lineCount--)
    +		fPath->AddPoint(fOffset + *linePts++);
    +	return B_OK;
    +}
    +
    +status_t
    +ShapeIterator::IterateBezierTo(int32 bezierCount, BPoint *bezierPts)
    +{
    +	CALLED();
    +	if (!CurrentPath())
    +		return B_ERROR;
    +	while (bezierCount--) {
    +		fPath->AddPoint(fOffset + *bezierPts++, 
    +			fOffset + *bezierPts++, fOffset + *bezierPts++, false);
    +	}
    +	return B_OK;
    +}
    +
    +status_t
    +ShapeIterator::IterateClose()
    +{
    +	CALLED();
    +	if (!CurrentPath())
    +		return B_ERROR;
    +	fPath->SetClosed(true);
    +	NextPath();
    +	return B_OK;
    +}
    +
    +VectorPath *
    +ShapeIterator::CurrentPath()
    +{
    +	CALLED();
    +	if (fPath)
    +		return fPath;
    +	fPath = new (nothrow) VectorPath();
    +	return fPath;
    +}
    +
    +void
    +ShapeIterator::NextPath()
    +{
    +	CALLED();
    +	if (fPath) {
    +		fIcon->Paths()->AddPath(fPath);
    +		fShape->Paths()->AddPath(fPath);
    +	}
    +	fPath = NULL;
    +}
    +
    +
    +// #pragma mark -
    +
    +// constructor
    +StyledTextImporter::StyledTextImporter()
    +	: Importer(),
    +	  fStyleMap(NULL),
    +	  fStyleCount(0)
    +{
    +	CALLED();
    +}
    +
    +// destructor
    +StyledTextImporter::~StyledTextImporter()
    +{
    +	CALLED();
    +}
    +
    +// Import
    +status_t
    +StyledTextImporter::Import(Icon* icon, BMessage* clipping)
    +{
    +	CALLED();
    +	const char *text;
    +	int32 textLength;
    +
    +	if (clipping == NULL)
    +		return ENOENT;
    +	if (clipping->FindData("text/plain", 
    +		B_MIME_TYPE, (const void **)&text, &textLength) == B_OK) {
    +		text_run_array *runs = NULL;
    +		int32 runsLength;
    +		if (clipping->FindData("application/x-vnd.Be-text_run_array", 
    +			B_MIME_TYPE, (const void **)&runs, &runsLength) < B_OK)
    +			runs = NULL;
    +		BString str(text, textLength);
    +		return _Import(icon, str.String(), runs);
    +	}
    +	return ENOENT;
    +}
    +
    +// Import
    +status_t
    +StyledTextImporter::Import(Icon* icon, const entry_ref* ref)
    +{
    +	CALLED();
    +	status_t err;
    +	BFile file(ref, B_READ_ONLY);
    +	err = file.InitCheck();
    +	if (err < B_OK)
    +		return err;
    +
    +	BNodeInfo info(&file);
    +	char mime[B_MIME_TYPE_LENGTH];
    +	err = info.GetType(mime);
    +	if (err < B_OK)
    +		return err;
    +
    +	if (strncmp(mime, "text/plain", B_MIME_TYPE_LENGTH))
    +		return EINVAL;
    +
    +	off_t size;
    +	err = file.GetSize(&size);
    +	if (err < B_OK)
    +		return err;
    +	if (size > UINT32_MAX - 1)
    +		return E2BIG;
    +	
    +	BMallocIO mio;
    +	mio.SetSize((size_t)size + 1);
    +	memset((void *)mio.Buffer(), 0, (size_t)size + 1);
    +
    +	// TODO: read runs
    +
    +	return _Import(icon, (const char *)mio.Buffer(), NULL);
    +}
    +
    +// _Import
    +status_t
    +StyledTextImporter::_Import(Icon* icon, const char *text, text_run_array *runs)
    +{
    +	CALLED();
    +	status_t ret = Init(icon);
    +	if (ret < B_OK) {
    +		printf("StyledTextImporter::Import() - "
    +			   "Init() error: %s\n", strerror(ret));
    +		return ret;
    +	}
    +
    +	StyleContainer* styles = icon->Styles();
    +	// import run colors as styles
    +	if (runs) {
    +		fStyleMap = new struct style_map[runs->count];
    +		for (int32 i = 0; runs && i < runs->count; i++) {
    +			_AddStyle(icon, &runs->runs[i]);
    +		}
    +	}
    +
    +#if 1
    +	int32 currentRun = 0;
    +	text_run *run = NULL;
    +	if (runs)
    +		run = &runs->runs[0];
    +	BString str(text);
    +	int32 len = str.Length();
    +	int32 chars = str.CountChars();
    +	BPoint offset(0,0);
    +
    +	for (int32 i = 0, c = 0; i < len && c < chars; c++) {
    +		// make sure we are still on the (good) run
    +		while (run && currentRun < runs->count - 1 && 
    +			i >= runs->runs[currentRun + 1].offset) {
    +			printf("switching to run %d\n", currentRun);
    +			run = &runs->runs[++currentRun];
    +		}
    +
    +		BShape glyph;
    +		BShape *glyphs[1] = { &glyph };
    +		BFont font(be_plain_font);
    +		if (run)
    +			font = run->font;
    +
    +		font.GetGlyphShapes((str.String() + i), 1, glyphs);
    +		if (glyph.Bounds().IsValid()) {
    +			offset.x += glyph.Bounds().Width();
    +			Shape* shape = new (nothrow) Shape(NULL);
    +			if (!shape || !icon->Shapes()->AddShape(shape)) {
    +				delete shape;
    +				return B_NO_MEMORY;
    +			}
    +			for (int j = 0; run && j < fStyleCount; j++) {
    +				if (fStyleMap[j].run == run) {
    +					shape->SetStyle(fStyleMap[j].style);
    +					break;
    +				}
    +			}
    +			ShapeIterator iterator(icon, shape, offset);
    +			if (iterator.Iterate(&glyph) < B_OK)
    +				return B_ERROR;
    +
    +		}
    +
    +		// skip the rest of UTF-8 char bytes
    +		for (i++; i < len && str[i] & 0x80; i++);
    +	}
    +#endif
    +	delete[] fStyleMap;
    +
    +	return B_OK;
    +}
    +
    +// #pragma mark -
    +
    +// _AddStyle
    +status_t
    +StyledTextImporter::_AddStyle(Icon *icon, text_run *run)
    +{
    +	CALLED();
    +	if (!run)
    +		return EINVAL;
    +	rgb_color color = run->color;
    +	Style* style = new (nothrow) Style(color);
    +	if (!style) {
    +		delete style;
    +		return B_NO_MEMORY;
    +	}
    +
    +	bool found = false;
    +	for (int i = 0; i < fStyleCount; i++) {
    +		if (*style == *(fStyleMap[i].style)) {
    +			delete style;
    +			style = fStyleMap[i].style;
    +			found = true;
    +			break;
    +		}
    +	}
    +
    +	if (!found && !icon->Styles()->AddStyle(style)) {
    +		delete style;
    +		return B_NO_MEMORY;
    +	}
    +
    +	fStyleMap[fStyleCount].run = run;
    +	fStyleMap[fStyleCount].style = style;
    +	fStyleCount++;
    +
    +	return B_OK;
    +}
    +
    +// _AddPaths
    +status_t
    +StyledTextImporter::_AddPaths(Icon *icon, BShape *shape)
    +{
    +	CALLED();
    +	return B_ERROR;
    +}
    +
    +// _AddShape
    +status_t
    +StyledTextImporter::_AddShape(Icon *icon, BShape *shape, text_run *run)
    +{
    +	CALLED();
    +	return B_ERROR;
    +}
    
    Added: haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h	2008-10-13 23:31:19 UTC (rev 28063)
    +++ haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h	2008-10-13 23:42:29 UTC (rev 28064)
    @@ -0,0 +1,57 @@
    +/*
    + * Copyright 2008, Haiku. All rights reserved.
    + * Distributed under the terms of the MIT License.
    + *
    + * Authors:
    + *		Fran?ois Revol 
    + */
    +#ifndef STYLED_TEXT_IMPORTER_H
    +#define STYLED_TEXT_IMPORTER_H
    +
    +
    +#include "Importer.h"
    +
    +class BMessage;
    +class BShape;
    +struct text_run;
    +struct text_run_array;
    +
    +namespace BPrivate {
    +namespace Icon {
    +	class Icon;
    +	class Style;
    +	class VectorPath;
    +	class PathContainer;
    +	class ShapeContainer;
    +	class StyleContainer;
    +}
    +}
    +
    +struct style_map {
    +	text_run *run;
    +	Style *style;
    +};
    +
    +class StyledTextImporter : public Importer {
    + public:
    +								StyledTextImporter();
    +	virtual						~StyledTextImporter();
    +
    +			status_t			Import(Icon* icon,
    +									   BMessage* clipping);
    +			status_t			Import(Icon* icon,
    +									   const entry_ref* ref);
    +
    + private:
    +			status_t			_Import(Icon* icon, const char *text, 
    +										text_run_array *runs);
    +
    +			status_t			_AddStyle(Icon *icon, text_run *run);
    +			status_t			_AddPaths(Icon *icon, BShape *shape);
    +			status_t			_AddShape(Icon *icon, BShape *shape, text_run *run);
    +
    +			struct style_map	*fStyleMap;
    +			int32				fStyleCount;
    +};
    +
    +#endif // STYLED_TEXT_IMPORTER_H
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 01:45:32 2008
    From: mmu_man at mail.berlios.de (mmu_man at mail.berlios.de)
    Date: Tue, 14 Oct 2008 01:45:32 +0200
    Subject: [Haiku-commits] r28065 -
    	haiku/trunk/src/apps/icon-o-matic/import_export/styled_text
    Message-ID: <200810132345.m9DNjWR8003917@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 01:45:31 +0200 (Tue, 14 Oct 2008)
    New Revision: 28065
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28065&view=rev
    
    Modified:
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h
    Log:
    Fix Haiku build.
    
    
    Modified: haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h	2008-10-13 23:42:29 UTC (rev 28064)
    +++ haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h	2008-10-13 23:45:31 UTC (rev 28065)
    @@ -10,6 +10,7 @@
     
     
     #include "Importer.h"
    +#include 
     
     class BMessage;
     class BShape;
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 01:47:31 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 01:47:31 +0200
    Subject: [Haiku-commits] r28066 - in haiku/trunk: headers/private/storage
    	src/kits/storage/disk_device
    Message-ID: <200810132347.m9DNlV4b004158@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 01:47:30 +0200 (Tue, 14 Oct 2008)
    New Revision: 28066
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28066&view=rev
    
    Modified:
       haiku/trunk/headers/private/storage/DiskSystem.h
       haiku/trunk/src/kits/storage/disk_device/DiskSystem.cpp
    Log:
    * Added a handy BDiskSystem::SupportsWriting().
    
    
    Modified: haiku/trunk/headers/private/storage/DiskSystem.h
    ===================================================================
    --- haiku/trunk/headers/private/storage/DiskSystem.h	2008-10-13 23:45:31 UTC (rev 28065)
    +++ haiku/trunk/headers/private/storage/DiskSystem.h	2008-10-13 23:47:30 UTC (rev 28066)
    @@ -45,6 +45,7 @@
     			bool			SupportsCreatingChild() const;
     			bool			SupportsDeletingChild() const;
     			bool			SupportsInitializing() const;
    +			bool			SupportsWriting() const;
     
     			status_t		GetTypeForContentType(const char* contentType,
     								BString* type) const;
    
    Modified: haiku/trunk/src/kits/storage/disk_device/DiskSystem.cpp
    ===================================================================
    --- haiku/trunk/src/kits/storage/disk_device/DiskSystem.cpp	2008-10-13 23:45:31 UTC (rev 28065)
    +++ haiku/trunk/src/kits/storage/disk_device/DiskSystem.cpp	2008-10-13 23:47:30 UTC (rev 28066)
    @@ -290,6 +290,17 @@
     }
     
     
    +bool
    +BDiskSystem::SupportsWriting() const
    +{
    +	if (InitCheck() != B_OK
    +		|| !IsFileSystem())
    +		return false;
    +
    +	return (fFlags & B_DISK_SYSTEM_SUPPORTS_WRITING) != 0;
    +}
    +
    +
     // GetTypeForContentType
     status_t
     BDiskSystem::GetTypeForContentType(const char* contentType, BString* type) const
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 01:49:11 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 01:49:11 +0200
    Subject: [Haiku-commits] r28067 - haiku/trunk/src/kits/tracker
    Message-ID: <200810132349.m9DNnBs6004624@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 01:49:10 +0200 (Tue, 14 Oct 2008)
    New Revision: 28067
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28067&view=rev
    
    Modified:
       haiku/trunk/src/kits/tracker/AutoMounter.cpp
    Log:
    * The Tracker now makes use of the new B_DISK_SYSTEM_SUPPORTS_WRITING flag,
      and will only show the "mount me read-only?" dialog when the file system
      actually supports writing in the first place.
    
    
    Modified: haiku/trunk/src/kits/tracker/AutoMounter.cpp
    ===================================================================
    --- haiku/trunk/src/kits/tracker/AutoMounter.cpp	2008-10-13 23:47:30 UTC (rev 28066)
    +++ haiku/trunk/src/kits/tracker/AutoMounter.cpp	2008-10-13 23:49:10 UTC (rev 28067)
    @@ -46,6 +46,7 @@
     #	include 
     #	include 
     #	include 
    +#	include 
     #	include 
     #endif
     
    @@ -199,6 +200,11 @@
     		isBFS = true;
     	}
     
    +	BDiskSystem diskSystem;
    +	status_t status = partition->GetDiskSystem(&diskSystem);
    +	if (status == B_OK && !diskSystem.SupportsWriting())
    +		askReadOnly = false;
    +
     	if (partition->IsReadOnly())
     		askReadOnly = false;
     
    @@ -529,7 +535,7 @@
             if (fs_stat_dev(volume.Device(), &info) == 0
     			&& info.flags & (B_FS_IS_REMOVABLE | B_FS_IS_PERSISTENT)) {
     			message->AddString(info.device_name, info.volume_name);
    -			
    +
     			BString mountFlagsKey(info.device_name);
     			mountFlagsKey << kMountFlagsKeyExtension;
     			uint32 mountFlags = 0;
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 01:49:52 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 01:49:52 +0200
    Subject: [Haiku-commits] r28068 -
    	haiku/trunk/src/system/kernel/disk_device_manager
    Message-ID: <200810132349.m9DNnq7t004699@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 01:49:52 +0200 (Tue, 14 Oct 2008)
    New Revision: 28068
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28068&view=rev
    
    Modified:
       haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp
    Log:
    * Registering a file device now also normalizes the path now.
    
    
    Modified: haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp
    ===================================================================
    --- haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp	2008-10-13 23:49:10 UTC (rev 28067)
    +++ haiku/trunk/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp	2008-10-13 23:49:52 UTC (rev 28068)
    @@ -463,11 +463,13 @@
     	if (error != B_OK)
     		return error;
     
    +	KPath path(filename, true);
    +
     	KDiskDeviceManager *manager = KDiskDeviceManager::Default();
     	if (ManagerLocker locker = manager) {
    -		if (KFileDiskDevice *device = manager->FindFileDevice(filename))
    +		if (KFileDiskDevice *device = manager->FindFileDevice(path.Path()))
     			return device->ID();
    -		return manager->CreateFileDevice(filename);
    +		return manager->CreateFileDevice(path.Path());
     	}
     	return B_ERROR;
     }
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 01:50:51 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 01:50:51 +0200
    Subject: [Haiku-commits] r28069 - haiku/trunk/src/bin
    Message-ID: <200810132350.m9DNophk005192@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 01:50:51 +0200 (Tue, 14 Oct 2008)
    New Revision: 28069
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28069&view=rev
    
    Modified:
       haiku/trunk/src/bin/mountvolume.cpp
    Log:
    * Added mounting of file devices by path (they are tried as a fallback when
      mounting by name failed).
    * Also left some TODO comments in the code.
    
    
    Modified: haiku/trunk/src/bin/mountvolume.cpp
    ===================================================================
    --- haiku/trunk/src/bin/mountvolume.cpp	2008-10-13 23:49:52 UTC (rev 28068)
    +++ haiku/trunk/src/bin/mountvolume.cpp	2008-10-13 23:50:51 UTC (rev 28069)
    @@ -253,7 +253,7 @@
     
     		BPath path;
     		partition->GetPath(&path);
    -		
    +
     		// cut off beginning of the device path (if /dev/disk/)
     		int32 skip = strlen("/dev/disk/");
     		if (strncmp(path.Path(), "/dev/disk/", skip))
    @@ -341,17 +341,63 @@
     	// mount/unmount volumes
     	deviceList.VisitEachMountablePartition(&mountVisitor);
     
    +	BDiskDeviceRoster roster;
    +
    +	// try mount file images
    +	for (StringSet::iterator iterator = mountVisitor.toMount.begin();
    +			iterator != mountVisitor.toMount.end();) {
    +		const char* name = (*iterator).c_str();
    +		iterator++;
    +
    +		BEntry entry(name, true);
    +		if (!entry.Exists())
    +			continue;
    +
    +		// TODO: improve error messages
    +		BPath path;
    +		if (entry.GetPath(&path) != B_OK)
    +			continue;
    +
    +		// a file with this name exists, so try to mount it
    +		partition_id id = roster.RegisterFileDevice(path.Path());
    +		if (id < B_OK)
    +			continue;
    +
    +		BDiskDevice device;
    +		BPartition* partition;
    +		if (roster.GetPartitionWithID(id, &device, &partition) != B_OK) {
    +			roster.UnregisterFileDevice(id);
    +			continue;
    +		}
    +
    +		status_t status = partition->Mount(NULL,
    +			mountVisitor.readOnly ? B_MOUNT_READ_ONLY : 0);
    +		if (!mountVisitor.silent) {
    +			if (status >= B_OK) {
    +				BPath mountPoint;
    +				partition->GetMountPoint(&mountPoint);
    +				printf("Image \"%s\" mounted successfully at \"%s\".\n", name,
    +					mountPoint.Path());
    +			}
    +		}
    +		if (status >= B_OK) {
    +			// remove from list
    +			mountVisitor.toMount.erase(name);
    +		} else
    +			roster.UnregisterFileDevice(id);
    +	}
    +
    +	// TODO: support unmounting images by path!
    +
     	// print errors for the volumes to mount/unmount, that weren't found
     	if (!mountVisitor.silent) {
     		for (StringSet::iterator it = mountVisitor.toMount.begin();
    -			 it != mountVisitor.toMount.end();
    -			 it++) {
    +				it != mountVisitor.toMount.end(); it++) {
     			fprintf(stderr, "Failed to mount volume `%s': Volume not found.\n",
     				(*it).c_str());
     		}
     		for (StringSet::iterator it = mountVisitor.toUnmount.begin();
    -			 it != mountVisitor.toUnmount.end();
    -			 it++) {
    +				it != mountVisitor.toUnmount.end(); it++) {
     			fprintf(stderr, "Failed to unmount volume `%s': Volume not found.\n",
     				(*it).c_str());
     		}
    
    
    
    From jackburton at mail.berlios.de  Tue Oct 14 09:32:48 2008
    From: jackburton at mail.berlios.de (jackburton at mail.berlios.de)
    Date: Tue, 14 Oct 2008 09:32:48 +0200
    Subject: [Haiku-commits] r28070 -
    	haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci
    Message-ID: <200810140732.m9E7WmVL012530@sheep.berlios.de>
    
    Author: jackburton
    Date: 2008-10-14 09:32:46 +0200 (Tue, 14 Oct 2008)
    New Revision: 28070
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28070&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/glue.c
    Log:
    also rename the device from 're' to 'rtl81xx'
    
    Modified: haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/glue.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/glue.c	2008-10-13 23:50:51 UTC (rev 28069)
    +++ haiku/trunk/src/add-ons/kernel/drivers/network/rtl81xx/pci/glue.c	2008-10-14 07:32:46 UTC (rev 28070)
    @@ -1,7 +1,7 @@
     #include 
     #include 
     
    -HAIKU_FBSD_DRIVER_GLUE(re, re, pci);
    +HAIKU_FBSD_DRIVER_GLUE(rtl81xx, re, pci);
     HAIKU_FBSD_MII_DRIVER(rlphy);
     HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES | FBSD_FAST_TASKQUEUE);
     
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 10:38:33 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 10:38:33 +0200
    Subject: [Haiku-commits] r28071 -
    	haiku/trunk/src/add-ons/kernel/file_systems/bfs
    Message-ID: <200810140838.m9E8cX6D020686@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 10:38:33 +0200 (Tue, 14 Oct 2008)
    New Revision: 28071
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28071&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
    Log:
    Squashed a TODO in the block allocator:
    * BlockAllocator::AllocateBlocks() was implemented pretty crappy: instead of
      just remembering the best run on the first pass, it made a second pass through
      all allocation groups when it couldn't fulfill the maximum request.
    * Even worse, it would then also only allocate the first run that satisied the
      minimum request. Now, it will always choose the best allocation, leading to
      less fragmentation, and an improved runtime.
    * Now mmlr hopefully won't need to wait 10 minutes for the bloc allocator to
      create the swap file on his fragmented volume...
    
    
    Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp	2008-10-14 07:32:46 UTC (rev 28070)
    +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp	2008-10-14 08:38:33 UTC (rev 28071)
    @@ -652,27 +652,19 @@
     	AllocationBlock cached(fVolume);
     	MutexLocker lock(fLock);
     
    -	// The first scan through all allocation groups will look for the
    -	// wanted maximum of blocks, the second scan will just look to
    -	// satisfy the minimal requirement
    -	uint16 numBlocks = maximum;
     	uint32 bitsPerFullBlock = fVolume->BlockSize() << 3;
     
    -	for (int32 i = 0; i < fNumGroups * 2; i++, group++, start = 0) {
    +	// Find the block_run that can fulfill the request best
    +	int32 bestGroup = -1;
    +	int32 bestStart = -1;
    +	int32 bestLength = -1;
    +
    +	for (int32 i = 0; i < fNumGroups; i++, group++, start = 0) {
     		group = group % fNumGroups;
     
     		if (start >= fGroups[group].NumBits() || fGroups[group].IsFull())
     			continue;
     
    -		if (i >= fNumGroups) {
    -			// If the minimum is the same as the maximum, it's not necessary to
    -			// search for in the allocation groups a second time
    -			if (maximum == minimum)
    -				return B_DEVICE_FULL;
    -
    -			numBlocks = minimum;
    -		}
    -
     		// The wanted maximum is smaller than the largest free block in the
     		// group or already smaller than the minimum
     		// TODO: disabled because it's currently not maintained after the first
    @@ -707,56 +699,60 @@
     					}
     
     					// have we found a range large enough to hold numBlocks?
    -					if (++range >= maximum)
    +					if (++range >= maximum) {
    +						bestGroup = group;
    +						bestStart = rangeStart;
    +						bestLength = range;
     						break;
    -				} else if (i >= fNumGroups && range >= minimum) {
    -					// we have found a block larger than the required minimum
    -					// (second pass)
    -					break;
    +					}
     				} else {
     					// end of a range
    +					if (range > bestLength) {
    +						bestGroup = group;
    +						bestStart = rangeStart;
    +						bestLength = range;
    +					}
     					range = 0;
     				}
     			}
     
    -			// TODO: we could also remember a "largest free block that fits the
    -			//	minimal requirement" in the group, and use that - this would
    -			//	avoid the need for a second run
    +			T(Block("alloc-out", block, cached.Block(),
    +				fVolume->BlockSize(), group, rangeStart));
     
    -			// if we found a suitable block, mark the blocks as in use, and
    -			// write the updated block bitmap back to disk
    -			if (range >= numBlocks) {
    -				// adjust allocation size
    -				if (numBlocks < maximum)
    -					numBlocks = range;
    +			if (bestLength >= maximum)
    +				break;
     
    -				if (fGroups[group].Allocate(transaction, rangeStart, numBlocks)
    -						< B_OK)
    -					RETURN_ERROR(B_IO_ERROR);
    -
    -				run.allocation_group = HOST_ENDIAN_TO_BFS_INT32(group);
    -				run.start = HOST_ENDIAN_TO_BFS_INT16(rangeStart);
    -				run.length = HOST_ENDIAN_TO_BFS_INT16(numBlocks);
    -
    -				fVolume->SuperBlock().used_blocks =
    -					HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + numBlocks);
    -					// We are not writing back the disk's super block - it's
    -					// either done by the journaling code, or when the disk
    -					// is unmounted.
    -					// If the value is not correct at mount time, it will be
    -					// fixed anyway.
    -
    -				T(Allocate(run));
    -				T(Block("alloc-out", block, cached.Block(),
    -					fVolume->BlockSize(), group, rangeStart));
    -				return B_OK;
    -			}
    -
     			// start from the beginning of the next block
     			start = 0;
     		}
    +
    +		if (bestLength >= maximum)
    +			break;
     	}
    -	return B_DEVICE_FULL;
    +
    +	// If we found a suitable range, mark the blocks as in use, and
    +	// write the updated block bitmap back to disk
    +	if (bestLength < minimum)
    +		return B_DEVICE_FULL;
    +
    +	if (fGroups[bestGroup].Allocate(transaction, bestStart, bestLength)
    +			< B_OK)
    +		RETURN_ERROR(B_IO_ERROR);
    +
    +	run.allocation_group = HOST_ENDIAN_TO_BFS_INT32(bestGroup);
    +	run.start = HOST_ENDIAN_TO_BFS_INT16(bestStart);
    +	run.length = HOST_ENDIAN_TO_BFS_INT16(bestLength);
    +
    +	fVolume->SuperBlock().used_blocks =
    +		HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + bestLength);
    +		// We are not writing back the disk's super block - it's
    +		// either done by the journaling code, or when the disk
    +		// is unmounted.
    +		// If the value is not correct at mount time, it will be
    +		// fixed anyway.
    +
    +	T(Allocate(run));
    +	return B_OK;
     }
     
     
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 10:41:03 2008
    From: mmu_man at mail.berlios.de (mmu_man at BerliOS)
    Date: Tue, 14 Oct 2008 10:41:03 +0200
    Subject: [Haiku-commits] r28072 -
    	haiku/trunk/src/apps/icon-o-matic/import_export/styled_text
    Message-ID: <200810140841.m9E8f3h9021368@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 10:41:03 +0200 (Tue, 14 Oct 2008)
    New Revision: 28072
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28072&view=rev
    
    Modified:
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
    Log:
    - better handling of escapement, but still wrong
    - handle line feeds
    - warn when text is too long
    - better control points, but it's still not correct
    
    
    Modified: haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-14 08:38:33 UTC (rev 28071)
    +++ haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-14 08:41:03 UTC (rev 28072)
    @@ -11,6 +11,7 @@
     #include 
     #include 
     
    +#include 
     #include 
     #include 
     #include 
    @@ -94,8 +95,9 @@
     	if (!CurrentPath())
     		return B_ERROR;
     	while (bezierCount--) {
    -		fPath->AddPoint(fOffset + *bezierPts++, 
    -			fOffset + *bezierPts++, fOffset + *bezierPts++, false);
    +		fPath->AddPoint(fOffset + bezierPts[1], 
    +			fOffset + bezierPts[0], fOffset + bezierPts[2], false);
    +			bezierPts += 3;
     	}
     	return B_OK;
     }
    @@ -221,6 +223,15 @@
     		return ret;
     	}
     
    +	BString str(text);
    +	if (str.Length() > 50) {
    +		BAlert* alert = new BAlert("too big", 
    +			"The text you are trying to import is quite long, are you sure ?", 
    +			"Yes", "No", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    +		if (alert->Go())
    +			return B_CANCELED;
    +	}
    +
     	StyleContainer* styles = icon->Styles();
     	// import run colors as styles
     	if (runs) {
    @@ -230,33 +241,61 @@
     		}
     	}
     
    -#if 1
    +
    +
     	int32 currentRun = 0;
     	text_run *run = NULL;
     	if (runs)
     		run = &runs->runs[0];
    -	BString str(text);
     	int32 len = str.Length();
     	int32 chars = str.CountChars();
    -	BPoint offset(0,0);
    +	BPoint origin(0,0);
    +	BPoint offset(origin);
     
     	for (int32 i = 0, c = 0; i < len && c < chars; c++) {
     		// make sure we are still on the (good) run
     		while (run && currentRun < runs->count - 1 && 
     			i >= runs->runs[currentRun + 1].offset) {
    +			run = &runs->runs[++currentRun];
     			printf("switching to run %d\n", currentRun);
    -			run = &runs->runs[++currentRun];
     		}
     
    +		int charLen;
    +		for (charLen = 1; str.ByteAt(i + charLen) & 0x80; charLen++);
    +
     		BShape glyph;
     		BShape *glyphs[1] = { &glyph };
     		BFont font(be_plain_font);
     		if (run)
     			font = run->font;
     
    +		// first char
    +		if (offset == BPoint(0,0)) {
    +			font_height height;
    +			font.GetHeight(&height);
    +			origin.y += height.ascent;
    +			offset = origin;
    +		}
    +		// LF
    +		if (str[i] == '\n') {
    +			// XXX: should take the MAX() for the line
    +			// XXX: should use descent + leading from previous line
    +			font_height height;
    +			font.GetHeight(&height);
    +			origin.y += height.ascent + height.descent + height.leading;
    +			offset = origin;
    +			i++;
    +			continue;
    +		}
    +
    +		float charWidth;
    +		charWidth = font.StringWidth(str.String() + i, charLen);
    +		printf("StringWidth( %d) = %f\n", charLen, charWidth);
    +
     		font.GetGlyphShapes((str.String() + i), 1, glyphs);
     		if (glyph.Bounds().IsValid()) {
    -			offset.x += glyph.Bounds().Width();
    +			//offset.x += glyph.Bounds().Width();
    +			offset.x += charWidth;
     			Shape* shape = new (nothrow) Shape(NULL);
     			if (!shape || !icon->Shapes()->AddShape(shape)) {
     				delete shape;
    @@ -277,7 +316,7 @@
     		// skip the rest of UTF-8 char bytes
     		for (i++; i < len && str[i] & 0x80; i++);
     	}
    -#endif
    +
     	delete[] fStyleMap;
     
     	return B_OK;
    
    
    
    From humdingerb at googlemail.com  Tue Oct 14 10:44:04 2008
    From: humdingerb at googlemail.com (Humdinger)
    Date: Tue, 14 Oct 2008 10:44:04 +0200
    Subject: [Haiku-commits] r28064 - in haiku/trunk/src/apps/icon-o-matic:
     .	import_export import_export/styled_text
    In-Reply-To: <200810132342.m9DNgUXb003385@sheep.berlios.de>
    References: <200810132342.m9DNgUXb003385@sheep.berlios.de>
    Message-ID: <48F45BD4.1010303@googlemail.com>
    
    mmu_man at BerliOS wrote:
    > - handle color drops as a new style
    > - handle dropped/pastes text as shapes with path (and style when with text_runs from StyledEdit)
    
    Hey, now that's cool!
    Do you think you could place the paths of imported text inside the visible canvas with the 
    correct spacing between the letters? Can paths and shapes be automatically named after the 
    imported letters?
    
    I know, give them a cool little feature and they want a perfect solution... :)
    In any case, this is very nice.
    
    Thanks Francois!
    Humdinger
    
    PS: My little BeGeistert report is up. You're on 3/5 of all pictures. :)
    -- 
    --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=--
    Deutsche Haiku News @ http://haiku-gazette.blogspot.com
    
    
    From jackburton at mail.berlios.de  Tue Oct 14 11:19:23 2008
    From: jackburton at mail.berlios.de (jackburton at mail.berlios.de)
    Date: Tue, 14 Oct 2008 11:19:23 +0200
    Subject: [Haiku-commits] r28073 - haiku/trunk/src/apps/deskbar
    Message-ID: <200810140919.m9E9JNfN027116@sheep.berlios.de>
    
    Author: jackburton
    Date: 2008-10-14 11:19:21 +0200 (Tue, 14 Oct 2008)
    New Revision: 28073
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28073&view=rev
    
    Modified:
       haiku/trunk/src/apps/deskbar/BarView.cpp
       haiku/trunk/src/apps/deskbar/BarView.h
    Log:
    no need to use private libbe variables anymore
    
    Modified: haiku/trunk/src/apps/deskbar/BarView.cpp
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/BarView.cpp	2008-10-14 08:41:03 UTC (rev 28072)
    +++ haiku/trunk/src/apps/deskbar/BarView.cpp	2008-10-14 09:19:21 UTC (rev 28073)
    @@ -59,8 +59,6 @@
     #include "TeamMenuItem.h"
     
     
    -extern menu_info *_menu_info_ptr_;
    -
     const int32 kDefaultRecentDocCount = 10;
     const int32 kDefaultRecentFolderCount = 10;
     const int32 kDefaultRecentAppCount = 10;
    @@ -85,9 +83,7 @@
     	fCachedTypesList(NULL),
     	fMaxRecentDocs(kDefaultRecentDocCount),
     	fMaxRecentApps(kDefaultRecentAppCount),
    -	fLastDragItem(NULL),
    -	fClickToOpen(_menu_info_ptr_->click_to_open)
    -		// init click to open to current local setting
    +	fLastDragItem(NULL)
     {		
     }
     
    @@ -603,14 +599,6 @@
     status_t
     TBarView::DragStart()
     {	
    -	// always set the click to open state
    -	// to false during a drag
    -	// so that a release on a menu/menubar will not
    -	// leave the menu open (ExpandoMenuBar, BarMenuBar)
    -	// will get reset to actual initial system
    -	// state on DragStop
    -	_menu_info_ptr_->click_to_open = false;
    -
     	if (!Dragging())
     		return B_OK;
     
    @@ -710,10 +698,6 @@
     	if (!Dragging())
     		return;
     
    -	// revert the local click to open to
    -	// the launch state, cached in constructor
    -	_menu_info_ptr_->click_to_open = fClickToOpen;
    -
     	if (fExpando) {
     		if (fLastDragItem) {
     			init_tracking_hook(fLastDragItem, NULL, NULL);
    
    Modified: haiku/trunk/src/apps/deskbar/BarView.h
    ===================================================================
    --- haiku/trunk/src/apps/deskbar/BarView.h	2008-10-14 08:41:03 UTC (rev 28072)
    +++ haiku/trunk/src/apps/deskbar/BarView.h	2008-10-14 09:19:21 UTC (rev 28073)
    @@ -166,7 +166,6 @@
     		uint32 fMaxRecentApps;
     
     		TTeamMenuItem *fLastDragItem;
    -		bool fClickToOpen;
     };
     
     
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 11:40:14 2008
    From: mmu_man at mail.berlios.de (mmu_man at BerliOS)
    Date: Tue, 14 Oct 2008 11:40:14 +0200
    Subject: [Haiku-commits] r28074 -
    	haiku/trunk/src/apps/icon-o-matic/import_export/styled_text
    Message-ID: <200810140940.m9E9eEGW029544@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 11:40:14 +0200 (Tue, 14 Oct 2008)
    New Revision: 28074
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28074&view=rev
    
    Modified:
       haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
    Log:
    - fix bezier points
    - set names on objects
    /me pets Humdinger
    
    
    Modified: haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-14 09:19:21 UTC (rev 28073)
    +++ haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp	2008-10-14 09:40:14 UTC (rev 28074)
    @@ -5,6 +5,7 @@
      * Authors:
      *		Fran?ois Revol 
      */
    +
     #include "StyledTextImporter.h"
     
     #include 
    @@ -38,7 +39,7 @@
     
     class ShapeIterator : public BShapeIterator {
      public:
    -	ShapeIterator(Icon *icon, Shape *to, BPoint offset);
    +	ShapeIterator(Icon *icon, Shape *to, BPoint offset, const char *name);
     	~ShapeIterator() {};
     
     	virtual	status_t	IterateMoveTo(BPoint *point);
    @@ -54,15 +55,22 @@
     	Shape *fShape;
     	VectorPath *fPath;
     	BPoint fOffset;
    +	const char *fName;
    +	BPoint fLastPoint;
    +	bool fHasLastPoint;
     };
     
    -ShapeIterator::ShapeIterator(Icon *icon, Shape *to, BPoint offset)
    +ShapeIterator::ShapeIterator(Icon *icon, Shape *to, BPoint offset, 
    +	const char *name)
     {
     	CALLED();
     	fIcon = icon;
     	fShape = to;
     	fPath = NULL;
     	fOffset = offset;
    +	fName = name;
    +	fLastPoint = offset;
    +	fHasLastPoint = false;
     }
     
     status_t
    @@ -73,7 +81,9 @@
     		NextPath();
     	if (!CurrentPath())
     		return B_ERROR;
    -	fPath->AddPoint(fOffset + *point);
    +	//fPath->AddPoint(fOffset + *point);
    +	fLastPoint = fOffset + *point;
    +	fHasLastPoint = true;
     	return B_OK;
     }
     
    @@ -83,8 +93,12 @@
     	CALLED();
     	if (!CurrentPath())
     		return B_ERROR;
    -	while (lineCount--)
    -		fPath->AddPoint(fOffset + *linePts++);
    +	while (lineCount--) {
    +		fPath->AddPoint(fOffset + *linePts);
    +		fLastPoint = fOffset + *linePts;
    +		fHasLastPoint = true;
    +		linePts++;
    +	}
     	return B_OK;
     }
     
    @@ -94,11 +108,17 @@
     	CALLED();
     	if (!CurrentPath())
     		return B_ERROR;
    +	BPoint start(bezierPts[0]);
    +	if (fHasLastPoint)
    +		start = fLastPoint;
     	while (bezierCount--) {
    -		fPath->AddPoint(fOffset + bezierPts[1], 
    -			fOffset + bezierPts[0], fOffset + bezierPts[2], false);
    -			bezierPts += 3;
    +		fPath->AddPoint(fOffset + bezierPts[0], 
    +			fLastPoint, fOffset + bezierPts[1], true);
    +		fLastPoint = fOffset + bezierPts[2];
    +		bezierPts += 3;
     	}
    +	fPath->AddPoint(fLastPoint);
    +	fHasLastPoint = true;
     	return B_OK;
     }
     
    @@ -110,6 +130,7 @@
     		return B_ERROR;
     	fPath->SetClosed(true);
     	NextPath();
    +	fHasLastPoint = false;
     	return B_OK;
     }
     
    @@ -120,6 +141,7 @@
     	if (fPath)
     		return fPath;
     	fPath = new (nothrow) VectorPath();
    +	fPath->SetName(fName);
     	return fPath;
     }
     
    @@ -206,7 +228,7 @@
     	mio.SetSize((size_t)size + 1);
     	memset((void *)mio.Buffer(), 0, (size_t)size + 1);
     
    -	// TODO: read runs
    +	// TODO: read runs from attribute
     
     	return _Import(icon, (const char *)mio.Buffer(), NULL);
     }
    @@ -257,7 +279,7 @@
     		while (run && currentRun < runs->count - 1 && 
     			i >= runs->runs[currentRun + 1].offset) {
     			run = &runs->runs[++currentRun];
    -			printf("switching to run %d\n", currentRun);
    +			//printf("switching to run %d\n", currentRun);
     		}
     
     		int charLen;
    @@ -290,13 +312,17 @@
     
     		float charWidth;
     		charWidth = font.StringWidth(str.String() + i, charLen);
    -		printf("StringWidth( %d) = %f\n", charLen, charWidth);
    +		//printf("StringWidth( %d) = %f\n", charLen, charWidth);
    +		BString glyphName(str.String() + i, charLen);
    +		glyphName.Prepend("Glyph (");
    +		glyphName.Append(")");
     
     		font.GetGlyphShapes((str.String() + i), 1, glyphs);
     		if (glyph.Bounds().IsValid()) {
     			//offset.x += glyph.Bounds().Width();
     			offset.x += charWidth;
     			Shape* shape = new (nothrow) Shape(NULL);
    +			shape->SetName(glyphName.String());
     			if (!shape || !icon->Shapes()->AddShape(shape)) {
     				delete shape;
     				return B_NO_MEMORY;
    @@ -307,7 +333,7 @@
     					break;
     				}
     			}
    -			ShapeIterator iterator(icon, shape, offset);
    +			ShapeIterator iterator(icon, shape, offset, glyphName.String());
     			if (iterator.Iterate(&glyph) < B_OK)
     				return B_ERROR;
     
    @@ -337,6 +363,9 @@
     		delete style;
     		return B_NO_MEMORY;
     	}
    +	char name[30];
    +	sprintf(name, "Color (#%02x%02x%02x)", color.red, color.green, color.blue);
    +	style->SetName(name);
     
     	bool found = false;
     	for (int i = 0; i < fStyleCount; i++) {
    
    
    
    From mmu_man at mail.berlios.de  Tue Oct 14 12:11:29 2008
    From: mmu_man at mail.berlios.de (mmu_man at BerliOS)
    Date: Tue, 14 Oct 2008 12:11:29 +0200
    Subject: [Haiku-commits] r28075 - haiku/trunk/src/apps/icon-o-matic
    Message-ID: <200810141011.m9EABTgs000980@sheep.berlios.de>
    
    Author: mmu_man
    Date: 2008-10-14 12:11:28 +0200 (Tue, 14 Oct 2008)
    New Revision: 28075
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28075&view=rev
    
    Modified:
       haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp
    Log:
    - factor out code
    - name color drops
    
    
    Modified: haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp
    ===================================================================
    --- haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp	2008-10-14 09:40:14 UTC (rev 28074)
    +++ haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp	2008-10-14 10:11:28 UTC (rev 28075)
    @@ -118,6 +118,8 @@
     void
     MainWindow::MessageReceived(BMessage* message)
     {
    +	bool discard = false;
    +
     	if (!fDocument || !fDocument->WriteLock()) {
     		BWindow::MessageReceived(message);
     		return;
    @@ -132,12 +134,19 @@
     			(const void **)&color, &len) == B_OK; i++) {
     			if (len != sizeof(rgb_color))
     				continue;
    +			char name[30];
    +			sprintf(name, "Color (#%02x%02x%02x)", 
    +				color->red, color->green, color->blue);
     			Style* style = new (nothrow) Style(*color);
    +			style->SetName(name);
     			Style* styles[1] = { style };
     			AddStylesCommand* styleCommand = new (nothrow) AddStylesCommand(
     				fDocument->Icon()->Styles(), styles, 1,
     				fDocument->Icon()->Styles()->CountStyles());
     			fDocument->CommandStack()->Perform(styleCommand);
    +			// don't handle anything else,
    +			// or we might paste the clipboard on B_PASTE
    +			discard = true;
     		}
     	}
     
    @@ -151,62 +160,50 @@
     			be_app->PostMessage(message);
     			break;
     
    +		case B_PASTE:
     		case B_MIME_DATA:
    -			if (message->HasData("text/plain", B_MIME_TYPE)) {
    -				status_t err;
    -				Icon* icon;
    -				icon = new (nothrow) Icon(*fDocument->Icon());
    -				if (icon) {
    -					StyledTextImporter importer;
    -					err = importer.Import(icon, message);
    -					if (err >= B_OK) {
    -							AutoWriteLocker locker(fDocument);
    +		{
    +			BMessage *clip = message;
    +			status_t err;
     
    -							SetIcon(NULL);
    +			if (discard)
    +				break;
     
    -							// incorporate the loaded icon into the document
    -							// (either replace it or append to it)
    -							fDocument->MakeEmpty(false);
    -								// if append, the document savers are preserved
    -							fDocument->SetIcon(icon);
    -							SetIcon(icon);
    -					}
    -				}
    +			if (message->what == B_PASTE) {
    +				if (!be_clipboard->Lock())
    +					break;
    +				clip = be_clipboard->Data();
     			}
    -			break;
     
    -		case B_PASTE:
    -			if (be_clipboard->Lock()) {
    -				status_t err;
    -				BMessage *clip = be_clipboard->Data();
    -
    -				if (!clip || !clip->HasData("text/plain", B_MIME_TYPE)) {
    +			if (!clip || !clip->HasData("text/plain", B_MIME_TYPE)) {
    +				if (message->what == B_PASTE)
     					be_clipboard->Unlock();
    -					break;
    -				}
    +				break;
    +			}
     
    -				Icon* icon;
    -				icon = new (nothrow) Icon(*fDocument->Icon());
    -				if (icon) {
    -					StyledTextImporter importer;
    -					err = importer.Import(icon, clip);
    -					if (err >= B_OK) {
    -							AutoWriteLocker locker(fDocument);
    +			Icon* icon;
    +			icon = new (nothrow) Icon(*fDocument->Icon());
    +			if (icon) {
    +				StyledTextImporter importer;
    +				err = importer.Import(icon, clip);
    +				if (err >= B_OK) {
    +						AutoWriteLocker locker(fDocument);
     
    -							SetIcon(NULL);
    +						SetIcon(NULL);
     
    -							// incorporate the loaded icon into the document
    -							// (either replace it or append to it)
    -							fDocument->MakeEmpty(false);
    -								// if append, the document savers are preserved
    -							fDocument->SetIcon(icon);
    -							SetIcon(icon);
    -					}
    +						// incorporate the loaded icon into the document
    +						// (either replace it or append to it)
    +						fDocument->MakeEmpty(false);
    +							// if append, the document savers are preserved
    +						fDocument->SetIcon(icon);
    +						SetIcon(icon);
     				}
    +			}
     
    +			if (message->what == B_PASTE)
     				be_clipboard->Unlock();
    -			}
     			break;
    +		}
     
     		case MSG_UNDO:
     			fDocument->CommandStack()->Undo();
    
    
    
    From humdingerb at googlemail.com  Tue Oct 14 13:01:15 2008
    From: humdingerb at googlemail.com (Humdinger)
    Date: Tue, 14 Oct 2008 13:01:15 +0200
    Subject: [Haiku-commits] r28074
    	-	haiku/trunk/src/apps/icon-o-matic/import_export/styled_text
    In-Reply-To: <200810140940.m9E9eEGW029544@sheep.berlios.de>
    References: <200810140940.m9E9eEGW029544@sheep.berlios.de>
    Message-ID: <48F47BFB.3010106@googlemail.com>
    
    mmu_man at BerliOS wrote:
    > Log:
    > - fix bezier points
    > - set names on objects
    > /me pets Humdinger
    
    purrrrr ^_^
    
    
    -- 
    --=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=--
    Deutsche Haiku News @ http://haiku-gazette.blogspot.com
    
    
    From mmlr at mail.berlios.de  Tue Oct 14 13:08:15 2008
    From: mmlr at mail.berlios.de (mmlr at mail.berlios.de)
    Date: Tue, 14 Oct 2008 13:08:15 +0200
    Subject: [Haiku-commits] r28076 - haiku/trunk/src/kits/opengl/mesa
    Message-ID: <200810141108.m9EB8F61026403@sheep.berlios.de>
    
    Author: mmlr
    Date: 2008-10-14 13:08:08 +0200 (Tue, 14 Oct 2008)
    New Revision: 28076
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28076&view=rev
    
    Modified:
       haiku/trunk/src/kits/opengl/mesa/Jamfile
    Log:
    Rather use UsePublicObjectHeaders instead of using USES_BE_API for the
    gen_mattypes build tool, as the latter will try to use BeOS headers on BeOS
    compatible host platforms and therefore breaks the build because of missing
    files. This should work on all platforms, as with that the headers in the
    repository are always used.
    
    
    Modified: haiku/trunk/src/kits/opengl/mesa/Jamfile
    ===================================================================
    --- haiku/trunk/src/kits/opengl/mesa/Jamfile	2008-10-14 10:11:28 UTC (rev 28075)
    +++ haiku/trunk/src/kits/opengl/mesa/Jamfile	2008-10-14 11:08:08 UTC (rev 28076)
    @@ -36,7 +36,7 @@
     SEARCH_SOURCE += [ FDirName $(SUBDIR) vbo ] ;
     SEARCH_SOURCE += [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ;
     
    -USES_BE_API on gen_matypes = true ;
    +UsePublicObjectHeaders gen_matypes : opengl ;
     
     BuildPlatformMain gen_matypes :
     	gen_matypes.c ;
    
    
    
    From dlmcpaul at mail.berlios.de  Tue Oct 14 14:53:21 2008
    From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS)
    Date: Tue, 14 Oct 2008 14:53:21 +0200
    Subject: [Haiku-commits] r28077 -
    	haiku/trunk/src/add-ons/media/plugins/wav_reader
    Message-ID: <200810141253.m9ECrLHr025337@sheep.berlios.de>
    
    Author: dlmcpaul
    Date: 2008-10-14 14:53:20 +0200 (Tue, 14 Oct 2008)
    New Revision: 28077
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28077&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp
       haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h
       haiku/trunk/src/add-ons/media/plugins/wav_reader/wav.h
    Log:
    pass a wave structure as meta data.  avcodec needs it
    
    Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp	2008-10-14 11:08:08 UTC (rev 28076)
    +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp	2008-10-14 12:53:20 UTC (rev 28077)
    @@ -31,19 +31,24 @@
     #include "WavReaderPlugin.h"
     #include "RawFormats.h"
     
    -//#define TRACE_WAVE_READER
    +#define TRACE_WAVE_READER
     #ifdef TRACE_WAVE_READER
       #define TRACE printf
     #else
       #define TRACE(a...)
     #endif
     
    +#define ERROR(a...) fprintf(stderr, a)
    +
     #define BUFFER_SIZE	16384 // must be > 5200 for mp3 decoder to work
     
     #define FOURCC(a,b,c,d)	((((uint32)(d)) << 24) | (((uint32)(c)) << 16) | (((uint32)(b)) << 8) | ((uint32)(a)))
     #define UINT16(a) 		((uint16)B_LENDIAN_TO_HOST_INT16((a)))
     #define UINT32(a) 		((uint32)B_LENDIAN_TO_HOST_INT32((a)))
     
    +// This Reader only deals with CBR audio
    +// My understanding is that no WAV file will have VBR audio anyway
    +
     struct wavdata
     {
     	int64 position;
    @@ -144,25 +149,25 @@
     	while (pos + sizeof(chunk_struct) <= fFileSize) {
     		chunk_struct chunk;
     		if (sizeof(chunk) != Source()->ReadAt(pos, &chunk, sizeof(chunk))) {
    -			TRACE("WavReader::Sniff: chunk header reading failed\n");
    +			ERROR("WavReader::Sniff: chunk header reading failed\n");
     			return B_ERROR;
     		}
     		pos += sizeof(chunk);
     		if (UINT32(chunk.len) == 0) {
    -			TRACE("WavReader::Sniff: Error: chunk of size 0 found\n");
    +			ERROR("WavReader::Sniff: Error: chunk of size 0 found\n");
     			return B_ERROR;
     		}
     		switch (UINT32(chunk.fourcc)) {
     			case FOURCC('f','m','t',' '):
     				if (UINT32(chunk.len) >= sizeof(format)) {
     					if (sizeof(format) != Source()->ReadAt(pos, &format, sizeof(format))) {
    -						TRACE("WavReader::Sniff: format chunk reading failed\n");
    +						ERROR("WavReader::Sniff: format chunk reading failed\n");
     						break;
     					}
     					foundFmt = true;
     					if (UINT32(chunk.len) >= sizeof(format_ext) && UINT16(format.format_tag) == 0xfffe) {
     						if (sizeof(format_ext) != Source()->ReadAt(pos, &format_ext, sizeof(format_ext))) {
    -							TRACE("WavReader::Sniff: format extensible chunk reading failed\n");
    +							ERROR("WavReader::Sniff: format extensible chunk reading failed\n");
     							break;
     						}
     						foundFmtExt = true;
    @@ -172,7 +177,7 @@
     			case FOURCC('f','a','c','t'):
     				if (UINT32(chunk.len) >= sizeof(fact)) {
     					if (sizeof(fact) != Source()->ReadAt(pos, &fact, sizeof(fact))) {
    -						TRACE("WavReader::Sniff: fact chunk reading failed\n");
    +						ERROR("WavReader::Sniff: fact chunk reading failed\n");
     						break;
     					}
     					foundFact = true;
    @@ -201,11 +206,11 @@
     	}
     
     	if (!foundFmt) {
    -		TRACE("WavReader::Sniff: couldn't find format chunk\n");
    +		ERROR("WavReader::Sniff: couldn't find format chunk\n");
     		return B_ERROR;
     	}
     	if (!foundData) {
    -		TRACE("WavReader::Sniff: couldn't find data chunk\n");
    +		ERROR("WavReader::Sniff: couldn't find data chunk\n");
     		return B_ERROR;
     	}
     	
    @@ -227,38 +232,39 @@
     		TRACE("  sample_length         %ld\n", UINT32(fact.sample_length));
     	}
     
    -	fChannelCount = UINT16(format.channels);
    -	fSampleRate = UINT32(format.samples_per_sec);
    -	fBlockAlign = UINT16(format.block_align);
    -	fBitsPerSample = UINT16(format.bits_per_sample);
    -	if (fBitsPerSample == 0) {
    -		printf("WavReader::Sniff: Error, bits_per_sample = 0 calculating\n");
    -		fBitsPerSample = fBlockAlign * 8 / fChannelCount;
    +	fMetaData.extra_size = 0;
    +	fMetaData.channels = UINT16(format.channels);
    +	fMetaData.samples_per_sec = UINT32(format.samples_per_sec);
    +	fMetaData.block_align = UINT16(format.block_align);
    +	fMetaData.bits_per_sample = UINT16(format.bits_per_sample);
    +	if (fMetaData.bits_per_sample == 0) {
    +		fMetaData.bits_per_sample = fMetaData.block_align * 8 / fMetaData.channels;
    +		ERROR("WavReader::Sniff: Error, bits_per_sample = 0 calculating as %d\n",fMetaData.bits_per_sample);
     	}
    -	fFrameRate = fSampleRate * fChannelCount;
    +	fFrameRate = fMetaData.samples_per_sec * fMetaData.channels;
     	
    -	fAvgBytesPerSec = format.avg_bytes_per_sec;
    +	fMetaData.avg_bytes_per_sec = format.avg_bytes_per_sec;
     	
     	// fact.sample_length is really no of samples for all channels
    -	fFrameCount = foundFact ? UINT32(fact.sample_length) / fChannelCount : 0;
    -	fFormatCode = UINT16(format.format_tag);
    -	if (fFormatCode == 0xfffe && foundFmtExt)
    -		fFormatCode = (format_ext.guid[1] << 8) | format_ext.guid[0];
    +	fFrameCount = foundFact ? UINT32(fact.sample_length) / fMetaData.channels : 0;
    +	fMetaData.format_tag = UINT16(format.format_tag);
    +	if (fMetaData.format_tag == 0xfffe && foundFmtExt)
    +		fMetaData.format_tag = (format_ext.guid[1] << 8) | format_ext.guid[0];
     
    -	int min_align = (fFormatCode == 0x0001) ? (fBitsPerSample * fChannelCount + 7) / 8 : 1;
    -	if (fBlockAlign < min_align)
    -		fBlockAlign = min_align;
    +	int min_align = (fMetaData.format_tag == 0x0001) ? (fMetaData.bits_per_sample * fMetaData.channels + 7) / 8 : 1;
    +	if (fMetaData.block_align < min_align)
    +		fMetaData.block_align = min_align;
     
     	TRACE("  fDataStart     %Ld\n", fDataStart);
     	TRACE("  fDataSize      %Ld\n", fDataSize);
    -	TRACE("  fChannelCount  %ld\n", fChannelCount);
    -	TRACE("  fSampleRate    %ld\n", fSampleRate);
    +	TRACE("  Channels       %d\n", fMetaData.channels);
    +	TRACE("  SampleRate     %ld\n", fMetaData.samples_per_sec);
     	TRACE("  fFrameRate     %ld\n", fFrameRate);
     	TRACE("  fFrameCount    %Ld\n", fFrameCount);
    -	TRACE("  fBitsPerSample %d\n", fBitsPerSample);
    -	TRACE("  fBlockAlign    %d\n", fBlockAlign);
    +	TRACE("  BitsPerSample  %d\n", fMetaData.bits_per_sample);
    +	TRACE("  BlockAlign     %d\n", fMetaData.block_align);
     	TRACE("  min_align      %d\n", min_align);
    -	TRACE("  fFormatCode    0x%04x\n", fFormatCode);
    +	TRACE("  Format     0x%04x\n", fMetaData.format_tag);
     	
     	// XXX fact.sample_length contains duration of encoded files?
     
    @@ -291,18 +297,18 @@
     
     	data->position = 0;
     	data->datasize = fDataSize;
    -	data->fps = fSampleRate;
    -	data->buffersize = (BUFFER_SIZE / fBlockAlign) * fBlockAlign;
    +	data->fps = fMetaData.samples_per_sec;
    +	data->buffersize = (BUFFER_SIZE / fMetaData.block_align) * fMetaData.block_align;
     	data->buffer = malloc(data->buffersize);
    -	data->framecount = fFrameCount ? fFrameCount : (8 * fDataSize) / (fChannelCount * fBitsPerSample);
    -	data->raw = fFormatCode == 0x0001;
    +	data->framecount = fFrameCount ? fFrameCount : (8 * fDataSize) / (fMetaData.channels * fMetaData.bits_per_sample);
    +	data->raw = fMetaData.format_tag == 0x0001;
     
    -	if (!fAvgBytesPerSec) {
    -		fAvgBytesPerSec = fSampleRate * fBlockAlign;
    +	if (!fMetaData.avg_bytes_per_sec) {
    +		fMetaData.avg_bytes_per_sec = fMetaData.samples_per_sec * fMetaData.block_align;
     	}
     
    -	data->duration = (data->datasize * 1000000LL) / fAvgBytesPerSec;
    -	data->bitrate = fAvgBytesPerSec * 8;
    +	data->duration = (data->datasize * 1000000LL) / fMetaData.avg_bytes_per_sec;
    +	data->bitrate = fMetaData.avg_bytes_per_sec * 8;
     
     	TRACE(" raw        %s\n", data->raw ? "true" : "false");
     	TRACE(" framecount %Ld\n", data->framecount);
    @@ -312,16 +318,16 @@
     	TRACE(" buffersize %ld\n", data->buffersize);
     	
     	BMediaFormats formats;
    -	if (fFormatCode == 0x0001) {
    +	if (fMetaData.format_tag == 0x0001) {
     		// a raw PCM format
     		media_format_description description;
     		description.family = B_BEOS_FORMAT_FAMILY;
     		description.u.beos.format = B_BEOS_FORMAT_RAW_AUDIO;
     		formats.GetFormatFor(description, &data->format);
     		// Really SampleRate
    -		data->format.u.raw_audio.frame_rate = fSampleRate;
    -		data->format.u.raw_audio.channel_count = fChannelCount;
    -		switch (fBitsPerSample) {
    +		data->format.u.raw_audio.frame_rate = fMetaData.samples_per_sec;
    +		data->format.u.raw_audio.channel_count = fMetaData.channels;
    +		switch (fMetaData.bits_per_sample) {
     			case 8:
     				data->format.u.raw_audio.format = B_AUDIO_FORMAT_UINT8;
     				break;
    @@ -335,7 +341,8 @@
     				data->format.u.raw_audio.format = B_AUDIO_FORMAT_INT32;
     				break;
     			default:
    -				TRACE("WavReader::AllocateCookie: unhandled bits per sample %d\n", fBitsPerSample);
    +				ERROR("WavReader::AllocateCookie: unhandled bits per sample %d\n", fMetaData.bits_per_sample);
    +				delete data;
     				return B_ERROR;
     		}
     		data->format.u.raw_audio.format |= B_AUDIO_FORMAT_CHANNEL_ORDER_WAVE;
    @@ -345,13 +352,22 @@
     		// some encoded format
     		media_format_description description;
     		description.family = B_WAV_FORMAT_FAMILY;
    -		description.u.wav.codec = fFormatCode;
    +		description.u.wav.codec = fMetaData.format_tag;
     		formats.GetFormatFor(description, &data->format);
     		// Really SampleRate
    -		data->format.u.encoded_audio.output.frame_rate = fSampleRate;
    -		data->format.u.encoded_audio.output.channel_count = fChannelCount;
    +		data->format.u.encoded_audio.bit_rate = data->bitrate;
    +		data->format.u.encoded_audio.output.frame_rate = fMetaData.samples_per_sec;
    +		data->format.u.encoded_audio.output.channel_count = fMetaData.channels;
     	}
     	
    +	printf("SetMetaData called with size %ld\n",sizeof(wave_format_ex));
    +	
    +	if (data->format.SetMetaData(&fMetaData, sizeof(wave_format_ex)) != B_OK) {
    +		ERROR("WavReader::Failed to SetMetaData\n");
    +		delete data;
    +		return B_ERROR;
    +	}
    +
     	// store the cookie
     	*cookie = data;
     	return B_OK;
    @@ -380,8 +396,8 @@
     	*frameCount = data->framecount;
     	*duration = data->duration;
     	*format = data->format;
    -	*infoBuffer = 0;
    -	*infoSize = 0;
    +	*infoBuffer = &fMetaData;
    +	*infoSize = sizeof(wave_format_ex);
     	return B_OK;
     }
     
    @@ -404,7 +420,7 @@
     		return B_ERROR;
     	}
     
    -	*position = (*position / fBlockAlign) * fBlockAlign; // round down to a block start
    +	*position = (*position / fMetaData.block_align) * fMetaData.block_align; // round down to a block start
     
     	TRACE(", position %Ld ", *position);
     
    @@ -415,7 +431,7 @@
     	TRACE("newframe %Ld\n", *frame);
     	
     	if (*position < 0 || *position > data->datasize) {
    -		printf("WavReader::CalculateNewPosition invalid position %Ld\n", *position);
    +		ERROR("WavReader::CalculateNewPosition invalid position %Ld\n", *position);
     		return B_ERROR;
     	}
     	
    @@ -476,12 +492,12 @@
     	if (maxreadsize < readsize)
     		readsize = maxreadsize;
     	if (readsize == 0) {
    -		printf("WavReader::GetNextChunk: LAST BUFFER ERROR at time %9Ld\n",mediaHeader->start_time);
    +		ERROR("WavReader::GetNextChunk: LAST BUFFER ERROR at time %9Ld\n",mediaHeader->start_time);
     		return B_LAST_BUFFER_ERROR;
     	}
     			
     	if (readsize != Source()->ReadAt(fDataStart + data->position, data->buffer, readsize)) {
    -		printf("WavReader::GetNextChunk: unexpected read error at position %9Ld\n",fDataStart + data->position);
    +		ERROR("WavReader::GetNextChunk: unexpected read error at position %9Ld\n",fDataStart + data->position);
     		return B_ERROR;
     	}
     	
    
    Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h
    ===================================================================
    --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h	2008-10-14 11:08:08 UTC (rev 28076)
    +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.h	2008-10-14 12:53:20 UTC (rev 28077)
    @@ -66,15 +66,11 @@
     	int64			fFileSize;
     	int64			fDataStart;
     	int64			fDataSize;
    +	
    +	wave_format_ex	fMetaData;
     
     	int64			fFrameCount;
    -	int32			fChannelCount;
     	int32			fFrameRate;
    -	int32			fSampleRate;
    -	uint16			fBitsPerSample;
    -	uint16			fFormatCode;
    -	uint16			fBlockAlign;
    -	uint32			fAvgBytesPerSec;
     };
     
     
    
    Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/wav.h
    ===================================================================
    --- haiku/trunk/src/add-ons/media/plugins/wav_reader/wav.h	2008-10-14 11:08:08 UTC (rev 28076)
    +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/wav.h	2008-10-14 12:53:20 UTC (rev 28077)
    @@ -48,6 +48,16 @@
     	uint16 bits_per_sample;
     }; 
     
    +struct wave_format_ex {
    +	uint16 format_tag;
    +	uint16 channels;
    +	uint32 samples_per_sec;
    +	uint32 avg_bytes_per_sec;
    +	uint16 block_align;
    +	uint16 bits_per_sample;
    +	uint16 extra_size;
    +} _PACKED;
    +
     struct format_struct_extensible
     { 
     	uint16 format_tag; // 0xfffe for extensible format
    
    
    
    From dlmcpaul at mail.berlios.de  Tue Oct 14 14:54:02 2008
    From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS)
    Date: Tue, 14 Oct 2008 14:54:02 +0200
    Subject: [Haiku-commits] r28078 -
    	haiku/trunk/src/add-ons/media/plugins/wav_reader
    Message-ID: <200810141254.m9ECs2Qv025908@sheep.berlios.de>
    
    Author: dlmcpaul
    Date: 2008-10-14 14:54:02 +0200 (Tue, 14 Oct 2008)
    New Revision: 28078
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28078&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp
    Log:
    turn off debug
    
    Modified: haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp	2008-10-14 12:53:20 UTC (rev 28077)
    +++ haiku/trunk/src/add-ons/media/plugins/wav_reader/WavReaderPlugin.cpp	2008-10-14 12:54:02 UTC (rev 28078)
    @@ -31,7 +31,7 @@
     #include "WavReaderPlugin.h"
     #include "RawFormats.h"
     
    -#define TRACE_WAVE_READER
    +//#define TRACE_WAVE_READER
     #ifdef TRACE_WAVE_READER
       #define TRACE printf
     #else
    
    
    
    From dlmcpaul at mail.berlios.de  Tue Oct 14 14:55:23 2008
    From: dlmcpaul at mail.berlios.de (dlmcpaul at BerliOS)
    Date: Tue, 14 Oct 2008 14:55:23 +0200
    Subject: [Haiku-commits] r28079 -
    	haiku/trunk/src/add-ons/media/plugins/avcodec
    Message-ID: <200810141255.m9ECtN8i027074@sheep.berlios.de>
    
    Author: dlmcpaul
    Date: 2008-10-14 14:55:23 +0200 (Tue, 14 Oct 2008)
    New Revision: 28079
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28079&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp
    Log:
    get MetaData from infoBuffer parameter
    
    Modified: haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp	2008-10-14 12:54:02 UTC (rev 28078)
    +++ haiku/trunk/src/add-ons/media/plugins/avcodec/avcodec.cpp	2008-10-14 12:55:23 UTC (rev 28079)
    @@ -17,7 +17,7 @@
     #include "avcodec.h"
     
     #undef TRACE
    -#define TRACE_AV_CODEC
    +//#define TRACE_AV_CODEC
     #ifdef TRACE_AV_CODEC
     #	define TRACE(x...)	printf(x)
     #else
    @@ -172,11 +172,13 @@
     						"(id = %d)!!!\n",gCodecTable[i].id);
     					return B_ERROR;
     				}
    +				TRACE("avCodec: found decoder %s\n",fCodec->name);
     				
     				if (gCodecTable[i].family == B_WAV_FORMAT_FAMILY) {
    +					TRACE("Additional MetaData required for WAV format. Should contain %ld has %ld\n",sizeof(wave_format_ex),infoSize);
     					const wave_format_ex *wfmt_data
    -						= (const wave_format_ex *)ioEncodedFormat->MetaData();
    -					int wfmt_size = ioEncodedFormat->MetaDataSize();
    +						= (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;
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:16:45 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:16:45 +0200
    Subject: [Haiku-commits] r28080 - haiku/trunk/headers/private/interface
    Message-ID: <200810141316.m9EDGjX4011988@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:16:44 +0200 (Tue, 14 Oct 2008)
    New Revision: 28080
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28080&view=rev
    
    Modified:
       haiku/trunk/headers/private/interface/utf8_functions.h
    Log:
    Save one check in certain situations.
    
    
    Modified: haiku/trunk/headers/private/interface/utf8_functions.h
    ===================================================================
    --- haiku/trunk/headers/private/interface/utf8_functions.h	2008-10-14 12:55:23 UTC (rev 28079)
    +++ haiku/trunk/headers/private/interface/utf8_functions.h	2008-10-14 13:16:44 UTC (rev 28080)
    @@ -161,7 +161,7 @@
     
     		mask <<= 1;
     		if (mask == 0x40)
    -			break;
    +			return result;
     	}
     
     	if (mask == 0x40)
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:17:24 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:17:24 +0200
    Subject: [Haiku-commits] r28081 - haiku/trunk/headers/os/interface
    Message-ID: <200810141317.m9EDHO4w012628@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:17:24 +0200 (Tue, 14 Oct 2008)
    New Revision: 28081
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28081&view=rev
    
    Modified:
       haiku/trunk/headers/os/interface/ScrollView.h
    Log:
    Updated copyright.
    
    
    Modified: haiku/trunk/headers/os/interface/ScrollView.h
    ===================================================================
    --- haiku/trunk/headers/os/interface/ScrollView.h	2008-10-14 13:16:44 UTC (rev 28080)
    +++ haiku/trunk/headers/os/interface/ScrollView.h	2008-10-14 13:17:24 UTC (rev 28081)
    @@ -1,6 +1,6 @@
     /*
    -** Copyright 2004, OpenBeOS. All Rights Reserved.
    -** Distributed under the terms of the OpenBeOS License.
    +** Copyright 2004-2008, Haiku Inc. All Rights Reserved.
    +** Distributed under the terms of the MIT license.
     */
     #ifndef _SCROLL_VIEW_H
     #define _SCROLL_VIEW_H
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:19:16 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:19:16 +0200
    Subject: [Haiku-commits] r28082 - haiku/trunk/src/servers/app/drawing/Painter
    Message-ID: <200810141319.m9EDJGum014383@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:19:15 +0200 (Tue, 14 Oct 2008)
    New Revision: 28082
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28082&view=rev
    
    Modified:
       haiku/trunk/src/servers/app/drawing/Painter/Painter.cpp
    Log:
    Removed superfluous parenthesis.
    
    
    Modified: haiku/trunk/src/servers/app/drawing/Painter/Painter.cpp
    ===================================================================
    --- haiku/trunk/src/servers/app/drawing/Painter/Painter.cpp	2008-10-14 13:17:24 UTC (rev 28081)
    +++ haiku/trunk/src/servers/app/drawing/Painter/Painter.cpp	2008-10-14 13:19:15 UTC (rev 28082)
    @@ -1787,7 +1787,7 @@
     		// to access the rightmost pixel of the source with a weighting
     		// of 255. This in turn will trigger an optimization in the loop
     		// that also prevents out of bounds access.
    -		float index = i * (srcWidth - 1) / ((srcWidth * xScale) - 1);
    +		float index = i * (srcWidth - 1) / (srcWidth * xScale - 1);
     		// round down to get the left pixel
     		xWeights[i].index = (uint16)index;
     		xWeights[i].weight = 255 - (uint16)((index - xWeights[i].index) * 255);
    @@ -1805,7 +1805,7 @@
     		// to access the bottommost pixel of the source with a weighting
     		// of 255. This in turn will trigger an optimization in the loop
     		// that also prevents out of bounds access.
    -		float index = i * (srcHeight - 1) / ((srcHeight * yScale) - 1);
    +		float index = i * (srcHeight - 1) / (srcHeight * yScale - 1);
     		// round down to get the top pixel
     		yWeights[i].index = (uint16)index;
     		yWeights[i].weight = 255 - (uint16)((index - yWeights[i].index) * 255);
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:20:30 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:20:30 +0200
    Subject: [Haiku-commits] r28083 - haiku/trunk/src/servers/app
    Message-ID: <200810141320.m9EDKUWP015588@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:20:29 +0200 (Tue, 14 Oct 2008)
    New Revision: 28083
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28083&view=rev
    
    Modified:
       haiku/trunk/src/servers/app/GlyphLayoutEngine.h
    Log:
    * Added clarifying comment.
    * When the consumer does not want to consume a glyph, make
      sure the advance values are being reset before breaking out of the
      loop. These are used one more time after the loop.
    
    
    Modified: haiku/trunk/src/servers/app/GlyphLayoutEngine.h
    ===================================================================
    --- haiku/trunk/src/servers/app/GlyphLayoutEngine.h	2008-10-14 13:19:15 UTC (rev 28082)
    +++ haiku/trunk/src/servers/app/GlyphLayoutEngine.h	2008-10-14 13:20:29 UTC (rev 28083)
    @@ -155,6 +155,8 @@
     			continue;
     		}
     
    +// TODO: Currently disabled, because it works much too slow (doesn't seem
    +// to be properly cached in FreeType.)
     //		if (kerning)
     //			entry->GetKerning(lastCharCode, charCode, &advanceX, &advanceY);
     
    @@ -164,10 +166,13 @@
     		if (delta)
     			x += IsWhiteSpace(charCode) ? delta->space : delta->nonspace;
     
    -		if (!consumer.ConsumeGlyph(index, charCode, glyph, entry, x, y))
    +		if (!consumer.ConsumeGlyph(index, charCode, glyph, entry, x, y)) {
    +			advanceX = 0;
    +			advanceY = 0;
     			break;
    +		}
     
    -		// increment pen position
    +		// get next increment for pen position
     		advanceX = glyph->advance_x;
     		advanceY = glyph->advance_y;
     
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:21:44 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:21:44 +0200
    Subject: [Haiku-commits] r28084 - haiku/trunk/src/servers/app
    Message-ID: <200810141321.m9EDLihW016637@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:21:43 +0200 (Tue, 14 Oct 2008)
    New Revision: 28084
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28084&view=rev
    
    Modified:
       haiku/trunk/src/servers/app/ServerFont.cpp
    Log:
    Small indentation improvement...
    
    
    Modified: haiku/trunk/src/servers/app/ServerFont.cpp
    ===================================================================
    --- haiku/trunk/src/servers/app/ServerFont.cpp	2008-10-14 13:20:29 UTC (rev 28083)
    +++ haiku/trunk/src/servers/app/ServerFont.cpp	2008-10-14 13:21:43 UTC (rev 28084)
    @@ -812,7 +812,7 @@
     
     	StringWidthConsumer consumer;
     	if (!GlyphLayoutEngine::LayoutGlyphs(consumer, *this, string, numBytes,
    -		deltaArray, kerning, fSpacing))
    +			deltaArray, kerning, fSpacing))
     		return 0.0;
     
     	return consumer.width;
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:25:15 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:25:15 +0200
    Subject: [Haiku-commits] r28085 - haiku/trunk/src/add-ons/accelerants/vesa
    Message-ID: <200810141325.m9EDPFrL019510@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:25:14 +0200 (Tue, 14 Oct 2008)
    New Revision: 28085
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28085&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/accelerants/vesa/accelerant_protos.h
       haiku/trunk/src/add-ons/accelerants/vesa/hooks.cpp
    Log:
    Fix some char/line limit and naming problems. No functional change.
    
    
    Modified: haiku/trunk/src/add-ons/accelerants/vesa/accelerant_protos.h
    ===================================================================
    --- haiku/trunk/src/add-ons/accelerants/vesa/accelerant_protos.h	2008-10-14 13:21:43 UTC (rev 28084)
    +++ haiku/trunk/src/add-ons/accelerants/vesa/accelerant_protos.h	2008-10-14 13:25:14 UTC (rev 28085)
    @@ -1,6 +1,6 @@
     /*
    - * Copyright 2005-2008, Axel D?rfler, axeld at pinc-software.de. All rights reserved.
    - * Distributed under the terms of the MIT License.
    + * Copyright 2005-2008, Axel D?rfler, axeld at pinc-software.de.
    + * All rights reserved. Distributed under the terms of the MIT License.
      */
     #ifndef _ACCELERANT_PROTOS_H
     #define _ACCELERANT_PROTOS_H
    @@ -28,31 +28,31 @@
     status_t vesa_get_mode_list(display_mode *dm);
     status_t vesa_propose_display_mode(display_mode *target,
     	const display_mode *low, const display_mode *high);
    -status_t vesa_set_display_mode(display_mode *mode_to_set);
    -status_t vesa_get_display_mode(display_mode *current_mode);
    +status_t vesa_set_display_mode(display_mode *modeToSet);
    +status_t vesa_get_display_mode(display_mode *currentMode);
     status_t vesa_get_edid_info(void *info, size_t size, uint32 *_version);
     status_t vesa_get_frame_buffer_config(frame_buffer_config *config);
     status_t vesa_get_pixel_clock_limits(display_mode *dm, uint32 *low,
     	uint32 *high);
    -status_t vesa_move_display(uint16 h_display_start, uint16 v_display_start);
    +status_t vesa_move_display(uint16 hDisplayStart, uint16 vDisplayStart);
     status_t vesa_get_timing_constraints(display_timing_constraints *dtc);
    -void vesa_set_indexed_colors(uint count, uint8 first, uint8 *color_data,
    +void vesa_set_indexed_colors(uint count, uint8 first, uint8 *colorData,
     	uint32 flags);
     
     // DPMS
     uint32 vesa_dpms_capabilities(void);
     uint32 vesa_dpms_mode(void);
    -status_t vesa_set_dpms_mode(uint32 dpms_flags);
    +status_t vesa_set_dpms_mode(uint32 dpmsFlags);
     
     // cursor
    -status_t vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hot_x,
    -	uint16 hot_y, uint8 *andMask, uint8 *xorMask);
    +status_t vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hotX,
    +	uint16 hotY, uint8 *andMask, uint8 *xorMask);
     void vesa_move_cursor(uint16 x, uint16 y);
     void vesa_show_cursor(bool is_visible);
     
     // accelerant engine
     uint32 vesa_accelerant_engine_count(void);
    -status_t vesa_acquire_engine(uint32 capabilities, uint32 max_wait,
    +status_t vesa_acquire_engine(uint32 capabilities, uint32 maxWait,
     	sync_token *st, engine_token **et);
     status_t vesa_release_engine(engine_token *et, sync_token *st);
     void vesa_wait_engine_idle(void);
    
    Modified: haiku/trunk/src/add-ons/accelerants/vesa/hooks.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/accelerants/vesa/hooks.cpp	2008-10-14 13:21:43 UTC (rev 28084)
    +++ haiku/trunk/src/add-ons/accelerants/vesa/hooks.cpp	2008-10-14 13:25:14 UTC (rev 28085)
    @@ -1,16 +1,18 @@
     /*
    - * Copyright 2005-2008, Axel D?rfler, axeld at pinc-software.de. All rights reserved.
    - * Distributed under the terms of the MIT License.
    + * Copyright 2005-2008, Axel D?rfler, axeld at pinc-software.de.
    + * All rights reserved. Distributed under the terms of the MIT License.
      */
     
     
     #include "accelerant_protos.h"
     
     
    -// ToDo: these are some temporary dummy functions to see if this helps with our current app_server
    +// TODO: these are some temporary dummy functions to see if this helps with our
    +// current app_server
     
     status_t
    -vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y, uint8 *andMask, uint8 *xorMask)
    +vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y,
    +	uint8 *andMask, uint8 *xorMask)
     {
     	return B_OK;
     }
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:26:45 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:26:45 +0200
    Subject: [Haiku-commits] r28086 -
    	haiku/trunk/src/add-ons/kernel/partitioning_systems/intel
    Message-ID: <200810141326.m9EDQjfj019926@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:26:45 +0200 (Tue, 14 Oct 2008)
    New Revision: 28086
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28086&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/write_support.cpp
    Log:
    Added a TODO, because I spotted a problem when moving partitions.
    
    
    Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/write_support.cpp
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/write_support.cpp	2008-10-14 13:25:14 UTC (rev 28085)
    +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/write_support.cpp	2008-10-14 13:26:45 UTC (rev 28086)
    @@ -1064,6 +1064,7 @@
     	uint8 *buffer, int32 buffer_size, disk_job_id job)
     {
     // TODO: This should be a service function of the DDM!
    +// TODO: This seems to be broken if source and destination overlap.
     	status_t error = B_OK;
     	off_t cycleCount = size / buffer_size;
     	int32 remainingSize = size - cycleCount * buffer_size;
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:29:28 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:29:28 +0200
    Subject: [Haiku-commits] r28087 - haiku/trunk/build/jam
    Message-ID: <200810141329.m9EDTSe7020766@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:29:28 +0200 (Tue, 14 Oct 2008)
    New Revision: 28087
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28087&view=rev
    
    Modified:
       haiku/trunk/build/jam/BuildSetup
    Log:
    Improve indentation.
    
    
    Modified: haiku/trunk/build/jam/BuildSetup
    ===================================================================
    --- haiku/trunk/build/jam/BuildSetup	2008-10-14 13:26:45 UTC (rev 28086)
    +++ haiku/trunk/build/jam/BuildSetup	2008-10-14 13:29:28 UTC (rev 28087)
    @@ -848,8 +848,8 @@
     	case linux		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_LINUX ;
     	case freebsd	: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_FREEBSD ;
     	case darwin		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_DARWIN ;
    -	case cygwin		: TARGET_DEFINES += HAIKU_TARGET_PLATFORM_CYGWIN ;
    -	case sunos		: TARGET_DEFINES += HAIKU_TARGET_PLATFORM_SUNOS ;
    +	case cygwin		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_CYGWIN ;
    +	case sunos		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_SUNOS ;
     	case libbe_test	: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_LIBBE_TEST ;
     }
     
    @@ -862,8 +862,8 @@
     	case linux		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_LINUX ;
     	case freebsd	: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_FREEBSD ;
     	case darwin		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_DARWIN ;
    -	case cygwin		: HOST_DEFINES += HAIKU_HOST_PLATFORM_CYGWIN ;
    -	case sunos		: HOST_DEFINES += HAIKU_HOST_PLATFORM_SUNOS ;
    +	case cygwin		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_CYGWIN ;
    +	case sunos		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_SUNOS ;
     }
     
     
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 15:39:56 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 15:39:56 +0200
    Subject: [Haiku-commits] r28088 - haiku/trunk/src/apps/launchbox
    Message-ID: <200810141339.m9EDduEf023529@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 15:39:55 +0200 (Tue, 14 Oct 2008)
    New Revision: 28088
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28088&view=rev
    
    Modified:
       haiku/trunk/src/apps/launchbox/IconButton.cpp
    Log:
    * Improve indentation.
    * Use layout friendly constructor of BView.
    
    
    Modified: haiku/trunk/src/apps/launchbox/IconButton.cpp
    ===================================================================
    --- haiku/trunk/src/apps/launchbox/IconButton.cpp	2008-10-14 13:29:28 UTC (rev 28087)
    +++ haiku/trunk/src/apps/launchbox/IconButton.cpp	2008-10-14 13:39:55 UTC (rev 28088)
    @@ -1,5 +1,5 @@
     /*
    - * Copyright 2006, Haiku.
    + * Copyright 2006-2008, Haiku.
      * Distributed under the terms of the MIT License.
      *
      * Authors:
    @@ -31,8 +31,8 @@
     
     // constructor
     IconButton::IconButton(const char* name, uint32 id, const char* label,
    -					   BMessage* message, BHandler* target)
    -	: BView(BRect(0.0, 0.0, 10.0, 10.0), name, B_FOLLOW_NONE, B_WILL_DRAW),
    +		BMessage* message, BHandler* target)
    +	: BView(name, B_WILL_DRAW),
     	  BInvoker(message, target),
     	  fButtonState(STATE_ENABLED),
     	  fID(id),
    @@ -69,9 +69,8 @@
     IconButton::AttachedToWindow()
     {
     	SetTarget(fTargetCache);
    -	if (!Target()) {
    +	if (!Target())
     		SetTarget(Window());
    -	}
     }
     
     // Draw
    @@ -169,14 +168,15 @@
     void
     IconButton::MouseDown(BPoint where)
     {
    -	if (IsValid()) {
    -		if (_HasFlags(STATE_ENABLED)/* && !_HasFlags(STATE_FORCE_PRESSED)*/) {
    -			if (Bounds().Contains(where)) {
    -				SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
    -				_AddFlags(STATE_PRESSED | STATE_TRACKING);
    -			} else {
    -				_ClearFlags(STATE_PRESSED | STATE_TRACKING);
    -			}
    +	if (!IsValid())
    +		return;
    +
    +	if (_HasFlags(STATE_ENABLED)/* && !_HasFlags(STATE_FORCE_PRESSED)*/) {
    +		if (Bounds().Contains(where)) {
    +			SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
    +			_AddFlags(STATE_PRESSED | STATE_TRACKING);
    +		} else {
    +			_ClearFlags(STATE_PRESSED | STATE_TRACKING);
     		}
     	}
     }
    @@ -185,43 +185,45 @@
     void
     IconButton::MouseUp(BPoint where)
     {
    -	if (IsValid()) {
    -//		if (!_HasFlags(STATE_FORCE_PRESSED)) {
    -			if (_HasFlags(STATE_ENABLED) && _HasFlags(STATE_PRESSED) && Bounds().Contains(where))
    -				Invoke();
    -			else if (Bounds().Contains(where))
    -				_AddFlags(STATE_INSIDE);
    -			_ClearFlags(STATE_PRESSED | STATE_TRACKING);
    -//		}
    -	}
    +	if (!IsValid())
    +		return;
    +
    +//	if (!_HasFlags(STATE_FORCE_PRESSED)) {
    +		if (_HasFlags(STATE_ENABLED) && _HasFlags(STATE_PRESSED) && Bounds().Contains(where))
    +			Invoke();
    +		else if (Bounds().Contains(where))
    +			_AddFlags(STATE_INSIDE);
    +		_ClearFlags(STATE_PRESSED | STATE_TRACKING);
    +//	}
     }
     
     // MouseMoved
     void
     IconButton::MouseMoved(BPoint where, uint32 transit, const BMessage* message)
     {
    -	if (IsValid()) {
    -		uint32 buttons = 0;
    -		Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons);
    -		// catch a mouse up event that we might have missed
    -		if (!buttons && _HasFlags(STATE_PRESSED)) {
    -			MouseUp(where);
    -			return;
    -		}
    -		if (buttons && !_HasFlags(STATE_TRACKING))
    -			return;
    -		if ((transit == B_INSIDE_VIEW || transit == B_ENTERED_VIEW)
    -			&& _HasFlags(STATE_ENABLED))
    -			_AddFlags(STATE_INSIDE);
    -		else 
    -			_ClearFlags(STATE_INSIDE);
    -		if (_HasFlags(STATE_TRACKING)) {
    -			if (Bounds().Contains(where))
    -				_AddFlags(STATE_PRESSED);
    -			else
    -				_ClearFlags(STATE_PRESSED);
    -		}
    +	if (!IsValid())
    +		return;
    +
    +	uint32 buttons = 0;
    +	Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons);
    +	// catch a mouse up event that we might have missed
    +	if (!buttons && _HasFlags(STATE_PRESSED)) {
    +		MouseUp(where);
    +		return;
     	}
    +	if (buttons && !_HasFlags(STATE_TRACKING))
    +		return;
    +	if ((transit == B_INSIDE_VIEW || transit == B_ENTERED_VIEW)
    +		&& _HasFlags(STATE_ENABLED))
    +		_AddFlags(STATE_INSIDE);
    +	else 
    +		_ClearFlags(STATE_INSIDE);
    +	if (_HasFlags(STATE_TRACKING)) {
    +		if (Bounds().Contains(where))
    +			_AddFlags(STATE_PRESSED);
    +		else
    +			_ClearFlags(STATE_PRESSED);
    +	}
     }
     
     #define MIN_SPACE 15.0
    @@ -294,41 +296,42 @@
     status_t
     IconButton::SetIcon(const char* pathToBitmap)
     {
    +	if (pathToBitmap == NULL)
    +		return B_BAD_VALUE;
    +
     	status_t status = B_BAD_VALUE;
    -	if (pathToBitmap) {
    -		BBitmap* fileBitmap = NULL;
    -		// try to load bitmap from either relative or absolute path
    -		BEntry entry(pathToBitmap, true);
    -		if (!entry.Exists()) {
    -			app_info info;
    -			status = be_app->GetAppInfo(&info);
    +	BBitmap* fileBitmap = NULL;
    +	// try to load bitmap from either relative or absolute path
    +	BEntry entry(pathToBitmap, true);
    +	if (!entry.Exists()) {
    +		app_info info;
    +		status = be_app->GetAppInfo(&info);
    +		if (status == B_OK) {
    +			BEntry app_entry(&info.ref, true);
    +			BPath path;
    +			app_entry.GetPath(&path);
    +			status = path.InitCheck();
     			if (status == B_OK) {
    -				BEntry app_entry(&info.ref, true);
    -				BPath path;
    -				app_entry.GetPath(&path);
    -				status = path.InitCheck();
    +				status = path.GetParent(&path);
     				if (status == B_OK) {
    -					status = path.GetParent(&path);
    -					if (status == B_OK) {
    -						status = path.Append(pathToBitmap, true);
    -						if (status == B_OK)
    -							fileBitmap = BTranslationUtils::GetBitmap(path.Path());
    -						else 
    -							printf("IconButton::SetIcon() - path.Append() failed: %s\n", strerror(status));
    -					} else
    -						printf("IconButton::SetIcon() - path.GetParent() failed: %s\n", strerror(status));
    +					status = path.Append(pathToBitmap, true);
    +					if (status == B_OK)
    +						fileBitmap = BTranslationUtils::GetBitmap(path.Path());
    +					else 
    +						printf("IconButton::SetIcon() - path.Append() failed: %s\n", strerror(status));
     				} else
    -					printf("IconButton::SetIcon() - path.InitCheck() failed: %s\n", strerror(status));
    +					printf("IconButton::SetIcon() - path.GetParent() failed: %s\n", strerror(status));
     			} else
    -				printf("IconButton::SetIcon() - be_app->GetAppInfo() failed: %s\n", strerror(status));
    +				printf("IconButton::SetIcon() - path.InitCheck() failed: %s\n", strerror(status));
     		} else
    -			fileBitmap = BTranslationUtils::GetBitmap(pathToBitmap);
    -		if (fileBitmap) {
    -			status = _MakeBitmaps(fileBitmap);
    -			delete fileBitmap;
    -		} else
    -			status = B_ERROR;
    -	}
    +			printf("IconButton::SetIcon() - be_app->GetAppInfo() failed: %s\n", strerror(status));
    +	} else
    +		fileBitmap = BTranslationUtils::GetBitmap(pathToBitmap);
    +	if (fileBitmap) {
    +		status = _MakeBitmaps(fileBitmap);
    +		delete fileBitmap;
    +	} else
    +		status = B_ERROR;
     	return status;
     }
     
    @@ -378,7 +381,7 @@
     // SetIcon
     status_t
     IconButton::SetIcon(const unsigned char* bitsFromQuickRes,
    -					uint32 width, uint32 height, color_space format, bool convertToBW)
    +	uint32 width, uint32 height, color_space format, bool convertToBW)
     {
     	status_t status = B_BAD_VALUE;
     	if (bitsFromQuickRes && width > 0 && height > 0) {
    @@ -485,15 +488,15 @@
     bool
     IconButton::DrawBorder() const
     {
    -	return (IsEnabled() && (_HasFlags(STATE_INSIDE) || _HasFlags(STATE_TRACKING))
    -			|| _HasFlags(STATE_FORCE_PRESSED));
    +	return (IsEnabled() && (_HasFlags(STATE_INSIDE)
    +		|| _HasFlags(STATE_TRACKING)) || _HasFlags(STATE_FORCE_PRESSED));
     }
     
     // DrawNormalBorder
     void
     IconButton::DrawNormalBorder(BRect r, rgb_color background,
    -							 rgb_color shadow, rgb_color darkShadow,
    -							 rgb_color lightShadow, rgb_color light)
    +	rgb_color shadow, rgb_color darkShadow,
    +	rgb_color lightShadow, rgb_color light)
     {
     	_DrawFrame(r, shadow, darkShadow, light, lightShadow);
     }
    @@ -501,8 +504,8 @@
     // DrawPressedBorder
     void
     IconButton::DrawPressedBorder(BRect r, rgb_color background,
    -							rgb_color shadow, rgb_color darkShadow,
    -							rgb_color lightShadow, rgb_color light)
    +	rgb_color shadow, rgb_color darkShadow,
    +	rgb_color lightShadow, rgb_color light)
     {
     	_DrawFrame(r, shadow, light, darkShadow, background);
     }
    @@ -511,7 +514,8 @@
     bool
     IconButton::IsValid() const
     {
    -	return (fNormalBitmap && fDisabledBitmap && fClickedBitmap && fDisabledClickedBitmap
    +	return (fNormalBitmap && fDisabledBitmap && fClickedBitmap
    +		&& fDisabledClickedBitmap
     		&& fNormalBitmap->IsValid()
     		&& fDisabledBitmap->IsValid()
     		&& fClickedBitmap->IsValid()
    @@ -556,7 +560,8 @@
     BBitmap*
     IconButton::_ConvertToRGB32(const BBitmap* bitmap) const
     {
    -	BBitmap* convertedBitmap = new(nothrow) BBitmap(bitmap->Bounds(), B_BITMAP_ACCEPTS_VIEWS, B_RGBA32);
    +	BBitmap* convertedBitmap = new(nothrow) BBitmap(bitmap->Bounds(),
    +		B_BITMAP_ACCEPTS_VIEWS, B_RGBA32);
     	if (convertedBitmap && convertedBitmap->IsValid()) {
     		memset(convertedBitmap->Bits(), 0, convertedBitmap->BitsLength());
     		BView* helper = new BView(bitmap->Bounds(), "helper",
    
    
    
    From aldeck at mail.berlios.de  Tue Oct 14 16:46:48 2008
    From: aldeck at mail.berlios.de (aldeck at BerliOS)
    Date: Tue, 14 Oct 2008 16:46:48 +0200
    Subject: [Haiku-commits] r28089 - haiku/trunk/src/kits/tracker
    Message-ID: <200810141446.m9EEkmxH025289@sheep.berlios.de>
    
    Author: aldeck
    Date: 2008-10-14 16:46:47 +0200 (Tue, 14 Oct 2008)
    New Revision: 28089
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28089&view=rev
    
    Modified:
       haiku/trunk/src/kits/tracker/DeskWindow.cpp
       haiku/trunk/src/kits/tracker/DeskWindow.h
    Log:
    * DeskWindow wasn't checking if the context menu for the trash was already open and showing. We do it like in ContainerWindow now. Fixes #353
    
    
    
    Modified: haiku/trunk/src/kits/tracker/DeskWindow.cpp
    ===================================================================
    --- haiku/trunk/src/kits/tracker/DeskWindow.cpp	2008-10-14 13:39:55 UTC (rev 28088)
    +++ haiku/trunk/src/kits/tracker/DeskWindow.cpp	2008-10-14 14:46:47 UTC (rev 28089)
    @@ -54,6 +54,7 @@
     #include "IconMenuItem.h"
     #include "MountMenu.h"
     #include "PoseView.h"
    +#include "SlowContextPopup.h"
     #include "Tracker.h"
     #include "TemplatesMenu.h"
     
    @@ -328,7 +329,7 @@
     BDeskWindow::AddTrashContextMenu()
     {
     	// setup special trash context menu
    -	fTrashContextMenu = new BPopUpMenu("TrashContext", false, false);
    +	fTrashContextMenu = new BSlowContextMenu("TrashContext");
     	fTrashContextMenu->SetFont(be_plain_font);
     	fTrashContextMenu->AddItem(new BMenuItem("Empty Trash",
     		new BMessage(kEmptyTrash)));
    @@ -349,9 +350,8 @@
     	DeleteSubmenu(fNavigationItem);
     
     	if (ref && entry.SetTo(ref) == B_OK && FSIsTrashDir(&entry)) {
    -		//
    -		//	don't show any menu if this is the trash
    -		if (Dragging() && FSIsTrashDir(&entry))
    +		
    +		if (fTrashContextMenu->IsShowing() || Dragging())
     			return;
     			
     		// selected item was trash, show the trash context menu instead
    
    Modified: haiku/trunk/src/kits/tracker/DeskWindow.h
    ===================================================================
    --- haiku/trunk/src/kits/tracker/DeskWindow.h	2008-10-14 13:39:55 UTC (rev 28088)
    +++ haiku/trunk/src/kits/tracker/DeskWindow.h	2008-10-14 14:46:47 UTC (rev 28089)
    @@ -41,7 +41,7 @@
     #include "ContainerWindow.h"
     #include "DesktopPoseView.h"
     
    -class BPopUpMenu;
    +class BSlowContextMenu;
     
     namespace BPrivate {
     
    @@ -82,7 +82,7 @@
     private:
     	BShelf *fDeskShelf;
     		// shelf for replicant support
    -	BPopUpMenu *fTrashContextMenu;
    +	BSlowContextMenu *fTrashContextMenu;
     
     	BRect fOldFrame;
     	
    
    
    
    From stefano.ceccherini at gmail.com  Tue Oct 14 16:53:31 2008
    From: stefano.ceccherini at gmail.com (Stefano Ceccherini)
    Date: Tue, 14 Oct 2008 16:53:31 +0200
    Subject: [Haiku-commits] r28089 - haiku/trunk/src/kits/tracker
    In-Reply-To: <200810141446.m9EEkmxH025289@sheep.berlios.de>
    References: <200810141446.m9EEkmxH025289@sheep.berlios.de>
    Message-ID: <894b9700810140753v5a94c3e2ga3332e2b02c993bb@mail.gmail.com>
    
    2008/10/14 aldeck at BerliOS :
    
    > * DeskWindow wasn't checking if the context menu for the trash was already open and showing. We do it like in ContainerWindow now. Fixes #353
    
    >        // setup special trash context menu
    > -       fTrashContextMenu = new BPopUpMenu("TrashContext", false, false);
    > +       fTrashContextMenu = new BSlowContextMenu("TrashContext");
    
    Was this change intentional ? I guess it was, just curious why you did that.
    
    
    From superstippi at gmx.de  Tue Oct 14 17:00:20 2008
    From: superstippi at gmx.de (Stephan Assmus)
    Date: Tue, 14 Oct 2008 17:00:20 +0200
    Subject: [Haiku-commits] r28089 - haiku/trunk/src/kits/tracker
    In-Reply-To: <894b9700810140753v5a94c3e2ga3332e2b02c993bb@mail.gmail.com>
    References: <200810141446.m9EEkmxH025289@sheep.berlios.de>
    	<894b9700810140753v5a94c3e2ga3332e2b02c993bb@mail.gmail.com>
    Message-ID: <20081014150020.43340@gmx.net>
    
    Hi,
    
    Von: "Stefano Ceccherini" 
    > 2008/10/14 aldeck at BerliOS :
    > 
    > > * DeskWindow wasn't checking if the context menu for the trash was
    > already open and showing. We do it like in ContainerWindow now. Fixes #353
    > 
    > >        // setup special trash context menu
    > > -       fTrashContextMenu = new BPopUpMenu("TrashContext", false,
    > false);
    > > +       fTrashContextMenu = new BSlowContextMenu("TrashContext");
    > 
    > Was this change intentional ? I guess it was, just curious why you did
    > that.
    
    If I may answer for Alexandre... the BSlowContextMenu is aware when it is already showing. Otherwise a new subclass would have had to be written. As far as I am aware, it just means code reuse without any other side effects.
    
    Best regards,
    -Stephan
    
    
    From stefano.ceccherini at gmail.com  Tue Oct 14 17:11:17 2008
    From: stefano.ceccherini at gmail.com (Stefano Ceccherini)
    Date: Tue, 14 Oct 2008 17:11:17 +0200
    Subject: [Haiku-commits] r28089 - haiku/trunk/src/kits/tracker
    In-Reply-To: <20081014150020.43340@gmx.net>
    References: <200810141446.m9EEkmxH025289@sheep.berlios.de>
    	<894b9700810140753v5a94c3e2ga3332e2b02c993bb@mail.gmail.com>
    	<20081014150020.43340@gmx.net>
    Message-ID: <894b9700810140811o70597be8h4f77f38b3b407c5e@mail.gmail.com>
    
    2008/10/14 Stephan Assmus :
    > Hi,
    
    > If I may answer for Alexandre... the BSlowContextMenu is aware when it is already showing. Otherwise a new subclass would have had to be written. As far as I am aware, it just means code reuse without any other side effects.
    
    
    Ok, thanks, I was just curious. In fact, before this change, the trash
    popup menu was the only one which looked a bit different from the
    rest.
    Thanks for the clarification.
    
    
    From mmlr at mail.berlios.de  Tue Oct 14 17:18:01 2008
    From: mmlr at mail.berlios.de (mmlr at mail.berlios.de)
    Date: Tue, 14 Oct 2008 17:18:01 +0200
    Subject: [Haiku-commits] r28090 -
    	haiku/trunk/src/add-ons/kernel/bus_managers/acpi
    Message-ID: <200810141518.m9EFI1dJ028357@sheep.berlios.de>
    
    Author: mmlr
    Date: 2008-10-14 17:17:58 +0200 (Tue, 14 Oct 2008)
    New Revision: 28090
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28090&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
    Log:
    * Fix syslog output, dprintf doesn't take a va_list. This caused junk to be
      written on load of the ACPI module.
    * Fix waiting for a semaphore. It didn't ever use the timeout because it missed
      the B_RELATIVE_TIMEOUT and the timeout value would've been wrong as well
      since it didn't convert from milli- to microseconds.
    * Do away with the hack of not actually using spinlocks because it apparently
      didn't work on Dano. Now normal spinlocks are used.
    * Also remove the atomic test and set function that was used for locking.
    * Panic in case an interrupt handler is removed, because it cannot (yet) work.
    * Use system_time() to instead of using gettimeofday() and converting.
    * Fix reading PCI config, the width was used wrongly so nothing was returned.
    * The physical memory read/write function didn't actually do anything or would
      at worst have accessed unmapped memory. It now uses a bit of private VM
      functionallity to actually implement reading and writing physical memory.
    * Some style cleanup, more to come in the next commit.
    
    
    Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c	2008-10-14 14:46:47 UTC (rev 28089)
    +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c	2008-10-14 15:17:58 UTC (rev 28090)
    @@ -128,6 +128,7 @@
     
     #ifdef _KERNEL_MODE
     #	include 
    +#	include 
     #include 
     extern pci_module_info *gPCIManager;
     #include 
    @@ -209,7 +210,6 @@
     	dprintf("AcpiOsGetRootPointer returning %p\n", (void *)acpi_root);
     	return acpi_root;
     #else
    -
     	return (AeLocalGetRootPointer());
     #endif
     }
    @@ -234,7 +234,6 @@
         const ACPI_PREDEFINED_NAMES *InitVal,
         ACPI_STRING                 *NewVal)
     {
    -
         if (!InitVal || !NewVal)
         {
             return (AE_BAD_PARAMETER);
    @@ -264,7 +263,6 @@
         ACPI_TABLE_HEADER       *ExistingTable,
         ACPI_TABLE_HEADER       **NewTable)
     {
    -
         if (!ExistingTable || !NewTable)
         {
             return (AE_BAD_PARAMETER);
    @@ -307,8 +305,7 @@
         void                    *Pointer,
         ACPI_SIZE               Length)
     {
    -
    -    return (TRUE);
    +    return TRUE;
     }
     
     
    @@ -330,8 +327,7 @@
         void                    *Pointer,
         ACPI_SIZE               Length)
     {
    -
    -    return (TRUE);
    +	return TRUE;
     }
     
     
    @@ -351,7 +347,6 @@
     AcpiOsRedirectOutput (
         void                    *Destination)
     {
    -
         AcpiGbl_OutputFile = Destination;
     }
     
    @@ -373,14 +368,11 @@
         const char              *Fmt,
         ...)
     {
    -    va_list                 Args;
    +    va_list Args;
     
    -
    -    va_start (Args, Fmt);
    -
    -    AcpiOsVprintf (Fmt, Args);
    -
    -    va_end (Args);
    +    va_start(Args, Fmt);
    +    AcpiOsVprintf(Fmt, Args);
    +    va_end(Args);
     }
     
     
    @@ -432,7 +424,9 @@
         }
     
     #else
    -	dprintf(Fmt, Args);
    +	static char outputBuffer[1024];
    +	vsnprintf(outputBuffer, 1024, Fmt, Args);
    +	dprintf("%s", outputBuffer);
     #endif
     }
     
    @@ -501,7 +495,6 @@
         ACPI_PHYSICAL_ADDRESS   where,
         ACPI_SIZE	length)
     {
    -
     #ifdef _KERNEL_MODE
     	uint32 page_offset = ACPI_TO_INTEGER(where) % B_PAGE_SIZE;
     	void *map_base = ACPI_ADD_PTR(void,where,0L - page_offset);
    @@ -509,13 +502,14 @@
     	void *there;
     
     	area = map_physical_memory("acpi_physical_mem_area", map_base,
    -			ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_ADDRESS,0,&there);
    +		ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_ADDRESS, 0,
    +		&there);
     	if (area < 0) {
    -		dprintf("ACPI: cannot map memory at %p, length %ld\n", map_base, length);
    +		dprintf("ACPI: cannot map memory at %p, length %d\n", map_base, length);
     		return NULL;
     	}
    -	there += page_offset;
     
    +	there += page_offset;
     	return there;
     #endif
     
    @@ -542,7 +536,6 @@
         void                    *where,
         ACPI_SIZE               length)
     {
    -
     	delete_area(area_for(where));
     	return;
     }
    @@ -564,12 +557,7 @@
     AcpiOsAllocate (
         ACPI_SIZE               size)
     {
    -    void                    *Mem;
    -
    -
    -    Mem = (void *) malloc ((size_t) size);
    -
    -    return Mem;
    +	return (void *)malloc((size_t)size);
     }
     
     
    @@ -589,9 +577,7 @@
     AcpiOsFree (
         void                    *mem)
     {
    -
    -
    -    free (mem);
    +    free(mem);
     }
     
     
    @@ -614,7 +600,7 @@
         UINT32              InitialUnits,
         ACPI_HANDLE         *OutHandle)
     {
    -    *OutHandle = (ACPI_HANDLE)(create_sem(InitialUnits,"acpi_sem"));
    +    *OutHandle = (ACPI_HANDLE)create_sem(InitialUnits, "acpi_sem");
         return AE_OK;
     }
     
    @@ -634,14 +620,7 @@
     AcpiOsDeleteSemaphore (
         ACPI_HANDLE         Handle)
     {
    -
    -    if (!Handle)
    -    {
    -        return AE_BAD_PARAMETER;
    -    }
    -
    -	delete_sem((sem_id)(Handle));
    -
    +	delete_sem((sem_id)Handle);
         return AE_OK;
     }
     
    @@ -666,8 +645,22 @@
         UINT32              Units,
         UINT16              Timeout)
     {
    +	if (Timeout != ACPI_WAIT_FOREVER) {
    +		switch (acquire_sem_etc((sem_id)Handle, Units, B_RELATIVE_TIMEOUT,
    +			(bigtime_t)Timeout * 1000)) {
    +			case B_TIMED_OUT:
    +				return AE_TIME;
    +			case B_BAD_VALUE:
    +				return AE_BAD_PARAMETER;
    +			case B_OK:
    +				return AE_OK;
    +			default:
    +				return AE_ERROR;
    +		}
    +	}
     
    -    return (acquire_sem_etc((sem_id)(Handle),Units,0,Timeout) == B_OK ? AE_OK : AE_BAD_PARAMETER);
    +	return acquire_sem_etc((sem_id)Handle, Units, 0, 0)
    +		== B_OK ? AE_OK : AE_BAD_PARAMETER;
     }
     
     
    @@ -689,30 +682,20 @@
         ACPI_HANDLE         Handle,
         UINT32              Units)
     {
    -	release_sem_etc((sem_id)(Handle),Units,0);
    -
    +	release_sem_etc((sem_id)Handle, Units, 0);
         return AE_OK;
     }
     
    -/* For R5 compatibility */
     
    -inline int32
    -_atomic_test_and_set(volatile int32 *value, int32 newValue, int32 testAgainst)
    -{
    -	int32 oldValue;
    -	asm volatile("lock; cmpxchg %%ecx, (%%edx)"
    -		: "=a" (oldValue) : "a" (testAgainst), "c" (newValue), "d" (value));
    -	return oldValue;
    -}
    -
     ACPI_STATUS
     AcpiOsCreateLock (
         ACPI_HANDLE             *OutHandle)
     {
    -
         *OutHandle = (ACPI_HANDLE)malloc(sizeof(spinlock));
    -    *((spinlock *)(*OutHandle)) = 1;
    +    if (OutHandle == NULL)
    +    	return AE_NO_MEMORY;
     
    +    *((spinlock *)(*OutHandle)) = 0;
         return AE_OK;
     }
     
    @@ -728,25 +711,9 @@
     AcpiOsAcquireLock (
         ACPI_HANDLE             Handle)
     {
    -	/*cpu_status cpu;
    -
    -	if (Flags == ACPI_NOT_ISR)
    -		cpu = disable_interrupts();
    -
    -    acquire_spinlock ((spinlock *)(Handle));
    -
    -    if (Flags == ACPI_NOT_ISR)
    -    	restore_interrupts(cpu);*/
    -
    -    /* Why aren't we using real spinlocks? Well, they seem to cause
    -       kernel hangs at boot, at least on Dano. I don't really know
    -       why, as they should be equivalent to this. Maybe in sysinit2
    -       interrupts are already off, and the double disable interrupts
    -       call is hanging the system? I'm not sure how to detect that
    -       though. Anyway, this works, even if it's stupid. */
    -
    -    while (_atomic_test_and_set(((spinlock *)(Handle)),0,1) <= 0);
    -    return (0);
    +	cpu_status cpu = disable_interrupts();
    +    acquire_spinlock((spinlock *)Handle);
    +	return cpu;
     }
     
     
    @@ -755,17 +722,8 @@
         ACPI_HANDLE             Handle,
         ACPI_CPU_FLAGS          Flags)
     {
    -    /*cpu_status cpu;
    -
    -	if (Flags == ACPI_NOT_ISR)
    -		cpu = disable_interrupts();
    -
    -    release_spinlock ((spinlock *)(Handle));
    -
    -    if (Flags == ACPI_NOT_ISR)
    -    	restore_interrupts(cpu);*/
    -
    -    atomic_add(((spinlock *)(Handle)),1);
    +    release_spinlock((spinlock *)Handle);
    +	restore_interrupts((cpu_status)Flags);
     }
     
     
    @@ -790,10 +748,9 @@
         ACPI_OSD_HANDLER        ServiceRoutine,
         void                    *Context)
     {
    -
     #ifdef _KERNEL_MODE
    -
    -	install_io_interrupt_handler(InterruptNumber,(interrupt_handler)ServiceRoutine,Context,0);
    +	install_io_interrupt_handler(InterruptNumber,
    +		(interrupt_handler)ServiceRoutine, Context, 0);
     		/* It so happens that the Haiku and ACPI-CA interrupt handler routines
     		   return the same values with the same meanings */
     #endif
    @@ -819,16 +776,16 @@
         UINT32                  InterruptNumber,
         ACPI_OSD_HANDLER        ServiceRoutine)
     {
    -
     #ifdef _KERNEL_MODE
    -dprintf("AcpiOsRemoveInterruptHandler()\n");
    -	remove_io_interrupt_handler(InterruptNumber,(interrupt_handler)ServiceRoutine,NULL);
    +	panic("AcpiOsRemoveInterruptHandler()\n");
    +	/*remove_io_interrupt_handler(InterruptNumber,
    +		(interrupt_handler)ServiceRoutine, NULL);*/
     		/* Crap. We don't get the Context argument back. */
     	#warning Sketchy code!
    -
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return AE_OK;
     }
     
     
    @@ -852,8 +809,6 @@
         ACPI_OSD_EXEC_CALLBACK  Function,
         void                    *Context)
     {
    -	status_t err;
    -
     	switch (Type) {
     		case OSL_GLOBAL_LOCK_HANDLER:
     		case OSL_NOTIFY_HANDLER:
    @@ -864,10 +819,9 @@
     			break;
     	}
     
    -	err = gDPC->queue_dpc(gDPCHandle, Function, Context);
    -
    -	if (err != B_OK)
    +	if (gDPC->queue_dpc(gDPCHandle, Function, Context) != B_OK)
     		return AE_ERROR;
    +
     	return AE_OK;
     }
     
    @@ -922,12 +876,7 @@
     AcpiOsStall (
         UINT32                  microseconds)
     {
    -
    -    if (microseconds)
    -    {
    -        spin (microseconds);
    -    }
    -    return;
    +	spin(microseconds);
     }
     
     
    @@ -947,10 +896,7 @@
     AcpiOsSleep (
         ACPI_INTEGER            milliseconds)
     {
    -
    -    snooze (milliseconds * 1000);    /* Sleep for micro seconds */
    -
    -    return;
    +    snooze(milliseconds * 1000);    /* Sleep for micro seconds */
     }
     
     /******************************************************************************
    @@ -968,13 +914,7 @@
     UINT64
     AcpiOsGetTimer (void)
     {
    -    struct timeval  time;
    -
    -    gettimeofday(&time, NULL);
    -
    -    /* Seconds * 10^7 = 100ns(10^-7), Microseconds(10^-6) * 10^1 = 100ns */
    -
    -    return (((UINT64) time.tv_sec * 10000000) + ((UINT64) time.tv_usec * 10));
    +	return system_time() * 10;
     }
     
     
    @@ -995,8 +935,7 @@
     AcpiOsValidateInterface (
         char                    *Interface)
     {
    -
    -    return (AE_SUPPORT);
    +    return AE_SUPPORT;
     }
     
     
    @@ -1022,8 +961,7 @@
         ACPI_PHYSICAL_ADDRESS   Address,
         ACPI_SIZE               Length)
     {
    -
    -    return (AE_OK);
    +    return AE_OK;
     }
     
     
    @@ -1049,18 +987,23 @@
         void                    *Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
     	UINT32 val = gPCIManager->read_pci_config(
    -		PciId->Bus, PciId->Device, PciId->Function, Register, Width/8);
    +		PciId->Bus, PciId->Device, PciId->Function, Register, Width / 8);
     	switch (Width) {
    -		case 1: *(UINT8*)Value = val;
    -		case 2: *(UINT16*)Value = val;
    -		case 4: *(UINT32*)Value = val;
    +		case 8: *(UINT8 *)Value = val;
    +		case 16: *(UINT16 *)Value = val;
    +		case 32: *(UINT32 *)Value = val;
    +		default:
    +			dprintf("AcpiOsReadPciConfiguration unhandled value width: %u\n",
    +				Width);
    +			return AE_ERROR;
     	}
    -#endif
     
    -    return (AE_OK);
    +    return AE_OK;
    +#else
    +	return AE_ERROR;
    +#endif
     }
     
     
    @@ -1086,13 +1029,13 @@
         ACPI_INTEGER            Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
     	gPCIManager->write_pci_config(
    -		PciId->Bus, PciId->Device, PciId->Function, Register, Width/8, Value);
    +		PciId->Bus, PciId->Device, PciId->Function, Register, Width / 8, Value);
    +	return AE_OK;
    +#else
    +    return AE_ERROR;
     #endif
    -
    -    return (AE_OK);
     }
     
     /* TEMPORARY STUB FUNCTION */
    @@ -1102,7 +1045,6 @@
         ACPI_HANDLE             chandle,
         ACPI_PCI_ID             **PciId)
     {
    -
     }
     
     
    @@ -1126,27 +1068,29 @@
         UINT32                  *Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
    +	switch (Width) {
    +		case 8:
    +			*Value = gPCIManager->read_io_8(Address);
    +			break;
     
    -    switch (Width)
    -    {
    -    case 8:
    -        *Value = gPCIManager->read_io_8(Address);
    -        break;
    +		case 16:
    +			*Value = gPCIManager->read_io_16(Address);
    +			break;
     
    -    case 16:
    -        *Value = gPCIManager->read_io_16(Address);
    -        break;
    +		case 32:
    +			*Value = gPCIManager->read_io_32(Address);
    +			break;
     
    -    case 32:
    -        *Value = gPCIManager->read_io_32(Address);
    -        break;
    -    }
    +		default:
    +			dprintf("AcpiOsReadPort: unhandeld width: %u\n", Width);
    +			return AE_ERROR;
    +	}
     
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return (AE_OK);
     }
     
     
    @@ -1170,26 +1114,29 @@
         UINT32                  Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
    -
     	switch (Width) {
    -	case 8:
    -		gPCIManager->write_io_8(Address,Value);
    -		break;
    +		case 8:
    +			gPCIManager->write_io_8(Address, Value);
    +			break;
     
    -	case 16:
    -		gPCIManager->write_io_16(Address,Value);
    -		break;
    +		case 16:
    +			gPCIManager->write_io_16(Address,Value);
    +			break;
     
    -	case 32:
    -		gPCIManager->write_io_32(Address,Value);
    -		break;
    +		case 32:
    +			gPCIManager->write_io_32(Address,Value);
    +			break;
    +
    +		default:
    +			dprintf("AcpiOsWritePort: unhandeld width: %u\n", Width);
    +			return AE_ERROR;
     	}
     
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return (AE_OK);
     }
     
     
    @@ -1213,14 +1160,20 @@
         UINT32                  *Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
    +	addr_t pageOffset = Address % B_PAGE_SIZE;
    +	addr_t virtualAddress;
    +	status_t error = vm_get_physical_page(Address - pageOffset,
    +		&virtualAddress, 0);
    +	if (error != B_OK)
    +		return AE_ERROR;
     
    -    memcpy(Value, gPCIManager->ram_address(ACPI_TO_POINTER(Address)), Width/8);
    -
    +	memcpy(Value, (void*)(virtualAddress + pageOffset), Width / 8);
    +	vm_put_physical_page(virtualAddress);
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return (AE_OK);
     }
     
     
    @@ -1244,14 +1197,20 @@
         UINT32                  Value,
         UINT32                  Width)
     {
    -
     #ifdef _KERNEL_MODE
    +	addr_t pageOffset = Address % B_PAGE_SIZE;
    +	addr_t virtualAddress;
    +	status_t error = vm_get_physical_page(Address - pageOffset,
    +		&virtualAddress, 0);
    +	if (error != B_OK)
    +		return AE_ERROR;
     
    -    memcpy(gPCIManager->ram_address(ACPI_TO_POINTER(Address)), &Value, Width/8);
    -
    +	memcpy((void*)(virtualAddress + pageOffset), &Value, Width / 8);
    +	vm_put_physical_page(virtualAddress);
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return (AE_OK);
     }
     
     
    @@ -1280,27 +1239,21 @@
         UINT32                  Function,
         void                    *Info)
     {
    +	switch (Function) {
    +		case ACPI_SIGNAL_FATAL:
    +			if (Info != NULL)
    +				panic(Info);
    +			else
    +				panic("AcpiOsSignal: fatal");
    +        	break;
     
    -    switch (Function)
    -    {
    -    case ACPI_SIGNAL_FATAL:
    -        break;
    -
    -    case ACPI_SIGNAL_BREAKPOINT:
    -
    -        if (Info)
    -        {
    -            AcpiOsPrintf ("AcpiOsBreakpoint: %s ****\n", Info);
    -        }
    -        else
    -        {
    -            AcpiOsPrintf ("At AcpiOsBreakpoint ****\n");
    -        }
    -
    -        break;
    +		case ACPI_SIGNAL_BREAKPOINT:
    +			if (Info != NULL)
    +				AcpiOsPrintf ("AcpiOsBreakpoint: %s ****\n", Info);
    +			else
    +				AcpiOsPrintf ("At AcpiOsBreakpoint ****\n");
    +			break;
         }
     
    -
    -    return (AE_OK);
    +    return AE_OK;
     }
    -
    
    
    
    From mmlr at mail.berlios.de  Tue Oct 14 17:20:05 2008
    From: mmlr at mail.berlios.de (mmlr at mail.berlios.de)
    Date: Tue, 14 Oct 2008 17:20:05 +0200
    Subject: [Haiku-commits] r28091 -
    	haiku/trunk/src/add-ons/kernel/bus_managers/acpi
    Message-ID: <200810141520.m9EFK5St028519@sheep.berlios.de>
    
    Author: mmlr
    Date: 2008-10-14 17:20:03 +0200 (Tue, 14 Oct 2008)
    New Revision: 28091
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28091&view=rev
    
    Modified:
       haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
    Log:
    * More cleanup, made the coding style mostly Haiku compliant, replaced space
      by tab indents everywhere.
    * Remove special handling in map_physical_memory to handle page offset and
      length. Opposed to BeOS, Haiku does both automatically.
    
    
    Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
    ===================================================================
    --- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c	2008-10-14 15:17:58 UTC (rev 28090)
    +++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c	2008-10-14 15:20:03 UTC (rev 28091)
    @@ -127,8 +127,8 @@
     #include 
     
     #ifdef _KERNEL_MODE
    -#	include 
    -#	include 
    +#include 
    +#include 
     #include 
     extern pci_module_info *gPCIManager;
     #include 
    @@ -141,63 +141,61 @@
     #include "acparser.h"
     #include "acdebug.h"
     
    -#define _COMPONENT          ACPI_OS_SERVICES
    -        ACPI_MODULE_NAME    ("oshaiku")
    +#define _COMPONENT		ACPI_OS_SERVICES
    +ACPI_MODULE_NAME		("oshaiku")
     
    +extern FILE *			AcpiGbl_DebugFile;
    +FILE *					AcpiGbl_OutputFile;
     
    -extern FILE                    *AcpiGbl_DebugFile;
    -FILE                           *AcpiGbl_OutputFile;
    -
     static uint32 acpi_root = 0;
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsInitialize, AcpiOsTerminate
    + * FUNCTION:	AcpiOsInitialize, AcpiOsTerminate
      *
    - * PARAMETERS:  None
    + * PARAMETERS:	None
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Init and terminate.  Nothing to do.
    + * DESCRIPTION:	Init and terminate. Nothing to do.
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsInitialize (void)
    +AcpiOsInitialize(void)
     {
     #ifndef _KERNEL_MODE
    -    AcpiGbl_OutputFile = stdout;
    +	AcpiGbl_OutputFile = stdout;
     #else
     	AcpiGbl_OutputFile = NULL;
     #endif
    -
    -    return AE_OK;
    +	return AE_OK;
     }
     
     
     ACPI_STATUS
    -AcpiOsTerminate (void)
    +AcpiOsTerminate(void)
     {
    -    return AE_OK;
    +	return AE_OK;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsGetRootPointer
    + * FUNCTION:	AcpiOsGetRootPointer
      *
    - * PARAMETERS:  Flags   - Logical or physical addressing mode
    - *              Address - Where the address is returned
    + * PARAMETERS:	Flags	- Logical or physical addressing mode
    + *				Address	- Where the address is returned
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Gets the root pointer (RSDP)
    + * DESCRIPTION:	Gets the root pointer (RSDP)
      *
      *****************************************************************************/
     
     ACPI_PHYSICAL_ADDRESS
    -AcpiOsGetRootPointer (void)
    +AcpiOsGetRootPointer(void)
     {
     #ifdef _KERNEL_MODE
     	ACPI_SIZE address;
    @@ -217,115 +215,102 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsPredefinedOverride
    + * FUNCTION:	AcpiOsPredefinedOverride
      *
    - * PARAMETERS:  InitVal     - Initial value of the predefined object
    - *              NewVal      - The new value for the object
    + * PARAMETERS:	InitVal		- Initial value of the predefined object
    + *				NewVal		- The new value for the object
      *
    - * RETURN:      Status, pointer to value.  Null pointer returned if not
    - *              overriding.
    + * RETURN:		Status, pointer to value. Null pointer returned if not
    + *				overriding.
      *
    - * DESCRIPTION: Allow the OS to override predefined names
    + * DESCRIPTION:	Allow the OS to override predefined names
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsPredefinedOverride (
    -    const ACPI_PREDEFINED_NAMES *InitVal,
    -    ACPI_STRING                 *NewVal)
    +AcpiOsPredefinedOverride(const ACPI_PREDEFINED_NAMES *InitVal,
    +	ACPI_STRING *NewVal)
     {
    -    if (!InitVal || !NewVal)
    -    {
    -        return (AE_BAD_PARAMETER);
    -    }
    +	if (!InitVal || !NewVal)
    +		return AE_BAD_PARAMETER;
     
    -    *NewVal = NULL;
    -    return (AE_OK);
    +	*NewVal = NULL;
    +	return AE_OK;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsTableOverride
    + * FUNCTION:	AcpiOsTableOverride
      *
    - * PARAMETERS:  ExistingTable   - Header of current table (probably firmware)
    - *              NewTable        - Where an entire new table is returned.
    + * PARAMETERS:	ExistingTable	- Header of current table (probably firmware)
    + *				NewTable		- Where an entire new table is returned.
      *
    - * RETURN:      Status, pointer to new table.  Null pointer returned if no
    - *              table is available to override
    + * RETURN:		Status, pointer to new table. Null pointer returned if no
    + *				table is available to override
      *
    - * DESCRIPTION: Return a different version of a table if one is available
    + * DESCRIPTION:	Return a different version of a table if one is available
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsTableOverride (
    -    ACPI_TABLE_HEADER       *ExistingTable,
    -    ACPI_TABLE_HEADER       **NewTable)
    +AcpiOsTableOverride(ACPI_TABLE_HEADER *ExistingTable,
    +	ACPI_TABLE_HEADER **NewTable)
     {
    -    if (!ExistingTable || !NewTable)
    -    {
    -        return (AE_BAD_PARAMETER);
    -    }
    +	if (!ExistingTable || !NewTable)
    +		return AE_BAD_PARAMETER;
     
    -    *NewTable = NULL;
    +	*NewTable = NULL;
     
     #ifdef _ACPI_EXEC_APP
    +	/* This code exercises the table override mechanism in the core */
    +	if (!ACPI_STRNCMP(ExistingTable->Signature, DSDT_SIG, ACPI_NAME_SIZE)) {
    +		/* override DSDT with itself */
    +		*NewTable = AcpiGbl_DbTablePtr;
    +	}
     
    -    /* This code exercises the table override mechanism in the core */
    -
    -    if (!ACPI_STRNCMP (ExistingTable->Signature, DSDT_SIG, ACPI_NAME_SIZE))
    -    {
    -        /* override DSDT with itself */
    -
    -        *NewTable = AcpiGbl_DbTablePtr;
    -    }
    -    return (AE_OK);
    +	return AE_OK;
     #else
    -    return AE_NO_ACPI_TABLES;
    +	return AE_NO_ACPI_TABLES;
     #endif
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsReadable
    + * FUNCTION:	AcpiOsReadable
      *
    - * PARAMETERS:  Pointer             - Area to be verified
    - *              Length              - Size of area
    + * PARAMETERS:	Pointer				- Area to be verified
    + *				Length				- Size of area
      *
    - * RETURN:      TRUE if readable for entire length
    + * RETURN:		TRUE if readable for entire length
      *
    - * DESCRIPTION: Verify that a pointer is valid for reading
    + * DESCRIPTION:	Verify that a pointer is valid for reading
      *
      *****************************************************************************/
     
     BOOLEAN
    -AcpiOsReadable (
    -    void                    *Pointer,
    -    ACPI_SIZE               Length)
    +AcpiOsReadable(void *Pointer, ACPI_SIZE Length)
     {
    -    return TRUE;
    +	return TRUE;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsWritable
    + * FUNCTION:	AcpiOsWritable
      *
    - * PARAMETERS:  Pointer             - Area to be verified
    - *              Length              - Size of area
    + * PARAMETERS:	Pointer				- Area to be verified
    + *				Length				- Size of area
      *
    - * RETURN:      TRUE if writable for entire length
    + * RETURN:		TRUE if writable for entire length
      *
    - * DESCRIPTION: Verify that a pointer is valid for writing
    + * DESCRIPTION:	Verify that a pointer is valid for writing
      *
      *****************************************************************************/
     
     BOOLEAN
    -AcpiOsWritable (
    -    void                    *Pointer,
    -    ACPI_SIZE               Length)
    +AcpiOsWritable(void *Pointer, ACPI_SIZE Length)
     {
     	return TRUE;
     }
    @@ -333,96 +318,80 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsRedirectOutput
    + * FUNCTION:	AcpiOsRedirectOutput
      *
    - * PARAMETERS:  Destination         - An open file handle/pointer
    + * PARAMETERS:	Destination			- file handle/pointer
      *
    - * RETURN:      None
    + * RETURN:		None
      *
    - * DESCRIPTION: Causes redirect of AcpiOsPrintf and AcpiOsVprintf
    + * DESCRIPTION:	Causes redirect of AcpiOsPrintf and AcpiOsVprintf
      *
      *****************************************************************************/
     
     void
    -AcpiOsRedirectOutput (
    -    void                    *Destination)
    +AcpiOsRedirectOutput(void *Destination)
     {
    -    AcpiGbl_OutputFile = Destination;
    +	AcpiGbl_OutputFile = Destination;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsPrintf
    + * FUNCTION:	AcpiOsPrintf
      *
    - * PARAMETERS:  fmt, ...            Standard printf format
    + * PARAMETERS:	fmt, ...			Standard printf format
      *
    - * RETURN:      None
    + * RETURN:		None
      *
    - * DESCRIPTION: Formatted output
    + * DESCRIPTION:	Formatted output
      *
      *****************************************************************************/
     
     void ACPI_INTERNAL_VAR_XFACE
    -AcpiOsPrintf (
    -    const char              *Fmt,
    -    ...)
    +AcpiOsPrintf(const char *Fmt, ...)
     {
    -    va_list Args;
    -
    -    va_start(Args, Fmt);
    -    AcpiOsVprintf(Fmt, Args);
    -    va_end(Args);
    +	va_list Args;
    +	va_start(Args, Fmt);
    +	AcpiOsVprintf(Fmt, Args);
    +	va_end(Args);
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsVprintf
    + * FUNCTION:	AcpiOsVprintf
      *
    - * PARAMETERS:  fmt                 Standard printf format
    - *              args                Argument list
    + * PARAMETERS:	fmt					Standard printf format
    + *				args				Argument list
      *
    - * RETURN:      None
    + * RETURN:		None
      *
    - * DESCRIPTION: Formatted output with argument list pointer
    + * DESCRIPTION:	Formatted output with argument list pointer
      *
      *****************************************************************************/
     
     void
    -AcpiOsVprintf (
    -    const char              *Fmt,
    -    va_list                 Args)
    +AcpiOsVprintf(const char *Fmt, va_list Args)
     {
     #ifndef _KERNEL_MODE
    -    INT32                   Count = 0;
    -    UINT8                   Flags;
    +	INT32 Count = 0;
    +	UINT8 Flags;
     
    +	Flags = AcpiGbl_DbOutputFlags;
    +	if (Flags & ACPI_DB_REDIRECTABLE_OUTPUT) {
    +		/* Output is directable to either a file (if open) or the console */
    +		if (AcpiGbl_DebugFile) {
    +			/* Output file is open, send the output there */
    +			Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args);
    +		} else {
    +			/* No redirection, send output to console (once only!) */
    +			Flags |= ACPI_DB_CONSOLE_OUTPUT;
    +		}
    +	}
     
    -    Flags = AcpiGbl_DbOutputFlags;
    -    if (Flags & ACPI_DB_REDIRECTABLE_OUTPUT)
    -    {
    -        /* Output is directable to either a file (if open) or the console */
    +	if (Flags & ACPI_DB_CONSOLE_OUTPUT)
    +		Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args);
     
    -        if (AcpiGbl_DebugFile)
    -        {
    -            /* Output file is open, send the output there */
    -
    -            Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args);
    -        }
    -        else
    -        {
    -            /* No redirection, send output to console (once only!) */
    -
    -            Flags |= ACPI_DB_CONSOLE_OUTPUT;
    -        }
    -    }
    -
    -    if (Flags & ACPI_DB_CONSOLE_OUTPUT)
    -    {
    -        Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args);
    -    }
    -
     #else
     	static char outputBuffer[1024];
     	vsnprintf(outputBuffer, 1024, Fmt, Args);
    @@ -433,217 +402,192 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsGetLine
    + * FUNCTION:	AcpiOsGetLine
      *
    - * PARAMETERS:  fmt                 Standard printf format
    - *              args                Argument list
    + * PARAMETERS:	fmt					Standard printf format
    + *				args				Argument list
      *
    - * RETURN:      Actual bytes read
    + * RETURN:		Actual bytes read
      *
    - * DESCRIPTION: Formatted input with argument list pointer
    + * DESCRIPTION:	Formatted input with argument list pointer
      *
      *****************************************************************************/
     
     UINT32
    -AcpiOsGetLine (
    -    char                    *Buffer)
    +AcpiOsGetLine(char *Buffer)
     {
    -    UINT32                  i = 0;
    +	UINT32 i = 0;
     
     #ifndef _KERNEL_MODE
    -    UINT8                   Temp;
    +	UINT8 Temp;
     
    -    for (i = 0; ; i++)
    -    {
    -        scanf ("%1c", &Temp);
    -        if (!Temp || Temp == '\n')
    -        {
    -            break;
    -        }
    +	for (i = 0; ; i++) {
    +		scanf("%1c", &Temp);
    +		if (!Temp || Temp == '\n')
    +			break;
     
    -        Buffer [i] = Temp;
    -    }
    -
    -    /* Null terminate the buffer */
    -
    -    Buffer [i] = 0;
    -
    -    /* Return the number of bytes in the string */
    +		Buffer[i] = Temp;
    +	}
     #endif
     
    -    return (i);
    +	/* Null terminate the buffer */
    +	Buffer[i] = 0;
    +
    +	/* Return the number of bytes in the string */
    +	return i;
     }
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsMapMemory
    + * FUNCTION:	AcpiOsMapMemory
      *
    - * PARAMETERS:  where               Physical address of memory to be mapped
    - *              length              How much memory to map
    - *              there               Logical address of mapped memory
    + * PARAMETERS:	where				Physical address of memory to be mapped
    + *				length				How much memory to map
    + *				there				Logical address of mapped memory
      *
    - * RETURN:      Pointer to mapped memory.  Null on error.
    + * RETURN:		Pointer to mapped memory. Null on error.
      *
    - * DESCRIPTION: Map physical memory into caller's address space
    + * DESCRIPTION:	Map physical memory into caller's address space
      *
      *****************************************************************************/
     
    -#define ROUNDUP(size, blocksize) 	(((size) + (blocksize) - 1) & ~((blocksize) - 1))
    -
     void *
    -AcpiOsMapMemory (
    -    ACPI_PHYSICAL_ADDRESS   where,
    -    ACPI_SIZE	length)
    +AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS where, ACPI_SIZE length)
     {
     #ifdef _KERNEL_MODE
    -	uint32 page_offset = ACPI_TO_INTEGER(where) % B_PAGE_SIZE;
    -	void *map_base = ACPI_ADD_PTR(void,where,0L - page_offset);
    -	area_id area;
     	void *there;
    -
    -	area = map_physical_memory("acpi_physical_mem_area", map_base,
    -		ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_ADDRESS, 0,
    -		&there);
    +	area_id area = map_physical_memory("acpi_physical_mem_area", (void *)where,
    +		length, B_ANY_KERNEL_ADDRESS, 0, &there);
     	if (area < 0) {
    -		dprintf("ACPI: cannot map memory at %p, length %d\n", map_base, length);
    +		dprintf("ACPI: cannot map memory at 0x%08x, length %d\n", where, length);
     		return NULL;
     	}
     
    -	there += page_offset;
     	return there;
    +#else
    +	return NULL;
     #endif
    -
    -    return NULL;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsUnmapMemory
    + * FUNCTION:	AcpiOsUnmapMemory
      *
    - * PARAMETERS:  where               Logical address of memory to be unmapped
    - *              length              How much memory to unmap
    + * PARAMETERS:	where				Logical address of memory to be unmapped
    + *				length				How much memory to unmap
      *
    - * RETURN:      None.
    + * RETURN:		None.
      *
    - * DESCRIPTION: Delete a previously created mapping.  Where and Length must
    - *              correspond to a previous mapping exactly.
    + * DESCRIPTION:	Delete a previously created mapping. Where and Length must
    + *				correspond to a previous mapping exactly.
      *
      *****************************************************************************/
     
     void
    -AcpiOsUnmapMemory (
    -    void                    *where,
    -    ACPI_SIZE               length)
    +AcpiOsUnmapMemory(void *where, ACPI_SIZE length)
     {
     	delete_area(area_for(where));
    -	return;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsAllocate
    + * FUNCTION:	AcpiOsAllocate
      *
    - * PARAMETERS:  Size                Amount to allocate, in bytes
    + * PARAMETERS:	Size				Amount to allocate, in bytes
      *
    - * RETURN:      Pointer to the new allocation.  Null on error.
    + * RETURN:		Pointer to the new allocation. Null on error.
      *
    - * DESCRIPTION: Allocate memory.  Algorithm is dependent on the OS.
    + * DESCRIPTION:	Allocate memory. Algorithm is dependent on the OS.
      *
      *****************************************************************************/
     
     void *
    -AcpiOsAllocate (
    -    ACPI_SIZE               size)
    +AcpiOsAllocate(ACPI_SIZE size)
     {
    -	return (void *)malloc((size_t)size);
    +	return malloc((size_t)size);
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsFree
    + * FUNCTION:	AcpiOsFree
      *
    - * PARAMETERS:  mem                 Pointer to previously allocated memory
    + * PARAMETERS:	mem					Pointer to previously allocated memory
      *
    - * RETURN:      None.
    + * RETURN:		None.
      *
    - * DESCRIPTION: Free memory allocated via AcpiOsAllocate
    + * DESCRIPTION:	Free memory allocated via AcpiOsAllocate
      *
      *****************************************************************************/
     
     void
    -AcpiOsFree (
    -    void                    *mem)
    +AcpiOsFree(void *mem)
     {
    -    free(mem);
    +	free(mem);
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsCreateSemaphore
    + * FUNCTION:	AcpiOsCreateSemaphore
      *
    - * PARAMETERS:  InitialUnits        - Units to be assigned to the new semaphore
    - *              OutHandle           - Where a handle will be returned
    + * PARAMETERS:	InitialUnits		- Units to be assigned to the new semaphore
    + *				OutHandle			- Where a handle will be returned
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Create an OS semaphore
    + * DESCRIPTION:	Create an OS semaphore
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsCreateSemaphore (
    -    UINT32              MaxUnits,
    -    UINT32              InitialUnits,
    -    ACPI_HANDLE         *OutHandle)
    +AcpiOsCreateSemaphore(UINT32 MaxUnits, UINT32 InitialUnits,
    +	ACPI_HANDLE *OutHandle)
     {
    -    *OutHandle = (ACPI_HANDLE)create_sem(InitialUnits, "acpi_sem");
    -    return AE_OK;
    +	*OutHandle = (ACPI_HANDLE)create_sem(InitialUnits, "acpi_sem");
    +	if (*OutHandle < B_OK)
    +		return AE_ERROR;
    +	return AE_OK;
     }
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsDeleteSemaphore
    + * FUNCTION:	AcpiOsDeleteSemaphore
      *
    - * PARAMETERS:  Handle              - Handle returned by AcpiOsCreateSemaphore
    + * PARAMETERS:	Handle				- Handle returned by AcpiOsCreateSemaphore
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Delete an OS semaphore
    + * DESCRIPTION:	Delete an OS semaphore
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsDeleteSemaphore (
    -    ACPI_HANDLE         Handle)
    +AcpiOsDeleteSemaphore(ACPI_HANDLE Handle)
     {
     	delete_sem((sem_id)Handle);
    -    return AE_OK;
    +	return AE_OK;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsWaitSemaphore
    + * FUNCTION:	AcpiOsWaitSemaphore
      *
    - * PARAMETERS:  Handle              - Handle returned by AcpiOsCreateSemaphore
    - *              Units               - How many units to wait for
    - *              Timeout             - How long to wait
    + * PARAMETERS:	Handle				- Handle returned by AcpiOsCreateSemaphore
    + *				Units				- How many units to wait for
    + *				Timeout				- How long to wait (in milliseconds)
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Wait for units
    + * DESCRIPTION:	Wait for units
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsWaitSemaphore (
    -    ACPI_HANDLE         Handle,
    -    UINT32              Units,
    -    UINT16              Timeout)
    +AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout)
     {
     	if (Timeout != ACPI_WAIT_FOREVER) {
     		switch (acquire_sem_etc((sem_id)Handle, Units, B_RELATIVE_TIMEOUT,
    @@ -666,115 +610,106 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsSignalSemaphore
    + * FUNCTION:	AcpiOsSignalSemaphore
      *
    - * PARAMETERS:  Handle              - Handle returned by AcpiOsCreateSemaphore
    - *              Units               - Number of units to send
    + * PARAMETERS:	Handle				- Handle returned by AcpiOsCreateSemaphore
    + *				Units				- Number of units to send
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Send units
    + * DESCRIPTION:	Send units
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsSignalSemaphore (
    -    ACPI_HANDLE         Handle,
    -    UINT32              Units)
    +AcpiOsSignalSemaphore(ACPI_HANDLE Handle, UINT32 Units)
     {
     	release_sem_etc((sem_id)Handle, Units, 0);
    -    return AE_OK;
    +	return AE_OK;
     }
     
     
     ACPI_STATUS
    -AcpiOsCreateLock (
    -    ACPI_HANDLE             *OutHandle)
    +AcpiOsCreateLock(ACPI_HANDLE *OutHandle)
     {
    -    *OutHandle = (ACPI_HANDLE)malloc(sizeof(spinlock));
    -    if (OutHandle == NULL)
    -    	return AE_NO_MEMORY;
    +	*OutHandle = (ACPI_HANDLE)malloc(sizeof(spinlock));
    +	if (OutHandle == NULL)
    +		return AE_NO_MEMORY;
     
    -    *((spinlock *)(*OutHandle)) = 0;
    -    return AE_OK;
    +	*((spinlock *)(*OutHandle)) = 0;
    +	return AE_OK;
     }
     
     void
    -AcpiOsDeleteLock (
    -    ACPI_HANDLE             Handle)
    +AcpiOsDeleteLock(ACPI_HANDLE Handle)
     {
     	free(Handle);
     }
     
     
     ACPI_CPU_FLAGS
    -AcpiOsAcquireLock (
    -    ACPI_HANDLE             Handle)
    +AcpiOsAcquireLock(ACPI_HANDLE Handle)
     {
     	cpu_status cpu = disable_interrupts();
    -    acquire_spinlock((spinlock *)Handle);
    +	acquire_spinlock((spinlock *)Handle);
     	return cpu;
     }
     
     
     void
    -AcpiOsReleaseLock (
    -    ACPI_HANDLE             Handle,
    -    ACPI_CPU_FLAGS          Flags)
    +AcpiOsReleaseLock(ACPI_HANDLE Handle, ACPI_CPU_FLAGS Flags)
     {
    -    release_spinlock((spinlock *)Handle);
    +	release_spinlock((spinlock *)Handle);
     	restore_interrupts((cpu_status)Flags);
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsInstallInterruptHandler
    + * FUNCTION:	AcpiOsInstallInterruptHandler
      *
    - * PARAMETERS:  InterruptNumber     Level handler should respond to.
    - *              Isr                 Address of the ACPI interrupt handler
    - *              ExceptPtr           Where status is returned
    + * PARAMETERS:	InterruptNumber		Level handler should respond to.
    + *				Isr					Address of the ACPI interrupt handler
    + *				ExceptPtr			Where status is returned
      *
    - * RETURN:      Handle to the newly installed handler.
    + * RETURN:		Handle to the newly installed handler.
      *
    - * DESCRIPTION: Install an interrupt handler.  Used to install the ACPI
    - *              OS-independent handler.
    + * DESCRIPTION:	Install an interrupt handler. Used to install the ACPI
    + *				OS-independent handler.
      *
      *****************************************************************************/
     
     UINT32
    -AcpiOsInstallInterruptHandler (
    -    UINT32                  InterruptNumber,
    -    ACPI_OSD_HANDLER        ServiceRoutine,
    -    void                    *Context)
    +AcpiOsInstallInterruptHandler(UINT32 InterruptNumber,
    +	ACPI_OSD_HANDLER ServiceRoutine, void *Context)
     {
     #ifdef _KERNEL_MODE
     	install_io_interrupt_handler(InterruptNumber,
     		(interrupt_handler)ServiceRoutine, Context, 0);
    -		/* It so happens that the Haiku and ACPI-CA interrupt handler routines
    -		   return the same values with the same meanings */
    +		/*	It so happens that the Haiku and ACPI-CA interrupt handler routines
    +			return the same values with the same meanings */
    +	return AE_OK;
    +#else
    +	return AE_ERROR;
     #endif
    -
    -    return AE_OK;
     }
     
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsRemoveInterruptHandler
    + * FUNCTION:	AcpiOsRemoveInterruptHandler
      *
    - * PARAMETERS:  Handle              Returned when handler was installed
    + * PARAMETERS:	Handle				Returned when handler was installed
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Uninstalls an interrupt handler.
    + * DESCRIPTION:	Uninstalls an interrupt handler.
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsRemoveInterruptHandler (
    -    UINT32                  InterruptNumber,
    -    ACPI_OSD_HANDLER        ServiceRoutine)
    +AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber,
    +	ACPI_OSD_HANDLER ServiceRoutine)
     {
     #ifdef _KERNEL_MODE
     	panic("AcpiOsRemoveInterruptHandler()\n");
    @@ -791,23 +726,21 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsExecute
    + * FUNCTION:	AcpiOsExecute
      *
    - * PARAMETERS:  Type            - Type of execution
    - *              Function        - Address of the function to execute
    - *              Context         - Passed as a parameter to the function
    + * PARAMETERS:	Type			- Type of execution
    + *				Function		- Address of the function to execute
    + *				Context			- Passed as a parameter to the function
      *
    - * RETURN:      Status.
    + * RETURN:		Status.
      *
    - * DESCRIPTION: Execute a new thread
    + * DESCRIPTION:	Execute a new thread
      *
      *****************************************************************************/
     
     ACPI_STATUS
    -AcpiOsExecute (
    -    ACPI_EXECUTE_TYPE       Type,
    -    ACPI_OSD_EXEC_CALLBACK  Function,
    -    void                    *Context)
    +AcpiOsExecute(ACPI_EXECUTE_TYPE Type, ACPI_OSD_EXEC_CALLBACK Function,
    +	void *Context)
     {
     	switch (Type) {
     		case OSL_GLOBAL_LOCK_HANDLER:
    @@ -828,53 +761,43 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsBreakpoint
    + * FUNCTION:	AcpiOsBreakpoint
      *
    - * PARAMETERS:  Msg                 Message to print
    + * PARAMETERS:	Msg					Message to print
      *
    - * RETURN:      Status
    + * RETURN:		Status
      *
    - * DESCRIPTION: Print a message and break to the debugger.
    + * DESCRIPTION:	Print a message and break to the debugger.
      *
      *****************************************************************************/
     
     #if 0
     ACPI_STATUS
    -AcpiOsBreakpoint (
    -    char                    *Msg)
    +AcpiOsBreakpoint(char *Msg)
     {
    +	if (Msg != NULL)
    +		kernel_debugger ("AcpiOsBreakpoint: %s ****\n", Msg);
    +	else
    +		kernel_debugger ("At AcpiOsBreakpoint ****\n");
     
    -    /* Print the message and do an INT 3 */
    -
    -    if (Msg)
    -    {
    -        kernel_debugger ("AcpiOsBreakpoint: %s ****\n", Msg);
    -    }
    -    else
    -    {
    -        kernel_debugger ("At AcpiOsBreakpoint ****\n");
    -    }
    -
    -
    -    return AE_OK;
    +	return AE_OK;
     }
     #endif
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsStall
    + * FUNCTION:	AcpiOsStall
      *
    - * PARAMETERS:  microseconds        To sleep
    + * PARAMETERS:	microseconds		To sleep
      *
    - * RETURN:      Blocks until sleep is completed.
    + * RETURN:		Blocks until sleep is completed.
      *
    - * DESCRIPTION: Sleep at microsecond granularity
    + * DESCRIPTION:	Sleep at microsecond granularity
      *
      *****************************************************************************/
     
     void
    -AcpiOsStall (
    -    UINT32                  microseconds)
    +AcpiOsStall(UINT32 microseconds)
     {
     	spin(microseconds);
     }
    @@ -882,32 +805,31 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsSleep
    + * FUNCTION:	AcpiOsSleep
      *
    - * PARAMETERS:  milliseconds        To sleep
    + * PARAMETERS:	milliseconds		To sleep
      *
    - * RETURN:      Blocks until sleep is completed.
    + * RETURN:		Blocks until sleep is completed.
      *
    - * DESCRIPTION: Sleep at millisecond granularity
    + * DESCRIPTION:	Sleep at millisecond granularity
      *
      *****************************************************************************/
     
     void
    -AcpiOsSleep (
    -    ACPI_INTEGER            milliseconds)
    +AcpiOsSleep(ACPI_INTEGER milliseconds)
     {
    -    snooze(milliseconds * 1000);    /* Sleep for micro seconds */
    +	snooze(milliseconds * 1000); /* Sleep for micro seconds */
     }
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsGetTimer
    + * FUNCTION:	AcpiOsGetTimer
      *
    - * PARAMETERS:  None
    + * PARAMETERS:	None
      *
    - * RETURN:      Current time in 100 nanosecond units
    + * RETURN:		Current time in 100 nanosecond units
      *
    - * DESCRIPTION: Get the current system time
    + * DESCRIPTION:	Get the current system time
      *
      *****************************************************************************/
     
    @@ -920,72 +842,66 @@
     
     /******************************************************************************
      *
    - * FUNCTION:    AcpiOsValidateInterface
    + * FUNCTION:	AcpiOsValidateInterface
      *
    - * PARAMETERS:  Interface           - Requested interface to be validated
    + * PARAMETERS:	Interface			- Requested interface to be validated
      *
    - * RETURN:      AE_OK if interface is supported, AE_SUPPORT otherwise
    + * RETURN:		AE_OK if interface is supported, AE_SUPPORT otherwise
      *
    - * DESCRIPTION: Match an interface string to the interfaces supported by the
    - *              host. Strings originate from an AML call to the _OSI method.
    + * DESCRIPTION:	Match an interface string to the interfaces supported by the
    + *				host. Strings originate from an AML call to the _OSI method.
      *
      *****************************************************************************/
     
    
    [... truncated: 320 lines follow ...]
    
    
    From alex at zappotek.com  Tue Oct 14 17:24:33 2008
    From: alex at zappotek.com (Alexandre Deckner)
    Date: Tue, 14 Oct 2008 17:24:33 +0200
    Subject: [Haiku-commits] r28089 - haiku/trunk/src/kits/tracker
    In-Reply-To: <20081014150020.43340@gmx.net>
    References: <200810141446.m9EEkmxH025289@sheep.berlios.de>	<894b9700810140753v5a94c3e2ga3332e2b02c993bb@mail.gmail.com>
    	<20081014150020.43340@gmx.net>
    Message-ID: <48F4B9B1.9050504@zappotek.com>
    
    Stephan Assmus wrote:
    > Hi,
    >
    > Von: "Stefano Ceccherini" 
    >   
    >>
    >> Was this change intentional ? I guess it was, just curious why you did
    >> that.
    >>     
    >
    > If I may answer for Alexandre... the BSlowContextMenu is aware when it is already showing. Otherwise a new subclass would have had to be written. As far as I am aware, it just means code reuse without any other side effects.
    >
    >   
    Exactly, although i wouldn't bet my life on the "no side effect" 
    assertion :-)
    
    Regards,
    Alex
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 18:16:21 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 18:16:21 +0200
    Subject: [Haiku-commits] r28092 - in haiku/trunk: data/artwork/icons
    	src/tests/servers/app/playground
    Message-ID: <200810141616.m9EGGLGK002119@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 18:16:20 +0200 (Tue, 14 Oct 2008)
    New Revision: 28092
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28092&view=rev
    
    Added:
       haiku/trunk/data/artwork/icons/App_Playground
       haiku/trunk/src/tests/servers/app/playground/Playground.rdef
    Modified:
       haiku/trunk/src/tests/servers/app/playground/Jamfile
       haiku/trunk/src/tests/servers/app/playground/main.cpp
    Log:
    Created an icon for Playground.
    
    
    Added: haiku/trunk/data/artwork/icons/App_Playground
    ===================================================================
    (Binary files differ)
    
    
    Property changes on: haiku/trunk/data/artwork/icons/App_Playground
    ___________________________________________________________________
    Name: svn:mime-type
       + application/octet-stream
    
    Modified: haiku/trunk/src/tests/servers/app/playground/Jamfile
    ===================================================================
    --- haiku/trunk/src/tests/servers/app/playground/Jamfile	2008-10-14 15:20:03 UTC (rev 28091)
    +++ haiku/trunk/src/tests/servers/app/playground/Jamfile	2008-10-14 16:16:20 UTC (rev 28092)
    @@ -11,8 +11,8 @@
     	ObjectView.cpp
     	ObjectWindow.cpp
     	States.cpp
    -#	StatusView.cpp
     	: be
    +	: Playground.rdef
     ;
     
     if ( $(TARGET_PLATFORM) = libbe_test ) {
    
    Added: haiku/trunk/src/tests/servers/app/playground/Playground.rdef
    ===================================================================
    --- haiku/trunk/src/tests/servers/app/playground/Playground.rdef	2008-10-14 15:20:03 UTC (rev 28091)
    +++ haiku/trunk/src/tests/servers/app/playground/Playground.rdef	2008-10-14 16:16:20 UTC (rev 28092)
    @@ -0,0 +1,50 @@
    +
    +resource app_signature "application/x-vnd.Haiku-Playground";
    +
    +resource app_flags B_SINGLE_LAUNCH;
    +
    +resource app_version {
    +	major  = 1,
    +	middle = 1,
    +	minor  = 0,
    +
    +	variety = B_APPV_ALPHA,
    +	internal = 1,
    +
    +	short_info = "Playground",
    +	long_info = "Playground ?2005-2008 Haiku"
    +};
    +
    +resource vector_icon {
    +	$"6E6369660D050104016402001606B94F1F3C4E01BF4B51BC5D6A4B5EA14AB01B"
    +	$"00BDCFA85CB01DFFA086FFC8020006023B40000000000000003F900048600045"
    +	$"800000D63F3FFFC62020020006023B8D7638117FBBD7D93F4CED4AB232461572"
    +	$"00F12D2DFFFF59590201020238DAF8B7346536EA7F389921496C1747961800E8"
    +	$"8A8A60FFE88A8A00020102023851CDBC1C6C38DF7535281A48A6DC490FEE00BE"
    +	$"434360FFE88A8A00020102023B54A0BB1C46380893382D6A46A7D64AAF6200B2"
    +	$"131360FFE88A8A0003B6404003F56A6A03FF7C7C020106033A80000000000000"
    +	$"003A80004AC0004B400000FFFFFF76C0EEFFFF90D9FF020106033A8000000000"
    +	$"0000003A80004AC0004B40000067CBFF7630B7FDFF069FEE0F060F62FF4F0A24"
    +	$"562C385D6042604260466050544C565452604C60C5A860485C4460465C445A43"
    +	$"5A4356414E4050404E4044424A442C5424060AFEBD09244A264624482844303A"
    +	$"2E42BA14BA8B4026342840262A3A2E3A2E34322F4635412F46264E5624550003"
    +	$"264726472845303B2E43BA14BAF14027342940270609EEEB03264E2E542A5232"
    +	$"5636563E4E3E4E44484A3244384A324E2E402A3A2E3A2E34322F4635412F4606"
    +	$"0CFEE9AB3650384B364D3A49403F3E4542394E28432B4E28474D484C304A324A"
    +	$"3244383E4E44483E4EBC8F54385E365D0003384C384C3A4A40403E46423A4E29"
    +	$"432C4E290802402A4E2E04032E284F2E542A523256365608023F374D3C08023F"
    +	$"3F4D440206C6E3C5BC4F4EC6E3C5BCC6E3C5BCC6E3C5BCC559C4DFC28CC6F4C3"
    +	$"68C56BC1AFC87EC3C4CB4BC23BCA6FC3C4CB4BC3C4CB4BC3C4CB4B475B495347"
    +	$"564B500206C6E3C5BC4F4EC6E3C5BCC6E3C5BCC6E3C5BC51514E5650524C5AC3"
    +	$"C4CB4B4B5BC3C4CB4BC3C4CB4BC3C4CB4B475B495347564B500204C6E3C5BC55"
    +	$"5151514E5650524C5AC3C4CB4B4B5B4D5F5359515DC7F6C86D0204C6E3C5BCC8"
    +	$"6CC69855515359C7F6C86D515DC3C4CB4B4D5FC54ECC28C81BCA13C73FCB9CC8"
    +	$"F8C8890204C6E3C5BCC86CC698C559C4DFC28CC6F4C368C56BC1AFC87EC3C4CB"
    +	$"4BC23BCA6FC54ECC28C81BCA13C73FCB9CC8F8C889110A010100000A00010110"
    +	$"01178402040A030101000A000208091001178620040A08020809100117822004"
    +	$"0A000207061001178402040A020103000A050103000A060103000A070103000A"
    +	$"0002040E1001178402040A040104000A0901021001178100040A0A0105100117"
    +	$"8100040A01010E024000000000000000003E80004500004928000A0B020B0D00"
    +	$"0A0C020A0C00"
    +};
    +
    
    Modified: haiku/trunk/src/tests/servers/app/playground/main.cpp
    ===================================================================
    --- haiku/trunk/src/tests/servers/app/playground/main.cpp	2008-10-14 15:20:03 UTC (rev 28091)
    +++ haiku/trunk/src/tests/servers/app/playground/main.cpp	2008-10-14 16:16:20 UTC (rev 28092)
    @@ -10,11 +10,8 @@
     int
     main(int argc, char** argv)
     {
    -	BApplication* app = new BApplication("application/x.vnd-Haiku.Objects");
    +	BApplication* app = new BApplication("application/x.vnd-Haiku.Playground");
     
    -	BRect a(LONG_MAX, LONG_MAX, LONG_MIN, LONG_MIN);
    -	a.PrintToStream();
    -
     	BRect frame(50.0, 50.0, 600.0, 400.0);
     	BWindow* window = new ObjectWindow(frame, "Playground");
     
    
    
    
    From axeld at mail.berlios.de  Tue Oct 14 19:14:32 2008
    From: axeld at mail.berlios.de (axeld at BerliOS)
    Date: Tue, 14 Oct 2008 19:14:32 +0200
    Subject: [Haiku-commits] r28093 - haiku/trunk/src/tools/vmdkimage
    Message-ID: <200810141714.m9EHEW4m024292@sheep.berlios.de>
    
    Author: axeld
    Date: 2008-10-14 19:14:29 +0200 (Tue, 14 Oct 2008)
    New Revision: 28093
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28093&view=rev
    
    Modified:
       haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp
       haiku/trunk/src/tools/vmdkimage/vmdkimage.h
    Log:
    * Added assigning an UUID to the image written; you can either pass one via the
      new '-u' option, or let it generate one automatically (by building a hash over
      the full path of the image).
    * This is allows you to use our images in VirtualBox without having to readd
      the hard drive with every rebuild.
    * Enlarged the description section to 1024 bytes - this also prevents VirtualBox
      from writing data beyond the description size.
    * Added '-d' option to just dump info about an existing vmdk image file (only
      monolithic mode is supported, though).
    
    
    Modified: haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp
    ===================================================================
    --- haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp	2008-10-14 16:16:20 UTC (rev 28092)
    +++ haiku/trunk/src/tools/vmdkimage/vmdkimage.cpp	2008-10-14 17:14:29 UTC (rev 28093)
    @@ -2,16 +2,18 @@
      * Copyright 2007, Marcus Overhagen. All Rights Reserved.
      * Distributed under the terms of the MIT License.
      */
    -#include 
    -#include 
    +
    +#include 
     #include 
    -#include 
    +#include 
    +#include 
     #include 
    -#include 
    -#include 
     #include 
     #include 
     #include 
    +#include 
    +#include 
    +#include 
     
     #include "vmdkimage.h"
     
    @@ -22,25 +24,130 @@
     	printf("\n");
     	printf("vmdkimage\n");
     	printf("\n");
    -	printf("usage: vmdkimage -i  -h  [-c] [-H] [-f] "
    -		"\n");
    +	printf("usage: vmdkimage -i  -h  [-c] [-H] "
    +		"[-u ] [-f] \n");
    +	printf("   or: vmdkimage -d \n");
    +	printf("       -d, --dump         dumps info for the image file\n");
     	printf("       -i, --imagesize    size of raw partition image file\n");
     	printf("       -h, --headersize   size of the vmdk header to write\n");
     	printf("       -f, --file         the raw partition image file\n");
    +	printf("       -u, --uuid         UUID for the image instead of a computed "
    +		"one\n");
     	printf("       -c, --clear-image  set the image content to zero\n");
     	printf("       -H, --header-only  write only the header\n");
     	exit(EXIT_FAILURE);
     }
     
     
    +static void
    +dump_image_info(const char *filename)
    +{
    +	int image = open(filename, O_RDONLY);
    +	if (image < 0) {
    +		fprintf(stderr, "Error: couldn't open file %s (%s)\n", filename,
    +			strerror(errno));
    +		exit(EXIT_FAILURE);
    +	}
    +
    +	SparseExtentHeader header;
    +	if (read(image, &header, 512) != 512) {
    +		fprintf(stderr, "Error: couldn't read header: %s\n", strerror(errno));
    +		exit(EXIT_FAILURE);
    +	}
    +
    +	if (header.magicNumber != SPARSE_MAGICNUMBER) {
    +		fprintf(stderr, "Error: invalid header magic.\n");
    +		exit(EXIT_FAILURE);
    +	}
    +
    +	printf("--------------- Header ---------------\n");
    +	printf("  version:             %d\n", (int)header.version);
    +	printf("  flags:               %d\n", (int)header.flags);
    +	printf("  capacity:            %d\n", (int)header.capacity);
    +	printf("  grainSize:           %lld\n", header.grainSize);
    +	printf("  descriptorOffset:    %lld\n", header.descriptorOffset);
    +	printf("  descriptorSize:      %lld\n", header.descriptorSize);
    +	printf("  numGTEsPerGT:        %u\n", (unsigned int)header.numGTEsPerGT);
    +	printf("  rgdOffset:           %lld\n", header.rgdOffset);
    +	printf("  gdOffset:            %lld\n", header.gdOffset);
    +	printf("  overHead:            %lld\n", header.overHead);
    +	printf("  uncleanShutdown:     %s\n",
    +		header.uncleanShutdown ? "yes" : "no");
    +	printf("  singleEndLineChar:   '%c'\n", header.singleEndLineChar);
    +	printf("  nonEndLineChar:      '%c'\n", header.nonEndLineChar);
    +	printf("  doubleEndLineChar1:  '%c'\n", header.doubleEndLineChar1);
    +	printf("  doubleEndLineChar2:  '%c'\n", header.doubleEndLineChar2);
    +
    +	if (header.descriptorOffset != 0) {
    +		printf("\n--------------- Descriptor ---------------\n");
    +		size_t descriptorSize = header.descriptorSize * 512 * 2;
    +		char *descriptor = (char *)malloc(descriptorSize);
    +		if (descriptor == NULL) {
    +			fprintf(stderr, "Error: cannot allocate descriptor size %u.\n",
    +				(unsigned int)descriptorSize);
    +			exit(EXIT_FAILURE);
    +		}
    +
    +		if (pread(image, descriptor, descriptorSize,
    +				header.descriptorOffset * 512) != (ssize_t)descriptorSize) {
    +			fprintf(stderr, "Error: couldn't read header: %s\n",
    +				strerror(errno));
    +			exit(EXIT_FAILURE);
    +		}
    +
    +		puts(descriptor);
    +		putchar('\n');
    +		free(descriptor);
    +	}
    +
    +	close(image);
    +}
    +
    +
    +static uint64
    +hash_string(const char *string)
    +{
    +	uint64 hash = 0;
    +	char c;
    +
    +	while ((c = *string++) != 0) {
    +		hash = c + (hash << 6) + (hash << 16) - hash;
    +	}
    +
    +	return hash;
    +}
    +
    +
    +static bool
    +is_valid_uuid(const char *uuid)
    +{
    +	const char *kHex = "0123456789abcdef";
    +	for (int i = 0; i < 36; i++) {
    +		if (!uuid[i])
    +			return false;
    +		if (i == 8 || i == 13 || i == 18 || i == 23) {
    +			if (uuid[i] != '-')
    +				return false;
    +			continue;
    +		}
    +		if (strchr(kHex, uuid[i]) == NULL)
    +			return false;
    +	}
    +
    +	return uuid[36] == '\0';
    +}
    +
    +
     int
     main(int argc, char *argv[])
     {
     	uint64 headersize = 0;
     	uint64 imagesize = 0;
     	const char *file = NULL;
    +	const char *uuid = NULL;
     	bool headerOnly = false;
     	bool clearImage = false;
    +	bool dumpOnly = false;
     
     	if (sizeof(SparseExtentHeader) != 512) {
     		fprintf(stderr, "compilation error: struct size is %u byte\n",
    @@ -50,22 +157,27 @@
     
     	while (1) {
     		int c;
    -		static struct option long_options[] =
    -		{
    +		static struct option long_options[] = {
    +			{"dump", no_argument, 0, 'd'},
     		 	{"headersize", required_argument, 0, 'h'},
     			{"imagesize", required_argument, 0, 'i'},
     			{"file", required_argument, 0, 'f'},
    +			{"uuid", required_argument, 0, 'u'},
     			{"clear-image", no_argument, 0, 'c'},
     			{"header-only", no_argument, 0, 'H'},
     			{0, 0, 0, 0}
     		};
     
     		opterr = 0; /* don't print errors */
    -		c = getopt_long(argc, argv, "h:i:cHf:", long_options, NULL);
    +		c = getopt_long(argc, argv, "dh:i:u:cHf:", long_options, NULL);
     		if (c == -1)
     			break;
     
     		switch (c) {
    +			case 'd':
    +				dumpOnly = true;
    +				break;
    +
     			case 'h':
     				headersize = strtoull(optarg, NULL, 10);
     				if (strchr(optarg, 'G') || strchr(optarg, 'g'))
    @@ -86,6 +198,15 @@
     					imagesize *= 1024;
     				break;
     
    +			case 'u':
    +				uuid = optarg;
    +				if (!is_valid_uuid(uuid)) {
    +					fprintf(stderr, "Error: invalid UUID given (use "
    +						"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format only).\n");
    +					exit(EXIT_FAILURE);
    +				}
    +				break;
    +
     			case 'f':
     				file = optarg;
     				break;
    @@ -106,10 +227,15 @@
     	if (file == NULL && optind == argc - 1)
     		file = argv[optind];
     
    +	if (dumpOnly && file != NULL) {
    +		dump_image_info(file);
    +		return 0;
    +	}
    +
     	if (!headersize || !imagesize || !file)
     		print_usage();
     
    -	char desc[512];
    +	char desc[1024];
     	SparseExtentHeader header;
     
     	if (headersize < sizeof(desc) + sizeof(header)) {
    @@ -170,7 +296,7 @@
     	header.capacity = 0;
     	header.grainSize = 16;
     	header.descriptorOffset = 1;
    -	header.descriptorSize = sizeof(desc) / 512;
    +	header.descriptorSize = (sizeof(desc) + 511) / 512;
     	header.numGTEsPerGT = 512;
     	header.rgdOffset = 0;
     	header.gdOffset = 0;
    @@ -181,6 +307,29 @@
     	header.doubleEndLineChar1 = '\r';
     	header.doubleEndLineChar2 = '\n';
     
    +	// Generate UUID for the image by hashing its full path
    +	uint64 uuid1 = 0, uuid2 = 0, uuid3 = 0, uuid4 = 0, uuid5 = 0;
    +	if (uuid == NULL) {
    +		char fullPath[PATH_MAX + 1];
    +		strcpy(fullPath, "Haiku");
    +
    +		if (realpath(file, fullPath + 5) == NULL)
    +			strncpy(fullPath, file, sizeof(fullPath));
    +
    +		for (size_t i = strlen(fullPath); i < sizeof(fullPath) - 1; i++) {
    +			// fill rest with some numbers
    +			fullPath[i] = i % 10 + '0';
    +		}
    +		fullPath[sizeof(fullPath) - 1] = '\0';
    +
    +		uuid1 = hash_string(fullPath);
    +		uuid2 = hash_string(fullPath) + 5;
    +		uuid3 = hash_string(fullPath) + 13;
    +		uuid4 = hash_string(fullPath) + 19;
    +		uuid5 = hash_string(fullPath) + 29;
    +	}
    +
    +	// Create embedded descriptor
     	strcat(desc,
     		"# Disk Descriptor File\n"
     		"version=1\n"
    @@ -201,19 +350,27 @@
     		"ddb.geometry.cylinders = \"%llu\"\n",
     		sectors, heads, cylinders);
     
    +	if (uuid == NULL) {
    +		sprintf(desc + strlen(desc),
    +			"ddb.uuid.image=\"%08llx-%04llx-%04llx-%04llx-%012llx\"\n",
    +			uuid1 & 0xffffffff, uuid2 & 0xffff, uuid3 & 0xffff, uuid4 & 0xffff,
    +			uuid5 & 0xffffffffffffLL);
    +	} else
    +		sprintf(desc + strlen(desc), "ddb.uuid.image=\"%s\"\n", uuid);
    +
     	int fd = open(file, O_RDWR | O_CREAT, 0666);
     	if (fd < 0) {
     		fprintf(stderr, "Error: couldn't open file %s (%s)\n", file,
     			strerror(errno));
     		exit(EXIT_FAILURE);
     	}
    -	if (sizeof(header) != write(fd, &header, sizeof(header)))
    +	if (write(fd, &header, sizeof(header)) != sizeof(header))
     		goto write_err;
     
    -	if (sizeof(desc) != write(fd, desc, sizeof(desc)))
    +	if (write(fd, desc, sizeof(desc)) != sizeof(desc))
     		goto write_err;
     
    -	if (headersize - 1 != (uint64)lseek(fd, headersize - 1, SEEK_SET))
    +	if ((uint64)lseek(fd, headersize - 1, SEEK_SET) != headersize - 1)
     		goto write_err;
     
     	if (1 != write(fd, "", 1))
    
    Modified: haiku/trunk/src/tools/vmdkimage/vmdkimage.h
    ===================================================================
    --- haiku/trunk/src/tools/vmdkimage/vmdkimage.h	2008-10-14 16:16:20 UTC (rev 28092)
    +++ haiku/trunk/src/tools/vmdkimage/vmdkimage.h	2008-10-14 17:14:29 UTC (rev 28093)
    @@ -6,15 +6,14 @@
     #define _VMDKIMAGE_H
     
     typedef unsigned char uint8;
    -typedef unsigned int  uint32;
    +typedef unsigned int uint32;
     typedef unsigned long long uint64;
     
     
     typedef uint64 SectorType;
     typedef uint8 Bool;
     
    -struct SparseExtentHeader
    -{
    +struct SparseExtentHeader {
     	uint32            magicNumber;
     	uint32            version;
     	uint32            flags;
    @@ -36,4 +35,4 @@
     
     #define SPARSE_MAGICNUMBER 0x564d444b /* 'V' 'M' 'D' 'K' */
     
    -#endif
    +#endif	// _VMDKIMAGE_H
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 19:23:01 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 19:23:01 +0200
    Subject: [Haiku-commits] r28094 - haiku/trunk/src/apps/launchbox
    Message-ID: <200810141723.m9EHN110000516@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 19:23:00 +0200 (Tue, 14 Oct 2008)
    New Revision: 28094
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28094&view=rev
    
    Modified:
       haiku/trunk/src/apps/launchbox/PadView.cpp
    Log:
    * Reworded MouseDown() to avoid all these nested conditions...
    
    
    Modified: haiku/trunk/src/apps/launchbox/PadView.cpp
    ===================================================================
    --- haiku/trunk/src/apps/launchbox/PadView.cpp	2008-10-14 17:14:29 UTC (rev 28093)
    +++ haiku/trunk/src/apps/launchbox/PadView.cpp	2008-10-14 17:23:00 UTC (rev 28094)
    @@ -25,7 +25,7 @@
     bigtime_t kActivationDelay = 40000;
     
     enum {
    -	MSG_TOGGLE_LAYOUT	= 'tgll'
    +	MSG_TOGGLE_LAYOUT			= 'tgll'
     };
     
     // constructor
    @@ -148,47 +148,53 @@
     void
     PadView::MouseDown(BPoint where)
     {
    -	if (BWindow* window = Window()) {
    -		BRegion region;
    -		GetClippingRegion(®ion);
    -		if (region.Contains(where)) {
    -			bool handle = true;
    -			for (int32 i = 0; BView* child = ChildAt(i); i++) {
    -				if (child->Frame().Contains(where)) {
    -					handle = false;
    -					break;
    -				}
    -			}
    -			if (handle) {
    -				if (BMessage* message = window->CurrentMessage()) {
    -					uint32 buttons;
    -					message->FindInt32("buttons", (int32*)&buttons);
    -					if (buttons & B_SECONDARY_MOUSE_BUTTON) {
    -						BRect r = Bounds();
    -						r.InsetBy(2.0, 2.0);
    -						r.top += 6.0;
    -						if (r.Contains(where)) {
    -							DisplayMenu(where);
    -						} else {
    -							// sends the window to the back
    -							window->Activate(false);
    -						}
    -					} else {
    -						if (system_time() - fClickTime < kActivationDelay) {
    -							window->Minimize(true);
    -							fClickTime = 0;
    -						} else {
    -							window->Activate();
    -							fDragOffset = ConvertToScreen(where) - window->Frame().LeftTop();
    -							fDragging = true;
    -							SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
    -							fClickTime = system_time();
    -						}
    -					}
    -				}
    -			}
    +	BWindow* window = Window();
    +	if (window == NULL)
    +		return;
    +
    +	BRegion region;
    +	GetClippingRegion(®ion);
    +	if (!region.Contains(where))
    +		return;
    +
    +	bool handle = true;
    +	for (int32 i = 0; BView* child = ChildAt(i); i++) {
    +		if (child->Frame().Contains(where)) {
    +			handle = false;
    +			break;
     		}
     	}
    +	if (!handle)
    +		return;
    +
    +	BMessage* message = window->CurrentMessage();
    +	if (message == NULL)
    +		return;
    +
    +	uint32 buttons;
    +	message->FindInt32("buttons", (int32*)&buttons);
    +	if (buttons & B_SECONDARY_MOUSE_BUTTON) {
    +		BRect r = Bounds();
    +		r.InsetBy(2.0, 2.0);
    +		r.top += 6.0;
    +		if (r.Contains(where)) {
    +			DisplayMenu(where);
    +		} else {
    +			// sends the window to the back
    +			window->Activate(false);
    +		}
    +	} else {
    +		if (system_time() - fClickTime < kActivationDelay) {
    +			window->Minimize(true);
    +			fClickTime = 0;
    +		} else {
    +			window->Activate();
    +			fDragOffset = ConvertToScreen(where) - window->Frame().LeftTop();
    +			fDragging = true;
    +			SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
    +			fClickTime = system_time();
    +		}
    +	}
     }
     
     // MouseUp
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 19:25:43 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 19:25:43 +0200
    Subject: [Haiku-commits] r28095 - haiku/trunk/src/apps/launchbox
    Message-ID: <200810141725.m9EHPhVF004964@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 19:25:42 +0200 (Tue, 14 Oct 2008)
    New Revision: 28095
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28095&view=rev
    
    Modified:
       haiku/trunk/src/apps/launchbox/PadView.cpp
    Log:
    .. actually, "unnest" the rest of the file as well.
    
    
    Modified: haiku/trunk/src/apps/launchbox/PadView.cpp
    ===================================================================
    --- haiku/trunk/src/apps/launchbox/PadView.cpp	2008-10-14 17:23:00 UTC (rev 28094)
    +++ haiku/trunk/src/apps/launchbox/PadView.cpp	2008-10-14 17:25:42 UTC (rev 28095)
    @@ -216,38 +216,40 @@
     void
     PadView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage)
     {
    -	if (MainWindow* window = dynamic_cast(Window())) {
    -		if (fDragging) {
    -			window->MoveTo(ConvertToScreen(where) - fDragOffset);
    -		} else if (window->AutoRaise()) {
    -			where = ConvertToScreen(where);
    -			BScreen screen(window);
    -			BRect frame = screen.Frame();
    -			BRect windowFrame = window->Frame();
    -			if (where.x == frame.left || where.x == frame.right
    -				|| where.y == frame.top || where.y == frame.bottom) {
    -				BPoint position = window->ScreenPosition();
    -				bool raise = false;
    -				if (fabs(0.5 - position.x) > fabs(0.5 - position.y)) {
    -					// left or right border
    -					if (where.y >= windowFrame.top && where.y <= windowFrame.bottom) {
    -						if (position.x < 0.5 && where.x == frame.left)
    -							raise = true;
    -						else if (position.x > 0.5 && where.x == frame.right)
    -							raise = true;
    -					}
    -				} else {
    -					// top or bottom border
    -					if (where.x >= windowFrame.left && where.x <= windowFrame.right) {
    -						if (position.y < 0.5 && where.y == frame.top)
    -							raise = true;
    -						else if (position.y > 0.5 && where.y == frame.top)
    -							raise = true;
    -					}
    +	MainWindow* window = dynamic_cast(Window());
    +	if (window == NULL)
    +		return;
    +
    +	if (fDragging) {
    +		window->MoveTo(ConvertToScreen(where) - fDragOffset);
    +	} else if (window->AutoRaise()) {
    +		where = ConvertToScreen(where);
    +		BScreen screen(window);
    +		BRect frame = screen.Frame();
    +		BRect windowFrame = window->Frame();
    +		if (where.x == frame.left || where.x == frame.right
    +			|| where.y == frame.top || where.y == frame.bottom) {
    +			BPoint position = window->ScreenPosition();
    +			bool raise = false;
    +			if (fabs(0.5 - position.x) > fabs(0.5 - position.y)) {
    +				// left or right border
    +				if (where.y >= windowFrame.top && where.y <= windowFrame.bottom) {
    +					if (position.x < 0.5 && where.x == frame.left)
    +						raise = true;
    +					else if (position.x > 0.5 && where.x == frame.right)
    +						raise = true;
     				}
    -				if (raise)
    -					window->Activate();
    +			} else {
    +				// top or bottom border
    +				if (where.x >= windowFrame.left && where.x <= windowFrame.right) {
    +					if (position.y < 0.5 && where.y == frame.top)
    +						raise = true;
    +					else if (position.y > 0.5 && where.y == frame.top)
    +						raise = true;
    +				}
     			}
    +			if (raise)
    +				window->Activate();
     		}
     	}
     }
    @@ -280,116 +282,118 @@
     void
     PadView::DisplayMenu(BPoint where, LaunchButton* button) const
     {
    -	if (MainWindow* window = dynamic_cast(Window())) {
    -		LaunchButton* nearestButton = button;
    -		if (!nearestButton) {
    -			// find the nearest button
    -			for (int32 i = 0; (nearestButton = ButtonAt(i)); i++) {
    -				if (nearestButton->Frame().top > where.y)
    -					break;
    -			}
    +	MainWindow* window = dynamic_cast(Window());
    +	if (window == NULL)
    +		return;
    +
    +	LaunchButton* nearestButton = button;
    +	if (!nearestButton) {
    +		// find the nearest button
    +		for (int32 i = 0; (nearestButton = ButtonAt(i)); i++) {
    +			if (nearestButton->Frame().top > where.y)
    +				break;
     		}
    -		BPopUpMenu* menu = new BPopUpMenu("launch popup", false, false);
    -		// add button
    -		BMessage* message = new BMessage(MSG_ADD_SLOT);
    -		message->AddPointer("be:source", (void*)nearestButton);
    -		BMenuItem* item = new BMenuItem("Add Button Here", message);
    +	}
    +	BPopUpMenu* menu = new BPopUpMenu("launch popup", false, false);
    +	// add button
    +	BMessage* message = new BMessage(MSG_ADD_SLOT);
    +	message->AddPointer("be:source", (void*)nearestButton);
    +	BMenuItem* item = new BMenuItem("Add Button Here", message);
    +	item->SetTarget(window);
    +	menu->AddItem(item);
    +	// button options
    +	if (button) {
    +		// remove button
    +		message = new BMessage(MSG_CLEAR_SLOT);
    +		message->AddPointer("be:source", (void*)button);
    +		item = new BMenuItem("Clear Button", message);
     		item->SetTarget(window);
     		menu->AddItem(item);
    -		// button options
    -		if (button) {
    -			// remove button
    -			message = new BMessage(MSG_CLEAR_SLOT);
    -			message->AddPointer("be:source", (void*)button);
    -			item = new BMenuItem("Clear Button", message);
    -			item->SetTarget(window);
    -			menu->AddItem(item);
    -			// remove button
    -			message = new BMessage(MSG_REMOVE_SLOT);
    -			message->AddPointer("be:source", (void*)button);
    -			item = new BMenuItem("Remove Button", message);
    -			item->SetTarget(window);
    -			menu->AddItem(item);
    +		// remove button
    +		message = new BMessage(MSG_REMOVE_SLOT);
    +		message->AddPointer("be:source", (void*)button);
    +		item = new BMenuItem("Remove Button", message);
    +		item->SetTarget(window);
    +		menu->AddItem(item);
     // TODO: disabled because Haiku does not yet support tool tips
    -//			if (button->Ref()) {
    -//				message = new BMessage(MSG_SET_DESCRIPTION);
    -//				message->AddPointer("be:source", (void*)button);
    -//				item = new BMenuItem("Set Description"B_UTF8_ELLIPSIS, message);
    -//				item->SetTarget(window);
    -//				menu->AddItem(item);
    -//			}
    -		}
    -		menu->AddSeparatorItem();
    -		// window settings
    -		BMenu* settingsM = new BMenu("Settings");
    -		settingsM->SetFont(be_plain_font);
    +//		if (button->Ref()) {
    +//			message = new BMessage(MSG_SET_DESCRIPTION);
    +//			message->AddPointer("be:source", (void*)button);
    +//			item = new BMenuItem("Set Description"B_UTF8_ELLIPSIS, message);
    +//			item->SetTarget(window);
    +//			menu->AddItem(item);
    +//		}
    +	}
    +	menu->AddSeparatorItem();
    +	// window settings
    +	BMenu* settingsM = new BMenu("Settings");
    +	settingsM->SetFont(be_plain_font);
     
    -		const char* toggleLayoutLabel;
    -		if (fButtonLayout->Orientation() == B_HORIZONTAL)
    -			toggleLayoutLabel = "Vertical Layout";
    -		else
    -			toggleLayoutLabel = "Horizontal Layout";
    -		item = new BMenuItem(toggleLayoutLabel, new BMessage(MSG_TOGGLE_LAYOUT));
    -		item->SetTarget(this);
    -		settingsM->AddItem(item);
    +	const char* toggleLayoutLabel;
    +	if (fButtonLayout->Orientation() == B_HORIZONTAL)
    +		toggleLayoutLabel = "Vertical Layout";
    +	else
    +		toggleLayoutLabel = "Horizontal Layout";
    +	item = new BMenuItem(toggleLayoutLabel, new BMessage(MSG_TOGGLE_LAYOUT));
    +	item->SetTarget(this);
    +	settingsM->AddItem(item);
     
    -		uint32 what = window->Look() == B_BORDERED_WINDOW_LOOK ? MSG_SHOW_BORDER : MSG_HIDE_BORDER;
    -		item = new BMenuItem("Show Window Border", new BMessage(what));
    -		item->SetTarget(window);
    -		item->SetMarked(what == MSG_HIDE_BORDER);
    -		settingsM->AddItem(item);
    +	uint32 what = window->Look() == B_BORDERED_WINDOW_LOOK ? MSG_SHOW_BORDER : MSG_HIDE_BORDER;
    +	item = new BMenuItem("Show Window Border", new BMessage(what));
    +	item->SetTarget(window);
    +	item->SetMarked(what == MSG_HIDE_BORDER);
    +	settingsM->AddItem(item);
     
    -		item = new BMenuItem("Auto Raise", new BMessage(MSG_TOGGLE_AUTORAISE));
    -		item->SetTarget(window);
    -		item->SetMarked(window->AutoRaise());
    -		settingsM->AddItem(item);
    +	item = new BMenuItem("Auto Raise", new BMessage(MSG_TOGGLE_AUTORAISE));
    +	item->SetTarget(window);
    +	item->SetMarked(window->AutoRaise());
    +	settingsM->AddItem(item);
     
    -		item = new BMenuItem("Show On All Workspaces", new BMessage(MSG_SHOW_ON_ALL_WORKSPACES));
    -		item->SetTarget(window);
    -		item->SetMarked(window->ShowOnAllWorkspaces());
    -		settingsM->AddItem(item);
    +	item = new BMenuItem("Show On All Workspaces", new BMessage(MSG_SHOW_ON_ALL_WORKSPACES));
    +	item->SetTarget(window);
    +	item->SetMarked(window->ShowOnAllWorkspaces());
    +	settingsM->AddItem(item);
     
    -		menu->AddItem(settingsM);
    +	menu->AddItem(settingsM);
     
    -		menu->AddSeparatorItem();
    +	menu->AddSeparatorItem();
     
    -		// pad commands
    -		BMenu* padM = new BMenu("Pad");
    -		padM->SetFont(be_plain_font);
    -		// new pad
    -		item = new BMenuItem("New", new BMessage(MSG_ADD_WINDOW));
    -		item->SetTarget(be_app);
    -		padM->AddItem(item);
    -		// new pad
    -		item = new BMenuItem("Clone", new BMessage(MSG_ADD_WINDOW));
    -		item->SetTarget(window);
    -		padM->AddItem(item);
    -		padM->AddSeparatorItem();
    -		// close
    -		item = new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED));
    -		item->SetTarget(window);
    -		padM->AddItem(item);
    -		menu->AddItem(padM);
    -		// app commands
    -		BMenu* appM = new BMenu("LaunchBox");
    -		appM->SetFont(be_plain_font);
    -		// about
    -		item = new BMenuItem("About", new BMessage(B_ABOUT_REQUESTED));
    -		item->SetTarget(be_app);
    -		appM->AddItem(item);
    -		// quit
    -		item = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED));
    -		item->SetTarget(be_app);
    -		appM->AddItem(item);
    -		menu->AddItem(appM);
    -		// finish popup
    -		menu->SetAsyncAutoDestruct(true);
    -		menu->SetFont(be_plain_font);
    -		where = ConvertToScreen(where);
    -		BRect mouseRect(where, where);
    -		mouseRect.InsetBy(-4.0, -4.0);
    -		menu->Go(where, true, false, mouseRect, true);
    -	}
    +	// pad commands
    +	BMenu* padM = new BMenu("Pad");
    +	padM->SetFont(be_plain_font);
    +	// new pad
    +	item = new BMenuItem("New", new BMessage(MSG_ADD_WINDOW));
    +	item->SetTarget(be_app);
    +	padM->AddItem(item);
    +	// new pad
    +	item = new BMenuItem("Clone", new BMessage(MSG_ADD_WINDOW));
    +	item->SetTarget(window);
    +	padM->AddItem(item);
    +	padM->AddSeparatorItem();
    +	// close
    +	item = new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED));
    +	item->SetTarget(window);
    +	padM->AddItem(item);
    +	menu->AddItem(padM);
    +	// app commands
    +	BMenu* appM = new BMenu("LaunchBox");
    +	appM->SetFont(be_plain_font);
    +	// about
    +	item = new BMenuItem("About", new BMessage(B_ABOUT_REQUESTED));
    +	item->SetTarget(be_app);
    +	appM->AddItem(item);
    +	// quit
    +	item = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED));
    +	item->SetTarget(be_app);
    +	appM->AddItem(item);
    +	menu->AddItem(appM);
    +	// finish popup
    +	menu->SetAsyncAutoDestruct(true);
    +	menu->SetFont(be_plain_font);
    +	where = ConvertToScreen(where);
    +	BRect mouseRect(where, where);
    +	mouseRect.InsetBy(-4.0, -4.0);
    +	menu->Go(where, true, false, mouseRect, true);
     }
     
     // SetOrientation
    
    
    
    From stippi at mail.berlios.de  Tue Oct 14 20:32:32 2008
    From: stippi at mail.berlios.de (stippi at BerliOS)
    Date: Tue, 14 Oct 2008 20:32:32 +0200
    Subject: [Haiku-commits] r28096 - haiku/trunk/src/apps/launchbox
    Message-ID: <200810141832.m9EIWWpl005750@sheep.berlios.de>
    
    Author: stippi
    Date: 2008-10-14 20:32:31 +0200 (Tue, 14 Oct 2008)
    New Revision: 28096
    ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28096&view=rev
    
    Modified:
       haiku/trunk/src/apps/launchbox/IconButton.cpp
       haiku/trunk/src/apps/launchbox/IconButton.h
       haiku/trunk/src/apps/launchbox/LaunchButton.cpp
       haiku/trunk/src/apps/launchbox/LaunchButton.h
       haiku/trunk/src/apps/launchbox/MainWindow.cpp
       haiku/trunk/src/apps/launchbox/PadView.cpp
       haiku/trunk/src/apps/launchbox/PadView.h
    Log:
    * Implemented changing the icons size (several ones are supported from
      16 x 16 to 64 x 64).
    * Changed the layout code to have dynamic padding depending on main icon size.
    * Fixed a problem with the "Auto Raise" feature where, when the pad was along
      the bottom, you had to tip the top of the screen with the mouse for the pad
      to raise...
    
    
    Modified: haiku/trunk/src/apps/launchbox/IconButton.cpp
    ===================================================================
    --- haiku/trunk/src/apps/launchbox/IconButton.cpp	2008-10-14 17:25:42 UTC (rev 28095)
    +++ haiku/trunk/src/apps/launchbox/IconButton.cpp	2008-10-14 18:32:31 UTC (rev 28096)
    @@ -237,27 +237,44 @@
     	if (IsValid()) {
     		minWidth += fNormalBitmap->Bounds().IntegerWidth() + 1.0;
     		minHeight += fNormalBitmap->Bounds().IntegerHeight() + 1.0;
    -	} else {
    -		minWidth += MIN_SPACE;
    -		minHeight += MIN_SPACE;
     	}
     	if (minWidth < MIN_SPACE)
     		minWidth = MIN_SPACE;
     	if (minHeight < MIN_SPACE)
     		minHeight = MIN_SPACE;
    +
    +	float hPadding = max_c(4.0, ceilf(minHeight / 4.0));
    +	float vPadding = max_c(4.0, ceilf(minWidth / 4.0));
    +
     	if (fLabel.CountChars() > 0) {
     		font_height fh;
     		GetFontHeight(&fh);
    -		minHeight += ceilf(fh.ascent + fh.descent) + 4.0;
    -		minWidth += StringWidth(fLabel.String()) + 4.0;
    +		minHeight += ceilf(fh.ascent + fh.descent) + vPadding;
    +		minWidth += StringWidth(fLabel.String()) + vPadding;
     	}
     
     	if (width)
    -		*width = minWidth + 4.0;
    +		*width = minWidth + hPadding;
     	if (height)
    -		*height = minHeight + 4.0;
    +		*height = minHeight + vPadding;
     }
     
    +// MinSize
    +BSize
    +IconButton::MinSize()
    +{
    +	BSize size;
    +	GetPrefer