Lines Matching refs:psPtr

579 static void		GetPatternString _ANSI_ARGS_((PatSeq *psPtr,
589 BindingTable *bindPtr, PatSeq *psPtr,
765 PatSeq *psPtr, *nextPtr;
776 for (psPtr = (PatSeq *) Tcl_GetHashValue(hPtr);
777 psPtr != NULL; psPtr = nextPtr) {
778 nextPtr = psPtr->nextSeqPtr;
779 ckfree((char *) psPtr->command);
780 ckfree((char *) psPtr);
834 PatSeq *psPtr;
837 psPtr = FindSequence(interp, &bindPtr->patternTable, object, eventString,
839 if (psPtr == NULL) {
842 if (psPtr->command == NULL) {
854 psPtr->nextObjPtr = NULL;
856 psPtr->nextObjPtr = (PatSeq *) Tcl_GetHashValue(hPtr);
858 Tcl_SetHashValue(hPtr, psPtr);
861 if (append && (psPtr->command != NULL)) {
865 length = strlen(psPtr->command) + strlen(command) + 2;
867 sprintf(new, "%s\n%s", psPtr->command, command);
868 ckfree((char *) psPtr->command);
869 psPtr->command = new;
871 if (psPtr->command != NULL) {
872 ckfree((char *) psPtr->command);
874 psPtr->command = (char *) ckalloc((unsigned) (strlen(command) + 1));
875 strcpy(psPtr->command, command);
909 PatSeq *psPtr, *prevPtr;
913 psPtr = FindSequence(interp, &bindPtr->patternTable, object, eventString,
915 if (psPtr == NULL) {
930 if (prevPtr == psPtr) {
931 Tcl_SetHashValue(hPtr, psPtr->nextObjPtr);
937 if (prevPtr->nextObjPtr == psPtr) {
938 prevPtr->nextObjPtr = psPtr->nextObjPtr;
943 prevPtr = (PatSeq *) Tcl_GetHashValue(psPtr->hPtr);
944 if (prevPtr == psPtr) {
945 if (psPtr->nextSeqPtr == NULL) {
946 Tcl_DeleteHashEntry(psPtr->hPtr);
948 Tcl_SetHashValue(psPtr->hPtr, psPtr->nextSeqPtr);
955 if (prevPtr->nextSeqPtr == psPtr) {
956 prevPtr->nextSeqPtr = psPtr->nextSeqPtr;
961 ckfree((char *) psPtr->command);
962 ckfree((char *) psPtr);
1000 PatSeq *psPtr;
1003 psPtr = FindSequence(interp, &bindPtr->patternTable, object, eventString,
1005 if (psPtr == NULL) {
1008 return psPtr->command;
1042 PatSeq *psPtr;
1051 for (psPtr = (PatSeq *) Tcl_GetHashValue(hPtr); psPtr != NULL;
1052 psPtr = psPtr->nextObjPtr) {
1059 GetPatternString(psPtr, &ds);
1091 PatSeq *psPtr, *prevPtr;
1099 for (psPtr = (PatSeq *) Tcl_GetHashValue(hPtr); psPtr != NULL;
1100 psPtr = nextPtr) {
1101 nextPtr = psPtr->nextObjPtr;
1109 prevPtr = (PatSeq *) Tcl_GetHashValue(psPtr->hPtr);
1110 if (prevPtr == psPtr) {
1111 if (psPtr->nextSeqPtr == NULL) {
1112 Tcl_DeleteHashEntry(psPtr->hPtr);
1114 Tcl_SetHashValue(psPtr->hPtr, psPtr->nextSeqPtr);
1121 if (prevPtr->nextSeqPtr == psPtr) {
1122 prevPtr->nextSeqPtr = psPtr->nextSeqPtr;
1127 ckfree((char *) psPtr->command);
1128 ckfree((char *) psPtr);
1484 * use, "object" is NULL and psPtr is a list of pattern sequences,
1489 * In the second case, psPtr is a list of pattern sequences, each
1500 * at psPtr that match the event list and object. If a pattern
1510 MatchPatterns(dispPtr, bindPtr, psPtr, bestPtr, object, bestCommandPtr)
1514 PatSeq *psPtr; /* List of pattern sequences. */
1518 ClientData object; /* If NULL, the sequences at psPtr
1520 * non-NULL, the sequences at psPtr correspond
1538 for ( ; psPtr != NULL; psPtr = psPtr->nextSeqPtr) {
1554 patPtr = psPtr->pats;
1555 patCount = psPtr->numPats;
1661 if (psPtr->flags & PAT_NEARBY) {
1692 matchPtr = psPtr;
1706 voPtr = psPtr->voPtr;
2366 PatSeq *psPtr, *nextPtr;
2370 psPtr = (PatSeq *) Tcl_GetHashValue(hPtr);
2371 for ( ; psPtr != NULL; psPtr = nextPtr) {
2372 nextPtr = psPtr->nextSeqPtr;
2373 ckfree((char *) psPtr->voPtr);
2374 ckfree((char *) psPtr);
2419 PatSeq *psPtr;
2436 psPtr = FindSequence(interp, &vetPtr->patternTable, NULL, eventString,
2438 if (psPtr == NULL) {
2464 if (poPtr->patSeqs[i] == psPtr) {
2472 poPtr->patSeqs[poPtr->numOwned] = psPtr;
2479 voPtr = psPtr->voPtr;
2488 psPtr->voPtr = voPtr;
2565 PatSeq *psPtr = poPtr->patSeqs[iPhys];
2566 if ((eventPSPtr == NULL) || (psPtr == eventPSPtr)) {
2575 voPtr = psPtr->voPtr;
2590 PatSeq *prevPtr = (PatSeq *) Tcl_GetHashValue(psPtr->hPtr);
2591 if (prevPtr == psPtr) {
2592 if (psPtr->nextSeqPtr == NULL) {
2593 Tcl_DeleteHashEntry(psPtr->hPtr);
2595 Tcl_SetHashValue(psPtr->hPtr,
2596 psPtr->nextSeqPtr);
2603 if (prevPtr->nextSeqPtr == psPtr) {
2604 prevPtr->nextSeqPtr = psPtr->nextSeqPtr;
2609 ckfree((char *) psPtr->voPtr);
2610 ckfree((char *) psPtr);
3339 PatSeq *psPtr;
3424 for (psPtr = (PatSeq *) Tcl_GetHashValue(hPtr); psPtr != NULL;
3425 psPtr = psPtr->nextSeqPtr) {
3426 if ((numPats == psPtr->numPats)
3427 && ((flags & PAT_NEARBY) == (psPtr->flags & PAT_NEARBY))
3428 && (memcmp((char *) patPtr, (char *) psPtr->pats,
3442 psPtr = (PatSeq *) ckalloc((unsigned) (sizeof(PatSeq)
3444 psPtr->numPats = numPats;
3445 psPtr->command = NULL;
3446 psPtr->flags = flags;
3447 psPtr->nextSeqPtr = (PatSeq *) Tcl_GetHashValue(hPtr);
3448 psPtr->hPtr = hPtr;
3449 psPtr->voPtr = NULL;
3450 psPtr->nextObjPtr = NULL;
3451 Tcl_SetHashValue(hPtr, psPtr);
3453 memcpy((VOID *) psPtr->pats, (VOID *) patPtr, sequenceSize);
3457 return psPtr;
3738 GetPatternString(psPtr, dsPtr)
3739 PatSeq *psPtr;
3753 for (patsLeft = psPtr->numPats, patPtr = &psPtr->pats[psPtr->numPats - 1];
3761 && ((psPtr->flags & PAT_NEARBY) == 0)
3791 if ((psPtr->flags & PAT_NEARBY) && (patsLeft > 1)