X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/5bf62ffb7054c30de3b8bbf3d18f420f731eb765..63781d0c9c5157db0302a61ed5cc2fd805758476:/src/mtf/mtf.c?ds=sidebyside diff --git a/src/mtf/mtf.c b/src/mtf/mtf.c index 3967cbc..bdb423c 100644 --- a/src/mtf/mtf.c +++ b/src/mtf/mtf.c @@ -16,7 +16,7 @@ void print_z(char *z, int len) fprintf(stderr, "\n"); } -char *jacu_mtf(char *datos, int len) +char *jacu_mtf(char *datos, int len, char **_z, int *z_len) { char *z; char *pos; @@ -24,11 +24,14 @@ char *jacu_mtf(char *datos, int len) pos = (char *)malloc(len*sizeof(char)); z = jacu_buscar_z(datos, len, &size); + *_z = (char*)malloc(len*sizeof(char)); + memcpy(*_z, z, len*sizeof(char)); for(i=0; i