/*1* Copyright 2025 Zhiyi Zhang for CodeWeavers2*3* This library is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* This library is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with this library; if not, write to the Free Software15* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA16*/1718#include <stdarg.h>1920#include "windef.h"21#include "winbase.h"22#include "winnls.h"23#include "winstring.h"2425#include "wine/debug.h"2627WINE_DEFAULT_DEBUG_CHANNEL(bcp47langs);2829HRESULT WINAPI GetFontFallbackLanguageList(const WCHAR *lang, size_t buffer_length, WCHAR *buffer,30size_t *required_buffer_length)31{32WCHAR locale[LOCALE_NAME_MAX_LENGTH];33size_t lang_length;3435FIXME("lang %s, buffer_length %Iu, buffer %p, required_buffer_length %p stub!\n",36wine_dbgstr_w(lang), buffer_length, buffer, required_buffer_length);3738if (!buffer_length || !buffer)39return E_INVALIDARG;4041if (!lang)42{43if (!GetUserDefaultLocaleName(locale, LOCALE_NAME_MAX_LENGTH))44return E_FAIL;4546lang = locale;47}4849/* Return the original language as the fallback language list */50lang_length = wcslen(lang) + 1;51*required_buffer_length = lang_length;52if (buffer_length < lang_length)53return E_NOT_SUFFICIENT_BUFFER;5455memcpy(buffer, lang, lang_length * sizeof(WCHAR));56return S_OK;57}5859HRESULT WINAPI GetUserLanguages(WCHAR delim, HSTRING *langs)60{61FIXME("%lc, %p\n", delim, langs);62return S_OK;63}646566