readline patches for broken plugins (vdr-1.3.36)

Message ID 436EC0C4.2070209@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M Nov. 7, 2005, 2:49 a.m. UTC
  I just noticed that text2skin is already fixed in cvs, so just ignore that one I
posted.  Also, I noticed a typo in one of the attached patches from my first
post.  Here goes again...

Best Regards,
  

Patch

diff -ru mplayercluster-0.0.1a.orig/compatibility.c mplayercluster-0.0.1a/compatibility.c
--- mplayercluster-0.0.1a.orig/compatibility.c	2005-10-12 19:28:16.000000000 -0700
+++ mplayercluster-0.0.1a/compatibility.c	2005-11-06 14:10:35.000000000 -0800
@@ -160,12 +160,13 @@ 
 
 char *readline(FILE *f)
 {
-  static char buffer[MAXPARSEBUFFER];
-  if (fgets(buffer, sizeof(buffer), f) > 0) {
-     int l = strlen(buffer) - 1;
-     if (l >= 0 && buffer[l] == '\n')
-        buffer[l] = 0;
-     return buffer;
+  char *s;
+  cReadLine ReadLine;
+  if ((s = ReadLine.Read(f)) != NULL) {
+     int l = strlen(s) - 1;
+     if (l >= 0 && s[l] == '\n')
+        s[l] = 0;
+     return s;
      }
   return NULL;
 }