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

Re: [OT] Help with glibc memory streams



On Mon, Oct 30, 2000 at 12:38:34AM +0200, Eray Ozkural (exa) wrote:
> Bernd Eckenfels wrote:
> > 
> > On Mon, Oct 30, 2000 at 12:23:04AM +0200, Eray Ozkural (exa) wrote:
> > > [1] I'd use getline if I could, but as I say just try that with
> > > memory streams and see what happens. The obstacle for me is that
> > > the project I work on should work on proprietary systems which
> > > lack GNU libc, too. And I don't think we can make assumptions about
> > > any system. :( Maybe this needs some autoconf tests!
> > 
> > just write your own getline function, thats much faster than discussing for
> > days :)
> 
> Well, I think this discussion has been quite efficient. My problem
> is that I can't write my own getline function, it wouldn't be
> acceptable in the code I'm dealing with. [I'm not the author of
> the program, and I think my changes should not incur any overhead]
> I know that I can write a workaround, but I can't. I'm stuck! :'(
> 
> Thanks all for the support,

There's also the other solution in "info libc" under fmemopen where it
uses fgetc(). This shouldn't be a problem with null chars, nor lack of
newline (as is shown in the example).

IMO, the fgets problem is probably only a documentation issue.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'



Reply to: