set
p
to the next nonnull right subtree to be traversed
p = nextsubtree(&s,&p);