Changeset 13788


Ignore:
Timestamp:
Mar 24, 2000, 12:06:54 AM (25 years ago)
Author:
sandervl
Message:

replaced writelog calls

Location:
tags/trunk/src/user32
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/user32/Makefile

    r13611 r13788  
    1 # $Id: Makefile,v 1.68 2000-03-06 23:39:12 bird Exp $
     1# $Id: Makefile,v 1.69 2000-03-23 23:06:50 sandervl Exp $
    22
    33#
     
    7575$(OBJDIR)\win32wmdichild.obj \
    7676$(OBJDIR)\winprop.obj \
    77 $(OBJDIR)\wingdi.obj \
    7877$(OBJDIR)\oslibgdi.obj \
    7978$(OBJDIR)\winaccel.obj \
  • TabularUnified tags/trunk/src/user32/char.cpp

    r13384 r13788  
    1 /* $Id: char.cpp,v 1.12 2000-02-16 14:34:05 sandervl Exp $ */
     1/* $Id: char.cpp,v 1.13 2000-03-23 23:06:51 sandervl Exp $ */
    22
    33/*
     
    314314BOOL WIN32API IsCharAlphaA( CHAR arg1)
    315315{
    316 #ifdef DEBUG
    317     WriteLog("USER32:  OS2IsCharAlphaA\n");
    318 #endif
     316    dprintf(("USER32:  OS2IsCharAlphaA\n"));
    319317    return O32_IsCharAlpha(arg1);
    320318}
     
    323321BOOL WIN32API IsCharAlphaNumericA( CHAR arg1)
    324322{
    325 #ifdef DEBUG
    326     WriteLog("USER32:  OS2IsCharAlphaNumericA\n");
    327 #endif
     323    dprintf(("USER32:  OS2IsCharAlphaNumericA\n"));
    328324    return O32_IsCharAlphaNumeric(arg1);
    329325}
     
    332328BOOL WIN32API IsCharAlphaNumericW( WCHAR arg1)
    333329{
    334 #ifdef DEBUG
    335     WriteLog("USER32:  OS2IsCharAlphaNumericW\n");
    336 #endif
     330    dprintf(("USER32:  OS2IsCharAlphaNumericW\n"));
    337331    // NOTE: This will not work as is (needs UNICODE support)
    338332    return O32_IsCharAlphaNumeric((CHAR)arg1);
     
    342336BOOL WIN32API IsCharAlphaW( WCHAR arg1)
    343337{
    344 #ifdef DEBUG
    345     WriteLog("USER32:  OS2IsCharAlphaW\n");
    346 #endif
     338    dprintf(("USER32:  OS2IsCharAlphaW\n"));
    347339    // NOTE: This will not work as is (needs UNICODE support)
    348340    return O32_IsCharAlpha((CHAR)arg1);
     
    352344BOOL WIN32API IsCharLowerA( CHAR arg1)
    353345{
    354 #ifdef DEBUG
    355     WriteLog("USER32:  OS2IsCharLowerA\n");
    356 #endif
     346    dprintf(("USER32:  OS2IsCharLowerA\n"));
    357347    return O32_IsCharLower(arg1);
    358348}
     
    361351BOOL WIN32API IsCharLowerW( WCHAR arg1)
    362352{
    363 #ifdef DEBUG
    364     WriteLog("USER32:  OS2IsCharLowerW\n");
    365 #endif
     353    dprintf(("USER32:  OS2IsCharLowerW\n"));
    366354    // NOTE: This will not work as is (needs UNICODE support)
    367355    return O32_IsCharLower((CHAR)arg1);
     
    371359BOOL WIN32API IsCharUpperA( CHAR arg1)
    372360{
    373 #ifdef DEBUG
    374     WriteLog("USER32:  OS2IsCharUpperA\n");
    375 #endif
     361    dprintf(("USER32:  OS2IsCharUpperA\n"));
    376362    return O32_IsCharUpper(arg1);
    377363}
     
    380366BOOL WIN32API IsCharUpperW( WCHAR arg1)
    381367{
    382 #ifdef DEBUG
    383     WriteLog("USER32:  OS2IsCharUpperW\n");
    384 #endif
     368    dprintf(("USER32:  OS2IsCharUpperW\n"));
    385369    // NOTE: This will not work as is (needs UNICODE support)
    386370    return O32_IsCharUpper((CHAR)arg1);
     
    390374BOOL WIN32API OemToCharA( LPCSTR arg1, LPSTR  arg2)
    391375{
    392 #ifdef DEBUG
    393     WriteLog("USER32:  OS2OemToCharA\n");
    394 #endif
     376    dprintf(("USER32:  OS2OemToCharA\n"));
    395377    return O32_OemToChar(arg1, arg2);
    396378}
     
    399381BOOL WIN32API OemToCharBuffA( LPCSTR arg1, LPSTR arg2, DWORD  arg3)
    400382{
    401 #ifdef DEBUG
    402     WriteLog("USER32:  OS2OemToCharBuffA\n");
    403 #endif
     383    dprintf(("USER32:  OS2OemToCharBuffA\n"));
    404384    return O32_OemToCharBuff(arg1, arg2, arg3);
    405385}
     
    408388BOOL WIN32API OemToCharBuffW(LPCSTR arg1, LPWSTR arg2, DWORD  arg3)
    409389{
    410 #ifdef DEBUG
    411     WriteLog("USER32: OemToCharBuffW DOESN'T WORK \n");
    412 #endif
     390    dprintf(("USER32: OemToCharBuffW DOESN'T WORK \n"));
    413391    // NOTE: This will not work as is (needs UNICODE support)
    414392    return 0;
     
    419397BOOL WIN32API OemToCharW( LPCSTR arg1, LPWSTR  arg2)
    420398{
    421 #ifdef DEBUG
    422     WriteLog("USER32:  OS2OemToCharW DOESN'T WORK\n");
    423 #endif
     399    dprintf(("USER32:  OS2OemToCharW DOESN'T WORK\n"));
    424400    // NOTE: This will not work as is (needs UNICODE support)
    425401    return 0;
  • TabularUnified tags/trunk/src/user32/display.cpp

    r13384 r13788  
    1 /* $Id: display.cpp,v 1.5 2000-02-16 14:34:16 sandervl Exp $ */
     1/* $Id: display.cpp,v 1.6 2000-03-23 23:06:51 sandervl Exp $ */
    22/*
    33 * Display/Monitor Win32 apis
     
    347347        return(DISP_CHANGE_SUCCESSFUL);
    348348    }
    349 #ifdef DEBUG
    350349    if(lpDevMode) {
    351         WriteLog("USER32:  ChangeDisplaySettingsA FAKED %X\n", dwFlags);
    352         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
    353         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsWidth  %d\n", lpDevMode->dmPelsWidth);
    354         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
    355     }
    356 #endif
     350        dprintf(("USER32:  ChangeDisplaySettingsA FAKED %X\n", dwFlags));
     351        dprintf(("USER32:  ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel));
     352        dprintf(("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsWidth  %d\n", lpDevMode->dmPelsWidth));
     353        dprintf(("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight));
     354    }
    357355    return(DISP_CHANGE_SUCCESSFUL);
    358356}
     
    396394        return(DISP_CHANGE_SUCCESSFUL);
    397395    }
    398 #ifdef DEBUG
    399396    if(lpDevMode) {
    400         WriteLog("USER32:  ChangeDisplaySettingsExA FAKED %X\n", dwFlags);
    401         WriteLog("USER32:  ChangeDisplaySettingsExA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
    402         WriteLog("USER32:  ChangeDisplaySettingsExA lpDevMode->dmPelsWidth  %d\n", lpDevMode->dmPelsWidth);
    403         WriteLog("USER32:  ChangeDisplaySettingsExA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
    404     }
    405 #endif
     397        dprintf(("USER32:  ChangeDisplaySettingsExA FAKED %X\n", dwFlags));
     398        dprintf(("USER32:  ChangeDisplaySettingsExA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel));
     399        dprintf(("USER32:  ChangeDisplaySettingsExA lpDevMode->dmPelsWidth  %d\n", lpDevMode->dmPelsWidth));
     400        dprintf(("USER32:  ChangeDisplaySettingsExA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight));
     401    }
    406402    return(DISP_CHANGE_SUCCESSFUL);
    407403}
  • TabularUnified tags/trunk/src/user32/user32.cpp

    r13432 r13788  
    1 /* $Id: user32.cpp,v 1.74 2000-02-21 17:25:29 cbratschi Exp $ */
     1/* $Id: user32.cpp,v 1.75 2000-03-23 23:06:52 sandervl Exp $ */
    22
    33/*
     
    578578HWND WIN32API SetCapture( HWND hwnd)
    579579{
    580 #ifdef DEBUG
    581     WriteLog("USER32: SetCapture %x", hwnd);
    582 #endif
     580    dprintf(("USER32: SetCapture %x", hwnd));
    583581    hwnd = Win32Window::Win32ToOS2Handle(hwnd);
    584582    return Win32Window::OS2ToWin32Handle(O32_SetCapture(hwnd));
     
    588586BOOL WIN32API SetDoubleClickTime( UINT uInterval)
    589587{
    590 #ifdef DEBUG
    591     WriteLog("USER32:  SetDoubleClickTime\n");
    592 #endif
     588    dprintf(("USER32:  SetDoubleClickTime\n"));
    593589    return O32_SetDoubleClickTime(uInterval);
    594590}
     
    597593BOOL WIN32API SwapMouseButton( BOOL fSwap)
    598594{
    599 #ifdef DEBUG
    600     WriteLog("USER32:  SwapMouseButton\n");
    601 #endif
     595    dprintf(("USER32:  SwapMouseButton\n"));
    602596    return O32_SwapMouseButton(fSwap);
    603597}
     
    644638    INT flStyle;
    645639
    646 #ifdef DEBUG
    647     WriteLog("USER32:  MessageBeep\n");
    648 #endif
     640    dprintf(("USER32:  MessageBeep\n"));
    649641
    650642    switch (uType)
     
    675667VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
    676668{
    677 #ifdef DEBUG
    678   WriteLog("USER32:  SetLastErrorEx\n");
    679 #endif
     669  dprintf(("USER32:  SetLastErrorEx\n"));
    680670  SetLastError(dwErrCode);
    681671}
     
    10561046        break;
    10571047    }
    1058 #ifdef DEBUG
    1059     WriteLog("USER32:  SystemParametersInfoW %d, returned %d\n", uiAction, rc);
    1060 #endif
     1048    dprintf(("USER32:  SystemParametersInfoW %d, returned %d\n", uiAction, rc));
    10611049    return(rc);
    10621050}
     
    10711059BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
    10721060{
    1073 #ifdef DEBUG
    1074   WriteLog("USER32:  AttachThreadInput, not implemented\n");
    1075 #endif
     1061  dprintf(("USER32:  AttachThreadInput, not implemented\n"));
    10761062  return(TRUE);
    10771063}
     
    11921178BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
    11931179{
    1194 #ifdef DEBUG
    1195   WriteLog("USER32:  ActivateKeyboardLayout, not implemented\n");
    1196 #endif
     1180  dprintf(("USER32:  ActivateKeyboardLayout, not implemented\n"));
    11971181  return(TRUE);
    11981182}
     
    12311215int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int  nSize)
    12321216{
    1233 #ifdef DEBUG
    1234     WriteLog("USER32:  GetKeyNameTextA\n");
    1235 #endif
     1217    dprintf(("USER32:  GetKeyNameTextA\n"));
    12361218    return O32_GetKeyNameText(lParam,lpString,nSize);
    12371219}
     
    12401222int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int  nSize)
    12411223{
    1242 #ifdef DEBUG
    1243     WriteLog("USER32:  GetKeyNameTextW DOES NOT WORK\n");
    1244 #endif
     1224    dprintf(("USER32:  GetKeyNameTextW DOES NOT WORK\n"));
    12451225    // NOTE: This will not work as is (needs UNICODE support)
    12461226    return 0;
     
    13411321UINT WIN32API MapVirtualKeyA( UINT uCode, UINT  uMapType)
    13421322{
    1343 #ifdef DEBUG
    1344     WriteLog("USER32:  MapVirtualKeyA\n");
    1345 #endif
     1323    dprintf(("USER32:  MapVirtualKeyA\n"));
    13461324    return O32_MapVirtualKey(uCode,uMapType);
    13471325}
     
    13501328UINT WIN32API MapVirtualKeyW( UINT uCode, UINT  uMapType)
    13511329{
    1352 #ifdef DEBUG
    1353     WriteLog("USER32:  MapVirtualKeyW\n");
    1354 #endif
     1330    dprintf(("USER32:  MapVirtualKeyW\n"));
    13551331    // NOTE: This will not work as is (needs UNICODE support)
    13561332    return O32_MapVirtualKey(uCode,uMapType);
     
    14381414BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
    14391415{
    1440 #ifdef DEBUG
    1441   WriteLog("USER32:  RegisterHotKey, not implemented\n");
    1442 #endif
     1416  dprintf(("USER32:  RegisterHotKey, not implemented\n"));
    14431417  hwnd = Win32Window::Win32ToOS2Handle(hwnd);
    14441418  return(TRUE);
     
    15951569BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
    15961570{
    1597 #ifdef DEBUG
    1598   WriteLog("USER32:  UnregisterHotKey, not implemented\n");
    1599 #endif
     1571  dprintf(("USER32:  UnregisterHotKey, not implemented\n"));
    16001572  hwnd = Win32Window::Win32ToOS2Handle(hwnd);
    16011573
     
    16071579WORD WIN32API VkKeyScanA( char ch)
    16081580{
    1609 #ifdef DEBUG
    1610     WriteLog("USER32:  VkKeyScanA\n");
    1611 #endif
     1581    dprintf(("USER32:  VkKeyScanA\n"));
    16121582    return O32_VkKeyScan(ch);
    16131583}
     
    16161586WORD WIN32API VkKeyScanW( WCHAR wch)
    16171587{
    1618 #ifdef DEBUG
    1619     WriteLog("USER32:  VkKeyScanW\n");
    1620 #endif
     1588    dprintf(("USER32:  VkKeyScanW\n"));
    16211589    // NOTE: This will not work as is (needs UNICODE support)
    16221590    return O32_VkKeyScan((char)wch);
     
    17311699int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH  hbr)
    17321700{
    1733 #ifdef DEBUG
    1734     WriteLog("USER32:  FrameRect\n");
    1735 #endif
     1701    dprintf(("USER32:  FrameRect"));
    17361702    return O32_FrameRect(hDC,lprc,hbr);
    17371703}
     
    17401706BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
    17411707{
    1742 #ifdef DEBUG
    1743     WriteLog("USER32:  InvertRect\n");
    1744 #endif
     1708    dprintf(("USER32:  InvertRect\n"));
    17451709    return O32_InvertRect(hDC,lprc);
    17461710}
     
    17501714int WIN32API GetKeyboardType( int nTypeFlag)
    17511715{
    1752 #ifdef DEBUG
    1753     WriteLog("USER32:  GetKeyboardType\n");
    1754 #endif
     1716    dprintf(("USER32:  GetKeyboardType\n"));
    17551717    return O32_GetKeyboardType(nTypeFlag);
    17561718}
  • TabularUnified tags/trunk/src/user32/windowmsg.cpp

    r13383 r13788  
    1 /* $Id: windowmsg.cpp,v 1.19 2000-02-16 14:28:26 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.20 2000-03-23 23:06:53 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    245245
    246246    rc = O32_RegisterWindowMessage(arg1);
    247 #ifdef DEBUG
    248     WriteLog("USER32:  RegisterWindowMessageA %s returned %X\n", arg1, rc);
    249 #endif
     247    dprintf(("USER32:  RegisterWindowMessageA %s returned %X\n", arg1, rc));
    250248    return(rc);
    251249}
     
    257255 UINT  rc;
    258256
    259 #ifdef DEBUG
    260     WriteLog("USER32:  RegisterWindowMessageW\n");
    261 #endif
     257    dprintf(("USER32:  RegisterWindowMessageW\n"));
    262258    rc = O32_RegisterWindowMessage(astring);
    263259    FreeAsciiString(astring);
     
    269265BOOL WIN32API SetMessageQueue(int cMessagesMax)
    270266{
    271 #ifdef DEBUG
    272   WriteLog("USER32:  SetMessageQueue\n");
    273 #endif
     267  dprintf(("USER32:  SetMessageQueue\n"));
    274268  return(TRUE);
    275269}
     
    280274                    LPDWORD lpdwResult)
    281275{
    282 #ifdef DEBUG
    283   WriteLog("USER32:  SendMessageTimeoutA, partially implemented\n");
    284 #endif
     276  dprintf(("USER32:  SendMessageTimeoutA, partially implemented\n"));
    285277  //ignore fuFlags & wTimeOut
    286278  *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
     
    293285                    LPDWORD lpdwResult)
    294286{
    295 #ifdef DEBUG
    296   WriteLog("USER32:  SendMessageTimeoutW, partially implemented\n");
    297 #endif
     287  dprintf(("USER32:  SendMessageTimeoutW, partially implemented\n"));
    298288  return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
    299289}
     
    302292BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
    303293{
    304 #ifdef DEBUG
    305   WriteLog("USER32:  SendNotifyMessageA, not completely implemented\n");
    306 #endif
     294  dprintf(("USER32:  SendNotifyMessageA, not completely implemented\n"));
    307295  return(SendMessageA(hwnd, Msg, wParam, lParam));
    308296}
     
    311299BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
    312300{
    313 #ifdef DEBUG
    314   WriteLog("USER32:  SendNotifyMessageW, not completely implemented\n");
    315 #endif
     301  dprintf(("USER32:  SendNotifyMessageW, not completely implemented\n"));
    316302  return(SendMessageA(hwnd, Msg, wParam, lParam));
    317303}
     
    320306LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
    321307{
    322 #ifdef DEBUG
    323   WriteLog("USER32:  SetMessageExtraInfo\n");
    324 #endif
     308  dprintf(("USER32:  SetMessageExtraInfo\n"));
    325309  return SetThreadMessageExtraInfo(lParam);
    326310}
  • TabularUnified tags/trunk/src/user32/winicon.cpp

    r13383 r13788  
    1 /* $Id: winicon.cpp,v 1.9 2000-02-16 14:28:27 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.10 2000-03-23 23:06:54 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    2929HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
    3030{
    31 #ifdef DEBUG
    32     WriteLog("USER32:  CreateIcon\n");
    33 #endif
     31    dprintf(("USER32:  CreateIcon\n"));
    3432    return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
    3533}
     
    4543
    4644    hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
    47 #ifdef DEBUG
    48     WriteLog("USER32:  CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
    49 #endif
     45    dprintf(("USER32:  CreateIconFromResource returned %X (%X)\n", hicon, GetLastError()));
    5046    if(OS2Icon)
    5147        FreeIcon(OS2Icon);
     
    6056                                        UINT  Flags)
    6157{
    62 #ifdef DEBUG
    63     WriteLog("USER32:  CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
    64 #endif
     58    dprintf(("USER32:  CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags));
    6559    return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
    6660}
  • TabularUnified tags/trunk/src/user32/winprop.cpp

    r13383 r13788  
    1 /* $Id: winprop.cpp,v 1.7 2000-02-16 14:28:28 sandervl Exp $ */
     1/* $Id: winprop.cpp,v 1.8 2000-03-23 23:06:54 sandervl Exp $ */
    22/*
    33 * Win32 Property apis for OS/2
     
    1717#include "dbglocal.h"
    1818
    19 #undef DEBUG
    20 
    2119//******************************************************************************
    2220//******************************************************************************
    2321int WIN32API EnumPropsA(HWND hwnd, PROPENUMPROCA arg2)
    2422{
    25 #ifdef DEBUG
    26     WriteLog("USER32:  EnumPropsA DOES NOT WORK\n");
    27 #endif
     23    dprintf(("USER32:  EnumPropsA DOES NOT WORK\n"));
    2824    //calling convention problems
    2925    return 0;
     
    3430int WIN32API EnumPropsExA( HWND hwnd, PROPENUMPROCEXA arg2, LPARAM  arg3)
    3531{
    36 #ifdef DEBUG
    37     WriteLog("USER32:  EnumPropsExA DOES NOT WORK\n");
    38 #endif
     32    dprintf(("USER32:  EnumPropsExA DOES NOT WORK\n"));
    3933    //calling convention problems
    4034    return 0;
     
    4539int WIN32API EnumPropsExW( HWND hwnd, PROPENUMPROCEXW arg2, LPARAM  arg3)
    4640{
    47 #ifdef DEBUG
    48     WriteLog("USER32:  EnumPropsExW DOES NOT WORK\n");
    49 #endif
     41    dprintf(("USER32:  EnumPropsExW DOES NOT WORK\n"));
    5042    // NOTE: This will not work as is (needs UNICODE support)
    5143    //calling convention problems
     
    5749int WIN32API EnumPropsW( HWND hwnd, PROPENUMPROCW  arg2)
    5850{
    59 #ifdef DEBUG
    60     WriteLog("USER32:  EnumPropsW DOES NOT WORK\n");
    61 #endif
     51    dprintf(("USER32:  EnumPropsW DOES NOT WORK\n"));
    6252    // NOTE: This will not work as is (needs UNICODE support)
    6353    //calling convention problems
     
    7969    }
    8070    rc = O32_GetProp(window->getOS2WindowHandle(), arg2);
    81 #ifdef DEBUG
    8271    if(HIWORD(arg2) != 0)
    83          dprintf(("USER32: GetPropA %s returned %x\n", arg2, rc));
    84     else dprintf(("USER32: GetPropA %X returned %x\n", arg2, rc));
    85 #endif
     72         dprintf2(("USER32: GetPropA %s returned %x\n", arg2, rc));
     73    else dprintf2(("USER32: GetPropA %X returned %x\n", arg2, rc));
    8674    return rc;
    8775}
     
    115103        return 0;
    116104    }
    117 #ifdef DEBUG
    118105    if(HIWORD(arg2) != 0)
    119          dprintf(("USER32: RemovePropA %s\n", arg2));
    120     else dprintf(("USER32: RemovePropA %X\n", arg2));
    121 #endif
     106         dprintf2(("USER32: RemovePropA %s\n", arg2));
     107    else dprintf2(("USER32: RemovePropA %X\n", arg2));
    122108    return O32_RemoveProp(window->getOS2WindowHandle(), arg2);
    123109}
     
    151137        return 0;
    152138    }
    153 #ifdef DEBUG
    154139    if(HIWORD(arg2) != 0)
    155          dprintf(("USER32: SetPropA %s to %x\n", arg2, arg3));
    156     else dprintf(("USER32: SetPropA %X to %x\n", arg2, arg3));
    157 #endif
     140         dprintf2(("USER32: SetPropA %s to %x\n", arg2, arg3));
     141    else dprintf2(("USER32: SetPropA %X to %x\n", arg2, arg3));
    158142    return O32_SetProp(window->getOS2WindowHandle(), arg2, arg3);
    159143}
  • TabularUnified tags/trunk/src/user32/wsprintf.cpp

    r13384 r13788  
    1 /* $Id: wsprintf.cpp,v 1.6 2000-02-16 14:34:41 sandervl Exp $ */
     1/* $Id: wsprintf.cpp,v 1.7 2000-03-23 23:06:54 sandervl Exp $ */
    22
    33/*
     
    549549
    550550
    551 #if 0
    552 //@@@PH old ODIN implementation 1999/11/04
    553 /* String Manipulation Functions */
    554 
    555 int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
    556 {
    557  int     rc;
    558  va_list argptr;
    559 
    560 #ifdef DEBUG
    561   WriteLog("USER32:  wsprintfA\n");
    562   WriteLog("USER32:  %s\n", lpFmt);
    563 #endif
    564   va_start(argptr, lpFmt);
    565   rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
    566   va_end(argptr);
    567 #ifdef DEBUG
    568   WriteLog("USER32:  %s\n", lpOut);
    569 #endif
    570   return(rc);
    571 }
    572 //******************************************************************************
    573 //******************************************************************************
    574 int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
    575 {
    576   int     rc;
    577   char   *lpFmtA;
    578   char    szOut[512];
    579   va_list argptr;
    580 
    581   dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
    582            lpOut,
    583            lpFmt));
    584 
    585   lpFmtA  = UnicodeToAsciiString((LPWSTR)lpFmt);
    586 
    587   /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
    588   {
    589     PCHAR   pszTemp;
    590     PCHAR   pszTemp1;
    591     ULONG   ulStrings;
    592     ULONG   ulIndex;                             /* temporary string counter */
    593 
    594     for (ulStrings = 0,                  /* determine number of placeholders */
    595          pszTemp   = lpFmtA;
    596 
    597          (pszTemp != NULL) &&
    598          (*pszTemp != 0);
    599 
    600          ulStrings++)
    601     {
    602       pszTemp = strstr(pszTemp,
    603                        "%s");
    604       if (pszTemp != NULL)                              /* skip 2 characters */
    605       {
    606         pszTemp++;
    607         pszTemp++;
    608       }
    609       else
    610         break;                                     /* leave loop immediately */
    611     }
    612 
    613     if (ulStrings != 0)                         /* transformation required ? */
    614     {
    615                                                      /* now reallocate lpFmt */
    616       ulStrings += strlen(lpFmtA);           /* calculate total string length */
    617       pszTemp   = lpFmtA;                              /* save string pointer */
    618       pszTemp1  = lpFmtA;                              /* save string pointer */
    619 
    620              /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
    621       lpFmtA     = (char *)malloc(ulStrings + 1);
    622       if (lpFmtA == NULL)                          /* check proper allocation */
    623         return (0);                                 /* raise error condition */
    624 
    625       for (ulIndex = 0;
    626            ulIndex <= ulStrings;
    627            ulIndex++,
    628            pszTemp++)
    629       {
    630         if ((pszTemp[0] == '%') &&
    631             (pszTemp[1] == 's') )
    632         {
    633           /* replace %s by %ls */
    634           lpFmtA[ulIndex++] = '%';
    635           lpFmtA[ulIndex  ] = 'l';
    636           lpFmtA[ulIndex+1] = 's';
    637         }
    638         else
    639           lpFmtA[ulIndex] = *pszTemp;         /* just copy over the character */
    640       }
    641 
    642       lpFmtA[ulStrings] = 0;                            /* string termination */
    643 
    644       FreeAsciiString(pszTemp1);          /* the original string is obsolete */
    645     }
    646   }
    647 
    648   dprintf(("USER32:  wsprintfW (%s).\n",
    649            lpFmt));
    650 
    651   va_start(argptr,
    652            lpFmt);
    653 
    654   rc = O32_wvsprintf(szOut,
    655                  lpFmtA,
    656                  argptr);
    657 
    658   AsciiToUnicode(szOut,
    659                  lpOut);
    660 
    661   FreeAsciiString(lpFmtA);
    662   return(rc);
    663 }
    664 //******************************************************************************
    665 //******************************************************************************
    666 int WIN32API wvsprintfA( LPSTR lpOutput, LPCSTR lpFormat, va_list arglist)
    667 {
    668 #ifdef DEBUG
    669     WriteLog("USER32:  wvsprintfA\n");
    670 #endif
    671     return O32_wvsprintf(lpOutput,lpFormat,(LPCVOID*)arglist);
    672 }
    673 //******************************************************************************
    674 //******************************************************************************
    675 int WIN32API wvsprintfW(LPWSTR lpOutput, LPCWSTR lpFormat, va_list arglist)
    676 {
    677  int     rc;
    678  char    szOut[256];
    679  char   *lpFmtA;
    680 
    681   lpFmtA  = UnicodeToAsciiString((LPWSTR)lpFormat);
    682 #ifdef DEBUG
    683   WriteLog("USER32:  wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
    684   WriteLog("USER32:  %s\n", lpFormat);
    685 #endif
    686   rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)arglist);
    687 
    688   AsciiToUnicode(szOut, lpOutput);
    689 #ifdef DEBUG
    690   WriteLog("USER32:  %s\n", lpOutput);
    691 #endif
    692   FreeAsciiString(lpFmtA);
    693   return(rc);
    694 }
    695 #endif
    696 
     551
Note: See TracChangeset for help on using the changeset viewer.