Commit f39547f5 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dxof: Uncomment some traces and use better name for some variables.

parent edf46d91
...@@ -647,7 +647,6 @@ static WORD parse_TOKEN(parse_buffer * buf) ...@@ -647,7 +647,6 @@ static WORD parse_TOKEN(parse_buffer * buf)
char c; char c;
if (!read_bytes(buf, &c, 1)) if (!read_bytes(buf, &c, 1))
return TOKEN_NONE; return TOKEN_NONE;
/*TRACE("char = '%c'\n", is_space(c) ? ' ' : c);*/
if ((c == '#') || (c == '/')) if ((c == '#') || (c == '/'))
{ {
/* Handle comment (# or //) */ /* Handle comment (# or //) */
...@@ -766,16 +765,14 @@ static WORD parse_TOKEN(parse_buffer * buf) ...@@ -766,16 +765,14 @@ static WORD parse_TOKEN(parse_buffer * buf)
case TOKEN_NAME: case TOKEN_NAME:
{ {
DWORD count; DWORD count;
char strname[100]; char *name = (char*)buf->value;
if (!read_bytes(buf, &count, 4)) if (!read_bytes(buf, &count, 4))
return TOKEN_ERROR; return TOKEN_ERROR;
if (!read_bytes(buf, strname, count)) if (!read_bytes(buf, name, count))
return TOKEN_ERROR; return TOKEN_ERROR;
strname[count] = 0; name[count] = 0;
/*TRACE("name = %s\n", strname);*/ TRACE("name = %s\n", name);
strcpy((char*)buf->value, strname);
} }
break; break;
case TOKEN_INTEGER: case TOKEN_INTEGER:
...@@ -784,7 +781,7 @@ static WORD parse_TOKEN(parse_buffer * buf) ...@@ -784,7 +781,7 @@ static WORD parse_TOKEN(parse_buffer * buf)
if (!read_bytes(buf, &integer, 4)) if (!read_bytes(buf, &integer, 4))
return TOKEN_ERROR; return TOKEN_ERROR;
/*TRACE("integer = %ld\n", integer);*/ TRACE("integer = %u\n", integer);
*(DWORD*)buf->value = integer; *(DWORD*)buf->value = integer;
} }
...@@ -799,7 +796,7 @@ static WORD parse_TOKEN(parse_buffer * buf) ...@@ -799,7 +796,7 @@ static WORD parse_TOKEN(parse_buffer * buf)
sprintf(strguid, CLSIDFMT, class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0], sprintf(strguid, CLSIDFMT, class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0],
class_id.Data4[1], class_id.Data4[2], class_id.Data4[3], class_id.Data4[4], class_id.Data4[5], class_id.Data4[1], class_id.Data4[2], class_id.Data4[3], class_id.Data4[4], class_id.Data4[5],
class_id.Data4[6], class_id.Data4[7]); class_id.Data4[6], class_id.Data4[7]);
/*TRACE("guid = {%s}\n", strguid);*/ TRACE("guid = %s\n", strguid);
*(GUID*)buf->value = class_id; *(GUID*)buf->value = class_id;
} }
...@@ -808,19 +805,19 @@ static WORD parse_TOKEN(parse_buffer * buf) ...@@ -808,19 +805,19 @@ static WORD parse_TOKEN(parse_buffer * buf)
{ {
DWORD count; DWORD count;
WORD tmp_token; WORD tmp_token;
char strname[100]; char *string = (char*)buf->value;
if (!read_bytes(buf, &count, 4)) if (!read_bytes(buf, &count, 4))
return TOKEN_ERROR; return TOKEN_ERROR;
if (!read_bytes(buf, strname, count)) if (!read_bytes(buf, string, count))
return TOKEN_ERROR; return TOKEN_ERROR;
strname[count] = 0; string[count] = 0;
if (!read_bytes(buf, &tmp_token, 2)) if (!read_bytes(buf, &tmp_token, 2))
return TOKEN_ERROR; return TOKEN_ERROR;
if ((tmp_token != TOKEN_COMMA) && (tmp_token != TOKEN_SEMICOLON)) if ((tmp_token != TOKEN_COMMA) && (tmp_token != TOKEN_SEMICOLON))
ERR("No comma or semicolon (got %d)\n", tmp_token); ERR("No comma or semicolon (got %d)\n", tmp_token);
/*TRACE("name = %s\n", strname);*/ TRACE("string = %s\n", string);
strcpy((char*)buf->value, strname);
token = TOKEN_LPSTR; token = TOKEN_LPSTR;
} }
break; break;
......
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