Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4678 → Rev 4688

/branches/dd/uspace/srv/console/console.c
173,7 → 173,7
}
}
 
int ccap_fb_to_con(int ccap_fb, int *ccap_con)
static int ccap_fb_to_con(int ccap_fb, int *ccap_con)
{
switch (ccap_fb) {
case FB_CCAP_NONE: *ccap_con = CONSOLE_CCAP_NONE; break;
/branches/dd/uspace/srv/fb/fb.c
289,28 → 289,38
bgr_888(dst, mask ? 0xffffff : 0);
}
 
static void bgr_555(void *dst, uint32_t rgb)
static void rgb_555_be(void *dst, uint32_t rgb)
{
uint8_t hi = (BLUE(rgb, 5) | (GREEN(rgb, 5) << 5)) & 0xff;
uint8_t lo = (GREEN(rgb, 5) >> 3) | (RED(rgb, 5) << 2);
*((uint16_t *) dst) = host2uint16_t_be((hi << 8) | lo);
*((uint16_t *) dst) = host2uint16_t_be(RED(rgb, 5) << 10 |
GREEN(rgb, 5) << 5 | BLUE(rgb, 5));
}
 
static void mask_555(void *dst, bool mask)
static void rgb_555_le(void *dst, uint32_t rgb)
{
bgr_555(dst, mask ? 0xffffff : 0);
*((uint16_t *) dst) = host2uint16_t_le(RED(rgb, 5) << 10 |
GREEN(rgb, 5) << 5 | BLUE(rgb, 5));
}
 
static void bgr_565(void *dst, uint32_t rgb)
static void rgb_565_be(void *dst, uint32_t rgb)
{
uint8_t hi = (BLUE(rgb, 5) | (GREEN(rgb, 6) << 5)) & 0xff;
uint8_t lo = (GREEN(rgb, 6) >> 3) | (RED(rgb, 5) << 3);
*((uint16_t *) dst) = host2uint16_t_be((hi << 8) | lo);
*((uint16_t *) dst) = host2uint16_t_be(RED(rgb, 5) << 11 |
GREEN(rgb, 6) << 5 | BLUE(rgb, 5));
}
 
static void rgb_565_le(void *dst, uint32_t rgb)
{
*((uint16_t *) dst) = host2uint16_t_le(RED(rgb, 5) << 11 |
GREEN(rgb, 6) << 5 | BLUE(rgb, 5));
}
 
static void mask_555(void *dst, bool mask)
{
rgb_555_be(dst, mask ? 0xffffff : 0);
}
 
static void mask_565(void *dst, bool mask)
{
bgr_565(dst, mask ? 0xffffff : 0);
rgb_565_be(dst, mask ? 0xffffff : 0);
}
 
static void bgr_323(void *dst, uint32_t rgb)
621,16 → 631,26
screen.mask_conv = mask_323;
screen.pixelbytes = 1;
break;
case VISUAL_BGR_5_5_5:
screen.rgb_conv = bgr_555;
case VISUAL_RGB_5_5_5_LE:
screen.rgb_conv = rgb_555_le;
screen.mask_conv = mask_555;
screen.pixelbytes = 2;
break;
case VISUAL_BGR_5_6_5:
screen.rgb_conv = bgr_565;
case VISUAL_RGB_5_5_5_BE:
screen.rgb_conv = rgb_555_be;
screen.mask_conv = mask_555;
screen.pixelbytes = 2;
break;
case VISUAL_RGB_5_6_5_LE:
screen.rgb_conv = rgb_565_le;
screen.mask_conv = mask_565;
screen.pixelbytes = 2;
break;
case VISUAL_RGB_5_6_5_BE:
screen.rgb_conv = rgb_565_be;
screen.mask_conv = mask_565;
screen.pixelbytes = 2;
break;
case VISUAL_RGB_8_8_8:
screen.rgb_conv = rgb_888;
screen.mask_conv = mask_888;
/branches/dd/uspace/srv/fs/fat/fat_ops.c
402,7 → 402,7
fat_dentry_t *d;
fat_bs_t *bs;
block_t *b;
int i, j;
unsigned i, j;
uint16_t bps;
unsigned dps;
unsigned blocks;
/branches/dd/uspace/srv/devmap/devmap.c
546,12 → 546,12
ipc_answer_0(iid, EOK);
size_t name_size = str_size(device->name);
/* FIXME:
* We have no channel from DEVMAP to client, therefore
* sending must be initiated by client.
*
* size_t name_size = str_size(device->name);
*
* int rc = ipc_data_write_send(phone, device->name, name_size);
* if (rc != EOK) {
* async_wait_for(req, NULL);
/branches/dd/uspace/srv/vfs/vfs_ops.c
306,7 → 306,7
}
 
/* Check the offered options size. */
if (size < 0 || size > MAX_MNTOPTS_LEN) {
if (size > MAX_MNTOPTS_LEN) {
ipc_answer_0(callid, EINVAL);
ipc_answer_0(rid, EINVAL);
free(mp);
447,6 → 447,9
int oflag = IPC_GET_ARG2(*request);
int mode = IPC_GET_ARG3(*request);
size_t len;
 
/* Ignore mode for now. */
(void) mode;
/*
* Make sure that we are called with exactly one of L_FILE and
1052,6 → 1055,9
return;
}
path[len] = '\0';
 
/* Ignore mode for now. */
(void) mode;
fibril_rwlock_write_lock(&namespace_rwlock);
int lflag = L_DIRECTORY | L_CREATE | L_EXCLUSIVE;