comparison src/scanner.cpp @ 74:b7449114ebb0

start coding on new config syntax
author carl
date Sun, 10 Jul 2005 14:19:00 -0700
parents 2b369f7db7bf
children 1142e46be550
comparison
equal deleted inserted replaced
73:2b369f7db7bf 74:b7449114ebb0
1103 } 1103 }
1104 1104
1105 void fsa::error(char *err) { 1105 void fsa::error(char *err) {
1106 count = 0; 1106 count = 0;
1107 st = init; 1107 st = init;
1108 if (err) my_syslog(memory->priv, err); 1108 if (err) my_syslog(memory->get_priv(), err);
1109 } 1109 }
1110 1110
1111 void fsa::pusher() { 1111 void fsa::pusher() {
1112 if (next1) next1->push(pending, count); 1112 if (next1) next1->push(pending, count);
1113 if (next2) next2->push(pending, count); 1113 if (next2) next2->push(pending, count);
1134 char *p3 = strstr((const char *)pending, ".."); 1134 char *p3 = strstr((const char *)pending, "..");
1135 if (p1 && (p1 != p2) & !p3) { 1135 if (p1 && (p1 != p2) & !p3) {
1136 // have two periods, so at least three components, and no empty components 1136 // have two periods, so at least three components, and no empty components
1137 for (int i=0; i<count; i++) pending[i] = tolower(pending[i]); 1137 for (int i=0; i<count; i++) pending[i] = tolower(pending[i]);
1138 // is last component a tld? 1138 // is last component a tld?
1139 string_set::iterator i = memory->tlds->find(p2+1); 1139 string_set::iterator i = memory->get_tlds()->find(p2+1);
1140 if (i != memory->tlds->end()) memory->new_url((char*)pending); 1140 if (i != memory->get_tlds()->end()) memory->new_url((char*)pending);
1141 } 1141 }
1142 } 1142 }
1143 st = h_init; 1143 st = h_init;
1144 } // fall thru 1144 } // fall thru
1145 1145