42 const char *font,
int font_size,
43 int color,
int back_color,
44 int bold,
int italic,
int underline,
49 snprintf(header,
sizeof(header),
51 "ScriptType: v4.00+\r\n"
54 "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\r\n"
55 "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"
58 "Format: Layer, Start, End, Text\r\n",
59 font, font_size, color, color, back_color, back_color,
60 -bold, -italic, -underline, alignment);
83 memset(sub, 0,
sizeof(*sub));
89 h = ts/360000; ts -= 360000*h;
90 m = ts/ 6000; ts -= 6000*m;
91 s = ts/ 100; ts -= 100*s;
92 return snprintf(str, strlen,
"%d:%02d:%02d.%02d", h, m, s, ts);
96 int ts_start,
int ts_end,
int raw)
99 char s_start[16], s_end[16], header[48] = {0};
105 len = snprintf(header,
sizeof(header),
"Dialogue: 0,%s,%s,",
109 dlen = strcspn(dialog,
"\n");
110 dlen += dialog[dlen] ==
'\n';