Mercurial > dnsbl
diff src/scanner.cpp @ 18:041ea016b684
add scanning for bare hostnames
author | carl |
---|---|
date | Fri, 30 Apr 2004 00:32:44 -0700 |
parents | b6a4b72bb96e |
children | b8f5fa3dd5b8 |
line wrap: on
line diff
--- a/src/scanner.cpp Thu Apr 29 22:05:03 2004 -0700 +++ b/src/scanner.cpp Fri Apr 30 00:32:44 2004 -0700 @@ -881,8 +881,7 @@ ////////////////////////////// // host name recognizer case h_end: { - count--; - pending[count] = 0; + pending[--count] = '\0'; // null terminate host name by overwriting the terminator char *tld; for (int i=0; (tld = tlds[i]); i++) { int n = strlen(tld); @@ -900,13 +899,13 @@ } break; ////////////////////////////// - // html tag { discarder - case t_end: + // html tag discarder + case t_end: { st = t_init; - // fall thru + } // fall thru case t_disc: { - count = 0; + count = 0; // discard all characters } break; case t_init: {