/* Given a string, return true iff it exists in the list. */ bool lists_strs_exists (lists_t_strs *list, const char *sought) { bool result = false; assert (list); assert (sought); if (lists_strs_find (list, sought) < lists_strs_size (list)) result = true; return result; }
/* Return a string of concatenated driver names. */ static char *list_decoder_names (int *decoder_list, int count) { int ix; char *result; lists_t_strs *names; if (count == 0) return xstrdup (""); names = lists_strs_new (count); for (ix = 0; ix < count; ix += 1) lists_strs_append (names, plugins[decoder_list[ix]].name); if (have_tremor) { ix = lists_strs_find (names, "vorbis"); if (ix < lists_strs_size (names)) lists_strs_replace (names, ix, "vorbis(tremor)"); } result = lists_strs_fmt (names, " %s"); lists_strs_free (names); return result; }