亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? subreader.c

?? sigmadesign smp8623 gui source code ,bingo
?? C
?? 第 1 頁 / 共 4 頁
字號:
		return (subtitle *) ERR;	    jLength = RMasciiLength(directive);	    for (cont = 0; cont < jLength; ++cont) {		if (isalpha(*(directive + cont)))		    *(directive + cont) = toupper(*(directive + cont));	    }	    if ((strstr(directive, "RDB") != NULL)		|| (strstr(directive, "RDC") != NULL)		|| (strstr(directive, "RLB") != NULL)		|| (strstr(directive, "RLG") != NULL)) {		continue;	    }	    if (strstr(directive, "JL") != NULL) {		current->alignment = SUB_ALIGNMENT_BOTTOMLEFT;	    } else if (strstr(directive, "JR") != NULL) {		current->alignment = SUB_ALIGNMENT_BOTTOMRIGHT;	    } else {		current->alignment = SUB_ALIGNMENT_BOTTOMCENTER;	    }	    strcpy(line2, line1);	    p = line2;	}	for (q = line1; (!eol(*p)) && (current->lines < SUB_MAX_TEXT); ++p) {	    switch (*p) {	    case '{':		comment++;		break;	    case '}':		if (comment) {		    --comment;		    //the next line to get rid of a blank after the comment		    if ((*(p + 1)) == ' ')			p++;		}		break;	    case '~':		if (!comment) {		    *q = ' ';		    ++q;		}		break;	    case ' ':	    case '\t':		if ((*(p + 1) == ' ') || (*(p + 1) == '\t'))		    break;		if (!comment) {		    *q = ' ';		    ++q;		}		break;	    case '\\':		if (*(p + 1) == 'n') {		    *q = '\0';		    q = line1;		    current->text[current->lines++] = strdup(line1);		    ++p;		    break;		}		if ((toupper(*(p + 1)) == 'C')		    || (toupper(*(p + 1)) == 'F')) {		    ++p,++p;		    break;		}		if ((*(p + 1) == 'B') || (*(p + 1) == 'b') || (*(p + 1) == 'D') ||	//actually this means "insert current date here"		    (*(p + 1) == 'I') || (*(p + 1) == 'i') || (*(p + 1) == 'N') || (*(p + 1) == 'T') ||	//actually this means "insert current time here"		    (*(p + 1) == 'U') || (*(p + 1) == 'u')) {		    ++p;		    break;		}		if ((*(p + 1) == '\\') ||		    (*(p + 1) == '~') || (*(p + 1) == '{')) {		    ++p;		} else if (eol(*(p + 1))) {		    if (!stream_read_line(st, directive, LINE_LEN))			return NULL;		    trail_space(directive);		    strncat(line2, directive,			    (LINE_LEN > 511) ? LINE_LEN : 511);		    break;		}	    default:		if (!comment) {		    *q = *p;		    ++q;		}	    }			//-- switch	}			//-- for	*q = '\0';	current->text[current->lines] = strdup(line1);    }				//-- while    current->lines++;    return current;}static int sub_autodetect (stream_t* st, RMint32 *uses_time) {    RMascii line[LINE_LEN+1];    int i,j=0;    RMascii p;    while (j < 100) {	j++;	if (!stream_read_line (st, line, LINE_LEN))	    return SUB_INVALID;	if (sscanf (line, "{%d}{%d}", &i, &i)==2)		{*uses_time=0;return SUB_MICRODVD;}	if (sscanf (line, "{%d}{}", &i)==1)		{*uses_time=0;return SUB_MICRODVD;}	if (sscanf (line, "[%d][%d]", &i, &i)==2)		{*uses_time=1;return SUB_MPL2;}	if (sscanf (line, "%d:%d:%d.%d,%d:%d:%d.%d",     &i, &i, &i, &i, &i, &i, &i, &i)==8)		{*uses_time=1;return SUB_SUBRIP;}	if (sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d", &i, &i, &i, (RMascii *)&i, &i, &i, &i, &i, (RMascii *)&i, &i)==10)		{*uses_time=1;return SUB_SUBVIEWER;}	if (sscanf (line, "{T %d:%d:%d:%d",&i, &i, &i, &i)==4)		{*uses_time=1;return SUB_SUBVIEWER2;}	if (strstr (line, "<SAMI>"))		{*uses_time=1; return SUB_SAMI;}	if (sscanf(line, "%d:%d:%d.%d %d:%d:%d.%d", &i, &i, &i, &i, &i, &i, &i, &i) == 8)		{*uses_time = 1; return SUB_JACOSUB;}	if (sscanf(line, "@%d @%d", &i, &i) == 2)		{*uses_time = 1; return SUB_JACOSUB;}	if (sscanf (line, "%d:%d:%d:",     &i, &i, &i )==3)		{*uses_time=1;return SUB_VPLAYER;}	if (sscanf (line, "%d:%d:%d ",     &i, &i, &i )==3)		{*uses_time=1;return SUB_VPLAYER;}	//TODO: just checking if first line of sub starts with "<" is WAY	// too weak test for RT	// Please someone who knows the format of RT... FIX IT!!!	// It may conflict with other sub formats in the future (actually it doesn't)	if ( *line == '<' )		{*uses_time=1;return SUB_RT;}	if (!RMMemcmp(line, "Dialogue: Marked", 16))		{*uses_time=1; return SUB_SSA;}	if (!RMMemcmp(line, "Dialogue: ", 10))		{*uses_time=1; return SUB_SSA;}	if (sscanf (line, "%d,%d,\"%c", &i, &i, (RMascii *) &i) == 3)		{*uses_time=1;return SUB_PJS;}	if (sscanf (line, "FORMAT=%d", &i) == 1)		{*uses_time=0; return SUB_MPSUB;}	if (sscanf (line, "FORMAT=TIM%c", &p)==1 && p=='E')		{*uses_time=1; return SUB_MPSUB;}	if (strstr (line, "-->>"))		{*uses_time=0; return SUB_AQTITLE;}	if (sscanf (line, "[%d:%d:%d]", &i, &i, &i)==3)		{*uses_time=1;return SUB_SUBRIP09;}    }    return SUB_INVALID;  // too many bad lines}#ifdef DUMPSUBSint sub_utf8=0;#elseextern int sub_utf8;int sub_utf8_prev=0;#endifRMreal sub_delay= 0.0;RMreal sub_fps = 25;#ifdef USE_ICONVstatic iconv_t icdsc = (iconv_t)(-1);void	subcp_open (stream_t *st){	RMascii *tocp = "UTF-8";	if (sub_cp){		RMascii *cp_tmp = sub_cp;#ifdef HAVE_ENCA		RMascii enca_lang[3], enca_fallback[100];		int free_cp_tmp = 0;		if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2		     || sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {		  if (st && st->flags & STREAM_SEEK ) {		    cp_tmp = guess_cp(st, enca_lang, enca_fallback);		    free_cp_tmp = 1;		  } else {		    cp_tmp = enca_fallback;		  }		}#endif		if ((icdsc = iconv_open (tocp, cp_tmp)) != (iconv_t)(-1)){			sub_utf8 = 2;		}#ifdef HAVE_ENCA		if (free_cp_tmp && cp_tmp) RFREE(cp_tmp);#endif	}}void	subcp_close (void){	if (icdsc != (iconv_t)(-1)){		(void) iconv_close (icdsc);		icdsc = (iconv_t)(-1);	}}subtitle* subcp_recode (subtitle *sub){	int l=sub->lines;	size_t ileft, oleft;	RMascii *op, *ip, *ot;	if(icdsc == (iconv_t)(-1)) return sub;	while (l){		ip = sub->text[--l];		ileft = RMasciiLength(ip);		oleft = 4 * ileft;		if (!(ot = MALLOC(oleft + 1))){		   	continue;		}		op = ot;		if (iconv(icdsc, &ip, &ileft,			  &op, &oleft) == (size_t)(-1)) {			RFREE(ot);			continue;		}		*op='\0' ;		RFREE (sub->text[l]);		sub->text[l] = ot;	}	return sub;}#endif#ifdef USE_FRIBIDI#ifndef max#define max(a,b)  (((a)>(b))?(a):(b))#endifsubtitle* sub_fribidi (subtitle *sub, int sub_utf8){  FriBidiChar logical[LINE_LEN+1], visual[LINE_LEN+1]; // Hopefully these two won't smash the stack  RMascii        *ip      = NULL, *op     = NULL;  FriBidiCharType base;  size_t len,orig_len;  int l=sub->lines;  int char_set_num;  fribidi_boolean log2vis;  if(flip_hebrew) { // Please fix the indentation someday  fribidi_set_mirroring(1);  fribidi_set_reorder_nsm(0);  if( sub_utf8 == 0 ) {    char_set_num = fribidi_parse_charset (fribidi_charset?fribidi_charset:"ISO8859-8");  }else {    char_set_num = fribidi_parse_charset ("UTF-8");  }  while (l) {    ip = sub->text[--l];    orig_len = len = RMasciiLength( ip ); // We assume that we don't use full unicode, only UTF-8 or ISO8859-x    if(len > LINE_LEN) {      l++;      break;    }    len = fribidi_charset_to_unicode (char_set_num, ip, len, logical);    base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L;    log2vis = fribidi_log2vis (logical, len, &base,			       /* output */			       visual, NULL, NULL, NULL);    if(log2vis) {      len = fribidi_remove_bidi_marks (visual, len, NULL, NULL,				       NULL);      if((op = MALLOC((max(2*orig_len,2*len) + 1))) == NULL) {	l++;	break;      }      fribidi_unicode_to_charset ( char_set_num, visual, len,op);      RFREE (ip);      sub->text[l] = op;    }  }  if (l){    for (l = sub->lines; l;)      RFREE (sub->text[--l]);    return ERR;  }  }  return sub;}#endifstatic void adjust_subs_time(subtitle* sub, RMreal subtime, RMreal fps, int block,                             int sub_num, int sub_uses_time) {//	int n,m;//	subtitle* nextsub;//	int i = sub_num;//	RMuint32 subfms = (sub_uses_time ? 100 : fps) * subtime;//	RMuint32 overlap = (sub_uses_time ? 100 : fps) / 5; // 0.2s////	n=m=0;//	if (i)	for (;;){//		if (sub->end <= sub->start){//			sub->end = sub->start + subfms;//			m++;//			n++;//		}//		if (!--i) break;//		nextsub = sub + 1;//	    if(block){//		if ((sub->end > nextsub->start) && (sub->end <= nextsub->start + overlap)) {//		    // these subtitles overlap for less than 0.2 seconds//		    // and would result in very short overlapping subtitle//		    // so let's fix the problem here, before overlapping code//		    // get its hands on them//		    unsigned delta = sub->end - nextsub->start, half = delta / 2;//		    sub->end -= half + 1;//		    nextsub->start += delta - half;//		}//		if (sub->end >= nextsub->start){//			sub->end = nextsub->start - 1;//			if (sub->end - sub->start > subfms)//				sub->end = sub->start + subfms;//			if (!m)//				n++;//		}//	    }////		/* Theory://		 * Movies are often converted from FILM (24 fps)//		 * to PAL (25) by simply speeding it up, so we//		 * to multiply the original timestmaps by//		 * (Movie's FPS / Subtitle's (guessed) FPS)//		 * so eg. for 23.98 fps movie and PAL time based//		 * subtitles we say -subfps 25 and we're fine!//		 */////		/* timed sub fps correction ::atmos */////		if(sub_uses_time && sub_fps) {////			sub->start *= sub_fps/fps;////			sub->end   *= sub_fps/fps;////		}////		sub = nextsub;//		m = 0;//	}}struct subreader {    subtitle * (*read)(stream_t *st,subtitle *dest);    void       (*post)(subtitle *dest);    const RMascii *name;};sub_data* sub_read_file (RMascii *filename, RMreal fps) {    stream_t* fd;    RMint32 n_max, i;    subtitle *first, *sub, *return_sub;    sub_data *subt_data;    RMint32 uses_time = 0, sub_num = 0, sub_errs = 0;    struct subreader sr[]=    {	    { sub_read_line_microdvd, NULL, "microdvd" },	    { sub_read_line_subrip, NULL, "subrip" },	    { sub_read_line_subviewer, NULL, "subviewer" },	    { sub_read_line_sami, NULL, "sami" },	    { sub_read_line_vplayer, NULL, "vplayer" },	    { sub_read_line_rt, NULL, "rt" },	    { sub_read_line_ssa, sub_pp_ssa, "ssa" },	    { sub_read_line_pjs, NULL, "pjs" },	    { sub_read_line_aqt, NULL, "aqt" },	    { sub_read_line_subviewer2, NULL, "subviewer 2.0" },	    { sub_read_line_subrip09, NULL, "subrip 0.9" },	    { sub_read_line_jacosub, NULL, "jacosub" },	    { sub_read_line_mpl2, NULL, "mpl2" }    };    struct subreader *srp;    if(filename==NULL) return NULL; //qnx segfault    i = 0;    fd=open_stream_gfx (filename, NULL, &i); if (!fd) return NULL;    sub_format=sub_autodetect (fd, &uses_time);    mpsub_multiplier = (uses_time ? 100.0 : 1.0);    if (sub_format==SUB_INVALID) {free_stream(fd); return NULL;}    srp=sr+sub_format;    stream_reset(fd);    stream_seek(fd,0);    sub_num=0;n_max=512;    first=MALLOC(n_max*sizeof(subtitle));    if(!first){	    return NULL;    }    while(1){        if(sub_num>=n_max){        	subtitle* _t;  //      	RMuint32 _g = n_max;  //      	RMuint32 g, h;            n_max+=32;            _t = MALLOC(n_max*sizeof(subtitle)); //           printf("sub num: %d", (RMuint16) sub_num);            RMMemcpy(_t, first, (sub_num) * sizeof(subtitle));  //          for(g = 0; g < (RMuint32)(sub_num - 1); g++)   //         	for(h = 0; h < first[g].lines; h ++)    //        		RFREE(first[g].text[h]);            RFREE(first);            first = _t;            _t = NULL;// //           first=realloc(first,n_max*sizeof(subtitle));        }		sub = &first[sub_num];		RMMemset(sub, '\0', sizeof(subtitle));//		sub = NULL;	   	sub=srp->read(fd,sub);    	if(!sub) break;   // EOF		if ( sub == ERR )		{		//	printf("error\n");    		if ( first ) RFREE(first);	 		return NULL;	 	}        	// Apply any post processing that needs recoding first        if ((sub!=ERR) && !sub_no_text_pp && srp->post) srp->post(sub);        if(sub==ERR) ++sub_errs; else ++sub_num; // Error vs. Valid    }    free_stream(fd);//    printf ("SUB: Subtitle format %s time.\n", uses_time?"uses":"doesn't use");    if(sub_num<=0){	RFREE(first);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久欧美一区二区| 久久久久久亚洲综合影院红桃 | 一区二区三区中文免费| 蜜乳av一区二区| 91在线云播放| 久久久久久久久久久电影| 亚洲午夜私人影院| 成人高清在线视频| 欧美成人性福生活免费看| 一区二区三区欧美视频| 91在线观看成人| 日韩三级av在线播放| 一区二区三区不卡视频| av中文一区二区三区| 久久综合久久综合亚洲| 日本女优在线视频一区二区| 91浏览器在线视频| 国产精品久久久久一区二区三区| 免费观看久久久4p| 欧美精品视频www在线观看| 亚洲综合久久av| 色视频一区二区| 国产精品入口麻豆九色| 国产一区二区三区美女| 欧美大片国产精品| 日本中文一区二区三区| 欧美精品日韩精品| 日日摸夜夜添夜夜添精品视频| 欧美亚洲免费在线一区| 亚洲影视在线播放| 欧美视频日韩视频| 亚洲国产另类av| 欧美影视一区在线| 一区二区三区国产豹纹内裤在线| 色先锋久久av资源部| 一区二区三区在线观看欧美| 色天天综合色天天久久| 亚洲色图一区二区| 欧美伊人久久久久久久久影院| 夜夜亚洲天天久久| 欧美精品 国产精品| 蜜桃视频免费观看一区| 精品国产91乱码一区二区三区 | 亚洲视频一区二区在线观看| 国产成人精品影视| 国产欧美一区二区精品秋霞影院| 波多野结衣在线aⅴ中文字幕不卡| 国产精品情趣视频| 日本高清视频一区二区| 亚洲国产综合视频在线观看| 69堂国产成人免费视频| 久久99精品国产麻豆婷婷洗澡| 日韩精品一区二| 成熟亚洲日本毛茸茸凸凹| 亚洲人成精品久久久久| 欧美久久久影院| 麻豆国产一区二区| 国产精品久久久久久久久免费桃花 | 秋霞午夜av一区二区三区| 欧美一级黄色大片| 国产a区久久久| 亚洲欧美日韩久久| 欧美一区二区三区人| 国产毛片一区二区| 欧美96一区二区免费视频| 精品国产乱码久久久久久久| 99精品欧美一区二区三区小说 | 97se狠狠狠综合亚洲狠狠| 五月婷婷激情综合| 国产午夜一区二区三区| 欧美亚洲综合另类| 国产露脸91国语对白| 亚洲一区二区三区四区在线观看 | 国产免费观看久久| 欧美唯美清纯偷拍| 国产精品一区免费在线观看| 一区二区在线电影| 久久久美女毛片| 8v天堂国产在线一区二区| 大胆亚洲人体视频| 免费日本视频一区| 亚洲美女视频在线| 国产亚洲欧美在线| 91精品国产欧美一区二区成人| 成人免费福利片| 精品亚洲免费视频| 亚洲成人资源在线| 国产精品欧美一级免费| 欧美一级二级三级蜜桃| 色综合久久久久综合体桃花网| 国产在线观看免费一区| 亚洲高清久久久| 国产精品白丝在线| 精品国产一二三| 制服.丝袜.亚洲.中文.综合| 91年精品国产| 成人免费视频app| 激情图片小说一区| 男女性色大片免费观看一区二区 | 国产精品乱人伦中文| 精品黑人一区二区三区久久| 欧美日韩国产bt| 在线视频国内一区二区| 99这里都是精品| av在线播放不卡| 成人aaaa免费全部观看| 国产一区二区三区香蕉| 久久精品国产99久久6| 美女视频免费一区| 日本亚洲免费观看| 日韩高清欧美激情| 日日噜噜夜夜狠狠视频欧美人| 亚洲成av人影院在线观看网| 亚洲综合网站在线观看| 一区二区三区在线不卡| 亚洲精品高清在线观看| 亚洲免费色视频| 一区二区三区在线免费视频| 亚洲自拍偷拍九九九| 亚洲午夜激情av| 视频一区二区欧美| 捆绑调教一区二区三区| 国产自产v一区二区三区c| 国产传媒日韩欧美成人| 成人av网站在线| 91精品福利在线| 欧美日韩中字一区| 欧美伦理电影网| 欧美成人a视频| 国产欧美日韩久久| ...中文天堂在线一区| 有码一区二区三区| 午夜一区二区三区视频| 免费成人小视频| 国产成人精品亚洲777人妖| 不卡的av网站| 欧美日本韩国一区| 日韩精品中文字幕一区二区三区| 久久在线观看免费| 中文字幕在线一区二区三区| 亚洲美女视频一区| 美女精品一区二区| voyeur盗摄精品| 欧美日韩精品一区二区天天拍小说 | 国产在线播精品第三| 成人av片在线观看| 欧美日韩在线不卡| 精品sm在线观看| 亚洲麻豆国产自偷在线| 美女一区二区视频| 99久久精品国产导航| 欧美一卡2卡3卡4卡| 国产精品福利一区| 免费人成精品欧美精品| av亚洲精华国产精华精| 欧美一区二区黄| 亚洲欧美日韩人成在线播放| 久久成人免费网站| 91福利精品视频| 久久久久久综合| 日韩电影在线观看电影| 成人高清av在线| 日韩久久免费av| 亚洲另类中文字| 国产成人综合在线播放| 欧美少妇性性性| 国产精品久久久久一区二区三区 | 日韩欧美国产小视频| 亚洲精品v日韩精品| 国内欧美视频一区二区 | 久久久99久久| 亚洲成人黄色小说| 不卡的电影网站| 国产日产亚洲精品系列| 日本不卡高清视频| 91国产精品成人| 成人欧美一区二区三区在线播放| 九九九精品视频| 欧美日韩高清影院| 一区二区三区在线视频观看 | 欧美福利视频一区| 亚洲色图欧洲色图婷婷| 国产精品资源网| 精品国产乱码久久久久久1区2区| 无吗不卡中文字幕| 欧美性欧美巨大黑白大战| 亚洲欧洲99久久| 成人高清免费在线播放| 国产欧美1区2区3区| 国产一区二区不卡在线 | 一区二区三区在线观看动漫| 成人爱爱电影网址| 国产女人18毛片水真多成人如厕 | 欧美日韩成人综合在线一区二区 | 欧美精选一区二区| 亚洲一卡二卡三卡四卡无卡久久| 色综合久久综合网| 亚洲激情av在线| 日本韩国精品一区二区在线观看| 一区二区三区四区激情|