Mercurial > mplayer.hg
changeset 30535:016e5fc1dead
GUI: Mark functions that are not used outside their files as static.
author | diego |
---|---|
date | Sun, 14 Feb 2010 14:02:09 +0000 |
parents | 65a8e80c1474 |
children | 39a4dd7ec420 |
files | gui/cfg.c gui/interface.c gui/mplayer/gtk/about.c gui/mplayer/gtk/eq.c gui/mplayer/gtk/fs.c gui/mplayer/gtk/gtk_menu.c gui/mplayer/gtk/gtk_url.c gui/mplayer/gtk/opts.c gui/mplayer/gtk/sb.c gui/mplayer/menu.c gui/mplayer/pb.c gui/skin/skin.c gui/wm/ws.c |
diffstat | 13 files changed, 79 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/cfg.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/cfg.c Sun Feb 14 14:02:09 2010 +0000 @@ -218,7 +218,7 @@ { NULL, NULL, 0, 0, 0, 0, NULL } }; -char * gfgets( char * str, int size, FILE * f ) +static char * gfgets( char * str, int size, FILE * f ) { char * s = fgets( str,size,f ); char c;
--- a/gui/interface.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/interface.c Sun Feb 14 14:02:09 2010 +0000 @@ -73,7 +73,7 @@ guiInterface_t guiIntfStruct; int guiWinID=-1; -char * gstrcat( char ** dest,const char * src ) +static char * gstrcat( char ** dest, const char * src ) { char * tmp = NULL; @@ -101,7 +101,7 @@ return strcmp( a,b ); } -int gstrncmp( const char * a,const char * b,int size ) +static int gstrncmp( const char * a, const char * b, int size ) { if ( !a && !b ) return 0; if ( !a || !b ) return -1; @@ -126,7 +126,7 @@ free( *p ); *p=NULL; } -void gset( char ** str, const char * what ) +static void gset( char ** str, const char * what ) { if ( *str ) { if ( !strstr( *str,what ) ) { gstrcat( str,"," ); gstrcat( str,what ); }} else gstrcat( str,what ); @@ -154,7 +154,7 @@ * \brief this replaces a string starting with search by replace. * If not found, replace is appended. */ -void greplace(char ***list, const char *search, const char *replace) +static void greplace(char ***list, const char *search, const char *replace) { int i = 0; int len = (search) ? strlen(search) : 0; @@ -1197,7 +1197,7 @@ //This function adds/inserts one file into the gui playlist -int import_file_into_gui(char* temp, int insert) +static int import_file_into_gui(char* temp, int insert) { char *filename, *pathname; plItem * item;
--- a/gui/mplayer/gtk/about.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/about.c Sun Feb 14 14:02:09 2010 +0000 @@ -34,7 +34,7 @@ gtk_widget_show( About ); } -void abWidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ) +static void abWidgetDestroy( GtkWidget * widget, GtkWidget ** widget_pointer ) { WidgetDestroy( NULL,&About ); } GtkWidget * create_About( void )
--- a/gui/mplayer/gtk/eq.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/eq.c Sun Feb 14 14:02:09 2010 +0000 @@ -165,7 +165,7 @@ gtk_widget_show( Equalizer ); } -void HideEqualizer( void ) +static void HideEqualizer( void ) { if ( !Equalizer ) return; gtk_widget_hide( Equalizer ); @@ -261,7 +261,8 @@ } } -void eqNotebook( GtkNotebook * notebook,GtkNotebookPage * page,gint page_num,gpointer user_data ) +static void eqNotebook( GtkNotebook * notebook, GtkNotebookPage * page, + gint page_num, gpointer user_data ) { if ( page_num ) gtk_widget_hide( Config ); else gtk_widget_show( Config );
--- a/gui/mplayer/gtk/fs.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/fs.c Sun Feb 14 14:02:09 2010 +0000 @@ -177,7 +177,7 @@ gtk_clist_set_pixmap(GTK_CLIST(list), pos, 0, pixmap, mask); } -void CheckDir( GtkWidget * list,char * directory ) +static void CheckDir( GtkWidget * list,char * directory ) { struct stat fs; int i; @@ -229,8 +229,6 @@ gtk_widget_show( list ); } -void fs_PersistantHistory( char *subject ); /* forward declaration */ - void ShowFileSelect( int type,int modal ) { int i, k; @@ -346,7 +344,7 @@ fsFileSelect=NULL; } -void fs_PersistantHistory( char * subject ) +static void fs_PersistantHistory( char * subject ) { int i; @@ -364,13 +362,15 @@ } //----------------------------------------------- -void fs_fsFilterCombo_activate( GtkEditable * editable,gpointer user_data ) +static void fs_fsFilterCombo_activate( GtkEditable * editable, + gpointer user_data ) { fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) ); CheckDir( fsFNameList,get_current_dir_name() ); } -void fs_fsFilterCombo_changed( GtkEditable * editable,gpointer user_data ) +static void fs_fsFilterCombo_changed( GtkEditable * editable, + gpointer user_data ) { const char * str; int i; @@ -409,7 +409,8 @@ CheckDir( fsFNameList,get_current_dir_name() ); } -void fs_fsPathCombo_activate( GtkEditable * editable,gpointer user_data ) +static void fs_fsPathCombo_activate( GtkEditable * editable, + gpointer user_data ) { const unsigned char * str; @@ -417,7 +418,8 @@ if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); } -void fs_fsPathCombo_changed( GtkEditable * editable,gpointer user_data ) +static void fs_fsPathCombo_changed( GtkEditable * editable, + gpointer user_data ) { const unsigned char * str; @@ -425,7 +427,7 @@ if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); } -void fs_Up_released( GtkButton * button,gpointer user_data ) +static void fs_Up_released( GtkButton * button, gpointer user_data ) { chdir( ".." ); fsSelectedFile=fsThatDir; @@ -434,7 +436,7 @@ return; } -int fsFileExist( unsigned char * fname ) +static int fsFileExist( unsigned char * fname ) { FILE * f = fopen( fname,"r" ); if ( f == NULL ) return 0; @@ -442,7 +444,7 @@ return 1; } -void fs_Ok_released( GtkButton * button,gpointer user_data ) +static void fs_Ok_released( GtkButton * button, gpointer user_data ) { GList * item; int i = 1; @@ -499,19 +501,22 @@ else guiGetEvent( guiCEvent,guiSetStop ); } -void fs_Cancel_released( GtkButton * button,gpointer user_data ) +static void fs_Cancel_released( GtkButton * button,gpointer user_data ) { HideFileSelect(); fs_PersistantHistory( get_current_dir_name() ); //totem, write into history file } -void fs_fsFNameList_select_row( GtkWidget * widget,gint row,gint column,GdkEventButton *bevent,gpointer user_data ) +static void fs_fsFNameList_select_row( GtkWidget * widget, gint row, gint column, + GdkEventButton *bevent, gpointer user_data) { gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); if( bevent && bevent->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); } -gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data ) +static gboolean on_FileSelect_key_release_event( GtkWidget * widget, + GdkEventKey * event, + gpointer user_data ) { switch ( event->keyval ) {
--- a/gui/mplayer/gtk/gtk_menu.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/gtk_menu.c Sun Feb 14 14:02:09 2010 +0000 @@ -77,7 +77,7 @@ #include "gui/mplayer/pixmaps/playvcd.xpm" #endif -void ActivateMenuItem( int Item ) +static void ActivateMenuItem( int Item ) { // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); gtkPopupMenu=Item & 0x0000ffff; @@ -384,7 +384,7 @@ { "","Stereo","","","","5.1" }; #endif -const char * GetLanguage( int language ) +static const char * GetLanguage( int language ) { unsigned int i; for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ )
--- a/gui/mplayer/gtk/gtk_url.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/gtk_url.c Sun Feb 14 14:02:09 2010 +0000 @@ -66,7 +66,7 @@ gtk_widget_show( URL ); } -void HideURLDialogBox( void ) +static void HideURLDialogBox( void ) { if ( !URL ) return; gtk_widget_hide( URL );
--- a/gui/mplayer/gtk/opts.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/opts.c Sun Feb 14 14:02:09 2010 +0000 @@ -480,7 +480,7 @@ } } -void HidePreferences( void ) +static void HidePreferences( void ) { if ( !Preferences ) return; gtk_widget_hide( Preferences ); @@ -528,7 +528,7 @@ #define bLSubtitle 4 #define bLFont 5 -void prButton( GtkButton * button,gpointer user_data ) +static void prButton( GtkButton * button, gpointer user_data ) { switch ( (int)user_data ) { @@ -1374,7 +1374,8 @@ } #ifdef CONFIG_OSS_AUDIO -GList *appendOSSDevices(GList *l) { +static GList *appendOSSDevices(GList *l) +{ // careful! the current implementation allows only string constants! l = g_list_append(l, (gpointer)"/dev/dsp"); if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) { @@ -1398,7 +1399,8 @@ return l; } -GList *appendOSSMixers(GList *l) { +static GList *appendOSSMixers(GList *l) +{ // careful! the current implementation allows only string constants! l = g_list_append(l, (gpointer)"/dev/mixer"); if (gtkAOOSSMixer && strncmp(gtkAOOSSMixer, "/dev/sound", 10) == 0) { @@ -1415,7 +1417,8 @@ return l; } -GList *appendOSSMixerChannels(GList *l) { +static GList *appendOSSMixerChannels(GList *l) +{ l = g_list_append(l, (gpointer)"vol"); l = g_list_append(l, (gpointer)"pcm"); l = g_list_append(l, (gpointer)"line"); @@ -1424,7 +1427,8 @@ #endif #ifdef CONFIG_ALSA -GList *appendALSADevices(GList *l) { +static GList *appendALSADevices(GList *l) +{ l = g_list_append(l, (gpointer)"default"); l = g_list_append(l, (gpointer)"hw=0.0"); l = g_list_append(l, (gpointer)"hw=0.1"); @@ -1436,12 +1440,14 @@ return l; } -GList *appendALSAMixers(GList *l) { +static GList *appendALSAMixers(GList *l) +{ l = g_list_append(l, (gpointer)"default"); return l; } -GList *appendALSAMixerChannels(GList *l) { +static GList *appendALSAMixerChannels(GList *l) +{ l = g_list_append(l, (gpointer)"Master"); l = g_list_append(l, (gpointer)"Line"); l = g_list_append(l, (gpointer)"PCM"); @@ -1451,7 +1457,8 @@ #endif #ifdef CONFIG_SDL -GList *appendSDLDevices(GList *l) { +static GList *appendSDLDevices(GList *l) +{ l = g_list_append(l, (gpointer)"alsa"); l = g_list_append(l, (gpointer)"arts"); l = g_list_append(l, (gpointer)"esd"); @@ -1463,7 +1470,8 @@ #endif #ifdef CONFIG_ESD -GList *appendESDDevices(GList *l) { +static GList *appendESDDevices(GList *l) +{ l = g_list_append(l, (gpointer)"Enter Remote IP"); l = g_list_append(l, (gpointer)"Use Software Mixer"); return l; @@ -1472,7 +1480,8 @@ // Gets text string from a gtk entry, interpreting // MSGTR_PREFERENCES_DriverDefault as null string. -const char *getGtkEntryText(GtkWidget *from) { +static const char *getGtkEntryText(GtkWidget *from) +{ const char *tmp = gtk_entry_get_text(GTK_ENTRY(from)); if (strcmp(tmp, MSGTR_PREFERENCES_DriverDefault) == 0) { tmp = NULL; @@ -1482,7 +1491,8 @@ // Sets text string of a gtk entry, interpreting // null string as MSGTR_PREFERENCES_DriverDefault. -void setGtkEntryText(GtkWidget *dest, char *to) { +static void setGtkEntryText(GtkWidget *dest, char *to) +{ if (!to) { to = MSGTR_PREFERENCES_DriverDefault; }
--- a/gui/mplayer/gtk/sb.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/gtk/sb.c Sun Feb 14 14:02:09 2010 +0000 @@ -51,7 +51,7 @@ else SkinBrowser=create_SkinBrowser(); } -void HideSkinBrowser( void ) +static void HideSkinBrowser( void ) { if ( !SkinBrowser ) return; gtk_widget_hide( SkinBrowser );
--- a/gui/mplayer/menu.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/menu.c Sun Feb 14 14:02:09 2010 +0000 @@ -35,7 +35,7 @@ int mplMenuX,mplMenuY; static int mplMenuIsInitialized = 0; -void mplMenuDraw( void ) +static void mplMenuDraw( void ) { uint32_t * buf = NULL; uint32_t * drw = NULL;
--- a/gui/mplayer/pb.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/mplayer/pb.c Sun Feb 14 14:02:09 2010 +0000 @@ -56,7 +56,7 @@ int mplPBLength = 0; int mplPBFade = 0; -void mplPBDraw( void ) +static void mplPBDraw( void ) { int x; @@ -115,7 +115,7 @@ #define itPLMButton (itNULL - 1) #define itPRMButton (itNULL - 2) -void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY ) +static void mplPBMouseHandle( int Button, int X, int Y, int RX, int RY ) { static int itemtype = 0; int i;
--- a/gui/skin/skin.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/skin/skin.c Sun Feb 14 14:02:09 2010 +0000 @@ -50,7 +50,7 @@ #include <stdarg.h> -void ERRORMESSAGE( const char * format, ... ) +static void ERRORMESSAGE( const char * format, ... ) { char p[512]; char tmp[512]; @@ -114,7 +114,7 @@ return i; } -int cmd_section( char * in ) +static int cmd_section( char * in ) { strlower( in ); defList=NULL; @@ -123,7 +123,7 @@ return 0; } -int cmd_end( char * in ) +static int cmd_end( char * in ) { if ( strlen( window_name ) ) { window_name[0]=0; currSection=NULL; currSubItem=NULL; currSubItems=NULL; } else defList=NULL; @@ -131,7 +131,7 @@ return 0; } -int cmd_window( char * in ) +static int cmd_window( char * in ) { CHECKDEFLIST( "window" ); @@ -145,7 +145,7 @@ return 0; } -int cmd_base( char * in ) +static int cmd_base( char * in ) { unsigned char fname[512]; unsigned char tmp[512]; @@ -231,7 +231,7 @@ return 0; } -int cmd_background( char * in ) +static int cmd_background( char * in ) { CHECKDEFLIST( "background" ); CHECKWINLIST( "background" ); @@ -247,7 +247,7 @@ return 0; } -int cmd_button( char * in ) +static int cmd_button( char * in ) { unsigned char fname[512]; unsigned char tmp[512]; @@ -294,7 +294,7 @@ return 0; } -int cmd_selected( char * in ) +static int cmd_selected( char * in ) { unsigned char fname[512]; unsigned char tmp[512]; @@ -317,7 +317,7 @@ return 0; } -int cmd_menu( char * in ) +static int cmd_menu( char * in ) { // menu = number,x,y,sx,sy,msg int x,y,sx,sy,msg; unsigned char tmp[64]; @@ -353,7 +353,7 @@ return 0; } -int cmd_hpotmeter( char * in ) +static int cmd_hpotmeter( char * in ) { // hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg int x,y,psx,psy,ph,sx,sy,msg,d; unsigned char tmp[512]; @@ -413,7 +413,7 @@ return 0; } -int cmd_vpotmeter( char * in ) +static int cmd_vpotmeter( char * in ) { int r = cmd_hpotmeter( in ); wItem * item; @@ -423,7 +423,7 @@ return r; } -int cmd_potmeter( char * in ) +static int cmd_potmeter( char * in ) { // potmeter=phasebitmaps,phases,default value,x,y,sx,sy,msg int x,y,ph,sx,sy,msg,d; unsigned char tmp[512]; @@ -470,7 +470,7 @@ return 0; } -int cmd_font( char * in ) +static int cmd_font( char * in ) { // font=fontname,fontid char name[512]; char id[512]; @@ -503,7 +503,7 @@ return 0; } -int cmd_slabel( char * in ) +static int cmd_slabel( char * in ) { char tmp[512]; char sid[63]; @@ -541,7 +541,7 @@ return 0; } -int cmd_dlabel( char * in ) +static int cmd_dlabel( char * in ) { // dlabel=x,y,sx,align,fontid,string ... char tmp[512]; char sid[63]; @@ -581,7 +581,7 @@ return 0; } -int cmd_decoration( char * in ) +static int cmd_decoration( char * in ) { char tmp[512]; @@ -673,7 +673,7 @@ FILE * skinFile; -void setname( char * item1, char * item2 ) +static void setname( char * item1, char * item2 ) { av_strlcpy(fn, item1, sizeof( fn )); av_strlcat(fn, "/", sizeof( fn )); av_strlcat(fn, item2, sizeof( fn ));
--- a/gui/wm/ws.c Sun Feb 14 13:57:30 2010 +0000 +++ b/gui/wm/ws.c Sun Feb 14 14:02:09 2010 +0000 @@ -127,7 +127,7 @@ typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); wsTConvFunc wsConvFunc = NULL; -void rgb32torgb32( const unsigned char * src, unsigned char * dst,unsigned int src_size ) +static void rgb32torgb32( const unsigned char * src, unsigned char * dst,unsigned int src_size ) { memcpy( dst,src,src_size ); } // --- @@ -180,13 +180,13 @@ // Init X Window System. // ---------------------------------------------------------------------------------------------- -int wsIOErrorHandler( Display * dpy ) +static int wsIOErrorHandler( Display * dpy ) { fprintf( stderr,"[ws] IO error in display.\n" ); exit( 0 ); } -int wsErrorHandler( Display * dpy,XErrorEvent * Event ) +static int wsErrorHandler( Display * dpy, XErrorEvent * Event ) { char type[128]; XGetErrorText( wsDisplay,Event->error_code,type,128 ); @@ -706,7 +706,7 @@ return !wsTrue; } -Bool wsDummyEvents( Display * display,XEvent * Event,XPointer arg ) +static Bool wsDummyEvents( Display * display, XEvent * Event, XPointer arg ) { return True; } void wsHandleEvents( void ){