X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/b7363b3e0c059ce04f5f2bfa913e06940915aa7c..581c6c4f1d70b1928ae2946aa0482a4d36ea56d9:/src/blocksorting/bs.c diff --git a/src/blocksorting/bs.c b/src/blocksorting/bs.c index b0010c1..a71e261 100644 --- a/src/blocksorting/bs.c +++ b/src/blocksorting/bs.c @@ -312,13 +312,21 @@ int bs_readblock(FILE *fp, char *data, Uint32 pagesize, int usar_dic) while ((!feof(fp)) && ((i+buffer_pos) < pagesize)) { c = fgetc(fp); - hint = check_hint(c); - + if (usar_dic != 1) { data[i++] = c; continue; } + if (c == ESCAPE_CHARACTER) { + data[i++] = c; + data[i++] = 0xF; + bs_clean_dic(); + continue; + } + + hint = check_hint(c); + switch (hint) { case -1: /* No hay hints, vacio el buffer y luego saco el c */ @@ -341,15 +349,8 @@ int bs_readblock(FILE *fp, char *data, Uint32 pagesize, int usar_dic) /* Trato de hacer que el caracter sea comun en textos, para que no me rompa * la localidad */ - data[i++] = hint+32; + data[i++] = hint; bs_clean_dic(); - /* Imprimo el buffer que deberia ser la palabra que reemplazo */ -/* { - int iii; - for(iii=0; iii