/* 
 * freq-table - generates xawtv frequency tables for TechniSat MediaFocus II.
 *
 * Copyright (C) 2003 Torsten Tittmann <Torsten.Tittmann@t-online.de>
 *            
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */    

/*
 * Derived from Rolf Siebrechts xawtv patches for his mfII device driver
 *
 * to compile type: gcc -o mk-freq-table mk-freq-table.c
 * 
 */


/* sat-europe */
#define TF	0x1000*1000	/* 0x10000*(1000/16)	*/
#define	LOF_LO	9750000		/* low Ku-Band local oscillator frequency in kHz	*/
#define LOF_HI	10600000	/* high Ku-Band local oscillator frequency in kHz	*/
/* flags specifying transponder features */
#define HIBAND	1 		/* bit16: transponder is in high Ku-band 	*/
#define VPOL	2 		/* bit17: transponder has vertical polarity	*/
#define HPOL	0 		/* bit17: transponder has horizontal polarity	*/
#define MONO580	4		/* bit18: mono audio carrier @ 5.80 MHz	*/
#define MONO660	8		/* bit19: mono audio carrier @ 6.60 MHz	*/
#define MONO665	16		/* bit20: mono audio carrier @ 6.65 MHz	*/
#define POS2ND	256		/* bit24: transponder/sat. is at a 2nd orbit position	*/
   				/* (we use it for Eutelsat/Hotbird @ 13°E)		*/
#define POS3RD	512		/* bit25: transponder/sat. is at a 3rd orbit position	*/
   				/* (we use it for Telecom @ 5°W)			*/
 
struct CHANLIST {
    char *name;
    int   freq;
};

static struct CHANLIST sat_astra[] = {
   	{ "A01",	(11214000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 01   */
        { "A02",	(11229000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 02   */
        { "A03",	(11244000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 03   */
        { "A04",	(11259000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 04   */
        { "A05",	(11273000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 05   */
        { "A06",	(11288000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 06   */
        { "A07",	(11303000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 07   */
        { "A08",	(11318000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 08   */
        { "A09",	(11332000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 09   */
        { "A10",	(11347000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 10   */
        { "A11",	(11362000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 11   */
        { "A12",	(11377000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 12   */
        { "A13",	(11391000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 13   */
        { "A14",	(11406000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 14   */
        { "A15",	(11421000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 15   */
        { "A16", 	(11436000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 16   */
        { "A17",	(11464000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 17   */
        { "A18",	(11479000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 18   */
        { "A19",	(11494000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 19   */
        { "A20",	(11509000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 20   */
        { "A21",	(11523000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 21   */
        { "A22",	(11538000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 22   */
        { "A23",	(11553000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 23   */
        { "A24",	(11568000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 24   */
        { "A25",	(11582000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 25   */
        { "A26",	(11597000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 26   */
        { "A27",	(11612000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 27   */
        { "A28",	(11627000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 28   */
        { "A29",	(11641000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 29   */
        { "A30",	(11656000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 30   */
        { "A31",	(11671000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 31   */
        { "A32",	(11686000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 32   */
        { "A33",	(10964000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 33   */
        { "A34",	(10979000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 34   */
        { "A35",	(10994000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 35   */
        { "A36",	(11009000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 36   */
        { "A37",	(11023000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 37   */
        { "A38",	(11038000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 38   */
        { "A39",	(11053000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 39   */
        { "A40",	(11068000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 40   */
        { "A41",	(11082000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 41   */
        { "A42",	(11097000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 42   */
        { "A43",	(11112000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 43   */
        { "A44",	(11127000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 44   */
        { "A45",	(11141000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 45   */
        { "A46",	(11156000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 46   */
        { "A47",	(11171000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 47   */
        { "A48",	(11186000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 48   */
        { "A49",	(10714000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 49   */
        { "A50",	(10729000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 50   */
        { "A51",	(10744000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 51   */
        { "A52",	(10759000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 52   */
        { "A53",	(10773000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 53   */
        { "A54",	(10788000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 54   */
        { "A55",	(10803000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 55   */
        { "A56",	(10818000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 56   */
        { "A57",	(10832000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 57   */
        { "A58",	(10847000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 58   */
        { "A59",	(10862000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 59   */
        { "A60",	(10877000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 60   */
        { "A61",	(10891000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 61   */
        { "A62",	(10906000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 62   */
        { "A63",	(10921000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 63   */
        { "A64",	(10936000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 64   */
};

static struct CHANLIST sat_astra_zap[] = {
   	{ "RTL 2",		(11214000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 01   */
        { "RTL",		(11229000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 02   */
        { "RTL Shop",		(11244000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 03   */
        { "Eurosport",		(11259000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 04   */
        { "Vox",		(11273000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 05   */
        { "Sat.1",		(11288000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 06   */
        { "VIVA Zwei",		(11303000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 07   */
        { "(??)",		(11318000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 08   */
        { "Kabel 1",		(11332000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 09   */
        { "3 Sat",		(11347000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 10   */
        { "Bloomberg Deutschland",(11362000-LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 11   */
        { "(??)",		(11377000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 12   */
        { "Super RTL",		(11391000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 13   */
        { "Pro Sieben Deutschland",(11406000-LOF_LO)+ ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 14   */
        { "MTV 2 DE",		(11421000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 15   */
        { "Fox News",		(11436000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 16   */
        { "Premiere Analog",	(11464000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 17   */
        { "(??)",		(11479000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 18   */
        { "ARD - Das Erste",	(11494000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 19   */
        { "(??)",		(11509000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 20   */
        { "DSF",		(11523000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 21   */
        { "(??)",		(11538000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 22   */
        { "(??)",		(11553000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 23   */
	{ "Bloomberg TV UK/B 1",(11568000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 24   */
        { "Nord 3",		(11582000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 25   */
        { "(??)",		(11597000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 26   */
        { "MTV DE",		(11612000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 27   */
        { "CNN International",	(11627000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 28   */
        { "n-tv",		(11641000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 29   */
        { "ORB Fernsehen",	(11656000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 30   */
        { "(??)",		(11671000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 31   */
        { "BR Alpha",		(11686000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 32   */
        { "ZDF",		(10964000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 33   */
        { "(??)",		(10979000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 34   */
        { "(??)",		(10994000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 35   */
        { "Phoenix",		(11009000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 36   */
        { "B.TV",		(11023000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 37   */
        { "(??)",		(11038000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 38   */
        { "WDR Fernsehen",	(11053000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 39   */
        { "Hessen Fernsehen",	(11068000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 40   */
        { "(??)",		(11082000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 41   */
        { "(??)",		(11097000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 42   */
        { "MDR Fernsehen",	(11112000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 43   */
        { "Viva",		(11127000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 44   */
        { "Bayerisches Fernsehen",(11141000-LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 45   */
        { "(??)",		(11156000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 46   */
        { "(??)",		(11171000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 47   */
        { "Südwest Fernsehen BW",(11186000- LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 48   */
        { "KI.KA/arte",		(10714000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 49   */
        { "CNBC Europe",	(10729000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 50   */
        { "TV PULS",		(10744000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 51   */
        { "QVC Deutschland",	(10759000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 52   */
        { "(??)",		(10773000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 53   */
        { "(digital)",		(10788000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 54   */
        { "N 24",		(10803000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 55   */
        { "TV Travel Shop",	(10818000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 56   */
        { "(digital)",		(10832000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 57   */
        { "(??)",		(10847000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 58   */
        { "(digital)",		(10862000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 59   */
        { "(digital)",		(10877000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 60   */
	{ "Südwest 3 RP",	(10891000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 61   */
	{ "Home Shopping Europe",(10906000- LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 62   */
        { "Channel 5",		(10921000 - LOF_LO) + ((HPOL)*TF) },   /* Astra  19.2°E, Tr. 63   */
        { "9 Live",		(10936000 - LOF_LO) + ((VPOL)*TF) },   /* Astra  19.2°E, Tr. 64   */
};

static struct CHANLIST sat_eutelsat[] = {
        { "TVE Internacional", 	(11224000-LOF_LO) + ((HPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 01B */
        { "TV5 Europe",		(11322000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 06 */
        { "TV4 Poland",		(11348000-LOF_LO) + ((HPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 07 */
        { "RAI Uno",		(11366000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 08 */
        { "Polsat",		(11431000-LOF_LO) + ((HPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 11 */
        { "RAI Due",		(11446000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 12A */
        { "TV Polonia",		(11474000-LOF_LO) + ((HPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 13 */
        { "RTL 7",		(11489000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 14 */
        { "RAI Tre",		(11531000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 16 */
        { "RTP Internacional",	(11727000-LOF_HI) + ((VPOL+HIBAND+POS2ND+MONO660)*TF) },/* Eutelsat 13°E, Tr. 50 */
       	{ "Magyar TV2",		(12130000-LOF_HI) + ((HPOL+HIBAND+POS2ND)*TF) },	/* Eutelsat 13°E, Tr. 71 */
        { "ERT Sat",		(12284000-LOF_HI) + ((HPOL+HIBAND+POS2ND+MONO660)*TF) },/* Eutelsat 13°E, Tr. 79 */
   	{ "Duna TV",	 	(10815000-LOF_LO) + ((HPOL+POS2ND)*TF) },		/* Eutelsat 13°E, Tr. 115 */
        { "CTV/Mesop.TV/MedyaTV",(10853000-LOF_LO)+ ((HPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 117 */
        { "Arab News Network", 	(10949000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 122 */
        { "TRT International", 	(10974000-LOF_LO) + ((HPOL+POS2ND+MONO665)*TF) },	/* Eutelsat 13°E, Tr. 123 */
	{ "La Cinquieme/arte", 	(11079000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 128 */
        { "BBC World",	 	(11114000-LOF_LO) + ((VPOL+POS2ND+MONO660)*TF) },	/* Eutelsat 13°E, Tr. 130 */
	{ "TVN",		(11148000-LOF_LO) + ((HPOL+POS2ND+MONO665)*TF) },	/* Eutelsat 13°E, Tr. 131A */
        { "Deutsche Welle TV",	(11163000-LOF_LO) + ((VPOL+POS2ND)*TF) },		/* Eutelsat 13°E, Tr. 132A */
        { "TVN 24",	 	(11178000-LOF_LO) + ((HPOL+POS2ND+MONO665)*TF) },	/* Eutelsat 13°E, Tr. 131B */
        { "TBN Europe",		(11566000-LOF_LO) + ((HPOL+POS2ND)*TF) },		/* Eutelsat 13°E, Tr. 153 */
};

/* Some SECAM stations */
static struct CHANLIST sat_telecom2c[] = {
	{ "M 6",		(12522000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 1 */
        { "France 2",		(12564000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 2 */
        { "TV 5 France",	(12585000-LOF_HI) + ((HPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 8 */
        { "La Cinquieme/Arte",	(12605000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 3 */
	{ "Canal+ France",	(12648000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO660)*TF) },/* Telecom 2C 5°W, Tr. 4 */
        { "TF 1",		(12690000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 5 */
        { "France 3 Sat",	(12732000-LOF_HI) + ((VPOL+HIBAND+POS3RD+MONO580)*TF) },/* Telecom 2C 5°W, Tr. 6 */
};

#include <stdio.h>
#include <stdlib.h>

int main()
{
  int index;

  FILE *sat_astra_ptr;
  FILE *sat_astra_zap_ptr;
  FILE *sat_eutelsat_ptr;
  FILE *sat_telecom2c_ptr;

  if ( (sat_astra_ptr = fopen("sat-astra.list","w"))==NULL)
        fprintf(stderr,"Fehler beim Öffnen von sat-astra.list");

  if ( (sat_astra_zap_ptr = fopen("sat-astra-zap.list","w"))==NULL)
        fprintf(stderr,"Fehler beim Öffnen von sat-astra-zap.list");

  if ( (sat_eutelsat_ptr = fopen("sat-eutelsat.list","w"))==NULL)
        fprintf(stderr,"Fehler beim Öffnen von sat-eutelsat.list");

  if ( (sat_telecom2c_ptr = fopen("sat-telecom2c.list","w"))==NULL)
        fprintf(stderr,"Fehler beim Öffnen von sat-telecom2c.list");

  for(index=0; index<64; index++)
  {
    fprintf(sat_astra_ptr,"[%s]\n", sat_astra[index].name);
    fprintf(sat_astra_ptr,"freq = %d\n", sat_astra[index].freq);
    fprintf(sat_astra_ptr,"\n");
  }

  for(index=0; index<64; index++)
  {
    fprintf(sat_astra_zap_ptr,"[%s]\n", sat_astra_zap[index].name);
    fprintf(sat_astra_zap_ptr,"freq = %d\n", sat_astra_zap[index].freq);
    fprintf(sat_astra_zap_ptr,"\n");
  }

  for(index=0; index<22; index++)
  {
    fprintf(sat_eutelsat_ptr,"[%s]\n", sat_eutelsat[index].name);
    fprintf(sat_eutelsat_ptr,"freq = %d\n", sat_eutelsat[index].freq);
    fprintf(sat_eutelsat_ptr,"\n");
  }

  for(index=0; index<7; index++)
  {
    fprintf(sat_telecom2c_ptr,"[%s]\n", sat_telecom2c[index].name);
    fprintf(sat_telecom2c_ptr,"freq = %d\n", sat_telecom2c[index].freq);
    fprintf(sat_telecom2c_ptr,"\n");
  }

  fclose(sat_astra_ptr);
  fclose(sat_astra_zap_ptr);
  fclose(sat_eutelsat_ptr);
  fclose(sat_telecom2c_ptr);
}
