Changeset 164 for trunk/src/helpers
- Timestamp:
- May 13, 2002, 7:49:28 AM (23 years ago)
- Location:
- trunk/src/helpers
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/except.c
r158 r164 887 887 *@@changed V0.9.0 [umoeller]: added support for thread termination 888 888 *@@changed V0.9.2 (2000-03-10) [umoeller]: switched date format to ISO 889 *@@changed V0.9.19 (2002-05-07) [umoeller]: added EXCEPTIONREPORTRECORD info so that catch block can check that 889 890 */ 890 891 … … 917 918 switch (pReportRec->ExceptionNum) 918 919 { 919 /* case XCPT_PROCESS_TERMINATE:920 case XCPT_ASYNC_PROCESS_TERMINATE:921 // thread terminated:922 // if the handler has been registered to catch923 // these exceptions, continue;924 if (pRegRec2->pfnOnKill)925 // call the "OnKill" function926 pRegRec2->pfnOnKill(pRegRec2);927 // get outta here, which will kill the thread928 break; */929 930 920 case XCPT_ACCESS_VIOLATION: 931 921 case XCPT_INTEGER_DIVIDE_BY_ZERO: … … 971 961 fclose(file); 972 962 963 // copy report rec to user buffer 964 // V0.9.19 (2002-05-07) [umoeller] 965 memcpy(&pRegRec2->err, 966 pReportRec, 967 sizeof(EXCEPTIONREPORTRECORD)); 968 973 969 // jump back to failing routine 974 /* DosSetPriority(PRTYS_THREAD,975 PRTYC_REGULAR,976 0, // delta977 0); // current thread978 */979 970 longjmp(pRegRec2->jmpThread, pReportRec->ExceptionNum); 980 971 break; } … … 1003 994 * 1004 995 *@@changed V0.9.0 [umoeller]: added support for thread termination 996 *@@changed V0.9.19 (2002-05-07) [umoeller]: added EXCEPTIONREPORTRECORD info so that catch block can check that 1005 997 */ 1006 998 … … 1019 1011 switch (pReportRec->ExceptionNum) 1020 1012 { 1021 /* case XCPT_PROCESS_TERMINATE:1022 case XCPT_ASYNC_PROCESS_TERMINATE:1023 // thread terminated:1024 // if the handler has been registered to catch1025 // these exceptions, continue;1026 if (pRegRec2->pfnOnKill)1027 // call the "OnKill" function1028 pRegRec2->pfnOnKill(pRegRec2);1029 // get outta here, which will kill the thread1030 break; */1031 1032 1013 case XCPT_ACCESS_VIOLATION: 1033 1014 case XCPT_INTEGER_DIVIDE_BY_ZERO: … … 1049 1030 #endif 1050 1031 1032 // copy report rec to user buffer 1033 // V0.9.19 (2002-05-07) [umoeller] 1034 memcpy(&pRegRec2->err, 1035 pReportRec, 1036 sizeof(EXCEPTIONREPORTRECORD)); 1037 1051 1038 // jump back to failing routine 1052 1039 longjmp(pRegRec2->jmpThread, pReportRec->ExceptionNum); -
trunk/src/helpers/gpih.c
r161 r164 546 546 547 547 return (lHits); 548 } 549 550 /* 551 *@@ gpihFillBackground: 552 * fills the specified rectangle in the way 553 * that is specified by the given BKGNDINFO 554 * structure. This way one can either use 555 * a solid color, a color fade, a bitmap, 556 * or a combination of those. 557 * 558 * See BKGNDINFO for the various parameters. 559 * 560 * Since this can potentially be expensive, 561 * it is strongly recommended to use a buffer 562 * bitmap for painting with the size of the 563 * window and bitblt that bitmap into the 564 * window on repaints. This way the background 565 * only has to be recreated on window resize. 566 * 567 *@@added V0.9.19 (2002-05-07) [umoeller] 568 */ 569 570 VOID gpihFillBackground(HPS hps, // in: PS to paint into 571 PRECTL prcl, // in: rectangle (inclusive!) 572 PBKGNDINFO pInfo) // in: background into 573 { 574 LONG l; 575 POINTL ptl; 576 577 switch (pInfo->flPaintMode & PMOD_COLORMASK) 578 { 579 case PMOD_SOLID: 580 // fill with background color 581 GpiSetColor(hps, 582 pInfo->lcol1); 583 ptl.x = prcl->xLeft; 584 ptl.y = prcl->yBottom; 585 GpiMove(hps, 586 &ptl); 587 ptl.x = prcl->xRight; 588 ptl.y = prcl->yTop; 589 GpiBox(hps, 590 DRO_FILL, 591 &ptl, 592 0, 593 0); 594 break; 595 596 case PMOD_TOPBOTTOM: 597 { 598 LONG lDiffRed = (LONG)GET_RED(pInfo->lcol2) - (LONG)GET_RED(pInfo->lcol1); 599 LONG lDiffGreen = (LONG)GET_GREEN(pInfo->lcol2) - (LONG)GET_GREEN(pInfo->lcol1); 600 LONG lDiffBlue = (LONG)GET_BLUE(pInfo->lcol2) - (LONG)GET_BLUE(pInfo->lcol1); 601 602 LONG lMax = prcl->yTop - prcl->yBottom; 603 604 // start at top 605 ptl.y = prcl->yTop; 606 607 for (l = 0; 608 l <= lMax; 609 ++l) 610 { 611 // compose RGB color for this line; 612 // lcol1 is top, lcol2 is bottom 613 LONG lRed = GET_RED(pInfo->lcol1) 614 + ( lDiffRed 615 * l 616 / lMax 617 ); 618 LONG lGreen = GET_GREEN(pInfo->lcol1) 619 + ( lDiffGreen 620 * l 621 / lMax 622 ); 623 LONG lBlue = GET_BLUE(pInfo->lcol1) 624 + ( lDiffBlue 625 * l 626 / lMax 627 ); 628 629 GpiSetColor(hps, MAKE_RGB(lRed, lGreen, lBlue)); 630 ptl.x = prcl->xLeft; 631 GpiMove(hps, &ptl); 632 ptl.x = prcl->xRight; 633 GpiLine(hps, &ptl); 634 635 // next line below 636 --(ptl.y); 637 } 638 } 639 break; 640 641 case PMOD_LEFTRIGHT: 642 { 643 LONG lDiffRed = (LONG)GET_RED(pInfo->lcol2) - (LONG)GET_RED(pInfo->lcol1); 644 LONG lDiffGreen = (LONG)GET_GREEN(pInfo->lcol2) - (LONG)GET_GREEN(pInfo->lcol1); 645 LONG lDiffBlue = (LONG)GET_BLUE(pInfo->lcol2) - (LONG)GET_BLUE(pInfo->lcol1); 646 647 LONG lMax = prcl->xRight - prcl->xLeft; 648 649 // start at left 650 ptl.x = prcl->xLeft; 651 652 for (l = 0; 653 l <= lMax; 654 ++l) 655 { 656 // compose RGB color for this line; 657 // lcol1 is top, lcol2 is bottom 658 LONG lRed = GET_RED(pInfo->lcol1) 659 + ( lDiffRed 660 * l 661 / lMax 662 ); 663 LONG lGreen = GET_GREEN(pInfo->lcol1) 664 + ( lDiffGreen 665 * l 666 / lMax 667 ); 668 LONG lBlue = GET_BLUE(pInfo->lcol1) 669 + ( lDiffBlue 670 * l 671 / lMax 672 ); 673 674 GpiSetColor(hps, MAKE_RGB(lRed, lGreen, lBlue)); 675 ptl.y = prcl->yBottom; 676 GpiMove(hps, &ptl); 677 ptl.y = prcl->yTop; 678 GpiLine(hps, &ptl); 679 680 // next line to the right 681 ++(ptl.x); 682 } 683 } 684 break; 685 } 548 686 } 549 687 … … 1523 1661 // set up the BITMAPINFOHEADER2 and BITMAPINFO2 structures 1524 1662 bih2.cbFix = (ULONG)sizeof(BITMAPINFOHEADER2); 1525 bih2.cx = cx; // (prcl->xRight - prcl->xLeft); changed V0.9.01526 bih2.cy = cy; // (prcl->yTop - prcl->yBottom); changed V0.9.01663 bih2.cx = cx; 1664 bih2.cy = cy; 1527 1665 bih2.cPlanes = (cPlanes) ? cPlanes : alData[0]; 1528 1666 bih2.cBitCount = (cBitCount) ? cBitCount : alData[1]; 1529 // _Pmpf((__FUNCTION__ ": cPlanes %d, cBitCount %d",1530 // bih2.cPlanes, bih2.cBitCount));1531 1667 bih2.ulCompression = BCA_UNCOMP; 1532 1668 bih2.cbImage = ( ( (bih2.cx -
trunk/src/helpers/linklist.c
r147 r164 260 260 line, 261 261 function); 262 262 263 lstInit(pNewList, fItemsFreeable); 263 264 return (pNewList); -
trunk/src/helpers/memdebug.c
r149 r164 488 488 CheckMagics(__FUNCTION__, 489 489 pHeapItem, 490 p,490 (PBYTE)p, 491 491 pcszSourceFile, 492 492 ulLine, … … 581 581 CheckMagics(__FUNCTION__, 582 582 pHeapItem, 583 p,583 (PBYTE)p, 584 584 pcszSourceFile, 585 585 ulLine, … … 748 748 */ 749 749 750 /* 750 751 void memdDumpMemoryBlock(PBYTE pb, // in: start address 751 752 ULONG ulSize, // in: size of block … … 766 767 } END_CATCH(); 767 768 } 769 */ 768 770 #endif 769 771 770 #else771 void memdDummy(void)772 {773 int i = 0;774 i++;775 }776 772 #endif 777 773 -
trunk/src/helpers/memdebug_win.c
r142 r164 512 512 */ 513 513 514 staticMRESULT EXPENTRY memd_fnwpMemDebug(HWND hwndClient, ULONG msg, MPARAM mp1, MPARAM mp2)514 MRESULT EXPENTRY memd_fnwpMemDebug(HWND hwndClient, ULONG msg, MPARAM mp1, MPARAM mp2) 515 515 { 516 516 MRESULT mrc = 0; -
trunk/src/helpers/prfh.c
r155 r164 138 138 */ 139 139 140 PSZ prfhQueryProfileDataDebug(HINI hIni, // in: INI handle (can be HINI_USER or HINI_SYSTEM)140 PSZ (prfhQueryProfileDataDebug)(HINI hIni, // in: INI handle (can be HINI_USER or HINI_SYSTEM) 141 141 const char *pcszApp, // in: application to query 142 142 const char *pcszKey, // in: key to query … … 189 189 */ 190 190 191 PSZ prfhQueryProfileData(HINI hIni, // in: INI handle (can be HINI_USER or HINI_SYSTEM)191 PSZ (prfhQueryProfileData)(HINI hIni, // in: INI handle (can be HINI_USER or HINI_SYSTEM) 192 192 const char *pcszApp, // in: application to query 193 193 const char *pcszKey, // in: key to query -
trunk/src/helpers/stringh.c
r161 r164 78 78 */ 79 79 80 APIRET strhStoreDebug(PSZ *ppszTarget,81 PCSZ pcszSource,82 PULONG pulLength, // out: length of new string (ptr can be NULL)83 PCSZ pcszSourceFile,84 unsigned long ulLine,85 PCSZ pcszFunction)80 APIRET (strhStoreDebug)(PSZ *ppszTarget, 81 PCSZ pcszSource, 82 PULONG pulLength, // out: length of new string (ptr can be NULL) 83 PCSZ pcszSourceFile, 84 unsigned long ulLine, 85 PCSZ pcszFunction) 86 86 { 87 87 ULONG ulLength = 0; 88 89 88 90 89 91 if (ppszTarget) -
trunk/src/helpers/textview.c
r142 r164 3073 3073 lstClear(&ptxvd->xfd.llRectangles); 3074 3074 lstClear(&ptxvd->xfd.llWords); 3075 GpiDestroyPS(ptxvd->hps); 3075 3076 free(ptxvd); 3076 GpiDestroyPS(ptxvd->hps);3077 3077 mrc = WinDefWindowProc(hwndTextView, msg, mp1, mp2); 3078 3078 break; -
trunk/src/helpers/timer.c
r163 r164 111 111 #include "helpers\timer.h" 112 112 113 #define DEBUG_XTIMERS113 // #define DEBUG_XTIMERS 114 114 115 115 /*
Note:
See TracChangeset
for help on using the changeset viewer.