+Index: tvtime-1.0.2/src/tvtimeosd.c
+===================================================================
+--- tvtime-1.0.2.orig/src/tvtimeosd.c 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/src/tvtimeosd.c 2013-04-11 11:25:41.565560600 +0000
+@@ -34,6 +34,8 @@
+ #include "tvtimeosd.h"
+ #include "pulldown.h"
+
++#define OSD_MAX 16
++
+ typedef struct string_object_s
+ {
+ osd_string_t *string;
+@@ -116,6 +118,9 @@
+ char hold_message[ 255 ];
+ char hold_message2[ 255 ];
+
++ char arguments[ OSD_MAX ][ 128 ];
++ int commands[ OSD_MAX ];
++
+ int film_mode;
+ int info_available;
+ int pulldown_mode;
+@@ -859,6 +864,24 @@
+ osd_list_set_text( osd->list, line, text );
+ }
+
++void tvtime_osd_list_set_enter_command( tvtime_osd_t *osd, int line, int command,
++ const char *argument )
++{
++ osd->commands[ line ] = command;
++ snprintf( osd->arguments[ line ], sizeof( osd->arguments[ 0 ] ),
++ "%s", argument );
++}
++
++int tvtime_osd_list_get_enter_command( tvtime_osd_t *osd, int line )
++{
++ return osd->commands[ line ];
++}
++
++const char *tvtime_osd_list_get_enter_argument( tvtime_osd_t *osd, int line )
++{
++ return osd->arguments[ line ];
++}
++
+ void tvtime_osd_list_set_lines( tvtime_osd_t *osd, int numlines )
+ {
+ osd_list_set_lines( osd->list, numlines );
+Index: tvtime-1.0.2/src/tvtimeosd.h
+===================================================================
+--- tvtime-1.0.2.orig/src/tvtimeosd.h 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/src/tvtimeosd.h 2013-04-11 11:25:41.565560600 +0000
+@@ -92,6 +92,10 @@
+ int tvtime_osd_list_get_line_pos( tvtime_osd_t *osd, int y );
+ void tvtime_osd_list_set_hilight( tvtime_osd_t *osd, int pos );
+ void tvtime_osd_list_set_text( tvtime_osd_t *osd, int line, const char *text );
++void tvtime_osd_list_set_enter_command( tvtime_osd_t *osd, int line, int command,
++ const char *argument );
++int tvtime_osd_list_get_enter_command( tvtime_osd_t *osd, int line );
++const char *tvtime_osd_list_get_enter_argument( tvtime_osd_t *osd, int line );
+ void tvtime_osd_list_set_lines( tvtime_osd_t *osd, int numlines );
+ void tvtime_osd_list_get_bounding_box( tvtime_osd_t *osd, int *x, int *y,
+ int *width, int *height );
+Index: tvtime-1.0.2/src/commands.c
+===================================================================
+--- tvtime-1.0.2.orig/src/commands.c 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/src/commands.c 2013-04-11 11:26:18.181559512 +0000
+@@ -42,6 +42,7 @@
+ #include "epg.h"
+
+ #define NUM_FAVORITES 9
++#define MAX_STATIONS ( ( num_stations > 15 ) ? 15 : num_stations )
+ #define MAX_USER_MENUS 64
+
+ /* Maximum number of steps to increment sleeptimer. */
+@@ -51,6 +52,7 @@
+ {
+ MENU_REDIRECT,
+ MENU_FAVORITES,
++ MENU_STATIONS,
+ MENU_USER
+ };
+
+@@ -65,6 +67,7 @@
+ { "picture", MENU_REDIRECT, "picture-tuner" },
+ { "input", MENU_REDIRECT, "input-ntsc" },
+ { "favorites", MENU_FAVORITES, 0 },
++ { "channel-list", MENU_STATIONS, 0 },
+ };
+
+ static int tvtime_num_builtin_menus( void )
+@@ -169,6 +172,9 @@
+ int numfavorites;
+ int favorites[ NUM_FAVORITES ];
+
++ int channel_list;
++ int channel_list_active;
++
+ int epg;
+ int epg_nowandnext; // We are showing page [epg_nowandnext] of the epg
+ int epg_channel;
+@@ -1145,12 +1151,16 @@
+ cmd->numfavorites = 0;
+ memset( cmd->favorites, 0, sizeof( cmd->favorites ) );
+
++ cmd->channel_list = 0;
++ cmd->channel_list_active = 0;
++
+ cmd->epg = 0;
+ cmd->epg_nowandnext = 0;
+ cmd->epg_channel = 0;
+
+ cmd->menuactive = 0;
+ cmd->curmenu = MENU_FAVORITES;
++ cmd->curmenu = MENU_STATIONS;
+ cmd->curmenupos = 0;
+ cmd->curmenusize = 0;
+ cmd->curusermenu = 0;
+@@ -1865,6 +1875,9 @@
+ tvtime_osd_list_hold( cmd->osd, 0 );
+ tvtime_osd_show_list( cmd->osd, 0, 0 );
+ cmd->menuactive = 0;
++ if( cmd->channel_list_active ) {
++ cmd->channel_list_active = 0;
++ }
+ }
+
+ static void menu_enter( commands_t *cmd )
+@@ -1879,6 +1892,15 @@
+ }
+ }
+ menu_off( cmd );
++ } else if( cmd->curmenu == MENU_STATIONS ) {
++ int command = tvtime_osd_list_get_enter_command( cmd->osd, cmd->curmenupos + 1 );
++ const char *argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
++ if( atoi( argument ) == station_get_current_pos( cmd->stationmgr ) + 1 ) return;
++
++ /* I check for MENU_ENTER just to avoid a malicious infinite loop. */
++ if( command != TVTIME_MENU_ENTER ) {
++ commands_handle( cmd, command, argument );
++ }
+ } else if( cmd->curmenu == MENU_USER ) {
+ int command = menu_get_enter_command( cmd->curusermenu, cmd->curmenupos + 1 );
+ const char *argument = menu_get_enter_argument( cmd->curusermenu, cmd->curmenupos + 1 );
+@@ -1892,7 +1914,7 @@
+
+ static void menu_back( commands_t *cmd )
+ {
+- if( cmd->curmenu == MENU_FAVORITES ) {
++ if( ( cmd->curmenu == MENU_FAVORITES ) || ( cmd->curmenu == MENU_STATIONS ) ) {
+ commands_handle( cmd, TVTIME_SHOW_MENU, "stations" );
+ } else if( cmd->curmenu == MENU_USER ) {
+ int command = menu_get_back_command( cmd->curusermenu );
+@@ -1915,7 +1937,8 @@
+ tvtime_osd_list_set_text( cmd->osd, 0, _("Favorites") );
+ for( i = 0; i < cmd->numfavorites; i++ ) {
+ char text[ 32 ];
+- snprintf( text, sizeof (text), "%d", cmd->favorites[ i ] );
++ snprintf( text, sizeof (text), "[%d] %s", cmd->favorites[ i ],
++ station_get_name( cmd->stationmgr, ( cmd->favorites[ i ] - 1 ) ) );
+ tvtime_osd_list_set_text( cmd->osd, i + 1, text );
+ }
+ snprintf( string, sizeof( string ), TVTIME_ICON_PLUSBUTTON " %s",
+@@ -1937,6 +1960,39 @@
+ tvtime_osd_list_hold( cmd->osd, 1 );
+ }
+
++static int display_channel_list( commands_t *cmd, tvtime_osd_t* osd, int channel )
++{
++ const int num_stations = station_get_num_stations( cmd->stationmgr );
++ int i;
++
++ tvtime_osd_list_set_lines( cmd->osd, MAX_STATIONS + 1 );
++ tvtime_osd_list_set_text( cmd->osd, 0, _("Channel list \0") );
++
++ for( i = 0; i < MAX_STATIONS; i++ ) {
++ const char *pos = station_get_channel( cmd->stationmgr, i + channel - 1 );
++ char string[ 128 ];
++
++ if ( channel > num_stations ) {
++ channel = 1;
++ } else if ( channel < 1 ) {
++ channel = num_stations;
++ }
++
++ snprintf( string, sizeof( string ), "[%s] %s",
++ station_get_channel( cmd->stationmgr, i + channel - 1 ),
++ station_get_name( cmd->stationmgr, i + channel - 1 ) );
++ tvtime_osd_list_set_text( cmd->osd, i + 1, string );
++ tvtime_osd_list_set_enter_command( cmd->osd, i + 1, TVTIME_SET_STATION, pos );
++ }
++ cmd->curmenusize = MAX_STATIONS;
++
++ tvtime_osd_list_set_hilight( cmd->osd, cmd->curmenupos + 1 );
++ tvtime_osd_show_list( cmd->osd, 1, 0 );
++ tvtime_osd_list_hold( cmd->osd, 1 );
++
++ return channel;
++}
++
+ menu_t *commands_get_menu( commands_t *cmd, const char *menuname )
+ {
+ int i;
+@@ -1966,6 +2022,7 @@
+
+ static int set_menu( commands_t *cmd, const char *menuname )
+ {
++ const int num_stations = station_get_num_stations( cmd->stationmgr );
+ int i;
+
+ if( !menuname || !*menuname ) {
+@@ -1981,7 +2038,15 @@
+ return set_menu( cmd, menu_table[ i ].dest );
+ } else {
+ cmd->curmenu = menu_table[ i ].menutype;
+- cmd->curmenupos = 0;
++ if( cmd->curmenu == MENU_STATIONS ) {
++ if( station_get_current_pos( cmd->stationmgr ) < MAX_STATIONS ) {
++ cmd->curmenupos = station_get_current_pos( cmd->stationmgr );
++ } else {
++ cmd->curmenupos = MAX_STATIONS - 1;
++ }
++ } else {
++ cmd->curmenupos = 0;
++ }
+ return 1;
+ }
+ }
+@@ -2104,20 +2169,46 @@
+ if( tvtime_cmd == TVTIME_NOCOMMAND ) return;
+
+ if( cmd->menuactive && tvtime_is_menu_command( tvtime_cmd ) ) {
++ const int num_stations = station_get_num_stations( cmd->stationmgr );
++ const char *argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
+ int x, y, line;
+ switch( tvtime_cmd ) {
+ case TVTIME_MENU_EXIT:
+ menu_off( cmd );
+ break;
+ case TVTIME_MENU_UP:
+- cmd->curmenupos = (cmd->curmenupos + cmd->curmenusize - 1) % (cmd->curmenusize);
+- if( cmd->curusermenu ) menu_set_cursor( cmd->curusermenu, cmd->curmenupos );
+- display_current_menu( cmd );
++ if( cmd->channel_list_active && ( cmd->curmenupos == 0 ) ) {
++ if( !strcasecmp( argument, station_get_channel( cmd->stationmgr, 0 ) ) ) {
++ cmd->curmenupos = MAX_STATIONS - 1;
++ do {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd, cmd->channel_list - 1 );
++ argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
++ } while( strcasecmp( argument, station_get_channel( cmd->stationmgr, num_stations - 1 ) ) );
++ } else {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd, cmd->channel_list - 1 );
++ }
++ } else {
++ cmd->curmenupos = (cmd->curmenupos + cmd->curmenusize - 1) % (cmd->curmenusize);
++ if( cmd->curusermenu ) menu_set_cursor( cmd->curusermenu, cmd->curmenupos );
++ display_current_menu( cmd );
++ }
+ break;
+ case TVTIME_MENU_DOWN:
+- cmd->curmenupos = (cmd->curmenupos + 1) % (cmd->curmenusize);
+- if( cmd->curusermenu ) menu_set_cursor( cmd->curusermenu, cmd->curmenupos );
+- display_current_menu( cmd );
++ if( cmd->channel_list_active && ( cmd->curmenupos == MAX_STATIONS - 1 ) ) {
++ if( !strcasecmp( argument, station_get_channel( cmd->stationmgr, num_stations - 1 ) ) ) {
++ cmd->curmenupos = 0;
++ do {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd, cmd->channel_list + 1 );
++ argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
++ } while( strcasecmp( argument, station_get_channel( cmd->stationmgr, 0 ) ) );
++ } else {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd, cmd->channel_list + 1 );
++ }
++ } else {
++ cmd->curmenupos = (cmd->curmenupos + 1) % (cmd->curmenusize);
++ if( cmd->curusermenu ) menu_set_cursor( cmd->curusermenu, cmd->curmenupos );
++ display_current_menu( cmd );
++ }
+ break;
+ case TVTIME_MENU_BACK: menu_back( cmd ); break;
+ case TVTIME_MENU_ENTER: menu_enter( cmd ); break;
+@@ -2128,6 +2219,9 @@
+ menu_off( cmd );
+ }
+ break;
++ case TVTIME_CHANNEL_LIST:
++ menu_off( cmd );
++ break;
+ case TVTIME_MOUSE_MOVE:
+ sscanf( arg, "%d %d", &x, &y );
+ if( cmd->halfsize ) y *= 2;
+@@ -2213,6 +2307,24 @@
+ }
+ break;
+
++ case TVTIME_CHANNEL_LIST:
++ if( cmd->vidin && videoinput_has_tuner( cmd->vidin ) ) {
++ if( cmd->osd ) {
++ if( set_menu( cmd, "channel-list" ) ) {
++ cmd->channel_list_active = 1;
++ const int num_stations = station_get_num_stations( cmd->stationmgr );
++ if( station_get_current_pos( cmd->stationmgr ) < MAX_STATIONS ) {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd,
++ atoi( station_get_channel( cmd->stationmgr, 0 ) ) );
++ } else {
++ cmd->channel_list = display_channel_list( cmd, cmd->osd,
++ station_get_current_pos( cmd->stationmgr ) - MAX_STATIONS + 2 );
++ }
++ }
++ }
++ }
++ break;
++
+ case TVTIME_SHOW_EPG:
+ if( cmd->vidin && videoinput_has_tuner( cmd->vidin ) ) {
+ if( cmd->osd ) {
+@@ -2897,8 +3009,10 @@
+ /* Decode the input char from commands. */
+ if( cmd->digit_counter == 0 ) memset( cmd->next_chan_buffer, 0, 5 );
+ cmd->next_chan_buffer[ cmd->digit_counter ] = arg[ 0 ];
+- cmd->digit_counter++;
+- cmd->frame_counter = cmd->delay;
++ if( first_digit( atoi( cmd->next_chan_buffer ) ) != 0 ) {
++ cmd->digit_counter++;
++ cmd->frame_counter = cmd->delay;
++ }
+
+ /**
+ * Send an enter command if we type more
+@@ -3365,21 +3479,46 @@
+
+ case TVTIME_ENTER:
+ if( cmd->next_chan_buffer[ 0 ] ) {
+- if( cmd->renumbering ) {
+- station_remap( cmd->stationmgr, atoi( cmd->next_chan_buffer ) );
+- station_writeconfig( cmd->stationmgr );
+- cmd->renumbering = 0;
+- if( cmd->osd ) tvtime_osd_set_hold_message( cmd->osd, "", 0 );
+- }
+- if( station_set( cmd->stationmgr, atoi( cmd->next_chan_buffer ) ) ) {
+- cmd->change_channel = 1;
+- } else {
+- snprintf( cmd->next_chan_buffer, sizeof( cmd->next_chan_buffer ),
+- "%d", station_get_current_id( cmd->stationmgr ) );
+- if( cmd->osd ) {
+- tvtime_osd_set_channel_number( cmd->osd, cmd->next_chan_buffer );
++ if( cmd->channel_list_active ) {
++ const char *argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
++ if( atoi( cmd->next_chan_buffer ) <= station_get_num_stations( cmd->stationmgr ) ) {
++ do {
++ if( atoi( cmd->next_chan_buffer ) < atoi( station_get_channel( cmd->stationmgr, atoi( argument ) - 1 ) ) ) {
++ commands_handle( cmd, TVTIME_MENU_UP, "" );
++ } else {
++ commands_handle( cmd, TVTIME_MENU_DOWN, "" );
++ }
++ argument = tvtime_osd_list_get_enter_argument( cmd->osd, cmd->curmenupos + 1 );
++ } while( strcasecmp( argument, station_get_channel( cmd->stationmgr, atoi( cmd->next_chan_buffer ) - 1 ) ) );
++ if( cmd->osd ) {
++ tvtime_osd_set_channel_number( cmd->osd, cmd->next_chan_buffer );
++ tvtime_osd_show_info( cmd->osd );
++ }
++ } else if( cmd->osd ) {
++ tvtime_osd_set_channel_number( cmd->osd, argument );
+ tvtime_osd_show_info( cmd->osd );
+ }
++ } else {
++ if( cmd->renumbering ) {
++ if( atoi( cmd->next_chan_buffer ) <= station_get_num_stations( cmd->stationmgr ) ) {
++ if( first_digit( atoi( cmd->next_chan_buffer ) ) != 0 ) {
++ station_remap( cmd->stationmgr, atoi( cmd->next_chan_buffer ) );
++ station_writeconfig( cmd->stationmgr );
++ cmd->renumbering = 0;
++ }
++ }
++ if( cmd->osd ) tvtime_osd_set_hold_message( cmd->osd, "", 0 );
++ }
++ if( station_set( cmd->stationmgr, atoi( cmd->next_chan_buffer ) ) ) {
++ cmd->change_channel = 1;
++ } else {
++ snprintf( cmd->next_chan_buffer, sizeof( cmd->next_chan_buffer ),
++ "%d", station_get_current_id( cmd->stationmgr ) );
++ if( cmd->osd ) {
++ tvtime_osd_set_channel_number( cmd->osd, cmd->next_chan_buffer );
++ tvtime_osd_show_info( cmd->osd );
++ }
++ }
+ }
+ } else {
+ if( cmd->renumbering ) {
+@@ -3501,12 +3640,24 @@
+ if( cmd->osd ) tvtime_osd_set_hold_message( cmd->osd, "", 0 );
+ cmd->renumbering = 0;
+ }
++ if( cmd->channel_list_active ) {
++ snprintf( cmd->next_chan_buffer, sizeof( cmd->next_chan_buffer ),
++ "%d", station_get_current_id( cmd->stationmgr ) );
++ if( cmd->osd ) {
++ tvtime_osd_set_channel_number( cmd->osd, cmd->next_chan_buffer );
++ tvtime_osd_set_channel_name( cmd->osd, station_get_current_channel_name( cmd->stationmgr ) );
++ }
++ }
+ }
+
+ if( cmd->frame_counter > 0 && !(cmd->frame_counter % 5)) {
+ char input_text[6];
+
+- strcpy( input_text, cmd->next_chan_buffer );
++ if( first_digit( atoi( cmd->next_chan_buffer ) ) != 0 ) {
++ strcpy( input_text, cmd->next_chan_buffer );
++ } else {
++ strcpy( input_text, "" );
++ }
+ if( !(cmd->frame_counter % 10) ) {
+ strcat( input_text, "_" );
+ } else {
+@@ -3514,6 +3665,11 @@
+ }
+ if( cmd->osd ) {
+ tvtime_osd_set_channel_number( cmd->osd, input_text );
++ if( cmd->channel_list_active ) {
++ tvtime_osd_set_channel_name( cmd->osd, "" );
++ tvtime_osd_show_program_info( cmd->osd, 0, 0, 0 );
++ tvtime_osd_set_info_available( cmd->osd, 0 );
++ }
+ tvtime_osd_show_info( cmd->osd );
+ }
+ }
+Index: tvtime-1.0.2/docs/man/de/tvtime-command.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/de/tvtime-command.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/de/tvtime-command.1 2013-04-11 11:25:41.569560600 +0000
+@@ -86,6 +86,10 @@
+ auseinanderliegen.
+
+ .TP
++.B CHANNEL_LIST
++Dieser Befehl wird verwendet, um die Kanalliste.
++
++.TP
+ .B CHANNEL_RENUMBER
+ Verschiebt den aktuellen Kanal auf einen anderen Senderspeicher. Diese
+ Funktion tauscht den Speicherplatz des gerade aktiven Kanals mit dem, dessen
+Index: tvtime-1.0.2/docs/man/en/tvtime-command.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/en/tvtime-command.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/en/tvtime-command.1 2013-04-11 11:25:41.569560600 +0000
+@@ -82,6 +82,10 @@
+ forth between two programs on distant channels.
+
+ .TP
++.B CHANNEL_LIST
++This command is used to bring up channel list.
++
++.TP
+ .B CHANNEL_RENUMBER
+ Renumbers the current channel. This will swap the current channel with
+ the number you type in. Use this to configure your station list to suit
+Index: tvtime-1.0.2/docs/man/es/tvtime-command.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/es/tvtime-command.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/es/tvtime-command.1 2013-04-11 11:25:41.569560600 +0000
+@@ -88,6 +88,10 @@
+ para hacer zapping entre dos programas que están en canales distantes.
+
+ .TP
++.B CHANNEL_LIST
++Este comando se utiliza para mostrar la lista de canales.
++
++.TP
+ .B CHANNEL_RENUMBER
+ Renumera el canal actual. Intercambiará el canal actual con el número
+ que escribas. Úsalo para configurar tu lista de canales para acomodarla
+Index: tvtime-1.0.2/docs/man/de/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/de/tvtime.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/de/tvtime.1 2013-04-11 11:25:41.569560600 +0000
+@@ -72,6 +72,9 @@
+ .I F1 oder Tab
+ Men anzeigen
+ .TP
++.I u
++Zeige Kanalliste
++.TP
+ .I hoch/runter
+ Sender whlen
+ .TP
+Index: tvtime-1.0.2/docs/man/en/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/en/tvtime.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/en/tvtime.1 2013-04-11 11:25:41.569560600 +0000
+@@ -69,6 +69,9 @@
+ .I F1 or tab
+ Show menu
+ .TP
++.I u
++Show channel list
++.TP
+ .I up/down
+ Change channels
+ .TP
+Index: tvtime-1.0.2/docs/man/es/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/es/tvtime.1 2013-04-11 11:25:41.573560600 +0000
++++ tvtime-1.0.2/docs/man/es/tvtime.1 2013-04-11 11:25:41.569560600 +0000
+@@ -75,6 +75,9 @@
+ .I F1 o tabulador
+ Mostrar men
+ .TP
++.I u
++Mostrar lista de canales
++.TP
+ .I up/down
+ Cambiar canal
+ .TP
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-closed_caption.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-closed_caption.patch
@@ -0,0 +1,22 @@
+## Description: Import patch from tvtime sourceforge tracker related to CC double-byte chars.
+## Origin: upstream, http://sourceforge.net/tracker/?func=detail&aid=1564644&group_id=64301&atid=506989
+## Bug-Ubuntu:
+## Bug-Debian:
+## Author: Nick Duffek
+## Forwarded: not-needed
+Index: tvtime-1.0.2/src/vbidata.c
+===================================================================
+--- tvtime-1.0.2.orig/src/vbidata.c 2012-03-07 12:00:24.649905242 +0000
++++ tvtime-1.0.2/src/vbidata.c 2012-03-07 12:05:38.737895907 +0000
+@@ -601,7 +601,10 @@
+ return 0;
+ }
+
+- if( vbi->vs && vbi->enabled && b1 >= 0x10 && b1 <= 0x1F && b2 >= 0x20 && b2 <= 0x7F ) {
++ if( vbi->vs && vbi->enabled && b1 >= 0x10 && b1 <= 0x1F && b2 >= 0x20 && b2 <= 0x7F
++ /* Double-byte characters are distinguishable from control codes by
++ having bit 6 clear and bit 4 set. */
++ && (b2 & 0x50) != 0x10 ) {
+ int code;
+ if( (b2 & 64) ) {
+ /* Preamble Code */
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-command.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-command.patch
@@ -0,0 +1,23 @@
+## Description: Fix crash on "tvtime-command set_input_width 720"
+## Origin: upstream, http://tvtime.cvs.sourceforge.net/viewvc/tvtime/tvtime/src/commands.c?r1=1.290&r2=1.291&view=patch
+## Bug-Ubuntu: http://launchpad.net/bugs/947850
+## Bug-Debian:
+## Author: Mikael Magnusson
+## Forwarded: not-needed
+Index: tvtime-1.0.2/src/commands.c
+===================================================================
+--- tvtime-1.0.2.orig/src/commands.c 2012-03-06 10:06:33.705435710 +0000
++++ tvtime-1.0.2/src/commands.c 2012-03-06 10:32:57.229388640 +0000
+@@ -2402,12 +2402,10 @@
+ case TVTIME_SET_INPUT_WIDTH:
+ cmd->newinputwidth = atoi( arg );
+ if( cmd->osd ) {
+- const char *curname = menu_get_name( cmd->curusermenu );
+ menu_t *sharpmenu = commands_get_menu( cmd, "hres" );
+ char message[ 128 ];
+ int maxw = cmd->vidin? videoinput_get_maxwidth( cmd->vidin ) : 0;
+ reset_inputwidth_menu( sharpmenu, cmd->newinputwidth, maxw );
+- curname = menu_get_name( cmd->curusermenu );
+ commands_refresh_menu( cmd );
+ snprintf( message, sizeof( message ),
+ _("Horizontal resolution will be %d pixels on restart."),
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-cpuid.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-cpuid.patch
@@ -0,0 +1,55 @@
+## Description: Update for cpuaccel.c from http://stapelspeicher.org/tvtime/patches/ (originally from libmpeg2).
+## Origin: upstream, http://stapelspeicher.org/tvtime/patches/tvtime-cpuid.patch
+## Bug-Ubuntu:
+## Bug-Debian:
+## Author: Mikael Magnusson
+## Forwarded: not-needed
+Index: tvtime-1.0.2/src/cpu_accel.c
+===================================================================
+--- tvtime-1.0.2.orig/src/cpu_accel.c 2012-03-06 12:25:30.479258191 +0000
++++ tvtime-1.0.2/src/cpu_accel.c 2012-03-06 12:29:10.303251655 +0000
+@@ -35,7 +35,7 @@
+ int AMD;
+ uint32_t caps;
+
+-#ifndef PIC
++#if defined(__x86_64__) || (!defined(PIC) && !defined(__PIC__))
+ #define cpuid(op,eax,ebx,ecx,edx) \
+ __asm__ ("cpuid" \
+ : "=a" (eax), \
+@@ -44,7 +44,7 @@
+ "=d" (edx) \
+ : "a" (op) \
+ : "cc")
+-#else /* PIC version : save ebx */
++#else /* PIC version : save ebx (not needed on x86_64) */
+ #define cpuid(op,eax,ebx,ecx,edx) \
+ __asm__ ("pushl %%ebx\n\t" \
+ "cpuid\n\t" \
+@@ -58,17 +58,17 @@
+ : "cc")
+ #endif
+
+-#ifdef ARCH_386
+- __asm__ ("pushfl\n\t"
+- "pushfl\n\t"
+- "popl %0\n\t"
++#ifndef __x86_64__ /* x86_64 supports the cpuid op */
++ __asm__ ("pushf\n\t"
++ "pushf\n\t"
++ "pop %0\n\t"
+ "movl %0,%1\n\t"
+ "xorl $0x200000,%0\n\t"
+- "pushl %0\n\t"
+- "popfl\n\t"
+- "pushfl\n\t"
+- "popl %0\n\t"
+- "popfl"
++ "push %0\n\t"
++ "popf\n\t"
++ "pushf\n\t"
++ "pop %0\n\t"
++ "popf"
+ : "=r" (eax),
+ "=r" (ebx)
+ :
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-cursor.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-cursor.patch
@@ -0,0 +1,34 @@
+## Description: Fix nocursor using uninitialized pixmap data.
+## Origin: upstream, http://tvtime.cvs.sourceforge.net/viewvc/tvtime/tvtime/src/xcommon.c?r1=1.69&r2=1.70&view=patch
+## Bug-Ubuntu:
+## Bug-Debian:
+## Author: Mikael Magnusson
+## Forwarded: not-needed
+Index: tvtime-1.0.2/src/xcommon.c
+===================================================================
+--- tvtime-1.0.2.orig/src/xcommon.c 2012-03-06 10:36:58.325381470 +0000
++++ tvtime-1.0.2/src/xcommon.c 2012-03-06 10:47:05.901363409 +0000
+@@ -827,7 +827,7 @@
+ XEvent xev;
+ XSizeHints hint;
+ XClassHint classhint;
+- XColor curs_col;
++ XColor curs_col = { 0 };
+ XSetWindowAttributes xswa;
+ const char *hello = "tvtime";
+ unsigned long mask;
+@@ -1081,13 +1081,7 @@
+ XMaskEvent( display, StructureNotifyMask, &xev );
+
+ /* Create a 1 pixel cursor to use in full screen mode */
+- curs_pix = XCreatePixmap( display, output_window, 1, 1, 1 );
+- curs_col.pixel = 0;
+- curs_col.red = 0;
+- curs_col.green = 0;
+- curs_col.blue = 0;
+- curs_col.flags = 0;
+- curs_col.pad = 0;
++ curs_pix = XCreateBitmapFromData( display, output_window, (const char []){0}, 1, 1 );
+ nocursor = XCreatePixmapCursor( display, curs_pix, curs_pix, &curs_col, &curs_col, 1, 1 );
+ XDefineCursor( display, output_window, nocursor );
+ XSetIconName( display, wm_window, "tvtime" );
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-focus_mouse.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-focus_mouse.patch
@@ -0,0 +1,55 @@
+## Description: Don't force focus follows mouse mode for our window, that's up to the window manager to decide.
+## Origin: upstream, http://tvtime.cvs.sourceforge.net/viewvc/tvtime/tvtime/src/xcommon.c?r1=1.73&r2=1.74&view=patch
+## Bug-Ubuntu:
+## Bug-Debian:
+## Author: Mikael Magnusson
+## Forwarded: not-needed
+Index: tvtime-1.0.2/src/xcommon.c
+===================================================================
+--- tvtime-1.0.2.orig/src/xcommon.c 2012-03-06 10:56:03.405347433 +0000
++++ tvtime-1.0.2/src/xcommon.c 2012-03-06 11:03:48.141333624 +0000
+@@ -1389,7 +1389,6 @@
+ int reconfigure = 0;
+ int reconfwidth = 0;
+ int reconfheight = 0;
+- int getfocus = 0;
+ int motion = 0;
+ int motion_x = 0;
+ int motion_y = 0;
+@@ -1460,9 +1459,6 @@
+ XUndefineCursor( display, output_window );
+ motion_timeout = 30;
+ break;
+- case EnterNotify:
+- getfocus = 1;
+- break;
+ case FocusIn:
+ has_focus = 1;
+ break;
+@@ -1646,7 +1642,6 @@
+ input_callback( in, I_BUTTONPRESS, event.xbutton.button );
+ lastpresstime = event.xbutton.time;
+ }
+- getfocus = 1;
+ break;
+ case ButtonRelease:
+ xcommon_update_server_time( event.xbutton.time );
+@@ -1654,7 +1649,6 @@
+ input_callback( in, I_BUTTONRELEASE, event.xbutton.button );
+ lastreleasetime = event.xbutton.time;
+ }
+- getfocus = 1;
+ break;
+ default: break;
+ }
+@@ -1664,10 +1658,6 @@
+ input_callback( in, I_MOUSEMOVE, ((motion_x & 0xffff) << 16 | (motion_y & 0xffff)) );
+ }
+
+- if( getfocus ) {
+- XSetInputFocus( display, wm_window, RevertToPointerRoot, CurrentTime );
+- }
+-
+ if( !has_ewmh_state_fullscreen && output_fullscreen ) {
+ /**
+ * We used to check if we still have focus too.
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-libsupc++.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-libsupc++.patch
@@ -0,0 +1,16 @@
+Description: Link to libsupc++ instead of bringing in libstdc++.
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tvtime/+bug/1265576
+Author: POJAR GEORGE
+Index: tvtime-1.0.2/src/Makefile.am
+===================================================================
+--- tvtime-1.0.2.orig/src/Makefile.am 2014-01-02 16:24:23.902705937 +0000
++++ tvtime-1.0.2/src/Makefile.am 2014-01-02 16:53:38.174653789 +0000
+@@ -83,7 +83,7 @@
+ $(PLUGIN_CFLAGS) $(X11_CFLAGS) $(XML2_FLAG) \
+ $(FONT_CFLAGS) $(AM_CFLAGS) $(ALSA_CFLAGS)
+ tvtime_LDFLAGS = $(TTF_LIBS) $(ZLIB_LIBS) $(PNG_LIBS) \
+- $(X11_LIBS) $(XML2_LIBS) $(ALSA_LIBS) -lm -lstdc++ -lasound
++ $(X11_LIBS) $(XML2_LIBS) $(ALSA_LIBS) -lm -lsupc++ -lasound
+
+ tvtime_command_SOURCES = utils.h utils.c tvtimeconf.h tvtimeconf.c \
+ tvtime-command.c
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2-menu.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2-menu.patch
@@ -0,0 +1,48 @@
+## Description: Change default right mouse button bind to leave menu when in menu.
+## Origin: upstream, http://tvtime.cvs.sourceforge.net/viewvc/tvtime/tvtime/src/tvtimeconf.c?r1=1.265&r2=1.266&view=patch
+## Bug-Ubuntu:
+## Bug-Debian:
+## Author: Mikael Magnusson
+## Forwarded: not-needed
+Index: tvtime-1.0.2/docs/html/default.tvtime.xml
+===================================================================
+--- tvtime-1.0.2.orig/docs/html/default.tvtime.xml 2012-03-06 10:36:58.285381471 +0000
++++ tvtime-1.0.2/docs/html/default.tvtime.xml 2012-03-06 10:58:47.021342568 +0000
+@@ -513,12 +513,12 @@
+
+
+
++
+
+
+
+
+
+-
+
+
+
+Index: tvtime-1.0.2/src/epg.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ tvtime-1.0.2/src/epg.c 2013-08-26 13:42:23.576595650 +0000
+@@ -0,0 +1,214 @@
++/**
++ * Copyright (c) 2005 Marijn van Galen
++ *
++ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ */
++
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++#ifdef ENABLE_NLS
++# define _(string) gettext (string)
++# include "gettext.h"
++#else
++# define _(string) (string)
++#endif
++
++#include "commands.h"
++#include "utils.h"
++#include "xmltv.h"
++#include "station.h"
++
++#define BUF_LENGTH 255
++
++/**
++ * Draws electronic programguide based on XMLTV data
++ *
++ * PRE: osd : initialized tvtime osd
++ * page : number of the page we want to show, starting with 1
++ * stationmgr : actual stationmanager
++ * xmltv : initialized xmltv object
++ *
++ * RETURNS: pagenumber of the page showing if there is one, 0 otherwise
++ *
++ */
++
++int epg_show_nowandnext( tvtime_osd_t* osd, int page, station_mgr_t *stationmgr, xmltv_t *xmltv )
++{
++ if ( !page )
++ return 0;
++ if ( xmltv ){
++ const int max_num_lines = 15;
++ const int num_station_per_page = max_num_lines / 3;
++ const int num_stations = station_get_num_stations( stationmgr );
++ char *old_channel = strdup( xmltv_get_channel( xmltv ) );
++ char buf[ BUF_LENGTH + 1 ];
++ int i, count, cur = 0;
++
++ /* List Header */
++ snprintf( buf, sizeof( buf ), "Now showing and next on (%d/%d):", page, ( num_stations/num_station_per_page ) + ( ( num_stations % num_station_per_page ) ? 1 : 0 ));
++ tvtime_osd_list_set_text( osd, cur++, buf );
++ tvtime_osd_list_set_hilight( osd, -1 );
++
++ for ( i = ( page - 1 ) * num_station_per_page, count = 0; ( i < num_stations ) && ( count < num_station_per_page ); i++, count++ ) {
++ const char *xmltv_id = 0;
++ if ( !( xmltv_id = station_get_xmltv_id( stationmgr, i) ) )
++ xmltv_id = xmltv_lookup_channel( xmltv, station_get_name( stationmgr, i ) );
++ xmltv_set_channel( xmltv, xmltv_id );
++ xmltv_refresh( xmltv );
++ /* Channel number + name */
++ snprintf( buf, sizeof( buf ), "[%s] %s:", station_get_channel( stationmgr,i ), station_get_name( stationmgr, i) );
++ tvtime_osd_list_set_multitext( osd, cur++, buf, 1 );
++
++ if ( xmltv_get_title( xmltv ) ) {
++ char start_time[ 50 ];
++ char end_time[ 50 ];
++ time_t start_timestamp = xmltv_get_start_time( xmltv );
++ time_t end_timestamp = xmltv_get_end_time( xmltv );
++ strftime( start_time, 50, "%H:%M", localtime( &start_timestamp ) );
++ strftime( end_time, 50, "%H:%M", localtime( &end_timestamp ) );
++
++ /* Highlight if current channel */
++ if ( station_get_current_id( stationmgr ) == i + 1 )
++ tvtime_osd_list_set_hilight( osd, cur - 1 );
++
++ /* starttime of current program + Now showing program */
++ snprintf( buf, sizeof( buf ), "\32 %s %s", start_time, xmltv_get_title( xmltv ) );
++ if ( xmltv_get_sub_title( xmltv ) ) {
++ strncat( buf, " (", BUF_LENGTH - strlen( buf ) );
++ strncat(buf, xmltv_get_sub_title( xmltv ), BUF_LENGTH - strlen( buf ) );
++ strncat( buf, ")", BUF_LENGTH - strlen( buf ) );
++ }
++ tvtime_osd_list_set_multitext( osd, cur++, buf, 1 );
++
++ /* endtime of current programme + Next program */
++ snprintf( buf, sizeof( buf ), "\32 %s %s", end_time, xmltv_get_next_title( xmltv ) ? xmltv_get_next_title( xmltv ) : "" );
++ if ( xmltv_get_next_sub_title( xmltv ) ) {
++ strncat( buf, " (", BUF_LENGTH - strlen( buf ) );
++ strncat( buf, xmltv_get_next_sub_title( xmltv ), BUF_LENGTH - strlen( buf ) );
++ strncat( buf, ")", BUF_LENGTH - strlen( buf ) );
++ }
++ tvtime_osd_list_set_multitext( osd, cur++, buf, 1);
++
++ } else {
++ /* No XMLTV information for this channel */
++ tvtime_osd_list_set_text( osd, cur++, "" );
++ tvtime_osd_list_set_text( osd, cur++, "" );
++ }
++
++ }
++ tvtime_osd_list_set_lines( osd, cur );
++ tvtime_osd_show_list( osd, 1, 1 );
++
++ xmltv_set_channel( xmltv, old_channel );
++ free( old_channel );
++ xmltv_refresh( xmltv );
++
++ if ( cur > 1 ) {
++ return page;
++ } else {
++ return 0;
++ }
++ } else {
++ tvtime_osd_list_set_text( osd, 0, "No program information available" );
++ tvtime_osd_list_set_lines( osd, 1 );
++ tvtime_osd_show_list( osd, 1, 1 );
++ return !page;
++ }
++}
++
++int epg_show_perchannel( tvtime_osd_t* osd, int page, station_mgr_t *stationmgr, xmltv_t *xmltv, int channel )
++{
++ if ( !page )
++ return 0;
++ if ( xmltv ){
++ const int max_num_lines = 15;
++// const int num_station_per_page = max_num_lines / 3;
++ const int num_stations = station_get_num_stations( stationmgr );
++ char *old_channel = strdup( xmltv_get_channel( xmltv ) );
++ char buf[ BUF_LENGTH + 1 ];
++ int cur = 0;
++ time_t curtime = time( 0 );
++ const char *xmltv_id = 0;
++
++ if ( channel > num_stations )
++ channel = 1;
++ else if ( channel < 1 )
++ channel = num_stations;
++
++ if ( !( xmltv_id = station_get_xmltv_id( stationmgr, channel - 1 ) ) )
++ xmltv_id = xmltv_lookup_channel( xmltv, station_get_name( stationmgr, channel - 1 ) );
++ xmltv_set_channel( xmltv, xmltv_id );
++ xmltv_refresh_withtime( xmltv, curtime );
++
++ /* List header with Channel number + name */
++ snprintf( buf, sizeof( buf ), "%d Next on [%s] %s:", channel, station_get_channel( stationmgr, channel - 1), station_get_name( stationmgr, channel - 1 ) );
++ tvtime_osd_list_set_text( osd, cur++, buf );
++ tvtime_osd_list_set_hilight( osd, -1 );
++
++ while ( ( cur - 1 ) < max_num_lines ) {
++ xmltv_refresh_withtime( xmltv, curtime );
++
++ if ( xmltv_get_title( xmltv ) ) {
++ char start_time[ 50 ];
++ time_t start_timestamp = xmltv_get_start_time( xmltv );
++ time_t end_timestamp = xmltv_get_end_time( xmltv );
++ strftime( start_time, 50, "%H:%M", localtime( &start_timestamp ) );
++
++ /* starttime of current program + Now showing program */
++ snprintf( buf, sizeof( buf ), "%s %s", start_time, xmltv_get_title( xmltv ) );
++ if ( xmltv_get_sub_title( xmltv ) ) {
++ strncat( buf, " (", BUF_LENGTH - strlen( buf ) );
++ strncat( buf, xmltv_get_sub_title( xmltv ), BUF_LENGTH - strlen( buf ) );
++ strncat( buf, ")", BUF_LENGTH - strlen( buf ) );
++ }
++ tvtime_osd_list_set_multitext( osd, cur++, buf, 1);
++
++ if ( !xmltv_get_next_title( xmltv ) ) {
++ char end_time[ 50 ];
++ /* no next program, print endtime of current programme */
++ strftime( end_time, 50, "%H:%M", localtime( &end_timestamp ) );
++ snprintf( buf, sizeof( buf ), "%s %s", end_time, "" );
++ tvtime_osd_list_set_multitext( osd, cur++, buf, 1 );
++ }
++ curtime = end_timestamp;
++
++ } else {
++ /* No XMLTV information for this channel */
++ tvtime_osd_list_set_text( osd, cur++, "" );
++ }
++
++ }
++ tvtime_osd_list_set_lines( osd, cur );
++ tvtime_osd_show_list( osd, 1, 1 );
++
++ xmltv_set_channel( xmltv, old_channel );
++ free( old_channel );
++ xmltv_refresh( xmltv );
++
++ } else {
++ tvtime_osd_list_set_text( osd, 0, "No program information available" );
++ tvtime_osd_list_set_lines( osd, 1 );
++ tvtime_osd_show_list( osd, 1, 1 );
++ }
++ return channel;
++}
+Index: tvtime-1.0.2/src/epg.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ tvtime-1.0.2/src/epg.h 2013-08-26 13:37:57.820603550 +0000
+@@ -0,0 +1,18 @@
++/*
++ * 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ */
++
++int epg_show_nowandnext( tvtime_osd_t* osd, int page, station_mgr_t *stationmgr, xmltv_t *xmltv );
++int epg_show_perchannel( tvtime_osd_t* osd, int page, station_mgr_t *stationmgr, xmltv_t *xmltv, int channel );
+Index: tvtime-1.0.2/docs/man/de/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/de/tvtime.1 2013-08-26 13:37:57.824603550 +0000
++++ tvtime-1.0.2/docs/man/de/tvtime.1 2013-08-26 13:38:02.000000000 +0000
+@@ -101,6 +101,9 @@
+ .TP
+ .I d
+ Statistiken zu Debug\-Zwecken anzeigen
++.TP
++.I g
++Zeigt TV Guide ber die TV-Programmdaten aus XMLTV
+ .RE
+
+ Die folgenden Tastenkommandos steuern erweiterte Funktionen von
+Index: tvtime-1.0.2/docs/man/en/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/en/tvtime.1 2013-08-26 13:37:57.824603550 +0000
++++ tvtime-1.0.2/docs/man/en/tvtime.1 2013-08-26 13:38:02.000000000 +0000
+@@ -98,6 +98,9 @@
+ .TP
+ .I d
+ Display debug statistics
++.TP
++.I g
++Shows TV Guide using the TV listings from XMLTV
+ .RE
+
+ Here are some advanced keys. These features are all configurable via the menu,
+Index: tvtime-1.0.2/docs/man/es/tvtime.1
+===================================================================
+--- tvtime-1.0.2.orig/docs/man/es/tvtime.1 2013-08-26 13:37:57.824603550 +0000
++++ tvtime-1.0.2/docs/man/es/tvtime.1 2013-08-26 13:38:02.000000000 +0000
+@@ -104,6 +104,9 @@
+ .TP
+ .I d
+ Mostrar informacin estadstica
++.TP
++.I g
++Muestra la gua de TV con la programacin de televisin de XMLTV
+ .RE
+
+ Existen teclas "avanzadas" cuyas funciones pueden encontrarse navegando en el men,
--- tvtime-1.0.2.orig/debian/patches/tvtime-1.0.2_cppcheck.patch
+++ tvtime-1.0.2/debian/patches/tvtime-1.0.2_cppcheck.patch
@@ -0,0 +1,496 @@
+Description: Fix severe errors in the code discovered with the cppcheck static code analysis tool.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712269
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tvtime/+bug/1094987
+Author: POJAR GEORGE
+Index: tvtime-1.0.2/intl/localcharset.c
+===================================================================
+--- tvtime-1.0.2.orig/intl/localcharset.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/intl/localcharset.c 2013-12-16 22:44:22.208215300 +0000
+@@ -107,7 +107,7 @@
+
+ /* Return a pointer to the contents of the charset.alias file. */
+ static const char *
+-get_charset_aliases ()
++get_charset_aliases (void)
+ {
+ const char *cp;
+
+@@ -115,11 +115,16 @@
+ if (cp == NULL)
+ {
+ #if !(defined VMS || defined WIN32)
+- FILE *fp;
+- const char *dir = relocate (LIBDIR);
++ const char *dir;
+ const char *base = "charset.alias";
+ char *file_name;
+
++ /* Make it possible to override the charset.alias location. This is
++ necessary for running the testsuite before "make install". */
++ dir = getenv ("CHARSETALIASDIR");
++ if (dir == NULL || dir[0] == '\0')
++ dir = relocate (LIBDIR);
++
+ /* Concatenate dir and base into freshly allocated file_name. */
+ {
+ size_t dir_len = strlen (dir);
+@@ -135,72 +140,104 @@
+ }
+ }
+
+- if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
+- /* Out of memory or file not found, treat it as empty. */
++ if (file_name == NULL)
++ /* Out of memory. Treat the file as empty. */
+ cp = "";
+ else
+ {
+- /* Parse the file's contents. */
+- int c;
+- char buf1[50+1];
+- char buf2[50+1];
+- char *res_ptr = NULL;
+- size_t res_size = 0;
+- size_t l1, l2;
+-
+- for (;;)
+- {
+- c = getc (fp);
+- if (c == EOF)
+- break;
+- if (c == '\n' || c == ' ' || c == '\t')
+- continue;
+- if (c == '#')
+- {
+- /* Skip comment, to end of line. */
+- do
+- c = getc (fp);
+- while (!(c == EOF || c == '\n'));
+- if (c == EOF)
+- break;
+- continue;
+- }
+- ungetc (c, fp);
+- if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+- break;
+- l1 = strlen (buf1);
+- l2 = strlen (buf2);
+- if (res_size == 0)
+- {
+- res_size = l1 + 1 + l2 + 1;
+- res_ptr = (char *) malloc (res_size + 1);
+- }
+- else
+- {
+- res_size += l1 + 1 + l2 + 1;
+- res_ptr = (char *) realloc (res_ptr, res_size + 1);
+- }
+- if (res_ptr == NULL)
+- {
+- /* Out of memory. */
+- res_size = 0;
+- break;
+- }
+- strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+- strcpy (res_ptr + res_size - (l2 + 1), buf2);
+- }
+- fclose (fp);
+- if (res_size == 0)
+- cp = "";
+- else
+- {
+- *(res_ptr + res_size) = '\0';
+- cp = res_ptr;
+- }
+- }
++ int fd;
++
++ /* Open the file. Reject symbolic links on platforms that support
++ O_NOFOLLOW. This is a security feature. Without it, an attacker
++ could retrieve parts of the contents (namely, the tail of the
++ first line that starts with "* ") of an arbitrary file by placing
++ a symbolic link to that file under the name "charset.alias" in
++ some writable directory and defining the environment variable
++ CHARSETALIASDIR to point to that directory. */
++ fd = open (file_name,
++ O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
++ if (fd < 0)
++ /* File not found. Treat it as empty. */
++ cp = "";
++ else
++ {
++ FILE *fp;
++
++ fp = fdopen (fd, "r");
++ if (fp == NULL)
++ {
++ /* Out of memory. Treat the file as empty. */
++ close (fd);
++ cp = "";
++ }
++ else
++ {
++ /* Parse the file's contents. */
++ char *res_ptr = NULL;
++ size_t res_size = 0;
++
++ for (;;)
++ {
++ int c;
++ char buf1[50+1];
++ char buf2[50+1];
++ size_t l1, l2;
++ char *old_res_ptr;
++
++ c = getc (fp);
++ if (c == EOF)
++ break;
++ if (c == '\n' || c == ' ' || c == '\t')
++ continue;
++ if (c == '#')
++ {
++ /* Skip comment, to end of line. */
++ do
++ c = getc (fp);
++ while (!(c == EOF || c == '\n'));
++ if (c == EOF)
++ break;
++ continue;
++ }
++ ungetc (c, fp);
++ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
++ break;
++ l1 = strlen (buf1);
++ l2 = strlen (buf2);
++ old_res_ptr = res_ptr;
++ if (res_size == 0)
++ {
++ res_size = l1 + 1 + l2 + 1;
++ res_ptr = (char *) malloc (res_size + 1);
++ }
++ else
++ {
++ res_size += l1 + 1 + l2 + 1;
++ res_ptr = (char *) realloc (res_ptr, res_size + 1);
++ }
++ if (res_ptr == NULL)
++ {
++ /* Out of memory. */
++ res_size = 0;
++ free (old_res_ptr);
++ break;
++ }
++ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
++ strcpy (res_ptr + res_size - (l2 + 1), buf2);
++ }
++ fclose (fp);
++ if (res_size == 0)
++ cp = "";
++ else
++ {
++ *(res_ptr + res_size) = '\0';
++ cp = res_ptr;
++ }
++ }
++ }
+
+- if (file_name != NULL)
+- free (file_name);
++ free (file_name);
++ }
+
+ #else
+
+@@ -268,7 +305,7 @@
+ STATIC
+ #endif
+ const char *
+-locale_charset ()
++locale_charset (void)
+ {
+ const char *codeset;
+ const char *aliases;
+Index: tvtime-1.0.2/intl/localealias.c
+===================================================================
+--- tvtime-1.0.2.orig/intl/localealias.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/intl/localealias.c 2013-12-16 22:44:22.212215300 +0000
+@@ -303,7 +303,7 @@
+
+ if (nmap >= maxmap)
+ if (__builtin_expect (extend_alias_table (), 0))
+- return added;
++ goto out;
+
+ alias_len = strlen (alias) + 1;
+ value_len = strlen (value) + 1;
+@@ -316,7 +316,7 @@
+ ? alias_len + value_len : 1024));
+ char *new_pool = (char *) realloc (string_space, new_size);
+ if (new_pool == NULL)
+- return added;
++ goto out;
+
+ if (__builtin_expect (string_space != new_pool, 0))
+ {
+@@ -355,6 +355,7 @@
+ break;
+ }
+
++out:
+ /* Should we test for ferror()? I think we have to silently ignore
+ errors. --drepper */
+ fclose (fp);
+Index: tvtime-1.0.2/plugins/kdetv_greedyh.c
+===================================================================
+--- tvtime-1.0.2.orig/plugins/kdetv_greedyh.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/plugins/kdetv_greedyh.c 2013-12-16 22:44:22.212215300 +0000
+@@ -40,7 +40,7 @@
+ int width, int height )
+ {
+ TDeinterlaceInfo Info;
+- TPicture Picture[ 8 ];
++ TPicture Picture[ MAX_PICTURE_HISTORY ];
+ int stride = (width*2);
+ int i;
+
+Index: tvtime-1.0.2/plugins/kdetv_tomsmocomp.c
+===================================================================
+--- tvtime-1.0.2.orig/plugins/kdetv_tomsmocomp.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/plugins/kdetv_tomsmocomp.c 2013-12-16 22:44:22.212215300 +0000
+@@ -39,7 +39,7 @@
+ int width, int height )
+ {
+ TDeinterlaceInfo Info;
+- TPicture Picture[ 8 ];
++ TPicture Picture[ MAX_PICTURE_HISTORY ];
+ int stride = (width*2);
+ int i;
+
+Index: tvtime-1.0.2/src/leetft.c
+===================================================================
+--- tvtime-1.0.2.orig/src/leetft.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/leetft.c 2013-12-16 22:44:22.212215300 +0000
+@@ -75,9 +75,11 @@
+ fprintf( stderr, "leeft: Out of memory\n" );
+ return 0;
+ }
++
+ error = FT_Load_Glyph( font->face, glyph_index, FT_LOAD_NO_HINTING );
+ if( error ) {
+ fprintf( stderr, "leetft: Can't load glyph %ld\n", (long int) wchar );
++ free( cur );
+ return 0;
+ }
+
+@@ -85,6 +87,7 @@
+ if( error ) {
+ fprintf( stderr, "leetft: FT_Get_Glyph failure for glyph %ld\n",
+ (long int) wchar );
++ free( cur );
+ return 0;
+ }
+
+@@ -93,6 +96,7 @@
+ fprintf( stderr, "leetft: Can't copy glyph %ld\n", (long int) wchar );
+ FT_Done_Glyph( cur->glyph );
+ hashtable_delete( font->glyphdata, wchar );
++ free( cur );
+ return 0;
+ }
+
+@@ -102,6 +106,7 @@
+ FT_Done_Glyph( cur->glyph );
+ FT_Done_Glyph( cur->bitmap );
+ hashtable_delete( font->glyphdata, wchar );
++ free( cur );
+ return 0;
+ }
+
+Index: tvtime-1.0.2/src/tvtime.c
+===================================================================
+--- tvtime-1.0.2.orig/src/tvtime.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/tvtime.c 2013-12-16 22:48:56.680207141 +0000
+@@ -1282,6 +1282,7 @@
+ perf = performance_new( fieldtime );
+ if( !perf ) {
+ lfprintf( stderr, _("%s: Cannot allocate memory.\n"), argv[ 0 ] );
++ free( tvtime );
+ return 1;
+ }
+
+@@ -1290,6 +1291,7 @@
+ config_get_ntsc_cable_mode( ct ), verbose );
+ if( !stationmgr ) {
+ lfprintf( stderr, _("%s: Cannot allocate memory.\n"), argv[ 0 ] );
++ free( tvtime );
+ return 1;
+ }
+ station_set( stationmgr, config_get_prev_channel( ct ) );
+@@ -1376,7 +1378,12 @@
+
+ /* Set input size. */
+ if( !output->set_input_size( width, height ) ) {
+- /* FIXME: Clean up. */
++ if( vidin ) {
++ videoinput_delete( vidin );
++ }
++ performance_delete( perf );
++ station_delete( stationmgr );
++ free( tvtime );
+ return 1;
+ }
+
+@@ -1444,6 +1451,24 @@
+ blueframe = malloc( width * height * 2 );
+ if( !colourbars || !saveframe || !fadeframe || !blueframe ) {
+ lfprintf( stderr, _("%s: Cannot allocate memory.\n"), argv[ 0 ] );
++ if( vidin ) {
++ videoinput_delete( vidin );
++ }
++ performance_delete( perf );
++ station_delete( stationmgr );
++ free( tvtime );
++ if( colourbars ) {
++ free( colourbars );
++ }
++ if( saveframe ) {
++ free( saveframe );
++ }
++ if( fadeframe ) {
++ free( fadeframe );
++ }
++ if( blueframe ) {
++ free( blueframe );
++ }
+ return 1;
+ }
+ build_colourbars( colourbars, width, height );
+@@ -1494,6 +1519,8 @@
+ commands = commands_new( ct, vidin, stationmgr, osd, fieldtime );
+ if( !commands ) {
+ lfprintf( stderr, _("%s: Cannot allocate memory.\n"), argv[ 0 ] );
++ performance_delete( perf );
++ free( tvtime );
+ return 1;
+ }
+ build_deinterlacer_menu( commands_get_menu( commands, "deinterlacer" ),
+@@ -2600,6 +2627,7 @@
+ * file in "C" locale format.
+ */
+ strncpy( prevloc, setlocale( LC_NUMERIC, NULL ), sizeof( prevloc ) );
++ prevloc[ 255 ] = '\0';
+ setlocale( LC_NUMERIC, "C" );
+ snprintf( number, 4, "%2.1f",
+ commands_get_overscan( commands ) * 2.0 * 100.0 );
+Index: tvtime-1.0.2/src/tvtimeconf.c
+===================================================================
+--- tvtime-1.0.2.orig/src/tvtimeconf.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/tvtimeconf.c 2013-12-16 22:44:22.212215300 +0000
+@@ -413,6 +413,7 @@
+ * the config file in "C" locale format.
+ */
+ strncpy( prevloc, setlocale( LC_NUMERIC, NULL ), sizeof prevloc );
++ prevloc[ 255 ] = '\0';
+ setlocale( LC_NUMERIC, "C" );
+ ct->overscan = ( atof( curval ) / 2.0 ) / 100.0;
+ if( !isnormal( ct->overscan ) ) {
+@@ -1027,9 +1028,9 @@
+ if( fifofd >= 0 ) {
+ lfprintf( stderr,
+ _("Cannot run two instances of tvtime with the same configuration.\n") );
++ close( fifofd );
+ return 0;
+ }
+- close( fifofd );
+ }
+
+
+@@ -1226,9 +1227,9 @@
+ if( fifofd >= 0 ) {
+ lfprintf( stderr,
+ _("Cannot update configuration while tvtime running.\n") );
++ close( fifofd );
+ return 0;
+ }
+- close( fifofd );
+ }
+
+ ct->doc = configsave_open( ct->config_filename );
+Index: tvtime-1.0.2/src/utils.c
+===================================================================
+--- tvtime-1.0.2.orig/src/utils.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/utils.c 2013-12-16 22:44:22.212215300 +0000
+@@ -120,13 +120,14 @@
+ } else {
+ /* It exists, make sure it's a directory. */
+ DIR *temp_dir = opendir( path );
+- if( !path ) {
++ if( !temp_dir ) {
+ lfprintf( stderr, _("Cannot open %s: %s\n"),
+ path, strerror( errno ) );
+ } else {
+ closedir( temp_dir );
+ return 1;
+ }
++ closedir( temp_dir );
+ }
+ } else {
+ /* We created the directory, now force it to be owned by the user. */
+Index: tvtime-1.0.2/src/audiolib.c
+===================================================================
+--- tvtime-1.0.2.orig/src/audiolib.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/audiolib.c 2013-12-16 22:44:22.212215300 +0000
+@@ -77,16 +77,15 @@
+ int rv;
+ struct alsa_device *dev = malloc(sizeof(struct alsa_device));
+
++ if (dev == NULL)
++ return NULL;
++
+ dev->fmt.format = format;
+ dev->fmt.channels = channels;
+ dev->fmt.rate = rate;
+ dev->state = ALSA_STATE_STOPPED;
+
+- if (dev == NULL)
+- return NULL;
+-
+-
+- if ((result = snd_pcm_open( &dev->playback, output, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK))<0)
++ if ((result = snd_pcm_open( &dev->playback, output, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0)
+ {
+ free(dev);
+ return NULL;
+@@ -97,10 +96,11 @@
+ rv = alsa_set_params(dev->playback, &dev->fmt, 0);
+ if (rv == -1) {
+ snd_pcm_close(dev->playback);
++ free(dev);
+ return NULL;
+ }
+
+- if ((result = snd_pcm_open( &dev->capture, input, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK))<0)
++ if ((result = snd_pcm_open( &dev->capture, input, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK)) < 0)
+ {
+ snd_pcm_close(dev->playback);
+ free(dev);
+@@ -113,6 +113,7 @@
+ if (rv == -1) {
+ snd_pcm_close(dev->playback);
+ snd_pcm_close(dev->capture);
++ free(dev);
+ return NULL;
+ }
+
+Index: tvtime-1.0.2/src/vbidata.c
+===================================================================
+--- tvtime-1.0.2.orig/src/vbidata.c 2013-12-16 22:44:22.216215300 +0000
++++ tvtime-1.0.2/src/vbidata.c 2013-12-16 22:44:22.212215300 +0000
+@@ -1002,6 +1002,7 @@
+ if( vbi->fd < 0 ) {
+ fprintf( stderr, "vbidata: Can't open %s: %s\n",
+ vbi->filename, strerror( errno ) );
++ return;
+ } else {
+ vbi->open = 1;
+ }
--- tvtime-1.0.2.orig/debian/patches/typo.diff
+++ tvtime-1.0.2/debian/patches/typo.diff
@@ -0,0 +1,11 @@
+--- ./src/xvoutput.c.orig 2005-08-14 17:35:50.000000000 +0000
++++ ./src/xvoutput.c 2012-05-06 12:39:33.000000000 +0000
+@@ -159,7 +159,7 @@
+ "*** driver. If you are using an older NVIDIA card (TNT2), then\n"
+ "*** this capability is only available with their binary drivers.\n"
+ "*** For some ATI cards, this feature may be found in the experimental\n"
+- "*** GATOS drivers: http://gatos.souceforge.net/\n"
++ "*** GATOS drivers: http://gatos.sourceforge.net/\n"
+ "*** If unsure, please check with your distribution to see if your\n"
+ "*** X driver supports hardware overlay surfaces.\n\n" );
+ }
--- tvtime-1.0.2.orig/debian/po/POTFILES.in
+++ tvtime-1.0.2/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
--- tvtime-1.0.2.orig/debian/po/cs.po
+++ tvtime-1.0.2/debian/po/cs.po
@@ -0,0 +1,283 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: tvtime 1.0.2-6.1\n"
+"Report-Msgid-Bugs-To: tvtime@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-07 18:42+0200\n"
+"PO-Revision-Date: 2010-07-23 10:54+0200\n"
+"Last-Translator: Jan Outrata \n"
+"Language-Team: Czech \n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid "TV standard:"
+msgstr "TV norma:"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid ""
+"Please choose the TV standard to use. NTSC is used in North America, much of "
+"South America, and Japan; SECAM in France, the former USSR, and parts of "
+"Africa and the Middle East; and PAL elsewhere."
+msgstr ""
+"Zvolte prosím TV normu. NTSC se používá v Severní Americe, ve většině Jižní "
+"Ameriky a v Japonsku; SECAM ve Francii, bývalém SSSR, části Afriky a na "
+"Blízkém východě; a jinde PAL."
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Cable"
+msgstr "Kabel"
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Broadcast"
+msgstr "Pozemní vysílání"
+
+#. Type: select
+#. Choices
+#: ../templates:3001
+msgid "Cable including channels 100+"
+msgstr "Kabel včetně kanálů 100+"
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:3002 ../templates:4002 ../templates:5002
+msgid "Default frequency table:"
+msgstr "Výchozí tabulka frekvencí:"
+
+#. Type: select
+#. Description
+#: ../templates:3002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers. You should select \"Broadcast\" "
+"if you use an antenna for over-the-air signals."
+msgstr ""
+"Zvolte prosím tabulku frekvencí. Ta určuje, jaké frekvence odpovídají "
+"obvyklým číslům kanálů. Pokud používáte anténu pro příjem signálu "
+"přenášeného vzduchem, vyberte \"Pozemní vysílání\"."
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:4002 ../templates:5002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers."
+msgstr ""
+"Zvolte prosím tabulku frekvencí. Ta určuje, jaké frekvence odpovídají "
+"obvyklým číslům kanálů."
+
+#. Type: select
+#. Description
+#: ../templates:4002
+msgid ""
+"You should select \"Broadcast\" if you use an antenna for over-the-air "
+"signals."
+msgstr ""
+"Pokud používáte anténu pro příjem signálu přenášeného vzduchem, vyberte "
+"\"Pozemní vysílání\"."
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Europe"
+msgstr "Evropa"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "France"
+msgstr "Francie"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Russia"
+msgstr "Rusko"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia"
+msgstr "Austrálie"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "New Zealand"
+msgstr "Nový Zéland"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "China Broadcast"
+msgstr "Čínské pozemní vysílání"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia Optus"
+msgstr "Australský Optus"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Custom (must run tvtime-scanner first)"
+msgstr "Vlastní (nejprve musí být spuštěn tvtime-scanner)"
+
+#. Type: select
+#. Description
+#: ../templates:5002
+msgid ""
+"If you are a user of a cable company that does not use standard frequencies, "
+"you should select \"Custom\" and run the tvtime-scanner application before "
+"using tvtime."
+msgstr ""
+"Jste-li zákazníkem kabelového operátora, který nepoužívá normované "
+"frekvence, vyberte \"Vlastní\" a před použitím tvtime spusťte aplikaci "
+"tvtime-scanner."
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid "Default television capture device:"
+msgstr "Výchozí zařízení pro příjem televize:"
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid ""
+"Please choose the video4linux device which corresponds to your capture card."
+msgstr ""
+"Zvolte prosím video4linux zařízení, které odpovídá vaší televizní kartě."
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid "Device to use for VBI decoding:"
+msgstr "Zařízení pro dekódování VBI:"
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid ""
+"Please choose the device that will be used in NTSC areas for decoding closed "
+"captions and XDS channel information."
+msgstr ""
+"Zvolte prosím zařízení, které bude použito v oblastech s normou NTSC k "
+"dekódování kódovaného vysílání a informací o kanálu XDS."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid "Allow tvtime to run with root privileges?"
+msgstr "Povolit spouštění tvtime s právy roota?"
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"Please choose whether tvtime should be \"setuid root\", therefore getting "
+"root privileges when running."
+msgstr ""
+"Zvolte prosím, zda-li má mít tvtime \"setuid root\", tzn. běžet s právy "
+"roota."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"This allows tvtime to run at a high priority to ensure smooth video and "
+"should be used for high quality video output even during high CPU load."
+msgstr ""
+"To dovoluje tvtime běžet s vysokou prioritou k zajištění plynulého videa pro "
+"výstup videa ve vysoké kvalitě i při vysokém zatížení CPU."
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid "Process priority for the tvtime binary:"
+msgstr "Priorita procesu pro spustitelný soubor tvtime:"
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"This setting controls the priority of the tvtime process relative to other "
+"processes on the system."
+msgstr ""
+"Toto nastavení určuje prioritu procesu tvtime ve vztahu k ostatním procesům "
+"v systému."
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"Allowed values are integers between -19 and 19. Lower values indicate higher "
+"priority, and a value of 0 would give tvtime the same priority as a normal "
+"process."
+msgstr ""
+"Povolené hodnoty jsou čísla mezi -19 a 19. Nižší hodnoty značí vyšší "
+"prioritu a hodnota 0 dává tvtime stejnou prioritu jako běžnému procesu."
+
+#~ msgid ""
+#~ "Allowed values are integers between -20 and 19. Lower values indicate "
+#~ "higher priority, and a value of 0 would give tvtime the same priority as "
+#~ "a normal process."
+#~ msgstr ""
+#~ "Povolené hodnoty jsou čísla mezi -20 a 19. Nižší hodnoty značí vyšší "
+#~ "prioritu a hodnota 0 dává tvtime stejnou prioritu jako běžnému procesu."
+
+#~ msgid "NTSC, PAL, SECAM, PAL-Nc, PAL-M, PAL-N, NTSC-JP, PAL-60"
+#~ msgstr "NTSC, PAL, SECAM, PAL-Nc, PAL-M, PAL-N, NTSC-JP, PAL-60"
+
+#~| msgid "Select the default television standard for your location"
+#~ msgid "Default television standard for your location:"
+#~ msgstr "Vyberte výchozí televizní standard pro vaši oblast"
+
+#~ msgid ""
+#~ "North American users should select NTSC. Most areas in the world use PAL."
+#~ msgstr ""
+#~ "Uživatelé v Severní Americe by měli vybrat NTSC. Většina oblastí na světě "
+#~ "(včetně České republiky) používá PAL."
+
+#~ msgid ""
+#~ "Europe, France, Russia, Australia, New Zealand, China Broadcast, "
+#~ "Australia Optus, Custom (must run tvtime-scanner first)"
+#~ msgstr ""
+#~ "Evropa, Francie, Rusko, Austrálie, Nový Zéland, Čínské vysílání, "
+#~ "Australský Optus, Vlastní (musíte nejdříve spustit tvtime-scanner)"
+
+#~ msgid "Do you wish to make `/usr/bin/tvtime' setuid root?"
+#~ msgstr "Chcete u `/usr/bin/tvtime' nastavit SUID bit?"
--- tvtime-1.0.2.orig/debian/po/da.po
+++ tvtime-1.0.2/debian/po/da.po
@@ -0,0 +1,242 @@
+# Danish translation tvtime.
+# Copyright (C) 2010 tvtime & nedenstående oversættere.
+# This file is distributed under the same license as the tvtime package.
+# Joe Hansen , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: tvtime\n"
+"Report-Msgid-Bugs-To: tvtime@packages.debian.org\n"
+"POT-Creation-Date: 2012-05-06 12:57+0000\n"
+"PO-Revision-Date: 2010-07-21 17:30+01:00\n"
+"Last-Translator: Joe Hansen \n"
+"Language-Team: Danish \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid "TV standard:"
+msgstr "TV-standard:"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid ""
+"Please choose the TV standard to use. NTSC is used in North America, much of "
+"South America, and Japan; SECAM in France, the former USSR, and parts of "
+"Africa and the Middle East; and PAL elsewhere."
+msgstr ""
+"Vælg venligst TV-standard. NTSC bruges i Nordamerika, størstedelen af "
+"Sydamerika og Japan; SECAM i Frankrig, det tidligere Sovjetunionen, og dele "
+"af Afrika og Mellemøsten; og PAL alle andre steder."
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Cable"
+msgstr "Kabel"
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Broadcast"
+msgstr "Antenne"
+
+#. Type: select
+#. Choices
+#: ../templates:3001
+msgid "Cable including channels 100+"
+msgstr "Kabel med mere end 100 kanaler"
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:3002 ../templates:4002 ../templates:5002
+msgid "Default frequency table:"
+msgstr "Standardfrekvenstabel:"
+
+#. Type: select
+#. Description
+#: ../templates:3002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers. You should select \"Broadcast\" "
+"if you use an antenna for over-the-air signals."
+msgstr ""
+"Vælg venligst frekvenstabel. Den angiver hvilke frekvenser, som svarer til "
+"de kendte kanalnumre. Du skal vælge »Antenne«, hvis du bruger en antenne for "
+"luftbårne signaler."
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:4002 ../templates:5002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers."
+msgstr ""
+"Vælg venligst frekvenstabel. Den angiver hvilke frekvenser, som svarer til "
+"de kendte kanalnumre."
+
+#. Type: select
+#. Description
+#: ../templates:4002
+msgid ""
+"You should select \"Broadcast\" if you use an antenna for over-the-air "
+"signals."
+msgstr ""
+"Du skal vælge »Antenne«, hvis du bruger en antenne til luftbårne signaler."
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Europe"
+msgstr "Europa"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "France"
+msgstr "Frankrig"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Russia"
+msgstr "Rusland"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia"
+msgstr "Australien"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "New Zealand"
+msgstr "New Zealand"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "China Broadcast"
+msgstr "Kina - antenne"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia Optus"
+msgstr "Australien - optus"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Custom (must run tvtime-scanner first)"
+msgstr "Tilpasset (skal køre tvtime-scanner først)"
+
+#. Type: select
+#. Description
+#: ../templates:5002
+msgid ""
+"If you are a user of a cable company that does not use standard frequencies, "
+"you should select \"Custom\" and run the tvtime-scanner application before "
+"using tvtime."
+msgstr ""
+"Hvis du er kunde i et tv-kabelfirma som ikke bruger standardfrekvenser, skal "
+"du vælge »Tilpasset« og køre programmet tvtime-scanner, før du bruger tvtime."
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid "Default television capture device:"
+msgstr "Standardenhed til tvoptagelse:"
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid ""
+"Please choose the video4linux device which corresponds to your capture card."
+msgstr "Vælg venligst video4linux-enheden som svarer til dit optagerkort."
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid "Device to use for VBI decoding:"
+msgstr "Enhed til brug for VBI-decodning:"
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid ""
+"Please choose the device that will be used in NTSC areas for decoding closed "
+"captions and XDS channel information."
+msgstr ""
+"Vælg venligst enheden som vil blive brugt i NTSC-områder til decoding af "
+"lukkede optagelser og XDS-kanalinformation."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid "Allow tvtime to run with root privileges?"
+msgstr "Tillad at tvtime kører med rodprivilegier (root)?"
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"Please choose whether tvtime should be \"setuid root\", therefore getting "
+"root privileges when running."
+msgstr ""
+"Vælg venligst hvorvidt tvtime skal være »setuid root«, og dermed få "
+"rodprivilegier når den kører."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"This allows tvtime to run at a high priority to ensure smooth video and "
+"should be used for high quality video output even during high CPU load."
+msgstr ""
+"Dette tillader tvtime at køre med høj prioritet for at sikre glidende video, "
+"og skal bruges for højkvalitets videouddata selv under høj CPU-belastning."
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid "Process priority for the tvtime binary:"
+msgstr "Procesprioritet for tvtime-binæren:"
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"This setting controls the priority of the tvtime process relative to other "
+"processes on the system."
+msgstr ""
+"Denne indstilling kontrollerer prioriteten på tvtime-processen i forhold til "
+"andre processer på systemet."
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"Allowed values are integers between -20 and 19. Lower values indicate higher "
+"priority, and a value of 0 would give tvtime the same priority as a normal "
+"process."
+msgstr ""
+"Tilladte værdier er heltal mellem -20 og 19. Lavere værdier indikerer højere "
+"prioritet, og en værdi på 0 vil give tvtime den samme prioritet som en "
+"normal proces."
--- tvtime-1.0.2.orig/debian/po/de.po
+++ tvtime-1.0.2/debian/po/de.po
@@ -0,0 +1,257 @@
+# translation of de.po to German
+# Helge Kreutzmann , 2009.
+# This file is distributed under the same license as the gpsd package.
+msgid ""
+msgstr ""
+"Project-Id-Version: tvtime\n"
+"Report-Msgid-Bugs-To: tvtime@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-07 18:42+0200\n"
+"PO-Revision-Date: 2009-07-30 22:42+0200\n"
+"Last-Translator: Thomas Mueller \n"
+"Language-Team: German \n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid "TV standard:"
+msgstr "TV-Standard:"
+
+#. Type: select
+#. Description
+#: ../templates:2001
+msgid ""
+"Please choose the TV standard to use. NTSC is used in North America, much of "
+"South America, and Japan; SECAM in France, the former USSR, and parts of "
+"Africa and the Middle East; and PAL elsewhere."
+msgstr ""
+"Bitte wählen Sie den TV-Standard aus, der verwendet werden soll. NTSC kommt "
+"in Nordamerika, Teilen von Südamerika und Japan zu Einsatz; SECAM in "
+"Frankreich, in der ehemaligen UdSSR und teilweise in Afrika und im Mittleren "
+"Osten und PAL überall sonst."
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Cable"
+msgstr "Kabel"
+
+#. Type: select
+#. Choices
+#. Type: select
+#. Choices
+#: ../templates:3001 ../templates:4001
+msgid "Broadcast"
+msgstr "Antenne"
+
+#. Type: select
+#. Choices
+#: ../templates:3001
+msgid "Cable including channels 100+"
+msgstr "Kabel inklusive Kanäle über 100"
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:3002 ../templates:4002 ../templates:5002
+msgid "Default frequency table:"
+msgstr "Standard-Frequenztabelle:"
+
+#. Type: select
+#. Description
+#: ../templates:3002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers. You should select \"Broadcast\" "
+"if you use an antenna for over-the-air signals."
+msgstr ""
+"Die Frequenztabelle gibt die Frequenzen, die zu bekannten Kanalnummern "
+"gehören, an. Wählen Sie »Antenne«, falls Sie eine Antenne für "
+"Rundfunksignale einsetzen."
+
+#. Type: select
+#. Description
+#. Type: select
+#. Description
+#: ../templates:4002 ../templates:5002
+msgid ""
+"Please choose the frequency table to use. It specifies which frequencies "
+"correspond to the familiar channel numbers."
+msgstr ""
+"Bitte wählen Sie die Frequenztabelle aus, die benutzt werden soll. Sie gibt "
+"an, welche Frequenzen zu bekannten Kanalnummern gehören."
+
+#. Type: select
+#. Description
+#: ../templates:4002
+msgid ""
+"You should select \"Broadcast\" if you use an antenna for over-the-air "
+"signals."
+msgstr ""
+"Sie sollten »Antenne« wählen, falls Sie eine Antenne für Rundfunksignale "
+"einsetzen."
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Europe"
+msgstr "Europa"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "France"
+msgstr "Frankreich"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Russia"
+msgstr "Russland"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia"
+msgstr "Australien"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "New Zealand"
+msgstr "Neuseeland"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "China Broadcast"
+msgstr "China Broadcast"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Australia Optus"
+msgstr "Optus, Australien"
+
+#. Type: select
+#. Choices
+#: ../templates:5001
+msgid "Custom (must run tvtime-scanner first)"
+msgstr "Angepasst (der »tvtime-scanner« muss zuerst ausgeführt werden)"
+
+#. Type: select
+#. Description
+#: ../templates:5002
+msgid ""
+"If you are a user of a cable company that does not use standard frequencies, "
+"you should select \"Custom\" and run the tvtime-scanner application before "
+"using tvtime."
+msgstr ""
+"Falls Sie ein Abonnent einer Kabelgesellschaft sind, die nicht-Standard-"
+"Frequenzen verwendet, wie beispielsweise Casema, UPC oder Mixtics, wählen "
+"Sie bitte »Angepasst« aus und verwenden Sie die »tvtime-scanner«-Anwendung "
+"vor der Benutzung von tvtime."
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid "Default television capture device:"
+msgstr "Standardgerät für den Fernsehempfang:"
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid ""
+"Please choose the video4linux device which corresponds to your capture card."
+msgstr "Bitte wählen Sie das video4linux-Gerät, das Ihrer TV-Karte entspricht."
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid "Device to use for VBI decoding:"
+msgstr "Gerät für VBI-Dekodierung:"
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid ""
+"Please choose the device that will be used in NTSC areas for decoding closed "
+"captions and XDS channel information."
+msgstr ""
+"Bitte wählen Sie das Gerät, welches in NTSC-Gegenden für die Dekodierung von "
+"»Closed Caption« und XDS-Kanalinformationen verwendet werden soll."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid "Allow tvtime to run with root privileges?"
+msgstr "Soll tvtime mit »root«-Rechten ausgeführt werden?"
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"Please choose whether tvtime should be \"setuid root\", therefore getting "
+"root privileges when running."
+msgstr ""
+"Bitte wählen Sie, ob tvtime das »setuid root«-Dateirecht bekommen soll, um "
+"»root«-Rechte zu bekommen, wenn es ausgeführt wird."
+
+#. Type: boolean
+#. Description
+#: ../templates:8001
+msgid ""
+"This allows tvtime to run at a high priority to ensure smooth video and "
+"should be used for high quality video output even during high CPU load."
+msgstr ""
+"Dies ermöglicht es, tvtime mit hoher Priorität laufen zu lassen, um ein "
+"ruckelfreies Bild sicherzustellen und sollte selbst bei hoher CPU-Last für "
+"eine hochqualitative Videoausgabe sorgen."
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid "Process priority for the tvtime binary:"
+msgstr "Prozess-Priorität für tvtime:"
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"This setting controls the priority of the tvtime process relative to other "
+"processes on the system."
+msgstr ""
+"Diese Einstellung regelt die Priorität des tvtime-Prozesses relativ zu "
+"anderen Prozessen im System. "
+
+#. Type: string
+#. Description
+#: ../templates:9001
+msgid ""
+"Allowed values are integers between -19 and 19. Lower values indicate higher "
+"priority, and a value of 0 would give tvtime the same priority as a normal "
+"process."
+msgstr ""
+"Erlaubte Werte sind Ganzzahlen zwischen -19 und 19. Niedrigere Werte "
+"bedeuten eine höhere Priorität, und ein Wert von 0 würde tvtime die gleiche "
+"Priorität wie normale Prozesse geben."
+
+#~ msgid ""
+#~ "Allowed values are integers between -20 and 19. Lower values indicate "
+#~ "higher priority, and a value of 0 would give tvtime the same priority as "
+#~ "a normal process."
+#~ msgstr ""
+#~ "Erlaubte Werte sind Ganzzahlen zwischen -20 und 19. Niedrigere Werte "
+#~ "bedeuten eine höhere Priorität, und ein Wert von 0 würde tvtime die "
+#~ "gleiche Priorität wie normale Prozesse geben."
--- tvtime-1.0.2.orig/debian/po/es.po
+++ tvtime-1.0.2/debian/po/es.po
@@ -0,0 +1,285 @@
+# tvtime po-debconf translation to Spanish
+# Copyright (C) 2006, 2010 Software in the Public Interest
+# This file is distributed under the same license as the tvtime package.
+#
+# Changes:
+# - Initial translation
+# Jose Ignacio Méndez González , 2006
+#
+# - Updates
+# Javier Fernández-Sanguino , 2006
+# Francisco Javier Cuadrado , 2010
+#
+# Traductores, si no conocen el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+#
+# - El proyecto de traducción de Debian al español
+# http://www.debian.org/intl/spanish/
+# especialmente las notas y normas de traducción en
+# http://www.debian.org/intl/spanish/notas
+#
+# - La guía de traducción de po's de debconf:
+# /usr/share/doc/po-debconf/README-trans
+# o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: tvtime 1.0.2-6\n"
+"Report-Msgid-Bugs-To: tvtime@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-07 18:42+0200\n"
+"PO-Revision-Date: 2010-04-14 09:30+0100\n"
+"Last-Translator: Francisco Javier Cuadrado \n"
+"Language-Team: Debian l10n Spanish |