}\r
\r
int r, s;\r
+ if (x == Root() || (next_sibling(Par,x) == -1 ))\r
+ return NULLT;\r
+ \r
r = (int) Tags->rank(tag, node2tagpos(next_sibling(Par, x))-1);\r
s = (int) Tags->select(tag, r+1); // select returns -1 in case that there is no r+1-th tag.\r
if (s==-1) return NULLT;\r