Run-length encoding/C: Difference between revisions

now the sample compiles with gcc-4.4.1 on Ubuntu
(Removed extra loop from the rle_decode() which resulted to incorrect return value and strange output.)
(now the sample compiles with gcc-4.4.1 on Ubuntu)
Line 57:
int main()
{
char *d = (char *)malloc(2*strlen(o));
char *oc = (char *)malloc(strlen(o));
int rl = rle_encode(d, o, strlen(o));
Anonymous user