Changeset 196
- Timestamp:
- Aug 9, 2002, 12:35:28 AM (23 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/apps.c
r185 r196 15 15 16 16 /* 17 * Copyright (C) 1997-200 1Ulrich Mller.17 * Copyright (C) 1997-2002 Ulrich Mller. 18 18 * This file is part of the "XWorkplace helpers" source package. 19 19 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/cctl_chart.c
r189 r196 166 166 167 167 /* 168 * Copyright (C) 1997-200 0Ulrich Mller.168 * Copyright (C) 1997-2002 Ulrich Mller. 169 169 * This file is part of the "XWorkplace helpers" source package. 170 170 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/cctl_checkcnr.c
r191 r196 15 15 16 16 /* 17 * Copyright (C) 1997-200 0Ulrich Mller.17 * Copyright (C) 1997-2002 Ulrich Mller. 18 18 * This file is part of the "XWorkplace helpers" source package. 19 19 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/cctl_tooltip.c
r191 r196 15 15 16 16 /* 17 * Copyright (C) 1997-200 0Ulrich Mller.17 * Copyright (C) 1997-2002 Ulrich Mller. 18 18 * This file is part of the "XWorkplace helpers" source package. 19 19 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/comctl.c
r195 r196 52 52 53 53 /* 54 * Copyright (C) 1997-200 0Ulrich Mller.54 * Copyright (C) 1997-2002 Ulrich Mller. 55 55 * This file is part of the "XWorkplace helpers" source package. 56 56 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/configsys.c
r184 r196 22 22 23 23 /* 24 * Copyright (C) 1997-200 1Ulrich Mller.24 * Copyright (C) 1997-2002 Ulrich Mller. 25 25 * This file is part of the "XWorkplace helpers" source package. 26 26 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/dialog.c
r188 r196 29 29 30 30 /* 31 * Copyright (C) 2001 Ulrich Mller.31 * Copyright (C) 2001-2002 Ulrich Mller. 32 32 * This file is part of the "XWorkplace helpers" source package. 33 33 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/eah.c
r169 r196 66 66 * 67 67 * Copyright (C) 1995 Massachusetts Institute of Technology. 68 * Copyright (C) 1997-200 0Ulrich Mller.68 * Copyright (C) 1997-2002 Ulrich Mller. 69 69 * This file is part of the "XWorkplace helpers" source package. 70 70 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/gpih.c
r195 r196 2648 2648 ) 2649 2649 { 2650 LONG lPatternOld = -1; // mark as "not changed" for now 2651 LONG lAndROP = ROP_SRCAND, // 0x0088 = 10001000 2652 lPaintROP = ROP_SRCPAINT, // 0x00EE = 11101110 2653 lInvertROP = ROP_SRCINVERT; // 0x0066 = 01100110 2654 2650 2655 // colors are constant too 2651 2656 GpiSetColor(hps, RGBCOL_WHITE); … … 2653 2658 2654 2659 if (fl & DP_HALFTONED) // V0.9.20 (2002-08-04) [umoeller] 2660 { 2661 lPatternOld = GpiQueryPattern(hps); 2655 2662 GpiSetPattern(hps, PATSYM_HALFTONE); 2663 2664 lAndROP = 0x00A8; // 10101000 2665 lInvertROP = 0x00A6; // 10100110 2666 } 2656 2667 2657 2668 /* … … 2688 2699 4L, // must always be 4 2689 2700 aptl, // point array 2690 ROP_SRCAND, // source AND target2701 lAndROP, // ROP_SRCAND, // source AND target 2691 2702 BBO_IGNORE); 2692 2703 } … … 2722 2733 4L, // must always be 4 2723 2734 aptl, // point array 2724 ROP_SRCPAINT,2735 lPaintROP, // ROP_SRCPAINT, 2725 2736 BBO_IGNORE); 2726 2737 } … … 2761 2772 4L, // must always be 4 2762 2773 aptl, // point array 2763 ROP_SRCINVERT, // source XOR target2774 lInvertROP, // ROP_SRCINVERT, // source XOR target 2764 2775 BBO_IGNORE); 2765 2776 } 2777 2778 // reset old pattern, if changed 2779 if (lPatternOld != -1) 2780 GpiSetPattern(hps, lPatternOld); 2766 2781 2767 2782 return TRUE; -
trunk/src/helpers/helpers_post.in
r75 r196 20 20 21 21 .c.{$(OUTPUTDIR)}.obj: 22 22 @echo $(MAKEDIR)\makefile: Compiling $(@B).c 23 23 !ifdef EMX 24 24 $(CC_HELPERS) -o $(OUTPUTDIR)\$(@B).obj $(@B).c 25 25 !else 26 26 !ifndef PRECH 27 27 $(CC_HELPERS) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c 28 28 !else 29 29 $(CC_HELPERS) /fi"$(PRECH)\$(@B).pch" /si"$(PRECH)\$(@B).pch" /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c 30 30 !endif 31 31 !endif 32 33 $(OUTPUTDIR)\interlock.obj: $(@B).asm 34 @echo $(MAKEDIR)\makefile: Assembling $(@B).asm 35 alp -Sv:ALP -Fdo:$(OUTPUTDIR) $(@B).asm 32 36 33 37 # The .OBJ-from-sources dependencies are now automatically -
trunk/src/helpers/helpers_pre.in
r174 r196 69 69 $(OUTPUTDIR)\prfh2.obj \ 70 70 $(OUTPUTDIR)\resh.obj \ 71 $(OUTPUTDIR)\semaphores.obj \ 71 $(OUTPUTDIR)\sem.obj \ 72 $(OUTPUTDIR)\interlock.obj \ 72 73 $(OUTPUTDIR)\stringh.obj \ 73 74 $(OUTPUTDIR)\syssound.obj \ -
trunk/src/helpers/stringh.c
r178 r196 23 23 24 24 /* 25 * Copyright (C) 1997-200 0Ulrich Mller.25 * Copyright (C) 1997-2002 Ulrich Mller. 26 26 * Parts Copyright (C) 1991-1999 iMatix Corporation. 27 27 * This file is part of the "XWorkplace helpers" source package. -
trunk/src/helpers/threads.c
r167 r196 23 23 24 24 /* 25 * Copyright (C) 1997-200 0Ulrich Mller.25 * Copyright (C) 1997-2002 Ulrich Mller. 26 26 * This file is part of the "XWorkplace helpers" source package. 27 27 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/tmsgfile.c
r190 r196 53 53 54 54 /* 55 * Copyright (C) 2001 Ulrich Mller.55 * Copyright (C) 2001-2002 Ulrich Mller. 56 56 * This file is part of the "XWorkplace helpers" source package. 57 57 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/tree.c
r116 r196 312 312 if (ul1 < ul2) 313 313 return -1; 314 314 315 if (ul1 > ul2) 315 316 return +1; 316 return (0); 317 318 return 0; 317 319 } 318 320 … … 336 338 { 337 339 int i = strcmp(p1, p2); 338 if (i < 0) return (-1); 339 if (i > 0) return (+1); 340 if (i < 0) 341 return -1; 342 if (i > 0) 343 return +1; 340 344 } 341 345 else if (p1) 342 346 // but p2 is NULL: p1 greater than p2 then 343 return (+1);347 return +1; 344 348 else if (p2) 345 349 // but p1 is NULL: p1 less than p2 then 346 return (-1);350 return -1; 347 351 348 352 // return 0 if strcmp returned 0 above or both strings are NULL 349 return (0);353 return 0; 350 354 } 351 355 … … 358 362 TREE *x) 359 363 { 360 /************************** 361 * rotate node x to left * 362 **************************/ 364 // rotate node x to left 363 365 364 366 TREE *y = x->right; … … 372 374 if (y != LEAF) 373 375 y->parent = x->parent; 376 374 377 if (x->parent) 375 378 { … … 396 399 TREE *x) 397 400 { 398 399 /**************************** 400 * rotate node x to right * 401 ****************************/ 401 // rotate node x to right 402 402 403 403 TREE *y = x->left; … … 411 411 if (y != LEAF) 412 412 y->parent = x->parent; 413 413 414 if (x->parent) 414 415 { … … 435 436 TREE *x) 436 437 { 437 /*************************************438 * maintain Red-Black tree balance *439 * after inserting node x *440 *************************************/441 442 438 // check Red-Black properties 443 439 while ( x != *root … … 503 499 } 504 500 } 501 505 502 (*root)->color = BLACK; 506 503 } … … 546 543 { 547 544 int iResult; 548 if ( 0 == (iResult = pfnCompare(key, current->ulKey))) // if (compEQ(key, current->key))545 if (!(iResult = pfnCompare(key, current->ulKey))) 549 546 return STATUS_DUPLICATE_KEY; 550 547 551 548 parent = current; 552 current = (iResult < 0) // compLT(key, current->key)549 current = (iResult < 0) 553 550 ? current->left 554 551 : current->right; … … 556 553 557 554 // set up new node 558 /* if ((x = malloc (sizeof(*x))) == 0)559 return STATUS_MEM_EXHAUSTED; */560 555 x->parent = parent; 561 556 x->left = LEAF; 562 557 x->right = LEAF; 563 558 x->color = RED; 564 // x->key = key;565 // x->rec = *rec;566 559 567 560 // insert node in tree … … 578 571 insertFixup(root, 579 572 x); 580 // lastFind = NULL;581 573 582 574 if (plCount) … … 667 659 } 668 660 } 661 669 662 tree->color = BLACK; 670 671 /*************************************672 * maintain Red-Black tree balance *673 * after deleting node x *674 *************************************/675 676 /* while ( x != *root677 && x->color == BLACK678 )679 {680 if (x == x->parent->left)681 {682 TREE *w = x->parent->right;683 if (w->color == RED)684 {685 w->color = BLACK;686 x->parent->color = RED;687 rotateLeft(root,688 x->parent);689 w = x->parent->right;690 }691 if ( w->left->color == BLACK692 && w->right->color == BLACK693 )694 {695 w->color = RED;696 x = x->parent;697 }698 else699 {700 if (w->right->color == BLACK)701 {702 w->left->color = BLACK;703 w->color = RED;704 rotateRight(root,705 w);706 w = x->parent->right;707 }708 w->color = x->parent->color;709 x->parent->color = BLACK;710 w->right->color = BLACK;711 rotateLeft(root,712 x->parent);713 x = *root;714 }715 }716 else717 {718 TREE *w = x->parent->left;719 if (w->color == RED)720 {721 w->color = BLACK;722 x->parent->color = RED;723 rotateRight(root,724 x->parent);725 w = x->parent->left;726 }727 if ( w->right->color == BLACK728 && w->left->color == BLACK729 )730 {731 w->color = RED;732 x = x->parent;733 }734 else735 {736 if (w->left->color == BLACK)737 {738 w->right->color = BLACK;739 w->color = RED;740 rotateLeft(root,741 w);742 w = x->parent->left;743 }744 w->color = x->parent->color;745 x->parent->color = BLACK;746 w->left->color = BLACK;747 rotateRight(root,748 x->parent);749 x = *root;750 }751 }752 }753 x->color = BLACK; */754 663 } 755 664 … … 803 712 if (y != LEAF) 804 713 y->parent = d->parent; 714 805 715 if (d->parent) 806 716 { … … 863 773 FNTREE_COMPARE *pfnCompare) // in: comparison func 864 774 { 865 /*******************************866 * find node containing data *867 *******************************/868 869 775 TREE *current = root; 870 776 while (current != LEAF) 871 777 { 872 778 int iResult; 873 if (0 == (iResult = pfnCompare(key, current->ulKey))) 874 return (current); 875 else 876 { 877 current = (iResult < 0) // compLT (key, current->key) 878 ? current->left 879 : current->right; 880 } 779 if (!(iResult = pfnCompare(key, current->ulKey))) 780 return current; 781 782 current = (iResult < 0) 783 ? current->left 784 : current->right; 881 785 } 882 786 … … 957 861 p = r; 958 862 if (p->right != LEAF) 959 return treeFirst (p->right); 960 else 961 { 962 p = r; 963 child = LEAF; 964 while ( (p->parent) 965 && (p->right == child) 966 ) 967 { 968 child = p; 969 p = p->parent; 970 } 971 if (p->right != child) 972 return p; 973 else 974 return NULL; 975 } 863 return treeFirst(p->right); 864 865 p = r; 866 child = LEAF; 867 while ( (p->parent) 868 && (p->right == child) 869 ) 870 { 871 child = p; 872 p = p->parent; 873 } 874 875 if (p->right != child) 876 return p; 877 878 return NULL; 976 879 } 977 880 … … 987 890 988 891 if ( (!r) 989 || (r == LEAF)) 892 || (r == LEAF) 893 ) 990 894 return NULL; 991 895 … … 993 897 if (p->left != LEAF) 994 898 return treeLast (p->left); 995 else 996 {997 p = r;998 child = LEAF;999 while ((p->parent)1000 && (p->left == child))1001 1002 1003 1004 1005 if (p->left != child) 1006 return p;1007 else1008 return NULL; 1009 }899 900 p = r; 901 child = LEAF; 902 while ( (p->parent) 903 && (p->left == child) 904 ) 905 { 906 child = p; 907 p = p->parent; 908 } 909 910 if (p->left != child) 911 return p; 912 913 return NULL; 1010 914 } 1011 915 -
trunk/src/helpers/winh.c
r195 r196 19 19 20 20 /* 21 * Copyright (C) 1997-200 0Ulrich Mller.21 * Copyright (C) 1997-2002 Ulrich Mller. 22 22 * This file is part of the "XWorkplace helpers" source package. 23 23 * This is free software; you can redistribute it and/or modify -
trunk/src/helpers/xml.c
r187 r196 107 107 108 108 /* 109 * Copyright (C) 2000-200 1Ulrich Mller.109 * Copyright (C) 2000-2002 Ulrich Mller. 110 110 * This file is part of the "XWorkplace helpers" source package. 111 111 * This is free software; you can redistribute it and/or modify
Note:
See TracChangeset
for help on using the changeset viewer.