From b26a58fd25254ea322dfefab7f92aad109ead5e4 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Mon, 23 Mar 2015 04:17:16 +0100 Subject: [PATCH] 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. --- whois.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whois.c b/whois.c index accae8a..903a89d 100644 --- a/whois.c +++ b/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 */ } }