[MPlayer-dev-eng] [PATCH] add comments to some #endif statements to avoid confusion
Diego Biurrun
diego at biurrun.de
Tue Sep 13 13:48:47 CEST 2005
Hi,
this patch adds some comments to a few #endif statements to make clear
which #ifdef they belong to. I added it everywhere where the #ifdef was
more than a screenfull of text away or nested in a complicated fashion,
erring on the side of adding a few more comments than might be
necessary. I'll apply tomorrow or so unless somebody objects.
Does it make sense to add comments to all #ifdef statements?
Diego
-------------- next part --------------
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.869
diff -u -r1.869 mplayer.c
--- mplayer.c 11 Sep 2005 06:42:32 -0000 1.869
+++ mplayer.c 13 Sep 2005 11:44:53 -0000
@@ -104,8 +104,8 @@
#include <rtc.h>
#define RTC_IRQP_SET RTCIO_IRQP_SET
#define RTC_PIE_ON RTCIO_PIE_ON
-#endif
-#endif
+#endif /* __linux__ */
+#endif /* HAVE_RTC */
#ifdef USE_TV
#include "libmpdemux/tv.h"
@@ -813,7 +813,7 @@
++set_of_sub_size;
}
}
-#endif
+#endif /* USE_SUB */
/*
* In Mac OS X the SDL-lib is built upon Cocoa. The easiest way to
@@ -1012,7 +1012,7 @@
}
fclose(f);
}
-#endif
+#endif /* USE_SUB */
int main(int argc,char* argv[]){
@@ -1097,8 +1097,8 @@
mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE2");
#endif
mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n\n");
-#endif
-#endif
+#endif /* RUNTIME_CPUDETECT */
+#endif /* defined(ARCH_X86) || defined(ARCH_X86_64) */
#if defined(WIN32) && defined(USE_WIN32DLL)
{ /*make our codec dirs available for LoadLibraryA()*/
@@ -1205,7 +1205,7 @@
// Import initital playtree into gui
import_initial_playtree_into_gui(playtree, mconfig, enqueue);
}
-#endif
+#endif /* HAVE_NEW_GUI */
if(video_driver_list && strcmp(video_driver_list[0],"help")==0){
list_video_out();
@@ -1354,7 +1354,7 @@
#ifdef HAVE_FONTCONFIG
}
#endif
-#endif
+#endif /* USE_OSD */
vo_init_osd();
#ifdef HAVE_RTC
@@ -1387,7 +1387,7 @@
if(use_gui) setuid( getuid() ); // strongly test, please check this.
#endif
if(rtc_fd<0)
-#endif
+#endif /* HAVE_RTC */
mp_msg(MSGT_CPLAYER, MSGL_V, "Using %s timing\n",
softsleep?"software":timer_name);
@@ -1540,7 +1540,7 @@
}
}
}
-#endif
+#endif /* HAVE_NEW_GUI */
while (player_idle_mode && !filename) {
play_tree_t * entry = NULL;
@@ -2019,7 +2019,7 @@
global_sub_size += set_of_sub_size;
}
}
-#endif
+#endif /* USE_SUB */
if (global_sub_size) {
// find the best sub to use
@@ -2580,7 +2580,7 @@
while(time_frame>0) time_frame-=GetRelativeTime(); // burn the CPU
}
}
-#endif
+#endif /* SYS_DARWIN */
}
//if(!frame_time_remaining){ // should we display the frame now?
@@ -3341,7 +3341,7 @@
}
}
}
-#endif
+#endif /* HAS_DVBIN_SUPPORT */
break;
case MP_CMD_TV_SET_CHANNEL : {
if (file_format == DEMUXER_TYPE_TV) {
@@ -3376,7 +3376,7 @@
}
}
}
-#endif
+#endif /* HAS_DVBIN_SUPPORT */
case MP_CMD_TV_LAST_CHANNEL : {
if (file_format == DEMUXER_TYPE_TV) {
tv_last_channel((tvi_handle_t*)(demuxer->priv));
@@ -3396,7 +3396,7 @@
if (file_format == DEMUXER_TYPE_TV)
tv_step_chanlist((tvi_handle_t*)(demuxer->priv));
} break;
-#endif
+#endif /* USE_TV */
case MP_CMD_SWITCH_VSYNC: {
vo_vsync = ( cmd->nargs > 0 )? cmd->args[0].v.i : !vo_vsync;
} break;
@@ -3551,7 +3551,7 @@
set_of_subtitles[set_of_sub_size] = NULL;
}
}
-#endif
+#endif /* USE_SUB */
} break;
case MP_CMD_GET_SUB_VISIBILITY:
{
@@ -3811,7 +3811,7 @@
d_dvdsub->id=dvdsub_id=stream_change->physical;
if (vo_spudec) spudec_reset(vo_spudec);
}
-#endif
+#endif /* DVDNAVVERSION > 012 */
break;
}
case DVDNAV_AUDIO_STREAM_CHANGE: {
@@ -3918,7 +3918,7 @@
}
break;
}
-#endif
+#endif /* USE_DVDNAV */
default : {
#ifdef HAVE_NEW_GUI
if ( ( use_gui )&&( cmd->id > MP_CMD_GUI_EVENTS ) ) guiGetEvent( guiIEvent,(char *)cmd->id );
@@ -4014,7 +4014,7 @@
}
}
}
-#endif
+#endif /* USE_OSD */
if(sh_video) {
c_total=0;
max_pts_correction=0.1;
@@ -4085,7 +4085,7 @@
}
#endif
}
-#endif
+#endif /* HAVE_NEW_GUI */
//================= Update OSD ====================
@@ -4239,7 +4239,7 @@
}
// for(i=1;i<=11;i++) osd_text_buffer[10+i]=i;osd_text_buffer[10+i]=0;
// vo_osd_text=osd_text_buffer;
-#endif
+#endif /* USE_OSD */
#ifdef USE_SUB
// find sub
More information about the MPlayer-dev-eng
mailing list