Automatic white space cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28459 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-11-02 11:30:41 +00:00
parent b5c3e3f430
commit 03973d27eb
14 changed files with 92 additions and 89 deletions

View File

@ -182,8 +182,8 @@ get_raw_movement(movement_maker *move, uint32 posX, uint32 posY)
// calculate mean
for (i = 0; i < move->n_points; i++) {
meanXOld+= move->historyX[i];
meanYOld+= move->historyY[i];
meanXOld += move->historyX[i];
meanYOld += move->historyY[i];
}
if (move->n_points == 0) {
meanXOld = posX;
@ -221,9 +221,9 @@ compute_acceleration(movement_maker *move, int8 accel_factor)
{
// acceleration
float acceleration = 1;
if (accel_factor) {
acceleration = 1 + sqrtf(move->xDelta * move->xDelta + move->yDelta * move->yDelta)
* accel_factor / 50.0;
if (accel_factor != 0) {
acceleration = 1 + sqrtf(move->xDelta * move->xDelta
+ move->yDelta * move->yDelta) * accel_factor / 50.0;
}
move->xDelta = make_small(move->xDelta * acceleration);

View File

@ -11,8 +11,7 @@ float ceilf(float x);
float sqrtf(float x);
int32 make_small(float value);
typedef struct
{
typedef struct {
int32 xDelta;
int32 yDelta;

View File

@ -31,7 +31,8 @@ struct packet_buffer {
struct packet_buffer *
create_packet_buffer(size_t size)
{
struct packet_buffer *buffer = (packet_buffer *)malloc(sizeof(packet_buffer));
struct packet_buffer *buffer
= (packet_buffer *)malloc(sizeof(packet_buffer));
if (buffer == NULL)
return NULL;
@ -126,7 +127,8 @@ packet_buffer_read(struct packet_buffer *buffer, uint8 *data, size_t length)
size_t
packet_buffer_write(struct packet_buffer *buffer, const uint8 *data, size_t length)
packet_buffer_write(struct packet_buffer *buffer, const uint8 *data,
size_t length)
{
cpu_status state = disable_interrupts();
acquire_spinlock(&buffer->lock);

View File

@ -23,8 +23,10 @@ void packet_buffer_clear(struct packet_buffer *buffer);
size_t packet_buffer_readable(struct packet_buffer *buffer);
size_t packet_buffer_writable(struct packet_buffer *buffer);
void packet_buffer_flush(struct packet_buffer *buffer, size_t bytes);
size_t packet_buffer_read(struct packet_buffer *buffer, uint8 *data, size_t length);
size_t packet_buffer_write(struct packet_buffer *buffer, const uint8 *data, size_t length);
size_t packet_buffer_read(struct packet_buffer *buffer, uint8 *data, size_t
length);
size_t packet_buffer_write(struct packet_buffer *buffer, const uint8 *data,
size_t length);
#ifdef __cplusplus
}

View File

@ -102,7 +102,7 @@ ps2_dev_detect_pointing(ps2_dev *dev, device_hooks **hooks)
// probe devices
// the probe function has to set the dev name and the dev packet size
#if 0
#if 1
status = probe_trackpoint(dev);
if (status == B_OK) {
*hooks = &gStandardMouseDeviceHooks;