From: Leandro Lucarella Date: Mon, 21 Jun 2004 21:33:04 +0000 (+0000) Subject: Agrego opción para incluir ZG en jacu (sólo en la compresión, por ahora). X-Git-Tag: svn_import~100 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/87673889dd7bc0a18e9cefd5cae898ef0e864ba8?ds=inline;hp=faf9e18aea52bbf7a8cfdbebdfe9ebe96a949d8c Agrego opción para incluir ZG en jacu (sólo en la compresión, por ahora). --- diff --git a/src/Makefile b/src/Makefile index a046cde..87d5c66 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,7 +25,8 @@ # TARGETS=jacu -COMMON=mtf/mtf.o blocksorting/bs.o statichuff/statichuff.o vfile/vfile.o vfile/common.o +COMMON=zerogrouping/zerogrouping.o mtf/mtf.o blocksorting/bs.o \ + statichuff/statichuff.o vfile/vfile.o vfile/common.o SRCS=jacu.c #CFLAGS=-O3 -Wall -DNDEBUG diff --git a/src/jacu.c b/src/jacu.c index 3d18ed3..fc4188f 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -1,7 +1,8 @@ -#include "statichuff/statichuff.h" #include "blocksorting/bs.h" #include "mtf/mtf.h" +#include "zerogrouping/zerogrouping.h" +#include "statichuff/statichuff.h" #include "vfile/vfile.h" #include #include @@ -11,6 +12,7 @@ int main(int argc, char* argv[]) { int cflag = 0; int dflag = 0; + int zflag = 0; int tflag = 0; int pflag = 0; long int volumesize = 0; @@ -18,7 +20,7 @@ int main(int argc, char* argv[]) int ch; t_BlockSort *bs; - while ((ch = getopt(argc, argv, "cdt:p:")) != -1) { + while ((ch = getopt(argc, argv, "cdzt:p:")) != -1) { switch (ch) { case 'c': cflag = 1; @@ -27,6 +29,9 @@ int main(int argc, char* argv[]) case 'd': dflag = 1; break; + case 'z': zflag = 1; + break; + case 't': tflag = 1; volumesize = atol(optarg); break; @@ -83,8 +88,22 @@ int main(int argc, char* argv[]) /* Le aplico el MTF, salteo el tamaño del bloque para que no se pierda. */ mtf = jacu_mtf(salida+sizeof(unsigned long int), i+sizeof(unsigned long int)); - for(j=0; j