src/buffer.c

changeset 1005
67fa386ce600
parent 1004
d8044fd5005c
child 1007
81b2986d2b04
equal deleted inserted replaced
1004:d8044fd5005c 1005:67fa386ce600
314 } else { 314 } else {
315 return EOF; 315 return EOF;
316 } 316 }
317 } 317 }
318 318
319 int cxBufferTerminate(CxBuffer *buffer) {
320 bool success = 0 == cxBufferPut(buffer, 0);
321 if (success) {
322 buffer->pos--;
323 buffer->size--;
324 return 0;
325 } else {
326 return 1;
327 }
328 }
329
319 size_t cxBufferPutString( 330 size_t cxBufferPutString(
320 CxBuffer *buffer, 331 CxBuffer *buffer,
321 const char *str 332 const char *str
322 ) { 333 ) {
323 return cxBufferWrite(str, 1, strlen(str), buffer); 334 return cxBufferWrite(str, 1, strlen(str), buffer);

mercurial