ReactOS  0.4.14-dev-833-g5f692ed
mlang.c File Reference
#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/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 28 of file mlang.c.

◆ HANKATA

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

Definition at line 553 of file mlang.c.

◆ ISEUC

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

Definition at line 554 of file mlang.c.

◆ ISMARU

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

Definition at line 558 of file mlang.c.

◆ ISNIGORI

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

Definition at line 559 of file mlang.c.

◆ NOTEUC

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

Definition at line 555 of file mlang.c.

◆ SJIS1

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

Definition at line 556 of file mlang.c.

◆ SJIS2

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

Definition at line 557 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 1428 of file mlang.c.

1429 {
1430  struct font_list *font_list_entry;
1431  struct font_list *font_list_entry2;
1432 
1434  LIST_FOR_EACH_ENTRY_SAFE(font_list_entry, font_list_entry2, &font_cache, struct font_list, list_entry)
1435  {
1436  list_remove(&font_list_entry->list_entry);
1437  DeleteObject(font_list_entry->font);
1438  HeapFree(GetProcessHeap(), 0, font_list_entry);
1439  }
1441 
1442  return S_OK;
1443 }
struct list list_entry
Definition: mlang.c:529
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
HFONT font
Definition: mlang.c:531
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:403
#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:402
static struct list font_cache
Definition: mlang.c:535
static CRITICAL_SECTION font_cache_critical
Definition: mlang.c:536

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 952 of file mlang.c.

959 {
960  INT src_len = -1;
961 
962  TRACE("%p %d %s %p %p %p\n", pdwMode, dwEncoding,
963  debugstr_a(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
964 
965  if (!pcDstSize)
966  return E_FAIL;
967 
968  if (!pcSrcSize)
969  pcSrcSize = &src_len;
970 
971  if (!*pcSrcSize)
972  {
973  *pcDstSize = 0;
974  return S_OK;
975  }
976 
977  /* forwarding euc-jp to EUC-JP */
978  if (dwEncoding == 51932)
979  dwEncoding = 20932;
980 
981  switch (dwEncoding)
982  {
983  case CP_UNICODE:
984  if (*pcSrcSize == -1)
985  *pcSrcSize = lstrlenW((LPCWSTR)pSrcStr);
986  *pcDstSize = min(*pcSrcSize, *pcDstSize);
987  *pcSrcSize *= sizeof(WCHAR);
988  if (pDstStr)
989  memmove(pDstStr, pSrcStr, *pcDstSize * sizeof(WCHAR));
990  break;
991 
992  case 50220:
993  case 50221:
994  case 50222:
995  *pcDstSize = ConvertJISJapaneseToUnicode(pSrcStr,*pcSrcSize,pDstStr,*pcDstSize);
996  break;
997  case 50932:
998  *pcDstSize = ConvertUnknownJapaneseToUnicode(pSrcStr,*pcSrcSize,pDstStr,*pcDstSize);
999  break;
1000 
1001  default:
1002  if (*pcSrcSize == -1)
1003  *pcSrcSize = lstrlenA(pSrcStr);
1004 
1005  if (pDstStr)
1006  *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, pDstStr, *pcDstSize);
1007  else
1008  *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, NULL, 0);
1009  break;
1010  }
1011 
1012  if (!*pcDstSize)
1013  return E_FAIL;
1014 
1015  return S_OK;
1016 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define lstrlenW
Definition: compat.h:415
#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:853
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:833
#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 1103 of file mlang.c.

1112 {
1113  TRACE("%p %d %d %s %p %p %p\n", pdwMode, dwSrcEncoding, dwDstEncoding,
1114  debugstr_a(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
1115 
1116  if (dwSrcEncoding == CP_UNICODE)
1117  {
1118  INT cSrcSizeW;
1119  if (pcSrcSize && *pcSrcSize != -1)
1120  {
1121  cSrcSizeW = *pcSrcSize / sizeof(WCHAR);
1122  pcSrcSize = &cSrcSizeW;
1123  }
1124  return ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, (LPCWSTR)pSrcStr, pcSrcSize, pDstStr, pcDstSize);
1125  }
1126  else if (dwDstEncoding == CP_UNICODE)
1127  {
1128  HRESULT hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, (LPWSTR)pDstStr, pcDstSize);
1129  *pcDstSize *= sizeof(WCHAR);
1130  return hr;
1131  }
1132  else
1133  {
1134  INT cDstSizeW;
1135  LPWSTR pDstStrW;
1136  HRESULT hr;
1137 
1138  TRACE("convert %s from %d to %d\n", debugstr_a(pSrcStr), dwSrcEncoding, dwDstEncoding);
1139 
1140  hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, NULL, &cDstSizeW);
1141  if (hr != S_OK)
1142  return hr;
1143 
1144  pDstStrW = HeapAlloc(GetProcessHeap(), 0, cDstSizeW * sizeof(WCHAR));
1145  hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW);
1146  if (hr == S_OK)
1147  hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
1148 
1149  HeapFree(GetProcessHeap(), 0, pDstStrW);
1150  return hr;
1151  }
1152 }
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:403
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:952
HRESULT WINAPI ConvertINetUnicodeToMultiByte(LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1018
#define S_OK
Definition: intsafe.h:59
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:402

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 1018 of file mlang.c.

1025 {
1026  INT destsz, size;
1027  INT src_len = -1;
1028 
1029  TRACE("%p %d %s %p %p %p\n", pdwMode, dwEncoding,
1030  debugstr_w(pSrcStr), pcSrcSize, pDstStr, pcDstSize);
1031 
1032  if (!pcDstSize)
1033  return S_OK;
1034 
1035  if (!pcSrcSize)
1036  pcSrcSize = &src_len;
1037 
1038  destsz = (pDstStr) ? *pcDstSize : 0;
1039  *pcDstSize = 0;
1040 
1041  if (!pSrcStr || !*pcSrcSize)
1042  return S_OK;
1043 
1044  if (*pcSrcSize == -1)
1045  *pcSrcSize = lstrlenW(pSrcStr);
1046 
1047  /* forwarding euc-jp to EUC-JP */
1048  if (dwEncoding == 51932)
1049  dwEncoding = 20932;
1050 
1051  if (dwEncoding == CP_UNICODE)
1052  {
1053  if (*pcSrcSize == -1)
1054  *pcSrcSize = lstrlenW(pSrcStr);
1055 
1056  size = min(*pcSrcSize, destsz) * sizeof(WCHAR);
1057  if (pDstStr)
1058  memmove(pDstStr, pSrcStr, size);
1059 
1060  if (size >= destsz)
1061  goto fail;
1062  }
1063  else if (dwEncoding == 50220 || dwEncoding == 50221 || dwEncoding == 50222)
1064  {
1065  size = ConvertJapaneseUnicodeToJIS(pSrcStr, *pcSrcSize, NULL, 0);
1066  if (!size)
1067  goto fail;
1068 
1069  if (pDstStr)
1070  {
1071  size = ConvertJapaneseUnicodeToJIS(pSrcStr, *pcSrcSize, pDstStr,
1072  destsz);
1073  if (!size)
1074  goto fail;
1075  }
1076 
1077  }
1078  else
1079  {
1080  size = WideCharToMultiByte(dwEncoding, 0, pSrcStr, *pcSrcSize,
1081  NULL, 0, NULL, NULL);
1082  if (!size)
1083  goto fail;
1084 
1085  if (pDstStr)
1086  {
1087  size = WideCharToMultiByte(dwEncoding, 0, pSrcStr, *pcSrcSize,
1088  pDstStr, destsz, NULL, NULL);
1089  if (!size)
1090  goto fail;
1091  }
1092  }
1093 
1094  *pcDstSize = size;
1095  return S_OK;
1096 
1097 fail:
1098  *pcSrcSize = 0;
1099  *pcDstSize = 0;
1100  return E_FAIL;
1101 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static UINT ConvertJapaneseUnicodeToJIS(LPCWSTR input, DWORD count, LPSTR output, DWORD out_count)
Definition: mlang.c:901
#define WideCharToMultiByte
Definition: compat.h:101
#define lstrlenW
Definition: compat.h:415
#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 901 of file mlang.c.

903 {
904  CHAR *sjis_string;
905  INT len;
906  UINT rc = 0;
907 
909  sjis_string = HeapAlloc(GetProcessHeap(),0,len);
910  WideCharToMultiByte(932,0,input,count,sjis_string,len,NULL,NULL);
911  TRACE("%s\n",debugstr_an(sjis_string,len));
912 
913  rc = ConvertSJIS2JIS(sjis_string, len, NULL);
914  if (out_count >= rc)
915  {
916  ConvertSJIS2JIS(sjis_string, len, output);
917  }
918  HeapFree(GetProcessHeap(),0,sjis_string);
919  return rc;
920 
921 }
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:742
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:403
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:402
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 674 of file mlang.c.

675 {
676  DWORD i = 0;
677  int j = 0;
678  unsigned char p2,p;
679  BOOL shifted = FALSE;
680 
681  while (i < count)
682  {
683  p = input[i];
684  if (p == 0x1b /* ESC */)
685  {
686  i++;
687  if (i >= count)
688  return 0;
689  p2 = input[i];
690  if (p2 == '$' || p2 =='(')
691  i++;
692  if (p2 == 'K' || p2 =='$')
693  shifted = TRUE;
694  else
695  shifted = FALSE;
696  }
697  else
698  {
699  if (shifted)
700  {
701  i++;
702  if (i >= count)
703  return 0;
704  p2 = input[i];
705  jis2sjis(&p,&p2);
706  output[j++]=p;
707  output[j++]=p2;
708  }
709  else
710  {
711  output[j++] = p;
712  }
713  }
714  i++;
715  }
716  return j;
717 }
#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:606
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 833 of file mlang.c.

835 {
836  CHAR *sjis_string;
837  UINT rc = 0;
838  sjis_string = HeapAlloc(GetProcessHeap(),0,count);
839  rc = ConvertJIS2SJIS(input,count,sjis_string);
840  if (rc)
841  {
842  TRACE("%s\n",debugstr_an(sjis_string,rc));
843  if (output)
844  rc = MultiByteToWideChar(932,0,sjis_string,rc,output,out_count);
845  else
846  rc = MultiByteToWideChar(932,0,sjis_string,rc,0,0);
847  }
848  HeapFree(GetProcessHeap(),0,sjis_string);
849  return rc;
850 
851 }
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:674
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
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:402
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 742 of file mlang.c.

743 {
744  DWORD i = 0;
745  int j = 0;
746  unsigned char p2,p;
747  BOOL shifted = FALSE;
748 
749  while (i < count)
750  {
751  p = input[i] & 0xff;
752  if (p == 10 || p == 13) /* NL and CR */
753  {
754  if (shifted)
755  {
756  shifted = FALSE;
757  j += exit_shift(output,j);
758  }
759  if (output)
760  output[j++] = p;
761  else
762  j++;
763  }
764  else
765  {
766  if (SJIS1(p))
767  {
768  i++;
769  if (i >= count)
770  return 0;
771  p2 = input[i] & 0xff;
772  if (SJIS2(p2))
773  {
774  sjis2jis(&p,&p2);
775  if (!shifted)
776  {
777  shifted = TRUE;
778  j+=enter_shift(output,j);
779  }
780  }
781 
782  if (output)
783  {
784  output[j++]=p;
785  output[j++]=p2;
786  }
787  else
788  j+=2;
789  }
790  else
791  {
792  if (HANKATA(p))
793  {
794  if ((i+1) >= count)
795  return 0;
796  p2 = input[i+1] & 0xff;
797  i+=han2zen(&p,&p2);
798  sjis2jis(&p,&p2);
799  if (!shifted)
800  {
801  shifted = TRUE;
802  j+=enter_shift(output,j);
803  }
804  if (output)
805  {
806  output[j++]=p;
807  output[j++]=p2;
808  }
809  else
810  j+=2;
811  }
812  else
813  {
814  if (shifted)
815  {
816  shifted = FALSE;
817  j += exit_shift(output,j);
818  }
819  if (output)
820  output[j++]=p;
821  else
822  j++;
823  }
824  }
825  }
826  i++;
827  }
828  if (shifted)
829  j += exit_shift(output,j);
830  return j;
831 }
static int enter_shift(LPSTR out, int c)
Definition: mlang.c:730
#define TRUE
Definition: types.h:120
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define SJIS1(A)
Definition: mlang.c:556
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define SJIS2(A)
Definition: mlang.c:557
static void sjis2jis(unsigned char *p1, unsigned char *p2)
Definition: mlang.c:617
#define HANKATA(A)
Definition: mlang.c:553
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:719
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:629
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 853 of file mlang.c.

855 {
856  CHAR *sjis_string;
857  UINT rc = 0;
859  TRACE("Japanese code %i\n",code);
860 
861  switch (code)
862  {
863  case 0:
864  if (output)
866  else
868  break;
869 
870  case 932:
871  if (output)
873  else
874  rc = MultiByteToWideChar(932,0,input,count,0,0);
875  break;
876 
877  case 51932:
878  if (output)
880  else
881  rc = MultiByteToWideChar(20932,0,input,count,0,0);
882  break;
883 
884  case 50220:
885  sjis_string = HeapAlloc(GetProcessHeap(),0,count);
886  rc = ConvertJIS2SJIS(input,count,sjis_string);
887  if (rc)
888  {
889  TRACE("%s\n",debugstr_an(sjis_string,rc));
890  if (output)
891  rc = MultiByteToWideChar(932,0,sjis_string,rc,output,out_count);
892  else
893  rc = MultiByteToWideChar(932,0,sjis_string,rc,0,0);
894  }
895  HeapFree(GetProcessHeap(),0,sjis_string);
896  break;
897  }
898  return rc;
899 }
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:674
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
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:561
#define MultiByteToWideChar
Definition: compat.h:100
#define HeapFree(x, y, z)
Definition: compat.h:402
static UINT UINT * out_count
Definition: clipboard.c:35

Referenced by ConvertINetMultiByteToUnicode().

◆ DetectJapaneseCode()

static UINT DetectJapaneseCode ( LPCSTR  input,
DWORD  count 
)
static

Definition at line 561 of file mlang.c.

562 {
563  UINT code = 0;
564  DWORD i = 0;
565  unsigned char c1,c2;
566 
567  while ((code == 0 || code == 51932) && i < count)
568  {
569  c1 = input[i];
570  if (c1 == 0x1b /* ESC */)
571  {
572  i++;
573  if (i >= count)
574  return code;
575  c1 = input[i];
576  if (c1 == '$')
577  {
578  i++;
579  if (i >= count)
580  return code;
581  c1 = input[i];
582  if (c1 =='B' || c1 == '@')
583  code = 50220;
584  }
585  if (c1 == 'K')
586  code = 50220;
587  }
588  else if (c1 >= 129)
589  {
590  i++;
591  if (i >= count)
592  return code;
593  c2 = input[i];
594  if NOTEUC(c1,c2)
595  code = 932;
596  else if (ISEUC(c1) && ISEUC(c2))
597  code = 51932;
598  else if (((c1 == 142)) && HANKATA(c2))
599  code = 51932;
600  }
601  i++;
602  }
603  return code;
604 }
#define ISEUC(A)
Definition: mlang.c:554
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define HANKATA(A)
Definition: mlang.c:553
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:555

Referenced by ConvertUnknownJapaneseToUnicode().

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 3924 of file mlang.c.

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

◆ DllGetClassObject()

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

Definition at line 1550 of file mlang.c.

1551 {
1552  unsigned int i;
1554 
1555  TRACE("%s %s %p\n",debugstr_guid(rclsid), debugstr_guid(iid), ppv);
1556 
1557  if ( !IsEqualGUID( &IID_IClassFactory, iid )
1558  && ! IsEqualGUID( &IID_IUnknown, iid) )
1559  return E_NOINTERFACE;
1560 
1561  for (i = 0; i < ARRAY_SIZE(object_creation); i++)
1562  {
1563  if (IsEqualGUID(object_creation[i].clsid, rclsid))
1564  break;
1565  }
1566 
1567  if (i == ARRAY_SIZE(object_creation))
1568  {
1569  FIXME("%s: no class found.\n", debugstr_guid(rclsid));
1571  }
1572 
1573  TRACE("Creating a class factory for %s\n",object_creation[i].szClassName);
1574 
1575  factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory));
1576  if (factory == NULL) return E_OUTOFMEMORY;
1577 
1579  factory->ref = 1;
1580 
1581  factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
1582 
1584 
1585  TRACE("(%p) <- %p\n", ppv, &factory->IClassFactory_iface);
1586 
1587  return S_OK;
1588 }
static const struct object_creation_info object_creation[]
Definition: mlang.c:1466
#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:438
#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:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const GUID IID_IUnknown
static const IClassFactoryVtbl MLANGCF_Vtbl
Definition: mlang.c:1538
REFCLSID clsid
Definition: msctf.c:82
#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:4112
static ClassFactoryImpl factory
Definition: ole_server.c:234
const GUID IID_IClassFactory
IClassFactory IClassFactory_iface
Definition: main.c:440

◆ DllMain()

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

Definition at line 936 of file mlang.c.

937 {
938  switch(fdwReason) {
939  case DLL_PROCESS_ATTACH:
940  instance = hInstDLL;
942  DisableThreadLibraryCalls(hInstDLL);
943  break;
944  case DLL_PROCESS_DETACH:
945  if (lpv) break;
947  break;
948  }
949  return TRUE;
950 }
#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:52
static HINSTANCE instance
Definition: mlang.c:51
#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 3984 of file mlang.c.

3985 {
3986  if(!register_codepages())
3987  return E_FAIL;
3989 }
static BOOL register_codepages(void)
Definition: mlang.c:3929
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:51

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 3994 of file mlang.c.

3995 {
3997 }
static HINSTANCE instance
Definition: mlang.c:51
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 730 of file mlang.c.

731 {
732  if (out)
733  {
734  out[c] = 0x1b;
735  out[c+1] = '$';
736  out[c+2] = 'B';
737  }
738  return 3;
739 }
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 2410 of file mlang.c.

2411 {
2412  WCHAR *end;
2414  RFC1766INFO *info;
2415 
2416  TRACE("%s\n", debugstr_w(locale));
2417 
2418  if (data->total >= data->allocated)
2419  {
2420  data->allocated += 32;
2421  data->info = HeapReAlloc(GetProcessHeap(), 0, data->info, data->allocated * sizeof(RFC1766INFO));
2422  if (!data->info) return FALSE;
2423  }
2424 
2425  info = &data->info[data->total];
2426 
2427  info->lcid = wcstol(locale, &end, 16);
2428  if (*end) /* invalid number */
2429  return FALSE;
2430 
2431  info->wszRfc1766[0] = 0;
2432  lcid_to_rfc1766W( info->lcid, info->wszRfc1766, MAX_RFC1766_NAME );
2433 
2434  info->wszLocaleName[0] = 0;
2435  GetLocaleInfoW(info->lcid, LOCALE_SLANGUAGE, info->wszLocaleName, MAX_LOCALE_NAME);
2436  TRACE("ISO639: %s SLANGUAGE: %s\n", wine_dbgstr_w(info->wszRfc1766), wine_dbgstr_w(info->wszLocaleName));
2437 
2438  data->total++;
2439 
2440  return TRUE;
2441 }
#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
static DWORD MLANG_tls_index
Definition: mlang.c:52
GLuint GLuint end
Definition: gl.h:1545
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
static HRESULT lcid_to_rfc1766W(LCID lcid, LPWSTR rfc1766, INT len)
Definition: mlang.c:1226
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:403
__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:401
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 1751 of file mlang.c.

1753 {
1754  EnumCodePage_impl *ecp;
1755  MIMECPINFO *cpinfo;
1756  UINT i, n;
1757 
1758  TRACE("%p, %08x, %04x, %p\n", mlang, grfFlags, LangId, ppEnumCodePage);
1759 
1760  if (!grfFlags) /* enumerate internal data base of encodings */
1761  grfFlags = MIMECONTF_MIME_LATEST;
1762 
1763  ecp = HeapAlloc( GetProcessHeap(), 0, sizeof (EnumCodePage_impl) );
1764  ecp->IEnumCodePage_iface.lpVtbl = &IEnumCodePage_vtbl;
1765  ecp->ref = 1;
1766  ecp->pos = 0;
1767  ecp->total = 0;
1768  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
1769  {
1770  for (n = 0; n < mlang_data[i].number_of_cp; n++)
1771  {
1772  if (mlang_data[i].mime_cp_info[n].flags & grfFlags)
1773  ecp->total++;
1774  }
1775  }
1776 
1777  ecp->cpinfo = HeapAlloc(GetProcessHeap(), 0,
1778  sizeof(MIMECPINFO) * ecp->total);
1779  cpinfo = ecp->cpinfo;
1780 
1781  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
1782  {
1783  for (n = 0; n < mlang_data[i].number_of_cp; n++)
1784  {
1785  if (mlang_data[i].mime_cp_info[n].flags & grfFlags)
1786  fill_cp_info(&mlang_data[i], n, cpinfo++);
1787  }
1788  }
1789 
1790  TRACE("enumerated %d codepages with flags %08x\n", ecp->total, grfFlags);
1791 
1792  *ppEnumCodePage = &ecp->IEnumCodePage_iface;
1793 
1794  return S_OK;
1795 }
static void fill_cp_info(const struct mlang_data *ml_data, UINT index, MIMECPINFO *mime_cp_info)
Definition: mlang.c:2656
GLdouble n
Definition: glext.h:7729
UINT number_of_cp
Definition: mlang.c:488
MIMECPINFO * cpinfo
Definition: mlang.c:1610
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:1608
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
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:1740
#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 2443 of file mlang.c.

2444 {
2445  EnumRfc1766_impl *rfc;
2446  struct enum_locales_data data;
2447 
2448  TRACE("%04x, %p\n", LangId, ppEnum);
2449 
2450  rfc = HeapAlloc( GetProcessHeap(), 0, sizeof(EnumRfc1766_impl) );
2451  rfc->IEnumRfc1766_iface.lpVtbl = &IEnumRfc1766_vtbl;
2452  rfc->ref = 1;
2453  rfc->pos = 0;
2454  rfc->total = 0;
2455 
2456  data.total = 0;
2457  data.allocated = 160;
2458  data.info = HeapAlloc(GetProcessHeap(), 0, data.allocated * sizeof(RFC1766INFO));
2459  if (!data.info)
2460  {
2461  HeapFree(GetProcessHeap(), 0, rfc);
2462  return E_OUTOFMEMORY;
2463  }
2464 
2466  EnumSystemLocalesW(enum_locales_proc, 0/*LOCALE_SUPPORTED*/);
2468 
2469  TRACE("enumerated %d rfc1766 structures\n", data.total);
2470 
2471  if (!data.total)
2472  {
2473  HeapFree(GetProcessHeap(), 0, data.info);
2474  HeapFree(GetProcessHeap(), 0, rfc);
2475  return E_FAIL;
2476  }
2477 
2478  rfc->info = data.info;
2479  rfc->total = data.total;
2480 
2481  *ppEnum = &rfc->IEnumRfc1766_iface;
2482  return S_OK;
2483 }
RFC1766INFO * info
Definition: mlang.c:2269
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1264
static BOOL CALLBACK enum_locales_proc(LPWSTR locale)
Definition: mlang.c:2410
static DWORD MLANG_tls_index
Definition: mlang.c:52
#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:2267
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
Definition: lang.c:1604
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IEnumRfc1766Vtbl IEnumRfc1766_vtbl
Definition: mlang.c:2393
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:402

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 1929 of file mlang.c.

1931 {
1933  UINT i;
1934 
1935  TRACE("%p, %08x, %04x, %p\n", mlang, dwFlags, LangId, ppEnumScript);
1936 
1937  if (!dwFlags) /* enumerate all available scripts */
1938  dwFlags = SCRIPTCONTF_SCRIPT_USER | SCRIPTCONTF_SCRIPT_HIDE | SCRIPTCONTF_SCRIPT_SYSTEM;
1939 
1940  es = HeapAlloc( GetProcessHeap(), 0, sizeof (EnumScript_impl) );
1941  es->IEnumScript_iface.lpVtbl = &IEnumScript_vtbl;
1942  es->ref = 1;
1943  es->pos = 0;
1944  /* do not enumerate unicode flavours */
1945  es->total = ARRAY_SIZE(mlang_data) - 1;
1946  es->script_info = HeapAlloc(GetProcessHeap(), 0, sizeof(SCRIPTINFO) * es->total);
1947 
1948  for (i = 0; i < es->total; i++)
1949  {
1950  es->script_info[i].ScriptId = i;
1951  es->script_info[i].uiCodePage = mlang_data[i].family_codepage;
1953  es->script_info[i].wszDescription, MAX_SCRIPT_NAME);
1954  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].fixed_font, -1,
1955  es->script_info[i].wszFixedWidthFont, MAX_MIMEFACE_NAME);
1956  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].proportional_font, -1,
1957  es->script_info[i].wszProportionalFont, MAX_MIMEFACE_NAME);
1958  }
1959 
1960  TRACE("enumerated %d scripts with flags %08x\n", es->total, dwFlags);
1961 
1962  *ppEnumScript = &es->IEnumScript_iface;
1963 
1964  return S_OK;
1965 }
#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:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IEnumScriptVtbl IEnumScript_vtbl
Definition: mlang.c:1918
UINT family_codepage
Definition: mlang.c:487
_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 719 of file mlang.c.

720 {
721  if (out)
722  {
723  out[c] = 0x1b;
724  out[c+1] = '(';
725  out[c+2] = 'B';
726  }
727  return 3;
728 }
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 2656 of file mlang.c.

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

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

◆ fnIEnumCodePage_AddRef()

static ULONG WINAPI fnIEnumCodePage_AddRef ( IEnumCodePage *  iface)
static

Definition at line 1641 of file mlang.c.

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

◆ fnIEnumCodePage_Clone()

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

Definition at line 1665 of file mlang.c.

1668 {
1670  FIXME("%p %p\n", This, ppEnum);
1671  return E_NOTIMPL;
1672 }
#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:1614

◆ fnIEnumCodePage_Next()

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

Definition at line 1674 of file mlang.c.

1679 {
1680  ULONG i;
1682 
1683  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
1684 
1685  if (!pceltFetched) return S_FALSE;
1686  *pceltFetched = 0;
1687 
1688  if (!rgelt) return S_FALSE;
1689 
1690  if (This->pos + celt > This->total)
1691  celt = This->total - This->pos;
1692 
1693  if (!celt) return S_FALSE;
1694 
1695  memcpy(rgelt, This->cpinfo + This->pos, celt * sizeof(MIMECPINFO));
1696  *pceltFetched = celt;
1697  This->pos += celt;
1698 
1699  for (i = 0; i < celt; i++)
1700  {
1701  TRACE("#%u: %08x %u %u %s %s %s %s %s %s %d\n",
1702  i, rgelt[i].dwFlags, rgelt[i].uiCodePage,
1703  rgelt[i].uiFamilyCodePage,
1704  wine_dbgstr_w(rgelt[i].wszDescription),
1705  wine_dbgstr_w(rgelt[i].wszWebCharset),
1706  wine_dbgstr_w(rgelt[i].wszHeaderCharset),
1707  wine_dbgstr_w(rgelt[i].wszBodyCharset),
1708  wine_dbgstr_w(rgelt[i].wszFixedWidthFont),
1709  wine_dbgstr_w(rgelt[i].wszProportionalFont),
1710  rgelt[i].bGDICharset);
1711  }
1712  return S_OK;
1713 }
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:1614
unsigned int ULONG
Definition: retypes.h:1

◆ fnIEnumCodePage_QueryInterface()

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

Definition at line 1619 of file mlang.c.

1623 {
1625 
1626  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
1627 
1629  || IsEqualGUID(riid, &IID_IEnumCodePage))
1630  {
1631  IEnumCodePage_AddRef(iface);
1632  TRACE("Returning IID_IEnumCodePage %p ref = %d\n", This, This->ref);
1633  *ppvObject = &This->IEnumCodePage_iface;
1634  return S_OK;
1635  }
1636 
1637  WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
1638  return E_NOINTERFACE;
1639 }
#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:1614
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ fnIEnumCodePage_Release()

static ULONG WINAPI fnIEnumCodePage_Release ( IEnumCodePage *  iface)
static

Definition at line 1648 of file mlang.c.

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

◆ fnIEnumCodePage_Reset()

static HRESULT WINAPI fnIEnumCodePage_Reset ( IEnumCodePage *  iface)
static

Definition at line 1715 of file mlang.c.

1717 {
1719 
1720  TRACE("%p\n", This);
1721 
1722  This->pos = 0;
1723  return S_OK;
1724 }
#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:1614

◆ fnIEnumCodePage_Skip()

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

Definition at line 1726 of file mlang.c.

1729 {
1731 
1732  TRACE("%p %u\n", This, celt);
1733 
1734  if (celt >= This->total) return S_FALSE;
1735 
1736  This->pos += celt;
1737  return S_OK;
1738 }
#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:1614

◆ fnIEnumRfc1766_AddRef()

static ULONG WINAPI fnIEnumRfc1766_AddRef ( IEnumRfc1766 *  iface)
static

Definition at line 2300 of file mlang.c.

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

◆ fnIEnumRfc1766_Clone()

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

Definition at line 2323 of file mlang.c.

2326 {
2328 
2329  FIXME("%p %p\n", This, ppEnum);
2330  return E_NOTIMPL;
2331 }
#define FIXME(fmt,...)
Definition: debug.h:110
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2273
#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 2333 of file mlang.c.

2338 {
2339  ULONG i;
2341 
2342  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
2343 
2344  if (!pceltFetched) return S_FALSE;
2345  *pceltFetched = 0;
2346 
2347  if (!rgelt) return S_FALSE;
2348 
2349  if (This->pos + celt > This->total)
2350  celt = This->total - This->pos;
2351 
2352  if (!celt) return S_FALSE;
2353 
2354  memcpy(rgelt, This->info + This->pos, celt * sizeof(RFC1766INFO));
2355  *pceltFetched = celt;
2356  This->pos += celt;
2357 
2358  for (i = 0; i < celt; i++)
2359  {
2360  TRACE("#%u: %08x %s %s\n",
2361  i, rgelt[i].lcid,
2362  wine_dbgstr_w(rgelt[i].wszRfc1766),
2363  wine_dbgstr_w(rgelt[i].wszLocaleName));
2364  }
2365  return S_OK;
2366 }
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:2273
#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 2278 of file mlang.c.

2282 {
2284 
2285  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
2286 
2288  || IsEqualGUID(riid, &IID_IEnumRfc1766))
2289  {
2290  IEnumRfc1766_AddRef(iface);
2291  TRACE("Returning IID_IEnumRfc1766 %p ref = %d\n", This, This->ref);
2292  *ppvObject = &This->IEnumRfc1766_iface;
2293  return S_OK;
2294  }
2295 
2296  WARN("(%p) -> (%s,%p), not found\n",This,debugstr_guid(riid),ppvObject);
2297  return E_NOINTERFACE;
2298 }
#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:2273
#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:4112

◆ fnIEnumRfc1766_Release()

static ULONG WINAPI fnIEnumRfc1766_Release ( IEnumRfc1766 *  iface)
static

Definition at line 2307 of file mlang.c.

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

◆ fnIEnumRfc1766_Reset()

static HRESULT WINAPI fnIEnumRfc1766_Reset ( IEnumRfc1766 *  iface)
static

Definition at line 2368 of file mlang.c.

2370 {
2372 
2373  TRACE("%p\n", This);
2374 
2375  This->pos = 0;
2376  return S_OK;
2377 }
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2273
#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 2379 of file mlang.c.

2382 {
2384 
2385  TRACE("%p %u\n", This, celt);
2386 
2387  if (celt >= This->total) return S_FALSE;
2388 
2389  This->pos += celt;
2390  return S_OK;
2391 }
static EnumRfc1766_impl * impl_from_IEnumRfc1766(IEnumRfc1766 *iface)
Definition: mlang.c:2273
#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 1834 of file mlang.c.

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

◆ fnIEnumScript_Clone()

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

Definition at line 1858 of file mlang.c.

1861 {
1863  FIXME("%p %p: stub!\n", This, ppEnum);
1864  return E_NOTIMPL;
1865 }
#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:1807

◆ fnIEnumScript_Next()

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

Definition at line 1867 of file mlang.c.

1872 {
1874 
1875  TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
1876 
1877  if (!pceltFetched || !rgelt) return E_FAIL;
1878 
1879  *pceltFetched = 0;
1880 
1881  if (This->pos + celt > This->total)
1882  celt = This->total - This->pos;
1883 
1884  if (!celt) return S_FALSE;
1885 
1886  memcpy(rgelt, This->script_info + This->pos, celt * sizeof(SCRIPTINFO));
1887  *pceltFetched = celt;
1888  This->pos += celt;
1889 
1890  return S_OK;
1891 }
#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:1807

◆ fnIEnumScript_QueryInterface()

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

Definition at line 1812 of file mlang.c.

1816 {
1818 
1819  TRACE("%p -> %s\n", This, debugstr_guid(riid) );
1820 
1822  || IsEqualGUID(riid, &IID_IEnumScript))
1823  {
1824  IEnumScript_AddRef(iface);
1825  TRACE("Returning IID_IEnumScript %p ref = %d\n", This, This->ref);
1826  *ppvObject = &This->IEnumScript_iface;
1827  return S_OK;
1828  }
1829 
1830  WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
1831  return E_NOINTERFACE;
1832 }
#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:4112
static EnumScript_impl * impl_from_IEnumScript(IEnumScript *iface)
Definition: mlang.c:1807

◆ fnIEnumScript_Release()

static ULONG WINAPI fnIEnumScript_Release ( IEnumScript *  iface)
static

Definition at line 1841 of file mlang.c.

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

◆ fnIEnumScript_Reset()

static HRESULT WINAPI fnIEnumScript_Reset ( IEnumScript *  iface)
static

Definition at line 1893 of file mlang.c.

1895 {
1897 
1898  TRACE("%p\n", This);
1899 
1900  This->pos = 0;
1901  return S_OK;
1902 }
#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:1807

◆ fnIEnumScript_Skip()

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

Definition at line 1904 of file mlang.c.

1907 {
1909 
1910  TRACE("%p %u\n", This, celt);
1911 
1912  if (celt >= This->total) return S_FALSE;
1913 
1914  This->pos += celt;
1915  return S_OK;
1916 }
#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:1807

◆ fnIMLangFontLink2_AddRef()

static ULONG WINAPI fnIMLangFontLink2_AddRef ( IMLangFontLink2 *  iface)
static

Definition at line 3318 of file mlang.c.

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

◆ fnIMLangFontLink2_CodePagesToCodePage()

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

Definition at line 3421 of file mlang.c.

3423 {
3425  DWORD mask = 0;
3426  CHARSETINFO cs;
3427  BOOL rc;
3428  UINT i;
3429 
3430  TRACE("(%p)->(0x%x %u %p)\n", This, codepages, def_codepage, codepage);
3431 
3432  *codepage = 0;
3433 
3434  rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)def_codepage, &cs, TCI_SRCCODEPAGE);
3435  if (rc && (codepages & cs.fs.fsCsb[0]))
3436  {
3437  TRACE("Found Default Codepage\n");
3438  *codepage = def_codepage;
3439  return S_OK;
3440  }
3441 
3442  for (i = 0; i < 32; i++)
3443  {
3444  mask = 1 << i;
3445  if (codepages & mask)
3446  {
3447  DWORD Csb[2];
3448  Csb[0] = mask;
3449  Csb[1] = 0x0;
3450  rc = TranslateCharsetInfo(Csb, &cs, TCI_SRCFONTSIG);
3451  if (!rc)
3452  continue;
3453 
3454  TRACE("Falling back to least significant found CodePage %u\n",
3455  cs.ciACP);
3456  *codepage = cs.ciACP;
3457  return S_OK;
3458  }
3459  }
3460 
3461  TRACE("no codepage found\n");
3462  return E_FAIL;
3463 }
#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:3304
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 3398 of file mlang.c.

3401 {
3403  CHARSETINFO cs;
3404  BOOL rc;
3405 
3406  TRACE("(%p)->(%u %p)\n", This, codepage, codepages);
3407 
3409  if (rc)
3410  {
3411  *codepages = cs.fs.fsCsb[0];
3412  TRACE("resulting codepages 0x%x\n", *codepages);
3413  return S_OK;
3414  }
3415 
3416  TRACE("codepage not found\n");
3417  *codepages = 0;
3418  return E_FAIL;
3419 }
#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:3304
#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 3587 of file mlang.c.

3589 {
3590  UINT i;
3591 
3592  TRACE("(%p)->%i %p\n", This, uiCodePage, pSid);
3593 
3594  if (uiCodePage == CP_UNICODE) return E_FAIL;
3595 
3596  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
3597  {
3598  if (uiCodePage == mlang_data[i].family_codepage)
3599  {
3600  if (pSid) *pSid = mlang_data[i].sid;
3601  return S_OK;
3602  }
3603  }
3604  return E_FAIL;
3605 }
#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:492
#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 3330 of file mlang.c.

3332 {
3334  unsigned int i;
3335 
3336  TRACE("(%p)->(%s %p)\n", This, debugstr_wn(&ch_src, 1), ret_codepages);
3337 
3338  *ret_codepages = 0;
3339 
3340  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
3341  {
3342  BOOL used_dc;
3343  CHAR buf;
3344 
3346  &ch_src, 1, &buf, 1, NULL, &used_dc);
3347 
3348  /* If default char is not used, current codepage include the given symbol */
3349  if (!used_dc)
3350  {
3351  DWORD codepages;
3352 
3353  IMLangFontLink2_CodePageToCodePages(iface,
3354  mlang_data[i].family_codepage, &codepages);
3355  *ret_codepages |= codepages;
3356  }
3357  }
3358  return S_OK;
3359 }
#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:3304

◆ fnIMLangFontLink2_GetFontCodePages()

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

Definition at line 3465 of file mlang.c.

3467 {
3469  FONTSIGNATURE fontsig;
3470  HFONT old_font;
3471 
3472  TRACE("(%p)->(%p %p %p)\n", This, hdc, hfont, codepages);
3473 
3474  old_font = SelectObject(hdc, hfont);
3475  GetTextCharsetInfo(hdc, &fontsig, 0);
3476  SelectObject(hdc, old_font);
3477 
3478  *codepages = fontsig.fsCsb[0];
3479  TRACE("ret 0x%x\n", fontsig.fsCsb[0]);
3480 
3481  return S_OK;
3482 }
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:1542
static MLang_impl * impl_from_IMLangFontLink2(IMLangFontLink2 *iface)
Definition: mlang.c:3304
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 3521 of file mlang.c.

3523 {
3524  DWORD size;
3525  GLYPHSET *gs;
3526 
3527  TRACE("(%p)->%p %p %p\n", This, hDC, puiRanges, pUranges);
3528 
3529  if (!puiRanges) return E_INVALIDARG;
3530  if (!(size = GetFontUnicodeRanges(hDC, NULL))) return E_FAIL;
3531  if (!(gs = HeapAlloc(GetProcessHeap(), 0, size))) return E_OUTOFMEMORY;
3532 
3533  GetFontUnicodeRanges(hDC, gs);
3534  *puiRanges = gs->cRanges;
3535  if (pUranges)
3536  {
3537  UINT i;
3538  for (i = 0; i < gs->cRanges; i++)
3539  {
3540  if (i >= *puiRanges) break;
3541  pUranges[i].wcFrom = gs->ranges[i].wcLow;
3542  pUranges[i].wcTo = gs->ranges[i].wcLow + gs->ranges[i].cGlyphs;
3543  }
3544  *puiRanges = i;
3545  }
3546  HeapFree(GetProcessHeap(), 0, gs);
3547  return S_OK;
3548 }
#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:403
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:402

◆ fnIMLangFontLink2_GetScriptFontInfo()

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

Definition at line 3550 of file mlang.c.

3553 {
3554  UINT i, j;
3555 
3556  TRACE("(%p)->%u %x %p %p\n", This, sid, dwFlags, puiFonts, pScriptFont);
3557 
3558  if (!dwFlags) dwFlags = SCRIPTCONTF_PROPORTIONAL_FONT;
3559 
3560  for (i = 0, j = 0; i < ARRAY_SIZE(mlang_data); i++)
3561  {
3562  if (sid == mlang_data[i].sid)
3563  {
3564  if (pScriptFont)
3565  {
3566  if (j >= *puiFonts) break;
3567 
3568  pScriptFont[j].scripts = 1 << mlang_data[i].sid;
3569  if (dwFlags == SCRIPTCONTF_FIXED_FONT)
3570  {
3571  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].fixed_font, -1,
3572  pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
3573  }
3574  else if (dwFlags == SCRIPTCONTF_PROPORTIONAL_FONT)
3575  {
3576  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].proportional_font, -1,
3577  pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
3578  }
3579  }
3580  j++;
3581  }
3582  }
3583  *puiFonts = j;
3584  return S_OK;
3585 }
#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:492
_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 3361 of file mlang.c.

3364 {
3366  LONG i;
3367  DWORD cps = 0;
3368 
3369  TRACE("(%p)->(%s:%d %x %p %p)\n", This, debugstr_wn(src, src_len), src_len, priority_cp,
3370  codepages, ret_len);
3371 
3372  if (codepages) *codepages = 0;
3373  if (ret_len) *ret_len = 0;
3374 
3375  if (!src || !src_len || src_len < 0)
3376  return E_INVALIDARG;
3377 
3378  for (i = 0; i < src_len; i++)
3379  {
3380  DWORD cp;
3381  HRESULT ret;
3382 
3383  ret = IMLangFontLink2_GetCharCodePages(iface, src[i], &cp);
3384  if (ret != S_OK) return E_FAIL;
3385 
3386  if (!cps) cps = cp;
3387  else cps &= cp;
3388 
3389  /* FIXME: not tested */
3390  if (priority_cp & cps) break;
3391  }
3392 
3393  if (codepages) *codepages = cps;
3394  if (ret_len) *ret_len = min( i + 1, src_len );
3395  return S_OK;
3396 }
#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:3304
#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 3499 of file mlang.c.

3501 {
3502  HFONT old_font;
3503 
3504  TRACE("(%p)->%p %08x %04x %p\n",This, hDC, dwCodePages, chSrc, pFont);
3505 
3506  if (!hDC) return E_FAIL;
3507 
3508  if (dwCodePages != 0)
3509  {
3510  old_font = GetCurrentObject(hDC, OBJ_FONT);
3511  return map_font(hDC, dwCodePages, old_font, pFont);
3512  }
3513  else
3514  {
3515  if (pFont == NULL) return E_INVALIDARG;
3516  FIXME("the situation where dwCodepages is set to zero is not implemented\n");
3517  return E_FAIL;
3518  }
3519 }
#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:1332
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 3309 of file mlang.c.

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

◆ fnIMLangFontLink2_Release()

static ULONG WINAPI fnIMLangFontLink2_Release ( IMLangFontLink2 *  iface)
static

Definition at line 3324 of file mlang.c.

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

◆ fnIMLangFontLink2_ReleaseFont()

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

Definition at line 3484 of file mlang.c.

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

◆ fnIMLangFontLink2_ResetFontMapping()

static HRESULT WINAPI fnIMLangFontLink2_ResetFontMapping ( IMLangFontLink2 *  This)
static

Definition at line 3492 of file mlang.c.

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

◆ fnIMLangFontLink_AddRef()

static ULONG WINAPI fnIMLangFontLink_AddRef ( IMLangFontLink *  iface)
static

Definition at line 1983 of file mlang.c.

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

◆ fnIMLangFontLink_CodePagesToCodePage()

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

Definition at line 2028 of file mlang.c.

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

◆ fnIMLangFontLink_CodePageToCodePages()

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

Definition at line 2019 of file mlang.c.

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

◆ fnIMLangFontLink_GetCharCodePages()

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

Definition at line 1997 of file mlang.c.

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

◆ fnIMLangFontLink_GetFontCodePages()

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

Definition at line 2039 of file mlang.c.

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

◆ 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 2006 of file mlang.c.

2013 {
2015  return IMLangFontLink2_GetStrCodePages(&This->IMLangFontLink2_iface, src, src_len, priority_cp,
2016  codepages, ret_len);
2017 }
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:1969

◆ fnIMLangFontLink_MapFont()

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

Definition at line 2049 of file mlang.c.

2055 {
2056  TRACE("(%p)->%p %08x %p %p\n",iface, hDC, dwCodePages, hSrcFont, phDestFont);
2057 
2058  return map_font(hDC, dwCodePages, hSrcFont, phDestFont);
2059 }
#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:1332

◆ fnIMLangFontLink_QueryInterface()

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

Definition at line 1974 of file mlang.c.

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

◆ fnIMLangFontLink_Release()

static ULONG WINAPI fnIMLangFontLink_Release ( IMLangFontLink *  iface)
static

Definition at line 1990 of file mlang.c.

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

◆ fnIMLangFontLink_ReleaseFont()

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

Definition at line 2061 of file mlang.c.

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

◆ fnIMLangFontLink_ResetFontMapping()

static HRESULT WINAPI fnIMLangFontLink_ResetFontMapping ( IMLangFontLink *  iface)
static

Definition at line 2070 of file mlang.c.

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

◆ fnIMLangLineBreakConsole_AddRef()

static ULONG WINAPI fnIMLangLineBreakConsole_AddRef ( IMLangLineBreakConsole *  iface)
static

Definition at line 3641 of file mlang.c.

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

◆ 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 3685 of file mlang.c.

3694 {
3695  LONG i, line = cchSrc, skip = 0;
3696 
3697  FIXME("(%p)->%i %i %s %i %i %p %p\n", iface, locale, uCodePage, debugstr_an(pszSrc,cchSrc), cchSrc, cMaxColumns, pcchLine, pcchSkip);
3698 
3699  if (uCodePage == CP_USASCII && cchSrc > cMaxColumns)
3700  {
3701  for (line = cMaxColumns, i = cMaxColumns - 1; i >= 0; i--)
3702  {
3703  if (pszSrc[i] == ' ')
3704  {
3705  while (i >= 0 && pszSrc[i] == ' ')
3706  {
3707  i--;
3708  line--;
3709  skip++;
3710  }
3711  break;
3712  }
3713  }
3714  }
3715  *pcchLine = line;
3716  *pcchSkip = skip;
3717  return S_OK;
3718 }
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 3655 of file mlang.c.

3664 {
3665  FIXME("(%p)->%p %i %i %i %i %p %p\n", iface, pSrcMLStr, lSrcPos, lSrcLen, cMinColumns, cMaxColumns, plLineLen, plSkipLen);
3666  return E_NOTIMPL;
3667 }
#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 3669 of file mlang.c.

3677 {
3678  FIXME("(%p)->%i %s %i %i %p %p\n", iface, locale, debugstr_wn(pszSrc,cchSrc), cchSrc, cMaxColumns, pcchLine, pcchSkip);
3679 
3680  *pcchLine = cchSrc;
3681  *pcchSkip = 0;
3682  return S_OK;
3683 }
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 3632 of file mlang.c.

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

◆ fnIMLangLineBreakConsole_Release()

static ULONG WINAPI fnIMLangLineBreakConsole_Release ( IMLangLineBreakConsole *  iface)
static

Definition at line 3648 of file mlang.c.

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

◆ fnIMultiLanguage3_AddRef()

static ULONG WINAPI fnIMultiLanguage3_AddRef ( IMultiLanguage3 *  iface)
static

Definition at line 2621 of file mlang.c.

2622 {
2624  return InterlockedIncrement(&This->ref);
2625 }
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2573
#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 2811 of file mlang.c.

2820 {
2821  return ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding,
2822  (LPCSTR)pSrcStr, (LPINT)pcSrcSize, (LPSTR)pDstStr, (LPINT)pcDstSize);
2823 }
HRESULT WINAPI ConvertINetString(LPDWORD pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1103
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 2838 of file mlang.c.

2846 {
2847  return ConvertINetUnicodeToMultiByte(pdwMode, dwEncoding,
2848  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
2849 }
HRESULT WINAPI ConvertINetUnicodeToMultiByte(LPDWORD pdwMode, DWORD dwEncoding, LPCWSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1018
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 3061 of file mlang.c.

3071 {
3072  FIXME("\n");
3073  return ConvertINetUnicodeToMultiByte(pdwMode, dwEncoding,
3074  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
3075 }
#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:1018
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 2976 of file mlang.c.

2985 {
2986  char *src, *dst = NULL;
2987  INT srclen, dstlen;
2988  STATSTG stat;
2989  HRESULT hr;
2990 
2991  TRACE("%p %0x8 %s %u %u %p %p\n",
2992  pdwMode, dwFlag, debugstr_w(lpFallBack), dwSrcEncoding, dwDstEncoding, pstmIn, pstmOut);
2993 
2994  FIXME("dwFlag and lpFallBack not handled\n");
2995 
2996  hr = IStream_Stat(pstmIn, &stat, STATFLAG_NONAME);
2997  if (FAILED(hr)) return hr;
2998 
2999  if (stat.cbSize.QuadPart > MAXLONG) return E_INVALIDARG;
3000  if (!(src = HeapAlloc(GetProcessHeap(), 0, stat.cbSize.QuadPart))) return E_OUTOFMEMORY;
3001 
3002  hr = IStream_Read(pstmIn, src, stat.cbSize.QuadPart, (ULONG *)&srclen);
3003  if (FAILED(hr)) goto exit;
3004 
3005  hr = ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding, src, &srclen, NULL, &dstlen);
3006  if (FAILED(hr)) goto exit;
3007 
3008  if (!(dst = HeapAlloc(GetProcessHeap(), 0, dstlen)))
3009  {
3010  hr = E_OUTOFMEMORY;
3011  goto exit;
3012  }
3013  hr = ConvertINetString(pdwMode, dwSrcEncoding, dwDstEncoding, src, &srclen, dst, &dstlen);
3014  if (FAILED(hr)) goto exit;
3015 
3016  hr = IStream_Write(pstmOut, dst, dstlen, NULL);
3017 
3018 exit:
3019  HeapFree(GetProcessHeap(), 0, src);
3020  HeapFree(GetProcessHeap(), 0, dst);
3021  return hr;
3022 }
HRESULT WINAPI ConvertINetString(LPDWORD pdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:1103
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:403
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:402

◆ fnIMultiLanguage3_ConvertStringReset()

static HRESULT WINAPI fnIMultiLanguage3_ConvertStringReset ( IMultiLanguage3 *  iface)
static

Definition at line 2851 of file mlang.c.

2853 {
2854  FIXME("\n");
2855  return E_NOTIMPL;
2856 }
#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 2825 of file mlang.c.

2833 {
2834  return ConvertINetMultiByteToUnicode(pdwMode, dwEncoding,
2835  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
2836 }
HRESULT WINAPI ConvertINetMultiByteToUnicode(LPDWORD pdwMode, DWORD dwEncoding, LPCSTR pSrcStr, LPINT pcSrcSize, LPWSTR pDstStr, LPINT pcDstSize)
Definition: mlang.c:952
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 3024 of file mlang.c.

3034 {
3035  if (dwFlag || lpFallBack)
3036  FIXME("Ignoring dwFlag (0x%x/%d) and lpFallBack (%p)\n",
3037  dwFlag, dwFlag, lpFallBack);
3038 
3039  return ConvertINetMultiByteToUnicode(pdwMode, dwEncoding,
3040  pSrcStr, (LPINT)pcSrcSize, pDstStr, (LPINT)pcDstSize);
3041 }
#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:952
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 2959 of file mlang.c.

2965 {
2966  HRESULT hr;
2967 
2968  TRACE("(%u %u 0x%08x %p)\n", src_cp, dst_cp, prop, convert_charset);
2969 
2971  if (FAILED(hr)) return hr;
2972 
2973  return IMLangConvertCharset_Initialize(*convert_charset, src_cp, dst_cp, prop);
2974 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT MLangConvertCharset_create(IUnknown *outer, void **obj)
Definition: mlang.c:3900
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 3077 of file mlang.c.

3084 {
3085  FIXME("\n");
3086  return E_NOTIMPL;
3087 }
#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 3089 of file mlang.c.

3097 {
3098  FIXME("\n");
3099  return E_NOTIMPL;
3100 }
#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 3215 of file mlang.c.

3225 {
3227 
3228  FIXME("(%p)->(%08x %s %p %u %p %p(%u) %s)\n", This, dwFlags, debugstr_w(lpWideCharStr),
3229  puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
3230  pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
3231  debugstr_w(lpSpecialChar));
3232 
3233  if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
3234  return E_INVALIDARG;
3235 
3236  puiDetectedCodePages[0] = CP_UTF8;
3237  *pnDetectedCodePages = 1;
3238  return S_OK;
3239 }
#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:2573
_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 3241 of file mlang.c.

3250 {
3252 
3253  FIXME("(%p)->(%08x %p %p %u %p %p(%u) %s)\n", This, dwFlags, pStrIn,
3254  puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
3255  pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
3256  debugstr_w(lpSpecialChar));
3257 
3258  if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
3259  return E_INVALIDARG;
3260 
3261  puiDetectedCodePages[0] = CP_UTF8;
3262  *pnDetectedCodePages = 1;
3263  return S_OK;
3264 }
#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:2573
_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 2729 of file mlang.c.

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

◆ fnIMultiLanguage3_EnumRfc1766()

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

Definition at line 2900 of file mlang.c.

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

◆ fnIMultiLanguage3_EnumScripts()

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

Definition at line 3170 of file mlang.c.

3175 {
3177 
3178  TRACE("%p %08x %04x %p\n", This, dwFlags, LangId, ppEnumScript);
3179 
3180  return EnumScript_create( This, dwFlags, LangId, ppEnumScript );
3181 }
#define TRACE(s)
Definition: solgame.cpp:4
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2573
_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:1929

◆ fnIMultiLanguage3_GetCharsetInfo()

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

Definition at line 2742 of file mlang.c.

2746 {
2747  UINT i, n;
2749 
2750  TRACE("%p %s %p\n", This, debugstr_w(Charset), pCharsetInfo);
2751 
2752  if (!pCharsetInfo) return E_FAIL;
2753 
2754  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
2755  {
2756  for (n = 0; n < mlang_data[i].number_of_cp; n++)
2757  {
2758  WCHAR csetW[MAX_MIMECSET_NAME];
2759 
2760  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].mime_cp_info[n].web_charset, -1, csetW, MAX_MIMECSET_NAME);
2761  if (!lstrcmpiW(Charset, csetW))
2762  {
2763  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2764  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2765  lstrcpyW(pCharsetInfo->wszCharset, csetW);
2766  return S_OK;
2767  }
2768  if (mlang_data[i].mime_cp_info[n].alias && !lstrcmpiW(Charset, mlang_data[i].mime_cp_info[n].alias))
2769  {
2770  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2771  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2772  lstrcpyW(pCharsetInfo->wszCharset, mlang_data[i].mime_cp_info[n].alias);
2773  return S_OK;
2774  }
2775  }
2776  }
2777 
2778  /* FIXME:
2779  * Since we do not support charsets like iso-2022-jp and do not have
2780  * them in our database as a primary (web_charset) encoding this loop
2781  * does an attempt to 'approximate' charset name by header_charset.
2782  */
2783  for (i = 0; i < ARRAY_SIZE(mlang_data); i++)
2784  {
2785  for (n = 0; n < mlang_data[i].number_of_cp; n++)
2786  {
2787  WCHAR csetW[MAX_MIMECSET_NAME];
2788 
2789  MultiByteToWideChar(CP_ACP, 0, mlang_data[i].mime_cp_info[n].header_charset, -1, csetW, MAX_MIMECSET_NAME);
2790  if (!lstrcmpiW(Charset, csetW))
2791  {
2792  pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
2793  pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
2794  lstrcpyW(pCharsetInfo->wszCharset, csetW);
2795  return S_OK;
2796  }
2797  }
2798  }
2799 
2800  return E_FAIL;
2801 }
#define CP_ACP
Definition: compat.h:99
GLdouble n
Definition: glext.h:7729
UINT number_of_cp
Definition: mlang.c:488
const MIME_CP_INFO * mime_cp_info
Definition: mlang.c:489
#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:487
static MLang_impl * impl_from_IMultiLanguage3(IMultiLanguage3 *iface)
Definition: mlang.c:2573
UINT cp
Definition: mlang.c:62
const WCHAR * alias
Definition: main.c:67
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:414
#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:67

◆ fnIMultiLanguage3_GetCodePageDescription()

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

Definition at line 3110 of file mlang.c.

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