"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xitk/xine-toolkit/skin.c" between
xine-ui-0.99.13.tar.bz2 and xine-ui-0.99.14.tar.bz2

About: xine is a free video player which plays mpeg-2 and mpeg-1 video, DVDs (unlocked/unencrypted only), video CDs, SVCDs, and AVI files (using Win32 codecs) with synchronized audio and video, and optionally fullscreen using the Xv extensions in Xfree86 4.x (user interface).

skin.c  (xine-ui-0.99.13.tar.bz2):skin.c  (xine-ui-0.99.14.tar.bz2)
/* /*
* Copyright (C) 2000-2021 the xine project * Copyright (C) 2000-2022 the xine project
* *
* This file is part of xine, a unix video player. * This file is part of xine, a unix video player.
* *
* xine is free software; you can redistribute it and/or modify * xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* xine is distributed in the hope that it will be useful, * xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 111 skipping to change at line 111
static void _skin_load_img (xitk_skin_config_t *skonfig, xitk_part_image_t *imag e, const char *pixmap, const char *format) { static void _skin_load_img (xitk_skin_config_t *skonfig, xitk_part_image_t *imag e, const char *pixmap, const char *format) {
char nbuf[2048], *key; char nbuf[2048], *key;
size_t nlen; size_t nlen;
int try; int try;
if (!skonfig || !pixmap) if (!skonfig || !pixmap)
return; return;
/* for part read and database keys, omit path. */ /* for part read and database keys, omit path. */
nbuf[0] = 0; nbuf[0] = 0;
nlen = strlen (pixmap); nlen = xitk_find_byte (pixmap, 0);
if (2 + skonfig->plen + 1 + nlen + 1 > sizeof (nbuf)) if (2 + skonfig->plen + 1 + nlen + 1 > sizeof (nbuf))
return; return;
key = nbuf + 2 + skonfig->plen + 1; key = nbuf + 2 + skonfig->plen + 1;
memcpy (key, pixmap, nlen + 1); memcpy (key, pixmap, nlen + 1);
if (image) { if (image) {
image->x = image->y = image->width = image->height = 0; image->x = image->y = image->width = image->height = 0;
image->image = NULL; image->image = NULL;
} }
skipping to change at line 347 skipping to change at line 347
} else if ((l == 9) && !strncmp ((const char *)start, "SKIN_NAME", 9)) { } else if ((l == 9) && !strncmp ((const char *)start, "SKIN_NAME", 9)) {
val = skonfig->sbuf + skonfig->name; val = skonfig->sbuf + skonfig->name;
} else if ((l == 9) && !strncmp ((const char *)start, "SKIN_DATE", 9)) { } else if ((l == 9) && !strncmp ((const char *)start, "SKIN_DATE", 9)) {
val = skonfig->sbuf + skonfig->date; val = skonfig->sbuf + skonfig->date;
} else if ((l == 8) && !strncmp ((const char *)start, "SKIN_URL", 8)) { } else if ((l == 8) && !strncmp ((const char *)start, "SKIN_URL", 8)) {
val = skonfig->sbuf + skonfig->url; val = skonfig->sbuf + skonfig->url;
} else if ((l == 4) && !strncmp ((const char *)start, "HOME", 4)) { } else if ((l == 4) && !strncmp ((const char *)start, "HOME", 4)) {
val = xine_get_homedir (); val = xine_get_homedir ();
} }
if (val) { if (val) {
l = strlen (val); l = xitk_find_byte (val, 0);
if (l > e - q) if (l > e - q)
l = e - q; l = e - q;
if (l > 0) { if (l > 0) {
memcpy (q, val, l); q += l; memcpy (q, val, l); q += l;
} }
} }
} }
*q = 0; *q = 0;
if (num_vars > 0) if (num_vars > 0)
return _skin_strdup (skonfig, (const char *)buf); return _skin_strdup (skonfig, (const char *)buf);
skipping to change at line 611 skipping to change at line 611
skin_free_imgs (skonfig); skin_free_imgs (skonfig);
xine_sarray_delete (skonfig->imgs); xine_sarray_delete (skonfig->imgs);
pthread_mutex_unlock (&skonfig->skin_mutex); pthread_mutex_unlock (&skonfig->skin_mutex);
pthread_mutex_destroy (&skonfig->skin_mutex); pthread_mutex_destroy (&skonfig->skin_mutex);
XITK_FREE(skonfig); XITK_FREE(skonfig);
} }
static int _skin_string_index (const char * const *list, size_t size, const char typedef enum {
*s) { _K_NONE = 0,
uint32_t b = 0, e = size; _K_align,
_K_animation,
do { _K_author,
uint32_t m = (b + e) >> 1; _K_browser,
int d = strcmp (s, list[m]); _K_color,
_K_color_click,
if (d < 0) _K_color_focus,
e = m; _K_coords,
else if (d > 0) _K_date,
b = m + 1; _K_direction,
else _K_enable,
return m; _K_entries,
} while (b != e); _K_font,
return -1; _K_label,
_K_length,
_K_load_command,
_K_logo,
_K_max_buttons,
_K_name,
_K_pixmap,
_K_pixmap_focus,
_K_pixmap_format,
_K_print,
_K_radius,
_K_slider,
_K_static,
_K_step,
_K_timer,
_K_type,
_K_unload_command,
_K_url,
_K_version,
_K_visible,
_K_x,
_K_y,
_K_LAST
} _skin_key_t;
static _skin_key_t _skin_key_index (const char *key, unsigned int klen) {
switch (klen) {
int d;
case 1:
if (key[0] == 'x')
return _K_x;
if (key[0] == 'y')
return _K_y;
break;
case 3:
if (!memcmp (key, "url", 3))
return _K_url;
break;
case 4:
d = memcmp (key, "logo", 4);
if (d == 0)
return _K_logo;
if (d < 0) {
if (!memcmp (key, "date", 4))
return _K_date;
if (!memcmp (key, "font", 4))
return _K_font;
} else {
if (!memcmp (key, "name", 4))
return _K_name;
if (!memcmp (key, "step", 4))
return _K_step;
if (!memcmp (key, "type", 4))
return _K_type;
}
break;
case 5:
d = memcmp (key, "label", 5);
if (d == 0)
return _K_label;
if (d < 0) {
if (!memcmp (key, "align", 5))
return _K_align;
if (!memcmp (key, "color", 5))
return _K_color;
} else {
if (!memcmp (key, "print", 5))
return _K_print;
if (!memcmp (key, "timer", 5))
return _K_timer;
}
break;
case 6:
d = memcmp (key, "length", 6);
if (d == 0)
return _K_length;
if (d < 0) {
d = memcmp (key, "coords", 6);
if (d == 0)
return _K_coords;
if (d < 0) {
if (!memcmp (key, "author", 6))
return _K_author;
} else {
if (!memcmp (key, "enable", 6))
return _K_enable;
}
} else {
d = memcmp (key, "slider", 6);
if (d == 0)
return _K_slider;
if (d < 0) {
if (!memcmp (key, "radius", 6))
return _K_radius;
if (!memcmp (key, "pixmap", 6))
return _K_pixmap;
} else {
if (!memcmp (key, "static", 6))
return _K_static;
}
}
break;
case 7:
if (!memcmp (key, "browser", 7))
return _K_browser;
if (!memcmp (key, "entries", 7))
return _K_entries;
if (!memcmp (key, "version", 7))
return _K_version;
if (!memcmp (key, "visible", 7))
return _K_visible;
break;
case 9:
if (!memcmp (key, "animation", 9))
return _K_animation;
if (!memcmp (key, "direction", 9))
return _K_direction;
break;
case 11:
if (!memcmp (key, "color_click", 11))
return _K_color_click;
if (!memcmp (key, "color_focus", 11))
return _K_color_focus;
if (!memcmp (key, "max_buttons", 11))
return _K_max_buttons;
break;
case 12:
if (!memcmp (key, "load_command", 12))
return _K_load_command;
if (!memcmp (key, "pixmap_focus", 12))
return _K_pixmap_focus;
break;
case 13:
if (!memcmp (key, "pixmap_format", 13))
return _K_pixmap_format;
break;
case 14:
if (!memcmp (key, "unload_command", 14))
return _K_unload_command;
break;
default: ;
}
return _K_NONE;
} }
typedef enum {
_KT_string = 0,
_KT_int,
_KT_bool,
_KT_color,
_KT_LAST
} _skin_key_type_t;
static const uint8_t _skin_key_types[_K_LAST] = {
/* [_K_animation] can be string or bool. */
[_K_color] = _KT_color,
[_K_color_click] = _KT_color,
[_K_color_focus] = _KT_color,
[_K_enable] = _KT_bool,
[_K_entries] = _KT_int,
[_K_length] = _KT_int,
[_K_max_buttons] = _KT_int,
[_K_print] = _KT_bool,
[_K_radius] = _KT_int,
[_K_static] = _KT_bool,
[_K_step] = _KT_int,
[_K_timer] = _KT_int,
[_K_version] = _KT_int,
[_K_visible] = _KT_bool,
[_K_x] = _KT_int,
[_K_y] = _KT_int
};
static void _skin_parse_2 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree, xitk_cfg_parse_t *sub) { static void _skin_parse_2 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree, xitk_cfg_parse_t *sub) {
const char *key = text + sub->key, *val = text + sub->value; const char *val = text + sub->value;
xitk_skin_element_t *s = skonfig->celement; xitk_skin_element_t *s = skonfig->celement;
static const char * const list1[] = { _skin_key_t n = sub->key;
"browser",
"coords",
"direction",
"enable",
"label",
"max_buttons",
"pixmap",
"slider",
"visible"
};
int n = _skin_string_index (list1, sizeof (list1) / sizeof (list1[0]), key);
switch (n) { switch (n) {
case 0: { /* browser */ case _K_browser:
{
xitk_cfg_parse_t *sub2; xitk_cfg_parse_t *sub2;
for (sub2 = sub->first_child ? tree + sub->first_child : NULL; sub2; sub for (sub2 = tree + sub->first_child; sub2 != tree; sub2 = tree + sub2->n
2 = sub2->next ? tree + sub2->next : NULL) { ext) {
const char *key2 = text + sub2->key, *val2 = text + sub2->value; if ((_skin_key_t)sub2->key == _K_entries)
s->info.browser_entries = sub2->value;
if (!strcmp (key2, "entries"))
s->info.browser_entries = xitk_str2int32 (&val2);
} }
} }
break; break;
case 1: { /* coords */ case _K_coords:
{
xitk_cfg_parse_t *sub2; xitk_cfg_parse_t *sub2;
for (sub2 = sub->first_child ? tree + sub->first_child : NULL; sub2; sub for (sub2 = tree + sub->first_child; sub2 != tree; sub2 = tree + sub2->n
2 = sub2->next ? tree + sub2->next : NULL) { ext) {
const char *key2 = text + sub2->key, *val2 = text + sub2->value; n = sub2->key;
switch (n) {
if (!strcmp (key2, "x")) case _K_x:
s->info.x = xitk_str2int32 (&val2); s->info.x = sub2->value;
else if (!strcmp (key2, "y")) break;
s->info.y = xitk_str2int32 (&val2); case _K_y:
s->info.y = sub2->value;
break;
default: ;
}
} }
} }
break; break;
case 2: /* direction */ case _K_direction:
s->info.direction = skin_get_direction (val); s->info.direction = skin_get_direction (val);
break; break;
case 3: /* enable */ case _K_enable:
s->info.enability = xitk_get_bool_value (val); s->info.enability = sub->value;
break; break;
case 4: { /* label */ case _K_label:
{
xitk_cfg_parse_t *sub2; xitk_cfg_parse_t *sub2;
static const char * const list2[] = {
"align",
"animation",
"color",
"color_click",
"color_focus",
"font",
"length",
"pixmap",
"pixmap_focus",
"pixmap_format",
"print",
"static",
"step",
"timer",
"y"
};
s->info.label_y = 0; s->info.label_y = 0;
s->info.label_printable = 1; s->info.label_printable = 1;
s->info.label_animation_step = 1; s->info.label_animation_step = 1;
s->info.label_animation_timer = xitk_get_cfg_num (skonfig->xitk, XITK_TI MER_LABEL_ANIM); s->info.label_animation_timer = xitk_get_cfg_num (skonfig->xitk, XITK_TI MER_LABEL_ANIM);
s->info.label_alignment = ALIGN_CENTER; s->info.label_alignment = ALIGN_CENTER;
for (sub2 = sub->first_child ? tree + sub->first_child : NULL; sub2; sub for (sub2 = tree + sub->first_child; sub2 != tree; sub2 = tree + sub2->n
2 = sub2->next ? tree + sub2->next : NULL) { ext) {
const char *key2 = text + sub2->key, *val2 = text + sub2->value; const char *val2 = text + sub2->value;
n = _skin_string_index (list2, sizeof (list2) / sizeof (list2[0]), key 2); n = sub2->key;
switch (n) { switch (n) {
case 0: /* align */ case _K_align:
s->info.label_alignment = skin_get_align_value (val2); s->info.label_alignment = skin_get_align_value (val2);
break; break;
case 1: /* animation */ case _K_animation:
s->info.label_animation = xitk_get_bool_value (val2); s->info.label_animation = xitk_get_bool_value (val2);
break; break;
case 2: /* color */ case _K_color:
s->info.label_color = xitk_get_color_name (val2); s->info.label_color = sub2->value;
break; break;
case 3: /* color_click */ case _K_color_click:
s->info.label_color_click = xitk_get_color_name (val2); s->info.label_color_click = sub2->value;
break; break;
case 4: /* color_focus */ case _K_color_focus:
s->info.label_color_focus = xitk_get_color_name (val2); s->info.label_color_focus = sub2->value;
break; break;
case 5: /* font */ case _K_font:
s->info.label_fontname = skonfig->sbuf + _skin_strdup (skonfig, va l2); s->info.label_fontname = skonfig->sbuf + _skin_strdup (skonfig, va l2);
break; break;
case 6: /* length */ case _K_length:
s->info.label_length = xitk_str2int32 (&val2); s->info.label_length = sub2->value;
break; break;
case 7: /* pixmap */ case _K_pixmap:
s->info.label_pixmap_font_name = skonfig->sbuf + _skin_strdup (sko nfig, val2); s->info.label_pixmap_font_name = skonfig->sbuf + _skin_strdup (sko nfig, val2);
if (s->info.label_pixmap_font_name[0]) if (s->info.label_pixmap_font_name[0])
_skin_load_img (skonfig, NULL, s->info.label_pixmap_font_name, s ->info.label_pixmap_font_format); _skin_load_img (skonfig, NULL, s->info.label_pixmap_font_name, s ->info.label_pixmap_font_format);
break; break;
case 8: /* pixmap_focus */ case _K_pixmap_focus:
s->info.label_pixmap_highlight_font_name = skonfig->sbuf + _skin_s trdup (skonfig, val2); s->info.label_pixmap_highlight_font_name = skonfig->sbuf + _skin_s trdup (skonfig, val2);
if (s->info.label_pixmap_highlight_font_name[0]) if (s->info.label_pixmap_highlight_font_name[0])
_skin_load_img (skonfig, NULL, s->info.label_pixmap_highlight_fo nt_name, s->info.label_pixmap_font_format); _skin_load_img (skonfig, NULL, s->info.label_pixmap_highlight_fo nt_name, s->info.label_pixmap_font_format);
break; break;
case 9: /* pixmap_format */ case _K_pixmap_format:
if (!s->info.label_pixmap_font_format) { if (!s->info.label_pixmap_font_format) {
s->info.label_pixmap_font_format = skonfig->sbuf + _skin_strdup (skonfig, val2); s->info.label_pixmap_font_format = skonfig->sbuf + _skin_strdup (skonfig, val2);
_skin_load_img (skonfig, NULL, s->info.label_pixmap_font_name, s ->info.label_pixmap_font_format); _skin_load_img (skonfig, NULL, s->info.label_pixmap_font_name, s ->info.label_pixmap_font_format);
} }
break; break;
case 10: /* print */ case _K_print:
s->info.label_printable = xitk_get_bool_value (val2); s->info.label_printable = sub2->value;
break; break;
case 11: /* static */ case _K_static:
s->info.label_staticity = xitk_get_bool_value (val2); s->info.label_staticity = sub2->value;
break; break;
case 12: /* step */ case _K_step:
s->info.label_animation_step = xitk_str2int32 (&val2); s->info.label_animation_step = sub2->value;
break; break;
case 13: /* timer */ case _K_timer:
s->info.label_animation_timer = xitk_str2int32 (&val2); s->info.label_animation_timer = sub2->value;
break; break;
case 14: /* y */ case _K_y:
s->info.label_y = xitk_str2int32 (&val2); s->info.label_y = sub2->value;
break; break;
default: ;
} }
} }
} }
break; break;
case 5: /* max_buttons */ case _K_max_buttons:
s->info.max_buttons = xitk_str2int32 (&val); s->info.max_buttons = sub->value;
break; break;
case 6: /* pixmap */ case _K_pixmap:
s->info.pixmap_name = skonfig->sbuf + _skin_strdup (skonfig, val); s->info.pixmap_name = skonfig->sbuf + _skin_strdup (skonfig, val);
break; break;
case 7: { /* slider */ case _K_slider:
{
xitk_cfg_parse_t *sub2; xitk_cfg_parse_t *sub2;
for (sub2 = sub->first_child ? tree + sub->first_child : NULL; sub2; sub for (sub2 = tree + sub->first_child; sub2 != tree; sub2 = tree + sub2->n
2 = sub2->next ? tree + sub2->next : NULL) { ext) {
const char *key2 = text + sub2->key, *val2 = text + sub2->value; const char *val2 = text + sub2->value;
if (!strcmp (key2, "pixmap")) { n = sub2->key;
skonfig->celement->info.slider_pixmap_pad_name = skonfig->sbuf + _sk switch (n) {
in_strdup (skonfig, val2); case _K_pixmap:
} else if (!strcmp (key2, "radius")) { skonfig->celement->info.slider_pixmap_pad_name = skonfig->sbuf + _
skonfig->celement->info.slider_radius = xitk_str2int32 (&val2); skin_strdup (skonfig, val2);
} else if (!strcmp (key2, "type")) { break;
s->info.slider_type = skin_get_slider_type (val2); case _K_radius:
skonfig->celement->info.slider_radius = sub2->value;
break;
case _K_type:
s->info.slider_type = skin_get_slider_type (val2);
break;
default: ;
} }
} }
} }
break; break;
case 8: /* visible */ case _K_visible:
s->info.visibility = xitk_get_bool_value (val); s->info.visibility = sub->value;
break; break;
default: ;
} }
} }
static void _skin_parse_1 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree, xitk_cfg_parse_t *entry) { static void _skin_parse_1 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree, xitk_cfg_parse_t *entry) {
const char *key = text + entry->key, *val = text + entry->value; const char *val = text + entry->value;
if (entry->first_child) { if (entry->first_child) {
const char *key = text + entry->key;
xitk_skin_element_t *s = xitk_xmalloc (sizeof (*s)); xitk_skin_element_t *s = xitk_xmalloc (sizeof (*s));
if (s) { if (s) {
xitk_cfg_parse_t *sub; xitk_cfg_parse_t *sub;
_nullify_me (s); _nullify_me (s);
skonfig->celement = s; skonfig->celement = s;
/* xitk_cfg_parse () already lowercased this key. */ /* xitk_cfg_parse () already lowercased this key. */
strlcpy (s->section, key, sizeof (s->section)); strlcpy (s->section, key, sizeof (s->section));
s->info.visibility = s->info.enability = 1; s->info.visibility = s->info.enability = 1;
xine_sarray_add (skonfig->elements, s); xine_sarray_add (skonfig->elements, s);
for (sub = tree + entry->first_child; sub; sub = sub->next ? tree + sub->n ext : NULL) { for (sub = tree + entry->first_child; sub != tree; sub = tree + sub->next) {
_skin_parse_2 (skonfig, text, tree, sub); _skin_parse_2 (skonfig, text, tree, sub);
} }
} }
} else { } else {
static const char * const list1[] = { _skin_key_t n = entry->key;
"animation",
"author",
"date",
"load_command",
"logo",
"name",
"unload_command",
"url",
"version"
};
int n = _skin_string_index (list1, sizeof (list1) / sizeof (list1[0]), key);
switch (n) { switch (n) {
case 0: /* animation */ case _K_animation:
skonfig->animation = _skin_strdup (skonfig, val); skonfig->animation = _skin_strdup (skonfig, val);
break; break;
case 1: /* author */ case _K_author:
skonfig->author = _skin_strdup (skonfig, val); skonfig->author = _skin_strdup (skonfig, val);
break; break;
case 2: /* date */ case _K_date:
skonfig->date = _skin_strdup (skonfig, val); skonfig->date = _skin_strdup (skonfig, val);
break; break;
case 3: /* load_command */ case _K_load_command:
skonfig->load_command = _expanded (skonfig, val); skonfig->load_command = _expanded (skonfig, val);
break; break;
case 4: /* logo */ case _K_logo:
skonfig->logo = _expanded (skonfig, val); skonfig->logo = _expanded (skonfig, val);
break; break;
case 5: /* name */ case _K_name:
skonfig->name = _skin_strdup (skonfig, val); skonfig->name = _skin_strdup (skonfig, val);
break; break;
case 6: /* unload_command */ case _K_unload_command:
skonfig->unload_command = _expanded (skonfig, val); skonfig->unload_command = _expanded (skonfig, val);
break; break;
case 7: /* url */ case _K_url:
skonfig->url = _skin_strdup (skonfig, val); skonfig->url = _skin_strdup (skonfig, val);
break; break;
case 8: /* version */ case _K_version:
skonfig->version = xitk_str2int32 (&val); skonfig->version = entry->value;
break; break;
default: default: ;
XITK_WARNING ("wrong section entry found: '%s'\n", key);
} }
} }
} }
static void _skin_parse_0 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree) { static void _skin_parse_0 (xitk_skin_config_t *skonfig, char *text, xitk_cfg_par se_t *tree) {
xitk_cfg_parse_t *entry; xitk_cfg_parse_t *entry;
for (entry = tree->first_child ? tree + tree->first_child : NULL; entry; for (entry = tree + tree->first_child; entry != tree; entry = tree + entry->ne
entry = entry->next ? tree + entry->next : NULL) { xt) {
char *key = text + entry->key;
if (!strncmp (key, "skin.", 5)) { if (entry->key >= 0)
entry->key += 5;
_skin_parse_1 (skonfig, text, tree, entry); _skin_parse_1 (skonfig, text, tree, entry);
}
} }
} }
/* /*
* Load the skin configfile. * Load the skin configfile.
*/ */
int xitk_skin_load_config(xitk_skin_config_t *skonfig, const char *path, const c har *filename) { int xitk_skin_load_config(xitk_skin_config_t *skonfig, const char *path, const c har *filename) {
char buf[2048], *text; char buf[2048], *text;
size_t fsize = 2 << 20; size_t fsize = 2 << 20;
xitk_cfg_parse_t *tree; xitk_cfg_parse_t *tree;
skipping to change at line 904 skipping to change at line 1046
return 0; return 0;
} }
tree = xitk_cfg_parse (text, /* XITK_CFG_PARSE_DEBUG */ 0); tree = xitk_cfg_parse (text, /* XITK_CFG_PARSE_DEBUG */ 0);
if (!tree) { if (!tree) {
xitk_cfg_unload (text); xitk_cfg_unload (text);
pthread_mutex_unlock (&skonfig->skin_mutex); pthread_mutex_unlock (&skonfig->skin_mutex);
return 0; return 0;
} }
{
int i;
for (i = 1; i < tree[0].key; i++) {
if (tree[i].level == 1) {
if (memcmp (text + tree[i].key, "skin.", 5)) {
tree[i].key = -1;
continue;
}
tree[i].key += 5, tree[i].klen -= 5;
if (tree[i].first_child)
continue;
}
tree[i].key = _skin_key_index (text + tree[i].key, tree[i].klen);
switch (_skin_key_types[tree[i].key]) {
const char *v;
case _KT_int:
v = text + tree[i].value;
tree[i].value = xitk_str2int32 (&v);
break;
case _KT_bool:
v = text + tree[i].value;
tree[i].value = xitk_get_bool_value (v);
break;
case _KT_color:
v = text + tree[i].value;
tree[i].value = xitk_get_color_name (v);
break;
default: ;
}
}
}
_skin_parse_0 (skonfig, text, tree); _skin_parse_0 (skonfig, text, tree);
xitk_cfg_unparse (tree); xitk_cfg_unparse (tree);
xitk_cfg_unload (text); xitk_cfg_unload (text);
if (!skonfig->celement) { if (!skonfig->celement) {
XITK_WARNING("%s(): no valid skin element found in '%s/%s'.\n", XITK_WARNING("%s(): no valid skin element found in '%s/%s'.\n",
__FUNCTION__, skonfig->sbuf + skonfig->path, skonfig->sbuf + sko nfig->skinfile); __FUNCTION__, skonfig->sbuf + skonfig->path, skonfig->sbuf + sko nfig->skinfile);
pthread_mutex_unlock (&skonfig->skin_mutex); pthread_mutex_unlock (&skonfig->skin_mutex);
return 0; return 0;
 End of changes. 58 change blocks. 
145 lines changed or deleted 321 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)