bug-gnulib
[Top][All Lists]
Advanced

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

Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge


From: Bruno Haible
Subject: Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge
Date: Sun, 1 Mar 2009 11:05:20 +0100
User-agent: KMail/1.9.9

Alan Hourihane wrote:
> Yes. This works too.

OK, I committed it.

Is anything else among the aforementioned unit tests still failing?

Bruno


2009-03-01  Bruno Haible  <address@hidden>

        More support for FreeMiNT.
        * lib/fpurge.c (fpurge): Correct last commit.
        Reported by Alan Hourihane <address@hidden>.

--- lib/fpurge.c.orig   2009-03-01 11:00:35.000000000 +0100
+++ lib/fpurge.c        2009-03-01 02:05:55.000000000 +0100
@@ -120,9 +120,14 @@
       fp->__bufp = fp->__pushback_bufp;
       fp->__pushed_back = 0;
     }
+  /* Preserve the current file position.  */
+  if (fp->__target != -1)
+    fp->__target += fp->__bufp - fp->__buffer;
   fp->__bufp = fp->__buffer;
+  /* Nothing in the buffer, next getc is nontrivial.  */
   fp->__get_limit = fp->__bufp;
-  fp->__put_limit = fp->__bufp;
+  /* Nothing in the buffer, next putc is nontrivial.  */
+  fp->__put_limit = fp->__buffer;
   return 0;
 # else
  #error "Please port gnulib fpurge.c to your platform! Look at the definitions 
of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]