forked from len0rd/rockbox
Added skin_parser library to build system. Fixed some warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26884 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db658d9840
commit
f1a144a077
6 changed files with 34 additions and 18 deletions
5
lib/skin_parser/SOURCES
Normal file
5
lib/skin_parser/SOURCES
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
skin_buffer.c
|
||||||
|
skin_parser.c
|
||||||
|
skin_debug.c
|
||||||
|
skin_scan.c
|
||||||
|
tag_table.c
|
|
@ -29,22 +29,11 @@
|
||||||
static unsigned char buffer[SKIN_BUFFER_SIZE];
|
static unsigned char buffer[SKIN_BUFFER_SIZE];
|
||||||
static unsigned char *buffer_front = NULL; /* start of the free space,
|
static unsigned char *buffer_front = NULL; /* start of the free space,
|
||||||
increases with allocation*/
|
increases with allocation*/
|
||||||
static size_t buf_size = SKIN_BUFFER_SIZE;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void skin_buffer_init(size_t size)
|
void skin_buffer_init(void)
|
||||||
{
|
{
|
||||||
#if 0 /* this will go in again later probably */
|
#if defined(ROCKBOX)
|
||||||
if (buffer == NULL)
|
|
||||||
{
|
|
||||||
buf_size = SKIN_BUFFER_SIZE;/* global_settings.skin_buf_size */
|
|
||||||
|
|
||||||
buffer = buffer_alloc(buf_size);
|
|
||||||
buffer_front = buffer;
|
|
||||||
buffer_back = bufer + buf_size;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#elif defined(ROCKBOX)
|
|
||||||
{
|
{
|
||||||
/* reset the buffer.... */
|
/* reset the buffer.... */
|
||||||
buffer_front = buffer;
|
buffer_front = buffer;
|
||||||
|
|
|
@ -99,6 +99,7 @@ void skin_clear_errors()
|
||||||
error_message = NULL;
|
error_message = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ROCKBOX
|
||||||
void skin_debug_tree(struct skin_element* root)
|
void skin_debug_tree(struct skin_element* root)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -260,3 +261,4 @@ void skin_debug_indent()
|
||||||
for(i = 0; i < debug_indent_level; i++)
|
for(i = 0; i < debug_indent_level; i++)
|
||||||
printf(" ");
|
printf(" ");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -32,14 +32,14 @@ extern "C"
|
||||||
|
|
||||||
/* Debugging functions */
|
/* Debugging functions */
|
||||||
void skin_error(enum skin_errorcode error);
|
void skin_error(enum skin_errorcode error);
|
||||||
int skin_error_line();
|
int skin_error_line(void);
|
||||||
char* skin_error_message();
|
char* skin_error_message(void);
|
||||||
void skin_clear_errors();
|
void skin_clear_errors(void);
|
||||||
void skin_debug_tree(struct skin_element* root);
|
void skin_debug_tree(struct skin_element* root);
|
||||||
|
|
||||||
/* Auxiliary debug functions */
|
/* Auxiliary debug functions */
|
||||||
void skin_debug_params(int count, struct skin_tag_parameter params[]);
|
void skin_debug_params(int count, struct skin_tag_parameter params[]);
|
||||||
void skin_debug_indent();
|
void skin_debug_indent(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ struct skin_element* skin_parse(const char* document);
|
||||||
|
|
||||||
/* Memory management functions */
|
/* Memory management functions */
|
||||||
char *skin_alloc(size_t size);
|
char *skin_alloc(size_t size);
|
||||||
struct skin_element* skin_alloc_element();
|
struct skin_element* skin_alloc_element(void);
|
||||||
struct skin_element** skin_alloc_children(int count);
|
struct skin_element** skin_alloc_children(int count);
|
||||||
struct skin_tag_parameter* skin_alloc_params(int count);
|
struct skin_tag_parameter* skin_alloc_params(int count);
|
||||||
char* skin_alloc_string(int length);
|
char* skin_alloc_string(int length);
|
||||||
|
|
20
lib/skin_parser/skin_parser.make
Normal file
20
lib/skin_parser/skin_parser.make
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
#
|
||||||
|
SKINP_DIR = $(ROOTDIR)/lib/skin_parser
|
||||||
|
SKINP_SRC = $(call preprocess, $(SKINP_DIR)/SOURCES)
|
||||||
|
SKINP_OBJ := $(call c2obj, $(SKINP_SRC))
|
||||||
|
|
||||||
|
OTHER_SRC += $(SKINP_SRC)
|
||||||
|
|
||||||
|
SKINLIB = $(BUILDDIR)/libskin_parser.a
|
||||||
|
|
||||||
|
INCLUDES += -I$(SKINP_DIR)
|
||||||
|
|
||||||
|
$(SKINLIB): $(SKINP_OBJ)
|
||||||
|
$(SILENT)$(shell rm -f $@)
|
||||||
|
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
|
Loading…
Add table
Add a link
Reference in a new issue