+/*----------------------------------------------------------------------------
+ * jacu - Just Another Compression Utility
+ *----------------------------------------------------------------------------
+ * This file is part of jacu.
+ *
+ * jacu is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * jacu is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with jacu; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ *----------------------------------------------------------------------------
+ */
+
#include "bs.h"
#include <stdlib.h>
PALABRA(" tener"),
PALABRA(" ningún"),
PALABRA(" fácil"),
+ /* Algunas cosas de ingles para mejorar otros textos */
+ PALABRA(" as "),
+ PALABRA(" will "),
+ PALABRA(" with "),
+ PALABRA(" this "),
+ PALABRA(" program "),
+ PALABRA(" are "),
+ PALABRA(" The "),
+ PALABRA(" it "),
+ PALABRA(" which "),
+ PALABRA(" for "),
+ PALABRA(" be "),
+ PALABRA(" that "),
+ PALABRA(" is "),
+ PALABRA(" and "),
+ PALABRA(" to "),
+ PALABRA(" of "),
+ PALABRA(" the ")
};
typedef struct _bs_decode_t_ {
while ((!feof(fp)) && ((i+buffer_pos) < pagesize)) {
c = fgetc(fp);
+ if (usar_dic != 1) {
+ data[i++] = c;
+ continue;
+ }
+
if (c == ESCAPE_CHARACTER) {
data[i++] = c;
data[i++] = 0xF;
hint = check_hint(c);
- if (usar_dic != 1) {
- data[i++] = c;
- continue;
- }
-
switch (hint) {
case -1:
/* No hay hints, vacio el buffer y luego saco el c */
} else {
/* Va una palabra!! */
tmp = data[i];
- printf("%d\n", data[i]);
size += dic[(size_t)tmp].len;
out = (char *)realloc(out, size*sizeof(char));
for(j=0; j<dic[(size_t)tmp].len; j++) {
- printf("%c", dic[(size_t)tmp].word[j]);
out[size-dic[(size_t)tmp].len+j] = dic[(size_t)tmp].word[j];
}
- printf("\n");
/* Salteo el caracter siguiente al de escape */
}
} else {