ReactOS  0.4.14-dev-77-gd9e7c48
mlang.c File Reference
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ole2.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "mlang.h"
#include "mimeole.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "initguid.h"
Include dependency graph for mlang.c:

Go to the source code of this file.

Classes

struct  MIME_CP_INFO
 
struct  mlang_data
 
struct  font_list
 
struct  IClassFactoryImpl
 
struct  object_creation_info
 
struct  tagMLang_impl
 
struct  tagEnumCodePage_impl
 
struct  tagEnumScript_impl
 
struct  tagEnumRfc1766_impl
 
struct  enum_locales_data
 
struct  convert_charset
 

Macros

#define COBJMACROS
 
#define HANKATA(A)   ((A >= 161) && (A <= 223))
 
#define ISEUC(A)   ((A >= 161) && (A <= 254))
 
#define NOTEUC(A, B)   (((A >= 129) && (A <= 159)) && ((B >= 64) && (B <= 160)))
 
#define SJIS1(A)   (((A >= 129) && (A <= 159)) || ((A >= 224) && (A <= 239)))
 
#define SJIS2(A)   ((A >= 64) && (A <= 252))
 
#define ISMARU(A)   ((A >= 202) && (A <= 206))
 
#define ISNIGORI(A)   (((A >= 182) && (A <= 196)) || ((A >= 202) && (A <= 206)))
 

Typedefs

typedef struct tagMLang_impl MLang_impl
 
typedef struct tagEnumCodePage_impl EnumCodePage_impl
 
typedef struct tagEnumScript_impl EnumScript_impl
 
typedef struct tagEnumRfc1766_impl EnumRfc1766_impl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mlang)
 
static HRESULT MultiLanguage_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
static HRESULT MLangConvertCharset_create (IUnknown *outer, void **obj)
 
static HRESULT EnumRfc1766_create (LANGID LangId, IEnumRfc1766 **ppEnum)
 
static void fill_cp_info (const struct mlang_data *ml_data, UINT index, MIMECPINFO *mime_cp_info)
 
static UINT DetectJapaneseCode (LPCSTR input, DWORD count)
 
static void jis2sjis (unsigned char *p1, unsigned char *p2)
 
static void sjis2jis (unsigned char *p1, unsigned char *p2)
 
static int han2zen (unsigned char *p1, unsigned char *p2)
 
static UINT ConvertJIS2SJIS (LPCSTR input, DWORD count, LPSTR output)
 
static int exit_shift (LPSTR out, int c)
 
static int enter_shift (LPSTR out, int c)
 
static UINT ConvertSJIS2JIS (LPCSTR input, DWORD count, LPSTR output)
 
static UINT ConvertJISJapaneseToUnicode (LPCSTR input, DWORD count, LPWSTR output, DWORD out_count)
 
static UINT ConvertUnknownJapaneseToUnicode (LPCSTR input, DWORD count, LPWSTR output, DWORD out_count)
 
static UINT ConvertJapaneseUnicodeToJIS (LPCWSTR input, DWORD count, LPSTR output, DWORD out_count)
 
static void LockModule (void)
 
static void UnlockModule (void)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 
HRESULT WINAPI ConvertINetMultiByteToUnicode (LPDWORD pdwMode, DWORD dwEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPWSTR pDstStr, LPINT pcDstSize)
 
HRESULT WINAPI ConvertINetUnicodeToMultiByte (LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
 
HRESULT WINAPI ConvertINetString (LPDWORD pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
 
static HRESULT GetFamilyCodePage (UINT uiCodePage, UINT *puiFamilyCodePage)
 
HRESULT WINAPI IsConvertINetStringAvailable (DWORD dwSrcEncoding, DWORD dwDstEncoding)
 
static HRESULT lcid_to_rfc1766A (LCID lcid, LPSTR rfc1766, INT len)
 
static HRESULT lcid_to_rfc1766W (LCID lcid, LPWSTR rfc1766, INT len)
 
HRESULT WINAPI LcidToRfc1766A (LCID lcid, LPSTR pszRfc1766, INT nChar)
 
HRESULT WINAPI LcidToRfc1766W (LCID lcid, LPWSTR pszRfc1766, INT nChar)
 
static HRESULT lcid_from_rfc1766 (IEnumRfc1766 *iface, LCID *lcid, LPCWSTR rfc1766)
 
HRESULT WINAPI Rfc1766ToLcidW (LCID *pLocale, LPCWSTR pszRfc1766)
 
HRESULT WINAPI Rfc1766ToLcidA (LCID *lcid, LPCSTR rfc1766A)
 
static HRESULT map_font (HDC hdc, DWORD codepages, HFONT src_font, HFONT *dst_font)
 
static HRESULT release_font (HFONT font)
 
static HRESULT clear_font_cache (void)
 
static IClassFactoryImplimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI MLANGCF_QueryInterface (IClassFactory *iface, REFIID riid, void **ppobj)
 
static ULONG WINAPI MLANGCF_AddRef (IClassFactory *iface)
 
static ULONG WINAPI MLANGCF_Release (IClassFactory *iface)
 
static HRESULT WINAPI MLANGCF_CreateInstance (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppobj)
 
static HRESULT WINAPI MLANGCF_LockServer (IClassFactory *iface, BOOL dolock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
static EnumCodePage_implimpl_from_IEnumCodePage (IEnumCodePage *iface)
 
static HRESULT WINAPI fnIEnumCodePage_QueryInterface (IEnumCodePage *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIEnumCodePage_AddRef (IEnumCodePage *iface)
 
static ULONG WINAPI fnIEnumCodePage_Release (IEnumCodePage *iface)
 
static HRESULT WINAPI fnIEnumCodePage_Clone (IEnumCodePage *iface, IEnumCodePage **ppEnum)
 
static HRESULT WINAPI fnIEnumCodePage_Next (IEnumCodePage *iface, ULONG celt, PMIMECPINFO rgelt, ULONG *pceltFetched)
 
static HRESULT WINAPI fnIEnumCodePage_Reset (IEnumCodePage *iface)
 
static HRESULT WINAPI fnIEnumCodePage_Skip (IEnumCodePage *iface, ULONG celt)
 
static HRESULT EnumCodePage_create (MLang_impl *mlang, DWORD grfFlags, LANGID LangId, IEnumCodePage **ppEnumCodePage)
 
static EnumScript_implimpl_from_IEnumScript (IEnumScript *iface)
 
static HRESULT WINAPI fnIEnumScript_QueryInterface (IEnumScript *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIEnumScript_AddRef (IEnumScript *iface)
 
static ULONG WINAPI fnIEnumScript_Release (IEnumScript *iface)
 
static HRESULT WINAPI fnIEnumScript_Clone (IEnumScript *iface, IEnumScript **ppEnum)
 
static HRESULT WINAPI fnIEnumScript_Next (IEnumScript *iface, ULONG celt, PSCRIPTINFO rgelt, ULONG *pceltFetched)
 
static HRESULT WINAPI fnIEnumScript_Reset (IEnumScript *iface)
 
static HRESULT WINAPI fnIEnumScript_Skip (IEnumScript *iface, ULONG celt)
 
static HRESULT EnumScript_create (MLang_impl *mlang, DWORD dwFlags, LANGID LangId, IEnumScript **ppEnumScript)
 
static MLang_implimpl_from_IMLangFontLink (IMLangFontLink *iface)
 
static HRESULT WINAPI fnIMLangFontLink_QueryInterface (IMLangFontLink *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIMLangFontLink_AddRef (IMLangFontLink *iface)
 
static ULONG WINAPI fnIMLangFontLink_Release (IMLangFontLink *iface)
 
static HRESULT WINAPI fnIMLangFontLink_GetCharCodePages (IMLangFontLink *iface, WCHAR ch_src, DWORD *codepages)
 
static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages (IMLangFontLink *iface, const WCHAR *src, LONG src_len, DWORD priority_cp, DWORD *codepages, LONG *ret_len)
 
static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages (IMLangFontLink *iface, UINT codepage, DWORD *codepages)
 
static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage (IMLangFontLink *iface, DWORD codepages, UINT def_codepage, UINT *codepage)
 
static HRESULT WINAPI fnIMLangFontLink_GetFontCodePages (IMLangFontLink *iface, HDC hdc, HFONT hfont, DWORD *codepages)
 
static HRESULT WINAPI fnIMLangFontLink_MapFont (IMLangFontLink *iface, HDC hDC, DWORD dwCodePages, HFONT hSrcFont, HFONT *phDestFont)
 
static HRESULT WINAPI fnIMLangFontLink_ReleaseFont (IMLangFontLink *iface, HFONT hFont)
 
static HRESULT WINAPI fnIMLangFontLink_ResetFontMapping (IMLangFontLink *iface)
 
static MLang_implimpl_from_IMultiLanguage (IMultiLanguage *iface)
 
static HRESULT WINAPI fnIMultiLanguage_QueryInterface (IMultiLanguage *iface, REFIID riid, void **obj)
 
static ULONG WINAPI fnIMultiLanguage_AddRef (IMultiLanguage *iface)
 
static ULONG WINAPI fnIMultiLanguage_Release (IMultiLanguage *iface)
 
static HRESULT WINAPI fnIMultiLanguage_GetNumberOfCodePageInfo (IMultiLanguage *iface, UINT *cp)
 
static HRESULT WINAPI fnIMultiLanguage_GetCodePageInfo (IMultiLanguage *iface, UINT uiCodePage, PMIMECPINFO pCodePageInfo)
 
static HRESULT WINAPI fnIMultiLanguage_GetFamilyCodePage (IMultiLanguage *iface, UINT cp, UINT *family_cp)
 
static HRESULT WINAPI fnIMultiLanguage_EnumCodePages (IMultiLanguage *iface, DWORD grfFlags, IEnumCodePage **ppEnumCodePage)
 
static HRESULT WINAPI fnIMultiLanguage_GetCharsetInfo (IMultiLanguage *iface, BSTR Charset, PMIMECSETINFO pCharsetInfo)
 
static HRESULT WINAPI fnIMultiLanguage_IsConvertible (IMultiLanguage *iface, DWORD src_enc, DWORD dst_enc)
 
static HRESULT WINAPI fnIMultiLanguage_ConvertString (IMultiLanguage *iface, DWORD *mode, DWORD src_enc, DWORD dst_enc, BYTE *src, UINT *src_size, BYTE *dest, UINT *dest_size)
 
static HRESULT WINAPI fnIMultiLanguage_ConvertStringToUnicode (IMultiLanguage *iface, DWORD *mode, DWORD src_enc, CHAR *src, UINT *src_size, WCHAR *dest, UINT *dest_size)
 
static HRESULT WINAPI fnIMultiLanguage_ConvertStringFromUnicode (IMultiLanguage *iface, DWORD *mode, DWORD encoding, WCHAR *src, UINT *src_size, CHAR *dest, UINT *dest_size)
 
static HRESULT WINAPI fnIMultiLanguage_ConvertStringReset (IMultiLanguage *iface)
 
static HRESULT WINAPI fnIMultiLanguage_GetRfc1766FromLcid (IMultiLanguage *iface, LCID lcid, BSTR *pbstrRfc1766)
 
static HRESULT WINAPI fnIMultiLanguage_GetLcidFromRfc1766 (IMultiLanguage *iface, LCID *locale, BSTR rfc1766)
 
static EnumRfc1766_implimpl_from_IEnumRfc1766 (IEnumRfc1766 *iface)
 
static HRESULT WINAPI fnIEnumRfc1766_QueryInterface (IEnumRfc1766 *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIEnumRfc1766_AddRef (IEnumRfc1766 *iface)
 
static ULONG WINAPI fnIEnumRfc1766_Release (IEnumRfc1766 *iface)
 
static HRESULT WINAPI fnIEnumRfc1766_Clone (IEnumRfc1766 *iface, IEnumRfc1766 **ppEnum)
 
static HRESULT WINAPI fnIEnumRfc1766_Next (IEnumRfc1766 *iface, ULONG celt, PRFC1766INFO rgelt, ULONG *pceltFetched)
 
static HRESULT WINAPI fnIEnumRfc1766_Reset (IEnumRfc1766 *iface)
 
static HRESULT WINAPI fnIEnumRfc1766_Skip (IEnumRfc1766 *iface, ULONG celt)
 
static BOOL CALLBACK enum_locales_proc (LPWSTR locale)
 
static HRESULT WINAPI fnIMultiLanguage_EnumRfc1766 (IMultiLanguage *iface, IEnumRfc1766 **ppEnumRfc1766)
 
static HRESULT WINAPI fnIMultiLanguage_GetRfc1766Info (IMultiLanguage *iface, LCID Locale, PRFC1766INFO pRfc1766Info)
 
static HRESULT WINAPI fnIMultiLanguage_CreateConvertCharset (IMultiLanguage *iface, UINT src_cp, UINT dst_cp, DWORD prop, IMLangConvertCharset **convert_charset)
 
static MLang_implimpl_from_IMultiLanguage3 (IMultiLanguage3 *iface)
 
static HRESULT WINAPI fnIMultiLanguage3_QueryInterface (IMultiLanguage3 *iface, REFIID riid, void **obj)
 
static ULONG WINAPI fnIMultiLanguage3_AddRef (IMultiLanguage3 *iface)
 
static ULONG WINAPI fnIMultiLanguage3_Release (IMultiLanguage3 *iface)
 
static HRESULT WINAPI fnIMultiLanguage3_GetNumberOfCodePageInfo (IMultiLanguage3 *iface, UINT *pcCodePage)
 
static HRESULT WINAPI fnIMultiLanguage3_GetCodePageInfo (IMultiLanguage3 *iface, UINT uiCodePage, LANGID LangId, PMIMECPINFO pCodePageInfo)
 
static HRESULT WINAPI fnIMultiLanguage3_GetFamilyCodePage (IMultiLanguage3 *iface, UINT uiCodePage, UINT *puiFamilyCodePage)
 
static HRESULT WINAPI fnIMultiLanguage3_EnumCodePages (IMultiLanguage3 *iface, DWORD grfFlags, LANGID LangId, IEnumCodePage **ppEnumCodePage)
 
static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo (IMultiLanguage3 *iface, BSTR Charset, PMIMECSETINFO pCharsetInfo)
 
static HRESULT WINAPI fnIMultiLanguage3_IsConvertible (IMultiLanguage3 *iface, DWORD dwSrcEncoding, DWORD dwDstEncoding)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertString (IMultiLanguage3 *iface, DWORD *pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, BYTE *pSrcStr, UINT *pcSrcSize, BYTE *pDstStr, UINT *pcDstSize)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringToUnicode (IMultiLanguage3 *iface, DWORD *pdwMode, DWORD dwEncoding, CHAR *pSrcStr, UINT *pcSrcSize, WCHAR *pDstStr, UINT *pcDstSize)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringFromUnicode (IMultiLanguage3 *iface, DWORD *pdwMode, DWORD dwEncoding, WCHAR *pSrcStr, UINT *pcSrcSize, CHAR *pDstStr, UINT *pcDstSize)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringReset (IMultiLanguage3 *iface)
 
static HRESULT WINAPI fnIMultiLanguage3_GetRfc1766FromLcid (IMultiLanguage3 *iface, LCID lcid, BSTR *pbstrRfc1766)
 
static HRESULT WINAPI fnIMultiLanguage3_GetLcidFromRfc1766 (IMultiLanguage3 *iface, LCID *pLocale, BSTR bstrRfc1766)
 
static HRESULT WINAPI fnIMultiLanguage3_EnumRfc1766 (IMultiLanguage3 *iface, LANGID LangId, IEnumRfc1766 **ppEnumRfc1766)
 
static HRESULT WINAPI fnIMultiLanguage3_GetRfc1766Info (IMultiLanguage3 *iface, LCID Locale, LANGID LangId, PRFC1766INFO pRfc1766Info)
 
static HRESULT WINAPI fnIMultiLanguage3_CreateConvertCharset (IMultiLanguage3 *iface, UINT src_cp, UINT dst_cp, DWORD prop, IMLangConvertCharset **convert_charset)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringInIStream (IMultiLanguage3 *iface, DWORD *pdwMode, DWORD dwFlag, WCHAR *lpFallBack, DWORD dwSrcEncoding, DWORD dwDstEncoding, IStream *pstmIn, IStream *pstmOut)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringToUnicodeEx (IMultiLanguage3 *iface, DWORD *pdwMode, DWORD dwEncoding, CHAR *pSrcStr, UINT *pcSrcSize, WCHAR *pDstStr, UINT *pcDstSize, DWORD dwFlag, WCHAR *lpFallBack)
 
static HRESULT WINAPI fnIMultiLanguage3_ConvertStringFromUnicodeEx (IMultiLanguage3 *This, DWORD *pdwMode, DWORD dwEncoding, WCHAR *pSrcStr, UINT *pcSrcSize, CHAR *pDstStr, UINT *pcDstSize, DWORD dwFlag, WCHAR *lpFallBack)
 
static HRESULT WINAPI fnIMultiLanguage3_DetectCodepageInIStream (IMultiLanguage3 *iface, DWORD dwFlag, DWORD dwPrefWinCodePage, IStream *pstmIn, DetectEncodingInfo *lpEncoding, INT *pnScores)
 
static HRESULT WINAPI fnIMultiLanguage3_DetectInputCodepage (IMultiLanguage3 *iface, DWORD dwFlag, DWORD dwPrefWinCodePage, CHAR *pSrcStr, INT *pcSrcSize, DetectEncodingInfo *lpEncoding, INT *pnScores)
 
static HRESULT WINAPI fnIMultiLanguage3_ValidateCodePage (IMultiLanguage3 *iface, UINT uiCodePage, HWND hwnd)
 
static HRESULT WINAPI fnIMultiLanguage3_GetCodePageDescription (IMultiLanguage3 *iface, UINT uiCodePage, LCID lcid, LPWSTR lpWideCharStr, int cchWideChar)
 
static HRESULT WINAPI fnIMultiLanguage3_IsCodePageInstallable (IMultiLanguage3 *iface, UINT uiCodePage)
 
static HRESULT WINAPI fnIMultiLanguage3_SetMimeDBSource (IMultiLanguage3 *iface, MIMECONTF dwSource)
 
static HRESULT WINAPI fnIMultiLanguage3_GetNumberOfScripts (IMultiLanguage3 *iface, UINT *pnScripts)
 
static HRESULT WINAPI fnIMultiLanguage3_EnumScripts (IMultiLanguage3 *iface, DWORD dwFlags, LANGID LangId, IEnumScript **ppEnumScript)
 
static HRESULT WINAPI fnIMultiLanguage3_ValidateCodePageEx (IMultiLanguage3 *iface, UINT uiCodePage, HWND hwnd, DWORD dwfIODControl)
 
static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePage (IMultiLanguage3 *iface, DWORD dwFlags, LPCWSTR lpWideCharStr, UINT cchWideChar, UINT *puiPreferredCodePages, UINT nPreferredCodePages, UINT *puiDetectedCodePages, UINT *pnDetectedCodePages, WCHAR *lpSpecialChar)
 
static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream (IMultiLanguage3 *iface, DWORD dwFlags, IStream *pStrIn, UINT *puiPreferredCodePages, UINT nPreferredCodePages, UINT *puiDetectedCodePages, UINT *pnDetectedCodePages, WCHAR *lpSpecialChar)
 
static MLang_implimpl_from_IMLangFontLink2 (IMLangFontLink2 *iface)
 
static HRESULT WINAPI fnIMLangFontLink2_QueryInterface (IMLangFontLink2 *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIMLangFontLink2_AddRef (IMLangFontLink2 *iface)
 
static ULONG WINAPI fnIMLangFontLink2_Release (IMLangFontLink2 *iface)
 
static HRESULT WINAPI fnIMLangFontLink2_GetCharCodePages (IMLangFontLink2 *iface, WCHAR ch_src, DWORD *ret_codepages)
 
static HRESULT WINAPI fnIMLangFontLink2_GetStrCodePages (IMLangFontLink2 *iface, const WCHAR *src, LONG src_len, DWORD priority_cp, DWORD *codepages, LONG *ret_len)
 
static HRESULT WINAPI fnIMLangFontLink2_CodePageToCodePages (IMLangFontLink2 *iface, UINT codepage, DWORD *codepages)
 
static HRESULT WINAPI fnIMLangFontLink2_CodePagesToCodePage (IMLangFontLink2 *iface, DWORD codepages, UINT def_codepage, UINT *codepage)
 
static HRESULT WINAPI fnIMLangFontLink2_GetFontCodePages (IMLangFontLink2 *iface, HDC hdc, HFONT hfont, DWORD *codepages)
 
static HRESULT WINAPI fnIMLangFontLink2_ReleaseFont (IMLangFontLink2 *This, HFONT hFont)
 
static HRESULT WINAPI fnIMLangFontLink2_ResetFontMapping (IMLangFontLink2 *This)
 
static HRESULT WINAPI fnIMLangFontLink2_MapFont (IMLangFontLink2 *This, HDC hDC, DWORD dwCodePages, WCHAR chSrc, HFONT *pFont)
 
static HRESULT WINAPI fnIMLangFontLink2_GetFontUnicodeRanges (IMLangFontLink2 *This, HDC hDC, UINT *puiRanges, UNICODERANGE *pUranges)
 
static HRESULT WINAPI fnIMLangFontLink2_GetScriptFontInfo (IMLangFontLink2 *This, SCRIPT_ID sid, DWORD dwFlags, UINT *puiFonts, SCRIPTFONTINFO *pScriptFont)
 
static HRESULT WINAPI fnIMLangFontLink2_CodePageToScriptID (IMLangFontLink2 *This, UINT uiCodePage, SCRIPT_ID *pSid)
 
static MLang_implimpl_from_IMLangLineBreakConsole (IMLangLineBreakConsole *iface)
 
static HRESULT WINAPI fnIMLangLineBreakConsole_QueryInterface (IMLangLineBreakConsole *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI fnIMLangLineBreakConsole_AddRef (IMLangLineBreakConsole *iface)
 
static ULONG WINAPI fnIMLangLineBreakConsole_Release (IMLangLineBreakConsole *iface)
 
static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineML (IMLangLineBreakConsole *iface, IMLangString *pSrcMLStr, LONG lSrcPos, LONG lSrcLen, LONG cMinColumns, LONG cMaxColumns, LONG *plLineLen, LONG *plSkipLen)
 
static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineW (IMLangLineBreakConsole *iface, LCID locale, const WCHAR *pszSrc, LONG cchSrc, LONG cMaxColumns, LONG *pcchLine, LONG *pcchSkip)
 
static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineA (IMLangLineBreakConsole *iface, LCID locale, UINT uCodePage, const CHAR *pszSrc, LONG cchSrc, LONG cMaxColumns, LONG *pcchLine, LONG *pcchSkip)
 
static struct convert_charsetimpl_from_IMLangConvertCharset (IMLangConvertCharset *iface)
 
static HRESULT WINAPI MLangConvertCharset_QueryInterface (IMLangConvertCharset *iface, REFIID riid, void **obj)
 
static ULONG WINAPI MLangConvertCharset_AddRef (IMLangConvertCharset *iface)
 
static ULONG WINAPI MLangConvertCharset_Release (IMLangConvertCharset *iface)
 
static HRESULT WINAPI MLangConvertCharset_Initialize (IMLangConvertCharset *iface, UINT src_cp, UINT dst_cp, DWORD prop)
 
static HRESULT WINAPI MLangConvertCharset_GetSourceCodePage (IMLangConvertCharset *iface, UINT *src_cp)
 
static HRESULT WINAPI MLangConvertCharset_GetDestinationCodePage (IMLangConvertCharset *iface, UINT *dst_cp)
 
static HRESULT WINAPI MLangConvertCharset_GetProperty (IMLangConvertCharset *iface, DWORD *prop)
 
static HRESULT WINAPI MLangConvertCharset_DoConversion (IMLangConvertCharset *iface, BYTE *src, UINT *src_size, BYTE *dest, UINT *dest_size)
 
static HRESULT WINAPI MLangConvertCharset_DoConversionToUnicode (IMLangConvertCharset *iface, CHAR *src, UINT *src_size, WCHAR *dest, UINT *dest_size)
 
static HRESULT WINAPI MLangConvertCharset_DoConversionFromUnicode (IMLangConvertCharset *iface, WCHAR *src, UINT *src_size, CHAR *dest, UINT *dest_size)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
static BOOL register_codepages (void)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HRESULT WINAPI GetGlobalFontLinkObject (void **unknown)
 

Variables

static HINSTANCE instance
 
static DWORD MLANG_tls_index
 
static const MIME_CP_INFO arabic_cp []
 
static const MIME_CP_INFO baltic_cp []
 
static const MIME_CP_INFO chinese_simplified_cp []
 
static const MIME_CP_INFO chinese_traditional_cp []
 
static const MIME_CP_INFO central_european_cp []
 
static const MIME_CP_INFO cyrillic_cp []
 
static const MIME_CP_INFO greek_cp []
 
static const MIME_CP_INFO hebrew_cp []
 
static const MIME_CP_INFO japanese_cp []
 
static const MIME_CP_INFO korean_cp []
 
static const MIME_CP_INFO thai_cp []
 
static const MIME_CP_INFO turkish_cp []
 
static const MIME_CP_INFO vietnamese_cp []
 
static const WCHAR asciiW [] = {'a','s','c','i','i',0}
 
static const MIME_CP_INFO western_cp []
 
static const MIME_CP_INFO unicode_cp []
 
static const struct mlang_data mlang_data []
 
static struct list font_cache = LIST_INIT(font_cache)
 
static CRITICAL_SECTION font_cache_critical = { &font_cache_critical_debug, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG font_cache_critical_debug
 
static LONG dll_count
 
static const struct object_creation_info object_creation []
 
static const IClassFactoryVtbl MLANGCF_Vtbl
 
static const IEnumCodePageVtbl IEnumCodePage_vtbl
 
static const IEnumScriptVtbl IEnumScript_vtbl
 
static const IMLangFontLinkVtbl IMLangFontLink_vtbl
 
static const IEnumRfc1766Vtbl IEnumRfc1766_vtbl
 
static const IMultiLanguageVtbl IMultiLanguage_vtbl
 
static const IMultiLanguage3Vtbl IMultiLanguage3_vtbl
 
static const IMLangFontLink2Vtbl IMLangFontLink2_vtbl
 
static const IMLangLineBreakConsoleVtbl IMLangLineBreakConsole_vtbl
 
static const IMLangConvertCharsetVtbl MLangConvertCharsetVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 29 of file mlang.c.

◆ HANKATA

#define HANKATA (   A)    ((A >= 161) && (A <= 223))

Definition at line 555 of file mlang.c.

◆ ISEUC

#define ISEUC (   A)    ((A >= 161) && (A <= 254))

Definition at line 556 of file mlang.c.

◆ ISMARU

#define ISMARU (   A)    ((A >= 202) && (A <= 206))

Definition at line 560 of file mlang.c.

◆ ISNIGORI

#define ISNIGORI (   A)    (((A >= 182) && (A <= 196)) || ((A >= 202) && (A <= 206)))

Definition at line 561 of file mlang.c.

◆ NOTEUC

#define NOTEUC (   A,
  B 
)    (((A >= 129) && (A <= 159)) && ((B >= 64) && (B <= 160)))

Definition at line 557 of file mlang.c.

◆ SJIS1

#define SJIS1 (   A)    (((A >= 129) && (A <= 159)) || ((A >= 224) && (A <= 239)))

Definition at line 558 of file mlang.c.

◆ SJIS2

#define SJIS2 (   A)    ((A >= 64) && (A <= 252))

Definition at line 559 of file mlang.c.

Typedef Documentation

◆ EnumCodePage_impl

◆ EnumRfc1766_impl

◆ EnumScript_impl

◆ MLang_impl

Function Documentation

◆ clear_font_cache()

static HRESULT clear_font_cache ( void  )
static

Definition at line 1430 of file mlang.c.

1431 {
1432  struct font_list *font_list_entry;
1433  struct font_list *font_list_entry2;
1434 
1436  LIST_FOR_EACH_ENTRY_SAFE(font_list_entry, font_list_entry2, &font_cache, struct font_list, list_entry)
1437  {
1438  list_remove(&font_list_entry->list_entry);
1439  DeleteObject(font_list_entry->font);
1440  HeapFree(GetProcessHeap(), 0, font_list_entry);
1441  }
1443 
1444  return S_OK;
1445 }
struct list list_entry
Definition: mlang.c:531
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
HFONT font
Definition: mlang.c:533
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
#define S_OK
Definition: intsafe.h:59
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
Definition: list.h:27
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:394
static struct list font_cache
Definition: mlang.c:537
static CRITICAL_SECTION font_cache_critical
Definition: mlang.c:538

Referenced by fnIMLangFontLink2_ResetFontMapping(), and fnIMLangFontLink_ResetFontMapping().

◆ ConvertINetMultiByteToUnicode()

HRESULT WINAPI ConvertINetMultiByteToUnicode ( LPDWORD  pdwMode,
DWORD  dwEncoding,
LPCSTR  pSrcStr,
LPINT  pcSrcSize,
LPWSTR  pDstStr,
LPINT  pcDstSize 
)

Definition at line 954 of file mlang.c.

961 {
962  INT src_len = -1;
963 
964  TRACE("%p %d %s %p %p %p\n", pdwMode, dwEncoding,
965  debugstr_a(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
966 
967  if (!pcDstSize)
968  return E_FAIL;
969 
970  if (!pcSrcSize)
971  pcSrcSize = &src_len;
972 
973  if (!*pcSrcSize)
974  {
975  *pcDstSize = 0;
976  return S_OK;
977  }
978 
979  /* forwarding euc-jp to EUC-JP */
980  if (dwEncoding == 51932)
981  dwEncoding = 20932;
982 
983  switch (dwEncoding)
984  {
985  case CP_UNICODE:
986  if (*pcSrcSize == -1)
987  *pcSrcSize = lstrlenW((LPCWSTR)pSrcStr);
988  *pcDstSize = min(*pcSrcSize, *pcDstSize);
989  *pcSrcSize *= sizeof(WCHAR);
990  if (pDstStr)
991  memmove(pDstStr, pSrcStr, *pcDstSize * sizeof(WCHAR));
992  break;
993 
994  case 50220:
995  case 50221:
996  case 50222:
997  *pcDstSize = ConvertJISJapaneseToUnicode(pSrcStr,*pcSrcSize,pDstStr,*pcDstSize);
998  break;
999  case 50932:
1000  *pcDstSize = ConvertUnknownJapaneseToUnicode(pSrcStr,*pcSrcSize,pDstStr,*pcDstSize);
1001  break;
1002 
1003  default:
1004  if (*pcSrcSize == -1)
1005  *pcSrcSize = lstrlenA(pSrcStr);
1006 
1007  if (pDstStr)
1008  *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, pDstStr, *pcDstSize);
1009  else
1010  *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, NULL, 0);
1011  break;
1012  }
1013 
1014  if (!*pcDstSize)
1015  return E_FAIL;
1016 
1017  return S_OK;
1018 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define lstrlenW
Definition: compat.h:407
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
static UINT ConvertUnknownJapaneseToUnicode(LPCSTR input, DWORD count, LPWSTR output, DWORD out_count)
Definition: mlang.c:855
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define CP_UNICODE
Definition: mlang.c:39
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
#define S_OK
Definition: intsafe.h:59
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
static UINT ConvertJISJapaneseToUnicode(LPCSTR input, DWORD count, LPWSTR output, DWORD out_count)
Definition: mlang.c:835
#define min(a, b)
Definition: monoChain.cc:55
#define MultiByteToWideChar
Definition: compat.h:100

Referenced by ConvertINetString(), fnIMultiLanguage3_ConvertStringToUnicode(), fnIMultiLanguage3_ConvertStringToUnicodeEx(), and MLangConvertCharset_DoConversionToUnicode().

◆ ConvertINetString()

HRESULT WINAPI ConvertINetString ( LPDWORD  pdwMode,
DWORD  dwSrcEncoding,
DWORD  dwDstEncoding,
LPCSTR  pSrcStr,
LPINT  pcSrcSize,
LPSTR  pDstStr,
LPINT  pcDstSize 
)

Definition at line 1105 of file mlang.c.

1114 {
1115  TRACE("%p %d %d %s %p %p %p\n", pdwMode, dwSrcEncoding, dwDstEncoding,
1116  debugstr_a(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
1117 
1118  if (dwSrcEncoding == CP_UNICODE)
1119  {
1120  INT cSrcSizeW;
1121  if (pcSrcSize && *pcSrcSize != -1)
1122  {
1123  cSrcSizeW = *pcSrcSize / sizeof(WCHAR);
1124  pcSrcSize = &cSrcSizeW;
1125  }
1126  return ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, (LPCWSTR)pSrcStr, pcSrcSize, pDstStr, pcDstSize);
1127  }
1128  else if (dwDstEncoding == CP_UNICODE)
1129  {
1130  HRESULT hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, (LPWSTR)pDstStr, pcDstSize);
1131  *pcDstSize *= sizeof(WCHAR);
1132  return hr;
1133  }
1134  else
1135  {
1136  INT cDstSizeW;
1137  LPWSTR pDstStrW;
1138  HRESULT hr;
1139 
1140  TRACE("convert %s from %d to %d\n", debugstr_a(pSrcStr), dwSrcEncoding, dwDstEncoding);
1141 
1142  hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, NULL, &cDstSizeW);
1143  if (hr != S_OK)
1144  return hr;
1145 
1146  pDstStrW = HeapAlloc(GetProcessHeap(), 0, cDstSizeW * sizeof(WCHAR));
1147  hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW);
1148  if (hr == S_OK)
1149  hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
1150 
1151  HeapFree(GetProcessHeap(), 0, pDstStrW);
1152  return hr;
1153  }
1154 }
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define CP_UNICODE
Definition: mlang.c:39
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI ConvertINetMultiByteToUnicode(LPDWORD pdwMode, DWORD dwEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPWSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:954
HRESULT WINAPI ConvertINetUnicodeToMultiByte(LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1020
#define S_OK
Definition: intsafe.h:59
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by fnIMultiLanguage3_ConvertString(), and fnIMultiLanguage3_ConvertStringInIStream().

◆ ConvertINetUnicodeToMultiByte()

HRESULT WINAPI ConvertINetUnicodeToMultiByte ( LPDWORD  pdwMode,
DWORD  dwEncoding,
LPCWSTR  pSrcStr,
LPINT  pcSrcSize,
LPSTR  pDstStr,
LPINT  pcDstSize 
)

Definition at line 1020 of file mlang.c.

1027 {
1028  INT destsz, size;
1029  INT src_len = -1;
1030 
1031  TRACE("%p %d %s %p %p %p\n", pdwMode, dwEncoding,
1032  debugstr_w(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
1033 
1034  if (!pcDstSize)
1035  return S_OK;
1036 
1037  if (!pcSrcSize)
1038  pcSrcSize = &src_len;
1039 
1040  destsz = (pDstStr) ? *pcDstSize : 0;
1041  *pcDstSize = 0;
1042 
1043  if (!pSrcStr || !*pcSrcSize)
1044  return S_OK;
1045 
1046  if (*pcSrcSize == -1)
1047  *pcSrcSize = lstrlenW(pSrcStr);
1048 
1049  /* forwarding euc-jp to EUC-JP */
1050  if (dwEncoding == 51932)
1051  dwEncoding = 20932;
1052 
1053  if (dwEncoding == CP_UNICODE)
1054  {
1055  if (*pcSrcSize == -1)
1056  *pcSrcSize = lstrlenW(pSrcStr);
1057 
1058  size = min(*pcSrcSize, destsz) * sizeof(WCHAR);
1059  if (pDstStr)
1060  memmove(pDstStr, pSrcStr, size);
1061 
1062  if (size >= destsz)
1063  goto fail;
1064  }
1065  else if (dwEncoding == 50220 || dwEncoding == 50221 || dwEncoding == 50222)
1066  {
1067  size = ConvertJapaneseUnicodeToJIS(pSrcStr, *pcSrcSize, NULL, 0);
1068  if (!size)
1069  goto fail;
1070 
1071  if (pDstStr)
1072  {
1073  size = ConvertJapaneseUnicodeToJIS(pSrcStr, *pcSrcSize, pDstStr,
1074  destsz);
1075  if (!size)
1076  goto fail;
1077  }
1078 
1079  }
1080  else
1081  {
1082  size = WideCharToMultiByte(dwEncoding, 0, pSrcStr, *pcSrcSize,
1083  NULL, 0, NULL, NULL);
1084  if (!size)
1085  goto fail;
1086 
1087  if (pDstStr)
1088  {
1089  size = WideCharToMultiByte(dwEncoding, 0, pSrcStr, *pcSrcSize,
1090  pDstStr, destsz, NULL, NULL);
1091  if (!size)
1092  goto fail;
1093  }
1094  }
1095 
1096  *pcDstSize = size;
1097  return S_OK;
1098 
1099 fail:
1100  *pcSrcSize = 0;
1101  *pcDstSize = 0;
1102  return E_FAIL;
1103 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static UINT ConvertJapaneseUnicodeToJIS(LPCWSTR input, DWORD count, LPSTR output, DWORD out_count)
Definition: mlang.c:903
#define WideCharToMultiByte
Definition: compat.h:101
#define lstrlenW
Definition: compat.h:407
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define CP_UNICODE
Definition: mlang.c:39
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define S_OK
Definition: intsafe.h:59
#define min(a, b)
Definition: monoChain.cc:55

Referenced by ConvertINetString(), fnIMultiLanguage3_ConvertStringFromUnicode(), fnIMultiLanguage3_ConvertStringFromUnicodeEx(), and MLangConvertCharset_DoConversionFromUnicode().

◆ ConvertJapaneseUnicodeToJIS()

static UINT ConvertJapaneseUnicodeToJIS ( LPCWSTR  input,
DWORD  count,
LPSTR  output,
DWORD  out_count 
)
static

Definition at line 903 of file mlang.c.

905 {
906  CHAR *sjis_string;
907  INT len;
908  UINT rc = 0;
909 
911  sjis_string = HeapAlloc(GetProcessHeap(),0,len);
912  WideCharToMultiByte(932,0,input,count,sjis_string,len,NULL,NULL);
913  TRACE("%s\n",debugstr_an(sjis_string,len));
914 
915  rc = ConvertSJIS2JIS(sjis_string, len, NULL);
916  if (out_count >= rc)
917  {
918  ConvertSJIS2JIS(sjis_string, len, output);
919  }
920  HeapFree(GetProcessHeap(),0,sjis_string);
921  return rc;
922 
923 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define WideCharToMultiByte
Definition: compat.h:101
GLuint GLuint GLsizei count
Definition: gl.h:1545
char CHAR
Definition: xmlstorage.h:175
static UINT ConvertSJIS2JIS(LPCSTR input, DWORD count, LPSTR output)
Definition: mlang.c:744
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
GLenum GLsizei len
Definition: glext.h:6722
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned int UINT
Definition: ndis.h:50
#define HeapFree(x, y, z)
Definition: compat.h:394
static UINT UINT * out_count
Definition: clipboard.c:35

Referenced by ConvertINetUnicodeToMultiByte().

◆ ConvertJIS2SJIS()

static UINT ConvertJIS2SJIS ( LPCSTR  input,
DWORD  count,
LPSTR  output 
)
static

Definition at line 676 of file mlang.c.

677 {
678  DWORD i = 0;
679  int j = 0;
680  unsigned char p2,p;
681  BOOL shifted = FALSE;
682 
683  while (i < count)
684  {
685  p = input[i];
686  if (p == 0x1b /* ESC */)
687  {
688  i++;
689  if (i >= count)
690  return 0;
691  p2 = input[i];
692  if (p2 == '$' || p2 =='(')
693  i++;
694  if (p2 == 'K' || p2 =='$')
695  shifted = TRUE;
696  else
697  shifted = FALSE;
698  }
699  else
700  {
701  if (shifted)
702  {
703  i++;
704  if (i >= count)
705  return 0;
706  p2 = input[i];
707  jis2sjis(&p,&p2);
708  output[j++]=p;
709  output[j++]=p2;
710  }
711  else
712  {
713  output[j++] = p;
714  }
715  }
716  i++;
717  }
718  return j;
719 }
#define TRUE
Definition: types.h:120
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLenum GLenum input
Definition: glext.h:9031
static void jis2sjis(unsigned char *p1, unsigned char *p2)
Definition: mlang.c:608
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by ConvertJISJapaneseToUnicode(), and ConvertUnknownJapaneseToUnicode().

◆ ConvertJISJapaneseToUnicode()

static UINT ConvertJISJapaneseToUnicode ( LPCSTR  input,
DWORD  count,
LPWSTR  output,
DWORD  out_count 
)
static

Definition at line 835 of file mlang.c.

837 {
838  CHAR *sjis_string;
839  UINT rc = 0;
840  sjis_string = HeapAlloc(GetProcessHeap(),0,count);
841  rc = ConvertJIS2SJIS(input,count,sjis_string);
842  if (rc)
843  {
844  TRACE("%s\n",debugstr_an(sjis_string,rc));
845  if (output)
846  rc = MultiByteToWideChar(932,0,sjis_string,rc,output,out_count);
847  else
848  rc = MultiByteToWideChar(932,0,sjis_string,rc,0,0);
849  }
850  HeapFree(GetProcessHeap(),0,sjis_string);
851  return rc;
852 
853 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
GLuint GLuint GLsizei count
Definition: gl.h:1545
char CHAR
Definition: xmlstorage.h:175
static UINT ConvertJIS2SJIS(LPCSTR input, DWORD count, LPSTR output)
Definition: mlang.c:676
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned int UINT
Definition: ndis.h:50
#define MultiByteToWideChar
Definition: compat.h:100
#define HeapFree(x, y, z)
Definition: compat.h:394
static UINT UINT * out_count
Definition: clipboard.c:35

Referenced by ConvertINetMultiByteToUnicode().

◆ ConvertSJIS2JIS()

static UINT ConvertSJIS2JIS ( LPCSTR  input,
DWORD  count,
LPSTR  output 
)
static

Definition at line 744 of file mlang.c.

745 {
746  DWORD i = 0;
747  int j = 0;
748  unsigned char p2,p;
749  BOOL shifted = FALSE;
750 
751  while (i < count)
752  {
753  p = input[i] & 0xff;
754  if (p == 10 || p == 13) /* NL and CR */
755  {
756  if (shifted)
757  {
758  shifted = FALSE;
759  j += exit_shift(output,j);
760  }
761  if (output)
762  output[j++] = p;
763  else
764  j++;
765  }
766  else
767  {
768  if (SJIS1(p))
769  {
770  i++;
771  if (i >= count)
772  return 0;
773  p2 = input[i] & 0xff;
774  if (SJIS2(p2))
775  {
776  sjis2jis(&p,&p2);
777  if (!shifted)
778  {
779  shifted = TRUE;
780  j+=enter_shift(output,j);
781  }
782  }
783 
784  if (output)
785  {
786  output[j++]=p;
787  output[j++]=p2;
788  }
789  else
790  j+=2;
791  }
792  else
793  {
794  if (HANKATA(p))
795  {
796  if ((i+1) >= count)
797  return 0;
798  p2 = input[i+1] & 0xff;
799  i+=han2zen(&p,&p2);
800  sjis2jis(&p,&p2);
801  if (!shifted)
802  {
803  shifted = TRUE;
804  j+=enter_shift(output,j);
805  }
806  if (output)
807  {
808  output[j++]=p;
809  output[j++]=p2;
810  }
811  else
812  j+=2;
813  }
814  else
815  {
816  if (shifted)
817  {
818  shifted = FALSE;
819  j += exit_shift(output,j);
820  }
821  if (output)
822  output[j++]=p;
823  else
824  j++;
825  }
826  }
827  }
828  i++;
829  }
830  if (shifted)
831  j += exit_shift(output,j);
832  return j;
833 }
static int enter_shift(LPSTR out, int c)
Definition: mlang.c:732
#define TRUE
Definition: types.h:120
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define SJIS1(A)
Definition: mlang.c:558
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define SJIS2(A)
Definition: mlang.c:559
static void sjis2jis(unsigned char *p1, unsigned char *p2)
Definition: mlang.c:619
#define HANKATA(A)
Definition: mlang.c:555
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
static int exit_shift(LPSTR out, int c)
Definition: mlang.c:721
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLenum GLenum input
Definition: glext.h:9031
static int han2zen(unsigned char *p1, unsigned char *p2)
Definition: mlang.c:631
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by ConvertJapaneseUnicodeToJIS().

◆ ConvertUnknownJapaneseToUnicode()

static UINT ConvertUnknownJapaneseToUnicode ( LPCSTR  input,
DWORD  count,
LPWSTR  output,
DWORD  out_count 
)
static

Definition at line 855 of file mlang.c.

857 {
858  CHAR *sjis_string;
859  UINT rc = 0;
861  TRACE("Japanese code %i\n",code);
862 
863  switch (code)
864  {
865  case 0:
866  if (output)
868  else
870  break;
871 
872  case 932:
873  if (output)
875  else
876  rc = MultiByteToWideChar(932,0,input,count,0,0);
877  break;
878 
879  case 51932:
880  if (output)
882  else
883  rc = MultiByteToWideChar(20932,0,input,count,0,0);
884  break;
885 
886  case 50220:
887  sjis_string = HeapAlloc(GetProcessHeap(),0,count);
888  rc = ConvertJIS2SJIS(input,count,sjis_string);
889  if (rc)
890  {
891  TRACE("%s\n",debugstr_an(sjis_string,rc));
892  if (output)
893  rc = MultiByteToWideChar(932,0,sjis_string,rc,output,out_count);
894  else
895  rc = MultiByteToWideChar(932,0,sjis_string,rc,0,0);
896  }
897  HeapFree(GetProcessHeap(),0,sjis_string);
898  break;
899  }
900  return rc;
901 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define CP_ACP
Definition: compat.h:99
GLuint GLuint GLsizei count
Definition: gl.h:1545
char CHAR
Definition: xmlstorage.h:175
static UINT ConvertJIS2SJIS(LPCSTR input, DWORD count, LPSTR output)
Definition: mlang.c:676
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned int UINT
Definition: ndis.h:50
static UINT DetectJapaneseCode(LPCSTR input, DWORD count)
Definition: mlang.c:563
#define MultiByteToWideChar
Definition: compat.h:100
#define HeapFree(x, y, z)
Definition: compat.h:394
static UINT UINT * out_count
Definition: clipboard.c:35

Referenced by ConvertINetMultiByteToUnicode().

◆ DetectJapaneseCode()

static UINT DetectJapaneseCode ( LPCSTR  input,
DWORD  count 
)
static

Definition at line 563 of file mlang.c.

564 {
565  UINT code = 0;
566  DWORD i = 0;
567  unsigned char c1,c2;
568 
569  while ((code == 0 || code == 51932) && i < count)
570  {
571  c1 = input[i];
572  if (c1 == 0x1b /* ESC */)
573  {
574  i++;
575  if (i >= count)
576  return code;
577  c1 = input[i];
578  if (c1 == '$')
579  {
580  i++;
581  if (i >= count)
582  return code;
583  c1 = input[i];
584  if (c1 =='B' || c1 == '@')
585  code = 50220;
586  }
587  if (c1 == 'K')
588  code = 50220;
589  }
590  else if (c1 >= 129)
591  {
592  i++;
593  if (i >= count)
594  return code;
595  c2 = input[i];
596  if NOTEUC(c1,c2)
597  code = 932;
598  else if (ISEUC(c1) && ISEUC(c2))
599  code = 51932;
600  else if (((c1 == 142)) && HANKATA(c2))
601  code = 51932;
602  }
603  i++;
604  }
605  return code;
606 }
#define ISEUC(A)
Definition: mlang.c:556
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define HANKATA(A)
Definition: mlang.c:555
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned long DWORD
Definition: ntddk_ex.h:95
int code
Definition: i386-dis.c:3591
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned int UINT
Definition: ndis.h:50
#define NOTEUC(A, B)
Definition: mlang.c:557

Referenced by ConvertUnknownJapaneseToUnicode().

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 3926 of file mlang.c.

3927 {
3928  return dll_count == 0 ? S_OK : S_FALSE;
3929 }
#define S_FALSE
Definition: winerror.h:2357
static LONG dll_count
Definition: mlang.c:549
#define S_OK
Definition: intsafe.h:59

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv 
)

Definition at line 1552 of file mlang.c.

1553 {
1554  unsigned int i;
1556 
1557  TRACE("%s %s %p\n",debugstr_guid(rclsid), debugstr_guid(iid), ppv);
1558 
1559  if ( !IsEqualGUID( &IID_IClassFactory, iid )
1560  && ! IsEqualGUID( &IID_IUnknown, iid) )
1561  return E_NOINTERFACE;
1562 
1563  for (i = 0; i < ARRAY_SIZE(object_creation); i++)
1564  {
1565  if (IsEqualGUID(object_creation[i].clsid, rclsid))
1566  break;
1567  }
1568 
1569  if (i == ARRAY_SIZE(object_creation))
1570  {
1571  FIXME("%s: no class found.\n", debugstr_guid(rclsid));
1573  }
1574 
1575  TRACE("Creating a class factory for %s\n",object_creation[i].szClassName);
1576 
1577  factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory));
1578  if (factory == NULL) return E_OUTOFMEMORY;
1579 
1581  factory->ref = 1;
1582 
1583  factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
1584 
1586 
1587  TRACE("(%p) <- %p\n", ppv, &factory->IClassFactory_iface);
1588 
1589  return S_OK;
1590 }
static const struct object_creation_info object_creation[]
Definition: mlang.c:1468
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
Definition: main.c:440
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR szClassName[]
Definition: clipbrd.c:11
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const GUID IID_IUnknown
static const IClassFactoryVtbl MLANGCF_Vtbl
Definition: mlang.c:1540
REFCLSID clsid
Definition: msctf.c:84
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static ClassFactoryImpl factory
Definition: ole_server.c:234
const GUID IID_IClassFactory
IClassFactory IClassFactory_iface
Definition: main.c:442

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDLL,
DWORD  fdwReason,
LPVOID  lpv 
)

Definition at line 938 of file mlang.c.

939 {
940  switch(fdwReason) {
941  case DLL_PROCESS_ATTACH:
942  instance = hInstDLL;
944  DisableThreadLibraryCalls(hInstDLL);
945  break;
946  case DLL_PROCESS_DETACH:
947  if (lpv) break;
949  break;
950  }
951  return TRUE;
952 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static DWORD MLANG_tls_index
Definition: mlang.c:54
static HINSTANCE instance
Definition: mlang.c:53
#define DLL_PROCESS_DETACH
Definition: compat.h:119
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1154
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1088

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 3986 of file mlang.c.

3987 {
3988  if(!register_codepages())
3989  return E_FAIL;
3991 }
static BOOL register_codepages(void)
Definition: mlang.c:3931
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
#define E_FAIL
Definition: ddrawi.h:102
static HINSTANCE instance
Definition: mlang.c:53

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 3996 of file mlang.c.

3997 {
3999 }
static HINSTANCE instance
Definition: mlang.c:53
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ enter_shift()

static int enter_shift ( LPSTR  out,
int  c 
)
inlinestatic

Definition at line 732 of file mlang.c.

733 {
734  if (out)
735  {
736  out[c] = 0x1b;
737  out[c+1] = '$';
738  out[c+2] = 'B';
739  }
740  return 3;
741 }
const GLubyte * c
Definition: glext.h:8905
static FILE * out
Definition: regtests2xml.c:44
#define c
Definition: ke_i.h:80

Referenced by ConvertSJIS2JIS().

◆ enum_locales_proc()

static BOOL CALLBACK enum_locales_proc ( LPWSTR  locale)
static

Definition at line 2412 of file mlang.c.

2413 {
2414  WCHAR *end;
2416  RFC1766INFO *info;
2417 
2418  TRACE("%s\n", debugstr_w(locale));
2419 
2420  if (data->total >= data->allocated)
2421  {
2422  data->allocated += 32;
2423  data->info = HeapReAlloc(GetProcessHeap(), 0, data->info, data->allocated * sizeof(RFC1766INFO));
2424  if (!data->info) return FALSE;
2425  }
2426 
2427  info = &data->info[data->total];
2428 
2429  info->lcid = strtolW(locale, &end, 16);
2430  if (*end) /* invalid number */
2431  return FALSE;
2432 
2433  info->wszRfc1766[0] = 0;
2434  lcid_to_rfc1766W( info->lcid, info->wszRfc1766, MAX_RFC1766_NAME );
2435 
2436  info->wszLocaleName[0] = 0;
2437  GetLocaleInfoW(info->lcid, LOCALE_SLANGUAGE, info->wszLocaleName, MAX_LOCALE_NAME);
2438  TRACE("ISO639: %s SLANGUAGE: %s\n", wine_dbgstr_w(info->wszRfc1766), wine_dbgstr_w(info->wszLocaleName));
2439 
2440  data->total++;
2441 
2442  return TRUE;
2443 }
#define TRUE
Definition: types.h:120
#define LOCALE_SLANGUAGE
Definition: winnls.h:26
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
#define strtolW(s, e, b)
Definition: unicode.h:33
static DWORD MLANG_tls_index
Definition: mlang.c:54
GLuint GLuint end
Definition: gl.h:1545
static HRESULT lcid_to_rfc1766W(LCID lcid, LPWSTR rfc1766, INT len)
Definition: mlang.c:1228
struct _test_info info[]
Definition: SetCursorPos.c:19
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: lang.c:1098
Definition: _locale.h:75
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define HeapReAlloc
Definition: compat.h:393
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1228

Referenced by EnumRfc1766_create().

◆ EnumCodePage_create()

static HRESULT EnumCodePage_create ( MLang_impl mlang,
DWORD  grfFlags,
LANGID  LangId,
IEnumCodePage **  ppEnumCodePage 
)
static

Definition at line 1753 of file mlang.c.

1755 {
1756  EnumCodePage_impl *ecp;
1757  MIMECPINFO *cpinfo;
1758  UINT i, n;
1759 
1760  TRACE("%p, %08x, %04x, %p\n", mlang, grfFlags, LangId, ppEnumCodePage);
1761 
1762  if (!grfFlags) /* enumerate internal data base of encodings */
1763  grfFlags = MIMECONTF_MIME_LATEST;
1764 
1765  ecp = HeapAlloc( GetProcessHeap(), 0, sizeof (EnumCodePage_impl) );
1766  ecp->IEnumCodePage_iface.lpVtbl = &IEnumCodePage_vtbl;
1767  ecp->ref = 1;
1768  ecp->pos = 0;
1769  ecp->total = 0;
1770  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
1771  {
1772  for (n = 0; n < mlang_data[i].number_of_cp; n++)
1773  {
1774  if (mlang_data[i].mime_cp_info[n].flags & grfFlags)
1775  ecp->total++;
1776  }
1777  }
1778 
1779  ecp->cpinfo = HeapAlloc(GetProcessHeap(), 0,
1780  sizeof(MIMECPINFO) * ecp->total);
1781  cpinfo = ecp->cpinfo;
1782 
1783  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
1784  {
1785  for (n = 0; n < mlang_data[i].number_of_cp; n++)
1786  {
1787  if (mlang_data[i].mime_cp_info[n].flags & grfFlags)
1788  fill_cp_info(&mlang_data[i], n, cpinfo++);
1789  }
1790  }
1791 
1792  TRACE("enumerated %d codepages with flags %08x\n", ecp->total, grfFlags);
1793 
1794  *ppEnumCodePage = &ecp->IEnumCodePage_iface;
1795 
1796  return S_OK;
1797 }
static void fill_cp_info(const struct mlang_data *ml_data, UINT index, MIMECPINFO *mime_cp_info)
Definition: mlang.c:2658
GLdouble n
Definition: glext.h:7729
UINT number_of_cp
Definition: mlang.c:490
MIMECPINFO * cpinfo
Definition: mlang.c:1612
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
IEnumCodePage IEnumCodePage_iface
Definition: mlang.c:1610
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLbitfield flags
Definition: glext.h:7161
static IMultiLanguage2 * mlang
Definition: main.c:36
#define S_OK
Definition: intsafe.h:59
static const IEnumCodePageVtbl IEnumCodePage_vtbl
Definition: mlang.c:1742
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50

Referenced by fnIMultiLanguage3_EnumCodePages(), and fnIMultiLanguage_EnumCodePages().

◆ EnumRfc1766_create()

static HRESULT EnumRfc1766_create ( LANGID  LangId,
IEnumRfc1766 **  ppEnum 
)
static

Definition at line 2445 of file mlang.c.

2446 {
2447  EnumRfc1766_impl *rfc;
2448  struct enum_locales_data data;
2449 
2450  TRACE("%04x, %p\n", LangId, ppEnum);
2451 
2452  rfc = HeapAlloc( GetProcessHeap(), 0, sizeof(EnumRfc1766_impl) );
2453  rfc->IEnumRfc1766_iface.lpVtbl = &IEnumRfc1766_vtbl;
2454  rfc->ref = 1;
2455  rfc->pos = 0;
2456  rfc->total = 0;
2457 
2458  data.total = 0;
2459  data.allocated = 160;
2460  data.info = HeapAlloc(GetProcessHeap(), 0, data.allocated * sizeof(RFC1766INFO));
2461  if (!data.info)
2462  {
2463  HeapFree(GetProcessHeap(), 0, rfc);
2464  return E_OUTOFMEMORY;
2465  }
2466 
2468  EnumSystemLocalesW(enum_locales_proc, 0/*LOCALE_SUPPORTED*/);
2470 
2471  TRACE("enumerated %d rfc1766 structures\n", data.total);
2472 
2473  if (!data.total)
2474  {
2475  HeapFree(GetProcessHeap(), 0, data.info);
2476  HeapFree(GetProcessHeap(), 0, rfc);
2477  return E_FAIL;
2478  }
2479 
2480  rfc->info = data.info;
2481  rfc->total = data.total;
2482 
2483  *ppEnum = &rfc->IEnumRfc1766_iface;
2484  return S_OK;
2485 }
RFC1766INFO * info
Definition: mlang.c:2271
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1264
static BOOL CALLBACK enum_locales_proc(LPWSTR locale)
Definition: mlang.c:2412
static DWORD MLANG_tls_index
Definition: mlang.c:54
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
IEnumRfc1766 IEnumRfc1766_iface
Definition: mlang.c:2269
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
Definition: lang.c:1604
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IEnumRfc1766Vtbl IEnumRfc1766_vtbl
Definition: mlang.c:2395
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define S_OK
Definition: intsafe.h:59
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by fnIMultiLanguage3_EnumRfc1766(), fnIMultiLanguage_EnumRfc1766(), and Rfc1766ToLcidW().

◆ EnumScript_create()

static HRESULT EnumScript_create ( MLang_impl mlang,
DWORD  dwFlags,
LANGID  LangId,
IEnumScript **  ppEnumScript 
)
static

Definition at line 1931 of file mlang.c.

1933 {
1935  UINT i;
1936 
1937  TRACE("%p, %08x, %04x, %p\n", mlang, dwFlags, LangId, ppEnumScript);
1938 
1939  if (!dwFlags) /* enumerate all available scripts */
1940  dwFlags = SCRIPTCONTF_SCRIPT_USER | SCRIPTCONTF_SCRIPT_HIDE | SCRIPTCONTF_SCRIPT_SYSTEM;
1941 
1942  es = HeapAlloc( GetProcessHeap(), 0, sizeof (EnumScript_impl) );
1943  es->IEnumScript_iface.lpVtbl = &IEnumScript_vtbl;
1944  es->ref = 1;
1945  es->pos = 0;
1946  /* do not enumerate unicode flavours */
1947  es->total = ARRAY_SIZE(mlang_data) - 1;
1948  es->script_info = HeapAlloc(GetProcessHeap(), 0, sizeof(SCRIPTINFO) * es->total);
1949 
1950  for (i = 0; i < es->total; i++)
1951  {
1952  es->script_info[i].ScriptId = i;
1953  es->script_info[i].uiCodePage = mlang_data[i].family_codepage;
1955  es->script_info[i].wszDescription, MAX_SCRIPT_NAME);
1956  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].fixed_font, -1,
1957  es->script_info[i].wszFixedWidthFont, MAX_MIMEFACE_NAME);
1958  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].proportional_font, -1,
1959  es->script_info[i].wszProportionalFont, MAX_MIMEFACE_NAME);
1960  }
1961 
1962  TRACE("enumerated %d scripts with flags %08x\n", es->total, dwFlags);
1963 
1964  *ppEnumScript = &es->IEnumScript_iface;
1965 
1966  return S_OK;
1967 }
#define CP_ACP
Definition: compat.h:99
const char * description
Definition: directx.c:2497
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IEnumScriptVtbl IEnumScript_vtbl
Definition: mlang.c:1920
UINT family_codepage
Definition: mlang.c:489
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static IMultiLanguage2 * mlang
Definition: main.c:36
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
#define MultiByteToWideChar
Definition: compat.h:100
#define es
Definition: i386-dis.c:431

Referenced by fnIMultiLanguage3_EnumScripts().

◆ exit_shift()

static int exit_shift ( LPSTR  out,
int  c 
)
inlinestatic

Definition at line 721 of file mlang.c.

722 {
723  if (out)
724  {
725  out[c] = 0x1b;
726  out[c+1] = '(';
727  out[c+2] = 'B';
728  }
729  return 3;
730 }
const GLubyte * c
Definition: glext.h:8905
static FILE * out
Definition: regtests2xml.c:44
#define c
Definition: ke_i.h:80

Referenced by ConvertSJIS2JIS().

◆ fill_cp_info()

static void fill_cp_info ( const struct mlang_data ml_data,
UINT  index,
MIMECPINFO *  mime_cp_info 
)
static

Definition at line 2658 of file mlang.c.

2659 {
2660  CHARSETINFO csi;
2661 
2662  if (TranslateCharsetInfo((DWORD*)(DWORD_PTR)ml_data->family_codepage, &csi,
2663  TCI_SRCCODEPAGE))
2664  mime_cp_info->bGDICharset = csi.ciCharset;
2665  else
2666  mime_cp_info->bGDICharset = DEFAULT_CHARSET;
2667 
2668  mime_cp_info->dwFlags = ml_data->mime_cp_info[index].flags;
2669  mime_cp_info->uiCodePage = ml_data->mime_cp_info[index].cp;
2670  mime_cp_info->uiFamilyCodePage = ml_data->family_codepage;
2672  mime_cp_info->wszDescription, ARRAY_SIZE(mime_cp_info->wszDescription));
2674  mime_cp_info->wszWebCharset, ARRAY_SIZE(mime_cp_info->wszWebCharset));
2676  mime_cp_info->wszHeaderCharset, ARRAY_SIZE(mime_cp_info->wszHeaderCharset));
2678  mime_cp_info->wszBodyCharset, ARRAY_SIZE(mime_cp_info->wszBodyCharset));
2679 
2680  MultiByteToWideChar(CP_ACP, 0, ml_data->fixed_font, -1,
2681  mime_cp_info->wszFixedWidthFont, ARRAY_SIZE(mime_cp_info->wszFixedWidthFont));
2682  MultiByteToWideChar(CP_ACP, 0, ml_data->proportional_font, -1,
2683  mime_cp_info->wszProportionalFont, ARRAY_SIZE(mime_cp_info->wszProportionalFont));
2684 
2685  TRACE("%08x %u %u %s %s %s %s %s %s %d\n",
2686  mime_cp_info->dwFlags, mime_cp_info->uiCodePage,
2687  mime_cp_info->uiFamilyCodePage,
2688  wine_dbgstr_w(mime_cp_info->wszDescription),
2689  wine_dbgstr_w(mime_cp_info->wszWebCharset),
2690  wine_dbgstr_w(mime_cp_info->wszHeaderCharset),
2691  wine_dbgstr_w(mime_cp_info->wszBodyCharset),
2692  wine_dbgstr_w(mime_cp_info->wszFixedWidthFont),
2693  wine_dbgstr_w(mime_cp_info->wszProportionalFont),
2694  mime_cp_info->bGDICharset);
2695 }
const char * description
Definition: mlang.c:63
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
#define CP_ACP
Definition: compat.h:99
const MIME_CP_INFO * mime_cp_info
Definition: mlang.c:491
#define DEFAULT_CHARSET
Definition: wingdi.h:383
const char * fixed_font
Definition: mlang.c:492
UINT ciCharset
Definition: wingdi.h:1541
GLuint index
Definition: glext.h:6031
DWORD flags
Definition: mlang.c:65
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define TRACE(s)
Definition: solgame.cpp:4
const char * body_charset
Definition: mlang.c:68
unsigned long DWORD
Definition: ntddk_ex.h:95
UINT family_codepage
Definition: mlang.c:489
UINT cp
Definition: mlang.c:64
#define index(s, c)
Definition: various.h:29
uint32_t DWORD_PTR
Definition: typedefs.h:63
const char * header_charset
Definition: mlang.c:67
#define ARRAY_SIZE(a)
Definition: main.h:24
#define MultiByteToWideChar
Definition: compat.h:100
const char * proportional_font
Definition: mlang.c:493
#define TCI_SRCCODEPAGE
Definition: wingdi.h:961
const char * web_charset
Definition: mlang.c:66

Referenced by EnumCodePage_create(), fnIMultiLanguage3_GetCodePageInfo(), and fnIMultiLanguage_GetCodePageInfo().

◆ fnIEnumCodePage_AddRef()

static ULONG WINAPI fnIEnumCodePage_AddRef ( IEnumCodePage *  iface)
static

Definition at line 1643 of file mlang.c.

1645 {
1647  return InterlockedIncrement(&This->ref);
1648 }
#define InterlockedIncrement
Definition: armddk.h:53
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616

◆ fnIEnumCodePage_Clone()

static HRESULT WINAPI fnIEnumCodePage_Clone ( IEnumCodePage *  iface,
IEnumCodePage **  ppEnum 
)
static

Definition at line 1667 of file mlang.c.

1670 {
1672  FIXME("%p %p\n", This, ppEnum);
1673  return E_NOTIMPL;
1674 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616

◆ fnIEnumCodePage_Next()

static HRESULT WINAPI fnIEnumCodePage_Next ( IEnumCodePage *  iface,
ULONG  celt,
PMIMECPINFO  rgelt,
ULONG pceltFetched 
)
static

Definition at line 1676 of file mlang.c.

1681 {
1682  ULONG i;
1684 
1685  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
1686 
1687  if (!pceltFetched) return S_FALSE;
1688  *pceltFetched = 0;
1689 
1690  if (!rgelt) return S_FALSE;
1691 
1692  if (This->pos + celt > This->total)
1693  celt = This->total - This->pos;
1694 
1695  if (!celt) return S_FALSE;
1696 
1697  memcpy(rgelt, This->cpinfo + This->pos, celt * sizeof(MIMECPINFO));
1698  *pceltFetched = celt;
1699  This->pos += celt;
1700 
1701  for (i = 0; i < celt; i++)
1702  {
1703  TRACE("#%u: %08x %u %u %s %s %s %s %s %s %d\n",
1704  i, rgelt[i].dwFlags, rgelt[i].uiCodePage,
1705  rgelt[i].uiFamilyCodePage,
1706  wine_dbgstr_w(rgelt[i].wszDescription),
1707  wine_dbgstr_w(rgelt[i].wszWebCharset),
1708  wine_dbgstr_w(rgelt[i].wszHeaderCharset),
1709  wine_dbgstr_w(rgelt[i].wszBodyCharset),
1710  wine_dbgstr_w(rgelt[i].wszFixedWidthFont),
1711  wine_dbgstr_w(rgelt[i].wszProportionalFont),
1712  rgelt[i].bGDICharset);
1713  }
1714  return S_OK;
1715 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616
unsigned int ULONG
Definition: retypes.h:1

◆ fnIEnumCodePage_QueryInterface()

static HRESULT WINAPI fnIEnumCodePage_QueryInterface ( IEnumCodePage *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1621 of file mlang.c.

1625 {
1627 
1628  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
1629 
1631  || IsEqualGUID(riid, &IID_IEnumCodePage))
1632  {
1633  IEnumCodePage_AddRef(iface);
1634  TRACE("Returning IID_IEnumCodePage %p ref = %d\n", This, This->ref);
1635  *ppvObject = &This->IEnumCodePage_iface;
1636  return S_OK;
1637  }
1638 
1639  WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
1640  return E_NOINTERFACE;
1641 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ fnIEnumCodePage_Release()

static ULONG WINAPI fnIEnumCodePage_Release ( IEnumCodePage *  iface)
static

Definition at line 1650 of file mlang.c.

1652 {
1655 
1656  TRACE("%p ref = %d\n", This, ref);
1657  if (ref == 0)
1658  {
1659  TRACE("Destroying %p\n", This);
1660  HeapFree(GetProcessHeap(), 0, This->cpinfo);
1661  HeapFree(GetProcessHeap(), 0, This);
1662  }
1663 
1664  return ref;
1665 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ fnIEnumCodePage_Reset()

static HRESULT WINAPI fnIEnumCodePage_Reset ( IEnumCodePage *  iface)
static

Definition at line 1717 of file mlang.c.

1719 {
1721 
1722  TRACE("%p\n", This);
1723 
1724  This->pos = 0;
1725  return S_OK;
1726 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616

◆ fnIEnumCodePage_Skip()

static HRESULT WINAPI fnIEnumCodePage_Skip ( IEnumCodePage *  iface,
ULONG  celt 
)
static

Definition at line 1728 of file mlang.c.

1731 {
1733 
1734  TRACE("%p %u\n", This, celt);
1735 
1736  if (celt >= This->total) return S_FALSE;
1737 
1738  This->pos += celt;
1739  return S_OK;
1740 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static EnumCodePage_impl * impl_from_IEnumCodePage(IEnumCodePage *iface)
Definition: mlang.c:1616

◆ fnIEnumRfc1766_AddRef()

static ULONG WINAPI fnIEnumRfc1766_AddRef ( IEnumRfc1766 *  iface)
static

Definition at line 2302 of file mlang.c.

2304 {
2306  return InterlockedIncrement(&This->ref);
2307 }
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define InterlockedIncrement
Definition: armddk.h:53

◆ fnIEnumRfc1766_Clone()

static HRESULT WINAPI fnIEnumRfc1766_Clone ( IEnumRfc1766 *  iface,
IEnumRfc1766 **  ppEnum 
)
static

Definition at line 2325 of file mlang.c.

2328 {
2330 
2331  FIXME("%p %p\n", This, ppEnum);
2332  return E_NOTIMPL;
2333 }
#define FIXME(fmt,...)
Definition: debug.h:110
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fnIEnumRfc1766_Next()

static HRESULT WINAPI fnIEnumRfc1766_Next ( IEnumRfc1766 *  iface,
ULONG  celt,
PRFC1766INFO  rgelt,
ULONG pceltFetched 
)
static

Definition at line 2335 of file mlang.c.

2340 {
2341  ULONG i;
2343 
2344  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
2345 
2346  if (!pceltFetched) return S_FALSE;
2347  *pceltFetched = 0;
2348 
2349  if (!rgelt) return S_FALSE;
2350 
2351  if (This->pos + celt > This->total)
2352  celt = This->total - This->pos;
2353 
2354  if (!celt) return S_FALSE;
2355 
2356  memcpy(rgelt, This->info + This->pos, celt * sizeof(RFC1766INFO));
2357  *pceltFetched = celt;
2358  This->pos += celt;
2359 
2360  for (i = 0; i < celt; i++)
2361  {
2362  TRACE("#%u: %08x %s %s\n",
2363  i, rgelt[i].lcid,
2364  wine_dbgstr_w(rgelt[i].wszRfc1766),
2365  wine_dbgstr_w(rgelt[i].wszLocaleName));
2366  }
2367  return S_OK;
2368 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
unsigned int ULONG
Definition: retypes.h:1

◆ fnIEnumRfc1766_QueryInterface()

static HRESULT WINAPI fnIEnumRfc1766_QueryInterface ( IEnumRfc1766 *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 2280 of file mlang.c.

2284 {
2286 
2287  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
2288 
2290  || IsEqualGUID(riid, &IID_IEnumRfc1766))
2291  {
2292  IEnumRfc1766_AddRef(iface);
2293  TRACE("Returning IID_IEnumRfc1766 %p ref = %d\n", This, This->ref);
2294  *ppvObject = &This->IEnumRfc1766_iface;
2295  return S_OK;
2296  }
2297 
2298  WARN("(%p) -> (%s,%p), not found\n",This,debugstr_guid(riid),ppvObject);
2299  return E_NOINTERFACE;
2300 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ fnIEnumRfc1766_Release()

static ULONG WINAPI fnIEnumRfc1766_Release ( IEnumRfc1766 *  iface)
static

Definition at line 2309 of file mlang.c.

2311 {
2314 
2315  TRACE("%p ref = %d\n", This, ref);
2316  if (ref == 0)
2317  {
2318  TRACE("Destroying %p\n", This);
2319  HeapFree(GetProcessHeap(), 0, This->info);
2320  HeapFree(GetProcessHeap(), 0, This);
2321  }
2322  return ref;
2323 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ fnIEnumRfc1766_Reset()

static HRESULT WINAPI fnIEnumRfc1766_Reset ( IEnumRfc1766 *  iface)
static

Definition at line 2370 of file mlang.c.

2372 {
2374 
2375  TRACE("%p\n", This);
2376 
2377  This->pos = 0;
2378  return S_OK;
2379 }
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ fnIEnumRfc1766_Skip()

static HRESULT WINAPI fnIEnumRfc1766_Skip ( IEnumRfc1766 *  iface,
ULONG  celt 
)
static

Definition at line 2381 of file mlang.c.

2384 {
2386 
2387  TRACE("%p %u\n", This, celt);
2388 
2389  if (celt >= This->total) return S_FALSE;
2390 
2391  This->pos += celt;
2392  return S_OK;
2393 }
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2275
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ fnIEnumScript_AddRef()

static ULONG WINAPI fnIEnumScript_AddRef ( IEnumScript *  iface)
static

Definition at line 1836 of file mlang.c.

1838 {
1840  return InterlockedIncrement(&This->ref);
1841 }
#define InterlockedIncrement
Definition: armddk.h:53
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_Clone()

static HRESULT WINAPI fnIEnumScript_Clone ( IEnumScript *  iface,
IEnumScript **  ppEnum 
)
static

Definition at line 1860 of file mlang.c.

1863 {
1865  FIXME("%p %p: stub!\n", This, ppEnum);
1866  return E_NOTIMPL;
1867 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_Next()

static HRESULT WINAPI fnIEnumScript_Next ( IEnumScript *  iface,
ULONG  celt,
PSCRIPTINFO  rgelt,
ULONG pceltFetched 
)
static

Definition at line 1869 of file mlang.c.

1874 {
1876 
1877  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
1878 
1879  if (!pceltFetched || !rgelt) return E_FAIL;
1880 
1881  *pceltFetched = 0;
1882 
1883  if (This->pos + celt > This->total)
1884  celt = This->total - This->pos;
1885 
1886  if (!celt) return S_FALSE;
1887 
1888  memcpy(rgelt, This->script_info + This->pos, celt * sizeof(SCRIPTINFO));
1889  *pceltFetched = celt;
1890  This->pos += celt;
1891 
1892  return S_OK;
1893 }
#define E_FAIL
Definition: ddrawi.h:102
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_QueryInterface()

static HRESULT WINAPI fnIEnumScript_QueryInterface ( IEnumScript *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1814 of file mlang.c.

1818 {
1820 
1821  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
1822 
1824  || IsEqualGUID(riid, &IID_IEnumScript))
1825  {
1826  IEnumScript_AddRef(iface);
1827  TRACE("Returning IID_IEnumScript %p ref = %d\n", This, This->ref);
1828  *ppvObject = &This->IEnumScript_iface;
1829  return S_OK;
1830  }
1831 
1832  WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
1833  return E_NOINTERFACE;
1834 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_Release()

static ULONG WINAPI fnIEnumScript_Release ( IEnumScript *  iface)
static

Definition at line 1843 of file mlang.c.

1845 {
1848 
1849  TRACE("%p ref = %d\n", This, ref);
1850  if (ref == 0)
1851  {
1852  TRACE("Destroying %p\n", This);
1853  HeapFree(GetProcessHeap(), 0, This->script_info);
1854  HeapFree(GetProcessHeap(), 0, This);
1855  }
1856 
1857  return ref;
1858 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_Reset()

static HRESULT WINAPI fnIEnumScript_Reset ( IEnumScript *  iface)
static

Definition at line 1895 of file mlang.c.

1897 {
1899 
1900  TRACE("%p\n", This);
1901 
1902  This->pos = 0;
1903  return S_OK;
1904 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIEnumScript_Skip()

static HRESULT WINAPI fnIEnumScript_Skip ( IEnumScript *  iface,
ULONG  celt 
)
static

Definition at line 1906 of file mlang.c.

1909 {
1911 
1912  TRACE("%p %u\n", This, celt);
1913 
1914  if (celt >= This->total) return S_FALSE;
1915 
1916  This->pos += celt;
1917  return S_OK;
1918 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1809

◆ fnIMLangFontLink2_AddRef()

static ULONG WINAPI fnIMLangFontLink2_AddRef ( IMLangFontLink2 *  iface)
static

Definition at line 3320 of file mlang.c.

3321 {
3323  return IMultiLanguage3_AddRef( &This->IMultiLanguage3_iface );
3324 }
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306

◆ fnIMLangFontLink2_CodePagesToCodePage()

static HRESULT WINAPI fnIMLangFontLink2_CodePagesToCodePage ( IMLangFontLink2 *  iface,
DWORD  codepages,
UINT  def_codepage,
UINT codepage 
)
static

Definition at line 3423 of file mlang.c.

3425 {
3427  DWORD mask = 0;
3428  CHARSETINFO cs;
3429  BOOL rc;
3430  UINT i;
3431 
3432  TRACE("(%p)->(0x%x %u %p)\n", This, codepages, def_codepage, codepage);
3433 
3434  *codepage = 0;
3435 
3436  rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)def_codepage, &cs, TCI_SRCCODEPAGE);
3437  if (rc && (codepages & cs.fs.fsCsb[0]))
3438  {
3439  TRACE("Found Default Codepage\n");
3440  *codepage = def_codepage;
3441  return S_OK;
3442  }
3443 
3444  for (i = 0; i < 32; i++)
3445  {
3446  mask = 1 << i;
3447  if (codepages & mask)
3448  {
3449  DWORD Csb[2];
3450  Csb[0] = mask;
3451  Csb[1] = 0x0;
3452  rc = TranslateCharsetInfo(Csb, &cs, TCI_SRCFONTSIG);
3453  if (!rc)
3454  continue;
3455 
3456  TRACE("Falling back to least significant found CodePage %u\n",
3457  cs.ciACP);
3458  *codepage = cs.ciACP;
3459  return S_OK;
3460  }
3461  }
3462 
3463  TRACE("no codepage found\n");
3464  return E_FAIL;
3465 }
#define TCI_SRCFONTSIG
Definition: wingdi.h:962
#define E_FAIL
Definition: ddrawi.h:102
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
unsigned int BOOL
Definition: ntddk_ex.h:94
int codepage
Definition: win_iconv.c:156
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define S_OK
Definition: intsafe.h:59
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306
unsigned int UINT
Definition: ndis.h:50
#define TCI_SRCCODEPAGE
Definition: wingdi.h:961

◆ fnIMLangFontLink2_CodePageToCodePages()

static HRESULT WINAPI fnIMLangFontLink2_CodePageToCodePages ( IMLangFontLink2 *  iface,
UINT  codepage,
DWORD codepages 
)
static

Definition at line 3400 of file mlang.c.

3403 {
3405  CHARSETINFO cs;
3406  BOOL rc;
3407 
3408  TRACE("(%p)->(%u %p)\n", This, codepage, codepages);
3409 
3411  if (rc)
3412  {
3413  *codepages = cs.fs.fsCsb[0];
3414  TRACE("resulting codepages 0x%x\n", *codepages);
3415  return S_OK;
3416  }
3417 
3418  TRACE("codepage not found\n");
3419  *codepages = 0;
3420  return E_FAIL;
3421 }
#define E_FAIL
Definition: ddrawi.h:102
uint32_t cs
Definition: isohybrid.c:75
unsigned int BOOL
Definition: ntddk_ex.h:94
int codepage
Definition: win_iconv.c:156
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define S_OK
Definition: intsafe.h:59
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306
#define TCI_SRCCODEPAGE
Definition: wingdi.h:961

◆ fnIMLangFontLink2_CodePageToScriptID()

static HRESULT WINAPI fnIMLangFontLink2_CodePageToScriptID ( IMLangFontLink2 *  This,
UINT  uiCodePage,
SCRIPT_ID *  pSid 
)
static

Definition at line 3589 of file mlang.c.

3591 {
3592  UINT i;
3593 
3594  TRACE("(%p)->%i %p\n", This, uiCodePage, pSid);
3595 
3596  if (uiCodePage == CP_UNICODE) return E_FAIL;
3597 
3598  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
3599  {
3600  if (uiCodePage == mlang_data[i].family_codepage)
3601  {
3602  if (pSid) *pSid = mlang_data[i].sid;
3603  return S_OK;
3604  }
3605  }
3606  return E_FAIL;
3607 }
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
#define CP_UNICODE
Definition: mlang.c:39
SCRIPT_ID sid
Definition: mlang.c:494
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
static PSID pSid
Definition: security.c:74

◆ fnIMLangFontLink2_GetCharCodePages()

static HRESULT WINAPI fnIMLangFontLink2_GetCharCodePages ( IMLangFontLink2 *  iface,
WCHAR  ch_src,
DWORD ret_codepages 
)
static

Definition at line 3332 of file mlang.c.

3334 {
3336  unsigned int i;
3337 
3338  TRACE("(%p)->(%s %p)\n", This, debugstr_wn(&ch_src, 1), ret_codepages);
3339 
3340  *ret_codepages = 0;
3341 
3342  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
3343  {
3344  BOOL used_dc;
3345  CHAR buf;
3346 
3348  &ch_src, 1, &buf, 1, NULL, &used_dc);
3349 
3350  /* If default char is not used, current codepage include the given symbol */
3351  if (!used_dc)
3352  {
3353  DWORD codepages;
3354 
3355  IMLangFontLink2_CodePageToCodePages(iface,
3356  mlang_data[i].family_codepage, &codepages);
3357  *ret_codepages |= codepages;
3358  }
3359  }
3360  return S_OK;
3361 }
#define WideCharToMultiByte
Definition: compat.h:101
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
char CHAR
Definition: xmlstorage.h:175
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WC_NO_BEST_FIT_CHARS
Definition: unicode.h:46
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306

◆ fnIMLangFontLink2_GetFontCodePages()

static HRESULT WINAPI fnIMLangFontLink2_GetFontCodePages ( IMLangFontLink2 *  iface,
HDC  hdc,
HFONT  hfont,
DWORD codepages 
)
static

Definition at line 3467 of file mlang.c.

3469 {
3471  FONTSIGNATURE fontsig;
3472  HFONT old_font;
3473 
3474  TRACE("(%p)->(%p %p %p)\n", This, hdc, hfont, codepages);
3475 
3476  old_font = SelectObject(hdc, hfont);
3477  GetTextCharsetInfo(hdc, &fontsig, 0);
3478  SelectObject(hdc, old_font);
3479 
3480  *codepages = fontsig.fsCsb[0];
3481  TRACE("ret 0x%x\n", fontsig.fsCsb[0]);
3482 
3483  return S_OK;
3484 }
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
int WINAPI GetTextCharsetInfo(_In_ HDC, _Out_opt_ LPFONTSIGNATURE, _In_ DWORD)
static HFONT hfont
#define TRACE(s)
Definition: solgame.cpp:4
HDC hdc
Definition: main.c:9
#define S_OK
Definition: intsafe.h:59
DWORD fsCsb[2]
Definition: wingdi.h:1538
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)

◆ fnIMLangFontLink2_GetFontUnicodeRanges()

static HRESULT WINAPI fnIMLangFontLink2_GetFontUnicodeRanges ( IMLangFontLink2 *  This,
HDC  hDC,
UINT puiRanges,
UNICODERANGE *  pUranges 
)
static

Definition at line 3523 of file mlang.c.

3525 {
3526  DWORD size;
3527  GLYPHSET *gs;
3528 
3529  TRACE("(%p)->%p %p %p\n", This, hDC, puiRanges, pUranges);
3530 
3531  if (!puiRanges) return E_INVALIDARG;
3532  if (!(size = GetFontUnicodeRanges(hDC, NULL))) return E_FAIL;
3533  if (!(gs = HeapAlloc(GetProcessHeap(), 0, size))) return E_OUTOFMEMORY;
3534 
3535  GetFontUnicodeRanges(hDC, gs);
3536  *puiRanges = gs->cRanges;
3537  if (pUranges)
3538  {
3539  UINT i;
3540  for (i = 0; i < gs->cRanges; i++)
3541  {
3542  if (i >= *puiRanges) break;
3543  pUranges[i].wcFrom = gs->ranges[i].wcLow;
3544  pUranges[i].wcTo = gs->ranges[i].wcLow + gs->ranges[i].cGlyphs;
3545  }
3546  *puiRanges = i;
3547  }
3548  HeapFree(GetProcessHeap(), 0, gs);
3549  return S_OK;
3550 }
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define gs
Definition: i386-dis.c:436
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
static HDC hDC
Definition: 3dtext.c:33
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ fnIMLangFontLink2_GetScriptFontInfo()

static HRESULT WINAPI fnIMLangFontLink2_GetScriptFontInfo ( IMLangFontLink2 *  This,
SCRIPT_ID  sid,
DWORD  dwFlags,
UINT puiFonts,
SCRIPTFONTINFO *  pScriptFont 
)
static

Definition at line 3552 of file mlang.c.

3555 {
3556  UINT i, j;
3557 
3558  TRACE("(%p)->%u %x %p %p\n", This, sid, dwFlags, puiFonts, pScriptFont);
3559 
3560  if (!dwFlags) dwFlags = SCRIPTCONTF_PROPORTIONAL_FONT;
3561 
3562  for (i = 0, j = 0; i < ARRAY_SIZE(mlang_data); i++)
3563  {
3564  if (sid == mlang_data[i].sid)
3565  {
3566  if (pScriptFont)
3567  {
3568  if (j >= *puiFonts) break;
3569 
3570  pScriptFont[j].scripts = 1 << mlang_data[i].sid;
3571  if (dwFlags == SCRIPTCONTF_FIXED_FONT)
3572  {
3573  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].fixed_font, -1,
3574  pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
3575  }
3576  else if (dwFlags == SCRIPTCONTF_PROPORTIONAL_FONT)
3577  {
3578  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].proportional_font, -1,
3579  pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
3580  }
3581  }
3582  j++;
3583  }
3584  }
3585  *puiFonts = j;
3586  return S_OK;
3587 }
#define CP_ACP
Definition: compat.h:99
FT_UInt sid
Definition: cffcmap.c:139
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define TRACE(s)
Definition: solgame.cpp:4
SCRIPT_ID sid
Definition: mlang.c:494
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
#define MultiByteToWideChar
Definition: compat.h:100

◆ fnIMLangFontLink2_GetStrCodePages()

static HRESULT WINAPI fnIMLangFontLink2_GetStrCodePages ( IMLangFontLink2 *  iface,
const WCHAR src,
LONG  src_len,
DWORD  priority_cp,
DWORD codepages,
LONG ret_len 
)
static

Definition at line 3363 of file mlang.c.

3366 {
3368  LONG i;
3369  DWORD cps = 0;
3370 
3371  TRACE("(%p)->(%s:%d %x %p %p)\n", This, debugstr_wn(src, src_len), src_len, priority_cp,
3372  codepages, ret_len);
3373 
3374  if (codepages) *codepages = 0;
3375  if (ret_len) *ret_len = 0;
3376 
3377  if (!src || !src_len || src_len < 0)
3378  return E_INVALIDARG;
3379 
3380  for (i = 0; i < src_len; i++)
3381  {
3382  DWORD cp;
3383  HRESULT ret;
3384 
3385  ret = IMLangFontLink2_GetCharCodePages(iface, src[i], &cp);
3386  if (ret != S_OK) return E_FAIL;
3387 
3388  if (!cps) cps = cp;
3389  else cps &= cp;
3390 
3391  /* FIXME: not tested */
3392  if (priority_cp & cps) break;
3393  }
3394 
3395  if (codepages) *codepages = cps;
3396  if (ret_len) *ret_len = min( i + 1, src_len );
3397  return S_OK;
3398 }
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79
int ret
GLenum src
Definition: glext.h:6340
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306
#define min(a, b)
Definition: monoChain.cc:55
POINT cp
Definition: magnifier.c:59

◆ fnIMLangFontLink2_MapFont()

static HRESULT WINAPI fnIMLangFontLink2_MapFont ( IMLangFontLink2 *  This,
HDC  hDC,
DWORD  dwCodePages,
WCHAR  chSrc,
HFONT pFont 
)
static

Definition at line 3501 of file mlang.c.

3503 {
3504  HFONT old_font;
3505 
3506  TRACE("(%p)->%p %08x %04x %p\n",This, hDC, dwCodePages, chSrc, pFont);
3507 
3508  if (!hDC) return E_FAIL;
3509 
3510  if (dwCodePages != 0)
3511  {
3512  old_font = GetCurrentObject(hDC, OBJ_FONT);
3513  return map_font(hDC, dwCodePages, old_font, pFont);
3514  }
3515  else
3516  {
3517  if (pFont == NULL) return E_INVALIDARG;
3518  FIXME("the situation where dwCodepages is set to zero is not implemented\n");
3519  return E_FAIL;
3520  }
3521 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define OBJ_FONT
Definition: objidl.idl:1414
static HDC hDC
Definition: 3dtext.c:33
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static HRESULT map_font(HDC hdc, DWORD codepages, HFONT src_font, HFONT *dst_font)
Definition: mlang.c:1334
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:439

◆ fnIMLangFontLink2_QueryInterface()

static HRESULT WINAPI fnIMLangFontLink2_QueryInterface ( IMLangFontLink2 *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 3311 of file mlang.c.

3315 {
3317  return IMultiLanguage3_QueryInterface( &This->IMultiLanguage3_iface, riid, ppvObject );
3318 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppvObject
Definition: precomp.h:44
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306

◆ fnIMLangFontLink2_Release()

static ULONG WINAPI fnIMLangFontLink2_Release ( IMLangFontLink2 *  iface)
static

Definition at line 3326 of file mlang.c.

3327 {
3329  return IMultiLanguage3_Release( &This->IMultiLanguage3_iface );
3330 }
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3306

◆ fnIMLangFontLink2_ReleaseFont()

static HRESULT WINAPI fnIMLangFontLink2_ReleaseFont ( IMLangFontLink2 *  This,
HFONT  hFont 
)
static

Definition at line 3486 of file mlang.c.

3488 {
3489  TRACE("(%p)->%p\n",This, hFont);
3490 
3491  return release_font(hFont);
3492 }
HFONT hFont
Definition: main.c:53
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT release_font(HFONT font)
Definition: mlang.c:1407

◆ fnIMLangFontLink2_ResetFontMapping()

static HRESULT WINAPI fnIMLangFontLink2_ResetFontMapping ( IMLangFontLink2 *  This)
static

Definition at line 3494 of file mlang.c.

3495 {
3496  TRACE("(%p)\n",This);
3497 
3498  return clear_font_cache();
3499 }
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT clear_font_cache(void)
Definition: mlang.c:1430

◆ fnIMLangFontLink_AddRef()

static ULONG WINAPI fnIMLangFontLink_AddRef ( IMLangFontLink *  iface)
static

Definition at line 1985 of file mlang.c.

1987 {
1989  return IMultiLanguage3_AddRef( &This->IMultiLanguage3_iface );
1990 }
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_CodePagesToCodePage()

static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage ( IMLangFontLink *  iface,
DWORD  codepages,
UINT  def_codepage,
UINT codepage 
)
static

Definition at line 2030 of file mlang.c.

2035 {
2037  return IMLangFontLink2_CodePagesToCodePage(&This->IMLangFontLink2_iface, codepages,
2038  def_codepage, codepage);
2039 }
int codepage
Definition: win_iconv.c:156
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_CodePageToCodePages()

static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages ( IMLangFontLink *  iface,
UINT  codepage,
DWORD codepages 
)
static

Definition at line 2021 of file mlang.c.

2025 {
2027  return IMLangFontLink2_CodePageToCodePages(&This->IMLangFontLink2_iface, codepage, codepages);
2028 }
int codepage
Definition: win_iconv.c:156
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_GetCharCodePages()

static HRESULT WINAPI fnIMLangFontLink_GetCharCodePages ( IMLangFontLink *  iface,
WCHAR  ch_src,
DWORD codepages 
)
static

Definition at line 1999 of file mlang.c.

2003 {
2005  return IMLangFontLink2_GetCharCodePages(&This->IMLangFontLink2_iface, ch_src, codepages);
2006 }
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_GetFontCodePages()

static HRESULT WINAPI fnIMLangFontLink_GetFontCodePages ( IMLangFontLink *  iface,
HDC  hdc,
HFONT  hfont,
DWORD codepages 
)
static

Definition at line 2041 of file mlang.c.

2046 {
2048  return IMLangFontLink2_GetFontCodePages(&This->IMLangFontLink2_iface, hdc, hfont, codepages);
2049 }
static HFONT hfont
HDC hdc
Definition: main.c:9
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_GetStrCodePages()

static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages ( IMLangFontLink *  iface,
const WCHAR src,
LONG  src_len,
DWORD  priority_cp,
DWORD codepages,
LONG ret_len 
)
static

Definition at line 2008 of file mlang.c.

2015 {
2017  return IMLangFontLink2_GetStrCodePages(&This->IMLangFontLink2_iface, src, src_len, priority_cp,
2018  codepages, ret_len);
2019 }
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79
GLenum src
Definition: glext.h:6340
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_MapFont()

static HRESULT WINAPI fnIMLangFontLink_MapFont ( IMLangFontLink *  iface,
HDC  hDC,
DWORD  dwCodePages,
HFONT  hSrcFont,
HFONT phDestFont 
)
static

Definition at line 2051 of file mlang.c.

2057 {
2058  TRACE("(%p)->%p %08x %p %p\n",iface, hDC, dwCodePages, hSrcFont, phDestFont);
2059 
2060  return map_font(hDC, dwCodePages, hSrcFont, phDestFont);
2061 }
#define TRACE(s)
Definition: solgame.cpp:4
static HDC hDC
Definition: 3dtext.c:33
static HRESULT map_font(HDC hdc, DWORD codepages, HFONT src_font, HFONT *dst_font)
Definition: mlang.c:1334

◆ fnIMLangFontLink_QueryInterface()

static HRESULT WINAPI fnIMLangFontLink_QueryInterface ( IMLangFontLink *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1976 of file mlang.c.

1980 {
1982  return IMultiLanguage3_QueryInterface( &This->IMultiLanguage3_iface, riid, ppvObject );
1983 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppvObject
Definition: precomp.h:44
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_Release()

static ULONG WINAPI fnIMLangFontLink_Release ( IMLangFontLink *  iface)
static

Definition at line 1992 of file mlang.c.

1994 {
1996  return IMultiLanguage3_Release( &This->IMultiLanguage3_iface );
1997 }
static MLang_impl * impl_from_IMLangFontLink(IMLangFontLink *iface)
Definition: mlang.c:1971

◆ fnIMLangFontLink_ReleaseFont()

static HRESULT WINAPI fnIMLangFontLink_ReleaseFont ( IMLangFontLink *  iface,
HFONT  hFont 
)
static

Definition at line 2063 of file mlang.c.

2066 {
2067  TRACE("(%p)->%p\n",iface, hFont);
2068 
2069  return release_font(hFont);
2070 }
HFONT hFont
Definition: main.c:53
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT release_font(HFONT font)
Definition: mlang.c:1407

◆ fnIMLangFontLink_ResetFontMapping()

static HRESULT WINAPI fnIMLangFontLink_ResetFontMapping ( IMLangFontLink *  iface)
static

Definition at line 2072 of file mlang.c.

2074 {
2075  TRACE("(%p)\n",iface);
2076 
2077  return clear_font_cache();
2078 }
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT clear_font_cache(void)
Definition: mlang.c:1430

◆ fnIMLangLineBreakConsole_AddRef()

static ULONG WINAPI fnIMLangLineBreakConsole_AddRef ( IMLangLineBreakConsole *  iface)
static

Definition at line 3643 of file mlang.c.

3645 {
3647  return IMultiLanguage3_AddRef( &This->IMultiLanguage3_iface );
3648 }
static MLang_impl * impl_from_IMLangLineBreakConsole(IMLangLineBreakConsole *iface)
Definition: mlang.c:3629

◆ fnIMLangLineBreakConsole_BreakLineA()

static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineA ( IMLangLineBreakConsole *  iface,
LCID  locale,
UINT  uCodePage,
const CHAR pszSrc,
LONG  cchSrc,
LONG  cMaxColumns,
LONG pcchLine,
LONG pcchSkip 
)
static

Definition at line 3687 of file mlang.c.

3696 {
3697  LONG i, line = cchSrc, skip = 0;
3698 
3699  FIXME("(%p)->%i %i %s %i %i %p %p\n", iface, locale, uCodePage, debugstr_an(pszSrc,cchSrc), cchSrc, cMaxColumns, pcchLine, pcchSkip);
3700 
3701  if (uCodePage == CP_USASCII && cchSrc > cMaxColumns)
3702  {
3703  for (line = cMaxColumns, i = cMaxColumns - 1; i >= 0; i--)
3704  {
3705  if (pszSrc[i] == ' ')
3706  {
3707  while (i >= 0 && pszSrc[i] == ' ')
3708  {
3709  i--;
3710  line--;
3711  skip++;
3712  }
3713  break;
3714  }
3715  }
3716  }
3717  *pcchLine = line;
3718  *pcchSkip = skip;
3719  return S_OK;
3720 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: _locale.h:75
long LONG
Definition: pedump.c:60
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: parser.c:48
char line[200]
Definition: main.c:97
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
#define S_OK
Definition: intsafe.h:59
#define skip(...)
Definition: atltest.h:64

◆ fnIMLangLineBreakConsole_BreakLineML()

static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineML ( IMLangLineBreakConsole *  iface,
IMLangString *  pSrcMLStr,
LONG  lSrcPos,
LONG  lSrcLen,
LONG  cMinColumns,
LONG  cMaxColumns,
LONG plLineLen,
LONG plSkipLen 
)
static

Definition at line 3657 of file mlang.c.

3666 {
3667  FIXME("(%p)->%p %i %i %i %i %p %p\n", iface, pSrcMLStr, lSrcPos, lSrcLen, cMinColumns, cMaxColumns, plLineLen, plSkipLen);
3668  return E_NOTIMPL;
3669 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fnIMLangLineBreakConsole_BreakLineW()

static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineW ( IMLangLineBreakConsole *  iface,
LCID  locale,
const WCHAR pszSrc,
LONG  cchSrc,
LONG  cMaxColumns,
LONG pcchLine,
LONG pcchSkip 
)
static

Definition at line 3671 of file mlang.c.

3679 {
3680  FIXME("(%p)->%i %s %i %i %p %p\n", iface, locale, debugstr_wn(pszSrc,cchSrc), cchSrc, cMaxColumns, pcchLine, pcchSkip);
3681 
3682  *pcchLine = cchSrc;
3683  *pcchSkip = 0;
3684  return S_OK;
3685 }
Definition: _locale.h:75
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59

◆ fnIMLangLineBreakConsole_QueryInterface()

static HRESULT WINAPI fnIMLangLineBreakConsole_QueryInterface ( IMLangLineBreakConsole *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 3634 of file mlang.c.

3638 {
3640  return IMultiLanguage3_QueryInterface( &This->IMultiLanguage3_iface, riid, ppvObject );
3641 }
REFIID riid
Definition: precomp.h:44
static MLang_impl * impl_from_IMLangLineBreakConsole(IMLangLineBreakConsole *iface)
Definition: mlang.c:3629
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ fnIMLangLineBreakConsole_Release()

static ULONG WINAPI fnIMLangLineBreakConsole_Release ( IMLangLineBreakConsole *  iface)
static

Definition at line 3650 of file mlang.c.

3652 {
3654  return IMultiLanguage3_Release( &This->IMultiLanguage3_iface );
3655 }
static MLang_impl * impl_from_IMLangLineBreakConsole(IMLangLineBreakConsole *iface)
Definition: mlang.c:3629

◆ fnIMultiLanguage3_AddRef()

static ULONG WINAPI fnIMultiLanguage3_AddRef ( IMultiLanguage3 *  iface)
static

Definition at line 2623 of file mlang.c.

2624 {
2626  return InterlockedIncrement(&This->ref);
2627 }
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575
#define InterlockedIncrement
Definition: armddk.h:53

◆ fnIMultiLanguage3_ConvertString()

static HRESULT WINAPI fnIMultiLanguage3_ConvertString ( IMultiLanguage3 *  iface,
DWORD pdwMode,
DWORD  dwSrcEncoding,
DWORD  dwDstEncoding,
BYTE pSrcStr,
UINT pcSrcSize,
BYTE pDstStr,
UINT pcDstSize 
)
static

Definition at line 2813 of file mlang.c.

2822 {
2823  return ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding,
2824  (LPCSTR)pSrcStr, (LPINT)pcSrcSize, (LPSTR)pDstStr, (LPINT)pcDstSize);
2825 }
HRESULT WINAPI ConvertINetString(LPDWORD pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1105
char * LPSTR
Definition: xmlstorage.h:182
const char * LPCSTR
Definition: xmlstorage.h:183
int * LPINT
Definition: windef.h:178

◆ fnIMultiLanguage3_ConvertStringFromUnicode()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringFromUnicode ( IMultiLanguage3 *  iface,
DWORD pdwMode,
DWORD  dwEncoding,
WCHAR pSrcStr,
UINT pcSrcSize,
CHAR pDstStr,
UINT pcDstSize 
)
static

Definition at line 2840 of file mlang.c.

2848 {
2849  return ConvertINetUnicodeToMultiByte(pdwMode, dwEncoding,
2850  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
2851 }
HRESULT WINAPI ConvertINetUnicodeToMultiByte(LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1020
int * LPINT
Definition: windef.h:178

◆ fnIMultiLanguage3_ConvertStringFromUnicodeEx()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringFromUnicodeEx ( IMultiLanguage3 *  This,
DWORD pdwMode,
DWORD  dwEncoding,
WCHAR pSrcStr,
UINT pcSrcSize,
CHAR pDstStr,
UINT pcDstSize,
DWORD  dwFlag,
WCHAR lpFallBack 
)
static

Definition at line 3063 of file mlang.c.

3073 {
3074  FIXME("\n");
3075  return ConvertINetUnicodeToMultiByte(pdwMode, dwEncoding,
3076  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
3077 }
#define FIXME(fmt,...)
Definition: debug.h:110
HRESULT WINAPI ConvertINetUnicodeToMultiByte(LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1020
int * LPINT
Definition: windef.h:178

◆ fnIMultiLanguage3_ConvertStringInIStream()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringInIStream ( IMultiLanguage3 *  iface,
DWORD pdwMode,
DWORD  dwFlag,
WCHAR lpFallBack,
DWORD  dwSrcEncoding,
DWORD  dwDstEncoding,
IStream pstmIn,
IStream pstmOut 
)
static

Definition at line 2978 of file mlang.c.

2987 {
2988  char *src, *dst = NULL;
2989  INT srclen, dstlen;
2990  STATSTG stat;
2991  HRESULT hr;
2992 
2993  TRACE("%p %0x8 %s %u %u %p %p\n",
2994  pdwMode, dwFlag, debugstr_w(lpFallBack), dwSrcEncoding, dwDstEncoding, pstmIn, pstmOut);
2995 
2996  FIXME("dwFlag and lpFallBack not handled\n");
2997 
2998  hr = IStream_Stat(pstmIn, &stat, STATFLAG_NONAME);
2999  if (FAILED(hr)) return hr;
3000 
3001  if (stat.cbSize.QuadPart > MAXLONG) return E_INVALIDARG;
3002  if (!(src = HeapAlloc(GetProcessHeap(), 0, stat.cbSize.QuadPart))) return E_OUTOFMEMORY;
3003 
3004  hr = IStream_Read(pstmIn, src, stat.cbSize.QuadPart, (ULONG *)&srclen);
3005  if (FAILED(hr)) goto exit;
3006 
3007  hr = ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding, src, &srclen, NULL, &dstlen);
3008  if (FAILED(hr)) goto exit;
3009 
3010  if (!(dst = HeapAlloc(GetProcessHeap(), 0, dstlen)))
3011  {
3012  hr = E_OUTOFMEMORY;
3013  goto exit;
3014  }
3015  hr = ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding, src, &srclen, dst, &dstlen);
3016  if (FAILED(hr)) goto exit;
3017 
3018  hr = IStream_Write(pstmOut, dst, dstlen, NULL);
3019 
3020 exit:
3021  HeapFree(GetProcessHeap(), 0, src);
3022  HeapFree(GetProcessHeap(), 0, dst);
3023  return hr;
3024 }
HRESULT WINAPI ConvertINetString(LPDWORD pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1105
HRESULT hr
Definition: shlfolder.c:183
#define MAXLONG
Definition: umtypes.h:116
int32_t INT
Definition: typedefs.h:56
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
Definition: stat.h:55
GLenum src
Definition: glext.h:6340
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340
unsigned int ULONG
Definition: retypes.h:1
void exit(int exitcode)
Definition: _exit.c:33
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ fnIMultiLanguage3_ConvertStringReset()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringReset ( IMultiLanguage3 *  iface)
static

Definition at line 2853 of file mlang.c.

2855 {
2856  FIXME("\n");
2857  return E_NOTIMPL;
2858 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fnIMultiLanguage3_ConvertStringToUnicode()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringToUnicode ( IMultiLanguage3 *  iface,
DWORD pdwMode,
DWORD  dwEncoding,
CHAR pSrcStr,
UINT pcSrcSize,
WCHAR pDstStr,
UINT pcDstSize 
)
static

Definition at line 2827 of file mlang.c.

2835 {
2836  return ConvertINetMultiByteToUnicode(pdwMode, dwEncoding,
2837  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
2838 }
HRESULT WINAPI ConvertINetMultiByteToUnicode(LPDWORD pdwMode, DWORD dwEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPWSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:954
int * LPINT
Definition: windef.h:178

◆ fnIMultiLanguage3_ConvertStringToUnicodeEx()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringToUnicodeEx ( IMultiLanguage3 *  iface,
DWORD pdwMode,
DWORD  dwEncoding,
CHAR pSrcStr,
UINT pcSrcSize,
WCHAR pDstStr,
UINT pcDstSize,
DWORD  dwFlag,
WCHAR lpFallBack 
)
static

Definition at line 3026 of file mlang.c.

3036 {
3037  if (dwFlag || lpFallBack)
3038  FIXME("Ignoring dwFlag (0x%x/%d) and lpFallBack (%p)\n",
3039  dwFlag, dwFlag, lpFallBack);
3040 
3041  return ConvertINetMultiByteToUnicode(pdwMode, dwEncoding,
3042  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
3043 }
#define FIXME(fmt,...)
Definition: debug.h:110
HRESULT WINAPI ConvertINetMultiByteToUnicode(LPDWORD pdwMode, DWORD dwEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPWSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:954
int * LPINT
Definition: windef.h:178

◆ fnIMultiLanguage3_CreateConvertCharset()

static HRESULT WINAPI fnIMultiLanguage3_CreateConvertCharset ( IMultiLanguage3 *  iface,
UINT  src_cp,
UINT  dst_cp,
DWORD  prop,
IMLangConvertCharset **  convert_charset 
)
static

Definition at line 2961 of file mlang.c.

2967 {
2968  HRESULT hr;
2969 
2970  TRACE("(%u %u 0x%08x %p)\n", src_cp, dst_cp, prop, convert_charset);
2971 
2973  if (FAILED(hr)) return hr;
2974 
2975  return IMLangConvertCharset_Initialize(*convert_charset, src_cp, dst_cp, prop);
2976 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT MLangConvertCharset_create(IUnknown *outer, void **obj)
Definition: mlang.c:3902
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77

◆ fnIMultiLanguage3_DetectCodepageInIStream()

static HRESULT WINAPI fnIMultiLanguage3_DetectCodepageInIStream ( IMultiLanguage3 *  iface,
DWORD  dwFlag,
DWORD  dwPrefWinCodePage,
IStream pstmIn,
DetectEncodingInfo *  lpEncoding,
INT pnScores 
)
static

Definition at line 3079 of file mlang.c.

3086 {
3087  FIXME("\n");
3088  return E_NOTIMPL;
3089 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fnIMultiLanguage3_DetectInputCodepage()

static HRESULT WINAPI fnIMultiLanguage3_DetectInputCodepage ( IMultiLanguage3 *  iface,
DWORD  dwFlag,
DWORD  dwPrefWinCodePage,
CHAR pSrcStr,
INT pcSrcSize,
DetectEncodingInfo *  lpEncoding,
INT pnScores 
)
static

Definition at line 3091 of file mlang.c.

3099 {
3100  FIXME("\n");
3101  return E_NOTIMPL;
3102 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fnIMultiLanguage3_DetectOutboundCodePage()

static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePage ( IMultiLanguage3 *  iface,
DWORD  dwFlags,
LPCWSTR  lpWideCharStr,
UINT  cchWideChar,
UINT puiPreferredCodePages,
UINT  nPreferredCodePages,
UINT puiDetectedCodePages,
UINT pnDetectedCodePages,
WCHAR lpSpecialChar 
)
static

Definition at line 3217 of file mlang.c.

3227 {
3229 
3230  FIXME("(%p)->(%08x %s %p %u %p %p(%u) %s)\n", This, dwFlags, debugstr_w(lpWideCharStr),
3231  puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
3232  pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
3233  debugstr_w(lpSpecialChar));
3234 
3235  if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
3236  return E_INVALIDARG;
3237 
3238  puiDetectedCodePages[0] = CP_UTF8;
3239  *pnDetectedCodePages = 1;
3240  return S_OK;
3241 }
#define CP_UTF8
Definition: nls.h:20
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59

◆ fnIMultiLanguage3_DetectOutboundCodePageInIStream()

static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream ( IMultiLanguage3 *  iface,
DWORD  dwFlags,
IStream pStrIn,
UINT puiPreferredCodePages,
UINT  nPreferredCodePages,
UINT puiDetectedCodePages,
UINT pnDetectedCodePages,
WCHAR lpSpecialChar 
)
static

Definition at line 3243 of file mlang.c.

3252 {
3254 
3255  FIXME("(%p)->(%08x %p %p %u %p %p(%u) %s)\n", This, dwFlags, pStrIn,
3256  puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
3257  pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
3258  debugstr_w(lpSpecialChar));
3259 
3260  if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
3261  return E_INVALIDARG;
3262 
3263  puiDetectedCodePages[0] = CP_UTF8;
3264  *pnDetectedCodePages = 1;
3265  return S_OK;
3266 }
#define CP_UTF8
Definition: nls.h:20
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59

◆ fnIMultiLanguage3_EnumCodePages()

static HRESULT WINAPI fnIMultiLanguage3_EnumCodePages ( IMultiLanguage3 *  iface,
DWORD  grfFlags,
LANGID  LangId,
IEnumCodePage **  ppEnumCodePage 
)
static

Definition at line 2731 of file mlang.c.

2736 {
2738 
2739  TRACE("%p %08x %04x %p\n", This, grfFlags, LangId, ppEnumCodePage);
2740 
2741  return EnumCodePage_create( This, grfFlags, LangId, ppEnumCodePage );
2742 }
static HRESULT EnumCodePage_create(MLang_impl *mlang, DWORD grfFlags, LANGID LangId, IEnumCodePage **ppEnumCodePage)
Definition: mlang.c:1753
#define TRACE(s)
Definition: solgame.cpp:4
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575

◆ fnIMultiLanguage3_EnumRfc1766()

static HRESULT WINAPI fnIMultiLanguage3_EnumRfc1766 ( IMultiLanguage3 *  iface,
LANGID  LangId,
IEnumRfc1766 **  ppEnumRfc1766 
)
static

Definition at line 2902 of file mlang.c.

2906 {
2908 
2909  TRACE("%p %p\n", This, ppEnumRfc1766);
2910 
2911  return EnumRfc1766_create(LangId, ppEnumRfc1766);
2912 }
static HRESULT EnumRfc1766_create(LANGID LangId, IEnumRfc1766 **ppEnum)
Definition: mlang.c:2445
#define TRACE(s)
Definition: solgame.cpp:4
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575

◆ fnIMultiLanguage3_EnumScripts()

static HRESULT WINAPI fnIMultiLanguage3_EnumScripts ( IMultiLanguage3 *  iface,
DWORD  dwFlags,
LANGID  LangId,
IEnumScript **  ppEnumScript 
)
static

Definition at line 3172 of file mlang.c.

3177 {
3179 
3180  TRACE("%p %08x %04x %p\n", This, dwFlags, LangId, ppEnumScript);
3181 
3182  return EnumScript_create( This, dwFlags, LangId, ppEnumScript );
3183 }
#define TRACE(s)
Definition: solgame.cpp:4
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static HRESULT EnumScript_create(MLang_impl *mlang, DWORD dwFlags, LANGID LangId, IEnumScript **ppEnumScript)
Definition: mlang.c:1931

◆ fnIMultiLanguage3_GetCharsetInfo()

static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo ( IMultiLanguage3 *  iface,
BSTR  Charset,
PMIMECSETINFO  pCharsetInfo 
)
static

Definition at line 2744 of file mlang.c.

2748 {
2749  UINT i, n;
2751 
2752  TRACE("%p %s %p\n", This, debugstr_w(Charset), pCharsetInfo);
2753 
2754  if (!pCharsetInfo) return E_FAIL;
2755 
2756  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
2757  {
2758  for (n = 0; n < mlang_data[i].number_of_cp; n++)
2759  {
2760  WCHAR csetW[MAX_MIMECSET_NAME];
2761 
2762  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].mime_cp_info[n].web_charset, -1, csetW, MAX_MIMECSET_NAME);
2763  if (!lstrcmpiW(Charset, csetW))
2764  {
2765  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2766  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2767  strcpyW(pCharsetInfo->wszCharset, csetW);
2768  return S_OK;
2769  }
2770  if (mlang_data[i].mime_cp_info[n].alias && !lstrcmpiW(Charset, mlang_data[i].mime_cp_info[n].alias))
2771  {
2772  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2773  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2774  strcpyW(pCharsetInfo->wszCharset, mlang_data[i].mime_cp_info[n].alias);
2775  return S_OK;
2776  }
2777  }
2778  }
2779 
2780  /* FIXME:
2781  * Since we do not support charsets like iso-2022-jp and do not have
2782  * them in our database as a primary (web_charset) encoding this loop
2783  * does an attempt to 'approximate' charset name by header_charset.
2784  */
2785  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
2786  {
2787  for (n = 0; n < mlang_data[i].number_of_cp; n++)
2788  {
2789  WCHAR csetW[MAX_MIMECSET_NAME];
2790 
2791  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].mime_cp_info[n].header_charset, -1, csetW, MAX_MIMECSET_NAME);
2792  if (!lstrcmpiW(Charset, csetW))
2793  {
2794  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2795  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2796  strcpyW(pCharsetInfo->wszCharset, csetW);
2797  return S_OK;
2798  }
2799  }
2800  }
2801 
2802  return E_FAIL;
2803 }
#define CP_ACP
Definition: compat.h:99
GLdouble n
Definition: glext.h:7729
UINT number_of_cp
Definition: mlang.c:490
const MIME_CP_INFO * mime_cp_info
Definition: mlang.c:491
#define E_FAIL
Definition: ddrawi.h:102
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
UINT family_codepage
Definition: mlang.c:489
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2575
UINT cp
Definition: mlang.c:64
const WCHAR * alias
Definition: main.c:67
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
#define MultiByteToWideChar
Definition: compat.h:100
const WCHAR * alias
Definition: mlang.c:69

◆ fnIMultiLanguage3_GetCodePageDescription()

static HRESULT WINAPI fnIMultiLanguage3_GetCodePageDescription ( IMultiLanguage3 *  iface,
UINT  uiCodePage,
LCID  lcid,
LPWSTR  lpWideCharStr,
int  cchWideChar 
)
static

Definition at line 3112 of file mlang.c.

3118 {
3119  /* Find first instance */
3120  unsigned int i,n;
3121 
3122  TRACE ("%u, %04x, %p, %d\n", uiCodePage, lcid, lpWideCharStr, cchWideChar);
3123  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
3124  {
3125  for (n = 0; n < mlang_data[i].number_of_cp; n++)
3126  {
3127  if (mlang_data[i].mime_cp_info[n].cp == uiCodePage)
3128  {