[Refdb-cvs] CVS: refdb/src readris.c,1.10,1.11
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mho...@us...> - 2004-02-04 21:01:36
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15639 Modified Files: readris.c Log Message: read_ris_set(): add terminator to end of dataset Index: readris.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/readris.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -U2 -r1.10 -r1.11 --- readris.c 17 Dec 2003 00:06:24 -0000 1.10 +++ readris.c 4 Feb 2004 20:58:59 -0000 1.11 @@ -29,4 +29,5 @@ #include <limits.h> +#include "refdb.h" #include "readris.h" #include "strfncs.h" @@ -179,4 +180,15 @@ free(linebuffer); + *ptr_inbufsize += TERM_LEN; + + newinbuf = realloc(*ptr_inbuffer, *ptr_inbufsize); + if (newinbuf == NULL) { + return 0; + } + else { + *ptr_inbuffer = newinbuf; + } + memset((*ptr_inbuffer) + *ptr_inbufsize - TERM_LEN, (int)'\0', TERM_LEN); + if (filedone) { return 2; |