version 1.19, 2009/08/13 11:45:29 |
version 1.20, 2009/08/18 08:48:30 |
Line 107 rew_dohalt(int tok, enum man_type type, const struct m |
|
Line 107 rew_dohalt(int tok, enum man_type type, const struct m |
|
|
|
switch (tok) { |
switch (tok) { |
case (MAN_SH): |
case (MAN_SH): |
/* Break at root. */ |
/* Rewind to ourselves. */ |
if (type == n->type && tok == n->tok) |
if (type == n->type && tok == n->tok) |
return(REW_REWIND); |
return(REW_REWIND); |
break; |
break; |
case (MAN_SS): |
case (MAN_SS): |
/* Break at section. */ |
/* Rewind to ourselves. */ |
if (type == n->type && tok == n->tok) |
if (type == n->type && tok == n->tok) |
return(REW_REWIND); |
return(REW_REWIND); |
if (MAN_BODY == n->type && MAN_SH == n->tok) |
/* Rewind to a section, if a block. */ |
|
if (MAN_BLOCK == type && MAN_SH == n->parent->tok && |
|
MAN_BODY == n->parent->type) |
|
return(REW_REWIND); |
|
/* Don't go beyond a section. */ |
|
if (MAN_SH == n->tok) |
return(REW_HALT); |
return(REW_HALT); |
break; |
break; |
default: |
default: |
/* Break at subsection. */ |
/* Rewind to ourselves. */ |
if (type == n->type && tok == n->tok) |
if (type == n->type && tok == n->tok) |
return(REW_REWIND); |
return(REW_REWIND); |
if (MAN_BODY == n->type && MAN_SS == n->tok) |
/* Rewind to a subsection, if a block. */ |
|
if (MAN_BLOCK == type && MAN_SS == n->parent->tok && |
|
MAN_BODY == n->parent->type) |
|
return(REW_REWIND); |
|
/* Don't go beyond a subsection. */ |
|
if (MAN_SS == n->tok) |
return(REW_HALT); |
return(REW_HALT); |
if (MAN_BODY == n->type && MAN_SH == n->tok) |
/* Rewind to a section, if a block. */ |
|
if (MAN_BLOCK == type && MAN_SH == n->parent->tok && |
|
MAN_BODY == n->parent->type) |
|
return(REW_REWIND); |
|
/* Don't go beyond a section. */ |
|
if (MAN_SH == n->tok) |
return(REW_HALT); |
return(REW_HALT); |
break; |
break; |
} |
} |