Added lg_add_pattern_list to C API.