Re: bug with read-string!/partial

2005-12-06 Thread Marius Vollmer
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > Hi, > > what's the proper way to use read-string!/partial ? > > If I read a file with fewer bytes than the arg of read-string!/partial, > I get problems down the line [with scm_to_locale_stringn] Do you pass the right length to scm_to_locale_stringn,

Re: bug with read-string!/partial

2005-08-22 Thread Kevin Ryde
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > > why is this using null-delimited strings? I think that's all posix provides. Separate regexp libraries might do better. I was going to add a note about no nulls in the manual, but never did. Speaking of regexps, what I think I will do for the do

Re: bug with read-string!/partial

2005-08-22 Thread Kevin Ryde
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > > what's the proper way to use read-string!/partial ? > > If I read a file with fewer bytes than the arg of read-string!/partial, > I get problems down the line, It leaves the rest of the string with whatever was there before, I think you normally hav

Re: bug with read-string!/partial

2005-08-22 Thread Han-Wen Nienhuys
Han-Wen Nienhuys wrote: Hi, what's the proper way to use read-string!/partial ? If I read a file with fewer bytes than the arg of read-string!/partial, I get problems down the line, when char * scm_to_locale_stringn (SCM str, size_t *lenp) checks whether memcpy (res, scm_i_string_chars

bug with read-string!/partial

2005-08-22 Thread Han-Wen Nienhuys
Hi, what's the proper way to use read-string!/partial ? If I read a file with fewer bytes than the arg of read-string!/partial, I get problems down the line, when char * scm_to_locale_stringn (SCM str, size_t *lenp) checks whether memcpy (res, scm_i_string_chars (str), len); if (lenp