Changeset 93


Ignore:
Timestamp:
Aug 3, 2001, 8:52:44 PM (24 years ago)
Author:
umoeller
Message:

Misc changes

Location:
trunk
Files:
5 edited

Legend:

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

    r91 r93  
    725725
    726726        // New Executable (NE) header, if ulExeFormat == EXEFORMAT_NE
     727#ifndef __STRIP_DOWN_EXECUTABLE__       // for mini stubs in warpin, to reduce code size
    727728        PNEHEADER           pNEHeader;
    728729        ULONG               cbNEHeader;
     730#endif
    729731
    730732        // Linear Executable (LX) header, if ulExeFormat == EXEFORMAT_LX
     
    733735
    734736        // Portable Executable (PE) header, if ulExeFormat == EXEFORMAT_PE
     737#ifndef __STRIP_DOWN_EXECUTABLE__       // for mini stubs in warpin, to reduce code size
    735738        PPEHEADER           pPEHeader;
    736739        ULONG               cbPEHeader;
    737 
     740#endif
    738741        // module analysis (always set):
    739742        ULONG               ulExeFormat;
  • trunk/include/helpers/gpih.h

    r91 r93  
    7878    #define RGBCOL_DARKYELLOW       0x00808000
    7979    #define RGBCOL_DARKGRAY         0x00808080
     80
     81    /*
     82     *@@ GET_BLUE:
     83     *      gets the BLUE (first) byte from a
     84     *      LONG RGB value.
     85     *
     86     *@@added V0.9.14 (2001-08-03) [umoeller]
     87     */
     88
     89    #define GET_BLUE(lcol)  *( ((PBYTE)(&(lcol))) )
     90
     91    /*
     92     *@@ GET_GREEN:
     93     *      gets the GREEN (second) byte from a
     94     *      LONG RGB value.
     95     *
     96     *@@added V0.9.14 (2001-08-03) [umoeller]
     97     */
     98
     99    #define GET_GREEN(lcol) *( ((PBYTE)(&(lcol))) + 1 )
     100
     101    /*
     102     *@@ GET_RED:
     103     *      gets the RED (third) byte from a
     104     *      LONG RGB value.
     105     *
     106     *@@added V0.9.14 (2001-08-03) [umoeller]
     107     */
     108
     109    #define GET_RED(lcol)   *( ((PBYTE)(&(lcol))) + 2 )
     110
     111    /*
     112     *@@ MAKE_RGB:
     113     *      composes a LONG color value from
     114     *      three BYTE values for red, green,
     115     *      and blue.
     116     *
     117     *@@added V0.9.14 (2001-08-03) [umoeller]
     118     */
     119
     120    #define MAKE_RGB(r, g, b) (LONG)((BYTE)(b)) + (((LONG)((BYTE)(g))) << 8) + (((LONG)((BYTE)(r))) << 16)
    80121
    81122    VOID XWPENTRY gpihManipulateRGB(PLONG plColor, double dFactor);
  • trunk/src/helpers/apmh.c

    r92 r93  
    1515 *            numbering.
    1616 *
    17  *@@header "helpers\apm.h"
     17 *@@header "helpers\apmh.h"
    1818 *@@added V0.9.14 (2001-08-01) [umoeller]
    1919 */
  • trunk/src/helpers/memdebug.c

    r91 r93  
    9191
    9292/*
    93  *      Copyright (C) 2000 Ulrich M”ller.
     93 *      Copyright (C) 2000-2001 Ulrich M”ller.
    9494 *      This program is part of the XWorkplace package.
    9595 *      This program is free software; you can redistribute it and/or modify
  • trunk/src/helpers/timer.c

    r91 r93  
    250250    PLINKLIST pllXTimers = (PLINKLIST)pSet->pvllXTimers;
    251251    ULONG   cTimers = lstCountItems(pllXTimers);
     252
     253    #ifdef DEBUG_XTIMERS
     254        _Pmpf((__FUNCTION__ ": entering"));
     255    #endif
     256
    252257    if (!cTimers)
    253258    {
     
    278283            // only one timer:
    279284            // that's easy
     285            #ifdef DEBUG_XTIMERS
     286                _Pmpf(("  got 1 timer"));
     287            #endif
     288
    280289            pSet->ulPMTimeout = pTimer1->ulTimeout;
    281290        }
     
    285294            // find the greatest common denominator
    286295            PXTIMER pTimer2 = (PXTIMER)pNode->pNext->pItemData;
     296            #ifdef DEBUG_XTIMERS
     297                _Pmpf(("  got 2 timers"));
     298            #endif
    287299
    288300            pSet->ulPMTimeout = mathGCD(pTimer1->ulTimeout,
     
    297309                    i = 0;
    298310
    299             // _Pmpf(("Recalculating, got %d timers", cTimers));
     311            #ifdef DEBUG_XTIMERS
     312                _Pmpf(("  got %d timers", cTimers));
     313            #endif
    300314
    301315            // fill an array of integers with the
     
    305319                pTimer1 = (PXTIMER)pNode->pItemData;
    306320
    307                 // _Pmpf(("  timeout %d is %d", i, pTimer1->ulTimeout));
     321                #ifdef DEBUG_XTIMERS
     322                    _Pmpf(("    timeout %d is %d", i, pTimer1->ulTimeout));
     323                #endif
    308324
    309325                paInts[i++] = pTimer1->ulTimeout;
     
    314330            pSet->ulPMTimeout = mathGCDMulti(paInts,
    315331                                             cTimers);
    316             // _Pmpf(("--> GCD is %d", pSet->ulPMTimeout));
    317         }
     332        }
     333
     334        #ifdef DEBUG_XTIMERS
     335            _Pmpf(("--> GCD is %d", pSet->ulPMTimeout));
     336        #endif
    318337
    319338        if (    (!pSet->idPMTimerRunning)       // timer not running?
    320339             || (pSet->ulPMTimeout != ulOldPMTimeout) // timeout changed?
    321340           )
     341        {
    322342            // start or restart PM timer
    323343            pSet->idPMTimerRunning = WinStartTimer(pSet->hab,
     
    325345                                                   pSet->idPMTimer,
    326346                                                   pSet->ulPMTimeout);
     347        }
    327348    }
    328349}
     
    434455 *@@changed V0.9.12 (2001-05-24) [umoeller]: fixed crash if this got called during tmrTimerTick
    435456 *@@changed V0.9.14 (2001-08-01) [umoeller]: fixed mem overwrite which might have caused crashes if this got called during tmrTimerTick
     457 *@@changed V0.9.14 (2001-08-03) [umoeller]: fixed "half frequency" regression caused by frequency optimizations
    436458 */
    437459
     
    475497                                    &ulTimeNow, sizeof(ulTimeNow));
    476498
     499                    #ifdef DEBUG_XTIMERS
     500                        _Pmpf((__FUNCTION__ ": ulTimeNow = %d", ulTimeNow));
     501                    #endif
     502
    477503                    while (pTimerNode)
    478504                    {
     
    484510                        PXTIMER pTimer = (PXTIMER)pTimerNode->pItemData;
    485511
     512                        #ifdef DEBUG_XTIMERS
     513                            _Pmpf(("   timer %d: ulNextFire = %d",
     514                                    lstIndexFromItem(pllXTimers, pTimer),
     515                                    pTimer->ulNextFire));
     516                        #endif
     517
    486518                        if (    (pTimer)
    487                              && (pTimer->ulNextFire < ulTimeNow)
     519                             // && (pTimer->ulNextFire < ulTimeNow)
     520                                // V0.9.14 (2001-08-01) [umoeller]
     521                                // use <= because otherwise we'll get
     522                                // only half the frequency...
     523                                // we get here frequently where the
     524                                // two values are EXACTLY equal due
     525                                // to the above optimization (DosQuerySysInfo
     526                                // called once only for the entire loop)
     527                             && (pTimer->ulNextFire <= ulTimeNow)
    488528                           )
    489529                        {
    490530                            // this timer has elapsed:
    491531                            // fire!
     532
     533                            #ifdef DEBUG_XTIMERS
     534                                _Pmpf(("   --> fire!"));
     535                            #endif
     536
    492537                            if (WinIsWindow(pSet->hab,
    493538                                            pTimer->hwndTarget))
Note: See TracChangeset for help on using the changeset viewer.