* *
***************************************************************************/
-#include "config.h"
-#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
-#include "wine/unicode.h"
+#include "winnls.h"
#include "chm_lib.h"
#include "lzx.h"
return NULL;
/* check if it is the right name */
- if (! strcmpiW(buffer, objPath))
+ if (! wcsicmp(buffer, objPath))
return temp;
_chm_skip_PMGL_entry_data(&cur);
return -1;
/* check if it is the right name */
- if (strcmpiW(buffer, objPath) > 0)
+ if (wcsicmp(buffer, objPath) > 0)
return page;
/* load next value for path */
/* data request not satisfied, so... start up the decompressor machine */
if (! h->lzx_state)
{
- int window_size = ffs(h->window_size) - 1;
h->lzx_last_block = -1;
- h->lzx_state = LZXinit(window_size);
+ h->lzx_state = LZXinit(h->window_size);
}
/* decompress some data */
/* initialize pathname state */
lstrcpynW(prefixRectified, prefix, CHM_MAX_PATHLEN);
- prefixLen = strlenW(prefixRectified);
+ prefixLen = lstrlenW(prefixRectified);
if (prefixLen != 0)
{
if (prefixRectified[prefixLen-1] != '/')
/* check if we should start */
if (! it_has_begun)
{
- if (ui.length == 0 && strncmpiW(ui.path, prefixRectified, prefixLen) == 0)
+ if (ui.length == 0 && _wcsnicmp(ui.path, prefixRectified, prefixLen) == 0)
it_has_begun = TRUE;
else
continue;
/* check if we should stop */
else
{
- if (strncmpiW(ui.path, prefixRectified, prefixLen) != 0)
+ if (_wcsnicmp(ui.path, prefixRectified, prefixLen) != 0)
{
HeapFree(GetProcessHeap(), 0, page_buf);
return TRUE;
/* check if we should include this path */
if (lastPathLen != -1)
{
- if (strncmpiW(ui.path, lastPath, lastPathLen) == 0)
+ if (_wcsnicmp(ui.path, lastPath, lastPathLen) == 0)
continue;
}
- strcpyW(lastPath, ui.path);
- lastPathLen = strlenW(lastPath);
+ lstrcpyW(lastPath, ui.path);
+ lastPathLen = lstrlenW(lastPath);
/* get the length of the path */
- ui_path_len = strlenW(ui.path)-1;
+ ui_path_len = lstrlenW(ui.path)-1;
/* check for DIRS */
if (ui.path[ui_path_len] == '/' && !(what & CHM_ENUMERATE_DIRS))