Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ANNOUNCE: vdr-osdteletext-0.2



Hello !

Copy the text between ****<snip><snip>osdteletext.patch<snip><snip>**** to
"PLUGINS/src/osdteltext/osdteletext.patch"
In this Directory start "patch <osdteletext.patch".

Hope this works for you too.
Mario


****<snip><snip>osdteletext.patch<snip><snip>****
--- menu_ori.c Wed Feb 26 12:55:03 2003
+++ menu.c Tue Feb 25 20:08:28 2003
@@ -6,12 +6,15 @@
  *   (at your option) any later version.
*
  *
*

***************************************************************************/
-
+
+#include <map>
+
 #include <vdr/interface.h>
 #include <vdr/i18n.h>

 #include <time.h>
-#include <map>
+
+#include <stdio.h>

 #include "menu.h"
 #include "txtbitmap.h"
@@ -405,15 +408,15 @@

 void TeletextBrowser::ShowAskForChannel() {
    if (selectingChannel) {
-      char *str;
+      char str[80];
       if (selectingChannelNumber>0)
-         asprintf(&str,"%s%d", tr("Channel (press OK): "),
selectingChannelNumber);
+         sprintf(str,"%s%d", tr("Channel (press OK): "),
selectingChannelNumber);
       else
-         asprintf(&str,"%s", tr("Channel (press OK): ") );
+         sprintf(str,"%s", tr("Channel (press OK): ") );
       DisplayClearMessage();
       DisplayMessage(str);
       DisplayUpdate();
-      free(str);
+      // free(str);
    }
 }
****<snip><snip>osdteletext.patch<snip><snip>****

----- Original Message -----
From: "Matthias Raus" <matthias-raus_vdr@web.de>
To: <vdr@linuxtv.org>
Sent: Wednesday, February 26, 2003 12:36 PM
Subject: [vdr] Re: ANNOUNCE: vdr-osdteletext-0.2


>
> Hi Mario,
>
> the osdteletext plugin also fails to compile here; unfortunately I do
> not have C knowledge so that I could apply these changes. Do you have
> the possibility to upload your modified sources somewhere? There are
> several users who would like to use this plugin but cannot...
>
> Matthias
>
>
> Mario Ivankovits wrote:
>
> >Hello !
> >
> >I have had the same problems ... i wonder how others have worked around,
i
> >have not found any suggestion in the ML.
> >Well here is what i have done:
> >
> >
> >
> >>>_Tp> void swap(_Tp &, _Tp &)'
> >>>../../../include/vdr/tools.h:52: `template <class T> void swap(T &, T
> >>>&)' previously declared here
> >>>/usr/include/g++/stl_algobase.h:76: redefinition of `void swap(_Tp &,
> >>>_Tp &)'
> >>>../../../include/vdr/tools.h:52: `void swap(T &, T &)' previously
> >>>defined here
> >>>
> >>>
> >>The problem is triggered by the lines 48-53 in vdr/tools.h. There "swap"
> >>
> >>
> >is
> >
> >
> >>redefined, in an ifndef __STL_CONFIG_H, the comment says "in case some
> >>
> >>
> >plugin
> >
> >
> >>needs to use the STL". Yes I do use the STL. Obviously on your system
this
> >>define was not defined.
> >>
> >>
> >
> >moved "#include <map>" on top of all includes, so it comes before the
> >"#include <vdr" stuff. Now the __STL_CONFIG_H might be set and the
vdr-core
> >behaves like expected.
> >
> >
> >
> >>>menu.c: In method `void TeletextBrowser::ShowAskForChannel()':
> >>>menu.c:410: implicit declaration of function `int asprintf(...)'
> >>>make[1]: *** [menu.o] Error 1
> >>>make[1]: Leaving directory
> >>>
> >>>
> >`/usr/local/src/VDR/PLUGINS/src/osdteletext-0.2'
> >
> >
> >>asprintf is declared in stdio.h and used throughout VDR's core. See
above.
> >>
> >>
> >
> >This is within an "__USE_GNU" define in my stdio.h. I do not know
anything
> >about this, but i simply replaced the "asprintf" by "sprintf", removed
the
> >"&" from "&str", changed "char *str" some lines ahead to "char str[80]"
and
> >commented out the "free(str)".
> >Maybe i have overseen some special function with asprintf, but the plugin
> >works great now on my machine.
> >
> >Mario
> >
> >
> >
> >
> >
>
>
>
>
> --
> Info:
> To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as
subject.
>
>



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index