src/c2html.c

changeset 41
c06ab07fd29d
parent 40
903b46fc4214
child 42
7f2403c637a7
equal deleted inserted replaced
40:903b46fc4214 41:c06ab07fd29d
242 } 242 }
243 243
244 FILE *inputfile = fopen(settings.infilename, "r"); 244 FILE *inputfile = fopen(settings.infilename, "r");
245 if (inputfile) { 245 if (inputfile) {
246 UcxBuffer *filebuf = ucx_buffer_new(NULL, 246 UcxBuffer *filebuf = ucx_buffer_new(NULL,
247 2048, UCX_BUFFER_AUTOEXTEND); 247 8192, UCX_BUFFER_AUTOEXTEND);
248 { 248 {
249 const size_t tmpbufsize = 512; 249 const size_t tmpbufsize = 4096;
250 char *tmpbuf = malloc(tmpbufsize); 250 char *tmpbuf = malloc(tmpbufsize);
251 ucx_stream_copy(inputfile, filebuf, (read_func) fread, 251 ucx_stream_copy(inputfile, filebuf, (read_func) fread,
252 (write_func) ucx_buffer_write, 252 (write_func) ucx_buffer_write,
253 tmpbuf, tmpbufsize, (size_t)-1); 253 tmpbuf, tmpbufsize, (size_t)-1);
254 free(tmpbuf); 254 free(tmpbuf);

mercurial