[MPlayer-dev-eng] [PATCH] cleaning up r22297:22298
Michael Niedermayer
michaelni at gmx.at
Sun Feb 25 23:39:57 CET 2007
Hi
On Sun, Feb 25, 2007 at 10:59:38PM +0100, Dominik 'Rathann' Mierzejewski wrote:
> Here's what I intend to do:
>
> svn rm command.c
> svn update -r22297 mplayer.c
> svn cp mplayer.c command.c
> patch command.c mplayer.c-command.c.patch
> svn update mplayer.c
huh? why? that shouldnt be needed
> svn commit command.c
>
> The attached patch is almost the same as the one I posted earlier, but it
> contains Ivo's fix from r22305. This way the changes to the repo are minimal
> and Uoti can reformat command.c to his heart's content afterwards.
>
> I will wait until Tuesday, 00:00 UTC in case Uoti wants to do this himself.
>
> Comments?
[...]
> -int sub_source(void)
> +static int sub_source(MPContext * mpctx)
> {
> int source = -1;
> int top = -1;
> int i;
> for (i = 0; i < SUB_SOURCES; i++) {
> - int j = global_sub_indices[i];
> - if ((j >= 0) && (j > top) && (global_sub_pos >= j)) {
> + int j = mpctx->global_sub_indices[i];
> + if ((j >= 0) && (j > top) && (mpctx->global_sub_pos >= j)) {
> source = i;
it would be great if the MPContext change could be split off too its 95%
of the patch ignoring removed lines
that is
svn rm command.c
svn update -r22297 mplayer.c
svn cp mplayer.c command.c
remove lines not needed in command.c by applying appropriate patch
svn ci command.c
apply mpctx change patch
svn ci command.c
apply remaining functional changes to command.c
svn ci command.c
Note, the intermediate versions will not compile so this has to be done
quick or if you want everything to compile it wil become much more complex
[...]
> +char *property_expand_string(MPContext * mpctx, char *str) {
> + return m_properties_expand_string(mp_properties, str, mpctx);
> +}
> +
> +void property_print_help(void) {
> + m_properties_print_help_list(mp_properties);
> }
>
> +
> ///@}
> // Properties group
cosmetic
>
> @@ -2702,8 +1277,9 @@
> { NULL, 0, 0, 0, -1, NULL }
> };
>
> +
> /// Handle commands that set a property.
cosmetic
[...]
> @@ -4799,12 +1397,14 @@
> m_option_t* prop = mp_property_find(cmd->args[0].v.s);
> float arg = cmd->args[1].v.f;
> if(!prop) mp_msg(MSGT_CPLAYER,MSGL_WARN, "Unknown property: '%s'\n",cmd->args[0].v.s);
> - else if(m_property_do(prop,M_PROPERTY_STEP_UP, arg ? &arg : NULL) <= 0)
> + else if (m_property_do(prop, M_PROPERTY_STEP_UP, arg ? &arg : NULL, mpctx) <= 0)
> mp_msg(MSGT_CPLAYER,MSGL_WARN, "Failed to increment property '%s' by %f.\n",cmd->args[0].v.s, arg);
> } break;
> +
> case MP_CMD_GET_PROPERTY: {
cosmetic
[...]
> cmd->args[0].v.s);
> break;
> }
> - tmp = m_option_print(prop,val);
> + tmp = m_option_print(prop, val);
> if(!tmp || tmp == (char*)-1) {
cosmetic
these should be the only cosmetics left or at least they are the only
ones i found, indention is also messed up at a few points but i ignored
that i guess it doesnt matter as this will be reformated anyway
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070225/38d1178f/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list