Commit Graph

26375 Commits

Author SHA1 Message Date
Axel Dörfler
90e8094e1e * Added test application for the AttributeIterator implementation. Note that
this test fails under BeOS, while it works just fine under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 12:23:39 +00:00
Fredrik Modeen
ba65711eb2 Fixed CID 1033: fMouseDownBounds will never be null as we do a new BBitmap before we check for NULL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 11:32:40 +00:00
Stefano Ceccherini
1e8da5fd15 fAppName was leaked (CID 6). Also moved the initialization of fText to the end of the function, so that we avoid a BString::Adopt() call
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 10:26:05 +00:00
Stefano Ceccherini
746cac055a fixed buffer overrun, CID 649
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 10:10:13 +00:00
Stefano Ceccherini
b5d458a508 First round of style changes: renamed all member variables from m_var_name to fVarName
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 09:55:02 +00:00
Axel Dörfler
fa23653d48 * Improved reported inode number to the be actual index.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 09:53:58 +00:00
Stefano Ceccherini
866ece3115 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 09:34:47 +00:00
Stefano Ceccherini
1adaf58e1f gcc4 noticed GenericThread::GetName() was returning a pointer to a local variable. No code is using this function, so it's safe to strdup() it. This class needs a serious restyling, though, as it doesn't conform to our coding guidelines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 09:33:59 +00:00
Axel Dörfler
c4b2fd5be3 * Reverted r27196 and solved it differently (in a more robust way): instead of
guessing that the first attribute will be a name attribute, fCurrentSmallData
  now takes hidden attributes into account.
* I haven't tested this change, though, so if it messes things up again, please
  yell at me :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 09:25:17 +00:00
Stefano Ceccherini
2e2bff94a9 buttons could be used initialized if locking the looper failed (CID 1134)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 08:09:13 +00:00
Stefano Ceccherini
fc16834e55 buffer is an array, so use delete[]. CID 130
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 07:34:37 +00:00
Fredrik Modeen
c1d9a877a4 Fixed CID 1031: removed check _fDevice for NULL as we do new BList in constructor also removed temp var count as _fDevice->CountItems() should return 0 if empty
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 07:07:00 +00:00
Ryan Leavengood
52a542adfc Fixed CID 1306: initialize size to 0.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:43:07 +00:00
Ryan Leavengood
e65fb49a85 Apply Michael Pfeiffer's advice and move the delete outside the if.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:34:39 +00:00
Ryan Leavengood
bf2c508181 Fixed CID 1289: if name cannot be strdup'ed, we should delete entry before
returning B_NO_MEMORY;


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:30:07 +00:00
Ryan Leavengood
4239ee5d66 Fixed CID 1290 and 1291: the temp BString is initialized with a new BString and then immediately replaced. A later null check ensures it is OK to initialize it to NULL.
Also fixed a GCC warning about comparison between signed and unsigned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:21:34 +00:00
Ryan Leavengood
3d65935d2d Fixed CID 1294 and 1295: delete the entry_ref on the terminating conditions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:10:56 +00:00
Ryan Leavengood
5043f13cc7 Fixed CID 1297: the buffList array was never deleted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 05:29:27 +00:00
Ryan Leavengood
78cc6f918f Fixed CID 1298: In the case that sSelectedIcon is not valid, checkMark could be
leaked. So I reorganized the if statement to remove this possibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 05:20:49 +00:00
Ryan Leavengood
1594b70bc1 Fixed CID 1301: we should probably have the null check of defaultPipe before it
is first dereferenced...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 04:44:55 +00:00
Ryan Leavengood
0f3a576f7e Fixed CID 1300: the pointer last is never modified in the loop, so there is no
need for a null check. Or the null check needs to be moved to after last is
initialized. But if the user_memcpy of cookie succeeds, last should not be null
since it is just a copy of cookie. Probably.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 04:40:37 +00:00
Ryan Leavengood
d1363991a8 Fixed CID 1299: the char* name was used in a call to strtoul on line 1220
before being NULL checked on line 1234. I moved the null check to be after name
is initialized and removed it from line 1234.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 04:28:09 +00:00
Ryan Leavengood
9b54ac7464 Fixing CID 1305: the null check of fPageFormatText on line 483 was redundant
since fPageFormatText is accessed in both branches of the if before the null
check. If it was actually null there would be a crash well before line 483. In
addition this member is initialized in the constructor. I assume the null check
was added to provide symmetry with the null check of fJobSetupText below it.
But that latter null check is needed since fJobSetupText may not have been
created in the constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 04:13:30 +00:00
Karsten Heimrich
dcddeb4c1c * Bug #264 appeared again after I removed the disabled programmatically resize during user resize.
Obviously we ported the bug over from BeOS, during the FrameResized call the preferred size of
  the window was calculated based on the current size of the window, calculating the same size
  FrameResized reported. Thus resulting in trying to resize it to the same size ending in an loop.
  It seems they worked arround the oversight using the outline resize thing.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 23:09:45 +00:00
Karsten Heimrich
dc68795074 * automatic whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 22:52:44 +00:00
Jérôme Duval
53e8a878e6 isnan and isfinite are macros
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 22:45:17 +00:00
Jérôme Duval
645fa87a21 added lsearch and lfind
remove unknown infnanf and strtcopy functions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 22:27:55 +00:00
Jérôme Duval
eabd7df4a2 added insque and remque
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 22:23:21 +00:00
Jérôme Duval
9f1337c6f0 fixed ls to be ls and not dir (bug #2646)
added dir


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 22:14:55 +00:00
Salvatore Benedetto
9cab5f5448 * Order members alphabetically. No functional changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 15:10:40 +00:00
Salvatore Benedetto
7a32d7f588 * Adding unit test for xsi message queue
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 15:08:18 +00:00
Salvatore Benedetto
9c3feb120b * forgot to commit Jamfiles
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 15:06:47 +00:00
Salvatore Benedetto
40dae3708f * Adding msg{rcv,snd,get,ctl} syscalls to the system
* Add message queue init function call to main.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 15:03:01 +00:00
Salvatore Benedetto
f22e1421a4 * Adding sys/msg.h header and relative syscalls
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 14:52:35 +00:00
Salvatore Benedetto
b9b04b6c32 * If the receving buffer if bigger than the message, truncate the length copied
to the one of the message
* Fix comparison
* Clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 14:42:13 +00:00
Axel Dörfler
43209917de * BDirectory::CreateDirectory() and CreateSymlink() now both use __gUmask to
correct the permission mask. This fixes bug #2670.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 12:25:05 +00:00
Stefano Ceccherini
c4f7df69a5 be_app could be NULL in BApplication's destructor, if the BApplication didn't initialize itself fully on construction. This fixes a crash when launching some already running application (i.e. print_server)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 12:02:33 +00:00
Stefano Ceccherini
f66d53f916 fixed gcc4 warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 07:57:08 +00:00
Stefano Ceccherini
da4a0bff5e fix gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-11 07:24:40 +00:00
Michael Lotz
9de98b30cf * Add alternate interface printing to usb_dev_info, which is now pretty straight
forward using the new USBKit interface.
* Make the output indents a bit more natural and wider to make things more
  readable.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 22:14:00 +00:00
Michael Lotz
89dda28052 * Extend the usb_raw interface by alternate interface aware getters for
interfaces, endpoints and generic descriptors.
* Add getter for active interface index and simplify the count operation as
  it isn't misused to also get interface descriptors anymore.
* Refactor out some common code into helper functions.
* Adapt the USBKit to the changed/new interface.
* Change how alternate interfaces are exposed by USBKit by providing normal
  BUSBInterface objects for alternate interfaces that can easily be examined
  and used.
* Make BUSBInterface class aware of its alternate index and use the alternate
  aware usb_raw functionallity to build the endpoint and descriptor lists.
* Add ActiveAlternateIndex() to find out what alternate is currently active.
* Style cleanup of the USBKit classes, use std::nothrow everywhere and check
  all allocations. Simplify some code by removing optimization where the benefit
  is questionable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 21:52:32 +00:00
Axel Dörfler
44d0dbc898 * dirent::d_reclen was set incorrectly, causing bug #2699.
* Removed unneeded "block_out" variable in ISOReadDirEnt().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 21:49:40 +00:00
Stephan Aßmus
1b0471487a Added layout friendly constructor (untested).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 21:07:32 +00:00
Stephan Aßmus
7bf5abf425 Implemented BSize returning layout methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 20:34:10 +00:00
Stephan Aßmus
8bd9493d55 "_IMPORT" was not defined, but most (all?) BeOS software that could be compiled
for PPC would give compiler errors if this is not defined (to nothing). For
the MetroWerks compiler, one needed to explicitely import/export classes and
methods, but GCC does not need it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 20:29:50 +00:00
Axel Dörfler
cb387cfb2f * Added acpi_shutdown() method. If the ACPI bus manager is installed, this will
be used now. Tested only with VMware so far.
* apm_shutdown() is now called with interrupts turned on.
* Renamed arch_cpu.c to arch_cpu.cpp.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 19:50:08 +00:00
Axel Dörfler
a181d013aa * Divided enter_sleep_state() to have a prepare_sleep_state() that accepts a
wake vector (not tested at all).
* Removed disabling interrupts when entering the sleep state - looks like
  ACPI still needs memory then.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 19:24:37 +00:00
Salvatore Benedetto
7adf6ce100 * Set msg_qbytes on IPC_SET
* Wake up only one thread waiting to send.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 16:22:23 +00:00
Rene Gollent
ea0316d305 Updated RTL8139 driver to 7.0-RELEASE version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 15:17:56 +00:00
Stefano Ceccherini
40b71c1667 Use dynamic_cast before calling DeleteReplicant. This fixes bug #2712. I'm not sure why, though. Also call unload_add_on() as last operation (and yes, doing just that was not sufficient to fix the bug)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 11:34:56 +00:00