From: Ricardo Markiewicz Date: Mon, 19 Apr 2004 06:00:29 +0000 (+0000) Subject: * bugfixes X-Git-Tag: svn_import_r684~304 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/18ff567719ef1e5437bef12b937fe95686c336b5?ds=sidebyside * bugfixes --- diff --git a/emufs_gui/articulos.c b/emufs_gui/articulos.c index 25fee3f..b7d8ee0 100644 --- a/emufs_gui/articulos.c +++ b/emufs_gui/articulos.c @@ -104,7 +104,9 @@ t_LstArticulos *art_cargar(const char *filename, int tipo, int tam_bloque) } node = node->next; } - +#ifdef DEBUG + fprintf(stderr, "Articulos : Tipo=%d Bloque=%d\n", tipo-1, tam_bloque); +#endif tmp->fp = emufs_crear("articulos", tipo-1, tam_bloque, sizeof(t_Articulo)); for (node=inicio ; node ; node = node->next) { if (node->type == XML_ELEMENT_NODE) { diff --git a/emufs_gui/emufs_view.c b/emufs_gui/emufs_view.c index 7d2616d..8750c48 100644 --- a/emufs_gui/emufs_view.c +++ b/emufs_gui/emufs_view.c @@ -118,6 +118,19 @@ t_Param param_ok(int argc, char *argv[]) parametros.tam_bloque_nota = atoi(argv[i]); if (parametros.tam_bloque_nota <= 0) return SHOW_HELP; } + break; + case 2: + if (i >= argc) return SHOW_HELP; + n = atoi(argv[i]); + if ((n<1) || (n>3)) return SHOW_HELP; + parametros.tipo_arch_nota = n; + if (((n == 1) || (n == 3)) && ((i+1)>=argc)) + return SHOW_HELP; + i++; + if (n != 2) { + parametros.tam_bloque_nota = atoi(argv[i]); + if (parametros.tam_bloque_nota <= 0) return SHOW_HELP; + } } PERR("ACA"); parametros.xml_fact = file; diff --git a/emufs_gui/facturas.c b/emufs_gui/facturas.c index be3ef3b..e728bec 100644 --- a/emufs_gui/facturas.c +++ b/emufs_gui/facturas.c @@ -206,7 +206,8 @@ t_LstFacturas *fact_cargar(const char *filename, int tipo, int tam_bloque, int t } tmp->fp = emufs_crear("facturas", tipo-1, tam_bloque, sizeof(t_Factura)-sizeof(char *)-sizeof(t_Item*)+cant_items*sizeof(t_Item)); #ifdef DEBUG - fprintf(stderr, "Notas : Tipo=%d Tam Bloque = %d\n", tipo_nota, bloque_nota); + fprintf(stderr, "Facturas : Tipo=%d Tam Bloque = %d\n", tipo-1, tam_bloque); + fprintf(stderr, "Notas : Tipo=%d Tam Bloque = %d\n", tipo_nota-1, bloque_nota); #endif tmp->fp_texto = emufs_crear("notas", tipo_nota-1, bloque_nota, 100); for (node=inicio ; node ; node = node->next) {