From: Leandro Lucarella Date: Sun, 20 Jun 2004 06:30:01 +0000 (+0000) Subject: Cambio para que tome datos de la entrada estandar, espero que no joda. X-Git-Tag: svn_import~133 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/77564f0b02a149dfb7e026768afe950d7e72a8e9?ds=inline Cambio para que tome datos de la entrada estandar, espero que no joda. --- diff --git a/otros/blocksorting/main.c b/otros/blocksorting/main.c index 3df6d8a..5f36f54 100644 --- a/otros/blocksorting/main.c +++ b/otros/blocksorting/main.c @@ -10,13 +10,13 @@ int main(int argc, char *argv[]) char c; t_BlockSort *bs; - if (argc != 3) { +/* if (argc != 3) { printf("Modo de uso : %s \n", argv[0]); return 0; } - - fp = fopen(argv[1], "r"); - len = atoi(argv[2]); +*/ + fp = stdin; /*fopen(argv[1], "r");*/ + len = atoi(argv[1]); data = malloc(sizeof(char)*len); salida = malloc(sizeof(char)*(len+1)); @@ -33,7 +33,8 @@ int main(int argc, char *argv[]) bs_solve(data, salida, bs, &k, i); /* XXX ACA SALIDA DEBERIA PASAR A LA SIGUIENTE ETAPA XXX */ - printf("%s -> %ld\n", salida, k); + /*printf("%s -> %ld\n", salida, k);*/ + printf("%s", salida); } fclose(fp); bs_destroy(bs);