Changeset 217


Ignore:
Timestamp:
Aug 30, 2002, 1:21:47 AM (23 years ago)
Author:
umoeller
Message:

Misc changes.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/winh.h

    r216 r217  
    897897    VOID XWPENTRY winhSetNumLock(BOOL fState);
    898898
     899    BOOL XWPENTRY winhSetClipboardText(HAB hab,
     900                                       PCSZ pcsz,
     901                                       ULONG cbSize);
     902
    899903    /*
    900904     *@@ winhQueryScreenCX:
  • trunk/src/helpers/dosh.c

    r201 r217  
    37493749
    37503750        // resolve DosPerfSysCall API entry
    3751         if (!(arc = DosLoadModule(NULL, 0, "DOSCALLS", &pPerfSys->hmod)))
     3751        if (!(arc = DosLoadModule(NULL,
     3752                                  0,
     3753                                  "DOSCALLS",
     3754                                  &pPerfSys->hmod)))
    37523755        {
    37533756            if (!(arc = DosQueryProcAddr(pPerfSys->hmod,
    37543757                                         976,
    37553758                                         "DosPerfSysCall",
    3756                                          (PFN*)(&pPerfSys->pDosPerfSysCall))))
     3759                                         (PFN*)&pPerfSys->pDosPerfSysCall)))
    37573760            {
    37583761                // OK, we got the API: initialize!
    3759                 if (!(arc = pPerfSys->pDosPerfSysCall(CMD_KI_ENABLE, 0, 0, 0)))
     3762                if (!(arc = pPerfSys->pDosPerfSysCall(CMD_KI_ENABLE,
     3763                                                      0,
     3764                                                      0,
     3765                                                      0)))
    37603766                {
    37613767                    pPerfSys->fInitialized = TRUE;
     
    37643770                    if (!(arc = pPerfSys->pDosPerfSysCall(CMD_PERF_INFO,
    37653771                                                          0,
    3766                                                           (ULONG)(&pPerfSys->cProcessors),
     3772                                                          (ULONG)&pPerfSys->cProcessors,
    37673773                                                          0)))
    37683774                    {
  • trunk/src/helpers/except.c

    r210 r217  
    451451 *@@changed V0.9.16 (2001-11-02) [pr]: make object display signed
    452452 *@@changed V0.9.19 (2002-03-28) [umoeller]: added thread ordinal
     453 *@@changed V0.9.21 (2002-08-28) [umoeller]: added OS revision to dump
    453454 */
    454455
     
    507508    // generic exception info
    508509    DosQuerySysInfo(QSV_VERSION_MAJOR,      // 11
    509                     QSV_VERSION_MINOR,      // 12
     510                    QSV_VERSION_REVISION,   // 13 V0.9.21 (2002-08-28) [umoeller]
    510511                    &aulBuf, sizeof(aulBuf));
    511512    // Warp 3 is reported as 20.30
     
    523524    }
    524525    fprintf(file,
    525             "Running OS/2 version: %u.%u (%s)\n",
     526            "Running OS/2 version: %u.%u.%u (%s)\n",
    526527            aulBuf[0],                      // major
    527528            aulBuf[1],
     529            aulBuf[2],              // revision V0.9.21 (2002-08-28) [umoeller]
    528530            pcszVersion);
    529531
  • trunk/src/helpers/procstat.c

    r207 r217  
    9292    APIRET arc = NO_ERROR;
    9393    PQPROCSTAT16 pps = NULL;
    94 
    95     /* PQPROCSTAT16 pps = (PQPROCSTAT16)malloc(0x8000);
    96     if (!pps)
    97         arc = ERROR_NOT_ENOUGH_MEMORY;
    98     else */
    9994
    10095    if (!ppps)
     
    340335                  pProcess->ulType != 3;
    341336                  pProcess = (PQPROCESS16)PTR(pProcess->ulThreadList,
    342                              pProcess->usThreads * sizeof(QTHREAD16))
     337                                              pProcess->usThreads * sizeof(QTHREAD16))
    343338                )
    344339            {
  • trunk/src/helpers/winh.c

    r216 r217  
    6767#define INCL_WINCIRCULARSLIDER
    6868#define INCL_WINSTDFILE
     69#define INCL_WINCLIPBOARD
    6970
    7071#define INCL_SPL
     
    47054706
    47064707/*
     4708 *@@ winhSetClipboardText:
     4709 *      sets the clipboard data to the given text,
     4710 *      replacing the current clipboard contents.
     4711 *
     4712 *@@added V0.9.21 (2002-08-28) [umoeller]
     4713 */
     4714
     4715BOOL winhSetClipboardText(HAB hab,
     4716                          PCSZ pcsz,
     4717                          ULONG cbSize)     // in: size of buffer INCLUDING null byte
     4718{
     4719    BOOL    fSuccess = FALSE;
     4720
     4721    if (WinOpenClipbrd(hab))
     4722    {
     4723        PSZ pszDest;
     4724        if (!DosAllocSharedMem((PVOID*)&pszDest,
     4725                               NULL,
     4726                               cbSize,
     4727                               PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE))
     4728        {
     4729            memcpy(pszDest,
     4730                   pcsz,
     4731                   cbSize);
     4732
     4733            WinEmptyClipbrd(hab);
     4734
     4735            fSuccess = WinSetClipbrdData(hab,       // anchor-block handle
     4736                                         (ULONG)pszDest, // pointer to text data
     4737                                         CF_TEXT,        // data is in text format
     4738                                         CFI_POINTER);   // passing a pointer
     4739
     4740            // PMREF says (implicitly) it is not necessary to call
     4741            // DosFreeMem. I hope that is correct.
     4742            // V0.9.19 (2002-06-02) [umoeller]
     4743        }
     4744
     4745        WinCloseClipbrd(hab);
     4746    }
     4747
     4748    return fSuccess;
     4749}
     4750
     4751/*
    47074752 *@@category: Helpers\PM helpers\Extended frame windows
    47084753 */
     
    49534998    {
    49544999        // allocate buffer
    4955         pObjClass = (POBJCLASS)malloc(ulSize+1);
     5000        pObjClass = (POBJCLASS)malloc(ulSize + 1);
    49565001        // and load the classes into it
    49575002        WinEnumObjectClasses(pObjClass, &ulSize);
    49585003    }
    49595004
    4960     return ((PBYTE)pObjClass);
     5005    return (PBYTE)pObjClass;
    49615006}
    49625007
Note: See TracChangeset for help on using the changeset viewer.