[MPlayer-cvslog] r28753 - in trunk/libass: ass_render.c ass_utils.c ass_utils.h

eugeni subversion at mplayerhq.hu
Sat Feb 28 00:06:50 CET 2009


Author: eugeni
Date: Sat Feb 28 00:06:50 2009
New Revision: 28753

Log:
Remove unused function argument.

Modified:
   trunk/libass/ass_render.c
   trunk/libass/ass_utils.c
   trunk/libass/ass_utils.h

Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	Sat Feb 28 00:06:47 2009	(r28752)
+++ trunk/libass/ass_render.c	Sat Feb 28 00:06:50 2009	(r28753)
@@ -702,31 +702,31 @@ static char* parse_tag(char* p, double p
 			mp_msg(MSGT_ASS, MSGL_V, "stub: \\ybord%.2f\n", val);
 	} else if (mystrcmp(&p, "xshad")) {
 		int val;
-		if (mystrtoi(&p, 10, &val))
+		if (mystrtoi(&p, &val))
 			mp_msg(MSGT_ASS, MSGL_V, "stub: \\xshad%d\n", val);
 	} else if (mystrcmp(&p, "yshad")) {
 		int val;
-		if (mystrtoi(&p, 10, &val))
+		if (mystrtoi(&p, &val))
 			mp_msg(MSGT_ASS, MSGL_V, "stub: \\yshad%d\n", val);
 	} else if (mystrcmp(&p, "fax")) {
 		int val;
-		if (mystrtoi(&p, 10, &val))
+		if (mystrtoi(&p, &val))
 			mp_msg(MSGT_ASS, MSGL_V, "stub: \\fax%d\n", val);
 	} else if (mystrcmp(&p, "fay")) {
 		int val;
-		if (mystrtoi(&p, 10, &val))
+		if (mystrtoi(&p, &val))
 			mp_msg(MSGT_ASS, MSGL_V, "stub: \\fay%d\n", val);
 	} else if (mystrcmp(&p, "iclip")) {
 		int x0, y0, x1, y1;
 		int res = 1;
 		skip('(');
-		res &= mystrtoi(&p, 10, &x0);
+		res &= mystrtoi(&p, &x0);
 		skip(',');
-		res &= mystrtoi(&p, 10, &y0);
+		res &= mystrtoi(&p, &y0);
 		skip(',');
-		res &= mystrtoi(&p, 10, &x1);
+		res &= mystrtoi(&p, &x1);
 		skip(',');
-		res &= mystrtoi(&p, 10, &y1);
+		res &= mystrtoi(&p, &y1);
 		skip(')');
 		mp_msg(MSGT_ASS, MSGL_V, "stub: \\iclip(%d,%d,%d,%d)\n", x0, y0, x1, y1);
 	} else if (mystrcmp(&p, "blur")) {
@@ -781,18 +781,18 @@ static char* parse_tag(char* p, double p
 		double x, y;
 		double k;
 		skip('(');
-		mystrtoi(&p, 10, &x1);
+		mystrtoi(&p, &x1);
 		skip(',');
-		mystrtoi(&p, 10, &y1);
+		mystrtoi(&p, &y1);
 		skip(',');
-		mystrtoi(&p, 10, &x2);
+		mystrtoi(&p, &x2);
 		skip(',');
-		mystrtoi(&p, 10, &y2);
+		mystrtoi(&p, &y2);
 		if (*p == ',') {
 			skip(',');
-			mystrtoll(&p, 10, &t1);
+			mystrtoll(&p, &t1);
 			skip(',');
-			mystrtoll(&p, 10, &t2);
+			mystrtoll(&p, &t2);
 			mp_msg(MSGT_ASS, MSGL_DBG2, "movement6: (%d, %d) -> (%d, %d), (%" PRId64 " .. %" PRId64 ")\n", 
 				x1, y1, x2, y2, (int64_t)t1, (int64_t)t2);
 		} else {
@@ -867,7 +867,7 @@ static char* parse_tag(char* p, double p
 		// FIXME: simplify
 	} else if (mystrcmp(&p, "an")) {
 		int val;
-		if (mystrtoi(&p, 10, &val) && val) {
+		if (mystrtoi(&p, &val) && val) {
 			int v = (val - 1) / 3; // 0, 1 or 2 for vertical alignment
 			mp_msg(MSGT_ASS, MSGL_DBG2, "an %d\n", val);
 			if (v != 0) v = 3 - v;
@@ -879,16 +879,16 @@ static char* parse_tag(char* p, double p
 			render_context.alignment = render_context.style->Alignment;
 	} else if (mystrcmp(&p, "a")) {
 		int val;
-		if (mystrtoi(&p, 10, &val) && val)
+		if (mystrtoi(&p, &val) && val)
 			render_context.alignment = val;
 		else
 			render_context.alignment = render_context.style->Alignment;
 	} else if (mystrcmp(&p, "pos")) {
 		int v1, v2;
 		skip('(');
-		mystrtoi(&p, 10, &v1);
+		mystrtoi(&p, &v1);
 		skip(',');
-		mystrtoi(&p, 10, &v2);
+		mystrtoi(&p, &v2);
 		skip(')');
 		mp_msg(MSGT_ASS, MSGL_DBG2, "pos(%d, %d)\n", v1, v2);
 		if (render_context.evt_type != EVENT_POSITIONED) {
@@ -902,9 +902,9 @@ static char* parse_tag(char* p, double p
 		long long t1, t2, t3, t4;
 		if (*p == 'e') ++p; // either \fad or \fade
 		skip('(');
-		mystrtoi(&p, 10, &a1);
+		mystrtoi(&p, &a1);
 		skip(',');
-		mystrtoi(&p, 10, &a2);
+		mystrtoi(&p, &a2);
 		if (*p == ')') {
 			// 2-argument version (\fad, according to specs)
 			// a1 and a2 are fade-in and fade-out durations
@@ -919,24 +919,24 @@ static char* parse_tag(char* p, double p
 			// 6-argument version (\fade)
 			// a1 and a2 (and a3) are opacity values
 			skip(',');
-			mystrtoi(&p, 10, &a3);
+			mystrtoi(&p, &a3);
 			skip(',');
-			mystrtoll(&p, 10, &t1);
+			mystrtoll(&p, &t1);
 			skip(',');
-			mystrtoll(&p, 10, &t2);
+			mystrtoll(&p, &t2);
 			skip(',');
-			mystrtoll(&p, 10, &t3);
+			mystrtoll(&p, &t3);
 			skip(',');
-			mystrtoll(&p, 10, &t4);
+			mystrtoll(&p, &t4);
 		}
 		skip(')');
 		render_context.fade = interpolate_alpha(frame_context.time - render_context.event->Start, t1, t2, t3, t4, a1, a2, a3);
 	} else if (mystrcmp(&p, "org")) {
 		int v1, v2;
 		skip('(');
-		mystrtoi(&p, 10, &v1);
+		mystrtoi(&p, &v1);
 		skip(',');
-		mystrtoi(&p, 10, &v2);
+		mystrtoi(&p, &v2);
 		skip(')');
 		mp_msg(MSGT_ASS, MSGL_DBG2, "org(%d, %d)\n", v1, v2);
 		//				render_context.evt_type = EVENT_POSITIONED;
@@ -990,13 +990,13 @@ static char* parse_tag(char* p, double p
 		int x0, y0, x1, y1;
 		int res = 1;
 		skip('(');
-		res &= mystrtoi(&p, 10, &x0);
+		res &= mystrtoi(&p, &x0);
 		skip(',');
-		res &= mystrtoi(&p, 10, &y0);
+		res &= mystrtoi(&p, &y0);
 		skip(',');
-		res &= mystrtoi(&p, 10, &x1);
+		res &= mystrtoi(&p, &x1);
 		skip(',');
-		res &= mystrtoi(&p, 10, &y1);
+		res &= mystrtoi(&p, &y1);
 		skip(')');
 		if (res) {
 			render_context.clip_x0 = render_context.clip_x0 * (1-pwr) + x0 * pwr;
@@ -1039,7 +1039,7 @@ static char* parse_tag(char* p, double p
 		reset_render_context();
 	} else if (mystrcmp(&p, "be")) {
 		int val;
-		if (mystrtoi(&p, 10, &val)) {
+		if (mystrtoi(&p, &val)) {
 			// Clamp to 10, since high values need excessive CPU
 			val = (val < 0) ? 0 : val;
 			val = (val > 10) ? 10 : val;
@@ -1048,7 +1048,7 @@ static char* parse_tag(char* p, double p
 			render_context.be = 0;
 	} else if (mystrcmp(&p, "b")) {
 		int b;
-		if (mystrtoi(&p, 10, &b)) {
+		if (mystrtoi(&p, &b)) {
 			if (pwr >= .5)
 				render_context.bold = b;
 		} else
@@ -1056,7 +1056,7 @@ static char* parse_tag(char* p, double p
 		update_font();
 	} else if (mystrcmp(&p, "i")) {
 		int i;
-		if (mystrtoi(&p, 10, &i)) {
+		if (mystrtoi(&p, &i)) {
 			if (pwr >= .5)
 				render_context.italic = i;
 		} else
@@ -1064,37 +1064,37 @@ static char* parse_tag(char* p, double p
 		update_font();
 	} else if (mystrcmp(&p, "kf") || mystrcmp(&p, "K")) {
 		int val = 0;
-		mystrtoi(&p, 10, &val);
+		mystrtoi(&p, &val);
 		render_context.effect_type = EF_KARAOKE_KF;
 		if (render_context.effect_timing)
 			render_context.effect_skip_timing += render_context.effect_timing;
 		render_context.effect_timing = val * 10;
 	} else if (mystrcmp(&p, "ko")) {
 		int val = 0;
-		mystrtoi(&p, 10, &val);
+		mystrtoi(&p, &val);
 		render_context.effect_type = EF_KARAOKE_KO;
 		if (render_context.effect_timing)
 			render_context.effect_skip_timing += render_context.effect_timing;
 		render_context.effect_timing = val * 10;
 	} else if (mystrcmp(&p, "k")) {
 		int val = 0;
-		mystrtoi(&p, 10, &val);
+		mystrtoi(&p, &val);
 		render_context.effect_type = EF_KARAOKE;
 		if (render_context.effect_timing)
 			render_context.effect_skip_timing += render_context.effect_timing;
 		render_context.effect_timing = val * 10;
 	} else if (mystrcmp(&p, "shad")) {
 		int val;
-		if (mystrtoi(&p, 10, &val))
+		if (mystrtoi(&p, &val))
 			render_context.shadow = val;
 		else
 			render_context.shadow = render_context.style->Shadow;
 	} else if (mystrcmp(&p, "pbo")) {
 		int val = 0;
-		mystrtoi(&p, 10, &val); // ignored
+		mystrtoi(&p, &val); // ignored
 	} else if (mystrcmp(&p, "p")) {
 		int val;
-		if (!mystrtoi(&p, 10, &val))
+		if (!mystrtoi(&p, &val))
 			val = 0;
 		render_context.drawing_mode = !!val;
 	}

Modified: trunk/libass/ass_utils.c
==============================================================================
--- trunk/libass/ass_utils.c	Sat Feb 28 00:06:47 2009	(r28752)
+++ trunk/libass/ass_utils.c	Sat Feb 28 00:06:50 2009	(r28753)
@@ -30,7 +30,7 @@
 #include "mputils.h"
 #include "ass_utils.h"
 
-int mystrtoi(char** p, int base, int* res)
+int mystrtoi(char** p, int* res)
 {
 	// NOTE: base argument is ignored, but not used in libass anyway
 	double temp_res;
@@ -41,7 +41,7 @@ int mystrtoi(char** p, int base, int* re
 	else return 0;
 }
 
-int mystrtoll(char** p, int base, long long* res)
+int mystrtoll(char** p, long long* res)
 {
 	double temp_res;
 	char* start = *p;

Modified: trunk/libass/ass_utils.h
==============================================================================
--- trunk/libass/ass_utils.h	Sat Feb 28 00:06:47 2009	(r28752)
+++ trunk/libass/ass_utils.h	Sat Feb 28 00:06:50 2009	(r28753)
@@ -25,8 +25,8 @@
 
 #include <stdint.h>
 
-int mystrtoi(char** p, int base, int* res);
-int mystrtoll(char** p, int base, long long* res);
+int mystrtoi(char** p, int* res);
+int mystrtoll(char** p, long long* res);
 int mystrtou32(char** p, int base, uint32_t* res);
 int mystrtod(char** p, double* res);
 int strtocolor(char** q, uint32_t* res);



More information about the MPlayer-cvslog mailing list