From 77564f0b02a149dfb7e026768afe950d7e72a8e9 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 20 Jun 2004 06:30:01 +0000 Subject: [PATCH] Cambio para que tome datos de la entrada estandar, espero que no joda. --- otros/blocksorting/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); -- 2.43.0