mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
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:
parent
4d3af1a2b9
commit
b26a58fd25
4
whois.c
4
whois.c
@ -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 */
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user