| 1183 | } |
| 1184 | |
| 1185 | int string::find_blank_line(int* left_count /* = NIL */, |
| 1186 | string* out /* = NIL */) |
| 1187 | { |
| 1188 | if (line_state_ == NIL) { |
| 1189 | line_state_ = (ACL_LINE_STATE*) acl_line_state_alloc(); |
| 1190 | } |
| 1191 | |
| 1192 | int len = (int) LEN(vbf_); |
| 1193 | if (line_state_->offset >= len) { |
| 1194 | return -1; |
| 1195 | } |
| 1196 | |
| 1197 | int nleft = len - line_state_->offset; |
| 1198 | char* s = STR(vbf_) + line_state_->offset; |
| 1199 | int ret = acl_find_blank_line(s, nleft, line_state_); |
| 1200 | |
| 1201 | if (left_count != NIL) { |
| 1202 | *left_count = ret; |
| 1203 | } |
| 1204 | |
| 1205 | if (line_state_->finish) { |
| 1206 | acl_line_state_reset(line_state_, line_state_->offset); |
| 1207 | if (out != NIL) { |
| 1208 | out->append(STR(vbf_) + line_state_offset_, |
| 1209 | line_state_->offset - line_state_offset_); |
| 1210 | } |
| 1211 | line_state_offset_ = line_state_->offset; |
| 1212 | |
| 1213 | return line_state_->offset; |
| 1214 | } |
| 1215 | |
| 1216 | return 0; |
| 1217 | } |
| 1218 | |
| 1219 | string& string::find_reset() |
| 1220 | { |
no test coverage detected