Re: Mac text files and gets()
- Posted by Pete Lomax <petelomax at b?ueyonder.co.u?> Sep 15, 2007
- 554 views
CChris wrote: > > Pete Lomax wrote: > > > > this whole thread is probably moot anyway... > > > > Actually, the mod as I implemented it works fine under DOS/Windows, because > the OS takes care of removing the \r. I see, so the mod you suggested does nothing to fix the problem you reported. > If we are to avoid this, then it looks like, under Linux/BSD, we'd need a one > char lookahead buffer for gets(). Its contents would be needed so as to > recoginse > \r\n as \n, eliminating both the trailing \r and the spurious empty ine. You obviously did not read the rest of my post: http://www.openeuphoria.org/EUforum/m16613.html Pete