Commit Graph

20940 Commits

Author SHA1 Message Date
Ingo Weinhold
cf1539e1a3 Added debug macros ASSERT_ALWAYS_PRINT and ASSERT_PRINT which take
additional parameters that are fed into a dprintf() before panic() is
invoked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 17:35:57 +00:00
Niels Sascha Reedijk
99b3aeed2d git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21837 a95241bf-73f2-0310-859d-f6bbb57e9c96 2007-08-06 14:28:40 +00:00
Stefano Ceccherini
e9d1494da3 Nevermind Stephan, in the end I found it out. Fixed shape drawing inside
a BPicture, though I'm not yet sure if I should do it there on when 
playing the picture...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 11:55:29 +00:00
Stefano Ceccherini
1f8ea6a98d Set the origin before playing the picture, so DrawPicture() with an
offset works correctly. Drawing a BShape using a BPicture is currently 
broken. Stephan, any insight on what it's changed about shape drawing ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 11:41:18 +00:00
Stephan Aßmus
fe80954c2d * patch by Andre Garzia to fix some coding style issues
* fixed a potential memory leak in EthernetSettingsView::_ShowConfiguration()
  when the ioctl didn't succeed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:46:42 +00:00
Niels Sascha Reedijk
55f7db1bd9 Update according to the latest guideline changes. These files already
passed phase 3, so they wouldn't be updated during the regular process. 
I guess the other files will get that update.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:32:27 +00:00
Niels Sascha Reedijk
ff3d9bfa2a Update the API guidelines to make them more consistent with the coding
guidelines. Three new guidelines:
- Commas between names and email adresses in header blocks.
- Indent with tabs (with lenght 4)
- Two whitelines between blocks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:09:29 +00:00
Axel Dörfler
2aacca4469 Brought the document up to date; triggered by an update to this document by
Kamikazow which can be seen as an attachment to bug #1356.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 00:03:49 +00:00
Axel Dörfler
f58cf973ad mmlr+bonefish(+axeld - I put the bug in there ;-)):
* Inode::MayReleaseWriter() would release the semaphore too often; therefore,
  Inode::WriteDataToBuffer() now loops in case it still couldn't write anything
  instead of failing - this fixes a race condition (ie. a device is full message).
* In case the read request got filled two times (while adding the request, and
  after waiting for it to become filled), ReadRequest::PutBuffer() overwrote the
  output data. This fixes bug #1331.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 23:38:31 +00:00
Marcus Overhagen
d1dc70fa5f FD_CLOEXEC is a flag, other bits may be set
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 13:56:01 +00:00
Marcus Overhagen
43fdea7d52 writev test application. I expected this to crash haiku, but it hasn't
so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 13:24:52 +00:00
Ingo Weinhold
90aa265896 Made the compatibility level for target libbe_test depend on the compatibility
of the host platform. The libtracker Jamfile seems to be the only one that
needs another exception.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 01:13:27 +00:00
Michael Pfeiffer
1384a3a81f Make C compiler happy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 17:09:46 +00:00
Michael Pfeiffer
fc069a2ace * Updated copyright header.
* Initial implementation of suggest_thread_priority. It behaves like version from BeOS R5. 
* TODO take arguments 'period', 'jitter', and 'length' into account as well . 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 16:35:19 +00:00
Stefano Ceccherini
187453512d If there's only one tab, quit the window when TermView::NotifyQuit() is
called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 14:35:38 +00:00
Stefano Ceccherini
2671c0bf0a Since AS_DRAW_STRING doesn't attach the escapement delta anymore,
drawing a string inside a picture and then playing that picture 
triggered a debugger call. Fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 14:34:47 +00:00
Stephan Aßmus
c9d2046fe5 * after my last changes to font rendering, it was about 15% slower than
before (although there should be much less lock contention)
* with this change, there is quite a bit of cleanup, text drawing is now
  about 20% faster than before the original changes to font caching,
  mostly due to turning off the kerning feature, which at the moment
  gives absolutely no benefit. The correct way of doing it might be to
  use kerning depending on the provided glyph spacing mode
* removed fPenLocation from Painter, the usage should be more correct now,
  since it is now consistently applied before the coordinate transformation
  from view to screen (also for DrawShape() now, before any view scaling
  and origin offset)
* Painter no longer has it's own instance of a ServerFont, instead it uses
  its AGGTextRenderer instance, which was per Painter again after the
  last change, and not global anymore, made _UpdateFont() useless
* When using GlyphLayoutEngine, it supports a second pass with the same
  FontCacheEntry through the introduction of a FontCacheReference. This
  speeds up DrawString a little, since it needs to calculate the bounding
  box for the string, and then draw the string in a second pass. This is
  now done with only one FontCacheEntry lookup
* I also tried to optimize the on-the-fly conversion of UTF8->CharCode away,
  since it was done four times per DrawString, but surprisingly, it proofed
  to be a slight slowdown.
* introduced a shortcut in DrawingEngine::DrawString() which avoids
  calculating the bounding box, we are now a tiny bit faster to figure
  out that we don't need to draw any string than Dano

In the test environment (drawing to offscreen bitmap and blitting to
screen eventually), text rendering is now about 3.7 times _faster_ than Dano
text rendering (directly to screen), for untransformed text. Unfortunately
I cannot test on the same machine in accelerant using version of the test
environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:37:16 +00:00
Stephan Aßmus
94a48ae276 * use a different message code for DrawString() with escapement delta
and DrawString() without
* this change also includes adding the penlocation to the shape to-screem
  coordinate conversion (temporarily breaks shape rendering, will be fixed
  in next commit)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:22:47 +00:00
Stephan Aßmus
c68e76bc26 * if there is any app actually using suggest_thread_priority() it won't
no longer use idle priority, even if an actual implementation is still
  missing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:19:56 +00:00
Stephan Aßmus
7c1cb28850 * cache the tab highlight and shadow color
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:18:21 +00:00
Stephan Aßmus
a4dcea7870 * remove dos newlines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:16:22 +00:00
Ingo Weinhold
fd772abcb4 Paranoia: vm_cache_insert_page() does now check whether a page for the
offset of the page to insert is already in the cache. Revealed the bug
fixed with my previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 00:36:50 +00:00
Ingo Weinhold
0a75dab5fe fault_find_page(): Fixed a race condition in case of reading the page
from the store into the top cache, which could lead to pages inserted
multiple times into the cache. We don't insert a dummy page in this case
anymore. Instead we mark a freshly allocated page busy and insert that
one. That's exactly the approach the file cache uses too. This does
probably make the whole dummy page special handling in the file cache
obsolete.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 00:33:47 +00:00
Ingo Weinhold
7c3a45ec5e Although probably not used ATM, cache_prefetch_vnode() should respect
busy pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 00:24:13 +00:00
Stefano Ceccherini
1820113ead removed old comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 20:50:41 +00:00
Stefano Ceccherini
18f004cc71 Made some TermView functions (Paste, Copy, etc) public. Made
SetTitle and NotifyQuit virtual. TermWindow now uses a TermView 
subclass which closes the tab on NotifyQuit. Enabled tabbed 
terminal. There are still some small glitches, most probably related
 to BTabView bugs ?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 20:41:04 +00:00
Jérôme Duval
3da81905f1 logic was inversed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 19:03:31 +00:00
Jérôme Duval
acbe544d74 to please gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 19:02:59 +00:00
Jérôme Duval
84324de507 added an empty implementation of confstr()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 18:13:55 +00:00
Stefano Ceccherini
ce10f265de In case the user supplied a wrong commandline, the Terminal didn't launch
the shell as the code would seem to do. I've disabled showing the Alert, 
since system() doesn't return the return value of "alert".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 10:47:27 +00:00
Stefano Ceccherini
2b87a97ac6 Attach/DetachShell are now private. Added a new TermView constructor
which only specifies the rows and columns, view size is automatically 
calculated, and used it in TermWindow. Added a TermView::SetTitle() 
method, thus TermParse doesn't call Window() anymore. Some cleanups, 
scrollbar was off by one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 09:59:30 +00:00
François Revol
efd2184922 Add kdl commands (inb,ins,inw) to dump pci io ports (untested).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 01:28:21 +00:00
Axel Dörfler
e9012605b8 vfs_get_vnode_cache() was changed (read: fixed) since r18716; it was wrong
to acquire the extra vnode reference, and actually prevented unmounting from
working - which it now does again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 01:26:35 +00:00
Stephan Aßmus
25a7061652 * moved AGGTextRenderer alongside it's pal, Painter, it felt lonely,
removed font_support folder
* ServerApp can use ServerFont::StringWidth() directly again
* more ServerFont functions implemented via GlyphLayoutEngine and
  custom consumer
* extended GlyphCache data structure to hole the left/right insets
  of the glyph shape between its advance width, took it from the earlier
  ServerFont implementation, have not tested if that gives same result
  as R5
* TODO: implement GetGylphShapes via GlyphCache, although it might not
  look as clean as it does now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 01:11:27 +00:00
Axel Dörfler
25c969f5a8 * Fixed filling the log in ReceiveLine() - ie. it's not done anymore there.
* Fixed error message in Open() when the server didn't return anything.
* Made the pop3.h header self contained.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 23:05:53 +00:00
Axel Dörfler
171d3a85cb * Made the module code more robust against putting more module reference
than you own - instead of crashing some time later, it will now panic as
  soon as it can.
* No longer put the module image for B_KEEP_LOADED modules - essentially,
  that feature was broken.
* Now use the RecursiveLocker in favour of manual locking where appropriate.
  This actually fixed two locking bugs in error code paths.
* Applied a patch by François Revol: open_module_list() did not work
  when the prefix was already inside a module (as opposed to a directory
  on disk). The current solution is not as efficient, but that can be
  fixed by improving the iterator code.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 21:13:56 +00:00
Stephan Aßmus
4389b7028c * TransformBounds() takes a const BRect&
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 21:05:34 +00:00
Stephan Aßmus
1a6914c517 * fixes the build, forgot to include in r21797
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 21:05:01 +00:00
Jérôme Duval
a5f1b58811 removed redundant TARGET_GCC_LIBGCC
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:32:28 +00:00
Axel Dörfler
bfa87a9ab4 IPv4 now uses module_dependencies, it mustn't put the stack module manually anymore.
This fixes unloading of the stack (some fixes to the module code that let you
determine this kind of bugs earlier will be committed next).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:12:28 +00:00
Stephan Aßmus
2222864eed * complete overhaul of the font/glyph caching
* the previous AGG implementation is superfluous
* the new implementation is based on that one, but in a way that allows
  read/write locking to the list of cache entries (fonts) as well as
  read/write locking to the cached glyphs per individual font cache entry
* new GlyphLayoutEngine.h, which is to be the central place for layouting
  glyphs along the baseline.
  It handles the locking for getting the font cache entries.
  It works by giving it a template class GlyphConsumer which does the
  actual work.
* changed AGGTextRenderer to use the new font cache
* changed ServerFont::StringWidth(), and the bounding box stuff to use it
* changed DrawingEngine, it doesn't need the global font lock anymore
* our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString
  is the same, which of course it isn't, hence the two separate functions...
  AsGlyphs just gets the bounding box of each glyph in a string, not treating
  the string as an actual word
  AsString adds the offset of the glyph in the word to the bounding box
* changed ServerProtocol.h accordingly for the different bounding box meaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:10:38 +00:00
Stephan Aßmus
693c7a1eaa * I was trying to debug my new font stuff in the app_server for about an hour
before I realized that it was FontDemo which was broken. It was easy to tell
  once I ran it on R5 for comparison... :-\


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 18:32:00 +00:00
Jérôme Duval
d96381dd5d reverted r21757 which is now fixed by the following
added $(HAIKU_GCC_LIBGCC) to HAIKU_KERNEL_ADDON_END_GLUE_CODE as suggested by Ingo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 17:50:17 +00:00
Axel Dörfler
69f6c88d58 * The PtyReader thread now just exits when there is no more left to be read.
* setpgid() when spawning the shell was superfluous, as we're already the
  session leader.
* Added a comment to TermView::NotifyQuit() about why sending B_QUIT_REQUESTED
  to the window isn't such a good idea when you have more than one use for it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 17:21:12 +00:00
Axel Dörfler
f328fdc455 Fixed the build under BeOS/Dano:
* setenv() actually exists in Dano.
* On R5, it now uses sprintf() - the previous version would not compile.
* Cleaned some weird code in TermBuffer.cpp to set the "buf" variable to the
  end of the string - it also no longer uses the index() BSD extension
  (same as strchr()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 16:55:44 +00:00
Stephan Aßmus
075430faf4 * put some more useful utility classes into "shared". I tried to make sure
that OpenHashTable.h does not collide with all the other places that this
  is used, it seems everything still builds fine. Most problematic could be
  the OpenHashTable.h at kernel/util, but it seems it the target using
  that are not affected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 16:28:34 +00:00
Stephan Aßmus
d22f48c908 * fix the build of the app_server test environment (libbe_test) after
the change to the nodemonitor syscall


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 16:23:49 +00:00
Stefano Ceccherini
678f903e20 Implemented tabbed terminal (with a couple of bad hacks which will go
away soon, hopefully). The menuitem to open a new tab is still 
disabled, until I figure out how to catch the exit signal... HELP ? 
Plus there are still a couple of visual issues, but AFAICT without tabs 
the Terminal appearance should be the same as it was before, so no one 
should complain.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 13:17:23 +00:00
Stephan Aßmus
78f1b0e97c * added IsLocked() method to AutoWriteLocker
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 13:04:27 +00:00