45546 Commits

Author SHA1 Message Date
Siarzhuk Zharski
4e17bdd83f Fix CID991252: Possible NULL dereference on scheme name
The color scheme name pointer is dereferenced but was not checked for
NULL value.
hrev45461
2013-04-07 19:47:51 +02:00
Siarzhuk Zharski
b249a7ce43 Fix CID991683: Uninitalized scalar field
fOldTitleUSerDefined was (surprice-surprice!) not defined.
2013-04-07 19:47:39 +02:00
Siarzhuk Zharski
34a1a44dad Fix CID609944: Uninitialized scalar field
Default constructor for UTF8Char has not initialize it's data.
2013-04-07 19:46:57 +02:00
Siarzhuk Zharski
0d75239fb7 Fix CID991133: Same if expression was duplicated 2013-04-07 19:46:12 +02:00
Siarzhuk Zharski
4755a0794e Fix CID992335,CID992334: Check FindRef/String returns
Satisfy Coverity by checking return values of FindRef and FindString
calls for fSavedMessage.

Resolves CID992335 and CID992334.
2013-04-07 19:46:00 +02:00
John Scipione
9f2cce2faa Eliminate repeating CountItems() loop premature micro-optimization
Loop backwards if possible, if not, set a variable and use that instead.
There were a couple of instances where the loop style got changed from
    for (int32 i = CountItems(); --i >= 0;)
to
    for (int32 i = CountItems() - 1; i >= 0; i--) {
but should be functionally equivalent.
hrev45460
2013-04-07 13:01:29 -04:00
Alexander von Gluck IV
7cb974614f NetworkSetup: Use std max vs max_c hrev45459 2013-04-07 11:16:24 -05:00
John Scipione
17c9912b90 Another tweak, make the left diagonal arrows flush left.
This moves the left up and left down arrows 1px to the left so that they are
flush with the left side of the container they're drawn in.
hrev45458
2013-04-07 11:40:22 -04:00
John Scipione
348cd0c5de Tweak the diagonal arrows so they are square hrev45457 2013-04-07 04:03:00 -04:00
John Scipione
e6b6af80bd Fix a crash bug I introduced to Deskbar last commit
Need to set fLastClickedItem to NULL so it doesn't point to a deleted item.
Sorry about that.
hrev45456
2013-04-07 03:29:11 -04:00
John Scipione
5b0fd10d23 Animate the expander arrow
On MouseDown draw a diagonal arrow, on MouseUp complete the animation and
expand. If you hold down the button it will stay diagonal until you MouseUp
and either return to normal or animate and expand if over the arrow.

Reformatted ExpandoMenuBar.h and TeamMenuItem.h
Renamed fLastClickItem to fLastClickedItem
Added a DrawExpanderArrow() method
Renamed private InitData() method to _InitData() and moved it to the bottom
hrev45455
2013-04-07 03:02:05 -04:00
John Scipione
1b41173c8a Add diagonal arrows to ControlLook DrawArrowShape() method 2013-04-07 03:02:01 -04:00
John Scipione
c6b72ad6e4 Tiny style fix, thanks Axel 2013-04-07 03:02:00 -04:00
Alexander von Gluck IV
2895c48c12 NetworkSetup: Add stats and wifi network name
* Add ability for fSettings to pass on network
  stats
* Show KB Sent / Received for interface
* Drop the wireless / wired tab name.
  (we are going to need another tab for wifi)
* Add wifi network name to connection field
  if interface is wifi.
hrev45454
2013-04-07 06:44:37 +00:00
Alexander von Gluck IV
960bf9918b NetworkSetup: Cleanup headers; No functional change 2013-04-07 05:41:04 +00:00
Alexander von Gluck IV
93708c3da3 NetworkSetup: Spelling: Wirless -> Wireless 2013-04-07 05:16:50 +00:00
Alexander von Gluck IV
04b7652fea NetworkSetup: Build fix. max vs max_c
* max can only be used in C apps.
  C++ apps use max_c
2013-04-07 05:15:22 +00:00
John Scipione
542de916c4 Add and use an _Init() method for BarTeamInfo hrev45453 2013-04-06 22:45:33 -04:00
John Scipione
de49a051ea Update expander arrows to point right or down (if expanded)
... like BeOS R5. I looked in the commmit logs for this one and there wasn't really any
explination for why this got changed, so, I'm changing it back to the way it was in R5 which
is right arrow for unexpanded, down arrow for expanded. Please yell at me if this change
was intentional.
hrev45452
2013-04-06 22:12:47 -04:00
John Scipione
9bc3b671fb Fix a bug involving the Vulcan Death Grip closing the wrong app
If you have expander turned on with expanded apps and you quickly remove teams with the VDG
you can remove a team not under your mouse pointer, instead you remote the team above. This
is because the window watcher thread hasn't updated yet so the TeamItemAtPoint() method
reads a window menu item instead of the team item. The solution is to lock the window
watcher thread and explicitly remove the window menu items in RemoveTeam().

This bug can be really bad if you accidentially VDG Tracker as your system gets hosed until
you restart Tracker or reboot.
2013-04-06 22:12:46 -04:00
Rene Gollent
e257ac49cb Add human-readable formatting for area protection/locking flags. hrev45451 2013-04-06 20:38:04 -04:00
John Scipione
ab3c19541d Move B_COLOR_WHICH_COUNT to private ServerReadOnlyMemory header.
This means the B_COLOR_WHICH_COUNT goes from being a public constant to a
private one. It sill looks like a public constant starting with a B_ though.
I hope that's not a big deal. Too bad we can't get the count of an enum.
hrev45450
2013-04-06 17:13:36 -04:00
Stefano Ceccherini
cb5f68f44c Don't open a socket, since we don't use it.
Also removed fSocket from the class.
hrev45449
2013-04-06 19:36:52 +02:00
Jerome Duval
0837d6c650 GCC4 cross tools: builds with ppl and cloog when --use-gcc-graphite is given hrev45448 2013-04-06 14:32:12 +02:00
Jerome Duval
ed38d2efcc Forgot to add the usage for --use-gcc-graphite hrev45447 2013-04-06 14:07:24 +02:00
Jerome Duval
748c10f222 Added a configure option to activate Graphite compilations flags
* check if GCC actually supports Graphite flags when the option
  --use-gcc-graphite is used
hrev45446
2013-04-06 13:58:46 +02:00
Niels Sascha Reedijk
f18ed048c2 Update translations from Pootle hrev45445 2013-04-06 06:27:13 +02:00
John Scipione
3302521556 Remove dependence on color constants in ServerReadOnlyMemory.
This fixes a maintainance problem where you have to update this otherwise
unrelated file to keep it in sync whenever you add a color constant.

I've added a B_COLOR_WHICH_COUNT constant to the color_which enum which should
be updated to point to the newest color constants as new ones are added. I
reworked ServerReadOnlyMemory to use this constant instead of using to the
current largest color constant directly. If you use B_COLOR_WHICH_COUNT to
refer to a color in your code expect to get unpredictable and nonsensical
results. Most likely you'll get an undefined result which will return black
but don't depend on it.

The net effect of this is that ServerReadOnlyMemory doesn't need to be updated
anymore when new color constants are introduced but will continue to produce
correct results.

Eliminate kNumColors constant, replace it with B_COLOR_WHICH_COUNT
hrev45444
2013-04-05 22:46:22 -04:00
John Scipione
9f24981a56 Add B_SCROLL_BAR_THUMB_COLOR constant.
This allows you to change the scrollbar thumb color in Appearance preferences.
The default color is 216, 216, 216 so the scroll bar thumb looks the same by
default. Perhaps someday this can be updated to something a bit more colorful.
hrev45443
2013-04-05 19:26:41 -04:00
Rene Gollent
631624fb01 Dump semaphore information in reports.
Implements final part of #9510.
hrev45442
2013-04-05 09:43:22 -04:00
Rene Gollent
81ccf71fa2 Fix x86-64 build. 2013-04-05 09:42:56 -04:00
Rene Gollent
dbf6921a9f Extend DebuggerInterface for semaphore information retrieval. 2013-04-05 09:34:01 -04:00
Rene Gollent
dcbc00c3cf Add model classes for representing semaphore information. 2013-04-05 09:29:40 -04:00
Rene Gollent
adf25fc437 Dump area information in reports.
Implements part of #9510.
hrev45441
2013-04-05 09:12:51 -04:00
Rene Gollent
6d1e057cac Extend DebuggerInterface for area information retrieval. 2013-04-05 09:11:57 -04:00
Rene Gollent
a5e54e1bcf Add model classes for representing area information. 2013-04-05 09:11:56 -04:00
Alexander von Gluck IV
57419ce54f usb_asix: style cleanup
* While I was in the neighbourhood
* No functional change
hrev45440
2013-04-04 23:36:16 -05:00
Alexander von Gluck IV
b208c3fa3b usb_asix: clean up some registers
* No functional change
2013-04-04 23:36:16 -05:00
John Scipione
2cfeb3ca9c Update StyledEdit to use document background color. Style fixes.
See ticket #5293 Colors_picture2.png
hrev45439
2013-04-04 21:00:28 -04:00
Pawel Dziepak
a8f8d2c057 x86_64: put user stack and team data at top of user address space 2013-04-04 20:54:56 +02:00
Pawel Dziepak
4cafc0acab runtime_loader: use long type for region delta 2013-04-04 20:54:13 +02:00
Pawel Dziepak
65ed4fa908 vm: implement B_RANDOMIZED_IMAGE_ADDRESS address specification
On some 64 bit architectures program and library images have to be mapped in
the lower 2 GB of the address space (due to instruction pointer relative
addressing). Address specification B_RANDOMIZED_IMAGE_ADDRESS ensures that
created area satisfies that requirement.
2013-04-04 20:54:02 +02:00
Pawel Dziepak
f697412ff8 vm: place commpage and team data near the top of user address space
Placing commpage and team user data somewhere at the top of the user accessible
virtual address space prevents these areas from conflicting with elf images
that require to be mapped at exact address (in most cases: runtime_loader).
2013-04-04 15:27:24 +02:00
Pawel Dziepak
ffbf0328d2 debug: update debug kit to correctly recognize commpage 2013-04-04 15:27:23 +02:00
Pawel Dziepak
e85e399fd7 commpage: randomize position of commpage
This patch introduces randomization of commpage position. From now on commpage
table contains offsets from begining to of the commpage to the particular
commpage entry. Similary addresses of symbols in ELF memory image "commpage"
are just offsets from the begining of the commpage.

This patch also updates KDL so that commpage entries are recognized and shown
correctly in stack trace. An update of Debugger is yet to be done.
2013-04-04 15:27:22 +02:00
Pawel Dziepak
966f207668 x86: enable data execution prevention
Set execute disable bit for any page that belongs to area with neither
B_EXECUTE_AREA nor B_KERNEL_EXECUTE_AREA set.

In order to take advanage of NX bit in 32 bit protected mode PAE must be
enabled. Thus, from now on it is also enabled when the CPU supports NX bit.

vm_page_fault() takes additional argument which indicates whether page fault
was caused by an illegal instruction fetch.
2013-04-04 15:22:23 +02:00
Pawel Dziepak
211f71325a x86: move x86_userspace_thread_exit() from user stack to commpage
x86_userspace_thread_exit() is a stub originally placed at the bottom of
each thread user stack that ensures any thread invokes exit_thread() upon
returning from its main higher level function.

Putting anything that is expected to be executed on a stack causes problems
when implementing data execution prevention. Code of x86_userspace_thread_exit()
is now moved to commpage which seems to be much more appropriate place for it.
2013-04-04 15:16:27 +02:00
Pawel Dziepak
537d84a07c libroot: randomize position of areas created by mmap()
When mmap() is invoked without specifying address hint B_RANDOMIZED_ANY_ADDRESS
is used.
Otherwise, unless MAP_FIXED flag is set (which requires mmap() to return an area
positioned exactly at given address), B_RANDOMIZED_BASE_ADDRESS is used.
2013-04-04 15:16:26 +02:00
Pawel Dziepak
02cceebe40 team: randomize position of team user data
When forking a process team user data area is not cloned but a new one is
created instead. However, the new one has to be at exactly the same address
parent's team user data area is. When process is exec then team user data
area may be recreated at random position.

This patch also make sure that instances of struct user_thread in team user
data are each in separate cache line in order to prevent false sharing since
these data are very likely to be accessed simultaneously from threads executing
on different CPUs. This change however reduces the number of threads process
can create. It is fixed by reserving 512kB of address space in case team user
data area needs to grow.
2013-04-04 15:16:25 +02:00
Pawel Dziepak
0cf91fc14f runtime_loader: randomize position of relocatable images
Use B_RANDOMIZED_BASE for creating areas for relocatable segments.
2013-04-04 15:16:24 +02:00