]> git.llucax.com Git - z.facultad/75.06/jacu.git/commitdiff
Bugfixes y mas cosas a la pantalla
authorRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 23 Jun 2004 03:20:53 +0000 (03:20 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 23 Jun 2004 03:20:53 +0000 (03:20 +0000)
src/jacu.c
src/mtf/mtf.c

index 7e798278b77dac704d4ba73153c2e168428e7738..dd1848594c3646e6695129682e62212cad2d4ef4 100644 (file)
@@ -156,9 +156,9 @@ int main(int argc, char* argv[])
                                /* Guardo la salida del MTF */
                                printf("Despues de MTF : [");
                                for(j=0; j<(i+sizeof(Uint32)); j++) {
                                /* Guardo la salida del MTF */
                                printf("Despues de MTF : [");
                                for(j=0; j<(i+sizeof(Uint32)); j++) {
-                                       fputc(mtf[j+sizeof(Uint32)], fp_out);
+                                       fputc(mtf[j], fp_out);
                                        putchar('(');
                                        putchar('(');
-                                       fputc(mtf[j+sizeof(Uint32)], stdout);
+                                       fputc(mtf[j], stdout);
                                        putchar(')');
                                }
                                printf("]\n");
                                        putchar(')');
                                }
                                printf("]\n");
index efc3700ab08611ea7f0a8322e1777348d5dbf359..7346a99da9c3630472309126313d12d621b91bb8 100644 (file)
@@ -26,8 +26,9 @@ char *jacu_mtf(char *datos, int len, char **_z, int *z_len)
        z = jacu_buscar_z(datos, len, &size);
        for(i=0; i<len; i++){
                pos[i] = get_pos(z, size, datos[i]);
        z = jacu_buscar_z(datos, len, &size);
        for(i=0; i<len; i++){
                pos[i] = get_pos(z, size, datos[i]);
+               printf("pos de %c = %d\n", datos[i], pos[i]);
                if (pos[i] != 0) 
                if (pos[i] != 0) 
-                       pop_front(z,pos[i]);
+                       pop_front(z, pos[i]);
        }
 
        (*_z) = z;
        }
 
        (*_z) = z;
@@ -43,7 +44,7 @@ char *jacu_mtf_inv(char *z, char *pos, int len)
        datos = (char*)malloc(sizeof(char)*len);
        for(i=0; i<len; i++){
                datos[i] = z[(size_t)pos[i]];
        datos = (char*)malloc(sizeof(char)*len);
        for(i=0; i<len; i++){
                datos[i] = z[(size_t)pos[i]];
-               pop_front(z,pos[i]);
+               pop_front(z, pos[i]);
        }
        return datos;
 }
        }
        return datos;
 }