Module: wine Branch: master Commit: e79b7473525326c902c022e685c80495761cd493 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e79b7473525326c902c022e685...
Author: Christian Costa titan.costa@wanadoo.fr Date: Mon Sep 1 23:21:52 2008 +0200
d3dxof: Handle comments in templates text format.
---
dlls/d3dxof/d3dxof.c | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 494907c..c2a5624 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -226,7 +226,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV goto error; }
- if (header[2] == XOFFILE_FORMAT_TEXT) + if (header[2] == XOFFILE_FORMAT_BINARY) { FIXME("Binary format not supported yet\n"); hr = DXFILEERR_NOTDONEYET; @@ -560,6 +560,24 @@ static WORD parse_TOKEN_dbg_opt(parse_buffer * buf, BOOL show_token) if (!read_bytes(buf, &c, 1)) return 0; /*TRACE("char = '%c'\n", is_space(c) ? ' ' : c);*/ + if ((c == '#') || (c == '/')) + { + /* Handle comment (# or //) */ + if (c == '/') + { + if (!read_bytes(buf, &c, 1)) + return 0; + if (c != '/') + return 0; + } + c = 0; + while (c != 0x0A) + { + if (!read_bytes(buf, &c, 1)) + return 0; + } + continue; + } if (is_space(c)) continue; if (is_operator(c) && (c != '<'))