[MPlayer-dev-eng] [patch] static functions in libvo
Stefan Huehner
stefan at huehner.org
Tue Jul 4 17:31:22 CEST 2006
Hi,
attached patch marks several functions as static which aren't used
outside its source file.
Regards,
Stefan
-------------- next part --------------
Index: libvo/x11_common.c
===================================================================
--- libvo/x11_common.c (revision 18900)
+++ libvo/x11_common.c (working copy)
@@ -559,7 +559,7 @@
extern void mplayer_put_key(int code);
#ifdef XF86XK_AudioPause
-void vo_x11_putkey_ext(int keysym)
+static void vo_x11_putkey_ext(int keysym)
{
switch (keysym)
{
Index: libvo/vo_png.c
===================================================================
--- libvo/vo_png.c (revision 18900)
+++ libvo/vo_png.c (working copy)
@@ -59,7 +59,7 @@
}
-struct pngdata create_png (char * fname, int image_width, int image_height, int swapped)
+static struct pngdata create_png (char * fname, int image_width, int image_height, int swapped)
{
struct pngdata png;
Index: libvo/vo_pnm.c
===================================================================
--- libvo/vo_pnm.c (revision 18900)
+++ libvo/vo_pnm.c (working copy)
@@ -96,7 +96,7 @@
* \return nothing It does not return.
*/
-void pnm_write_error(void) {
+static void pnm_write_error(void) {
mp_msg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name);
exit_player(MSGTR_Exit_error);
}
@@ -197,7 +197,7 @@
* returns, everything went well.
*/
-void pnm_mkdir(char *buf, int verbose) {
+static void pnm_mkdir(char *buf, int verbose) {
struct stat stat_p;
/* Silly MING32 bug workaround */
@@ -298,7 +298,7 @@
* \return none The player will exit if anything goes wrong.
*/
-void pnm_write_pnm(FILE *outfile, mp_image_t *mpi)
+static void pnm_write_pnm(FILE *outfile, mp_image_t *mpi)
{
uint32_t w = mpi->w;
uint32_t h = mpi->h;
@@ -433,7 +433,7 @@
* \return none The player will exit if anything goes wrong.
*/
-void pnm_write_image(mp_image_t *mpi)
+static void pnm_write_image(mp_image_t *mpi)
{
static int framenum = 0, framecounter = 0, subdircounter = 0;
char buf[BUFLENGTH];
Index: libvo/font_load_ft.c
===================================================================
--- libvo/font_load_ft.c (revision 18900)
+++ libvo/font_load_ft.c (working copy)
@@ -234,7 +234,7 @@
}
// general outline
-void outline(
+static void outline(
unsigned char *s,
unsigned char *t,
int width,
@@ -277,7 +277,7 @@
// 1 pixel outline
-void outline1(
+static void outline1(
unsigned char *s,
unsigned char *t,
int width,
@@ -315,7 +315,7 @@
}
// "0 pixel outline"
-void outline0(
+static void outline0(
unsigned char *s,
unsigned char *t,
int width,
@@ -330,7 +330,7 @@
}
// gaussian blur
-void blur(
+static void blur(
unsigned char *buffer,
unsigned short *tmp2,
int width,
@@ -654,7 +654,7 @@
}
-int generate_tables(font_desc_t *desc, double thickness, double radius)
+static int generate_tables(font_desc_t *desc, double thickness, double radius)
{
int width = desc->max_height;
int height = desc->max_width;
Index: libvo/vo_aa.c
===================================================================
--- libvo/vo_aa.c (revision 18900)
+++ libvo/vo_aa.c (working copy)
@@ -136,8 +136,8 @@
}
-void
-osdmessage(int duration, int deko, char *fmt, ...)
+static void
+osdmessage(int duration, int deko, const char *fmt, ...)
{
/*
* for outputting a centered string at the bottom
@@ -163,8 +163,8 @@
posbar[0]='\0';
}
-void
-osdpercent(int duration, int deko, int min, int max, int val, char * desc, char * unit)
+static void
+osdpercent(int duration, int deko, int min, int max, int val, const char * desc, const char * unit)
{
/*
* prints a bar for setting values
@@ -190,7 +190,7 @@
}
-void
+static void
printosdtext(void)
{
if(osd_text_length > 0 && !vo_osd_text) {
@@ -220,7 +220,7 @@
}
}
-void
+static void
printosdprogbar(void){
/* print mplayer osd-progbar */
if (vo_osd_progbar_type!=-1){
@@ -574,7 +574,7 @@
#endif
}
-int
+static int
getcolor(char * s){
int i;
char * rest;
Index: libvo/vo_svga.c
===================================================================
--- libvo/vo_svga.c (revision 18900)
+++ libvo/vo_svga.c (working copy)
@@ -303,7 +303,7 @@
return VO_TRUE;
}
-int bpp_from_vminfo(vga_modeinfo *vminfo){
+static int bpp_from_vminfo(vga_modeinfo *vminfo){
switch(vminfo->colors){
case 2: return 1;
case 16: return 4;
@@ -315,7 +315,7 @@
return 0;
}
-int find_best_svga_mode(int req_w,int req_h, int req_bpp){
+static int find_best_svga_mode(int req_w,int req_h, int req_bpp){
int badness,prev_badness;
int bestmode,lastmode;
int i;
Index: libvo/vo_md5sum.c
===================================================================
--- libvo/vo_md5sum.c (revision 18900)
+++ libvo/vo_md5sum.c (working copy)
@@ -81,7 +81,7 @@
* \return nothing It does not return.
*/
-void md5sum_write_error(void) {
+static void md5sum_write_error(void) {
mp_msg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name);
exit_player(MSGTR_Exit_error);
}
Index: libvo/vo_jpeg.c
===================================================================
--- libvo/vo_jpeg.c (revision 18900)
+++ libvo/vo_jpeg.c (working copy)
@@ -98,7 +98,7 @@
* returns, everything went well.
*/
-void jpeg_mkdir(char *buf, int verbose) {
+static void jpeg_mkdir(char *buf, int verbose) {
struct stat stat_p;
#ifndef __MINGW32__
Index: libvo/sub.c
===================================================================
--- libvo/sub.c (revision 18900)
+++ libvo/sub.c (working copy)
@@ -765,7 +765,7 @@
mp_osd_obj_t* vo_osd_list=NULL;
-mp_osd_obj_t* new_osd_obj(int type){
+static mp_osd_obj_t* new_osd_obj(int type){
mp_osd_obj_t* osd=malloc(sizeof(mp_osd_obj_t));
memset(osd,0,sizeof(mp_osd_obj_t));
osd->next=vo_osd_list;
More information about the MPlayer-dev-eng
mailing list