MCPcopy Create free account
hub / github.com/SimHacker/micropolis / TkBTreeRemoveAnnotation

Function TkBTreeRemoveAnnotation

micropolis-activity/src/tk/tktxbtre.c:949–972  ·  view source on GitHub ↗

ARGSUSED */

(annotPtr)

Source from the content-addressed store, hash-verified

947 * Results:
948 * None.
949 *
950 * Side effects:
951 * AnnotPtr will be unlinked from its tree. Note: it is up to the
952 * caller to free the storage for annotPtr, if that is desired.
953 *
954 *----------------------------------------------------------------------
955 */
956
957 /* ARGSUSED */
958void
959TkBTreeRemoveAnnotation(annotPtr)
960 TkAnnotation *annotPtr; /* Pointer to annotation, which must
961 * have been linked into tree by a previous
962 * call to TkBTreeAddAnnotation. */
963{
964 register TkAnnotation *prevPtr;
965
966 if (annotPtr->linePtr->annotPtr == annotPtr) {
967 annotPtr->linePtr->annotPtr = annotPtr->nextPtr;
968 } else {
969 for (prevPtr = annotPtr->linePtr->annotPtr;
970/* BUG: fixed by dhopkins, prevPtr was null!
971 prevPtr->nextPtr != annotPtr;
972*/
973 (prevPtr != NULL) && (prevPtr->nextPtr != annotPtr);
974 prevPtr = prevPtr->nextPtr) {
975 /* Empty loop body. */

Callers 4

TkTextPickCurrentFunction · 0.85
TkBTreeDeleteCharsFunction · 0.85
TextMarkCmdFunction · 0.85
tktext.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected