From f0c0f224ac2a3729cd2d3c0cc5b0f11d35fdf605 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Wed, 16 Jun 2004 04:00:15 +0000 Subject: [PATCH] =?utf8?q?=20minimas=20optimizaciones,=20no=20ayudan=20muc?= =?utf8?q?ho.=20Lo=20que=20ayuda=20es=20bajar=20el=20tama=C3=B1o=20de=20pa?= =?utf8?q?gina,=20pero=20=20eso=20perjudica=20un=20poco=20la=20localizacio?= =?utf8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- otros/blocksorting/Makefile | 2 +- otros/blocksorting/bs.c | 46 +++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/otros/blocksorting/Makefile b/otros/blocksorting/Makefile index cc0efbf..d65621e 100644 --- a/otros/blocksorting/Makefile +++ b/otros/blocksorting/Makefile @@ -9,7 +9,7 @@ ################ # Nombre del ejecutable. -target = bs +target = bs # Extensión de los archivos a compilar (c para C, cpp o cc o cxx para C++). extension = c diff --git a/otros/blocksorting/bs.c b/otros/blocksorting/bs.c index e5dd16f..80097b9 100644 --- a/otros/blocksorting/bs.c +++ b/otros/blocksorting/bs.c @@ -38,9 +38,10 @@ void generar_array(char *data, t_BlockSort *array, unsigned long int n) } } -void ordenar_array(char *data, t_BlockSort *array, unsigned long int n) +void ordenar_array(char *data, t_BlockSort *array, t_BlockSort *ord, unsigned long int n) { unsigned long int i, j, min; + for(i=0; i \n", argv[0]); @@ -100,16 +99,19 @@ int main(int argc, char *argv[]) data = malloc(sizeof(char)*len); salida = malloc(sizeof(char)*len); - memset(salida, 0, len*sizeof(char)); - - for(i=0; i