[vlc-commits] DTV: make delsys structures static

Rémi Denis-Courmont git at videolan.org
Sat Jul 30 10:13:01 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 30 10:02:05 2011 +0300| [a5e92feccd35a5364dbfca5486818627b059c249] | committer: Rémi Denis-Courmont

DTV: make delsys structures static

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5e92feccd35a5364dbfca5486818627b059c249
---

 modules/access/dtv/access.c |   20 +++++++++++---------
 modules/access/dtv/dtv.h    |    4 ----
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 2de0232..9d718ae 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -342,11 +342,13 @@ struct access_sys_t
     dvb_device_t *dev;
 };
 
-struct delsys
+typedef struct delsys
 {
     int (*setup) (vlc_object_t *, dvb_device_t *, uint64_t freq);
     /* TODO: scan stuff */
-};
+} delsys_t;
+
+static const delsys_t dvbc, dvbs, dvbs2, dvbt, dvbt2, atsc, cqam;
 
 static block_t *Read (access_t *);
 static int Control (access_t *, int, va_list);
@@ -694,7 +696,7 @@ static int atsc_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     return dvb_set_atsc (dev, freq, mod);
 }
 
-const delsys_t atsc = { .setup = atsc_setup };
+static const delsys_t atsc = { .setup = atsc_setup };
 
 static int cqam_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
 {
@@ -703,7 +705,7 @@ static int cqam_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     return dvb_set_cqam (dev, freq, mod);
 }
 
-const delsys_t cqam = { .setup = cqam_setup };
+static const delsys_t cqam = { .setup = cqam_setup };
 
 
 /*** DVB-C ***/
@@ -716,7 +718,7 @@ static int dvbc_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     return dvb_set_dvbc (dev, freq, mod, srate, fec);
 }
 
-const delsys_t dvbc = { .setup = dvbc_setup };
+static const delsys_t dvbc = { .setup = dvbc_setup };
 
 
 /*** DVB-S ***/
@@ -782,8 +784,8 @@ static int dvbs2_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     return ret;
 }
 
-const delsys_t dvbs = { .setup = dvbs_setup };
-const delsys_t dvbs2 = { .setup = dvbs2_setup };
+static const delsys_t dvbs = { .setup = dvbs_setup };
+static const delsys_t dvbs2 = { .setup = dvbs2_setup };
 
 
 /*** DVB-T ***/
@@ -811,5 +813,5 @@ static int dvbt2_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     return dvb_set_dvbt2 (dev, freq, mod, fec, bw, tx, guard);
 }
 
-const delsys_t dvbt = { .setup = dvbt_setup };
-const delsys_t dvbt2 = { .setup = dvbt2_setup };
+static const delsys_t dvbt = { .setup = dvbt_setup };
+static const delsys_t dvbt2 = { .setup = dvbt2_setup };
diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
index a25caf7..ac87c64 100644
--- a/modules/access/dtv/dtv.h
+++ b/modules/access/dtv/dtv.h
@@ -37,10 +37,6 @@ enum {
     DVB_T2 = 0x00000200,
 };
 
-typedef struct delsys delsys_t;
-
-extern const delsys_t dvbc, dvbs, dvbs2, dvbt, dvbt2, atsc, cqam;
-
 typedef struct dvb_device dvb_device_t;
 
 dvb_device_t *dvb_open (vlc_object_t *obj);



More information about the vlc-commits mailing list