tvkaista-0.975/Makefile tvkaista-0.976/Makefile
49# requires recent-enough GNU tar49# requires recent-enough GNU tar
50 ver=`sed -n 's/Version=//p' tvkaista.desktop`; \50 ver=`sed -n 's/Version=//p' tvkaista.desktop`; \
51 tar --transform "s|^|tvkaista-$$ver/|" -zcf tvkaista-$$ver.tar.gz \51 tar --transform "s|^|tvkaista-$$ver/|" -zcf tvkaista-$$ver.tar.gz \
52 tvkaista_gtkui.c tvkaista-helper.pl tvkaista.sh \52 tvkaista_gtkui.c tvkaista-helper.pl tvkaista.sh custom-list.c \
53 custom-list.c custom-list.o \
54 tvkaista.desktop tvkaista.png logo.pov Makefile gitlog && \53 tvkaista.desktop tvkaista.png logo.pov Makefile gitlog && \
55 echo Created tvkaista-$$ver.tar.gz54 echo Created tvkaista-$$ver.tar.gz
5655

tvkaista-0.975/custom-list.c tvkaista-0.976/custom-list.c
6WARN="$WARN -W -Wwrite-strings -Wcast-qual -Wshadow" # -Wconversion6WARN="$WARN -W -Wwrite-strings -Wcast-qual -Wshadow" # -Wconversion
7FLAGS=`pkg-config --cflags --libs gtk+-2.0 | sed 's/-I/-isystem '/g`7FLAGS=`pkg-config --cflags --libs gtk+-2.0 | sed 's/-I/-isystem '/g`
8ver=`sed -n 's/Version=//p' tvkaista.desktop`8ver=`sed -n 's/Version=//p' tvkaista.desktop`
9OPTS="$WARN $FLAGS -DVERSION=$ver"9OPTS="$WARN $FLAGS -DVERSION=$ver -fstack-protector"
10case $1 in '') set x -ggdb10case $1 in '') set x -ggdb
11#case $1 in '') set x -O2 ### set x -ggdb11#case $1 in '') set x -O2 ### set x -ggdb
12 shift ;; esac;12 shift ;; esac;
16 */16 */
17#endif17#endif
1818
19
20/* original from http://scentric.net/tutorial/sec-custom-model-code.html */19/* original from http://scentric.net/tutorial/sec-custom-model-code.html */
21/* ** part of GTK+ 2.0 Tree View Tutorial ** */20/* ** part of GTK+ 2.0 Tree View Tutorial ** */
2221
22#define _GNU_SOURCE
23#include <string.h>23#include <string.h>
24#include <stdlib.h>24#include <stdlib.h>
2525
282282
283 indices = gtk_tree_path_get_indices(path);283 indices = gtk_tree_path_get_indices(path);
284 depth = gtk_tree_path_get_depth(path);284 depth = gtk_tree_path_get_depth(path);
285 285 //if (depth != 1) printf("%d\n", depth);
286 /* we do not allow children */286 /* we do not allow children */
287 g_assert(depth == 1); /* depth 1 = top level; a list only has top level nodes and no287 g_assert(depth == 1); /* depth 1 = top level; a list only has top level nodes and no
children */ children */
288288
291 if ( n >= custom_list->filtered_rows_count || n < 0 )291 if ( n >= custom_list->filtered_rows_count || n < 0 )
292 return false;292 return false;
293293
294 /* We simply store a pointer to our custom record in the iter */
295 iter->stamp = custom_list->stamp;294 iter->stamp = custom_list->stamp;
296 iter->user_data = GINT_TO_POINTER(n);295 iter->user_data = GINT_TO_POINTER(n);
297#if 0 // unreferenced296#if 0 // unreferenced
317316
318 g_return_val_if_fail (CUSTOM_IS_LIST(tree_model), null);317 g_return_val_if_fail (CUSTOM_IS_LIST(tree_model), null);
319 g_return_val_if_fail (iter != null, null);318 g_return_val_if_fail (iter != null, null);
320 g_return_val_if_fail (iter->user_data != null, null);
321319
322 path = gtk_tree_path_new();320 path = gtk_tree_path_new();
323 gtk_tree_path_append_index(path, GPOINTER_TO_INT(iter->user_data));321 gtk_tree_path_append_index(path, GPOINTER_TO_INT(iter->user_data));
569 return newcustomlist;567 return newcustomlist;
570}568}
571569
570struct B {
571 struct B * next;
572 char buf[16352];
573};
574
575struct {
576 struct B * first;
577 int space;
578} D = { 0,0 };
579
580
581static char * dupstr(const char * str)
582{
583 int l = strlen(str) + 1;
584 struct B * b;
585
586 if (D.space < l) {
587 b = (struct B *)malloc(sizeof *b);
588 if (b == null)
589 die("Out of Memory!\n");
590 b->next = D.first;
591 D.first = b;
592 D.space = sizeof D.first->buf;
593 }
594 else
595 b = D.first;
596
597 D.space -= l;
598 char * p = &b->buf[D.space];
599 memcpy(p, str, l);
600
601 return p;
602}
603
604static void dupstr_free(void)
605{
606 struct B * p = D.first;
607 if (p == null)
608 return;
609 while (1) {
610 struct B * q = p->next;
611 free(p);
612 if (q == null)
613 break;
614 p = q;
615 }
616 D.first = null;
617 D.space = 0;
618}
572619
573/*****************************************************************************620/*****************************************************************************
574 *621 *
581 *628 *
582 *****************************************************************************/629 *****************************************************************************/
583630
584static char * dupstr(const char * str)
585{
586 // improve later -- for single-shot destruction -- now leaks mem!
587 return g_strdup(str);
588}
589631
590void632void
591custom_list_append(CustomList * list,633custom_list_append(CustomList * list,
631 * sizeof *list->filtered_rows);673 * sizeof *list->filtered_rows);
632 if (list->filtered_rows == null)674 if (list->filtered_rows == null)
633 exit(19);675 exit(19);
676 // if empty list, might add one dummy line (for information)
634 custom_list_filter(list, channelindex, compare);677 custom_list_filter(list, channelindex, compare);
635}678}
636679
637/* detach first !!! */
638void custom_list_clear(CustomList * list)680void custom_list_clear(CustomList * list)
639{681{
640 for (unsigned int i = 0; list->all_rows[i]; i++) {682 for (unsigned int i = 0; list->all_rows[i]; i++) {
643 free(list->filtered_rows);685 free(list->filtered_rows);
644 list->filtered_rows = null;686 list->filtered_rows = null;
645687
646 /* clear dupstr()ings */688 dupstr_free();
647689
648 list->all_rows_count = 0;690 list->all_rows_count = 0;
649 list->filtered_rows_count = 0;691 list->filtered_rows_count = 0;
659 return list->filtered_rows[indx];701 return list->filtered_rows[indx];
660}702}
661703
704CustomRecord * custom_list_get_abs_record(CustomList * list, int indx)
705{
706 if (indx >= list->all_rows_count)
707 return null;
708 int i = indx / 1000;
709 int j = indx % 1000;
710
711 return &list->all_rows[i][j];
712}
713
714
662int custom_list_get_id(CustomList * list, int indx)715int custom_list_get_id(CustomList * list, int indx)
663{716{
664 if (indx >= list->filtered_rows_count)717 if (indx >= list->filtered_rows_count)
666 return list->filtered_rows[indx]->id;719 return list->filtered_rows[indx]->id;
667}720}
668721
669// FIXME: add suggested new position for view
670void custom_list_filter(CustomList * list, int channelindex, char * compare)722void custom_list_filter(CustomList * list, int channelindex, char * compare)
671{723{
672 int fi = 0, clen = strlen(compare);724 int fi = 0, clen = strlen(compare);
725
726 if (list->all_rows_count == 0) {
727 list->filtered_rows_count = 0;
728 return;
729 }
673730
674 for (int i = 0; i < 1000; i++)731 for (int i = 0; i < 1000; i++)
675 for (int j = 0; j < 1000; j++) {732 for (int j = 0; j < 1000; j++) {
676 CustomRecord * record = &list->all_rows[i][j];733 CustomRecord * record = &list->all_rows[i][j];
677 if (record->day == null) { i = 1000; break; }734 if (record->day == null) { i = 1000; break; }
735 record->filtered_position = fi;
678 if (channelindex && channelindex != record->channelindex)736 if (channelindex && channelindex != record->channelindex)
679 continue;737 continue;
680 if (clen && strstr(record->program, compare) != 0)738 if (clen && strcasestr(record->program, compare) == null)
681 continue;739 continue;
682 record->filtered_position = fi;
683 list->filtered_rows[fi++] = record;740 list->filtered_rows[fi++] = record;
684 }741 }
685 list->filtered_rows_count = fi;742 list->filtered_rows_count = fi;
686#if 0743#if 0
687 printf("all rows: %d, filtered_rows: %d\n",744 printf("all rows: %d, filtered_rows: %d compare '%s'\n",
688 list->all_rows_count, list->filtered_rows_count);745 list->all_rows_count, list->filtered_rows_count, compare);
689#endif746#endif
690}747}

Only in tvkaista-0.975: custom-list.o

tvkaista-0.975/gitlog tvkaista-0.976/gitlog
1commit c41f197f242b5fde99b2af008cee005baa43b3b7
2Author: Tomi Ollila <too@iki.fi>
3Date: Sun May 24 13:13:09 2009 +0300
4
5 Alkuohjepäivitys, custom-list.o pois targz:sta. Versio 0.976
6
7M Makefile
8M tvkaista.desktop
9M tvkaista_gtkui.c
10
11commit 10e1306650d20ce1d55d9c1b026307d9b0ab5c1a
12Author: Tomi Ollila <too@iki.fi>
13Date: Sun May 24 12:57:26 2009 +0300
14
15 päiväselaus pitää nyt kellon kohillaan
16
17M tvkaista_gtkui.c
18
19commit 997addc6853a56de20848f1451632d200727b738
20Author: Tomi Ollila <too@koti.localdomain>
21Date: Sun May 24 10:04:22 2009 +0300
22
23 Piilota hakutietoja (mm. salasana joskus)
24
25M tvkaista-helper.pl
26
27commit 5dd898b31eedc5928ca5d2c7c70a79ef137a1fb6
28Author: Tomi Ollila <too@iki.fi>
29Date: Sat May 23 19:30:17 2009 +0300
30
31 Aika hyvä vieritysikkunan "paikallaanpito"
32
33M custom-list.c
34M tvkaista_gtkui.c
35
36commit 1783775db5469bf152be5c890c62622071178512
37Author: Tomi Ollila <too@iki.fi>
38Date: Sat May 23 12:56:26 2009 +0300
39
40 Eka yritys pitää vierintäikkuna "paikallaan"
41
42M custom-list.c
43M custom-list.h
44M tvkaista_gtkui.c
45
46commit f3f6ca5a252f550ead0ff28ab3f024cee4c9c3a9
47Author: Tomi Ollila <too@iki.fi>
48Date: Sat May 23 11:32:52 2009 +0300
49
50 päivä- ja kellonappien selaus toimii
51
52M custom-list.c
53M tvkaista_gtkui.c
54
55commit 6829b1a45ecbd138e8c61e5b2f8fb71d346e3c85
56Author: Tomi Ollila <too@iki.fi>
57Date: Sat May 23 00:21:56 2009 +0300
58
59 proper dupstr(). bug fixes.
60
61M Makefile
62M custom-list.c
63M tvkaista-helper.pl
64
1commit fe3f97aa2d12406bc34be7815f4bb26b9b64276d65commit fe3f97aa2d12406bc34be7815f4bb26b9b64276d
2Author: Tomi Ollila <too@iki.fi>66Author: Tomi Ollila <too@iki.fi>
3Date: Fri May 22 23:10:08 2009 +030067Date: Fri May 22 23:10:08 2009 +0300

tvkaista-0.975/tvkaista-helper.pl tvkaista-0.976/tvkaista-helper.pl
4# Author: Tomi Ollila -- too ät iki piste fi4# Author: Tomi Ollila -- too ät iki piste fi
5#5#
6# Created: Sat Feb 07 21:29:53 EET 2009 too6# Created: Sat Feb 07 21:29:53 EET 2009 too
7# Last modified: Thu 07 May 2009 23:26:25 EEST too7# Last modified: Sun 24 May 2009 10:03:32 EEST too
88
9#PERL_UNICODE=SD perl tvkaista-helper.pl 1 update9#PERL_UNICODE=SD perl tvkaista-helper.pl 1 update
10#or perl -CSD perl tvkaista-helper.pl 1 list10#or perl -CSD perl tvkaista-helper.pl 1 list
9595
96sub feedwget(@)96sub feedwget(@)
97{97{
98 print "Fetching $_[0] ...\n";
98 print "Executing wget --save-headers ... -O @_\n";99 #print "Executing wget --save-headers ... -O @_\n";
99 system 'wget', '--header', "Authorization: Basic $b64cred",100 system 'wget', '--header', "Authorization: Basic $b64cred",
100 '--save-headers', '-O', @_;101 '--save-headers', '-O', @_;
101}102}
106 '--header', 'Content-type: application/x-www-form-urlencoded',107 '--header', 'Content-type: application/x-www-form-urlencoded',
107 '-O', @_);108 '-O', @_);
108109
110 print "Fetching $_[0] ...\n";
109 print "Executing: @list\n";111 #print "Executing: @list\n";
110 system @list;112 system @list;
111}113}
112114
348 die "No content found!\n";350 die "No content found!\n";
349 }351 }
350352
351 my ($namepfx, $srtflen) = getsrt($ARGV[3], $ARGV[1]);353 my ($namepfx, $srtflen) = getsrt($ARGV[2], $ARGV[1]);
352 chdir $recdir;354 chdir $recdir;
353355
354 my @list = ( $ARGV[1] );356 my @list = ( $ARGV[1] );

tvkaista-0.975/tvkaista.desktop tvkaista-0.976/tvkaista.desktop
1[Desktop Entry]1[Desktop Entry]
2Encoding=UTF-82Encoding=UTF-8
3Version=0.9753Version=0.976
4Name=tv kaista4Name=tv kaista
5Comment=gui-kilentti tvkaistalle5Comment=gui-kilentti tvkaistalle
6GenericName=tvkaista-kilentti6GenericName=tvkaista-kilentti

tvkaista-0.975/tvkaista_gtkui.c tvkaista-0.976/tvkaista_gtkui.c
6WARN="$WARN -W -Wwrite-strings -Wcast-qual -Wshadow" # -Wconversion6WARN="$WARN -W -Wwrite-strings -Wcast-qual -Wshadow" # -Wconversion
7FLAGS=`pkg-config --cflags --libs gtk+-2.0 | sed 's/-I/-isystem '/g`7FLAGS=`pkg-config --cflags --libs gtk+-2.0 | sed 's/-I/-isystem '/g`
8ver=`sed -n 's/Version=//p' tvkaista.desktop`8ver=`sed -n 's/Version=//p' tvkaista.desktop`
9OPTS="$WARN $FLAGS -DVERSION=$ver" # -DCDATE=\"`date`\""9OPTS="$WARN $FLAGS -DVERSION=$ver -fstack-protector"
10case $1 in '') set x -ggdb10case $1 in '') set x -ggdb
11#case $1 in '') set x -O2 ### set x -ggdb11#case $1 in '') set x -O2 ### set x -ggdb
12 shift ;; esac;12 shift ;; esac;
6767
68#if 168#if 1
69#define DBG 169#define DBG 1
70#define DBG0 0
70#define d1(x) do { printf x; } while (0)71#define d1(x) do { printf x; } while (0)
71#define d0(x) do {} while (0)72#define d0(x) do {} while (0)
72#else73#else
73#define DBG 074#define DBG 0
75#define DBG0 0
74#define d1(x) do {} while (0)76#define d1(x) do {} while (0)
75#define d0(x) do {} while (0)77#define d0(x) do {} while (0)
76#endif78#endif
116 int prgfd[32];118 int prgfd[32];
117 int indx;119 int indx;
118 int prevabsindx;120 int prevabsindx;
121
122 int abspos;
123 int refindx;
124 char daytime[8];
119} G;125} G;
120126
121/* widgets in separate structure, for code readability */127/* widgets in separate structure, for code readability */
132// XXX make better later...138// XXX make better later...
133const char G_helper[] = "./tvkaista-helper.pl";139const char G_helper[] = "./tvkaista-helper.pl";
134140
141/* XXX combine with clean_data */
135void init_G(void)142void init_G(void)
136{143{
137 memset(&G, 0, sizeof G);144 memset(&G, 0, sizeof G);
139 G.indx = G.prevabsindx = -1;146 G.indx = G.prevabsindx = -1;
140 for (unsigned int i = 0; i < sizeof G.prgfd / sizeof G.prgfd[0]; i++)147 for (unsigned int i = 0; i < sizeof G.prgfd / sizeof G.prgfd[0]; i++)
141 G.prgfd[i] = -1;148 G.prgfd[i] = -1;
149 G.abspos = 0; G.refindx = -1;
142}150}
143151
144FILE * runhelper(const char * format, ...)152FILE * runhelper(const char * format, ...)
160 return popen(cmdline, "r");168 return popen(cmdline, "r");
161}169}
162170
171// XXX error checking !
172void get_visible_range(int * first, int * last)
173{
174 GtkTreePath * fp, * lp;
175 GtkTreeIter iter;
176
177 if (W.listmodel->filtered_rows_count == 0) {
178 *first = *last = 0;
179 return;
180 }
181 gtk_tree_view_get_visible_range(GTK_TREE_VIEW(W.listview), &fp, &lp);
182
183 gtk_tree_model_get_iter(GTK_TREE_MODEL(W.listmodel), &iter, fp);
184 *first = GPOINTER_TO_INT(iter.user_data);
185 gtk_tree_model_get_iter(GTK_TREE_MODEL(W.listmodel), &iter, lp);
186 *last = GPOINTER_TO_INT(iter.user_data);
187 gtk_tree_path_free(fp);
188 gtk_tree_path_free(lp);
189}
190
191bool idle_set_refindx(void)
192{
193 int f, l;
194 get_visible_range(&f, &l);
195 G.refindx = f;
196 return false;
197}
198
199void scroll_to_indx(int indx)
200{
201 if (indx == 0 && W.listmodel->filtered_rows_count == 0)
202 return;
203 GtkTreeIter iter;
204 memset(&iter, 0, sizeof iter);
205 d0(("scroll to index %d\n", indx));
206 iter.user_data = GINT_TO_POINTER(indx);
207 GtkTreePath * path = gtk_tree_model_get_path(GTK_TREE_MODEL(W.listmodel),
208 &iter);
209 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(W.listview), path,
210 null, true, 0, 0);
211 gtk_tree_path_free(path);
212 g_idle_add(idle_set_refindx, null);
213}
214
163void refilter_model(void)215void refilter_model(void)
164{216{
217 int f, l;
218 get_visible_range(&f, &l);
219 if (f != G.refindx) {
220 d0(("old refindx: %d, f %d, old abspos %d\n", G.refindx, f, G.abspos));
221 G.abspos = custom_list_get_record(W.listmodel, f)->absolute_position;
222 d0(("new abspos %d\n", G.abspos));
223 }
165 //g_object_ref(W.listfilter); // there will be 1 reference always...224 //g_object_ref(W.listfilter); // there is 1 reference always...
166 gtk_tree_view_set_model(GTK_TREE_VIEW(W.listview), null);225 gtk_tree_view_set_model(GTK_TREE_VIEW(W.listview), null);
167#if 1226#if DBG0
168 struct timeval st, et;227 struct timeval st, et;
169 gettimeofday(&st, null);228 gettimeofday(&st, null);
170#endif229#endif
171 custom_list_filter(W.listmodel, G.channelfilter, G.compare);230 custom_list_filter(W.listmodel, G.channelfilter, G.compare);
172#if 1231#if DBG0
173 gettimeofday(&et, null);232 gettimeofday(&et, null);
174 printf("%.3f\n", (float)(et.tv_sec - st.tv_sec) * 1000233 printf("filter time: %.3f\n", (float)(et.tv_sec - st.tv_sec) * 1000
175 + (float)(et.tv_usec - st.tv_usec) / 1000);234 + (float)(et.tv_usec - st.tv_usec) / 1000);
176#endif235#endif
177236
178 gtk_tree_view_set_model(GTK_TREE_VIEW(W.listview),237 gtk_tree_view_set_model(GTK_TREE_VIEW(W.listview),
179 GTK_TREE_MODEL(W.listmodel));238 GTK_TREE_MODEL(W.listmodel));
239
240 scroll_to_indx(custom_list_get_abs_record(W.listmodel,
241 G.abspos)->filtered_position);
242
180 //g_object_unref(W.listfilter); // there will be 1 reference always...243 //g_object_unref(W.listfilter); // there is 1 reference always...
181}244}
182245
183// after filter make unselected -- and G.indx == -1246// after filter make unselected -- and G.indx == -1
354417
355void day_clicked(int promille)418void day_clicked(int promille)
356{419{
357 printf("day_clicked(%d) (no action, yet)\n", promille);420 int f, l, n, p;
421 get_visible_range(&f, &l);
422 n = l - f;
423 if (n == 0) return;
424 char * day = W.listmodel->filtered_rows[f]->day;
425 if (f != G.refindx)
426 xstrlcpy(G.daytime, W.listmodel->filtered_rows[f]->time,
427 sizeof G.daytime);
428
429 if (promille < 500) {
430 for (p = f > 0? f - 1: 0; p > 0; p--) {
431 if (strcmp(W.listmodel->filtered_rows[p]->day, day) != 0)
432 break;
433 }
434 day = W.listmodel->filtered_rows[p]->day;
435 for (p = p; p >= 0; p--) {
436 if (strcmp(W.listmodel->filtered_rows[p]->time, G.daytime) < 0)
437 break;
438 if (strcmp(W.listmodel->filtered_rows[p]->day, day) != 0)
439 break;
440 }
441 if (p != 0)
442 p++;
443 }
444 else {
445 int m = W.listmodel->filtered_rows_count - n;
446 for (p = f + 1; p < m; p++) {
447 if (strcmp(W.listmodel->filtered_rows[p]->day, day) != 0)
448 break;
449 }
450 day = W.listmodel->filtered_rows[p]->day;
451 for (p = p; p < m; p++) {
452 if (strcmp(W.listmodel->filtered_rows[p]->time, G.daytime) >= 0)
453 break;
454 if (strcmp(W.listmodel->filtered_rows[p]->day, day) != 0)
455 break;
456 }
457 }
458 d0(("day_clicked(%d) f %d p %d %s\n", promille, f, p, day));
459
460 scroll_to_indx(p);
461 G.abspos = custom_list_get_record(W.listmodel, p)->absolute_position;
358}462}
359463
360void time_clicked(int promille)464void time_clicked(int promille)
361{465{
362 printf("time_clicked(%d) (no action, yet)\n", promille);466 int f, l, n, p;
467 get_visible_range(&f, &l);
468 n = l - f;
469 if (n == 0) return;
470
471 if (promille < 500) {
472 p = f - n - 1;
473 if (p < 0)
474 p = 0;
475 }
476 else {
477 p = l + n - 1;
478 if (p > W.listmodel->filtered_rows_count)
479 p = W.listmodel->filtered_rows_count;
480 p -= n;
481 }
482 d0(("time_clicked(%d) -- %d %d %d %d\n", promille, f, l, n, p));
483 scroll_to_indx(p);
484 xstrlcpy(G.daytime, W.listmodel->filtered_rows[p]->time,
485 sizeof G.daytime);
486 G.abspos = custom_list_get_record(W.listmodel, p)->absolute_position;
363}487}
364488
365void channel_clicked(int promille)489void channel_clicked(int promille)
366{490{
367#if 0
368 printf("channel_clicked(%d) %d %d\n", promille,491 d0(("channel_clicked(%d) %d %d\n", promille,
369 G.channelfilter, G.maxchannelindex);492 G.channelfilter, G.maxchannelindex));
370#endif493
371 if (promille < 300) {494 if (promille < 300) {
372 if (G.channelfilter <= 1)495 if (G.channelfilter <= 1)
373 G.channelfilter = G.maxchannelindex;496 G.channelfilter = G.maxchannelindex;
688const char * speeds[] = { "300k", "1M", "2M", "8M" };811const char * speeds[] = { "300k", "1M", "2M", "8M" };
689const char nspeeds = sizeof speeds / sizeof speeds[0];812const char nspeeds = sizeof speeds / sizeof speeds[0];
690813
814/* XXX combine with init_G */
691void clean_data(void)815void clean_data(void)
692{816{
693 custom_list_clear(W.listmodel);817 custom_list_clear(W.listmodel);
694 for (unsigned int i = 0; i < sizeof G.prgfd / sizeof G.prgfd[0]; i++)818 for (unsigned int i = 0; i < sizeof G.prgfd / sizeof G.prgfd[0]; i++)
695 if (G.prgfd[i] >= 0) { close(G.prgfd[i]); G.prgfd[i] = -1; }819 if (G.prgfd[i] >= 0) { close(G.prgfd[i]); G.prgfd[i] = -1; }
696 G.indx = G.prevabsindx = -1;820 G.indx = G.prevabsindx = -1;
821 G.abspos = 0; G.refindx = -1;
697 G.compare[0] = '\0';822 G.compare[0] = '\0';
698 G.channelfilter = 0;823 G.channelfilter = 0;
699 G.maxchannelindex = 0;824 G.maxchannelindex = 0;
858 "Ctrl-C tässä lopettaa tvkaista-ohjelman ja mahdollisesti suoritettavan\n"983 "Ctrl-C tässä lopettaa tvkaista-ohjelman ja mahdollisesti suoritettavan\n"
859 "tallennuksen/tv-ohjelman seurannan. Myöhemmin toimii ehkä paremmin.\n"984 "tallennuksen/tv-ohjelman seurannan. Myöhemmin toimii ehkä paremmin.\n"
860 "\n"985 "\n"
861 "Sitä ennen ehkä kuitenkin selausominaisuudet...\n"986 "Selaus toimii <päiva>, <klo> ja <kanava> -\"painikkeilla\". Ne katsovat\n"
987 "napsautuskohdasta vaakatasossa halutaanko selata eteen- vai taaksepäin\n"
988 "<kanava> -\"painike\" palauttaa kaikki kanavat näkyviin keskialueen\n"
989 "napsautuksella\n"
862 "\n"990 "\n"
863 "Tallenteiden sijaintipaikka on $HOME/.tvkaista/tallenteet/.\n"991 "Tallenteiden sijaintipaikka on $HOME/.tvkaista/tallenteet/.\n"
864 "\n";992 "\n";