Author: akhaldi
Date: Sat Jul  9 17:18:33 2016
New Revision: 71873

URL: http://svn.reactos.org/svn/reactos?rev=71873&view=rev
Log:
[FONTSUB] Import from Wine Staging 1.9.13. CORE-11219

Added:
    trunk/reactos/dll/win32/fontsub/
    trunk/reactos/dll/win32/fontsub/CMakeLists.txt   (with props)
    trunk/reactos/dll/win32/fontsub/fontsub.spec   (with props)
    trunk/reactos/dll/win32/fontsub/main.c   (with props)
    trunk/reactos/sdk/include/psdk/fontsub.h   (with props)
Modified:
    trunk/reactos/dll/win32/CMakeLists.txt
    trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?rev=71873&r1=71872&r2=71873&view=diff
==============================================================================
--- trunk/reactos/dll/win32/CMakeLists.txt      [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/CMakeLists.txt      [iso-8859-1] Sat Jul  9 
17:18:33 2016
@@ -41,6 +41,7 @@
 add_subdirectory(faultrep)
 add_subdirectory(fltlib)
 add_subdirectory(fmifs)
+add_subdirectory(fontsub)
 add_subdirectory(framedyn)
 add_subdirectory(fusion)
 add_subdirectory(gdiplus)

Added: trunk/reactos/dll/win32/fontsub/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fontsub/CMakeLists.txt?rev=71873
==============================================================================
--- trunk/reactos/dll/win32/fontsub/CMakeLists.txt      (added)
+++ trunk/reactos/dll/win32/fontsub/CMakeLists.txt      [iso-8859-1] Sat Jul  9 
17:18:33 2016
@@ -0,0 +1,14 @@
+
+add_definitions(-D__WINESRC__)
+include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
+spec2def(fontsub.dll fontsub.spec)
+
+add_library(fontsub SHARED
+    main.c
+    ${CMAKE_CURRENT_BINARY_DIR}/fontsub_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/fontsub.def)
+
+set_module_type(fontsub win32dll)
+target_link_libraries(fontsub wine)
+add_importlibs(fontsub msvcrt kernel32 ntdll)
+add_cd_file(TARGET fontsub DESTINATION reactos/system32 FOR all)

Propchange: trunk/reactos/dll/win32/fontsub/CMakeLists.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: trunk/reactos/dll/win32/fontsub/fontsub.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fontsub/fontsub.spec?rev=71873
==============================================================================
--- trunk/reactos/dll/win32/fontsub/fontsub.spec        (added)
+++ trunk/reactos/dll/win32/fontsub/fontsub.spec        [iso-8859-1] Sat Jul  9 
17:18:33 2016
@@ -0,0 +1,2 @@
+@ cdecl CreateFontPackage(ptr long ptr ptr ptr long long long long long long 
ptr long ptr ptr ptr ptr)
+@ stub MergeFontPackage

Propchange: trunk/reactos/dll/win32/fontsub/fontsub.spec
------------------------------------------------------------------------------
    svn:eol-style = native

Added: trunk/reactos/dll/win32/fontsub/main.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fontsub/main.c?rev=71873
==============================================================================
--- trunk/reactos/dll/win32/fontsub/main.c      (added)
+++ trunk/reactos/dll/win32/fontsub/main.c      [iso-8859-1] Sat Jul  9 
17:18:33 2016
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2014 Nikolay Sivov for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "fontsub.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(fontsub);
+
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
+
+    switch (fdwReason) {
+        case DLL_WINE_PREATTACH:
+            return FALSE;  /* prefer native version */
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
+            break;
+    }
+
+    return TRUE;
+}
+
+ULONG __cdecl CreateFontPackage(const unsigned char *src, const ULONG src_len, 
unsigned char **dest,
+    ULONG *dest_len, ULONG *written, const unsigned short flags, const 
unsigned short face_index,
+    const unsigned short format, const unsigned short lang, const unsigned 
short platform, const unsigned short encoding,
+    const unsigned short *keep_list, const unsigned short keep_len, 
CFP_ALLOCPROC allocproc,
+    CFP_REALLOCPROC reallocproc, CFP_FREEPROC freeproc, void *reserved)
+{
+    FIXME("(%p %u %p %p %p %#x %u %u %u %u %u %p %u %p %p %p %p): stub\n", 
src, src_len, dest, dest_len,
+        written, flags, face_index, format, lang, platform, encoding, 
keep_list, keep_len, allocproc,
+        reallocproc, freeproc, reserved);
+
+    if (format != TTFCFP_SUBSET)
+        return ERR_GENERIC;
+
+    *dest = allocproc(src_len);
+    if (!*dest)
+        return ERR_MEM;
+
+    memcpy(*dest, src, src_len);
+    *dest_len = src_len;
+    *written = src_len;
+
+    return NO_ERROR;
+}

Propchange: trunk/reactos/dll/win32/fontsub/main.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71873&r1=71872&r2=71873&view=diff
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jul  9 17:18:33 2016
@@ -67,6 +67,7 @@
 reactos/dll/win32/dciman32            # Synced to WineStaging-1.9.11
 reactos/dll/win32/faultrep            # Synced to WineStaging-1.9.11
 reactos/dll/win32/fltlib              # Synced to WineStaging-1.9.11
+reactos/dll/win32/fontsub             # Synced to WineStaging-1.9.13
 reactos/dll/win32/fusion              # Synced to WineStaging-1.9.11
 reactos/dll/win32/gdiplus             # Synced to WineStaging-1.9.11
 reactos/dll/win32/hhctrl.ocx          # Synced to WineStaging-1.9.11

Added: trunk/reactos/sdk/include/psdk/fontsub.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/fontsub.h?rev=71873
==============================================================================
--- trunk/reactos/sdk/include/psdk/fontsub.h    (added)
+++ trunk/reactos/sdk/include/psdk/fontsub.h    [iso-8859-1] Sat Jul  9 
17:18:33 2016
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2016 Nikolay Sivov for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_FONTSUB_H
+#define __WINE_FONTSUB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(__cdecl *CFP_ALLOCPROC)(size_t);
+typedef void *(__cdecl *CFP_REALLOCPROC)(void *, size_t);
+typedef void (__cdecl *CFP_FREEPROC)(void *);
+
+#define TTFCFP_SUBSET  0
+#define TTFCFP_SUBSET1 1
+#define TTFCFP_DELTA   2
+
+#define TTFCFP_UNICODE_PLATFORMID 0
+#define TTFCFP_APPLE_PLATFORMID   1
+#define TTFCFP_ISO_PLATFORMID     2
+#define TTFCFP_MS_PLATFORMID      3
+
+#define TTFCFP_STD_MAC_CHAR_SET   0
+#define TTFCFP_SYMBOL_CHAR_SET    0
+#define TTFCFP_UNICODE_CHAR_SET   1
+#define TTFCFP_DONT_CARE          0xffff
+
+#define TTFCFP_LANG_KEEP_ALL      0
+
+#define TTFCFP_FLAGS_SUBSET       0x0001
+#define TTFCFP_FLAGS_COMPRESS     0x0002
+#define TTFCFP_FLAGS_TTC          0x0004
+#define TTFCFP_FLAGS_GLYPHLIST    0x0008
+
+#define ERR_GENERIC 1000
+#define ERR_MEM     1005
+
+ULONG __cdecl CreateFontPackage(const unsigned char *src, const ULONG src_len, 
unsigned char **dest,
+    ULONG *dest_len, ULONG *written, const unsigned short flags, const 
unsigned short face_index,
+    const unsigned short format, const unsigned short lang, const unsigned 
short platform,
+    const unsigned short encoding, const unsigned short *keep_list, const 
unsigned short keep_len,
+    CFP_ALLOCPROC allocproc, CFP_REALLOCPROC reallocproc, CFP_FREEPROC 
freeproc, void *reserved);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Propchange: trunk/reactos/sdk/include/psdk/fontsub.h
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to