From b3e6a4ea1908eb3b26a278a8f583ba5d15e06eda Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Sat, 19 Jun 2004 22:06:39 +0000 Subject: [PATCH 1/1] buscar_z ahora parece funcionar --- otros/mtf/mtf.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/otros/mtf/mtf.c b/otros/mtf/mtf.c index c89bfbe..6d59e9b 100644 --- a/otros/mtf/mtf.c +++ b/otros/mtf/mtf.c @@ -1,7 +1,7 @@ #include "mtf.h" /****privadas*****/ -int no_pertenece(char *z, char c); +int no_pertenece(char *z, char c, int len); void pop_front(char *z, int pos); @@ -43,12 +43,12 @@ int *jacu_mtf(char *datos, int len) char *jacu_buscar_z(char* datos, int len, int *size) { char *z; - int i, j=1; + int i, j=0; - z = (char*)malloc(1); - if (z==NULL) return NULL; + z = NULL; /*(char*)malloc(1);*/ + /*if (z==NULL) return NULL;*/ for(i=0; i