MCPcopy Create free account
hub / github.com/Entware/Entware / set_subtitle

Function set_subtitle

scripts/config/mconf.c:315–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314static struct subtitle_list *subtitles;
315static void set_subtitle(void)
316{
317 struct subtitle_part *sp;
318 struct subtitle_list *pos, *tmp;
319
320 for (pos = subtitles; pos != NULL; pos = tmp) {
321 tmp = pos->next;
322 free(pos);
323 }
324
325 subtitles = NULL;
326 list_for_each_entry(sp, &trail, entries) {
327 if (sp->text) {
328 if (pos) {
329 pos->next = xcalloc(1, sizeof(*pos));
330 pos = pos->next;
331 } else {
332 subtitles = pos = xcalloc(1, sizeof(*pos));
333 }
334 pos->text = sp->text;
335 }
336 }
337
338 set_dialog_subtitles(subtitles);
339}
340
341static void reset_subtitle(void)
342{

Callers 2

search_confFunction · 0.85
confFunction · 0.85

Calls 2

xcallocFunction · 0.85
set_dialog_subtitlesFunction · 0.85

Tested by

no test coverage detected