Commit e30bb829 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

d3dxof: Reorder some functions to avoid forward declarations.

parent d2701051
......@@ -36,10 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
static const char* get_primitive_string(WORD token);
static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional);
static WORD check_TOKEN(parse_buffer * buf);
#define TOKEN_NAME 1
#define TOKEN_STRING 2
#define TOKEN_INTEGER 3
......@@ -74,6 +70,40 @@ static WORD check_TOKEN(parse_buffer * buf);
#define CLSIDFMT "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>"
static const char* get_primitive_string(WORD token)
{
switch(token)
{
case TOKEN_WORD:
return "WORD";
case TOKEN_DWORD:
return "DWORD";
case TOKEN_FLOAT:
return "FLOAT";
case TOKEN_DOUBLE:
return "DOUBLE";
case TOKEN_CHAR:
return "CHAR";
case TOKEN_UCHAR:
return "UCHAR";
case TOKEN_SWORD:
return "SWORD";
case TOKEN_SDWORD:
return "SDWORD";
case TOKEN_VOID:
return "VOID";
case TOKEN_LPSTR:
return "STRING";
case TOKEN_UNICODE:
return "UNICODE";
case TOKEN_CSTRING:
return "CSTRING ";
default:
break;
}
return NULL;
}
void dump_template(xtemplate* templates_array, xtemplate* ptemplate)
{
int j, k;
......@@ -115,11 +145,6 @@ void dump_template(xtemplate* templates_array, xtemplate* ptemplate)
DPRINTF("}\n");
}
BOOL is_template_available(parse_buffer * buf)
{
return check_TOKEN(buf) == TOKEN_TEMPLATE;
}
BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size)
{
if (buf->rem_bytes < size)
......@@ -683,40 +708,6 @@ static WORD parse_TOKEN(parse_buffer * buf)
return token;
}
static const char* get_primitive_string(WORD token)
{
switch(token)
{
case TOKEN_WORD:
return "WORD";
case TOKEN_DWORD:
return "DWORD";
case TOKEN_FLOAT:
return "FLOAT";
case TOKEN_DOUBLE:
return "DOUBLE";
case TOKEN_CHAR:
return "CHAR";
case TOKEN_UCHAR:
return "UCHAR";
case TOKEN_SWORD:
return "SWORD";
case TOKEN_SDWORD:
return "SDWORD";
case TOKEN_VOID:
return "VOID";
case TOKEN_LPSTR:
return "STRING";
case TOKEN_UNICODE:
return "UNICODE";
case TOKEN_CSTRING:
return "CSTRING ";
default:
break;
}
return NULL;
}
static WORD get_TOKEN(parse_buffer * buf)
{
if (buf->token_present)
......@@ -741,6 +732,11 @@ static WORD check_TOKEN(parse_buffer * buf)
return buf->current_token;
}
BOOL is_template_available(parse_buffer * buf)
{
return check_TOKEN(buf) == TOKEN_TEMPLATE;
}
static inline BOOL is_primitive_type(WORD token)
{
BOOL ret;
......@@ -984,6 +980,7 @@ BOOL parse_template(parse_buffer * buf)
return TRUE;
}
static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional);
static BOOL parse_object_members_list(parse_buffer * buf)
{
DWORD token;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment