Skip to content
Snippets Groups Projects

Feature/new cgc

Open Dario Pinto requested to merge feature/new-cgc into master
2 files
+ 0
79
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 0
32
#include <stdlib.h>
int cgc_receive_bytes_iPcz (char *buffer, size_t count)
{
size_t total;
size_t rxbytes;
total = 0;
while(total < count) {
rxbytes = 0;
if (cgc_receive(STDIN, buffer+total, count-total, &rxbytes)==0 ) {
if (rxbytes == 0)
return(0);
else
total += rxbytes;
}
else {
return(-1);
}
}
return 0;
}
Loading