43 const char *font,
int font_size,
44 int color,
int back_color,
45 int bold,
int italic,
int underline,
50 snprintf(header,
sizeof(header),
52 "ScriptType: v4.00+\r\n"
55 "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\r\n"
56 "Style: Default,%s,%d,&H%x,&H%x,&H%x,&H%x,%d,%d,%d,1,1,0,%d,10,10,10,0,0\r\n"
59 "Format: Layer, Start, End, Text\r\n",
60 font, font_size, color, color, back_color, back_color,
61 -bold, -italic, -underline, alignment);
84 memset(sub, 0,
sizeof(*sub));
90 h = ts/360000; ts -= 360000*h;
91 m = ts/ 6000; ts -= 6000*m;
92 s = ts/ 100; ts -= 100*s;
93 return snprintf(str, strlen,
"%d:%02d:%02d.%02d", h, m, s, ts);
97 int ts_start,
int ts_end,
int raw)
100 char s_start[16], s_end[16], header[48] = {0};
106 len = snprintf(header,
sizeof(header),
"Dialogue: 0,%s,%s,",
110 dlen = strcspn(dialog,
"\n");
111 dlen += dialog[dlen] ==
'\n';