Author: fireball
Date: Fri Jul 17 22:39:01 2009
New Revision: 42020
URL:
http://svn.reactos.org/svn/reactos?rev=42020&view=rev
Log:
- Start removing 16bit crap, and stub needed stuff for now.
Added:
branches/arwinss/reactos/dll/win32/user32/legacy.c (with props)
Modified:
branches/arwinss/reactos/dll/win32/user32/cursoricon.c
branches/arwinss/reactos/dll/win32/user32/edit.c
branches/arwinss/reactos/dll/win32/user32/listbox.c
branches/arwinss/reactos/dll/win32/user32/user32.rbuild
branches/arwinss/reactos/dll/win32/user32/wsprintf.c
Modified: branches/arwinss/reactos/dll/win32/user32/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] Fri Jul 17
22:39:01 2009
@@ -449,6 +449,7 @@
/**********************************************************************
* CURSORICON_FreeModuleIcons
*/
+#ifndef __REACTOS__
void CURSORICON_FreeModuleIcons( HMODULE16 hMod16 )
{
ICONCACHE **ptr = &IconAnchor;
@@ -472,7 +473,7 @@
LeaveCriticalSection( &IconCrst );
}
-
+#endif
/*
* The following macro functions account for the irregularities of
* accessing cursor and icon resources in files and resource entries.
@@ -1225,6 +1226,7 @@
*/
static HICON CURSORICON_Copy( HINSTANCE16 hInst16, HICON hIcon )
{
+#if 0
char *ptrOld, *ptrNew;
int size;
HICON16 hOld = HICON_16(hIcon);
@@ -1240,6 +1242,10 @@
GlobalUnlock16( hOld );
GlobalUnlock16( hNew );
return HICON_32(hNew);
+#else
+ ERR("CURSORICON_Copy unimplemented!\n");
+ return 0;
+#endif
}
/*************************************************************************
@@ -1404,8 +1410,12 @@
info.nWidthBytes = 0;
info.bPlanes = 1;
info.bBitsPerPixel = 1;
-
+#if 0
return HICON_32(CreateCursorIconIndirect16(0, &info, lpANDbits, lpXORbits));
+#else
+ ERR("CreateCursor unimplemented!\n");
+ return 0;
+#endif
}
@@ -1487,6 +1497,7 @@
/***********************************************************************
* CreateCursorIconIndirect (USER.408)
*/
+#ifndef __REACTOS__
HGLOBAL16 WINAPI CreateCursorIconIndirect16( HINSTANCE16 hInstance,
CURSORICONINFO *info,
LPCVOID lpANDbits,
@@ -1522,6 +1533,7 @@
TRACE_(icon)("%04x %04x\n", hInstance, hIcon );
return HICON_16(CURSORICON_Copy(hInstance, HICON_32(hIcon)));
}
+#endif
/***********************************************************************
@@ -1537,11 +1549,13 @@
/***********************************************************************
* CopyCursor (USER.369)
*/
+#ifndef __REACTOS__
HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor )
{
TRACE_(cursor)("%04x %04x\n", hInstance, hCursor );
return HICON_16(CURSORICON_Copy(hInstance, HCURSOR_32(hCursor)));
}
+#endif
/**********************************************************************
* DestroyIcon32 (USER.610)
@@ -1750,6 +1764,7 @@
/***********************************************************************
* DumpIcon (USER.459)
*/
+#ifndef __REACTOS__
DWORD WINAPI DumpIcon16( SEGPTR pInfo, WORD *lpLen,
SEGPTR *lpXorBits, SEGPTR *lpAndBits )
{
@@ -1764,6 +1779,7 @@
if (lpLen) *lpLen = sizeof(CURSORICONINFO) + sizeAnd + sizeXor;
return MAKELONG( sizeXor, sizeXor );
}
+#endif
/***********************************************************************
Modified: branches/arwinss/reactos/dll/win32/user32/edit.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] Fri Jul 17 22:39:01
2009
@@ -1237,7 +1237,6 @@
CHAR *textA = NULL;
UINT countA = 0;
UINT countW = get_text_length(es) + 1;
- STACK16FRAME* stack16 = NULL;
HANDLE16 oldDS = 0;
if(es->hloc32A)
@@ -1263,6 +1262,7 @@
}
textA = LocalLock(es->hloc32A);
}
+#ifndef __REACTOS__
else if(es->hloc16)
{
UINT countA_new = WideCharToMultiByte(CP_ACP, 0, es->text, countW, NULL, 0,
NULL, NULL);
@@ -1292,17 +1292,14 @@
}
textA = MapSL(LocalLock16(es->hloc16));
}
+#endif
if(textA)
{
WideCharToMultiByte(CP_ACP, 0, es->text, countW, textA, countA, NULL, NULL);
- if(stack16)
- LocalUnlock16(es->hloc16);
- else
LocalUnlock(es->hloc32A);
}
- if (stack16) stack16->ds = oldDS;
LocalUnlock(es->hloc32W);
es->text = NULL;
}
@@ -2771,7 +2768,7 @@
}
EDIT_UnlockBuffer(es, TRUE);
-
+#ifndef __REACTOS__
if(es->hloc16)
{
STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
@@ -2782,7 +2779,7 @@
stack16->ds = oldDS;
es->hloc16 = 0;
}
-
+#endif
if(es->is_unicode)
{
if(es->hloc32A)
@@ -4705,6 +4702,7 @@
if (es->hloc32A) {
LocalFree(es->hloc32A);
}
+#ifndef __REACTOS__
if (es->hloc16) {
STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
HANDLE16 oldDS = stack16->ds;
@@ -4714,7 +4712,7 @@
LocalFree16(es->hloc16);
stack16->ds = oldDS;
}
-
+#endif
pc = es->first_line_def;
while (pc)
{
Added: branches/arwinss/reactos/dll/win32/user32/legacy.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/legacy.c (added)
+++ branches/arwinss/reactos/dll/win32/user32/legacy.c [iso-8859-1] Fri Jul 17 22:39:01
2009
@@ -1,0 +1,88 @@
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winerror.h"
+#include "wine/winbase16.h"
+#include "wine/winuser16.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(userlegacy);
+
+LPVOID
+WINAPI
+GlobalLock16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+BOOL16
+WINAPI
+GlobalUnlock16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+HGLOBAL16
+WINAPI
+GlobalAlloc16(UINT16 u, DWORD d)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+HGLOBAL16
+WINAPI
+GlobalFree16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+DWORD
+WINAPI
+GlobalSize16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+SEGPTR
+WINAPI
+LocalLock16(HLOCAL16 h)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+BOOL16
+WINAPI
+LocalUnlock16(HLOCAL16 h)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+LPVOID
+WINAPI
+LockResource16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+BOOL16
+WINAPI
+FreeResource16(HGLOBAL16 h)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
Propchange: branches/arwinss/reactos/dll/win32/user32/legacy.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/arwinss/reactos/dll/win32/user32/listbox.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/listbox.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/listbox.c [iso-8859-1] Fri Jul 17 22:39:01
2009
@@ -169,7 +169,7 @@
/* check whether app is a Win 3.1 app */
static inline BOOL is_old_app( LB_DESCR *descr )
{
- return (GetExpWinVer16( GetWindowLongPtrW(descr->self, GWLP_HINSTANCE) ) &
0xFF00 ) == 0x0300;
+ return FALSE;
}
Modified: branches/arwinss/reactos/dll/win32/user32/user32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] Fri Jul 17
22:39:01 2009
@@ -37,6 +37,7 @@
<file>hook.c</file>
<file>icontitle.c</file>
<file>input.c</file>
+ <file>legacy.c</file>
<file>listbox.c</file>
<file>lstr.c</file>
<file>mdi.c</file>
Modified: branches/arwinss/reactos/dll/win32/user32/wsprintf.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/wsprintf.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/wsprintf.c [iso-8859-1] Fri Jul 17 22:39:01
2009
@@ -289,109 +289,6 @@
if (format->flags & WPRINTF_PREFIX_HEX) len += 2;
return len;
}
-
-
-/***********************************************************************
- * wvsnprintf16 (Not a Windows API)
- */
-static INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec, VA_LIST16 args )
-{
- WPRINTF_FORMAT format;
- LPSTR p = buffer;
- UINT i, len, sign;
- CHAR number[20];
- WPRINTF_DATA cur_arg;
- SEGPTR seg_str;
-
- while (*spec && (maxlen > 1))
- {
- if (*spec != '%') { *p++ = *spec++; maxlen--; continue; }
- spec++;
- if (*spec == '%') { *p++ = *spec++; maxlen--; continue; }
- spec += WPRINTF_ParseFormatA( spec, &format );
- switch(format.type)
- {
- case WPR_WCHAR: /* No Unicode in Win16 */
- case WPR_CHAR:
- cur_arg.char_view = VA_ARG16( args, CHAR );
- break;
- case WPR_WSTRING: /* No Unicode in Win16 */
- case WPR_STRING:
- seg_str = VA_ARG16( args, SEGPTR );
- if (IsBadReadPtr16(seg_str, 1 )) cur_arg.lpcstr_view = "";
- else cur_arg.lpcstr_view = MapSL( seg_str );
- break;
- case WPR_SIGNED:
- if (!(format.flags & WPRINTF_LONG))
- {
- cur_arg.int_view = VA_ARG16( args, INT16 );
- break;
- }
- /* fall through */
- case WPR_HEXA:
- case WPR_UNSIGNED:
- if (format.flags & WPRINTF_LONG)
- cur_arg.int_view = VA_ARG16( args, UINT );
- else
- cur_arg.int_view = VA_ARG16( args, UINT16 );
- break;
- case WPR_UNKNOWN:
- continue;
- }
- len = WPRINTF_GetLen( &format, &cur_arg, number, maxlen - 1 );
- sign = 0;
- if (!(format.flags & WPRINTF_LEFTALIGN))
- for (i = format.precision; i < format.width; i++, maxlen--)
- *p++ = ' ';
- switch(format.type)
- {
- case WPR_WCHAR: /* No Unicode in Win16 */
- case WPR_CHAR:
- *p= cur_arg.char_view;
- /* wsprintf16 (unlike wsprintf) ignores null characters */
- if (*p != '\0') p++;
- else if (format.width > 1) *p++ = ' ';
- else len = 0;
- break;
- case WPR_WSTRING: /* No Unicode in Win16 */
- case WPR_STRING:
- if (len) memcpy( p, cur_arg.lpcstr_view, len );
- p += len;
- break;
- case WPR_HEXA:
- if ((format.flags & WPRINTF_PREFIX_HEX) && (maxlen > 3))
- {
- *p++ = '0';
- *p++ = (format.flags & WPRINTF_UPPER_HEX) ? 'X' :
'x';
- maxlen -= 2;
- len -= 2;
- }
- /* fall through */
- case WPR_SIGNED:
- /* Transfer the sign now, just in case it will be zero-padded*/
- if (number[0] == '-')
- {
- *p++ = '-';
- sign = 1;
- }
- /* fall through */
- case WPR_UNSIGNED:
- for (i = len; i < format.precision; i++, maxlen--) *p++ = '0';
- if (len > sign) memcpy( p, number + sign, len - sign );
- p += len-sign;
- break;
- case WPR_UNKNOWN:
- continue;
- }
- if (format.flags & WPRINTF_LEFTALIGN)
- for (i = format.precision; i < format.width; i++, maxlen--)
- *p++ = ' ';
- maxlen -= len;
- }
- *p = 0;
- return (maxlen > 1) ? (INT)(p - buffer) : -1;
-}
-
/***********************************************************************
* wvsnprintfA (internal)
@@ -599,19 +496,6 @@
/***********************************************************************
- * wvsprintf (USER.421)
- */
-INT16 WINAPI wvsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 args )
-{
- INT16 res;
-
- TRACE("for %p got:\n",buffer);
- res = wvsnprintf16( buffer, 1024, spec, args );
- return ( res == -1 ) ? 1024 : res;
-}
-
-
-/***********************************************************************
* wvsprintfA (USER32.@)
*/
INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, __ms_va_list args )
@@ -630,17 +514,6 @@
return ( res == -1 ) ? 1024 : res;
}
-
-/***********************************************************************
- * _wsprintf (USER.420)
- */
-INT16 WINAPIV wsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 valist )
-{
- INT16 res;
-
- res = wvsnprintf16( buffer, 1024, spec, valist );
- return ( res == -1 ) ? 1024 : res;
-}
/***********************************************************************