| 278 | } |
| 279 | |
| 280 | int list_cmp( LIST * t, LIST * s ) |
| 281 | { |
| 282 | int status = 0; |
| 283 | LISTITER t_it = list_begin( t ); |
| 284 | LISTITER const t_end = list_end( t ); |
| 285 | LISTITER s_it = list_begin( s ); |
| 286 | LISTITER const s_end = list_end( s ); |
| 287 | |
| 288 | while ( !status && ( t_it != t_end || s_it != s_end ) ) |
| 289 | { |
| 290 | char const * st = t_it != t_end ? object_str( list_item( t_it ) ) : ""; |
| 291 | char const * ss = s_it != s_end ? object_str( list_item( s_it ) ) : ""; |
| 292 | |
| 293 | status = strcmp( st, ss ); |
| 294 | |
| 295 | t_it = t_it != t_end ? list_next( t_it ) : t_it; |
| 296 | s_it = s_it != s_end ? list_next( s_it ) : s_it; |
| 297 | } |
| 298 | |
| 299 | return status; |
| 300 | } |
| 301 | |
| 302 | int list_is_sublist( LIST * sub, LIST * l ) |
| 303 | { |
no test coverage detected