Support hiding multiple disclaimers blocks

Correctly detecting the disclaimers of some registrars required splitting the
CRSNIC/Verisign detection strings in two parts.
This code makes the program start looking again for new blocks to hide after
the end of the first one.
This commit is contained in:
Marco d'Itri 2015-03-23 04:17:16 +01:00
parent 4d3af1a2b9
commit b26a58fd25

View File

@ -711,13 +711,13 @@ int hide_line(int *hiding, const char *const line)
} else if (*hiding > HIDE_NOT_STARTED) { /* hiding something */
if (*hide_strings[*hiding + 1] == '\0') { /*look for a blank line?*/
if (*line == '\n' || *line == '\r' || *line == '\0') {
*hiding = HIDE_DISABLED; /* stop hiding */
*hiding = HIDE_NOT_STARTED; /* stop hiding */
return 0; /* but do not hide the blank line */
}
} else { /*look for a matching string*/
if (strneq(line, hide_strings[*hiding + 1],
strlen(hide_strings[*hiding + 1]))) {
*hiding = HIDE_DISABLED; /* stop hiding */
*hiding = HIDE_NOT_STARTED; /* stop hiding */
return 1; /* but hide the last line */
}
}